Skip to content

armgit / peach

Public Imported from GitHub
0

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

feat(ui): 按数据库偏好显示当前艺名的中日写法

longmeidaoea02a80eae9c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07889f5b1..397e7fdd2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,10 @@ Removed / Fixed / Security。
## [未发布]
+### 新增
+
+- **界面**:女优名称可在设置的「JAV 与新作」中切换中文或日文原文,偏好随数据库共享。切换只改变当前所选艺名的显示写法,缺少对应时保留当前名称,不改写人物或作品资料。
+
### 修复
- **配置**:同源检查统一识别 HTTP、HTTPS 的默认端口,避免地址显式包含 `:80` 或 `:443` 时被误拒绝。
diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md
index 1c895b4bb..e79dcc77b 100644
--- a/docs/OPERATIONS.md
+++ b/docs/OPERATIONS.md
@@ -119,6 +119,8 @@ Mac 与 Windows 托盘的首层只显示简短状态与提醒数量,展开状
## 首次运行与设置文件
+在网页设置的「JAV 与新作」中,可将女优名称显示为中文或日文原文。偏好保存在数据库,其他设备读取同一份设置;保存失败时保留原选择。切换只调整当前所选艺名的写法,缺少对应时保留当前名称,不更改人物名称、别名原文或作品署名。
+
第一次打开 Peach 有两种方式,结果相同:
- **托盘(推荐)**:运行托盘程序后,浏览器会打开首次设置页。
diff --git a/frontend/src/appearance/settings.ts b/frontend/src/appearance/settings.ts
index 6bc4aeaea..f092459e3 100644
--- a/frontend/src/appearance/settings.ts
+++ b/frontend/src/appearance/settings.ts
@@ -37,6 +37,7 @@ export interface AppSettings {
javLayout: string;
homeLayout: string;
javImage: string;
+ performerNameLanguage: 'zh-CN' | 'ja';
followLayout: string;
peopleLayout: string;
photoSize: string;
@@ -64,7 +65,7 @@ export const DEFAULT_SETTINGS = {
searchHistoryLimit: 10, relatedLimit: 20, feedLimit: 12, javLayout: 'big', homeLayout: 'small', javImage: 'cover',
followLayout: 'default', peopleLayout: 'big', photoSize: 'small', ambientMode: true, miniplayer: true,
theaterMode: false, theme: 'system', groupCollapse: true, sidebarOrder: [...DEFAULT_SIDEBAR_ORDER],
- homeGlow: DEFAULT_HOME_GLOW, accent: DEFAULT_ACCENT,
+ homeGlow: DEFAULT_HOME_GLOW, accent: DEFAULT_ACCENT, performerNameLanguage: 'zh-CN',
} as const;
/** 白名单里的值原样给回,否则给 `fallback`。 */
@@ -107,6 +108,7 @@ export function normalizeAppSettings(raw: unknown): { settings: AppSettings; mig
settings.feedLimit = boundedPreference(+(settings.feedLimit as number), 1, 100, 12);
Object.assign(settings, normalizeJavPreferences(settings));
settings.theme = allowedSetting(settings.theme, THEME_CHOICES, 'system');
+ settings.performerNameLanguage = allowedSetting(settings.performerNameLanguage, ['zh-CN', 'ja'], 'zh-CN');
settings.homeGlow = normalizeHomeGlow(settings.homeGlow);
settings.accent = normalizeAccent(settings.accent);
settings.sidebarOrder = normalizeSidebarOrder(settings.sidebarOrder);
@@ -132,10 +134,11 @@ export function appSettingsStore(): SettingsStore<AppSettings> {
}
/** 数据库那一份要求某个壳侧效果跟着做时报的名字(同设置面板的效果名)。 */
-export type SyncedEffect = 'searchHistoryLimit';
+export type SyncedEffect = 'searchHistoryLimit' | 'performerNameLanguage';
/** 搜索记录条数在 `/api/settings` 上的形状:还没定过时是 null。 */
export interface SyncedSettings {
+ performerNameLanguage?: unknown;
followInitialDays?: unknown;
feedHideGroupCompilations?: unknown;
feedHideSoloCompilations?: unknown;
@@ -152,6 +155,12 @@ export function applySyncedSettings(
target: SettingsStore<AppSettings> = appSettingsStore(),
): void {
const settings = target.value;
+ const language = remote?.performerNameLanguage;
+ if ((language === 'zh-CN' || language === 'ja') && language !== settings.performerNameLanguage) {
+ settings.performerNameLanguage = language;
+ target.save();
+ changed('performerNameLanguage');
+ }
const initial = remote && remote.followInitialDays;
if (FOLLOW_INITIAL_DAYS.includes(initial as number)) { settings.followInitialDays = initial as number; target.save() }
for (const key of FEED_COMPILATION_KEYS) {
diff --git a/frontend/src/application/catalog.js b/frontend/src/application/catalog.js
index 54b158aa6..f50cff428 100644
--- a/frontend/src/application/catalog.js
+++ b/frontend/src/application/catalog.js
@@ -15,6 +15,7 @@ import { buildManageBar, cardLayout, homeLayoutActive, javActive, layoutState, s
import { selectionState, setSelectMode, toggleSelection } from './selection.js';
import { javDisplayName, javTitleHtml } from '../core/jav-title';
import { tagLabel } from '../core/tags';
+import { entityDisplayName } from '../core/entity-names';
import { loadStage, stageApi } from '../react/application-residents';
import { currentBarsContext, entityState, openEntity, pushEntityPage, routeEntityPage, sortKeys } from './entity.js';
import { applicationEffects } from './effects';
@@ -273,7 +274,7 @@ export function catalogTags(filters){
}
export function tierPerformer(x){
- return {name:x.k,ringHtml:`<span data-tier-initial>${esc(firstGrapheme(x.k))}</span>${entityFaceImg(
+ return {name:x.k,ringHtml:`<span data-tier-initial>${esc(firstGrapheme(entityDisplayName('performer',x.k,x.id)))}</span>${entityFaceImg(
{id:x.id,hasImage:x.has_image,version:x.image_version,rep:x.has_avatar?x.rep:null,style:facePos(x.avatar_focus),focus:x.avatar_focus,
standIn:x.avatar_stand_in})}`};
}
diff --git a/frontend/src/application/preferences.js b/frontend/src/application/preferences.js
index 22f2006e1..3a99f2f5e 100644
--- a/frontend/src/application/preferences.js
+++ b/frontend/src/application/preferences.js
@@ -1,7 +1,8 @@
/* preferences 域控制器:本域状态与动作,启动由 Application 的生命周期统一安装。 */
import { loadMediaSources } from './../query/media-sources';
-import { buildBars, dropOfflineFromDefaultLoc, homePath, loadCatalog, paintCatalogFilter, repaintCatalogGrid } from './catalog.js';
+import { buildBars, catalogState, dropOfflineFromDefaultLoc, homePath, loadCatalog, paintCatalogFilter, repaintCatalogGrid } from './catalog.js';
import { appSettingsStore } from './../appearance/settings';
+import { entityDisplayName, setNameLanguage } from '../core/entity-names';
import { playUiSound, setUiSoundsEnabled, wireUiSounds } from '../ui-kit/sounds';
import { applyTheme, watchSystemTheme } from './../appearance/theme';
import { applyAccent, applyGlassFaces, applyHomeGlow, paintHomeGlowNow } from './../appearance/glow';
@@ -17,6 +18,7 @@ import { stageApi } from '../react/application-residents';
import { syncJavImages } from './../jav-artwork';
import { coverAnchor } from './../card-art/framing';
import { mediaState, repaintDetailPoster } from './media.js';
+import { loadingState } from './loading.js';
import { updateManagedRoute } from './../history/managed';
import { MEDIA_SOURCE_ICONS, emptyStateHtml, wireHorizontalScroller } from '../ui-kit';
import { tagLabel } from '../core/tags';
@@ -65,7 +67,7 @@ export function sidebarFacets(facetData,context){
locations:(facetData.locations||[]).map(row=>({value:row.k,label:LOC[row.k]||row.k,n:row.n??null,dot:sidebarDot(row.k),
...(preferencesState.sourceOffline(row.k)?{offline:preferencesState.OFFLINE_HINT}:{})})),
regions:rows(facetData.regions),orientations:rows(facetData.orientations),years:rows(facetData.years),
- creators:rows(creators),tags:rows(facetData.tags),tech:rows(facetData.tech),
+ creators:rows(creators,row=>entityDisplayName('creator',row.k)),tags:rows(facetData.tags),tech:rows(facetData.tech),
followTags:rows(facetData.follow_tags,row=>tagLabel(row.k)),
duration:!!facetData.stats?.duration,
};
@@ -143,6 +145,7 @@ preferencesState.OFFLINE_REASON = {local:'无法读取媒体目录,请检查
preferencesState.offlineReason = key=>preferencesState.sourceProblems[key]||preferencesState.OFFLINE_REASON[key]||'无法读取这个来源的媒体目录,请检查目录权限及挂载状态。';
preferencesState.settingsStore = appSettingsStore();
preferencesState.appSettings = preferencesState.settingsStore.value;
+setNameLanguage(preferencesState.appSettings.performerNameLanguage);
preferencesState.saveSettings = ()=>preferencesState.settingsStore.save();
document.documentElement.style.setProperty('--hover-delay',`${preferencesState.appSettings.hoverDelaySeconds}s`);
setUiSoundsEnabled(preferencesState.appSettings.uiSounds);
@@ -156,6 +159,11 @@ preferencesState.catalogLoadWaiters = [];
preferencesState.nextCatalogLoad = ()=>new Promise(resolve=>preferencesState.catalogLoadWaiters.push(resolve));
preferencesState.handOff = loading=>{preferencesState.catalogLoadWaiters.splice(0).forEach(resolve=>resolve(loading));return loading};
preferencesState.settingsEffects = {
+ performerNameLanguage:()=>{
+ setNameLanguage(preferencesState.appSettings.performerNameLanguage);
+ loadingState.syncPageTitle(location.href);
+ catalogState.barsRendered='';buildBars();
+ },
theme:()=>applyTheme(),
/* 开这一格时立刻响一声开关音,人才知道它开了。关的那一声由 document 上的 change 监听
发出:捕获阶段排在这里前面,那时开关还没关掉,最后一声还能响出来。 */
diff --git a/frontend/src/card-art/markup.ts b/frontend/src/card-art/markup.ts
index 09838fceb..57f5dc044 100644
--- a/frontend/src/card-art/markup.ts
+++ b/frontend/src/card-art/markup.ts
@@ -5,6 +5,7 @@
* 加载后往图上写内联样式与类名。React 看不见这些改动:节点归它管,重画一次就冲掉取景,
* 被兜底链摘掉的节点再交给它更新还会报错。 */
import { esc, firstGrapheme } from '@peach/legacy/core';
+import { entityDisplayName } from '../core/entity-names';
import { javImageKind } from '../jav-artwork';
import { imageFallbackAttrs } from './image-fallback';
@@ -163,7 +164,7 @@ export function avatarInner(name: string, ref: FaceRef | null | undefined, repId
const sourceFace = !ref?.has_image && !logoName && ref?.source_avatar_url
? `<img src="${esc(ref.source_avatar_url)}" width="128" height="128" alt="" loading="lazy" decoding="async" ${
imageFallbackAttrs({ fallbacks: ref.source_avatar_fallbacks || [] })}>` : '';
- return `<span class="ini">${esc(firstGrapheme(name))}</span>`
+ return `<span class="ini">${esc(firstGrapheme(entityDisplayName(kind, name, ref?.id)))}</span>`
+ (sourceFace || entityFaceImg({
kind, id: ref && ref.id, hasImage: !!(ref && ref.has_image), version: ref && ref.image_version,
rep: ref?.has_avatar && ref.rep ? ref.rep : repId, mark: markId,
@@ -383,6 +384,8 @@ export function queueAvatarHtml(item: IdentityItem): string {
/** Mix 的署名:番号作品先认女优,其余先认创作者。 */
export function mixLabel(item: IdentityItem, tagLabel: (tag: string) => string): string {
const performer = (item.performers || [])[0];
- return (item.is_jav && performer ? performer : item.creator) || performer || item.studio || item.code
+ if (item.is_jav && performer) return entityDisplayName('performer', performer);
+ if (item.creator) return entityDisplayName('creator', item.creator);
+ return (performer ? entityDisplayName('performer', performer) : '') || item.studio || item.code
|| tagLabel((item.tags || [])[0] || '') || '为你推荐';
}
diff --git a/frontend/src/core/entity-links.ts b/frontend/src/core/entity-links.ts
index c72616c0f..09fa53271 100644
--- a/frontend/src/core/entity-links.ts
+++ b/frontend/src/core/entity-links.ts
@@ -1,3 +1,5 @@
+import { registerNameWriting, registerNameWritings } from './entity-names';
+
const links = new Map<string, number>();
const aliases = new Map<string, Set<number>>();
const names = new Map<string, string>();
@@ -34,10 +36,12 @@ export function registerResponseEntities(path: string, payload: unknown): void {
if (!payload || typeof payload !== 'object') return;
const data = payload as Record<string, any>;
const url = new URL(path, 'https://peach.invalid');
+ if (url.pathname === '/api/entity/shapes' && Array.isArray(data.name_variants)) registerNameWritings(data.name_variants);
if (!['/api/entity', '/api/index', '/api/entity/shapes', '/api/tops', '/api/facets', '/api/suggest'].includes(url.pathname)) return;
const requested = url.searchParams.get('kind') || url.pathname.slice(5);
const kind = kinds[requested] || requested;
if (data.canonical_name && data.id) {
+ if (data.name_display?.current) registerNameWriting({ ...data.name_display.current, id: data.id, kind: data.kind || kind });
for (const name of Array.isArray(data.aliases) ? data.aliases : []) registerAlias(data.kind || kind, name, data.id);
registerEntityLink(data.kind || kind, data.canonical_name, data.id);
}
diff --git a/frontend/src/core/entity-names.ts b/frontend/src/core/entity-names.ts
new file mode 100644
index 000000000..1a5dbf4f8
--- /dev/null
+++ b/frontend/src/core/entity-names.ts
@@ -0,0 +1,46 @@
+/** 语言写法只用于标签。查询、路由和写入始终使用调用方持有的原始名称与 ID。 */
+export type NameLanguage = 'zh-CN' | 'ja';
+export interface NameWriting {
+ id: number; kind: string; canonical_name: string; zh_cn: string | null; ja: string | null;
+}
+const names = new Map<string, NameWriting>();
+const identities = new Map<string, NameWriting>();
+const listeners = new Set<() => void>();
+let language: NameLanguage = 'zh-CN';
+let revision = 0;
+const notify = () => { revision++; listeners.forEach(listener => listener()) };
+export const nameRevision = () => revision;
+export const subscribeNames = (listener: () => void) => { listeners.add(listener); return () => { listeners.delete(listener) } };
+export const nameLanguage = () => language;
+export function setNameLanguage(value: NameLanguage): void {
+ if (language === value) return;
+ language = value;
+ notify();
+}
+export function registerNameWritings(rows: NameWriting[]): void {
+ names.clear(); identities.clear();
+ for (const row of rows) {
+ identities.set(`${row.kind}/${row.id}`, row);
+ // 仅以规范名索引,不能让另一个艺名经实体 ID 变成当前艺名。
+ names.set(`${row.kind}/${row.canonical_name}`, row);
+ }
+ notify();
+}
+export function registerNameWriting(row: NameWriting): void {
+ identities.set(`${row.kind}/${row.id}`, row);
+ names.set(`${row.kind}/${row.canonical_name}`, row);
+ notify();
+}
+export function entityWriting(kind: string, name: string, id?: number | null): NameWriting | undefined {
+ const byId = id ? identities.get(`${kind}/${id}`) : undefined;
+ return byId?.canonical_name === name ? byId : names.get(`${kind}/${name}`);
+}
+export function entityDisplayName(kind: string, name: string, id?: number | null): string {
+ const row = entityWriting(kind, name, id);
+ return (language === 'ja' ? row?.ja : row?.zh_cn) || name;
+}
+export function nameFallback(kind: string, name: string, id?: number | null): string {
+ const row = entityWriting(kind, name, id);
+ if (!row || (language === 'ja' ? row.ja : row.zh_cn)) return '';
+ return language === 'ja' ? '暂无已核对的日文原文,保留当前名称' : '暂无已核对的中文写法,保留当前名称';
+}
diff --git a/frontend/src/history/route-meta.ts b/frontend/src/history/route-meta.ts
index 4afab1713..96a843792 100644
--- a/frontend/src/history/route-meta.ts
+++ b/frontend/src/history/route-meta.ts
@@ -14,6 +14,7 @@
* 解码过的路径,名字里的斜杠吃掉剩下全部段,空尾段不算)。 */
import { overlayMatch } from './overlay';
import { entityLinkName } from '../core/entity-links';
+import { entityDisplayName } from '../core/entity-names';
import { PREFERENCE_SECTIONS, CONFIGURATION_SECTIONS } from './settings-route';
export interface RouteMeta {
@@ -83,5 +84,5 @@ export function routeMetaOf(path: string): RouteMeta | null {
const pattern = `/${segment}/*`;
const kinds: Record<string, string> = { performers: 'performer', studios: 'studio', creators: 'creator', agencies: 'agency', series: 'series', tags: 'tag' };
const name = /^\d+$/.test(rest.join('/')) ? entityLinkName(kinds[segment] || '', Number(rest[0])) : rest.join('/');
- return Object.hasOwn(ROUTE_META, pattern) ? { ...ROUTE_META[pattern], title: name || '资料' } : null;
+ return Object.hasOwn(ROUTE_META, pattern) ? { ...ROUTE_META[pattern], title: name ? entityDisplayName(kinds[segment] || '', name) : '资料' } : null;
}
diff --git a/frontend/src/react/catalog-filter/catalog-filter-page.tsx b/frontend/src/react/catalog-filter/catalog-filter-page.tsx
index 4af69afdf..bb5af2188 100644
--- a/frontend/src/react/catalog-filter/catalog-filter-page.tsx
+++ b/frontend/src/react/catalog-filter/catalog-filter-page.tsx
@@ -9,6 +9,8 @@
* 详情浮窗打开期间壳不推任何东西,关掉回来还是同一批节点(`buildBars` 那段注释讲了为什么)。 */
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type RefObject } from 'react';
import { createPortal } from 'react-dom';
+import { entityDisplayName } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import { fitSkeleton, popBadges, popCount } from '@peach/legacy/ui';
import { FilterGlassRows, FilterPill } from '../components/filter-glass';
@@ -121,6 +123,7 @@ function TagPill({ tag, onPress }: { tag: CatalogTag; onPress(tag: string): void
/** 两排头像。空的一排仍占 28px,画出来就是一条什么都没有的空带,所以没人就不画那一排。 */
function Tiers(props: CatalogFilterProps) {
+ useEntityNames();
const { actions, helpers } = props;
const tiers = props.tiers ?? { key: '', performers: [], studios: [] };
const loading = !props.tiers;
@@ -152,7 +155,7 @@ function Tiers(props: CatalogFilterProps) {
<button key={person.name} type="button" data-tier-performer="" data-entity-kind="performer"
data-entity-name={person.name} onClick={() => actions.openEntity('performer', person.name)}>
<span data-tier-ring="" dangerouslySetInnerHTML={{ __html: person.ringHtml }} />
- <span data-tier-name="">{person.name}</span>
+ <span data-tier-name="">{entityDisplayName('performer', person.name)}</span>
</button>
))}
</div>
diff --git a/frontend/src/react/catalog-grid/catalog-list-page.tsx b/frontend/src/react/catalog-grid/catalog-list-page.tsx
index 38622aa51..f1746df33 100644
--- a/frontend/src/react/catalog-grid/catalog-list-page.tsx
+++ b/frontend/src/react/catalog-grid/catalog-list-page.tsx
@@ -16,6 +16,7 @@ import { ArtSlot } from '../components/art-slot';
import { useLibraryTints } from '../components/library-tint';
import { catalogListSkeletonCellHtml } from '../../catalog-content-skeleton';
import { identityParts } from '../components/media-card';
+import { useEntityNames } from '../use-entity-names';
import { SourceMark } from '../settings/section';
import { DataTableFrame } from '../components/data-table-frame';
import { DataTableFooter, DataTableSort } from '../components/table-controls';
@@ -219,6 +220,7 @@ function ListIdentity({ item, props, disabled }: { item: MediaItem; props: Catal
const rawName = parts?.title || item.name || '';
const name = props.helpers.displayName(item, rawName).trim() || '未命名作品';
const titleHtml = props.helpers.titleHtml(item, rawName).trim() || '未命名作品';
+ useEntityNames();
const { avatar, who } = identityParts(item);
const watched = !parts && Number(item.play_seconds) > 0 && Number(item.duration) > 0
? Math.min(Number(item.play_seconds) / Number(item.duration), 1) : 0;
diff --git a/frontend/src/react/components/identity-cell.tsx b/frontend/src/react/components/identity-cell.tsx
index 5fcb7a7b4..bd7113f46 100644
--- a/frontend/src/react/components/identity-cell.tsx
+++ b/frontend/src/react/components/identity-cell.tsx
@@ -2,20 +2,24 @@ import type { ReactNode } from 'react';
import { esc, firstGrapheme, icon, leadingGraphemes, registerEntityLink } from '@peach/legacy/core';
import { entityFaceImg, logoUrl } from '@peach/card-art';
import type { DetailEntityRef } from '../item-detail/item-detail';
+import { entityDisplayName, nameFallback } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
/** 详情署名共用实体头像、厂牌标识与首字回退。 */
export function IdentityCell({ kind, person, onOpen, hidden, overflow, face }: {
kind: string; person: DetailEntityRef; onOpen(kind: string, name: string): void;
hidden?: boolean; overflow?: boolean; face?: ReactNode;
}) {
+ useEntityNames();
+ const displayName = entityDisplayName(kind, person.name, person.id);
const image = kind === 'performer' || kind === 'creator'
- ? <span data-id-face="" dangerouslySetInnerHTML={{ __html: `<span>${esc(firstGrapheme(person.name))}</span>`
+ ? <span data-id-face="" dangerouslySetInnerHTML={{ __html: `<span>${esc(firstGrapheme(displayName))}</span>`
+ entityFaceImg({ kind, id: person.id, hasImage: person.has_image, version: person.image_version,
focus: person.avatar_focus, rep: person.has_avatar ? person.rep : null, standIn: person.avatar_stand_in }) }} />
: <span data-id-face=""><span>{kind === 'studio' ? leadingGraphemes(person.name, 2) : firstGrapheme(person.name)}</span>
{kind === 'studio' && person.has_logo ? <img src={logoUrl(person.name, 'icon', person.logo_version)} alt="" width={128} height={128} loading="lazy" decoding="async" data-drop="self" /> : null}</span>;
- const content = <>{face ?? image}<span data-id-name="">{person.name}</span></>;
- const attrs = { 'data-id-cell': kind, title: person.name, hidden, 'data-castoverflow': overflow ? '' : undefined };
+ const content = <>{face ?? image}<span data-id-name="">{displayName}</span></>;
+ const attrs = { 'data-id-cell': kind, title: nameFallback(kind, person.name, person.id) || displayName, hidden, 'data-castoverflow': overflow ? '' : undefined };
return person.id ? <button type="button" {...attrs} data-entity-kind={kind} data-entity-name={person.name}
onClick={() => { registerEntityLink(kind, person.name, person.id); onOpen(kind, person.name) }}>{content}</button> : <span {...attrs}>{content}</span>;
}
diff --git a/frontend/src/react/components/media-card.tsx b/frontend/src/react/components/media-card.tsx
index 6f787a045..840aa0113 100644
--- a/frontend/src/react/components/media-card.tsx
+++ b/frontend/src/react/components/media-card.tsx
@@ -27,6 +27,8 @@ import {
} from '@peach/card-art';
import { esc, fmtDur, fmtSize } from '@peach/legacy/core';
import { spinnerHtml } from '@peach/legacy/ui';
+import { entityDisplayName } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import type { MediaCardActions, MediaCardHelpers, MediaCardLayout, MediaItem } from '../catalog-grid/types';
import { ArtSlot } from './art-slot';
@@ -131,12 +133,12 @@ export function identityParts(item: MediaItem): { avatar: ReactNode; who: ReactN
const who = coStarred
? (
<>
- <button type="button" data-media-who="" data-entity-kind="performer" data-entity-name={performer} title={performer}><Icon name="user-round" /><span>{performer}</span></button>
+ <button type="button" data-media-who="" data-entity-kind="performer" data-entity-name={performer} title={entityDisplayName('performer', performer)}><Icon name="user-round" /><span>{entityDisplayName('performer', performer)}</span></button>
<span data-media-who-more="">{`等 ${total} 人`}</span>
</>
)
: kind
- ? <button type="button" data-media-who="" data-entity-kind={kind} data-entity-name={name} title={name}><Icon name="user-round" /><span>{name}</span></button>
+ ? <button type="button" data-media-who="" data-entity-kind={kind} data-entity-name={name} title={entityDisplayName(kind, name)}><Icon name="user-round" /><span>{entityDisplayName(kind, name)}</span></button>
/* 没有署名人的那批是馆藏里的一类,点得开,和女优名、厂牌名一样。 */
: <button type="button" data-media-who="" data-open-unowned=""><Icon name="user-round" /><span>{name}</span></button>;
return { avatar, who };
@@ -201,6 +203,7 @@ function seekPreview(card: HTMLElement | null, delta: number) {
}
function VideoCard({ item, variant, layout, selected, selectMode, seekSeconds, helpers, actions, onOpen, grouped = true }: MediaCardProps) {
+ useEntityNames();
const card = useRef<HTMLElement | null>(null);
const [written, setWritten] = useState<{ id: number; on: boolean } | null>(null);
const later = written?.id === item.id ? written.on : !!item.watch_later;
diff --git a/frontend/src/react/entity-hero/entity-hero-page.tsx b/frontend/src/react/entity-hero/entity-hero-page.tsx
index b8ade96fc..b86fb0fd2 100644
--- a/frontend/src/react/entity-hero/entity-hero-page.tsx
+++ b/frontend/src/react/entity-hero/entity-hero-page.tsx
@@ -8,11 +8,13 @@
* 取图失败时兜底链(`card-art/image-fallback.ts`)会把 `<img>`
* 从 DOM 里摘掉、人脸放大(`avatarFrame`)往图上写内联尺寸、等待微光挂在图的父元素上,这几样
* 都直接改节点,所以那几格用 `dangerouslySetInnerHTML`,React 不拥有里面的节点。 */
-import { useEffect, useRef, useState, type MouseEvent, type ReactNode } from 'react';
+import { useEffect, useLayoutEffect, useRef, useState, type MouseEvent, type ReactNode } from 'react';
import { createPortal } from 'react-dom';
import { entityFaceImg, facePos } from '@peach/card-art';
import { entityPath, esc, firstGrapheme, icon } from '@peach/legacy/core';
import { textLang } from '../../core/text-lang';
+import { entityDisplayName, nameFallback, nameLanguage } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import { Button } from '@/components/base/buttons/button';
@@ -39,6 +41,9 @@ function costarImg(person: HeroCostar): string {
}
export function EntityHeroPage({ kind, name, entity, feedNew, feedHost, actions, helpers }: EntityHeroProps) {
+ useEntityNames();
+ const displayName = entityDisplayName(kind, entity.canonical_name, Number(entity.id));
+ const fallback = nameFallback(kind, entity.canonical_name, Number(entity.id));
const people = isPeople(kind);
const company = isCompany(kind);
const facts = people ? factRows(entity.profile) : company ? companyFactRows(entity.company_profile) : [];
@@ -57,27 +62,28 @@ export function EntityHeroPage({ kind, name, entity, feedNew, feedHost, actions,
<section data-entity-card="" aria-label="资料">
<div data-entity-profile={facts.length ? 'facts' : ''}>
<div data-entity-portrait-wrap="">
- <Portrait kind={kind} name={name} helpers={helpers} people={people} company={company} />
+ <Portrait kind={kind} name={displayName} helpers={helpers} people={people} company={company} />
{people && entity.id ? (
<span data-avatar-picker="">
- <AvatarPicker kind={kind} entityId={Number(entity.id)} name={entity.canonical_name || name}
+ <AvatarPicker kind={kind} entityId={Number(entity.id)} name={displayName || name}
onPicked={actions.avatarPicked} />
</span>
) : null}
</div>
<div data-entity-identity="">
<div data-entity-title="">
- <h2>{entity.canonical_name}</h2>
- {kind !== 'tag' ? <NamePicker current={entity.canonical_name} choices={nameChoices(entity)}
+ <h2 lang={textLang(displayName)} title={fallback || undefined}>{displayName}</h2>
+ {kind !== 'tag' ? <NamePicker current={entity.canonical_name} choices={nameChoices(entity, nameLanguage())}
onChoose={actions.chooseName} onAddAlias={actions.addAlias} /> : null}
{entity.id ? <FavoriteButton item={{ entity_id: Number(entity.id), kind, name: entity.canonical_name || name, favorite: entity.favorite }} /> : null}
</div>
+ {fallback ? <span data-name-fallback="" data-copy-key={`performer-name-fallback.${nameLanguage()}`} className="text-caption-1-regular text-text-secondary">{fallback}</span> : null}
<AliasLine kind={kind} entity={entity} actions={actions} />
{entity.related_identities?.length ? (
<div className="flex min-w-0 flex-wrap gap-2 text-caption-1-regular text-text-secondary">
{/* 账号名常是一长串无空格的英文,窄屏下得能在任意处折行。 */}
{entity.related_identities.map((identity) => {
- const text = `${identity.relation === 'same_person' ? '同一人' : '关联账号'}:${identity.canonical_name}`;
+ const text = `${identity.relation === 'same_person' ? '同一人' : '关联账号'}:${entityDisplayName(identity.kind, identity.canonical_name, identity.id)}`;
return (
<button type="button" key={identity.id} title={text}
className="min-w-0 max-w-full text-text-primary underline wrap-anywhere"
@@ -116,8 +122,8 @@ export function EntityHeroPage({ kind, name, entity, feedNew, feedHost, actions,
<button key={person.k} type="button" data-related-performer={person.k}
onClick={() => actions.openEntity('performer', person.k)}>
<span data-hero-ring="" dangerouslySetInnerHTML={{
- __html: `<span>${esc(firstGrapheme(person.k))}</span>${costarImg(person)}` }} />
- <span data-hero-costar-name="">{person.k}</span>
+ __html: `<span>${esc(firstGrapheme(entityDisplayName('performer', person.k, person.id)))}</span>${costarImg(person)}` }} />
+ <span data-hero-costar-name="">{entityDisplayName('performer', person.k, person.id)}</span>
</button>
))}
</div>
@@ -137,10 +143,15 @@ function Portrait({ kind, name, helpers, people, company }: {
}) {
/* 图只拼一次:兜底链摘掉的 `<img>`、人脸放大写进去的尺寸都留在节点上,重画时不能按
同一段 HTML 再盖回去(`dangerouslySetInnerHTML` 只在字符串变了时才重写)。 */
- const [html] = useState(() => `${helpers.portraitImg()}<span>${esc(firstGrapheme(name))}</span>`);
+ const portrait = useRef<HTMLDivElement>(null);
+ const [html] = useState(() => `${helpers.portraitImg()}<span data-portrait-initial="">${esc(firstGrapheme(name))}</span>`);
+ useLayoutEffect(() => {
+ const initial = portrait.current?.querySelector('[data-portrait-initial]');
+ if (initial) initial.textContent = firstGrapheme(name);
+ }, [name]);
return (
<div data-entity-portrait={people ? 'round' : 'square'} data-fit-native={company ? 'mark' : 'portrait'}
- data-entity-kind={kind} dangerouslySetInnerHTML={{ __html: html }} />
+ ref={portrait} data-entity-kind={kind} dangerouslySetInnerHTML={{ __html: html }} />
);
}
@@ -156,7 +167,8 @@ function AliasLine({ kind, entity, actions }: { kind: string; entity: EntityHero
: agency.name) : null;
const count = <><b>{entity.asset_count.toLocaleString()}</b> 个视频</>;
if (kind === 'performer' || kind === 'creator') {
- const line = nameLine(entity.name_groups);
+ const groups = entity.name_display?.groups[nameLanguage()] ?? entity.name_groups;
+ const line = nameLine(groups);
return (
<div data-entity-alias="meta">
<IdentityMeta entity={entity} />
@@ -171,7 +183,7 @@ function AliasLine({ kind, entity, actions }: { kind: string; entity: EntityHero
<MorePop id="entityAliasPop" hook="alias" rest={line.rest} label={`另外 ${line.rest.toLocaleString()} 个别名`}
heading={`${line.total.toLocaleString()} 个别名`}>
<dl>
- {(entity.name_groups?.groups || []).map((group, at) => (
+ {(groups?.groups || []).map((group, at) => (
<NameGroup key={at} label={group.label} names={group.names} />
))}
</dl>
diff --git a/frontend/src/react/entity-hero/entity-hero.ts b/frontend/src/react/entity-hero/entity-hero.ts
index 0ca58c9dc..d59901f6a 100644
--- a/frontend/src/react/entity-hero/entity-hero.ts
+++ b/frontend/src/react/entity-hero/entity-hero.ts
@@ -85,6 +85,10 @@ export interface EntityHeroData {
canonical_name: string;
aliases?: string[];
display_aliases?: string[];
+ name_display?: {
+ choices: Record<'zh-CN' | 'ja', { value: string; label: string }[]>;
+ groups: Record<'zh-CN' | 'ja', HeroNameGroups>;
+ };
user_aliases?: string[];
asset_count: number;
member_count?: number;
@@ -160,10 +164,12 @@ export const entityFeedTip = (on: boolean) => on
? '已订阅新作,点击取消订阅'
: '订阅新作';
-/** 这条实体名下已有的写法,统称排第一。 */
-export function nameChoices(entity: EntityHeroData): string[] {
+/** 当前语言的可选艺名,统称只保留一项;值仍指向已登记的名称。 */
+export function nameChoices(entity: EntityHeroData, language: 'zh-CN' | 'ja' = 'zh-CN'): { value: string; label: string }[] {
+ if (entity.name_display) return entity.name_display.choices[language];
return [entity.canonical_name, ...(entity.aliases || [])]
- .filter((option, index, all) => option && all.indexOf(option) === index);
+ .filter((option, index, all) => option && all.indexOf(option) === index)
+ .map(value => ({ value, label: value }));
}
/** 事务所:有实体时给去处,只有 `metadata.agency` 时只写名字(那是采到的原文,还没有对应身份)。 */
diff --git a/frontend/src/react/entity-hero/name-picker.tsx b/frontend/src/react/entity-hero/name-picker.tsx
index edc0b43c2..69433b2b9 100644
--- a/frontend/src/react/entity-hero/name-picker.tsx
+++ b/frontend/src/react/entity-hero/name-picker.tsx
@@ -1,8 +1,8 @@
/* 名字右边那枚下拉:在这条实体已有的写法里挑一个当统称,或者添一个新的。
*
* 统称由用户自己定。同一个人在库里常有中文、日文、罗马字几种写法,哪一个该顶在标题上是他的
- * 偏好,数据库里没有能推出答案的字段。菜单只列这条实体名下已有的写法:换统称是换显示的那一个,
- * 不是改名。这枚下拉恒在,只有一个名字时也在——「她还叫过别的」要有入口,而恰恰是只剩一个
+ * 偏好,数据库里没有能推出答案的字段。菜单按名称语言偏好归并已有艺名的写法,读音与损坏条目不列入。
+ * 语言切换不触发统一名称操作。这枚下拉恒在,只有一个名字时也在——「她还叫过别的」要有入口,而恰恰是只剩一个
* 名字的人最需要补。添别名是另一件事,隔一条线摆在末尾。
*
* 换统称写的是 `entity.canonical_name` 这个真相字段:确认、写回、回执与重进这一页都在壳里
@@ -20,7 +20,7 @@ import { Glyph } from './glyph';
export function NamePicker({ current, choices, onChoose, onAddAlias }: {
current: string;
- choices: string[];
+ choices: { value: string; label: string }[];
onChoose(name: string): void;
onAddAlias(): void;
}) {
@@ -44,8 +44,8 @@ export function NamePicker({ current, choices, onChoose, onAddAlias }: {
if (chosen && chosen !== current) onChoose(chosen);
}}>
{choices.map((option) => (
- <MenuItem key={option} id={option} textValue={option} data-namepick-name={option}>
- <Glyph name="check" /><span>{option}</span>
+ <MenuItem key={option.value} id={option.value} textValue={option.label} data-namepick-name={option.value}>
+ <Glyph name="check" /><span>{option.label}</span>
</MenuItem>
))}
</MenuSection>
diff --git a/frontend/src/react/index/index-people.tsx b/frontend/src/react/index/index-people.tsx
index 8fcc774f2..09c00d5e9 100644
--- a/frontend/src/react/index/index-people.tsx
+++ b/frontend/src/react/index/index-people.tsx
@@ -7,6 +7,8 @@
* 格底、头像框、首字与读数的配色在同目录的 `index-people.css`。 */
import { useLayoutEffect, useRef, type ReactNode } from 'react';
import { Chip } from '@/components/base/badges/chip';
+import { entityDisplayName } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import { cardClass } from '../components/card';
import { spriteGlyph } from '../components/sprite-glyph';
@@ -64,6 +66,7 @@ export function PeopleGrid(
},
) {
const company = isCompany(kind) || kind === 'series';
+ useEntityNames();
const big = layout === 'big';
return (
<div data-index-grid="" data-layout={layout} data-cells={company ? 'company' : 'people'}
@@ -72,7 +75,7 @@ export function PeopleGrid(
const entityKind = item.entity_kind || ENTITY_KINDS[kind];
const avatar = props.personAvatar(item, entityKind, big);
return (
- <Cell key={`${entityKind}:${item.entity_id || item.k}`} data-k={item.k} data-kind={entityKind} name={item.k} readout={`${personReadout(kind, item)}${item.identity_labels?.length ? ' · ' + item.identity_labels.join(' / ') : ''}`}
+ <Cell key={`${entityKind}:${item.entity_id || item.k}`} data-k={item.k} data-kind={entityKind} name={entityDisplayName(entityKind, item.k, item.entity_id)} readout={`${personReadout(kind, item)}${item.identity_labels?.length ? ' · ' + item.identity_labels.join(' / ') : ''}`}
big={big} following={item.following} onPress={() => props.openEntity(entityKind, item.k)}>
<Ring html={avatar.html} face={avatar.face} company={company} big={big} />
</Cell>
diff --git a/frontend/src/react/library-shortcuts/shortcut-controls.tsx b/frontend/src/react/library-shortcuts/shortcut-controls.tsx
index 9a131732d..cc633f2ce 100644
--- a/frontend/src/react/library-shortcuts/shortcut-controls.tsx
+++ b/frontend/src/react/library-shortcuts/shortcut-controls.tsx
@@ -3,6 +3,8 @@ import { attachOverlayScrollbar, revealTexts, spinnerHtml, wireHorizontalScrolle
import { Button, ButtonLink } from '@/components/base/buttons/button';
import { Input } from '@/components/base/input/input';
import { errorMessage } from '../../api';
+import { entityDisplayName } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import { ModalFrame } from '../components/modal-frame';
import { Note } from '../components/note';
import { FilterIconButton } from '../components/filter-glass';
@@ -31,6 +33,7 @@ export function FavoriteButton({ item }: { item: Favorite }) {
}
function FavoriteChoice({ item }: { item: Favorite }) {
+ useEntityNames();
const query = useShortcuts(false);
const initial = useRef(query.data);
const write = useShortcutWrite();
@@ -39,7 +42,7 @@ function FavoriteChoice({ item }: { item: Favorite }) {
: item.favorite ?? (query.data ? isFavorite(query.data.favorites || [], item) : false);
return <span className="inline-flex min-w-0 flex-col gap-1">
<EntityActionButton data-favorite="" aria-pressed={!!selected}
- label={`${selected ? '取消收藏' : '收藏'}${item.name}`}
+ label={`${selected ? '取消收藏' : '收藏'}${entityDisplayName(item.kind, item.name, item.entity_id)}`}
{...busyProps(write.isPending)} onClick={() => {
if (!write.isPending) write.mutate({ action: 'favorite', ...item, on: !selected });
}}>{write.isPending ? <span aria-hidden dangerouslySetInnerHTML={{ __html: spinnerHtml('') }} /> : <Star />}</EntityActionButton>
@@ -61,6 +64,7 @@ export function LibraryShortcuts({ currentHref, kind }: { currentHref?: () => st
}
function ShortcutContents({ currentHref, kind, close }: { currentHref?: () => string; kind?: string; close(): void }) {
+ useEntityNames();
const query = useShortcuts();
const write = useShortcutWrite();
const [name, setName] = useState('');
@@ -152,12 +156,12 @@ function ShortcutContents({ currentHref, kind, close }: { currentHref?: () => st
{search ? '试试其他名称。' : '在资料页或标签页收藏常用内容。'}
</EmptyState> : null}
<div data-shortcuts-list="">{rows.map((row) => <div key={row.key} data-shortcuts-row="" className="flex min-w-0 items-center justify-between gap-3">
- <a href={favoriteHref(row)} aria-label={row.name} onClick={close} className="flex min-w-0 flex-1 items-center gap-3 text-body-regular text-text-primary">
+ <a href={favoriteHref(row)} aria-label={entityDisplayName(row.kind, row.name, row.entity_id)} onClick={close} className="flex min-w-0 flex-1 items-center gap-3 text-body-regular text-text-primary">
<FavoriteAvatar key={row.image_url} item={row} />
- <span className="flex min-w-0 flex-col gap-1"><span className="truncate">{row.name}</span>
+ <span className="flex min-w-0 flex-col gap-1"><span className="truncate">{entityDisplayName(row.kind, row.name, row.entity_id)}</span>
<span className="text-caption-1-regular text-text-secondary">{row.scope === 'online' ? '在线标签' : LABELS[row.kind]}</span></span>
</a>
- <Button variant="secondary" size="small" aria-label={`取消收藏${row.name}`} {...busyProps(write.isPending)}
+ <Button variant="secondary" size="small" aria-label={`取消收藏${entityDisplayName(row.kind, row.name, row.entity_id)}`} {...busyProps(write.isPending)}
onClick={() => { if (!write.isPending) write.mutate({ action: 'favorite', ...row, on: false }) }}>取消收藏</Button>
</div>)}</div>
</> : <>
diff --git a/frontend/src/react/search/search-page.tsx b/frontend/src/react/search/search-page.tsx
index 6e9b77af1..fe921dd19 100644
--- a/frontend/src/react/search/search-page.tsx
+++ b/frontend/src/react/search/search-page.tsx
@@ -12,6 +12,8 @@ import { useLayoutEffect, useReducer, useRef, type MouseEvent, type ReactNode }
import { avatarInner } from '@peach/card-art';
import { apiGet, apiSend } from '../../api';
+import { entityDisplayName } from '../../core/entity-names';
+import { useEntityNames } from '../use-entity-names';
import { TabCount } from '../components/board-tabs';
import { PillTabList } from '../components/pill-tabs';
import {
@@ -391,6 +393,7 @@ function Row({ entry, active, helpers, onPick, onPeek, onRemove }: {
entry: SearchOption; active: boolean; helpers: SearchProps['helpers'];
onPick(entry: SearchOption): void; onPeek(card: SuggestCard): void; onRemove(value: string): Promise<void>;
}) {
+ useEntityNames();
const shared = {
'data-search-value': entry.value, 'data-active': active ? '' : undefined,
onClick: (event: MouseEvent) => {
@@ -443,8 +446,8 @@ function Row({ entry, active, helpers, onPick, onPeek, onRemove }: {
return (
<div data-search-option="person" data-open-entity={opens} {...shared} onMouseDown={keep}>
<Face item={item} kind={kind} />
- <button type="button" data-search-person="" data-search-meta="" aria-label={`查看 ${item.value}`}>
- <span data-search-name=""><span>{item.value}</span>{matched}</span>
+ <button type="button" data-search-person="" data-search-meta="" aria-label={`查看 ${entityDisplayName(kind, item.value)}`}>
+ <span data-search-name=""><span>{entityDisplayName(kind, item.value)}</span>{matched}</span>
<span data-search-sub="">{sub}</span>
</button>
{works.length ? (
diff --git a/frontend/src/react/settings-panel/settings-data.ts b/frontend/src/react/settings-panel/settings-data.ts
index 3fe3572b6..5daf6984c 100644
--- a/frontend/src/react/settings-panel/settings-data.ts
+++ b/frontend/src/react/settings-panel/settings-data.ts
@@ -38,6 +38,7 @@ export const fetchMediaProcessing = (signal?: AbortSignal) =>
/** `q_settings` 返回的整份;写入时只送改了的那几个键,回来的仍是整份。 */
export interface SyncedSettings {
+ performerNameLanguage?: 'zh-CN' | 'ja';
sidebarOrder?: string[];
followInitialDays?: number;
postSetupTutorialDone?: boolean;
diff --git a/frontend/src/react/settings-panel/settings-panel-api.ts b/frontend/src/react/settings-panel/settings-panel-api.ts
index 32a97c4d1..bc4bb0a62 100644
--- a/frontend/src/react/settings-panel/settings-panel-api.ts
+++ b/frontend/src/react/settings-panel/settings-panel-api.ts
@@ -23,6 +23,7 @@ export interface PanelSettings {
defaultSortDirection: string;
groupCollapse: boolean;
javImage: string;
+ performerNameLanguage: 'zh-CN' | 'ja';
feedAutoScroll: boolean;
feedLimit: number;
feedHideGroupCompilations: boolean;
@@ -48,7 +49,7 @@ export type SettingsEffect =
| 'glow'
| 'batchSize' | 'defaultSort' | 'sortDirection' | 'hoverDelay' | 'seekSeconds'
| 'groupCollapse' | 'feedAutoScroll' | 'feedLimit' | 'feedCompilations' | 'miniplayer' | 'javImage'
- | 'searchHistoryLimit';
+ | 'searchHistoryLimit' | 'performerNameLanguage';
/** `[值, 显示名, 字形]`,与壳里各张选项表同形。 */
export type Choice = readonly [value: string, label: string, icon?: string];
diff --git a/frontend/src/react/settings-panel/settings-panel.tsx b/frontend/src/react/settings-panel/settings-panel.tsx
index c3a03b4b7..511434021 100644
--- a/frontend/src/react/settings-panel/settings-panel.tsx
+++ b/frontend/src/react/settings-panel/settings-panel.tsx
@@ -17,6 +17,7 @@ import {
type KeyboardEvent, type ReactNode,
} from 'react';
import { flushSync } from 'react-dom';
+import { useQuery } from '@tanstack/react-query';
import { ButtonLink } from '@/components/base/buttons/button';
import {
attachOverlayScrollbar, closeAnchoredMenu, iconSwapHtml, moveGlidePane, revealTexts,
@@ -30,7 +31,8 @@ import { Icon, RemixIcon } from './icon';
import { IconSwitch, SelectField } from './legacy-controls';
import { NumberSetting } from './number-setting';
import type { Choice, PanelSettings, SettingsPanelApi, SettingsPanelHost } from './settings-panel-api';
-import { refreshPanelData, useSaveSettings } from './settings-data';
+import { fetchSettings, refreshPanelData, SETTINGS_KEY, useSaveSettings } from './settings-data';
+import { Note } from '../components/note';
import { SidebarOrder } from './sidebar-order';
import { SettingsDialogClose } from '../components/settings-dialog-close';
@@ -457,6 +459,7 @@ function JavGroup({ host: current, tab, epoch }: GroupProps) {
return (
<Group index={2} tab={tab}>
<h4 data-settings-subheading="">作品显示</h4>
+ <NameLanguageSetting host={current} epoch={epoch} />
<Row title="默认图片">
<IconSwitch id="javImageSetting" name="jav-image" legend="默认图片" options={JAV_IMAGE_OPTIONS}
value={settings.javImage} attr="data-jav-image-choice" variant="javimageswitch" text epoch={epoch}
@@ -477,6 +480,30 @@ function JavGroup({ host: current, tab, epoch }: GroupProps) {
</Group>
);
}
+function NameLanguageSetting({ host: current, epoch }: { host: SettingsPanelHost; epoch: number }) {
+ const query = useQuery({ queryKey: SETTINGS_KEY, queryFn: ({ signal }) => fetchSettings(signal), staleTime: 0 });
+ const save = useSaveSettings();
+ const [pending, setPending] = useState<'zh-CN' | 'ja' | null>(null);
+ const language = query.data?.performerNameLanguage;
+ return <>
+ <Row title="女优名称" description={<small data-copy-key="performer-name-language-help">名称与别名只显示所选语言的写法;缺少对应时保留当前名称。偏好保存在数据库,其他设备读取同一份设置。</small>}>
+ <SelectField id="performerNameLanguageSetting" label="女优名称" epoch={epoch}
+ options={[["zh-CN", "中文"], ["ja", "日文原文"]]}
+ value={pending ?? language ?? current.store.value.performerNameLanguage}
+ disabled={query.isPending || query.isError || save.isPending || !language} busy={save.isPending}
+ onPick={(value) => {
+ if (save.isPending || (value !== 'zh-CN' && value !== 'ja') || value === language) return;
+ setPending(value);
+ save.mutate({ performerNameLanguage: value }, {
+ onSuccess: (saved) => { current.syncRemote(saved); current.receipt('已保存名称显示偏好') },
+ onError: (error) => current.failure('保存名称显示偏好', error),
+ onSettled: () => setPending(null),
+ });
+ }} />
+ </Row>
+ {query.isError ? <Note tone="error">未取得数据库中的名称偏好,请重新打开设置。</Note> : null}
+ </>;
+}
/* 合集开关由服务端判,列表、未读数和补封面排队都跟着它,所以先存到服务端再重画;往返期间开关
停在新位置、挂忙态,失败退回原位。 */
function CompilationToggle({ host: current, id, settingKey, label, title }: {
diff --git a/frontend/src/react/use-entity-names.ts b/frontend/src/react/use-entity-names.ts
new file mode 100644
index 000000000..adb494126
--- /dev/null
+++ b/frontend/src/react/use-entity-names.ts
@@ -0,0 +1,7 @@
+import { useSyncExternalStore } from 'react';
+import { nameRevision, subscribeNames } from '../core/entity-names';
+
+/** 名称偏好及资料投影更新时,只重画显示,不改查询缓存里的身份。 */
+export function useEntityNames(): number {
+ return useSyncExternalStore(subscribeNames, nameRevision, nameRevision);
+}
diff --git a/frontend/test/appearance/settings.test.ts b/frontend/test/appearance/settings.test.ts
index bddfaad5e..53a0faee6 100644
--- a/frontend/test/appearance/settings.test.ts
+++ b/frontend/test/appearance/settings.test.ts
@@ -114,6 +114,18 @@ describe('数据库那一份落进本地缓存', () => {
vi.unstubAllGlobals();
});
+ it('名称偏好以数据库为准,仅在值改变时更新本地缓存和显示效果', () => {
+ const { store, changed, save } = stage({ performerNameLanguage: 'ja' });
+ applySyncedSettings({ performerNameLanguage: 'zh-CN' }, changed, store);
+ expect(store.value.performerNameLanguage).toBe('zh-CN');
+ expect(save).toHaveBeenCalledTimes(1);
+ expect(changed.mock.calls).toEqual([['performerNameLanguage']]);
+ applySyncedSettings({ performerNameLanguage: 'zh-CN' }, changed, store);
+ applySyncedSettings({ performerNameLanguage: 'unsupported' }, changed, store);
+ expect(save).toHaveBeenCalledTimes(1);
+ expect(store.value.performerNameLanguage).toBe('zh-CN');
+ });
+
it('侧栏顺序没变就不落盘', () => {
const { store, save, changed } = stage();
applySyncedSettings({ sidebarOrder: [...store.value.sidebarOrder] }, changed, store);
diff --git a/frontend/test/entity-names.test.ts b/frontend/test/entity-names.test.ts
new file mode 100644
index 000000000..2a5edb2c1
--- /dev/null
+++ b/frontend/test/entity-names.test.ts
@@ -0,0 +1,46 @@
+import { beforeEach, describe, expect, it } from 'vitest';
+import {
+ entityDisplayName, nameFallback, nameLanguage, registerNameWriting, registerNameWritings,
+ setNameLanguage, type NameWriting,
+} from '../src/core/entity-names';
+
+const writing: NameWriting = {
+ id: 1, kind: 'performer', canonical_name: '枫花恋', zh_cn: '枫花恋', ja: '楓カレン',
+};
+
+beforeEach(() => { registerNameWritings([]); setNameLanguage('zh-CN') });
+
+describe('实体名称的只读显示投影', () => {
+ it('切换显示语言保留原始名称、身份和来源对象', () => {
+ const original = { ...writing };
+ registerNameWritings([original]);
+ expect(entityDisplayName('performer', '枫花恋', 1)).toBe('枫花恋');
+ setNameLanguage('ja');
+ expect(entityDisplayName('performer', '枫花恋', 1)).toBe('楓カレン');
+ expect(original).toEqual(writing);
+ });
+
+ it('同一身份下其他艺名不会被替换为当前统称,人物与创作者分开索引', () => {
+ registerNameWriting(writing);
+ setNameLanguage('ja');
+ expect(entityDisplayName('performer', '田中柠檬', 1)).toBe('田中柠檬');
+ expect(entityDisplayName('creator', '枫花恋', 1)).toBe('枫花恋');
+ });
+
+ it('缺少已核对的写法时保留原名并给出对应提示', () => {
+ registerNameWriting({ ...writing, zh_cn: null });
+ expect(entityDisplayName('performer', '枫花恋', 1)).toBe('枫花恋');
+ expect(nameFallback('performer', '枫花恋', 1)).toBe('暂无已核对的中文写法,保留当前名称');
+ setNameLanguage('ja');
+ expect(nameFallback('performer', '枫花恋', 1)).toBe('');
+ expect(nameFallback('studio', '原名')).toBe('');
+ });
+
+ it('刷新资料集合清除过期名称,但保留用户的语言偏好', () => {
+ registerNameWritings([writing]);
+ setNameLanguage('ja');
+ registerNameWritings([]);
+ expect(nameLanguage()).toBe('ja');
+ expect(entityDisplayName('performer', '枫花恋', 1)).toBe('枫花恋');
+ });
+});
diff --git a/frontend/test/react/entity-hero.test.tsx b/frontend/test/react/entity-hero.test.tsx
index 9ee6288cc..e5e2d39e0 100644
--- a/frontend/test/react/entity-hero.test.tsx
+++ b/frontend/test/react/entity-hero.test.tsx
@@ -7,6 +7,7 @@ import { notifyManager, QueryClientProvider } from '@tanstack/react-query';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { EntityHeroPage } from '../../src/react/entity-hero/entity-hero-page';
+import { registerNameWritings, setNameLanguage } from '../../src/core/entity-names';
import {
factRows, heroLinks, nameChoices, nameLine, shownTags,
type EntityHeroActions, type EntityHeroData, type EntityHeroHelpers, type EntityHeroProps,
@@ -15,6 +16,7 @@ import { queryClient } from '../../src/react/query';
import { click, mount, settle } from './render';
afterEach(() => { queryClient.clear() });
+beforeEach(() => { registerNameWritings([]); setNameLanguage('zh-CN') });
notifyManager.setScheduler((notify) => notify());
const performer = (extra: Partial<EntityHeroData> = {}): EntityHeroData => ({
@@ -54,6 +56,25 @@ async function open(initial: EntityHeroProps) {
}
describe('排版用的纯函数', () => {
+ it('语言切换保留所选艺名,名称菜单使用原始值提交统一名称', async () => {
+ registerNameWritings([{ id: 7792, kind: 'performer', canonical_name: '枫花恋', zh_cn: '枫花恋', ja: '楓カレン' }]);
+ const given = props({ name: '枫花恋', entity: performer({ canonical_name: '枫花恋', aliases: ['楓カレン', '田中柠檬'],
+ name_display: { choices: {
+ 'zh-CN': [{ value: '枫花恋', label: '枫花恋' }, { value: '田中柠檬', label: '田中柠檬' }],
+ ja: [{ value: '枫花恋', label: '楓カレン' }, { value: '田中柠檬', label: '田中レモン' }],
+ }, groups: { 'zh-CN': { shown: [], total: 0, groups: [] }, ja: { shown: [], total: 0, groups: [] } } },
+ }) });
+ const host = await open(given);
+ expect(host.querySelector('h2')?.textContent).toBe('枫花恋');
+ await act(async () => setNameLanguage('ja'));
+ expect(host.querySelector('h2')?.textContent).toBe('楓カレン');
+ expect(given.actions.chooseName).not.toHaveBeenCalled();
+ await click(host.querySelector('[data-namepick-toggle]'));
+ expect(document.querySelector('[data-namepick-name="枫花恋"]')?.textContent).toContain('楓カレン');
+ await click(document.querySelector('[data-namepick-name="田中柠檬"]'));
+ expect(given.actions.chooseName).toHaveBeenCalledWith('田中柠檬');
+ expect(given.entity.canonical_name).toBe('枫花恋');
+ });
it('厂牌与事务所显示独立的公司资料,不显示来源悬浮说明', async () => {
const host = await open(props({ kind: 'studio', name: 'Brand', entity: {
id: 1, canonical_name: 'Brand', asset_count: 3,
@@ -176,9 +197,9 @@ describe('排版用的纯函数', () => {
expect(site).toEqual({ type: 'url', url: 'https://www.s1s1s1.com/', title: 'S1', text: '官方网站', mark: { site: '/link-mark?id=9' } });
});
- it('换统称的候选取完整的 aliases(罗马字也是她用过的写法),统称排第一,去重去空', () => {
+ it('没有语言投影时保留已有别名与原始值,统称排第一并去重去空', () => {
expect(nameChoices({ id: 1, canonical_name: '葵つかさ', asset_count: 0, aliases: ['葵司', 'Tsukasa Aoi', '葵司', ''] }))
- .toEqual(['葵つかさ', '葵司', 'Tsukasa Aoi']);
+ .toEqual(['葵つかさ', '葵司', 'Tsukasa Aoi'].map(value => ({ value, label: value })));
});
});
diff --git a/frontend/test/react/library-shortcuts.test.tsx b/frontend/test/react/library-shortcuts.test.tsx
index 89a3abfe6..a27c4651f 100644
--- a/frontend/test/react/library-shortcuts.test.tsx
+++ b/frontend/test/react/library-shortcuts.test.tsx
@@ -1,15 +1,37 @@
import { notifyManager, QueryClientProvider } from '@tanstack/react-query';
-import { afterEach, describe, expect, it, vi } from 'vitest';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { registerNameWritings, setNameLanguage } from '../../src/core/entity-names';
import { queryClient } from '../../src/react/query';
import { FavoriteButton, LibraryShortcuts } from '../../src/react/library-shortcuts/shortcut-controls';
import { favoriteHref, isFavorite, SHORTCUTS_KEY, type Favorite, type Shortcuts } from '../../src/react/library-shortcuts/library-shortcuts';
import { click, mount, pending, settle, submit, type } from './render';
notifyManager.setScheduler((notify) => notify());
+beforeEach(() => { registerNameWritings([]); setNameLanguage('zh-CN') });
afterEach(() => { queryClient.clear() });
const empty: Shortcuts = { favorites: [], filters: [] };
describe('我的收藏', () => {
+ it('显示语言同步可见名称和无障碍名称,取消收藏仍提交原名称', async () => {
+ const favorite = { key: 'entity:3', entity_id: 3, kind: 'performer', name: '枫花恋' };
+ const data = { favorites: [favorite], filters: [] };
+ registerNameWritings([{ id: 3, kind: 'performer', canonical_name: '枫花恋', zh_cn: '枫花恋', ja: '楓カレン' }]);
+ setNameLanguage('ja');
+ const writes: unknown[] = [];
+ vi.stubGlobal('fetch', vi.fn(async (_url, init) => {
+ if (init?.body) writes.push(JSON.parse(init.body));
+ return { ok: true, json: async () => data };
+ }));
+ queryClient.setQueryData(SHORTCUTS_KEY, data);
+ await mount(<QueryClientProvider client={queryClient}><LibraryShortcuts /></QueryClientProvider>);
+ await click(document.querySelector('[aria-label="我的收藏"]')); await settle();
+ const link = document.querySelector('[data-shortcuts-row] a');
+ expect(link?.textContent).toContain('楓カレン');
+ expect(link?.getAttribute('aria-label')).toBe('楓カレン');
+ expect(link?.getAttribute('href')).toBe('/performers/3');
+ await click(document.querySelector('[aria-label="取消收藏楓カレン"]')); await settle();
+ expect(writes[0]).toMatchObject({ action: 'favorite', entity_id: 3, name: '枫花恋', on: false });
+ });
it('同名在线标签和本地实体独立收藏,在线链接打开关注筛选', async () => {
const local: Favorite = { entity_id: 3, kind: 'tag', name: '户外' };
const online: Favorite = { kind: 'tag', scope: 'online', tag_id: 'outdoors', name: '户外', favorite: false };
diff --git a/frontend/test/react/settings-panel.test.tsx b/frontend/test/react/settings-panel.test.tsx
index 326f6ddb5..13ac39590 100644
--- a/frontend/test/react/settings-panel.test.tsx
+++ b/frontend/test/react/settings-panel.test.tsx
@@ -18,7 +18,7 @@ import type {
import { createSettingsStore } from '../../src/settings-store';
import { FOLLOW_INITIAL_RANGE_OPTIONS } from '../../src/application/initial-follow-ranges';
-import { click, settle } from './render';
+import { click, pending, settle } from './render';
notifyManager.setScheduler((notify) => notify());
@@ -109,7 +109,7 @@ async function connect(r: Loaded) {
const settings = (): PanelSettings => ({
theme: 'system', uiSounds: true, homeGlow: { ...normalizeHomeGlow(null), on: true, preset: 'ash' }, accent: 'blue',
sidebarOrder: [''], batchSize: 60, defaultSort: 'seed', defaultSortDirection: '', groupCollapse: true,
- javImage: 'cover', feedAutoScroll: true, feedLimit: 12, feedHideGroupCompilations: true, feedHideSoloCompilations: false,
+ javImage: 'cover', performerNameLanguage: 'zh-CN', feedAutoScroll: true, feedLimit: 12, feedHideGroupCompilations: true, feedHideSoloCompilations: false,
feedHideExcerpts: true, hoverDelaySeconds: 5, detailAutoplay: false, miniplayer: true, seekSeconds: 10,
relatedLimit: 24, searchHistoryLimit: 10, followInitialDays: 30, avatarRefreshDays: 90, faviconRefreshDays: 365,
});
@@ -171,6 +171,40 @@ function watchReports() {
}
describe('设置面板与壳的接缝', () => {
+ it.each([true, false])('名称偏好等待数据库回执,保存成功=%s 时才更新全局显示', async (success) => {
+ const answer = pending<{ ok: boolean; status: number; json(): Promise<unknown> }>();
+ const writes: unknown[] = [];
+ vi.stubGlobal('fetch', vi.fn(async (_url, init) => {
+ if (init?.body) { writes.push(JSON.parse(init.body)); return answer.answer }
+ return { ok: true, status: 200, json: async () => ({ performerNameLanguage: 'zh-CN' }) };
+ }));
+ const current = await setup();
+ const names = await import('../../src/core/entity-names');
+ names.setNameLanguage('zh-CN');
+ const failure = vi.fn();
+ current.host.failure = failure;
+ current.host.syncRemote = (saved) => {
+ const language = saved.performerNameLanguage;
+ if (language === 'zh-CN' || language === 'ja') {
+ current.value.performerNameLanguage = language;
+ names.setNameLanguage(language);
+ }
+ };
+ const panel = await open(current, 'JAV 与新作');
+ const field = panel.querySelector<HTMLElement & { value: string }>('#performerNameLanguageSetting > div')!;
+ expect(field.value).toBe('zh-CN');
+ await act(async () => { field.value = 'ja'; field.dispatchEvent(new Event('change', { bubbles: true })) });
+ expect(writes).toEqual([{ performerNameLanguage: 'ja' }]);
+ expect(names.nameLanguage()).toBe('zh-CN');
+ expect(current.value.performerNameLanguage).toBe('zh-CN');
+ await answer.release({ ok: success, status: success ? 200 : 500,
+ json: async () => success ? { performerNameLanguage: 'ja' } : { error: '保存失败' } });
+ await settle();
+ expect(names.nameLanguage()).toBe(success ? 'ja' : 'zh-CN');
+ expect(current.value.performerNameLanguage).toBe(success ? 'ja' : 'zh-CN');
+ expect(field.value).toBe(success ? 'ja' : 'zh-CN');
+ expect(failure).toHaveBeenCalledTimes(success ? 0 : 1);
+ });
it('五个分区按使用场景组织,Peach 配置入口遵守设备权限', async () => {
const current = await setup();
const openConfiguration = vi.fn();
diff --git a/src/peach/kanji.py b/src/peach/kanji.py
index 367737967..9e41d2c1b 100644
--- a/src/peach/kanji.py
+++ b/src/peach/kanji.py
@@ -33,7 +33,7 @@ JP_KANJI_TO_SIMPLIFIED = {
"時": "时", "場": "场", "圓": "圆", "廣": "广", "國": "国", "學": "学",
"風": "风", "樂": "乐", "楽": "乐", "榮": "荣", "豐": "丰", "龍": "龙",
"鶴": "鹤", "蓮": "莲", "東": "东", "納": "纳", "樹": "树", "麗": "丽",
- "靜": "静", "貴": "贵", "藝": "艺", "歐": "欧", "慶": "庆",
+ "靜": "静", "貴": "贵", "藝": "艺", "歐": "欧", "慶": "庆", "遼": "辽",
}
# 简体中文没有对应字形的日本汉字:咲 凪 雫 辻 笹 榊 槙 䌷。中文资料页一律照抄,
diff --git a/src/peach/performer_name_display.py b/src/peach/performer_name_display.py
new file mode 100644
index 000000000..4eaa88746
--- /dev/null
+++ b/src/peach/performer_name_display.py
@@ -0,0 +1,149 @@
+"""当前所选艺名的中日显示写法;只读投影,不更改规范名或作品署名。"""
+from __future__ import annotations
+
+import json
+import re
+
+from . import entity_classification
+from .entities import normalize_entity_name
+from .kanji import fold_glyphs, simplify_kanji
+from .metadata_alias_resolve import is_descriptive, is_planning_alias
+from .performer_header import HIDDEN_SOURCES, SHOWN, page_names
+from .performer_profiles import read_profile
+from .sources.seesaa import split_names
+
+_KANA = re.compile(r"[\u3040-\u30ff]")
+_LATIN = re.compile(r"[A-Za-z]")
+_BRACKET = re.compile(r"[()()【】\[\]]")
+_SENTENCE = re.compile(r"中に.+ながらも|を実現して|を我慢でき|現在は|正式女優名")
+# 已核对的同一艺名译写。仅当资料原文含对应日文写法时使用,
+# 不把同一人物的新旧艺名当作语言对应。
+_REVIEWED_WRITINGS = (
+ ("枫花恋", "楓カレン"),
+ ("田中柠檬", "田中レモン"),
+ ("松永纱奈", "松永さな"),
+ ("森泽佳奈", "森沢かな"),
+)
+
+
+def _key(name: str) -> str:
+ return normalize_entity_name(fold_glyphs(name))
+
+
+def writing(canonical: str, page: dict, source_url: str) -> dict:
+ """只对当前统称找写法;资料页主名与统称不对应时不采用主名。"""
+ original = list(dict.fromkeys(
+ name for name in [page["name"], *(entry["name"] for entry in page["aliases"])] if name))
+ key = _key(canonical)
+ for zh, ja in _REVIEWED_WRITINGS:
+ if key in {_key(zh), _key(ja)} and ja in original:
+ return {"zh_cn": zh, "ja": ja, "source": source_url, "basis": "reviewed-writing"}
+ matches = [name for name in original if _key(name) == key]
+ # 多个原文写法折为相同字形时,只有主名确定属于当前艺名才选主名。
+ ja = page["name"] if page["name"] in matches else matches[0] if len(matches) == 1 else None
+ zh = simplify_kanji(canonical) if not _KANA.search(canonical) else None
+ if _LATIN.search(canonical):
+ return {"zh_cn": canonical, "ja": canonical, "basis": "original-spelling"}
+ return {"zh_cn": zh, "ja": ja, "source": source_url, "basis": "source-glyphs"}
+
+
+def _stage_key(name: str, page: dict) -> str:
+ originals = {page["name"], *(entry["name"] for entry in page["aliases"])}
+ for zh, ja in _REVIEWED_WRITINGS:
+ if ja in originals and _key(name) in {_key(zh), _key(ja)}:
+ return _key(zh)
+ return _key(name)
+
+
+def display(connection, entity_id: int, canonical: str, aliases: list[dict], grouped: dict | None) -> dict:
+ """名称菜单与别名行共享语言投影;原始别名和可选名称的值不改写。"""
+ profile = read_profile(connection, entity_id)
+ page = page_names(profile)
+ original_names = {page["name"], *(entry["name"] for entry in page["aliases"])} - {""}
+ readings = {page["reading"], *(entry.get("reading", "") for entry in page["aliases"])} - {""}
+ romanizations = {_key(entry.get("romaji", "")) for entry in page["aliases"]} - {""}
+ hidden_keys = {_key(row["alias"]) for row in aliases if row["source"] in HIDDEN_SOURCES}
+ registered = {canonical, *(row["alias"] for row in aliases)}
+ known_keys = {_key(name) for name in registered | original_names}
+
+ def keep(name: str) -> bool:
+ if name == canonical:
+ return True
+ if not name or _BRACKET.search(name):
+ return False
+ parts = split_names(name)
+ if len(parts) > 1 and all(_key(part) in known_keys for part in parts):
+ return False
+ if name == "FC2" or _SENTENCE.search(name) or is_descriptive(name):
+ return False
+ if name not in original_names and (name in readings or _key(name) in hidden_keys):
+ return False
+ if _LATIN.search(name) and not _LATIN.search(canonical):
+ return name in original_names and _key(name) not in romanizations
+ return not is_planning_alias(name)
+
+ stages: dict[str, dict] = {}
+ ordered = [canonical, page["name"], *(entry["name"] for entry in page["aliases"]),
+ *(row["alias"] for row in aliases)]
+ for name in ordered:
+ if not keep(name):
+ continue
+ key = _stage_key(name, page)
+ row = stages.setdefault(key, {"value": None, "registered": [], **writing(name, page, (profile or {}).get("source_url", ""))})
+ if name in registered and name not in row["registered"]:
+ row["registered"].append(name)
+ if row["value"] is None and name in registered:
+ row["value"] = name
+ current_key = _stage_key(canonical, page)
+ current = stages[current_key]
+ choices, groups = {}, {}
+ for language, field in (("zh-CN", "zh_cn"), ("ja", "ja")):
+ choices[language] = [{"value": canonical if key == current_key else
+ row[field] if row[field] in row["registered"] else row["value"],
+ "label": row[field] or canonical}
+ for key, row in stages.items()
+ if row["value"] is not None and (row[field] or key == current_key)]
+ taken = {current_key}
+ sections = []
+ for section in (grouped or {}).get("groups", []):
+ shown = []
+ for entry in section["names"]:
+ key = _stage_key(entry["name"], page)
+ row = stages.get(key)
+ if row and row[field] and key not in taken:
+ shown.append({"name": row[field]})
+ taken.add(key)
+ if shown:
+ sections.append({"label": section.get("label", ""), "names": shown})
+ everyone = [entry["name"] for section in sections for entry in section["names"]]
+ reading = ""
+ if language == "ja":
+ if _stage_key(page["name"], page) == current_key:
+ reading = page["reading"]
+ else:
+ reading = next((entry.get("reading", "") for entry in page["aliases"]
+ if _stage_key(entry["name"], page) == current_key), "")
+ if reading == current[field]:
+ reading = ""
+ groups[language] = {"reading": reading, "shown": everyone[:SHOWN], "total": len(everyone), "groups": sections}
+ return {"current": {"canonical_name": canonical, **writing(canonical, page, (profile or {}).get("source_url", ""))},
+ "choices": choices, "groups": groups}
+
+
+def variants(connection) -> list[dict]:
+ """资料形状接口同时交付只读显示写法;缺失对应关系明确保留为空。"""
+ people = list(connection.execute(
+ "SELECT id,kind,canonical_name FROM entity WHERE kind IN ('performer','creator')"))
+ categories = entity_classification.summaries(connection, [row["id"] for row in people])
+ profiles = {row["entity_id"]: dict(row) for row in connection.execute(
+ "SELECT entity_id,raw_json,source_url FROM performer_profile")}
+ result = []
+ for person in people:
+ if "japanese_av" not in categories[person["id"]]["identity_categories"]:
+ continue
+ profile = profiles.get(person["id"], {})
+ raw = json.loads(profile.get("raw_json") or "{}")
+ names = writing(person["canonical_name"], page_names({"raw": raw}), profile.get("source_url", ""))
+ result.append({"id": person["id"], "kind": person["kind"],
+ "canonical_name": person["canonical_name"], **names})
+ return result
diff --git a/src/peach/web_entity.py b/src/peach/web_entity.py
index cd8159594..94ed9e9d3 100644
--- a/src/peach/web_entity.py
+++ b/src/peach/web_entity.py
@@ -275,6 +275,9 @@ def q_entity(contract: WebContract, args):
# 人物资料与按名义分组的别名。
if kind in {"performer", "creator"}:
d.update(performer_header.header(c, d["id"], d["canonical_name"]))
+ if 'japanese_av' in d['identity_categories']:
+ from .performer_name_display import display
+ d["name_display"] = display(c, d["id"], d["canonical_name"], alias_rows, d["name_groups"])
elif kind in {'studio', 'agency'}:
d['company_profile'] = company_profiles.public_profile(metadata)
# 创作者在关注里的那一面(ADR-0096):绑在名下的来源和同名等确认的那几组。
@@ -450,7 +453,9 @@ def q_entity_shapes(contract, args) -> dict:
names = entities.get(int(alias["entity_id"]), {}).get("names")
if names is not None and alias["alias"] not in names:
names.append(alias["alias"])
- return {"ok": True, "home": home, "entities": list(entities.values())}
+ from .performer_name_display import variants
+ name_variants = variants(connection)
+ return {"ok": True, "home": home, "entities": list(entities.values()), "name_variants": name_variants}
# ────────────────────────────── 照片 ──────────────────────────────
# 图集就是目录:账本没有图集实体,一个目录下的图片本来就是一份图集,
diff --git a/src/peach/web_settings.py b/src/peach/web_settings.py
index d58f34a47..f4ab8e9fe 100644
--- a/src/peach/web_settings.py
+++ b/src/peach/web_settings.py
@@ -6,8 +6,7 @@
侧栏不一样。左侧导航放哪些入口、什么顺序,是长出来的使用习惯;在 Windows 上排好,
到 Mac 上又是默认顺序,那不叫两台设备,叫两个应用。所以它跟着账本走。
-落点是 `profile.settings_json`——0001 建表时就留好的字段,一直是空的 `{}`。
-不新建表也就不需要迁移。
+名称显示语言也随用户走,落在现有的 `profile.settings_json` 中,不需要新增表或迁移。
写入受 ledger 只读闸门约束:reader(只读端)改不了顺序,但读到的是 writer 的那份,
这正是「同一份习惯」的意思。
@@ -56,7 +55,7 @@ SEARCH_HISTORY_LIMIT_MAX = 50
SYNCED_SETTING_KEYS = frozenset({
"sidebarOrder", "followInitialDays", "postSetupTutorialDone",
"organizeTemplates", "feedHideGroupCompilations", "feedHideSoloCompilations",
- "feedHideExcerpts", "searchHistoryLimit", "codePatterns",
+ "feedHideExcerpts", "searchHistoryLimit", "codePatterns", "performerNameLanguage",
})
#: 三个收起开关的键与各自对应的那一类,缺省值取 `feeds.DEFAULT_HIDDEN_COMPILATIONS`。
FEED_COMPILATION_SWITCHES = (
@@ -209,6 +208,7 @@ def q_settings(contract: SettingsContract, _args=None) -> dict:
"codePatterns": _stored_code_patterns(payload),
**_feed_switches(payload),
"searchHistoryLimit": normalise_search_history_limit(payload.get("searchHistoryLimit")),
+ "performerNameLanguage": "ja" if payload.get("performerNameLanguage") == "ja" else "zh-CN",
}
@@ -227,6 +227,11 @@ def w_settings(contract: SettingsContract, body) -> dict:
raise ValueError("没有要写入的设置")
merged = _stored(contract)
+ if "performerNameLanguage" in body:
+ language = body["performerNameLanguage"]
+ if language not in ("zh-CN", "ja"):
+ raise ValueError("performerNameLanguage 只收 zh-CN 或 ja")
+ merged["performerNameLanguage"] = language
if "sidebarOrder" in body:
merged["sidebarOrder"] = normalise_sidebar_order(body["sidebarOrder"])
if "followInitialDays" in body:
diff --git a/tests/test_fastapi_api.py b/tests/test_fastapi_api.py
index 165d66cad..10c849b8e 100644
--- a/tests/test_fastapi_api.py
+++ b/tests/test_fastapi_api.py
@@ -115,7 +115,8 @@ CREATE TABLE entity_membership(
CREATE TABLE label_maker(
label_id INTEGER PRIMARY KEY,maker_id INTEGER,source TEXT,
confidence REAL DEFAULT 1.0,checked_at TEXT);
-CREATE TABLE performer_profile(entity_id INTEGER PRIMARY KEY,source TEXT);
+CREATE TABLE performer_profile(entity_id INTEGER PRIMARY KEY,source TEXT,
+ raw_json TEXT DEFAULT '{}',tags_json TEXT DEFAULT '[]',source_url TEXT DEFAULT '');
CREATE TABLE watch_queue(profile_id TEXT,asset_id INTEGER,added_at TEXT,source TEXT,
PRIMARY KEY(profile_id,asset_id));
CREATE TABLE playlist(
@@ -574,6 +575,12 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):
self.assertEqual(body["detail"], "写入端是 mac")
self.assertIn("只能浏览", body["message"])
+ name_settings = await client.post(
+ '/api/settings?t=secret', json={'performerNameLanguage': 'ja'},
+ )
+ self.assertEqual(name_settings.status_code, 409)
+ self.assertEqual(name_settings.json()['error'], 'ledger read-only')
+
async def test_replication_off_runs_as_a_standalone_writer(self):
"""`replication.enabled = false` 时没有 sync 对象(ADR-0023 第 3 阶段)。
@@ -2276,7 +2283,10 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):
connection.execute("INSERT INTO performer_profile(entity_id,source) VALUES(901,'test')")
connection.execute(
"INSERT INTO entity_alias VALUES(901,'</script><script>演示','alias','test',1)")
- shapes = (await self.client.get('/api/entity/shapes')).json()['entities']
+ projection = (await self.client.get('/api/entity/shapes')).json()
+ self.assertTrue(projection['ok'])
+ self.assertEqual(projection['name_variants'], [])
+ shapes = projection['entities']
by_id = {shape['id']: shape for shape in shapes}
for entity_id in (901, 902):
for method in ('GET', 'HEAD'):
diff --git a/tests/test_performer_header.py b/tests/test_performer_header.py
index b84ec9dd4..eea6838c4 100644
--- a/tests/test_performer_header.py
+++ b/tests/test_performer_header.py
@@ -10,7 +10,7 @@ import unittest
from datetime import date
from pathlib import Path
-from peach import minnano_av, performer_header
+from peach import minnano_av, performer_header, performer_name_display
from peach import web_contract as rm_web
from peach.entities import normalize_entity_name
from peach.genre_decisions import record_genre_decision
@@ -113,6 +113,49 @@ class Case(unittest.TestCase):
class HeaderTests(Case):
+ def test_display_writings_keep_stage_names_and_raw_aliases_separate(self):
+ aliases = [('楓カレン', 'avdb'), ('田中柠檬', 'user:alias'),
+ ('田中レモン', 'avdb'), ('かえでかれん', 'r18:performer'),
+ ('Kaede Karen', 'r18:performer'), ('FC2', 'user:alias'),
+ ('楓カレン(旧名)', 'user:alias')]
+ entity_id = self.entity('枫花恋', *aliases)
+ profile = {'kana': 'かえでかれん', 'raw': {'名前': '楓カレン', '別名': [
+ '楓カレン (かえでかれん / Kaede Karen)',
+ '田中レモン(旧名) (たなかれもん / Tanaka Remon)']}}
+ with self.connection:
+ write_profile(self.connection, entity_id, profile, source='auto:performer-profile@1',
+ source_url='https://example.invalid/', fetched_at=STAMP)
+ before = list(self.connection.iterdump())
+ rows = [{'alias': name, 'source': source} for name, source in aliases]
+ result = performer_name_display.display(self.connection, entity_id, '枫花恋', rows,
+ self.header(entity_id, '枫花恋')['name_groups'])
+ self.assertEqual(result['choices']['zh-CN'], [
+ {'value': '枫花恋', 'label': '枫花恋'}, {'value': '田中柠檬', 'label': '田中柠檬'}])
+ self.assertEqual(result['choices']['ja'], [
+ {'value': '枫花恋', 'label': '楓カレン'}, {'value': '田中レモン', 'label': '田中レモン'}])
+ self.assertEqual(result['groups']['zh-CN']['shown'], ['田中柠檬'])
+ self.assertEqual(result['current']['ja'], '楓カレン')
+ historical = performer_name_display.display(self.connection, entity_id, '田中柠檬', rows, None)
+ self.assertEqual(historical['current']['ja'], '田中レモン')
+ self.assertEqual(before, list(self.connection.iterdump()))
+ with self.connection:
+ self.connection.execute('INSERT INTO entity_external_ref(entity_id,provider,external_kind,external_id) '
+ "VALUES(?,'javdb','performer','sample')", (entity_id,))
+ self.connection.row_factory = sqlite3.Row
+ variants = performer_name_display.variants(self.connection)
+ self.assertEqual([(row['id'], row['canonical_name'], row['zh_cn'], row['ja']) for row in variants],
+ [(entity_id, '枫花恋', '枫花恋', '楓カレン')])
+
+ def test_missing_translation_keeps_current_spelling_and_latin_stage_names(self):
+ entity_id = self.entity('篠田ゆう', ('Alice', 'user:alias'))
+ self.land(entity_id, SHINODA)
+ result = performer_name_display.display(self.connection, entity_id, '篠田ゆう',
+ [{'alias': 'Alice', 'source': 'user:alias'}], None)
+ self.assertIsNone(result['current']['zh_cn'])
+ self.assertEqual(result['choices']['zh-CN'][0], {'value': '篠田ゆう', 'label': '篠田ゆう'})
+ latin = performer_name_display.writing('Alice', {'name': '', 'aliases': []}, '')
+ self.assertEqual((latin['zh_cn'], latin['ja']), ('Alice', 'Alice'))
+
def test_cached_alias_annotations_stay_in_raw_profile_only(self):
entity_id = self.entity("枫花恋", ("楓カレン", "avdb"),
("田中レモン", "auto:performer-alias@1"))
diff --git a/tests/test_web_settings.py b/tests/test_web_settings.py
index 136b0f5af..184fa2d84 100644
--- a/tests/test_web_settings.py
+++ b/tests/test_web_settings.py
@@ -98,7 +98,7 @@ class SettingsRoundTripTests(unittest.TestCase):
"organizeTemplates": {}, "codePatterns": [],
"feedHideGroupCompilations": True,
"feedHideSoloCompilations": False, "feedHideExcerpts": True,
- "searchHistoryLimit": None})
+ "searchHistoryLimit": None, "performerNameLanguage": "zh-CN"})
def test_code_patterns_are_checked_when_saved(self):
"""写错的规则在保存那一刻报出来;存下的规则去掉空行,读回来是同一份。"""
@@ -111,6 +111,24 @@ class SettingsRoundTripTests(unittest.TestCase):
w_settings(self.contract, {"codePatterns": broken})
self.assertEqual(self._stored_json()["codePatterns"], saved)
+ def test_name_language_is_shared_and_preserves_other_profile_settings(self):
+ self.assertEqual(q_settings(self.contract)['performerNameLanguage'], 'zh-CN')
+ self.assertEqual(self._stored_json(), {})
+ order = ['tags', '']
+ w_settings(self.contract, {'sidebarOrder': order, 'performerNameLanguage': 'ja'})
+ other_device = WebContract(self.db.resolve())
+ self.assertEqual(q_settings(other_device)['performerNameLanguage'], 'ja')
+ w_settings(other_device, {'performerNameLanguage': 'zh-CN'})
+ self.assertEqual(q_settings(self.contract)['performerNameLanguage'], 'zh-CN')
+ self.assertEqual(self._stored_json(), {'sidebarOrder': order, 'performerNameLanguage': 'zh-CN'})
+
+ def test_invalid_name_languages_leave_the_stored_preference_unchanged(self):
+ w_settings(self.contract, {'performerNameLanguage': 'ja'})
+ for value in ('en', 'ja ', None, True, 1, [], {}):
+ with self.subTest(value=value), self.assertRaises(ValueError):
+ w_settings(self.contract, {'performerNameLanguage': value})
+ self.assertEqual(self._stored_json(), {'performerNameLanguage': 'ja'})
+
def test_a_hand_broken_rule_reads_as_unset(self):
con = sqlite3.connect(self.db)
con.execute("UPDATE profile SET settings_json=? WHERE id='local-default'",
@@ -157,7 +175,7 @@ class SettingsRoundTripTests(unittest.TestCase):
"organizeTemplates": {}, "codePatterns": [],
"feedHideGroupCompilations": True,
"feedHideSoloCompilations": False, "feedHideExcerpts": True,
- "searchHistoryLimit": None})
+ "searchHistoryLimit": None, "performerNameLanguage": "zh-CN"})
self.assertEqual(q_settings(self.contract)["sidebarOrder"], order)
self.assertEqual(self._stored_json()["sidebarOrder"], order)
diff --git a/web/dist/peach-app.js b/web/dist/peach-app.js
index 83dcf4321..bff517024 100644
--- a/web/dist/peach-app.js
+++ b/web/dist/peach-app.js
@@ -2,7 +2,7 @@
(function() {
try {
var e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, t = new e.Error().stack;
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "ed873e08-c65a-4a2c-99eb-e93a459bdf72", e._sentryDebugIdIdentifier = "sentry-dbid-ed873e08-c65a-4a2c-99eb-e93a459bdf72");
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "b3da13ed-a657-4f4c-bab7-4844439e0ea5", e._sentryDebugIdIdentifier = "sentry-dbid-b3da13ed-a657-4f4c-bab7-4844439e0ea5");
} catch {}
})();
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, n) => {
@@ -1602,15 +1602,15 @@ var k = /* @__PURE__ */ o(((e) => {
return e && (r = en(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n && (t.setValue(e), !0);
}
var an = /[\n"\\]/g;
- function L(e) {
+ function on(e) {
return e.replace(an, function(e) {
return "\\" + e.charCodeAt(0).toString(16) + " ";
});
}
- function R(e, t, n, r, i, a, o, s) {
- e.name = "", o != null && typeof o != "function" && typeof o != "symbol" && typeof o != "boolean" ? e.type = o : e.removeAttribute("type"), t == null ? o !== "submit" && o !== "reset" || e.removeAttribute("value") : o === "number" ? (t === 0 && e.value === "" || e.value != t) && (e.value = "" + $t(t)) : e.value !== "" + $t(t) && (e.value = "" + $t(t)), t == null ? n == null ? r != null && e.removeAttribute("value") : sn(e, $t(n)) : o === "number" && e.value == t ? sn(e, $t(e.value)) : sn(e, $t(t)), i == null && a != null && (e.defaultChecked = !!a), i != null && (e.checked = i && typeof i != "function" && typeof i != "symbol"), s != null && typeof s != "function" && typeof s != "symbol" && typeof s != "boolean" ? e.name = "" + $t(s) : e.removeAttribute("name");
+ function sn(e, t, n, r, i, a, o, s) {
+ e.name = "", o != null && typeof o != "function" && typeof o != "symbol" && typeof o != "boolean" ? e.type = o : e.removeAttribute("type"), t == null ? o !== "submit" && o !== "reset" || e.removeAttribute("value") : o === "number" ? (t === 0 && e.value === "" || e.value != t) && (e.value = "" + $t(t)) : e.value !== "" + $t(t) && (e.value = "" + $t(t)), t == null ? n == null ? r != null && e.removeAttribute("value") : ln(e, $t(n)) : o === "number" && e.value == t ? ln(e, $t(e.value)) : ln(e, $t(t)), i == null && a != null && (e.defaultChecked = !!a), i != null && (e.checked = i && typeof i != "function" && typeof i != "symbol"), s != null && typeof s != "function" && typeof s != "symbol" && typeof s != "boolean" ? e.name = "" + $t(s) : e.removeAttribute("name");
}
- function on(e, t, n, r, i, a, o, s) {
+ function cn(e, t, n, r, i, a, o, s) {
if (a != null && typeof a != "function" && typeof a != "symbol" && typeof a != "boolean" && (e.type = a), t != null || n != null) {
if (!(a !== "submit" && a !== "reset" || t != null)) {
nn(e);
@@ -1620,10 +1620,10 @@ var k = /* @__PURE__ */ o(((e) => {
}
r ??= i, r = typeof r != "function" && typeof r != "symbol" && !!r, e.checked = s ? e.checked : !!r, e.defaultChecked = !!r, o != null && typeof o != "function" && typeof o != "symbol" && typeof o != "boolean" && (e.name = o), nn(e);
}
- function sn(e, t) {
+ function ln(e, t) {
e.defaultValue !== "" + t && (e.defaultValue = "" + t);
}
- function cn(e, t, n, r) {
+ function un(e, t, n, r) {
if (e = e.options, t) {
t = {};
for (var i = 0; i < n.length; i++) t["$" + n[i]] = !0;
@@ -1639,10 +1639,10 @@ var k = /* @__PURE__ */ o(((e) => {
t !== null && (t.selected = !0);
}
}
- function ln(e, t, n) {
+ function dn(e, t, n) {
t != null && (t = "" + $t(t), t !== e.value && (e.value = t), n == null) ? e.defaultValue !== t && (e.defaultValue = t) : e.defaultValue = n == null ? "" : "" + $t(n);
}
- function un(e, t, n, r) {
+ function fn(e, t, n, r) {
if (t == null) {
if (r != null) {
if (n != null) throw Error(i(92));
@@ -1656,7 +1656,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
n = $t(t), e.defaultValue = n, r = e.textContent, r === n && r !== "" && r !== null && (e.value = r), nn(e);
}
- function dn(e, t) {
+ function pn(e, t) {
if (t) {
var n = e.firstChild;
if (n && n === e.lastChild && n.nodeType === 3) {
@@ -1666,19 +1666,19 @@ var k = /* @__PURE__ */ o(((e) => {
}
e.textContent = t;
}
- var fn = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));
- function pn(e, t, n) {
+ var mn = new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));
+ function hn(e, t, n) {
var r = t.indexOf("--") === 0;
- n == null || typeof n == "boolean" || n === "" ? r ? e.setProperty(t, "") : t === "float" ? e.cssFloat = "" : e[t] = "" : r ? e.setProperty(t, n) : typeof n != "number" || n === 0 || fn.has(t) ? t === "float" ? e.cssFloat = n : e[t] = ("" + n).trim() : e[t] = n + "px";
+ n == null || typeof n == "boolean" || n === "" ? r ? e.setProperty(t, "") : t === "float" ? e.cssFloat = "" : e[t] = "" : r ? e.setProperty(t, n) : typeof n != "number" || n === 0 || mn.has(t) ? t === "float" ? e.cssFloat = n : e[t] = ("" + n).trim() : e[t] = n + "px";
}
- function mn(e, t, n) {
+ function gn(e, t, n) {
if (t != null && typeof t != "object") throw Error(i(62));
if (e = e.style, n != null) {
for (var r in n) !n.hasOwnProperty(r) || t != null && t.hasOwnProperty(r) || (r.indexOf("--") === 0 ? e.setProperty(r, "") : r === "float" ? e.cssFloat = "" : e[r] = "", Jt = !0);
- for (var a in t) r = t[a], t.hasOwnProperty(a) && n[a] !== r && (pn(e, a, r), Jt = !0);
- } else for (var o in t) t.hasOwnProperty(o) && pn(e, o, t[o]);
+ for (var a in t) r = t[a], t.hasOwnProperty(a) && n[a] !== r && (hn(e, a, r), Jt = !0);
+ } else for (var o in t) t.hasOwnProperty(o) && hn(e, o, t[o]);
}
- function hn(e) {
+ function _n(e) {
if (e.indexOf("-") === -1) return !1;
switch (e) {
case "annotation-xml":
@@ -1692,7 +1692,7 @@ var k = /* @__PURE__ */ o(((e) => {
default: return !0;
}
}
- var z = /* @__PURE__ */ new Map([
+ var vn = /* @__PURE__ */ new Map([
["acceptCharset", "accept-charset"],
["htmlFor", "for"],
["httpEquiv", "http-equiv"],
@@ -1772,53 +1772,53 @@ var k = /* @__PURE__ */ o(((e) => {
["writingMode", "writing-mode"],
["xmlnsXlink", "xmlns:xlink"],
["xHeight", "x-height"]
- ]), gn = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
- function _n(e) {
- return gn.test("" + e) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : e;
- }
- function vn() {}
- var yn = null;
+ ]), yn = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;
function bn(e) {
+ return yn.test("" + e) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : e;
+ }
+ function L() {}
+ var R = null;
+ function xn(e) {
return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e;
}
- var xn = null, Sn = null;
- function Cn(e) {
+ var Sn = null, Cn = null;
+ function wn(e) {
var t = Ft(e);
if (t && (e = t.stateNode)) {
var n = e[Tt] || null;
a: switch (e = t.stateNode, t.type) {
case "input":
- if (R(e, n.value, n.defaultValue, n.defaultValue, n.checked, n.defaultChecked, n.type, n.name), t = n.name, n.type === "radio" && t != null) {
+ if (sn(e, n.value, n.defaultValue, n.defaultValue, n.checked, n.defaultChecked, n.type, n.name), t = n.name, n.type === "radio" && t != null) {
for (n = e; n.parentNode;) n = n.parentNode;
- for (n = n.querySelectorAll("input[name=\"" + L("" + t) + "\"][type=\"radio\"]"), t = 0; t < n.length; t++) {
+ for (n = n.querySelectorAll("input[name=\"" + on("" + t) + "\"][type=\"radio\"]"), t = 0; t < n.length; t++) {
var r = n[t];
if (r !== e && r.form === e.form) {
var a = r[Tt] || null;
if (!a) throw Error(i(90));
- R(r, a.value, a.defaultValue, a.defaultValue, a.checked, a.defaultChecked, a.type, a.name);
+ sn(r, a.value, a.defaultValue, a.defaultValue, a.checked, a.defaultChecked, a.type, a.name);
}
}
for (t = 0; t < n.length; t++) r = n[t], r.form === e.form && rn(r);
}
break a;
case "textarea":
- ln(e, n.value, n.defaultValue);
+ dn(e, n.value, n.defaultValue);
break a;
- case "select": t = n.value, t != null && cn(e, !!n.multiple, t, !1);
+ case "select": t = n.value, t != null && un(e, !!n.multiple, t, !1);
}
}
}
- var wn = !1;
- function Tn(e, t, n) {
- if (wn) return e(t, n);
- wn = !0;
+ var Tn = !1;
+ function En(e, t, n) {
+ if (Tn) return e(t, n);
+ Tn = !0;
try {
return e(t);
} finally {
- if (wn = !1, (xn !== null || Sn !== null) && (Gd(), xn && (t = xn, e = Sn, Sn = xn = null, Cn(t), e))) for (t = 0; t < e.length; t++) Cn(e[t]);
+ if (Tn = !1, (Sn !== null || Cn !== null) && (Gd(), Sn && (t = Sn, e = Cn, Cn = Sn = null, wn(t), e))) for (t = 0; t < e.length; t++) wn(e[t]);
}
}
- function En(e, t) {
+ function Dn(e, t) {
var n = e.stateNode;
if (n === null) return null;
var r = n[Tt] || null;
@@ -1844,19 +1844,19 @@ var k = /* @__PURE__ */ o(((e) => {
if (n && typeof n != "function") throw Error(i(231, t, typeof n));
return n;
}
- var Dn = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, On = !1;
- if (Dn) try {
- var kn = {};
- Object.defineProperty(kn, "passive", { get: function() {
- On = !0;
- } }), window.addEventListener("test", kn, kn), window.removeEventListener("test", kn, kn);
+ var On = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0, kn = !1;
+ if (On) try {
+ var An = {};
+ Object.defineProperty(An, "passive", { get: function() {
+ kn = !0;
+ } }), window.addEventListener("test", An, An), window.removeEventListener("test", An, An);
} catch {
- On = !1;
+ kn = !1;
}
- var An = null, jn = null, Mn = null;
+ var z = null, jn = null, Mn = null;
function Nn() {
if (Mn) return Mn;
- var e, t = jn, n = t.length, r, i = "value" in An ? An.value : An.textContent, a = i.length;
+ var e, t = jn, n = t.length, r, i = "value" in z ? z.value : z.textContent, a = i.length;
for (e = 0; e < n && t[e] === i[e]; e++);
var o = n - e;
for (r = 1; r <= o && t[n - r] === i[a - r]; r++);
@@ -1903,7 +1903,7 @@ var k = /* @__PURE__ */ o(((e) => {
}, zn = Ln(Rn), Bn = w({}, Rn, {
view: 0,
detail: 0
- }), Vn = Ln(Bn), Hn, Un, Wn, B = w({}, Bn, {
+ }), Vn = Ln(Bn), Hn, Un, Wn, Gn = w({}, Bn, {
screenX: 0,
screenY: 0,
clientX: 0,
@@ -1914,7 +1914,7 @@ var k = /* @__PURE__ */ o(((e) => {
shiftKey: 0,
altKey: 0,
metaKey: 0,
- getModifierState: $n,
+ getModifierState: nr,
button: 0,
buttons: 0,
relatedTarget: function(e) {
@@ -1926,13 +1926,13 @@ var k = /* @__PURE__ */ o(((e) => {
movementY: function(e) {
return "movementY" in e ? e.movementY : Un;
}
- }), V = Ln(B), Gn = Ln(w({}, B, { dataTransfer: 0 })), Kn = Ln(w({}, Bn, { relatedTarget: 0 })), qn = Ln(w({}, Rn, {
+ }), Kn = Ln(Gn), qn = Ln(w({}, Gn, { dataTransfer: 0 })), Jn = Ln(w({}, Bn, { relatedTarget: 0 })), Yn = Ln(w({}, Rn, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
- })), Jn = Ln(w({}, Rn, { clipboardData: function(e) {
+ })), Xn = Ln(w({}, Rn, { clipboardData: function(e) {
return "clipboardData" in e ? e.clipboardData : window.clipboardData;
- } })), Yn = Ln(w({}, Rn, { data: 0 })), Xn = {
+ } })), Zn = Ln(w({}, Rn, { data: 0 })), Qn = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
@@ -1945,7 +1945,7 @@ var k = /* @__PURE__ */ o(((e) => {
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
- }, Zn = {
+ }, $n = {
8: "Backspace",
9: "Tab",
12: "Clear",
@@ -1982,26 +1982,26 @@ var k = /* @__PURE__ */ o(((e) => {
144: "NumLock",
145: "ScrollLock",
224: "Meta"
- }, Qn = {
+ }, er = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
- function H(e) {
+ function tr(e) {
var t = this.nativeEvent;
- return t.getModifierState ? t.getModifierState(e) : (e = Qn[e]) ? !!t[e] : !1;
+ return t.getModifierState ? t.getModifierState(e) : (e = er[e]) ? !!t[e] : !1;
}
- function $n() {
- return H;
+ function nr() {
+ return tr;
}
- var er = Ln(w({}, Bn, {
+ var rr = Ln(w({}, Bn, {
key: function(e) {
if (e.key) {
- var t = Xn[e.key] || e.key;
+ var t = Qn[e.key] || e.key;
if (t !== "Unidentified") return t;
}
- return e.type === "keypress" ? (e = Pn(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? Zn[e.keyCode] || "Unidentified" : "";
+ return e.type === "keypress" ? (e = Pn(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? $n[e.keyCode] || "Unidentified" : "";
},
code: 0,
location: 0,
@@ -2011,7 +2011,7 @@ var k = /* @__PURE__ */ o(((e) => {
metaKey: 0,
repeat: 0,
locale: 0,
- getModifierState: $n,
+ getModifierState: nr,
charCode: function(e) {
return e.type === "keypress" ? Pn(e) : 0;
},
@@ -2021,7 +2021,7 @@ var k = /* @__PURE__ */ o(((e) => {
which: function(e) {
return e.type === "keypress" ? Pn(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
}
- })), tr = Ln(w({}, B, {
+ })), ir = Ln(w({}, Gn, {
pointerId: 0,
width: 0,
height: 0,
@@ -2032,7 +2032,7 @@ var k = /* @__PURE__ */ o(((e) => {
twist: 0,
pointerType: 0,
isPrimary: 0
- })), nr = Ln(w({}, Rn, { submitter: 0 })), rr = Ln(w({}, Bn, {
+ })), ar = Ln(w({}, Rn, { submitter: 0 })), B = Ln(w({}, Bn, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
@@ -2040,12 +2040,12 @@ var k = /* @__PURE__ */ o(((e) => {
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
- getModifierState: $n
- })), ir = Ln(w({}, Rn, {
+ getModifierState: nr
+ })), V = Ln(w({}, Rn, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
- })), ar = Ln(w({}, B, {
+ })), or = Ln(w({}, Gn, {
deltaX: function(e) {
return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0;
},
@@ -2054,21 +2054,21 @@ var k = /* @__PURE__ */ o(((e) => {
},
deltaZ: 0,
deltaMode: 0
- })), or = Ln(w({}, Rn, {
+ })), sr = Ln(w({}, Rn, {
newState: 0,
oldState: 0,
source: 0
- })), sr = [
+ })), cr = [
9,
13,
27,
32
- ], cr = Dn && "CompositionEvent" in window, lr = null;
- Dn && "documentMode" in document && (lr = document.documentMode);
- var ur = Dn && "TextEvent" in window && !lr, dr = Dn && (!cr || lr && 8 < lr && 11 >= lr), fr = " ", pr = !1;
+ ], lr = On && "CompositionEvent" in window, ur = null;
+ On && "documentMode" in document && (ur = document.documentMode);
+ var dr = On && "TextEvent" in window && !ur, fr = On && (!lr || ur && 8 < ur && 11 >= ur), pr = " ", H = !1;
function mr(e, t) {
switch (e) {
- case "keyup": return sr.indexOf(t.keyCode) !== -1;
+ case "keyup": return cr.indexOf(t.keyCode) !== -1;
case "keydown": return t.keyCode !== 229;
case "keypress":
case "mousedown":
@@ -2083,13 +2083,13 @@ var k = /* @__PURE__ */ o(((e) => {
function _r(e, t) {
switch (e) {
case "compositionend": return hr(t);
- case "keypress": return t.which === 32 ? (pr = !0, fr) : null;
- case "textInput": return e = t.data, e === fr && pr ? null : e;
+ case "keypress": return t.which === 32 ? (H = !0, pr) : null;
+ case "textInput": return e = t.data, e === pr && H ? null : e;
default: return null;
}
}
function vr(e, t) {
- if (gr) return e === "compositionend" || !cr && mr(e, t) ? (e = Nn(), Mn = jn = An = null, gr = !1, e) : null;
+ if (gr) return e === "compositionend" || !lr && mr(e, t) ? (e = Nn(), Mn = jn = z = null, gr = !1, e) : null;
switch (e) {
case "paste": return null;
case "keypress":
@@ -2098,7 +2098,7 @@ var k = /* @__PURE__ */ o(((e) => {
if (t.which) return String.fromCharCode(t.which);
}
return null;
- case "compositionend": return dr && t.locale !== "ko" ? null : t.data;
+ case "compositionend": return fr && t.locale !== "ko" ? null : t.data;
default: return null;
}
}
@@ -2124,7 +2124,7 @@ var k = /* @__PURE__ */ o(((e) => {
return t === "input" ? !!yr[e.type] : t === "textarea";
}
function xr(e, t, n, r) {
- xn ? Sn ? Sn.push(r) : Sn = [r] : xn = r, t = np(t, "onChange"), 0 < t.length && (n = new zn("onChange", "change", null, n, r), e.push({
+ Sn ? Cn ? Cn.push(r) : Cn = [r] : Sn = r, t = np(t, "onChange"), 0 < t.length && (n = new zn("onChange", "change", null, n, r), e.push({
event: n,
listeners: t
}));
@@ -2140,9 +2140,9 @@ var k = /* @__PURE__ */ o(((e) => {
if (e === "change") return t;
}
var Dr = !1;
- if (Dn) {
+ if (On) {
var Or;
- if (Dn) {
+ if (On) {
var kr = "oninput" in document;
if (!kr) {
var Ar = document.createElement("div");
@@ -2158,7 +2158,7 @@ var k = /* @__PURE__ */ o(((e) => {
function Mr(e) {
if (e.propertyName === "value" && Tr(Cr)) {
var t = [];
- xr(t, Cr, e, bn(e)), Tn(wr, t);
+ xr(t, Cr, e, xn(e)), En(wr, t);
}
}
function Nr(e, t, n) {
@@ -2245,7 +2245,7 @@ var k = /* @__PURE__ */ o(((e) => {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true");
}
- var Kr = Dn && "documentMode" in document && 11 >= document.documentMode, qr = null, Jr = null, Yr = null, Xr = !1;
+ var Kr = On && "documentMode" in document && 11 >= document.documentMode, qr = null, Jr = null, Yr = null, Xr = !1;
function Zr(e, t, n) {
var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
Xr || qr == null || qr !== Br(r) || (r = qr, "selectionStart" in r && Gr(r) ? r = {
@@ -2274,7 +2274,7 @@ var k = /* @__PURE__ */ o(((e) => {
transitioncancel: Qr("Transition", "TransitionCancel"),
transitionend: Qr("Transition", "TransitionEnd")
}, ei = {}, ti = {};
- Dn && (ti = document.createElement("div").style, "AnimationEvent" in window || (delete $r.animationend.animation, delete $r.animationiteration.animation, delete $r.animationstart.animation), "TransitionEvent" in window || delete $r.transitionend.transition);
+ On && (ti = document.createElement("div").style, "AnimationEvent" in window || (delete $r.animationend.animation, delete $r.animationiteration.animation, delete $r.animationstart.animation), "TransitionEvent" in window || delete $r.transitionend.transition);
function ni(e) {
if (ei[e]) return ei[e];
if (!$r[e]) return e;
@@ -2291,13 +2291,13 @@ var k = /* @__PURE__ */ o(((e) => {
function mi(e, t) {
if (e.name != null && e.name !== "auto") return e.name;
if (t.autoName !== null) return t.autoName;
- e = Dd.identifierPrefix;
+ e = Ed.identifierPrefix;
var n = pi++;
return e = "_" + e + "t_" + n.toString(32) + "_", t.autoName = e;
}
function hi(e) {
if (e == null || typeof e == "string") return e;
- var t = null, n = W;
+ var t = null, n = Pd;
if (n !== null) for (var r = 0; r < n.length; r++) {
var i = e[n[r]];
if (i != null) {
@@ -2519,14 +2519,14 @@ var k = /* @__PURE__ */ o(((e) => {
Yf("toggle", t);
break;
case "input":
- Yf("invalid", t), on(t, r.value, r.defaultValue, r.checked, r.defaultChecked, r.type, r.name, !0);
+ Yf("invalid", t), cn(t, r.value, r.defaultValue, r.checked, r.defaultChecked, r.type, r.name, !0);
break;
case "select":
Yf("invalid", t);
break;
- case "textarea": Yf("invalid", t), un(t, r.value, r.defaultValue, r.children);
+ case "textarea": Yf("invalid", t), fn(t, r.value, r.defaultValue, r.children);
}
- n = r.children, typeof n != "string" && typeof n != "number" && typeof n != "bigint" || t.textContent === "" + n || !0 === r.suppressHydrationWarning || cp(t.textContent, n) ? (r.popover != null && (Yf("beforetoggle", t), Yf("toggle", t)), r.onScroll != null && Yf("scroll", t), r.onScrollEnd != null && Yf("scrollend", t), r.onClick != null && (t.onclick = vn), t = !0) : t = !1, t || oa(e, !0);
+ n = r.children, typeof n != "string" && typeof n != "number" && typeof n != "bigint" || t.textContent === "" + n || !0 === r.suppressHydrationWarning || cp(t.textContent, n) ? (r.popover != null && (Yf("beforetoggle", t), Yf("toggle", t)), r.onScroll != null && Yf("scroll", t), r.onScrollEnd != null && Yf("scrollend", t), r.onClick != null && (t.onclick = L), t = !0) : t = !1, t || oa(e, !0);
}
function ca(e) {
for (ea = e.return; ea;) switch (ea.tag) {
@@ -2560,7 +2560,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
function da() {
var e = ra;
- return e !== null && (yd === null ? yd = e : yd.push.apply(yd, e), ra = null), e;
+ return e !== null && (vd === null ? vd = e : vd.push.apply(vd, e), ra = null), e;
}
function fa(e) {
ra === null ? ra = [e] : ra.push(e);
@@ -2753,7 +2753,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
var Ha = he.S;
he.S = function(e, t) {
- if (Sd = He(), typeof t == "object" && t && typeof t.then == "function" && za(e, t), Na !== null) for (var n = Df; n !== null;) Ma(n, Na), n = n.next;
+ if (xd = He(), typeof t == "object" && t && typeof t.then == "function" && za(e, t), Na !== null) for (var n = Df; n !== null;) Ma(n, Na), n = n.next;
if (n = e.types, n !== null) {
for (var r = Df; r !== null;) Ma(r, n), r = r.next;
if (La !== 0) {
@@ -2769,7 +2769,7 @@ var k = /* @__PURE__ */ o(((e) => {
var Ua = ye(null);
function Wa() {
var e = Ua.current;
- return e === null ? rd.pooledCache : e;
+ return e === null ? nd.pooledCache : e;
}
function Ga(e, t) {
t === null ? xe(Ua, Ua.current) : xe(Ua, t.pool);
@@ -2786,13 +2786,13 @@ var k = /* @__PURE__ */ o(((e) => {
return e = e.status, e === "fulfilled" || e === "rejected";
}
function Qa(e, t, n) {
- switch (n = e[n], n === void 0 ? e.push(t) : n !== t && (t.then(vn, vn), t = n), t.status) {
+ switch (n = e[n], n === void 0 ? e.push(t) : n !== t && (t.then(L, L), t = n), t.status) {
case "fulfilled": return t.value;
case "rejected": throw e = t.reason, no(e), e === void 0 && !("reason" in t) ? Error(i(600)) : e;
default:
- if (typeof t.status == "string") t.then(vn, vn);
+ if (typeof t.status == "string") t.then(L, L);
else {
- if (e = rd, e !== null && 100 < e.shellSuspendCounter) throw Error(i(482));
+ if (e = nd, e !== null && 100 < e.shellSuspendCounter) throw Error(i(482));
e = t, e.status = "pending", e.then(function(e) {
if (t.status === "pending") {
var n = t;
@@ -3065,7 +3065,7 @@ var k = /* @__PURE__ */ o(((e) => {
function go(e, t, n) {
var r = e.updateQueue;
if (r === null) return null;
- if (r = r.shared, nd & 2) {
+ if (r = r.shared, td & 2) {
var i = r.pending;
return i === null ? t.next = t : (t.next = i.next, i.next = t), r.pending = t, t = Ei(e), Ti(e, null, n), t;
}
@@ -3127,7 +3127,7 @@ var k = /* @__PURE__ */ o(((e) => {
o = 0, u = l = c = null, s = a;
do {
var f = s.lane & -536870913, p = f !== s.lane;
- if (p ? (ad & f) === f : (r & f) === f) {
+ if (p ? (id & f) === f : (r & f) === f) {
f !== 0 && f === La && (yo = !0), u !== null && (u = u.next = {
lane: 0,
tag: s.tag,
@@ -3168,7 +3168,7 @@ var k = /* @__PURE__ */ o(((e) => {
p = s, s = p.next, p.next = null, i.lastBaseUpdate = p, i.shared.pending = null;
}
} while (1);
- u === null && (c = d), i.baseState = c, i.firstBaseUpdate = l, i.lastBaseUpdate = u, a === null && (i.shared.lanes = 0), pd |= o, e.lanes = o, e.memoizedState = d;
+ u === null && (c = d), i.baseState = c, i.firstBaseUpdate = l, i.lastBaseUpdate = u, a === null && (i.shared.lanes = 0), fd |= o, e.lanes = o, e.memoizedState = d;
}
}
function So(e, t) {
@@ -3181,13 +3181,13 @@ var k = /* @__PURE__ */ o(((e) => {
}
var wo = ye(null), To = ye(0);
function Eo(e, t) {
- e = dd, xe(To, e), xe(wo, t), dd = e | t.baseLanes;
+ e = ud, xe(To, e), xe(wo, t), ud = e | t.baseLanes;
}
function Do() {
- xe(To, dd), xe(wo, wo.current);
+ xe(To, ud), xe(wo, wo.current);
}
function Oo() {
- dd = To.current, be(wo), be(To);
+ ud = To.current, be(wo), be(To);
}
var ko = ye(null), Ao = null;
function jo(e) {
@@ -3375,7 +3375,7 @@ var k = /* @__PURE__ */ o(((e) => {
var c = s = null, l = null, u = t, d = !1;
do {
var f = u.lane & -536870913;
- if (f === u.lane ? (Bo & f) === f : (ad & f) === f) {
+ if (f === u.lane ? (Bo & f) === f : (id & f) === f) {
var p = u.revertLane;
if (p === 0) l !== null && (l = l.next = {
lane: 0,
@@ -3397,7 +3397,7 @@ var k = /* @__PURE__ */ o(((e) => {
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
- }, l === null ? (c = l = f, s = o) : l = l.next = f, Vo.lanes |= p, pd |= p;
+ }, l === null ? (c = l = f, s = o) : l = l.next = f, Vo.lanes |= p, fd |= p;
f = u.action, Ko && n(o, f), o = u.hasEagerState ? u.eagerState : n(o, f);
} else p = {
lane: f,
@@ -3407,7 +3407,7 @@ var k = /* @__PURE__ */ o(((e) => {
hasEagerState: u.hasEagerState,
eagerState: u.eagerState,
next: null
- }, l === null ? (c = l = p, s = o) : l = l.next = p, Vo.lanes |= f, pd |= f;
+ }, l === null ? (c = l = p, s = o) : l = l.next = p, Vo.lanes |= f, fd |= f;
u = u.next;
} while (u !== null && u !== t);
if (l === null ? s = o : l.next = c, !Rr(o, e.memoizedState) && (Pc = !0, d && (n = Ra, n !== null))) throw n;
@@ -3438,7 +3438,7 @@ var k = /* @__PURE__ */ o(((e) => {
} else n = t();
var s = !Rr((Ho || a).memoizedState, n);
if (s && (a.memoizedState = n, Pc = !0), a = a.queue, Vs(ys.bind(null, r, a, e), [e]), e = a.getSnapshot !== t || s || Uo !== null && !!(Uo.memoizedState.tag & 1), Is(e ? 9 : 8, { destroy: void 0 }, vs.bind(null, r, a, n, t), null), e) {
- if (r.flags |= 2048, rd === null) throw Error(i(349));
+ if (r.flags |= 2048, nd === null) throw Error(i(349));
o || Bo & 127 || _s(r, t, n);
}
return n;
@@ -3562,7 +3562,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
function js(e, t) {
if (na) {
- var n = rd.formState;
+ var n = nd.formState;
if (n !== null) {
a: {
var r = Vo;
@@ -3679,7 +3679,7 @@ var k = /* @__PURE__ */ o(((e) => {
ref: t,
nextImpl: e
}), function() {
- if (nd & 2) throw Error(i(440));
+ if (td & 2) throw Error(i(440));
return t.impl.apply(void 0, arguments);
};
}
@@ -3727,10 +3727,10 @@ var k = /* @__PURE__ */ o(((e) => {
return n.memoizedState = [r, t], r;
}
function Zs(e, t, n) {
- return n === void 0 || Bo & 1073741824 && !(ad & 261930) ? e.memoizedState = t : (e.memoizedState = n, e = Rd(), Vo.lanes |= e, pd |= e, n);
+ return n === void 0 || Bo & 1073741824 && !(id & 261930) ? e.memoizedState = t : (e.memoizedState = n, e = Rd(), Vo.lanes |= e, fd |= e, n);
}
function Qs(e, t, n, r) {
- return Rr(n, t) ? n : wo.current === null ? !(Bo & 106) || Bo & 1073741824 && !(ad & 261930) ? (Pc = !0, e.memoizedState = n) : (e = Rd(), Vo.lanes |= e, pd |= e, t) : (e = Zs(e, n, r), Rr(e, t) || (Pc = !0), e);
+ return Rr(n, t) ? n : wo.current === null ? !(Bo & 106) || Bo & 1073741824 && !(id & 261930) ? (Pc = !0, e.memoizedState = n) : (e = Rd(), Vo.lanes |= e, fd |= e, t) : (e = Zs(e, n, r), Rr(e, t) || (Pc = !0), e);
}
function $s(e, t, n, r, i) {
var a = I.p;
@@ -3846,7 +3846,7 @@ var k = /* @__PURE__ */ o(((e) => {
var a = e.alternate;
if (e.lanes === 0 && (a === null || a.lanes === 0) && (a = t.lastRenderedReducer, a !== null)) try {
var o = t.lastRenderedState, s = a(o, n);
- if (i.hasEagerState = !0, i.eagerState = s, Rr(s, o)) return Si(e, t, i, 0), rd === null && xi(), !1;
+ if (i.hasEagerState = !0, i.eagerState = s, Rr(s, o)) return Si(e, t, i, 0), nd === null && xi(), !1;
} catch {}
if (n = Ci(e, t, i, r), n !== null) return Bd(n, e, r), mc(n, t, r), !0;
}
@@ -3980,8 +3980,8 @@ var k = /* @__PURE__ */ o(((e) => {
if (n === void 0) throw Error(i(407));
n = n();
} else {
- if (n = t(), rd === null) throw Error(i(349));
- ad & 127 || _s(r, t, n);
+ if (n = t(), nd === null) throw Error(i(349));
+ id & 127 || _s(r, t, n);
}
a.memoizedState = n;
var o = {
@@ -3991,7 +3991,7 @@ var k = /* @__PURE__ */ o(((e) => {
return a.queue = o, Bs(ys.bind(null, r, o, e), [e]), r.flags |= 2048, Is(9, { destroy: void 0 }, vs.bind(null, r, o, n, t), null), n;
},
useId: function() {
- var e = os(), t = rd.identifierPrefix;
+ var e = os(), t = nd.identifierPrefix;
if (na) {
var n = Ji, r = qi;
n = (r & ~(1 << 32 - et(r) - 1)).toString(32) + n, t = "_" + t + "R_" + n, n = qo++, 0 < n && (t += "H" + n.toString(32)), t += "_";
@@ -4020,7 +4020,7 @@ var k = /* @__PURE__ */ o(((e) => {
useEffectEvent: function(e) {
var t = os(), n = { impl: e };
return t.memoizedState = n, function() {
- if (nd & 2) throw Error(i(440));
+ if (td & 2) throw Error(i(440));
return n.impl.apply(void 0, arguments);
};
}
@@ -4179,7 +4179,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
var o = n.stateNode;
o !== null && typeof o.componentDidCatch == "function" && (e.callback = function() {
- Oc(t, n, r), typeof i != "function" && (Td === null ? Td = /* @__PURE__ */ new Set([this]) : Td.add(this));
+ Oc(t, n, r), typeof i != "function" && (wd === null ? wd = /* @__PURE__ */ new Set([this]) : wd.add(this));
var e = r.stack;
this.componentDidCatch(r.value, { componentStack: e === null ? "" : e });
});
@@ -4190,7 +4190,7 @@ var k = /* @__PURE__ */ o(((e) => {
switch (n.tag) {
case 31:
case 13:
- case 19: return Ao === null ? Qd() : n.alternate === null && fd === 0 && (fd = 3), n.flags &= -257, n.flags |= 65536, n.lanes = a, r === Xa ? n.flags |= 16384 : (t = n.updateQueue, t === null ? n.updateQueue = /* @__PURE__ */ new Set([r]) : t.add(r), xf(e, r, a)), !1;
+ case 19: return Ao === null ? Qd() : n.alternate === null && dd === 0 && (dd = 3), n.flags &= -257, n.flags |= 65536, n.lanes = a, r === Xa ? n.flags |= 16384 : (t = n.updateQueue, t === null ? n.updateQueue = /* @__PURE__ */ new Set([r]) : t.add(r), xf(e, r, a)), !1;
case 22: return n.flags |= 65536, r === Xa ? n.flags |= 16384 : (t = n.updateQueue, t === null ? (t = {
transitions: null,
markerInstances: null,
@@ -4201,15 +4201,15 @@ var k = /* @__PURE__ */ o(((e) => {
}
return xf(e, r, a), Qd(), !1;
}
- if (na) return t = ko.current, t === null ? (r !== aa && (t = Error(i(423), { cause: r }), fa(zi(t, n))), e = e.current.alternate, e.flags |= 65536, a &= -a, e.lanes |= a, r = zi(r, n), a = kc(e.stateNode, r, a), vo(e, a), fd !== 4 && (fd = 2)) : (!(t.flags & 65536) && (t.flags |= 256), t.flags |= 65536, t.lanes = a, r !== aa && (e = Error(i(422), { cause: r }), fa(zi(e, n)))), !1;
+ if (na) return t = ko.current, t === null ? (r !== aa && (t = Error(i(423), { cause: r }), fa(zi(t, n))), e = e.current.alternate, e.flags |= 65536, a &= -a, e.lanes |= a, r = zi(r, n), a = kc(e.stateNode, r, a), vo(e, a), dd !== 4 && (dd = 2)) : (!(t.flags & 65536) && (t.flags |= 256), t.flags |= 65536, t.lanes = a, r !== aa && (e = Error(i(422), { cause: r }), fa(zi(e, n)))), !1;
var o = Error(i(520), { cause: r });
- if (o = zi(o, n), vd === null ? vd = [o] : vd.push(o), fd !== 4 && (fd = 2), t === null) return !0;
+ if (o = zi(o, n), _d === null ? _d = [o] : _d.push(o), dd !== 4 && (dd = 2), t === null) return !0;
r = zi(r, n), n = t;
do {
switch (n.tag) {
case 3: return n.flags |= 65536, e = a & -a, n.lanes |= e, e = kc(n.stateNode, r, e), vo(n, e), !1;
case 1:
- if (t = n.type, o = n.stateNode, !(n.flags & 128) && (typeof t.getDerivedStateFromError == "function" || o !== null && typeof o.componentDidCatch == "function" && (Td === null || !Td.has(o)))) return n.flags |= 65536, a &= -a, n.lanes |= a, a = Ac(a), jc(a, e, n, r), vo(n, a), !1;
+ if (t = n.type, o = n.stateNode, !(n.flags & 128) && (typeof t.getDerivedStateFromError == "function" || o !== null && typeof o.componentDidCatch == "function" && (wd === null || !wd.has(o)))) return n.flags |= 65536, a &= -a, n.lanes |= a, a = Ac(a), jc(a, e, n, r), vo(n, a), !1;
break;
case 22: if (n.memoizedState !== null) return n.flags |= 65536, !1;
}
@@ -4331,7 +4331,7 @@ var k = /* @__PURE__ */ o(((e) => {
else throw Error(i(558));
} else if (Pc || ba(e, t, n, !1), a = (n & e.childLanes) !== 0, Pc || a) {
if (wo.current === null) {
- if (r = rd, r !== null && (s = vt(r, n), s !== 0 && s !== o.retryLane)) throw o.retryLane = s, wi(e, s), Bd(r, e, s), Nc;
+ if (r = nd, r !== null && (s = vt(r, n), s !== 0 && s !== o.retryLane)) throw o.retryLane = s, wi(e, s), Bd(r, e, s), Nc;
Qd();
}
t = Uc(e, t, n);
@@ -4394,7 +4394,7 @@ var k = /* @__PURE__ */ o(((e) => {
};
}
function Qc(e, t, n) {
- return e = e === null ? 0 : e.childLanes & ~n, t && (e |= gd), e;
+ return e = e === null ? 0 : e.childLanes & ~n, t && (e |= hd), e;
}
function $c(e, t, n) {
var r = t.pendingProps, i = !1, a = !!(t.flags & 128), o;
@@ -4462,7 +4462,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
if (Pc || ba(e, t, c, !1), r = (c & e.childLanes) !== 0, Pc || r) {
if (wo.current !== null) return nl(e, t, c);
- if (r = rd, r !== null && (a = vt(r, c), a !== 0 && a !== s.retryLane)) throw s.retryLane = a, wi(e, a), Bd(r, e, a), Nc;
+ if (r = nd, r !== null && (a = vt(r, c), a !== 0 && a !== s.retryLane)) throw s.retryLane = a, wi(e, a), Bd(r, e, a), Nc;
return hm(o) || Qd(), nl(e, t, c);
}
return hm(o) ? (t.flags |= 192, t.child = e.child, null) : (e = s.treeContext, ta = vm(o.nextSibling), ea = t, na = !0, ra = null, ia = !1, e !== null && $i(t, e), t = el(t, a.children), t.flags |= 134221824, t);
@@ -4547,7 +4547,7 @@ var k = /* @__PURE__ */ o(((e) => {
return ga(t, t.type, r.value), Fc(e, t, r.children, n), t.child;
}
function ul(e, t, n) {
- if (e !== null && (t.dependencies = e.dependencies), pd |= t.lanes, (n & t.childLanes) === 0) {
+ if (e !== null && (t.dependencies = e.dependencies), fd |= t.lanes, (n & t.childLanes) === 0) {
if (e !== null) {
if (ba(e, t, n, !1), (n & t.childLanes) === 0) return null;
} else return null;
@@ -4692,7 +4692,7 @@ var k = /* @__PURE__ */ o(((e) => {
case 19: return cl(e, t, n);
case 31: return Wc(e, t, n);
case 22: return zc(e, t, n, t.pendingProps);
- case 24: return Sa(t), r = Ca(ka), e === null ? (a = Wa(), a === null && (a = rd, o = Aa(), a.pooledCache = o, o.refCount++, o !== null && (a.pooledCacheLanes |= n), a = o), t.memoizedState = {
+ case 24: return Sa(t), r = Ca(ka), e === null ? (a = Wa(), a === null && (a = nd, o = Aa(), a.pooledCache = o, o.refCount++, o !== null && (a.pooledCacheLanes |= n), a = o), t.memoizedState = {
parent: r,
cache: a
}, po(t), ga(t, ka, a)) : ((e.lanes & n) !== 0 && (mo(e, t), xo(t, null, null, n), bo()), a = e.memoizedState, o = t.memoizedState, a.parent === r ? (r = o.cache, ga(t, ka, r), r !== a.cache && ya(t, [ka], n, !0)) : (a = {
@@ -4730,7 +4730,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
}
function _l(e, t) {
- t !== null && (e.flags |= 4), e.flags & 16384 && (t = e.tag === 22 ? 536870912 : ft(), e.lanes |= t, _d |= t);
+ t !== null && (e.flags |= 4), e.flags & 16384 && (t = e.tag === 22 ? 536870912 : ft(), e.lanes |= t, gd |= t);
}
function vl(e, t) {
if (!na) switch (e.tailMode) {
@@ -4888,20 +4888,20 @@ var k = /* @__PURE__ */ o(((e) => {
if (a = !!(t.flags & 128), o = r.rendering, o === null) {
if (a) vl(r, !1);
else {
- if (fd !== 0 || e !== null && e.flags & 128) for (e = t.child; e !== null;) {
+ if (dd !== 0 || e !== null && e.flags & 128) for (e = t.child; e !== null;) {
if (o = zo(e), o !== null) {
for (t.flags |= 128, vl(r, !1), e = o.updateQueue, t.updateQueue = e, _l(t, e), t.subtreeFlags = 0, e = n, n = t.child; n !== null;) Mi(n, e), n = n.sibling;
return Lo(t, Io.current & 1 | 2), na && Yi(t, r.treeForkCount), t.child;
}
e = e.sibling;
}
- r.tail !== null && He() > Cd && (t.flags |= 128, a = !0, vl(r, !1), t.lanes = 4194304);
+ r.tail !== null && He() > Sd && (t.flags |= 128, a = !0, vl(r, !1), t.lanes = 4194304);
}
} else {
if (!a) {
if (e = zo(o), e !== null) {
if (t.flags |= 128, a = !0, e = e.updateQueue, t.updateQueue = e, _l(t, e), vl(r, !0), r.tail === null && r.tailMode !== "collapsed" && r.tailMode !== "visible" && !o.alternate && !na) return yl(t), null;
- } else 2 * He() - r.renderingStartTime > Cd && n !== 536870912 && (t.flags |= 128, a = !0, vl(r, !1), t.lanes = 4194304);
+ } else 2 * He() - r.renderingStartTime > Sd && n !== 536870912 && (t.flags |= 128, a = !0, vl(r, !1), t.lanes = 4194304);
}
r.isBackwards ? (o.sibling = t.child, t.child = o) : (e = r.last, e === null ? t.child = o : e.sibling = o, r.last = o);
}
@@ -5157,7 +5157,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
function Rl(e, t, n, r) {
var i = e.tag;
- if (i === 5 || i === 6) i = e.stateNode, t ? (n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n).insertBefore(i, t) : (t = n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n, t.appendChild(i), n = n._reactRootContainer, n != null || t.onclick !== null || (t.onclick = vn)), kl(e, r), Jt = !0;
+ if (i === 5 || i === 6) i = e.stateNode, t ? (n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n).insertBefore(i, t) : (t = n.nodeType === 9 ? n.body : n.nodeName === "HTML" ? n.ownerDocument.body : n, t.appendChild(i), n = n._reactRootContainer, n != null || t.onclick !== null || (t.onclick = L)), kl(e, r), Jt = !0;
else if (i !== 4 && (i === 27 && (kl(e, r), r = null, jp(e.type) && (n = e.stateNode, t = null)), e = e.child, e !== null)) for (Rl(e, t, n, r), e = e.sibling; e !== null;) Rl(e, t, n, r), e = e.sibling;
}
function zl(e, t, n, r) {
@@ -5178,16 +5178,16 @@ var k = /* @__PURE__ */ o(((e) => {
function Ul(e) {
(e.tag === 30 || e.subtreeFlags & 33554432) && (Vl = !0);
}
- var U = null;
- function Wl() {
- var e = U;
- return U = null, e;
- }
- var Gl = 0;
- function Kl(e, t, n, r, i) {
- return Gl = 0, ql(e.child, t, n, r, i);
+ var Wl = null;
+ function Gl() {
+ var e = Wl;
+ return Wl = null, e;
}
+ var Kl = 0;
function ql(e, t, n, r, i) {
+ return Kl = 0, Jl(e.child, t, n, r, i);
+ }
+ function Jl(e, t, n, r, i) {
for (var a = !1; e !== null;) {
if (e.tag === 5) {
var o = e.stateNode;
@@ -5195,34 +5195,34 @@ var k = /* @__PURE__ */ o(((e) => {
var s = Lp(o);
r.push(s), s.view && (a = !0);
} else a || Lp(o).view && (a = !0);
- Vl = !0, Pp(o, Gl === 0 ? t : t + "_" + Gl, n), Gl++;
- } else e.tag === 22 && e.memoizedState !== null || e.tag === 30 && i || ql(e.child, t, n, r, i) && (a = !0);
+ Vl = !0, Pp(o, Kl === 0 ? t : t + "_" + Kl, n), Kl++;
+ } else e.tag === 22 && e.memoizedState !== null || e.tag === 30 && i || Jl(e.child, t, n, r, i) && (a = !0);
e = e.sibling;
}
return a;
}
- function Jl(e, t) {
- for (; e !== null;) e.tag === 5 ? Fp(e.stateNode, e.memoizedProps) : e.tag === 22 && e.memoizedState !== null || e.tag === 30 && t || Jl(e.child, t), e = e.sibling;
+ function Yl(e, t) {
+ for (; e !== null;) e.tag === 5 ? Fp(e.stateNode, e.memoizedProps) : e.tag === 22 && e.memoizedState !== null || e.tag === 30 && t || Yl(e.child, t), e = e.sibling;
}
- function Yl(e) {
+ function Xl(e) {
if (e.subtreeFlags & 18874368) for (e = e.child; e !== null;) {
- if ((e.tag !== 22 || e.memoizedState === null) && (Yl(e), e.tag === 30 && e.flags & 18874368 && e.stateNode.paired)) {
+ if ((e.tag !== 22 || e.memoizedState === null) && (Xl(e), e.tag === 30 && e.flags & 18874368 && e.stateNode.paired)) {
var t = e.memoizedProps;
if (t.name == null || t.name === "auto") throw Error(i(544));
var n = t.name;
- t = gi(t.default, t.share), t !== "none" && (Kl(e, n, t, null, !1) || Jl(e.child, !1));
+ t = gi(t.default, t.share), t !== "none" && (ql(e, n, t, null, !1) || Yl(e.child, !1));
}
e = e.sibling;
}
}
- function Xl(e, t) {
+ function Zl(e, t) {
if (e.tag === 30) {
var n = e.stateNode, r = e.memoizedProps, i = mi(r, n), a = gi(r.default, n.paired ? r.share : r.enter);
- a === "none" ? Yl(e) : Kl(e, i, a, null, !1) ? (Yl(e), n.paired || t || zd(e, r.onEnter)) : Jl(e.child, !1);
- } else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) Xl(e, t), e = e.sibling;
- else Yl(e);
+ a === "none" ? Xl(e) : ql(e, i, a, null, !1) ? (Xl(e), n.paired || t || zd(e, r.onEnter)) : Yl(e.child, !1);
+ } else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) Zl(e, t), e = e.sibling;
+ else Xl(e);
}
- function Zl(e) {
+ function Ql(e) {
if (Hl !== null && Hl.size !== 0) {
var t = Hl;
if (e.subtreeFlags & 18874368) for (e = e.child; e !== null;) {
@@ -5233,58 +5233,58 @@ var k = /* @__PURE__ */ o(((e) => {
var i = t.get(r);
if (i !== void 0) {
var a = gi(n.default, n.share);
- if (a !== "none" && (Kl(e, r, a, null, !1) ? (a = e.stateNode, i.paired = a, a.paired = i, zd(e, n.onShare)) : Jl(e.child, !1)), t.delete(r), t.size === 0) break;
+ if (a !== "none" && (ql(e, r, a, null, !1) ? (a = e.stateNode, i.paired = a, a.paired = i, zd(e, n.onShare)) : Yl(e.child, !1)), t.delete(r), t.size === 0) break;
}
}
}
- Zl(e);
+ Ql(e);
}
e = e.sibling;
}
}
}
- function Ql(e) {
+ function $l(e) {
if (e.tag === 30) {
var t = e.memoizedProps, n = mi(t, e.stateNode), r = Hl === null ? void 0 : Hl.get(n), i = gi(t.default, r === void 0 ? t.exit : t.share);
- i !== "none" && (Kl(e, n, i, null, !1) ? r === void 0 ? zd(e, t.onExit) : (i = e.stateNode, r.paired = i, i.paired = r, Hl.delete(n), zd(e, t.onShare)) : Jl(e.child, !1)), Hl !== null && Zl(e);
- } else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) Ql(e), e = e.sibling;
- else Hl !== null && Zl(e);
+ i !== "none" && (ql(e, n, i, null, !1) ? r === void 0 ? zd(e, t.onExit) : (i = e.stateNode, r.paired = i, i.paired = r, Hl.delete(n), zd(e, t.onShare)) : Yl(e.child, !1)), Hl !== null && Ql(e);
+ } else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) $l(e), e = e.sibling;
+ else Hl !== null && Ql(e);
}
- function $l(e) {
+ function eu(e) {
for (e = e.child; e !== null;) {
if (e.tag === 30) {
var t = e.memoizedProps, n = mi(t, e.stateNode);
- t = gi(t.default, t.update), e.flags &= -5, t !== "none" && Kl(e, n, t, e.memoizedState = [], !1);
- } else e.subtreeFlags & 33554432 && $l(e);
+ t = gi(t.default, t.update), e.flags &= -5, t !== "none" && ql(e, n, t, e.memoizedState = [], !1);
+ } else e.subtreeFlags & 33554432 && eu(e);
e = e.sibling;
}
}
- function eu(e) {
+ function tu(e) {
if (e.subtreeFlags & 18874368) for (e = e.child; e !== null;) {
if (e.tag !== 22 || e.memoizedState === null) {
if (e.tag === 30 && e.flags & 18874368) {
var t = e.stateNode;
- t.paired !== null && (t.paired = null, Jl(e.child, !1));
+ t.paired !== null && (t.paired = null, Yl(e.child, !1));
}
- eu(e);
+ tu(e);
}
e = e.sibling;
}
}
- function tu(e) {
- if (e.tag === 30) e.stateNode.paired = null, Jl(e.child, !1), eu(e);
- else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) tu(e), e = e.sibling;
- else eu(e);
- }
function nu(e) {
- for (e = e.child; e !== null;) e.tag === 30 ? Jl(e.child, !1) : e.subtreeFlags & 33554432 && nu(e), e = e.sibling;
+ if (e.tag === 30) e.stateNode.paired = null, Yl(e.child, !1), tu(e);
+ else if (e.subtreeFlags & 33554432) for (e = e.child; e !== null;) nu(e), e = e.sibling;
+ else tu(e);
}
- function ru(e, t, n, r, i, a, o) {
+ function ru(e) {
+ for (e = e.child; e !== null;) e.tag === 30 ? Yl(e.child, !1) : e.subtreeFlags & 33554432 && ru(e), e = e.sibling;
+ }
+ function iu(e, t, n, r, i, a, o) {
for (var s = !1; t !== null;) {
if (t.tag === 5) {
var c = t.stateNode;
- if (a !== null && Gl < a.length) {
- var l = a[Gl], u = Lp(c);
+ if (a !== null && Kl < a.length) {
+ var l = a[Kl], u = Lp(c);
(l.view || u.view) && (s = !0);
var d;
if (d = !(e.flags & 4)) {
@@ -5297,13 +5297,13 @@ var k = /* @__PURE__ */ o(((e) => {
}
d && (e.flags |= 4), u.abs ? u = !l.abs : (l = l.rect, u = u.rect, u = l.height !== u.height || l.width !== u.width), u && (e.flags |= 32);
} else e.flags |= 32;
- e.flags & 4 && Pp(c, Gl === 0 ? n : n + "_" + Gl, i), s && e.flags & 4 || (U === null && (U = []), U.push(c, Gl === 0 ? r : r + "_" + Gl, t.memoizedProps)), Gl++;
- } else (t.tag !== 22 || t.memoizedState === null) && (t.tag === 30 && o ? e.flags |= t.flags & 32 : ru(e, t.child, n, r, i, a, o) && (s = !0));
+ e.flags & 4 && Pp(c, Kl === 0 ? n : n + "_" + Kl, i), s && e.flags & 4 || (Wl === null && (Wl = []), Wl.push(c, Kl === 0 ? r : r + "_" + Kl, t.memoizedProps)), Kl++;
+ } else (t.tag !== 22 || t.memoizedState === null) && (t.tag === 30 && o ? e.flags |= t.flags & 32 : iu(e, t.child, n, r, i, a, o) && (s = !0));
t = t.sibling;
}
return s;
}
- function iu(e, t) {
+ function U(e, t) {
for (e = e.child; e !== null;) {
if (e.tag === 30) {
var n = e.memoizedProps, r = e.stateNode, i = mi(n, r), a = gi(n.default, n.update);
@@ -5313,8 +5313,8 @@ var k = /* @__PURE__ */ o(((e) => {
} else o = e.memoizedState, e.memoizedState = null;
r = e;
var s = e.child;
- Gl = 0, i = ru(r, s, i, i, a, o, !1), e.flags & 4 && i && (t || zd(e, n.onUpdate));
- } else e.subtreeFlags & 33554432 && iu(e, t);
+ Kl = 0, i = iu(r, s, i, i, a, o, !1), e.flags & 4 && i && (t || zd(e, n.onUpdate));
+ } else e.subtreeFlags & 33554432 && U(e, t);
e = e.sibling;
}
}
@@ -5363,12 +5363,12 @@ var k = /* @__PURE__ */ o(((e) => {
focusedElem: e,
selectionRange: r
}, Th = !1, n = (n & 335544064) === n, uu = t, t = n ? 9270 : 1024; uu !== null;) {
- if (e = uu, n && (r = e.deletions, r !== null)) for (a = 0; a < r.length; a++) n && Ql(r[a]);
+ if (e = uu, n && (r = e.deletions, r !== null)) for (a = 0; a < r.length; a++) n && $l(r[a]);
if (e.alternate === null && e.flags & 2) n && Ul(e), gu(n);
else {
if (e.tag === 22) {
if (r = e.alternate, e.memoizedState !== null) {
- r !== null && r.memoizedState === null && n && Ql(r), gu(n);
+ r !== null && r.memoizedState === null && n && $l(r), gu(n);
continue;
}
if (r !== null && r.memoizedState !== null) {
@@ -5376,7 +5376,7 @@ var k = /* @__PURE__ */ o(((e) => {
continue;
}
}
- r = e.child, (e.subtreeFlags & t) !== 0 && r !== null ? (r.return = e, uu = r) : (n && $l(e), gu(n));
+ r = e.child, (e.subtreeFlags & t) !== 0 && r !== null ? (r.return = e, uu = r) : (n && eu(e), gu(n));
}
}
Hl = null;
@@ -5420,7 +5420,7 @@ var k = /* @__PURE__ */ o(((e) => {
case 4:
case 17: break;
case 30:
- n && r !== null && (n = mi(r.memoizedProps, r.stateNode), a = t.memoizedProps, a = gi(a.default, a.update), a !== "none" && Kl(r, n, a, r.memoizedState = [], !0));
+ n && r !== null && (n = mi(r.memoizedProps, r.stateNode), a = t.memoizedProps, a = gi(a.default, a.update), a !== "none" && ql(r, n, a, r.memoizedState = [], !0));
break;
default: if (a & 1024) throw Error(i(163));
}
@@ -5437,10 +5437,10 @@ var k = /* @__PURE__ */ o(((e) => {
case 0:
case 11:
case 15:
- Lu(e, n), r & 4 && Cl(5, n);
+ Iu(e, n), r & 4 && Cl(5, n);
break;
case 1:
- if (Lu(e, n), r & 4) {
+ if (Iu(e, n), r & 4) {
if (e = n.stateNode, t === null) try {
e.componentDidMount();
} catch (e) {
@@ -5459,7 +5459,7 @@ var k = /* @__PURE__ */ o(((e) => {
r & 64 && Tl(n), r & 512 && Dl(n, n.return);
break;
case 3:
- if (Lu(e, n), r & 64 && (e = n.updateQueue, e !== null)) {
+ if (Iu(e, n), r & 64 && (e = n.updateQueue, e !== null)) {
if (t = null, n.child !== null) switch (n.child.tag) {
case 27:
case 5:
@@ -5477,28 +5477,28 @@ var k = /* @__PURE__ */ o(((e) => {
case 27: t === null && r & 4 && Bl(n);
case 26:
case 5:
- Lu(e, n), t === null && r & 4 && Pl(n), r & 512 && Dl(n, n.return);
+ Iu(e, n), t === null && r & 4 && Pl(n), r & 512 && Dl(n, n.return);
break;
case 12:
- Lu(e, n);
+ Iu(e, n);
break;
case 31:
- Lu(e, n), r & 4 && Eu(e, n);
+ Iu(e, n), r & 4 && Eu(e, n);
break;
case 13:
- Lu(e, n), r & 4 && Du(e, n), r & 64 && (e = n.memoizedState, e !== null && (e = e.dehydrated, e !== null && (n = wf.bind(null, n), _m(e, n))));
+ Iu(e, n), r & 4 && Du(e, n), r & 64 && (e = n.memoizedState, e !== null && (e = e.dehydrated, e !== null && (n = wf.bind(null, n), _m(e, n))));
break;
case 22:
if (r = n.memoizedState !== null || au, !r) {
var a = t !== null && t.memoizedState !== null || ou;
- t = au, i = ou, au = r, (ou = a) && !i ? (r = 2, n.subtreeFlags & 8772 && (r |= 1), zu(e, n, r)) : Lu(e, n), au = t, ou = i;
+ t = au, i = ou, au = r, (ou = a) && !i ? (r = 2, n.subtreeFlags & 8772 && (r |= 1), Ru(e, n, r)) : Iu(e, n), au = t, ou = i;
}
break;
case 30:
- Lu(e, n), r & 512 && Dl(n, n.return);
+ Iu(e, n), r & 512 && Dl(n, n.return);
break;
case 7: r & 512 && Dl(n, n.return);
- default: Lu(e, n);
+ default: Iu(e, n);
}
}
function vu(e, t) {
@@ -5704,13 +5704,13 @@ var k = /* @__PURE__ */ o(((e) => {
var s = r[o];
s.ref.impl = s.nextImpl;
}
- Au(t, e, n), Nu(e), a & 4 && (wl(3, e, e.return), Cl(3, e), wl(5, e, e.return));
+ Au(t, e, n), W(e), a & 4 && (wl(3, e, e.return), Cl(3, e), wl(5, e, e.return));
break;
case 1:
- Au(t, e, n), Nu(e), a & 512 && (ou || r === null || Ol(r, r.return)), a & 64 && au && (e = e.updateQueue, e !== null && (t = e.callbacks, t !== null && (n = e.shared.hiddenCallbacks, e.shared.hiddenCallbacks = n === null ? t : n.concat(t))));
+ Au(t, e, n), W(e), a & 512 && (ou || r === null || Ol(r, r.return)), a & 64 && au && (e = e.updateQueue, e !== null && (t = e.callbacks, t !== null && (n = e.shared.hiddenCallbacks, e.shared.hiddenCallbacks = n === null ? t : n.concat(t))));
break;
case 26:
- if (o = ju, Au(t, e, n), Nu(e), a & 512 && (ou || r === null || Ol(r, r.return)), a & 4) {
+ if (o = ju, Au(t, e, n), W(e), a & 512 && (ou || r === null || Ol(r, r.return)), a & 4) {
if (a = r === null ? null : r.memoizedState, n = e.memoizedState, r === null) {
if (n === null) {
if (e.stateNode === null) {
@@ -5752,13 +5752,13 @@ var k = /* @__PURE__ */ o(((e) => {
}
break;
case 27:
- Au(t, e, n), Nu(e), a & 512 && (ou || r === null || Ol(r, r.return)), r !== null && a & 4 && Fl(e, e.memoizedProps, r.memoizedProps);
+ Au(t, e, n), W(e), a & 512 && (ou || r === null || Ol(r, r.return)), r !== null && a & 4 && Fl(e, e.memoizedProps, r.memoizedProps);
break;
case 5:
- if (o = su, su = !1, Au(t, e, n), su = o, Nu(e), a & 512 && (ou || r === null || Ol(r, r.return)), e.flags & 32) {
+ if (o = su, su = !1, Au(t, e, n), su = o, W(e), a & 512 && (ou || r === null || Ol(r, r.return)), e.flags & 32) {
t = e.stateNode;
try {
- dn(t, ""), Jt = !0;
+ pn(t, ""), Jt = !0;
} catch (t) {
bf(e, e.return, t);
}
@@ -5766,7 +5766,7 @@ var k = /* @__PURE__ */ o(((e) => {
a & 4 && e.stateNode != null && (t = e.memoizedProps, Fl(e, t, r === null ? t : r.memoizedProps)), a & 1024 && (cu = !0);
break;
case 6:
- if (Au(t, e, n), Nu(e), a & 4) {
+ if (Au(t, e, n), W(e), a & 4) {
if (e.stateNode === null) throw Error(i(162));
t = e.memoizedProps, n = e.stateNode;
try {
@@ -5777,42 +5777,42 @@ var k = /* @__PURE__ */ o(((e) => {
}
break;
case 3:
- if (Jt = !1, $m = null, o = ju, ju = km(t.containerInfo), Au(t, e, n), ju = o, Nu(e), a & 4 && r !== null && r.memoizedState.isDehydrated) try {
+ if (Jt = !1, $m = null, o = ju, ju = km(t.containerInfo), Au(t, e, n), ju = o, W(e), a & 4 && r !== null && r.memoizedState.isDehydrated) try {
Zh(t.containerInfo);
} catch (t) {
bf(e, e.return, t);
}
- cu && (cu = !1, Pu(e)), Jt = !1;
+ cu && (cu = !1, Nu(e)), Jt = !1;
break;
case 4:
- a = su, su = au, r = Yt(), o = ju, ju = km(e.stateNode.containerInfo), Au(t, e, n), Nu(e), ju = o, Jt && fu && (pu = !0), Jt = r, su = a;
+ a = su, su = au, r = Yt(), o = ju, ju = km(e.stateNode.containerInfo), Au(t, e, n), W(e), ju = o, Jt && fu && (pu = !0), Jt = r, su = a;
break;
case 12:
- Au(t, e, n), Nu(e);
+ Au(t, e, n), W(e);
break;
case 31:
- Au(t, e, n), Nu(e), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
+ Au(t, e, n), W(e), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
break;
case 13:
- Au(t, e, n), Nu(e), e.child.flags & 8192 && e.memoizedState !== null != (r !== null && r.memoizedState !== null) && (xd = He()), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
+ Au(t, e, n), W(e), e.child.flags & 8192 && e.memoizedState !== null != (r !== null && r.memoizedState !== null) && (bd = He()), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
break;
case 22:
o = e.memoizedState !== null, s = r !== null && r.memoizedState !== null;
var c = au, l = ou, u = su;
- au = c || o, su = u || o, ou = l || s, Au(t, e, n), ou = l, su = u, au = c, Nu(e), a & 8192 && (t = e.stateNode, t._visibility = o ? t._visibility & -2 : t._visibility | 1, !o || r === null || s || au || ou || (t = s || ou, n = au, r = ou, au = o || au, ou = t, Ru(e, 2), au = n, ou = r), !o && su || vu(e, o)), a & 4 && (t = e.updateQueue, t !== null && (n = t.retryQueue, n !== null && (t.retryQueue = null, ku(e, n))));
+ au = c || o, su = u || o, ou = l || s, Au(t, e, n), ou = l, su = u, au = c, W(e), a & 8192 && (t = e.stateNode, t._visibility = o ? t._visibility & -2 : t._visibility | 1, !o || r === null || s || au || ou || (t = s || ou, n = au, r = ou, au = o || au, ou = t, Lu(e, 2), au = n, ou = r), !o && su || vu(e, o)), a & 4 && (t = e.updateQueue, t !== null && (n = t.retryQueue, n !== null && (t.retryQueue = null, ku(e, n))));
break;
case 19:
- Au(t, e, n), Nu(e), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
+ Au(t, e, n), W(e), a & 4 && (t = e.updateQueue, t !== null && (e.updateQueue = null, ku(e, t)));
break;
case 30:
- a & 512 && (ou || r === null || Ol(r, r.return)), a = Yt(), o = fu, s = (n & 335544064) === n, c = e.memoizedProps, fu = s && gi(c.default, c.update) !== "none", Au(t, e, n), Nu(e), s && r !== null && Jt && (e.flags |= 4), fu = o, Jt = a;
+ a & 512 && (ou || r === null || Ol(r, r.return)), a = Yt(), o = fu, s = (n & 335544064) === n, c = e.memoizedProps, fu = s && gi(c.default, c.update) !== "none", Au(t, e, n), W(e), s && r !== null && Jt && (e.flags |= 4), fu = o, Jt = a;
break;
case 21: break;
case 7: a & 512 && (ou || r === null || Ol(r, r.return)), r && r.stateNode !== null && (r.stateNode._fragmentFiber = e);
- default: Au(t, e, n), Nu(e);
+ default: Au(t, e, n), W(e);
}
}
- function Nu(e) {
+ function W(e) {
var t = e.flags;
if (t & 2) {
try {
@@ -5841,7 +5841,7 @@ var k = /* @__PURE__ */ o(((e) => {
break;
case 5:
var l = n.stateNode;
- n.flags & 32 && (dn(l, ""), n.flags &= -33), zl(e, Ll(e), l, s);
+ n.flags & 32 && (pn(l, ""), n.flags &= -33), zl(e, Ll(e), l, s);
break;
case 3:
case 4:
@@ -5857,23 +5857,23 @@ var k = /* @__PURE__ */ o(((e) => {
}
t & 4096 && (e.flags &= -4097);
}
- function Pu(e) {
+ function Nu(e) {
if (e.subtreeFlags & 1024) for (e = e.child; e !== null;) {
var t = e;
- Pu(t), t.tag === 5 && t.flags & 1024 && (t = t.stateNode, Th = !0, t.reset(), Th = !1), e = e.sibling;
+ Nu(t), t.tag === 5 && t.flags & 1024 && (t = t.stateNode, Th = !0, t.reset(), Th = !1), e = e.sibling;
}
}
- function Fu(e, t) {
- if (t.subtreeFlags & 9270) for (t = t.child; t !== null;) Iu(t, e), t = t.sibling;
- else iu(t, !1);
+ function Pu(e, t) {
+ if (t.subtreeFlags & 9270) for (t = t.child; t !== null;) Fu(t, e), t = t.sibling;
+ else U(t, !1);
}
- function Iu(e, t) {
+ function Fu(e, t) {
var n = e.alternate;
- if (n === null) Xl(e, !1);
+ if (n === null) Zl(e, !1);
else switch (e.tag) {
case 3:
- if (mu = du = !1, Wl(), Fu(t, e), !du && !pu) {
- if (e = U, e !== null) for (var r = 0; r < e.length; r += 3) {
+ if (mu = du = !1, Gl(), Pu(t, e), !du && !pu) {
+ if (e = Wl, e !== null) for (var r = 0; r < e.length; r += 3) {
n = e[r];
var i = e[r + 1];
Fp(n, e[r + 2]), n = n.ownerDocument.documentElement, n !== null && n.animate({
@@ -5901,31 +5901,31 @@ var k = /* @__PURE__ */ o(((e) => {
pseudoElement: "::view-transition"
})), mu = !0;
}
- U = null;
+ Wl = null;
break;
case 5:
- Fu(t, e);
+ Pu(t, e);
break;
case 4:
- r = du, du = !1, Fu(t, e), du && (pu = !0), du = r;
+ r = du, du = !1, Pu(t, e), du && (pu = !0), du = r;
break;
case 22:
- e.memoizedState === null && (n.memoizedState === null ? Fu(t, e) : Xl(e, !1));
+ e.memoizedState === null && (n.memoizedState === null ? Pu(t, e) : Zl(e, !1));
break;
case 30:
- r = du, i = Wl(), du = !1, Fu(t, e), du && (e.flags |= 4);
+ r = du, i = Gl(), du = !1, Pu(t, e), du && (e.flags |= 4);
var a = e.memoizedProps, o = e.stateNode;
t = mi(a, o), o = mi(n.memoizedProps, o);
var s = gi(a.default, a.update);
- s === "none" ? t = !1 : (a = n.memoizedState, n.memoizedState = null, n = e.child, Gl = 0, t = ru(e, n, t, o, s, a, !0), Gl !== (a === null ? 0 : a.length) && (e.flags |= 32)), e.flags & 4 && t ? (zd(e, e.memoizedProps.onUpdate), U = i) : i !== null && (i.push.apply(i, U), U = i), du = e.flags & 32 ? !0 : r;
+ s === "none" ? t = !1 : (a = n.memoizedState, n.memoizedState = null, n = e.child, Kl = 0, t = iu(e, n, t, o, s, a, !0), Kl !== (a === null ? 0 : a.length) && (e.flags |= 32)), e.flags & 4 && t ? (zd(e, e.memoizedProps.onUpdate), Wl = i) : i !== null && (i.push.apply(i, Wl), Wl = i), du = e.flags & 32 ? !0 : r;
break;
- default: Fu(t, e);
+ default: Pu(t, e);
}
}
- function Lu(e, t) {
+ function Iu(e, t) {
if (t.subtreeFlags & 8772) for (t = t.child; t !== null;) _u(e, t.alternate, t), t = t.sibling;
}
- function Ru(e, t) {
+ function Lu(e, t) {
for (e = e.child; e !== null;) {
var n = e, r = t;
switch (n.tag) {
@@ -5933,46 +5933,46 @@ var k = /* @__PURE__ */ o(((e) => {
case 11:
case 14:
case 15:
- wl(4, n, n.return), Ru(n, r);
+ wl(4, n, n.return), Lu(n, r);
break;
case 1:
Ol(n, n.return);
var i = n.stateNode;
- typeof i.componentWillUnmount == "function" && El(n, n.return, i), Ru(n, r);
+ typeof i.componentWillUnmount == "function" && El(n, n.return, i), Lu(n, r);
break;
case 27: r & 2 && Tm(n.stateNode, n.type, n.memoizedProps);
case 5:
- Ol(n, n.return), n.tag !== 5 && n.tag !== 27 || jl(n), Ru(n, r);
+ Ol(n, n.return), n.tag !== 5 && n.tag !== 27 || jl(n), Lu(n, r);
break;
case 6:
jl(n);
break;
case 26:
- Ol(n, n.return), i = n.stateNode, n.memoizedState !== null || i === null || ou || i.parentNode.removeChild(i), Ru(n, r);
+ Ol(n, n.return), i = n.stateNode, n.memoizedState !== null || i === null || ou || i.parentNode.removeChild(i), Lu(n, r);
break;
case 22:
- n.memoizedState === null && Ru(n, r);
+ n.memoizedState === null && Lu(n, r);
break;
case 30:
- Ol(n, n.return), Ru(n, r);
+ Ol(n, n.return), Lu(n, r);
break;
case 7: Ol(n, n.return);
- default: Ru(n, r);
+ default: Lu(n, r);
}
e = e.sibling;
}
}
- function zu(e, t, n) {
+ function Ru(e, t, n) {
for (n = t.subtreeFlags & 8772 ? n : n & -2, t = t.child; t !== null;) {
var r = t.alternate, i = e, a = t, o = a.flags, s = !!(n & 1);
switch (a.tag) {
case 0:
case 11:
case 15:
- zu(i, a, n), Cl(4, a);
+ Ru(i, a, n), Cl(4, a);
break;
case 1:
- if (zu(i, a, n), r = a, i = r.stateNode, typeof i.componentDidMount == "function") try {
+ if (Ru(i, a, n), r = a, i = r.stateNode, typeof i.componentDidMount == "function") try {
i.componentDidMount();
} catch (e) {
bf(r, r.return, e);
@@ -5990,161 +5990,161 @@ var k = /* @__PURE__ */ o(((e) => {
break;
case 27: n & 2 && Bl(a);
case 5:
- a.tag !== 5 && a.tag !== 27 || Al(a), zu(i, a, n), s && r === null && o & 4 && Pl(a), Dl(a, a.return);
+ a.tag !== 5 && a.tag !== 27 || Al(a), Ru(i, a, n), s && r === null && o & 4 && Pl(a), Dl(a, a.return);
break;
case 6:
Al(a);
break;
case 26:
- c = a.stateNode, a.memoizedState !== null || c === null || au || th(km(c.ownerDocument), a.type, c), zu(i, a, n), s && r === null && o & 4 && Pl(a), Dl(a, a.return);
+ c = a.stateNode, a.memoizedState !== null || c === null || au || th(km(c.ownerDocument), a.type, c), Ru(i, a, n), s && r === null && o & 4 && Pl(a), Dl(a, a.return);
break;
case 12:
- zu(i, a, n);
+ Ru(i, a, n);
break;
case 31:
- zu(i, a, n), s && o & 4 && Eu(i, a);
+ Ru(i, a, n), s && o & 4 && Eu(i, a);
break;
case 13:
- zu(i, a, n), s && o & 4 && Du(i, a);
+ Ru(i, a, n), s && o & 4 && Du(i, a);
break;
case 22:
- a.memoizedState === null && zu(i, a, n), Dl(a, a.return);
+ a.memoizedState === null && Ru(i, a, n), Dl(a, a.return);
break;
case 30:
- zu(i, a, n), Dl(a, a.return);
+ Ru(i, a, n), Dl(a, a.return);
break;
case 7: Dl(a, a.return);
- default: zu(i, a, n);
+ default: Ru(i, a, n);
}
t = t.sibling;
}
}
- function Bu(e, t) {
+ function zu(e, t) {
var n = null;
e !== null && e.memoizedState !== null && e.memoizedState.cachePool !== null && (n = e.memoizedState.cachePool.pool), e = null, t.memoizedState !== null && t.memoizedState.cachePool !== null && (e = t.memoizedState.cachePool.pool), e !== n && (e != null && e.refCount++, n != null && ja(n));
}
- function Vu(e, t) {
+ function Bu(e, t) {
e = null, t.alternate !== null && (e = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== e && (t.refCount++, e != null && ja(e));
}
- function Hu(e, t, n, r) {
+ function Vu(e, t, n, r) {
var i = (n & 335544064) === n;
- if (t.subtreeFlags & (i ? 10262 : 10256)) for (t = t.child; t !== null;) Uu(e, t, n, r), t = t.sibling;
- else i && nu(t);
+ if (t.subtreeFlags & (i ? 10262 : 10256)) for (t = t.child; t !== null;) Hu(e, t, n, r), t = t.sibling;
+ else i && ru(t);
}
- function Uu(e, t, n, r) {
+ function Hu(e, t, n, r) {
var i = (n & 335544064) === n;
- i && t.alternate === null && t.return !== null && t.return.alternate !== null && tu(t);
+ i && t.alternate === null && t.return !== null && t.return.alternate !== null && nu(t);
var a = t.flags;
switch (t.tag) {
case 0:
case 11:
case 15:
- Hu(e, t, n, r), a & 2048 && Cl(9, t);
+ Vu(e, t, n, r), a & 2048 && Cl(9, t);
break;
case 1:
- Hu(e, t, n, r);
+ Vu(e, t, n, r);
break;
case 3:
- Hu(e, t, n, r), i && mu && (e = e.containerInfo, e = e.nodeType === 9 ? e.body : e.nodeName === "HTML" ? e.ownerDocument.body : e, e.style.viewTransitionName === "root" && (e.style.viewTransitionName = ""), e = e.ownerDocument.documentElement, e !== null && e.style.viewTransitionName === "none" && (e.style.viewTransitionName = "")), a & 2048 && (a = null, t.alternate !== null && (a = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== a && (t.refCount++, a != null && ja(a)));
+ Vu(e, t, n, r), i && mu && (e = e.containerInfo, e = e.nodeType === 9 ? e.body : e.nodeName === "HTML" ? e.ownerDocument.body : e, e.style.viewTransitionName === "root" && (e.style.viewTransitionName = ""), e = e.ownerDocument.documentElement, e !== null && e.style.viewTransitionName === "none" && (e.style.viewTransitionName = "")), a & 2048 && (a = null, t.alternate !== null && (a = t.alternate.memoizedState.cache), t = t.memoizedState.cache, t !== a && (t.refCount++, a != null && ja(a)));
break;
case 12:
if (a & 2048) {
- Hu(e, t, n, r), a = t.stateNode;
+ Vu(e, t, n, r), a = t.stateNode;
try {
var o = t.memoizedProps, s = o.id, c = o.onPostCommit;
typeof c == "function" && c(s, t.alternate === null ? "mount" : "update", a.passiveEffectDuration, -0);
} catch (e) {
bf(t, t.return, e);
}
- } else Hu(e, t, n, r);
+ } else Vu(e, t, n, r);
break;
case 31:
- Hu(e, t, n, r);
+ Vu(e, t, n, r);
break;
case 13:
- Hu(e, t, n, r);
+ Vu(e, t, n, r);
break;
case 23: break;
case 22:
- o = t.stateNode, s = t.alternate, t.memoizedState === null ? (i && s !== null && s.memoizedState !== null && tu(t), o._visibility & 2 ? Hu(e, t, n, r) : (o._visibility |= 2, Wu(e, t, n, r, !!(t.subtreeFlags & 10256) || !1))) : (i && s !== null && s.memoizedState === null && tu(s), o._visibility & 2 ? Hu(e, t, n, r) : Gu(e, t)), a & 2048 && Bu(s, t);
+ o = t.stateNode, s = t.alternate, t.memoizedState === null ? (i && s !== null && s.memoizedState !== null && nu(t), o._visibility & 2 ? Vu(e, t, n, r) : (o._visibility |= 2, Uu(e, t, n, r, !!(t.subtreeFlags & 10256) || !1))) : (i && s !== null && s.memoizedState === null && nu(s), o._visibility & 2 ? Vu(e, t, n, r) : Wu(e, t)), a & 2048 && zu(s, t);
break;
case 24:
- Hu(e, t, n, r), a & 2048 && Vu(t.alternate, t);
+ Vu(e, t, n, r), a & 2048 && Bu(t.alternate, t);
break;
case 30:
- i && (a = t.alternate, a !== null && (Jl(a.child, !0), Jl(t.child, !0))), Hu(e, t, n, r);
+ i && (a = t.alternate, a !== null && (Yl(a.child, !0), Yl(t.child, !0))), Vu(e, t, n, r);
break;
- default: Hu(e, t, n, r);
+ default: Vu(e, t, n, r);
}
}
- function Wu(e, t, n, r, i) {
+ function Uu(e, t, n, r, i) {
for (i &&= !!(t.subtreeFlags & 10256) || !1, t = t.child; t !== null;) {
var a = e, o = t, s = n, c = r, l = o.flags;
switch (o.tag) {
case 0:
case 11:
case 15:
- Wu(a, o, s, c, i), Cl(8, o);
+ Uu(a, o, s, c, i), Cl(8, o);
break;
case 23: break;
case 22:
var u = o.stateNode;
- o.memoizedState === null ? (u._visibility |= 2, Wu(a, o, s, c, i)) : u._visibility & 2 ? Wu(a, o, s, c, i) : Gu(a, o), i && l & 2048 && Bu(o.alternate, o);
+ o.memoizedState === null ? (u._visibility |= 2, Uu(a, o, s, c, i)) : u._visibility & 2 ? Uu(a, o, s, c, i) : Wu(a, o), i && l & 2048 && zu(o.alternate, o);
break;
case 24:
- Wu(a, o, s, c, i), i && l & 2048 && Vu(o.alternate, o);
+ Uu(a, o, s, c, i), i && l & 2048 && Bu(o.alternate, o);
break;
- default: Wu(a, o, s, c, i);
+ default: Uu(a, o, s, c, i);
}
t = t.sibling;
}
}
- function Gu(e, t) {
+ function Wu(e, t) {
if (t.subtreeFlags & 10256) for (t = t.child; t !== null;) {
var n = e, r = t, i = r.flags;
switch (r.tag) {
case 22:
- Gu(n, r), i & 2048 && Bu(r.alternate, r);
+ Wu(n, r), i & 2048 && zu(r.alternate, r);
break;
case 24:
- Gu(n, r), i & 2048 && Vu(r.alternate, r);
+ Wu(n, r), i & 2048 && Bu(r.alternate, r);
break;
- default: Gu(n, r);
+ default: Wu(n, r);
}
t = t.sibling;
}
}
- var Ku = 8192;
- function qu(e, t, n) {
- if (e.subtreeFlags & Ku) for (e = e.child; e !== null;) Ju(e, t, n), e = e.sibling;
+ var Gu = 8192;
+ function Ku(e, t, n) {
+ if (e.subtreeFlags & Gu) for (e = e.child; e !== null;) qu(e, t, n), e = e.sibling;
}
- function Ju(e, t, n) {
+ function qu(e, t, n) {
switch (e.tag) {
case 26:
- qu(e, t, n), e.flags & Ku && (e.memoizedState === null ? (e = e.stateNode, (t & 335544128) === t && oh(n, e)) : sh(n, ju, e.memoizedState, e.memoizedProps));
+ Ku(e, t, n), e.flags & Gu && (e.memoizedState === null ? (e = e.stateNode, (t & 335544128) === t && oh(n, e)) : sh(n, ju, e.memoizedState, e.memoizedProps));
break;
case 5:
- qu(e, t, n), e.flags & Ku && (e = e.stateNode, (t & 335544128) === t && oh(n, e));
+ Ku(e, t, n), e.flags & Gu && (e = e.stateNode, (t & 335544128) === t && oh(n, e));
break;
case 3:
case 4:
var r = ju;
- ju = km(e.stateNode.containerInfo), qu(e, t, n), ju = r;
+ ju = km(e.stateNode.containerInfo), Ku(e, t, n), ju = r;
break;
case 22:
- e.memoizedState === null && (r = e.alternate, r !== null && r.memoizedState !== null ? (r = Ku, Ku = 16777216, qu(e, t, n), Ku = r) : qu(e, t, n));
+ e.memoizedState === null && (r = e.alternate, r !== null && r.memoizedState !== null ? (r = Gu, Gu = 16777216, Ku(e, t, n), Gu = r) : Ku(e, t, n));
break;
case 30:
- if ((e.flags & Ku) !== 0 && (r = e.memoizedProps.name, r != null && r !== "auto")) {
+ if ((e.flags & Gu) !== 0 && (r = e.memoizedProps.name, r != null && r !== "auto")) {
var i = e.stateNode;
i.paired = null, Hl === null && (Hl = /* @__PURE__ */ new Map()), Hl.set(r, i);
}
- qu(e, t, n);
+ Ku(e, t, n);
break;
- default: qu(e, t, n);
+ default: Ku(e, t, n);
}
}
- function Yu(e) {
+ function Ju(e) {
var t = e.alternate;
if (t !== null && (e = t.child, e !== null)) {
t.child = null;
@@ -6153,62 +6153,62 @@ var k = /* @__PURE__ */ o(((e) => {
while (e !== null);
}
}
- function Xu(e) {
+ function Yu(e) {
var t = e.deletions;
if (e.flags & 16) {
if (t !== null) for (var n = 0; n < t.length; n++) {
var r = t[n];
- uu = r, $u(r, e);
+ uu = r, Qu(r, e);
}
- Yu(e);
+ Ju(e);
}
- if (e.subtreeFlags & 10256) for (e = e.child; e !== null;) Zu(e), e = e.sibling;
+ if (e.subtreeFlags & 10256) for (e = e.child; e !== null;) Xu(e), e = e.sibling;
}
- function Zu(e) {
+ function Xu(e) {
switch (e.tag) {
case 0:
case 11:
case 15:
- Xu(e), e.flags & 2048 && wl(9, e, e.return);
+ Yu(e), e.flags & 2048 && wl(9, e, e.return);
break;
case 3:
- Xu(e);
+ Yu(e);
break;
case 12:
- Xu(e);
+ Yu(e);
break;
case 22:
var t = e.stateNode;
- e.memoizedState !== null && t._visibility & 2 && (e.return === null || e.return.tag !== 13) ? (t._visibility &= -3, Qu(e)) : Xu(e);
+ e.memoizedState !== null && t._visibility & 2 && (e.return === null || e.return.tag !== 13) ? (t._visibility &= -3, Zu(e)) : Yu(e);
break;
- default: Xu(e);
+ default: Yu(e);
}
}
- function Qu(e) {
+ function Zu(e) {
var t = e.deletions;
if (e.flags & 16) {
if (t !== null) for (var n = 0; n < t.length; n++) {
var r = t[n];
- uu = r, $u(r, e);
+ uu = r, Qu(r, e);
}
- Yu(e);
+ Ju(e);
}
for (e = e.child; e !== null;) {
switch (t = e, t.tag) {
case 0:
case 11:
case 15:
- wl(8, t, t.return), Qu(t);
+ wl(8, t, t.return), Zu(t);
break;
case 22:
- n = t.stateNode, n._visibility & 2 && (n._visibility &= -3, Qu(t));
+ n = t.stateNode, n._visibility & 2 && (n._visibility &= -3, Zu(t));
break;
- default: Qu(t);
+ default: Zu(t);
}
e = e.sibling;
}
}
- function $u(e, t) {
+ function Qu(e, t) {
for (; uu !== null;) {
var n = uu;
switch (n.tag) {
@@ -6242,7 +6242,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
}
}
- var ed = {
+ var $u = {
getCacheForType: function(e) {
var t = Ca(ka), n = t.data.get(e);
return n === void 0 && (n = e(), t.data.set(e, n)), n;
@@ -6250,34 +6250,34 @@ var k = /* @__PURE__ */ o(((e) => {
cacheSignal: function() {
return Ca(ka).controller.signal;
}
- }, td = typeof WeakMap == "function" ? WeakMap : Map, nd = 0, rd = null, id = null, ad = 0, od = 0, sd = null, cd = !1, ld = !1, ud = !1, dd = 0, fd = 0, pd = 0, md = 0, hd = 0, gd = 0, _d = 0, vd = null, yd = null, bd = !1, xd = 0, Sd = 0, Cd = Infinity, wd = null, Td = null, Ed = 0, Dd = null, Od = null, kd = 0, Ad = 0, jd = null, Md = null, Nd = null, Pd = null, W = null, Fd = 0, Id = null;
+ }, ed = typeof WeakMap == "function" ? WeakMap : Map, td = 0, nd = null, rd = null, id = 0, ad = 0, od = null, sd = !1, cd = !1, ld = !1, ud = 0, dd = 0, fd = 0, pd = 0, md = 0, hd = 0, gd = 0, _d = null, vd = null, yd = !1, bd = 0, xd = 0, Sd = Infinity, Cd = null, wd = null, Td = 0, Ed = null, Dd = null, Od = 0, kd = 0, Ad = null, jd = null, Md = null, Nd = null, Pd = null, Fd = 0, Id = null;
function Ld() {
- return nd & 2 && ad !== 0 ? ad & -ad : he.T === null ? xt() : Vf();
+ return td & 2 && id !== 0 ? id & -id : he.T === null ? xt() : Vf();
}
function Rd() {
- if (gd === 0) {
- if (!(ad & 536870912) || na) {
+ if (hd === 0) {
+ if (!(id & 536870912) || na) {
var e = at;
- at <<= 1, !(at & 3932160) && (at = 262144), gd = e;
- } else gd = 536870912;
+ at <<= 1, !(at & 3932160) && (at = 262144), hd = e;
+ } else hd = 536870912;
}
- return e = ko.current, e !== null && (e.flags |= 32), gd;
+ return e = ko.current, e !== null && (e.flags |= 32), hd;
}
function zd(e, t) {
if (t != null) {
var n = e.stateNode, r = n.ref;
- r === null && (r = n.ref = Up(mi(e.memoizedProps, n))), Pd === null && (Pd = []), Pd.push(t.bind(null, r));
+ r === null && (r = n.ref = Up(mi(e.memoizedProps, n))), Nd === null && (Nd = []), Nd.push(t.bind(null, r));
}
}
function Bd(e, t, n) {
- (e === rd && (od === 2 || od === 9) || e.cancelPendingCommit !== null) && (qd(e, 0), Wd(e, ad, gd, !1)), mt(e, n), nd & 2 && e === rd || (e === rd && (!(nd & 2) && (md |= n), fd === 4 && Wd(e, ad, gd, !1)), Nf(e));
+ (e === nd && (ad === 2 || ad === 9) || e.cancelPendingCommit !== null) && (qd(e, 0), Wd(e, id, hd, !1)), mt(e, n), td & 2 && e === nd || (e === nd && (!(td & 2) && (pd |= n), dd === 4 && Wd(e, id, hd, !1)), Nf(e));
}
function Vd(e, t, n) {
- if (nd & 6) throw Error(i(327));
+ if (td & 6) throw Error(i(327));
var r = !n && !(t & 127) && (t & e.expiredLanes) === 0 || lt(e, t), a = r ? tf(e, t) : $d(e, t, !0), o = r;
do {
if (a === 0) {
- ld && !r && Wd(e, t, 0, !1);
+ cd && !r && Wd(e, t, 0, !1);
break;
}
if (n = e.current.alternate, o && !Ud(n)) a = $d(e, t, !1), o = !1;
@@ -6289,14 +6289,14 @@ var k = /* @__PURE__ */ o(((e) => {
t = s;
a: {
var c = e;
- a = vd;
+ a = _d;
var l = c.current.memoizedState.isDehydrated;
if (l && (qd(c, s).flags |= 256), s = $d(c, s, !1), s !== 2 && s !== 6) {
- if (ud && !l) {
- c.errorRecoveryDisabledLanes |= o, md |= o, a = 4;
+ if (ld && !l) {
+ c.errorRecoveryDisabledLanes |= o, pd |= o, a = 4;
break a;
}
- o = yd, yd = a, o !== null && (yd === null ? yd = o : yd.push.apply(yd, o));
+ o = vd, vd = a, o !== null && (vd === null ? vd = o : vd.push.apply(vd, o));
}
a = s;
}
@@ -6313,21 +6313,21 @@ var k = /* @__PURE__ */ o(((e) => {
case 1: throw Error(i(345));
case 4: if ((t & 4194048) !== t && (t & 62914560) !== t) break;
case 6:
- Wd(r, t, gd, !cd);
+ Wd(r, t, hd, !sd);
break a;
case 2:
- yd = null;
+ vd = null;
break;
case 3:
case 5: break;
default: throw Error(i(329));
}
- if ((t & 62914560) === t && (a = xd + 300 - He(), 10 < a)) {
- if (Wd(r, t, gd, !cd), ct(r, 0, !0) !== 0) break a;
- kd = t, r.timeoutHandle = Tp(Hd.bind(null, r, n, yd, wd, bd, t, gd, md, _d, cd, o, "Throttled", -0, 0), a);
+ if ((t & 62914560) === t && (a = bd + 300 - He(), 10 < a)) {
+ if (Wd(r, t, hd, !sd), ct(r, 0, !0) !== 0) break a;
+ Od = t, r.timeoutHandle = Tp(Hd.bind(null, r, n, vd, Cd, yd, t, hd, pd, gd, sd, o, "Throttled", -0, 0), a);
break a;
}
- Hd(r, n, yd, wd, bd, t, gd, md, _d, cd, o, null, -0, 0);
+ Hd(r, n, vd, Cd, yd, t, hd, pd, gd, sd, o, null, -0, 0);
}
break;
}
@@ -6345,8 +6345,8 @@ var k = /* @__PURE__ */ o(((e) => {
suspenseyImages: [],
waitingForImages: !0,
waitingForViewTransition: !1,
- unsuspend: vn
- }, Hl = null, Ju(t, a, d), h && (m = d, h = e.containerInfo, h = (h.nodeType === 9 ? h : h.ownerDocument).__reactViewTransition, h != null && (m.count++, m.waitingForViewTransition = !0, m = dh.bind(m), h.finished.then(m, m))), m = (a & 62914560) === a ? xd - He() : (a & 4194048) === a ? Sd - He() : 0, m = lh(d, m), m !== null) ? (kd = a, e.cancelPendingCommit = m(lf.bind(null, e, t, a, n, r, i, o, s, c, l, u, d, null, f, p)), Wd(e, a, o, !l)) : lf(e, t, a, n, r, i, o, s, c, l, u, d);
+ unsuspend: L
+ }, Hl = null, qu(t, a, d), h && (m = d, h = e.containerInfo, h = (h.nodeType === 9 ? h : h.ownerDocument).__reactViewTransition, h != null && (m.count++, m.waitingForViewTransition = !0, m = dh.bind(m), h.finished.then(m, m))), m = (a & 62914560) === a ? bd - He() : (a & 4194048) === a ? xd - He() : 0, m = lh(d, m), m !== null) ? (Od = a, e.cancelPendingCommit = m(lf.bind(null, e, t, a, n, r, i, o, s, c, l, u, d, null, f, p)), Wd(e, a, o, !l)) : lf(e, t, a, n, r, i, o, s, c, l, u, d);
}
function Ud(e) {
for (var t = e;;) {
@@ -6373,7 +6373,7 @@ var k = /* @__PURE__ */ o(((e) => {
return !0;
}
function Wd(e, t, n, r) {
- t = ut(e, t), t &= ~hd, t &= ~md, e.suspendedLanes |= t, e.pingedLanes &= ~t, r && (e.warmLanes |= t), r = e.expirationTimes;
+ t = ut(e, t), t &= ~md, t &= ~pd, e.suspendedLanes |= t, e.pingedLanes &= ~t, r && (e.warmLanes |= t), r = e.expirationTimes;
for (var i = t; 0 < i;) {
var a = 31 - et(i), o = 1 << a;
r[a] = -1, i &= ~o;
@@ -6381,26 +6381,26 @@ var k = /* @__PURE__ */ o(((e) => {
n !== 0 && gt(e, n, t);
}
function Gd() {
- return nd & 6 ? !0 : (Pf(0, !1), !1);
+ return td & 6 ? !0 : (Pf(0, !1), !1);
}
function Kd() {
- if (id !== null) {
- if (od === 0) var e = id.return;
- else e = id, ha = ma = null, as(e), ro = null, io = 0, e = id;
+ if (rd !== null) {
+ if (ad === 0) var e = rd.return;
+ else e = rd, ha = ma = null, as(e), ro = null, io = 0, e = rd;
for (; e !== null;) Sl(e.alternate, e), e = e.return;
- id = null;
+ rd = null;
}
}
function qd(e, t) {
var n = e.timeoutHandle;
- return n !== -1 && (e.timeoutHandle = -1, Ep(n)), n = e.cancelPendingCommit, n !== null && (e.cancelPendingCommit = null, n()), kd = 0, Kd(), rd = e, id = n = ji(e.current, null), ad = t, od = 0, sd = null, cd = !1, ld = lt(e, t), ud = !1, _d = gd = hd = md = pd = fd = 0, yd = vd = null, bd = !1, dd = ut(e, t), xi(), n;
+ return n !== -1 && (e.timeoutHandle = -1, Ep(n)), n = e.cancelPendingCommit, n !== null && (e.cancelPendingCommit = null, n()), Od = 0, Kd(), nd = e, rd = n = ji(e.current, null), id = t, ad = 0, od = null, sd = !1, cd = lt(e, t), ld = !1, gd = hd = md = pd = fd = dd = 0, vd = _d = null, yd = !1, ud = ut(e, t), xi(), n;
}
function Jd(e, t) {
- Vo = null, he.H = hc, t === qa || t === Ya ? (t = to(), od = 3) : t === Ja ? (t = to(), od = 4) : od = t === Nc ? 8 : typeof t == "object" && t && typeof t.then == "function" ? 6 : 1, sd = t, id === null && (fd = 1, Dc(e, zi(t, e.current)));
+ Vo = null, he.H = hc, t === qa || t === Ya ? (t = to(), ad = 3) : t === Ja ? (t = to(), ad = 4) : ad = t === Nc ? 8 : typeof t == "object" && t && typeof t.then == "function" ? 6 : 1, od = t, rd === null && (dd = 1, Dc(e, zi(t, e.current)));
}
function Yd() {
var e = ko.current;
- return e === null ? !0 : (ad & 4194048) === ad ? Ao === null : (ad & 62914560) === ad || ad & 536870912 ? e === Ao : !1;
+ return e === null ? !0 : (id & 4194048) === id ? Ao === null : (id & 62914560) === id || id & 536870912 ? e === Ao : !1;
}
function Xd() {
var e = he.H;
@@ -6408,22 +6408,22 @@ var k = /* @__PURE__ */ o(((e) => {
}
function Zd() {
var e = he.A;
- return he.A = ed, e;
+ return he.A = $u, e;
}
function Qd() {
- fd = 4, cd || (ad & 4194048) !== ad && ko.current !== null || (ld = !0), !(pd & 134217727) && !(md & 134217727) || rd === null || Wd(rd, ad, gd, !1);
+ dd = 4, sd || (id & 4194048) !== id && ko.current !== null || (cd = !0), !(fd & 134217727) && !(pd & 134217727) || nd === null || Wd(nd, id, hd, !1);
}
function $d(e, t, n) {
- var r = nd;
- nd |= 2;
+ var r = td;
+ td |= 2;
var i = Xd(), a = Zd();
- (rd !== e || ad !== t) && (wd = null, qd(e, t)), t = !1;
- var o = fd;
+ (nd !== e || id !== t) && (Cd = null, qd(e, t)), t = !1;
+ var o = dd;
a: do
try {
- if (od !== 0 && id !== null) {
- var s = id, c = sd;
- switch (od) {
+ if (ad !== 0 && rd !== null) {
+ var s = rd, c = od;
+ switch (ad) {
case 8:
Kd(), o = 6;
break a;
@@ -6432,84 +6432,84 @@ var k = /* @__PURE__ */ o(((e) => {
case 9:
case 6:
ko.current === null && (t = !0);
- var l = od;
- if (od = 0, sd = null, of(e, s, c, l), n && ld) {
+ var l = ad;
+ if (ad = 0, od = null, of(e, s, c, l), n && cd) {
o = 0;
break a;
}
break;
- default: l = od, od = 0, sd = null, of(e, s, c, l);
+ default: l = ad, ad = 0, od = null, of(e, s, c, l);
}
}
- ef(), o = fd;
+ ef(), o = dd;
break;
} catch (t) {
Jd(e, t);
}
while (1);
- return t && e.shellSuspendCounter++, ha = ma = null, nd = r, he.H = i, he.A = a, id === null && (rd = null, ad = 0, xi()), o;
+ return t && e.shellSuspendCounter++, ha = ma = null, td = r, he.H = i, he.A = a, rd === null && (nd = null, id = 0, xi()), o;
}
function ef() {
- for (; id !== null;) rf(id);
+ for (; rd !== null;) rf(rd);
}
function tf(e, t) {
- var n = nd;
- nd |= 2;
+ var n = td;
+ td |= 2;
var r = Xd(), a = Zd();
- rd !== e || ad !== t ? (wd = null, Cd = He() + 500, qd(e, t)) : ld = lt(e, t);
+ nd !== e || id !== t ? (Cd = null, Sd = He() + 500, qd(e, t)) : cd = lt(e, t);
a: do
try {
- if (od !== 0 && id !== null) {
- t = id;
- var o = sd;
- b: switch (od) {
+ if (ad !== 0 && rd !== null) {
+ t = rd;
+ var o = od;
+ b: switch (ad) {
case 1:
- od = 0, sd = null, of(e, t, o, 1);
+ ad = 0, od = null, of(e, t, o, 1);
break;
case 2:
case 9:
if (Za(o)) {
- od = 0, sd = null, af(t);
+ ad = 0, od = null, af(t);
break;
}
t = function() {
- od !== 2 && od !== 9 || rd !== e || (od = 7), Nf(e);
+ ad !== 2 && ad !== 9 || nd !== e || (ad = 7), Nf(e);
}, o.then(t, t);
break a;
case 3:
- od = 7;
+ ad = 7;
break a;
case 4:
- od = 5;
+ ad = 5;
break a;
case 7:
- Za(o) ? (od = 0, sd = null, af(t)) : (od = 0, sd = null, of(e, t, o, 7));
+ Za(o) ? (ad = 0, od = null, af(t)) : (ad = 0, od = null, of(e, t, o, 7));
break;
case 5:
var s = null;
- switch (id.tag) {
- case 26: s = id.memoizedState;
+ switch (rd.tag) {
+ case 26: s = rd.memoizedState;
case 5:
case 27:
- var c = id;
+ var c = rd;
if (s ? ih(s) : c.stateNode.complete) {
- od = 0, sd = null;
+ ad = 0, od = null;
var l = c.sibling;
- if (l !== null) id = l;
+ if (l !== null) rd = l;
else {
var u = c.return;
- u === null ? id = null : (id = u, sf(u));
+ u === null ? rd = null : (rd = u, sf(u));
}
break b;
}
}
- od = 0, sd = null, of(e, t, o, 5);
+ ad = 0, od = null, of(e, t, o, 5);
break;
case 6:
- od = 0, sd = null, of(e, t, o, 6);
+ ad = 0, od = null, of(e, t, o, 6);
break;
case 8:
- Kd(), fd = 6;
+ Kd(), dd = 6;
break a;
default: throw Error(i(462));
}
@@ -6520,128 +6520,128 @@ var k = /* @__PURE__ */ o(((e) => {
Jd(e, t);
}
while (1);
- return ha = ma = null, he.H = r, he.A = a, nd = n, id === null ? (rd = null, ad = 0, xi(), fd) : 0;
+ return ha = ma = null, he.H = r, he.A = a, td = n, rd === null ? (nd = null, id = 0, xi(), dd) : 0;
}
function nf() {
- for (; id !== null && !Be();) rf(id);
+ for (; rd !== null && !Be();) rf(rd);
}
function rf(e) {
- var t = pl(e.alternate, e, dd);
- e.memoizedProps = e.pendingProps, t === null ? sf(e) : id = t;
+ var t = pl(e.alternate, e, ud);
+ e.memoizedProps = e.pendingProps, t === null ? sf(e) : rd = t;
}
function af(e) {
var t = e, n = t.alternate;
switch (t.tag) {
case 15:
case 0:
- t = qc(n, t, t.pendingProps, t.type, void 0, ad);
+ t = qc(n, t, t.pendingProps, t.type, void 0, id);
break;
case 11:
- t = qc(n, t, t.pendingProps, t.type.render, t.ref, ad);
+ t = qc(n, t, t.pendingProps, t.type.render, t.ref, id);
break;
case 5:
as(t);
var r = t;
r === ea && (na ? (ca(r), r.tag === 5 && r.stateNode != null && (ta = r.stateNode)) : (ca(r), na = !0));
- default: Sl(n, t), t = id = Mi(t, dd), t = pl(n, t, dd);
+ default: Sl(n, t), t = rd = Mi(t, ud), t = pl(n, t, ud);
}
- e.memoizedProps = e.pendingProps, t === null ? sf(e) : id = t;
+ e.memoizedProps = e.pendingProps, t === null ? sf(e) : rd = t;
}
function of(e, t, n, r) {
ha = ma = null, as(t), ro = null, io = 0;
var i = t.return;
try {
- if (Mc(e, i, t, n, ad)) {
- fd = 1, Dc(e, zi(n, e.current)), id = null;
+ if (Mc(e, i, t, n, id)) {
+ dd = 1, Dc(e, zi(n, e.current)), rd = null;
return;
}
} catch (t) {
- if (i !== null) throw id = i, t;
- fd = 1, Dc(e, zi(n, e.current)), id = null;
+ if (i !== null) throw rd = i, t;
+ dd = 1, Dc(e, zi(n, e.current)), rd = null;
return;
}
- t.flags & 32768 ? (na || r === 1 ? e = !0 : ld || ad & 536870912 ? e = !1 : (cd = e = !0, (r === 2 || r === 9 || r === 3 || r === 6) && (r = ko.current, r !== null && r.tag === 13 && (r.flags |= 16384))), cf(t, e)) : sf(t);
+ t.flags & 32768 ? (na || r === 1 ? e = !0 : cd || id & 536870912 ? e = !1 : (sd = e = !0, (r === 2 || r === 9 || r === 3 || r === 6) && (r = ko.current, r !== null && r.tag === 13 && (r.flags |= 16384))), cf(t, e)) : sf(t);
}
function sf(e) {
var t = e;
do {
if (t.flags & 32768) {
- cf(t, cd);
+ cf(t, sd);
return;
}
e = t.return;
- var n = bl(t.alternate, t, dd);
+ var n = bl(t.alternate, t, ud);
if (n !== null) {
- id = n;
+ rd = n;
return;
}
if (t = t.sibling, t !== null) {
- id = t;
+ rd = t;
return;
}
- id = t = e;
+ rd = t = e;
} while (t !== null);
- fd === 0 && (fd = 5);
+ dd === 0 && (dd = 5);
}
function cf(e, t) {
do {
var n = xl(e.alternate, e);
if (n !== null) {
- n.flags &= 32767, id = n;
+ n.flags &= 32767, rd = n;
return;
}
if (n = e.return, n !== null && (n.flags |= 32768, n.subtreeFlags = 0, n.deletions = null), !t && (e = e.sibling, e !== null)) {
- id = e;
+ rd = e;
return;
}
- id = e = n;
+ rd = e = n;
} while (e !== null);
- fd = 6, id = null;
+ dd = 6, rd = null;
}
function lf(e, t, n, r, a, o, s, c, l, u, d, f) {
e.cancelPendingCommit = null;
do
_f();
- while (Ed !== 0);
- if (nd & 6) throw Error(i(327));
+ while (Td !== 0);
+ if (td & 6) throw Error(i(327));
if (t !== null) {
if (t === e.current) throw Error(i(177));
- e === rd && (id = rd = null, ad = 0), Od = t, Dd = e, kd = n, jd = a, Md = r, uf(e, t, n, s, c, l, f);
+ e === nd && (rd = nd = null, id = 0), Dd = t, Ed = e, Od = n, Ad = a, jd = r, uf(e, t, n, s, c, l, f);
}
}
function uf(e, t, n, r, i, a, o) {
var s = t.lanes | t.childLanes;
- if (Ad = s, s |= bi, ht(e, n, s, r, i, a), Pd = null, (n & 335544064) === n ? (W = Pa(e), r = 10262) : (W = null, r = 10256), (t.subtreeFlags & r) !== 0 || (t.flags & r) !== 0 ? (e.callbackNode = null, e.callbackPriority = 0, Ef(Ke, function() {
+ if (kd = s, s |= bi, ht(e, n, s, r, i, a), Nd = null, (n & 335544064) === n ? (Pd = Pa(e), r = 10262) : (Pd = null, r = 10256), (t.subtreeFlags & r) !== 0 || (t.flags & r) !== 0 ? (e.callbackNode = null, e.callbackPriority = 0, Ef(Ke, function() {
return vf(), null;
})) : (e.callbackNode = null, e.callbackPriority = 0), Vl = !1, r = !!(t.flags & 13878), t.subtreeFlags & 13878 || r) {
- r = he.T, he.T = null, i = I.p, I.p = 2, a = nd, nd |= 4;
+ r = he.T, he.T = null, i = I.p, I.p = 2, a = td, td |= 4;
try {
hu(e, t, n);
} finally {
- nd = a, I.p = i, he.T = r;
+ td = a, I.p = i, he.T = r;
}
}
- Ed = 1, Vl ? Nd = Vp(o, e.containerInfo, W, pf, mf, ff, hf, vf, df, null, null) : (pf(), mf(), hf());
+ Td = 1, Vl ? Md = Vp(o, e.containerInfo, Pd, pf, mf, ff, hf, vf, df, null, null) : (pf(), mf(), hf());
}
function df(e) {
- if (Ed !== 0) {
- var t = Dd.onRecoverableError;
+ if (Td !== 0) {
+ var t = Ed.onRecoverableError;
t(e, { componentStack: null });
}
}
function ff() {
- Ed === 3 && (Ed = 0, Iu(Od, Dd), Ed = 4);
+ Td === 3 && (Td = 0, Fu(Dd, Ed), Td = 4);
}
function pf() {
- if (Ed === 1) {
- Ed = 0;
- var e = Dd, t = Od, n = kd, r = !!(t.flags & 13878);
+ if (Td === 1) {
+ Td = 0;
+ var e = Ed, t = Dd, n = Od, r = !!(t.flags & 13878);
if (t.subtreeFlags & 13878 || r) {
r = he.T, he.T = null;
var i = I.p;
I.p = 2;
- var a = nd;
- nd |= 4;
+ var a = td;
+ td |= 4;
try {
fu = pu = !1, Mu(t, e, n), n = _p;
var o = Wr(e.containerInfo), s = n.focusedElem, c = n.selectionRange;
@@ -6674,38 +6674,38 @@ var k = /* @__PURE__ */ o(((e) => {
}
Th = !!gp, _p = gp = null;
} finally {
- nd = a, I.p = i, he.T = r;
+ td = a, I.p = i, he.T = r;
}
}
- e.current = t, Ed = 2;
+ e.current = t, Td = 2;
}
}
function mf() {
- if (Ed === 2) {
- Ed = 0;
- var e = Dd, t = Od, n = !!(t.flags & 8772);
+ if (Td === 2) {
+ Td = 0;
+ var e = Ed, t = Dd, n = !!(t.flags & 8772);
if (t.subtreeFlags & 8772 || n) {
n = he.T, he.T = null;
var r = I.p;
I.p = 2;
- var i = nd;
- nd |= 4;
+ var i = td;
+ td |= 4;
try {
_u(e, t.alternate, t);
} finally {
- nd = i, I.p = r, he.T = n;
+ td = i, I.p = r, he.T = n;
}
}
- Ed = 3;
+ Td = 3;
}
}
function hf() {
- if (Ed === 4 || Ed === 3) {
- Ed = 0;
- var e = Nd;
- Nd = null, Ve();
- var t = Dd, n = Od, r = kd, i = Md, a = (r & 335544064) === r ? 10262 : 10256;
- if ((n.subtreeFlags & a) !== 0 || (n.flags & a) !== 0 ? Ed = 5 : (Ed = 0, Od = Dd = null, gf(t, t.pendingLanes)), a = t.pendingLanes, a === 0 && (Td = null), bt(r), n = n.stateNode, Qe && typeof Qe.onCommitFiberRoot == "function") try {
+ if (Td === 4 || Td === 3) {
+ Td = 0;
+ var e = Md;
+ Md = null, Ve();
+ var t = Ed, n = Dd, r = Od, i = jd, a = (r & 335544064) === r ? 10262 : 10256;
+ if ((n.subtreeFlags & a) !== 0 || (n.flags & a) !== 0 ? Td = 5 : (Td = 0, Dd = Ed = null, gf(t, t.pendingLanes)), a = t.pendingLanes, a === 0 && (wd = null), bt(r), n = n.stateNode, Qe && typeof Qe.onCommitFiberRoot == "function") try {
Qe.onCommitFiberRoot(Ze, n, void 0, (n.current.flags & 128) == 128);
} catch {}
if (i !== null) {
@@ -6719,27 +6719,27 @@ var k = /* @__PURE__ */ o(((e) => {
he.T = n, I.p = a;
}
}
- if (i = Pd, o = W, W = null, i !== null && (Pd = null, o === null && (o = []), e !== null)) for (c = 0; c < i.length; c++) n = (0, i[c])(o), n !== void 0 && e.finished.finally(n);
- kd & 3 && _f(), Nf(t), a = t.pendingLanes, r & 261930 && a & 42 ? t === Id ? Fd++ : (Fd = 0, Id = t) : (Fd = 0, Id = null), Pf(0, !1);
+ if (i = Nd, o = Pd, Pd = null, i !== null && (Nd = null, o === null && (o = []), e !== null)) for (c = 0; c < i.length; c++) n = (0, i[c])(o), n !== void 0 && e.finished.finally(n);
+ Od & 3 && _f(), Nf(t), a = t.pendingLanes, r & 261930 && a & 42 ? t === Id ? Fd++ : (Fd = 0, Id = t) : (Fd = 0, Id = null), Pf(0, !1);
}
}
function gf(e, t) {
(e.pooledCacheLanes &= t) === 0 && (t = e.pooledCache, t != null && (e.pooledCache = null, ja(t)));
}
function _f() {
- return Nd !== null && (Nd.skipTransition(), Nd = null), pf(), mf(), hf(), vf();
+ return Md !== null && (Md.skipTransition(), Md = null), pf(), mf(), hf(), vf();
}
function vf() {
- if (Ed !== 5) return !1;
- var e = Dd, t = Ad;
- Ad = 0;
- var n = bt(kd), r = he.T, a = I.p;
+ if (Td !== 5) return !1;
+ var e = Ed, t = kd;
+ kd = 0;
+ var n = bt(Od), r = he.T, a = I.p;
try {
- I.p = 32 > n ? 32 : n, he.T = null, n = jd, jd = null;
- var o = Dd, s = kd;
- if (Ed = 0, Od = Dd = null, kd = 0, nd & 6) throw Error(i(331));
- var c = nd;
- if (nd |= 4, Zu(o.current), Uu(o, o.current, s, n), nd = c, Pf(0, !1), Qe && typeof Qe.onPostCommitFiberRoot == "function") try {
+ I.p = 32 > n ? 32 : n, he.T = null, n = Ad, Ad = null;
+ var o = Ed, s = Od;
+ if (Td = 0, Dd = Ed = null, Od = 0, td & 6) throw Error(i(331));
+ var c = td;
+ if (td |= 4, Xu(o.current), Hu(o, o.current, s, n), td = c, Pf(0, !1), Qe && typeof Qe.onPostCommitFiberRoot == "function") try {
Qe.onPostCommitFiberRoot(Ze, o);
} catch {}
return !0;
@@ -6759,7 +6759,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
if (t.tag === 1) {
var r = t.stateNode;
- if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (Td === null || !Td.has(r))) {
+ if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (wd === null || !wd.has(r))) {
e = zi(n, e), n = Ac(2), r = go(t, n, 2), r !== null && (jc(n, r, t, e), mt(r, 2), Nf(r));
break;
}
@@ -6770,15 +6770,15 @@ var k = /* @__PURE__ */ o(((e) => {
function xf(e, t, n) {
var r = e.pingCache;
if (r === null) {
- r = e.pingCache = new td();
+ r = e.pingCache = new ed();
var i = /* @__PURE__ */ new Set();
r.set(t, i);
} else i = r.get(t), i === void 0 && (i = /* @__PURE__ */ new Set(), r.set(t, i));
- i.has(n) || (ud = !0, i.add(n), e = Sf.bind(null, e, t, n), t.then(e, e));
+ i.has(n) || (ld = !0, i.add(n), e = Sf.bind(null, e, t, n), t.then(e, e));
}
function Sf(e, t, n) {
var r = e.pingCache;
- r !== null && r.delete(t), e.pingedLanes |= e.suspendedLanes & n, e.warmLanes &= ~n, rd === e && (ad & n) === n && (fd === 4 || fd === 3 && (ad & 62914560) === ad && 300 > He() - xd ? nd & 2 ? hd |= n : qd(e, 0) : hd |= n, _d === ad && (_d = 0)), Nf(e);
+ r !== null && r.delete(t), e.pingedLanes |= e.suspendedLanes & n, e.warmLanes &= ~n, nd === e && (id & n) === n && (dd === 4 || dd === 3 && (id & 62914560) === id && 300 > He() - bd ? td & 2 ? md |= n : qd(e, 0) : md |= n, gd === id && (gd = 0)), Nf(e);
}
function Cf(e, t) {
t === 0 && (t = ft()), e = wi(e, t), e !== null && (mt(e, t), Nf(e));
@@ -6826,7 +6826,7 @@ var k = /* @__PURE__ */ o(((e) => {
a = (1 << 31 - et(42 | e) + 1) - 1, a &= i & ~(o & ~s), a = a & 201326741 ? a & 201326741 | 1 : a ? a | 2 : 0;
}
a !== 0 && (n = !0, zf(r, a));
- } else a = ad, a = ct(r, r === rd ? a : 0, r.cancelPendingCommit !== null || r.timeoutHandle !== -1), !(a & 3) || lt(r, a) || (n = !0, zf(r, a));
+ } else a = id, a = ct(r, r === nd ? a : 0, r.cancelPendingCommit !== null || r.timeoutHandle !== -1), !(a & 3) || lt(r, a) || (n = !0, zf(r, a));
}
r = r.next;
}
@@ -6845,14 +6845,14 @@ var k = /* @__PURE__ */ o(((e) => {
var i = r.next, a = Lf(r, t);
a === 0 ? (r.next = null, n === null ? Df = i : n.next = i, i === null && (Of = n)) : (n = r, (e !== 0 || a & 3) && (Af = !0)), r = i;
}
- Ed !== 0 && Ed !== 5 || Pf(e, !1), Mf !== 0 && (Mf = 0);
+ Td !== 0 && Td !== 5 || Pf(e, !1), Mf !== 0 && (Mf = 0);
}
function Lf(e, t) {
for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, a = e.pendingLanes & -62914561; 0 < a;) {
var o = 31 - et(a), s = 1 << o, c = i[o];
c === -1 ? ((s & n) === 0 || (s & r) !== 0) && (i[o] = dt(s, t)) : c <= t && (e.expiredLanes |= s), a &= ~s;
}
- if (t = rd, n = ad, n = ct(e, e === t ? n : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1), r = e.callbackNode, n === 0 || e === t && (od === 2 || od === 9) || e.cancelPendingCommit !== null) return r !== null && r !== null && ze(r), e.callbackNode = null, e.callbackPriority = 0;
+ if (t = nd, n = id, n = ct(e, e === t ? n : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1), r = e.callbackNode, n === 0 || e === t && (ad === 2 || ad === 9) || e.cancelPendingCommit !== null) return r !== null && r !== null && ze(r), e.callbackNode = null, e.callbackPriority = 0;
if (!(n & 3) || lt(e, n)) {
if (t = n & -n, t === e.callbackPriority) return t;
switch (r !== null && ze(r), bt(n)) {
@@ -6873,11 +6873,11 @@ var k = /* @__PURE__ */ o(((e) => {
return r !== null && r !== null && ze(r), e.callbackPriority = 2, e.callbackNode = null, 2;
}
function Rf(e, t) {
- if (Ed !== 0 && Ed !== 5) return e.callbackNode = null, e.callbackPriority = 0, null;
+ if (Td !== 0 && Td !== 5) return e.callbackNode = null, e.callbackPriority = 0, null;
var n = e.callbackNode;
if (_f() && e.callbackNode !== n) return null;
- var r = ad;
- return r = ct(e, e === rd ? r : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1), r === 0 ? null : (Vd(e, r, t), Lf(e, He()), e.callbackNode != null && e.callbackNode === n ? Rf.bind(null, e) : null);
+ var r = id;
+ return r = ct(e, e === nd ? r : 0, e.cancelPendingCommit !== null || e.timeoutHandle !== -1), r === 0 ? null : (Vd(e, r, t), Lf(e, He()), e.callbackNode != null && e.callbackNode === n ? Rf.bind(null, e) : null);
}
function zf(e, t) {
if (_f()) return null;
@@ -6885,7 +6885,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
function Bf() {
kp(function() {
- nd & 6 ? Re(We, Ff) : If();
+ td & 6 ? Re(We, Ff) : If();
});
}
function Vf() {
@@ -6896,7 +6896,7 @@ var k = /* @__PURE__ */ o(((e) => {
return Mf;
}
function Hf(e) {
- return e == null || typeof e == "symbol" || typeof e == "boolean" ? null : typeof e == "function" ? e : _n(e);
+ return e == null || typeof e == "symbol" || typeof e == "boolean" ? null : typeof e == "function" ? e : bn(e);
}
function Uf(e, t, n, r, i) {
if (t === "submit" && n && n.stateNode === i) {
@@ -7002,7 +7002,7 @@ var k = /* @__PURE__ */ o(((e) => {
break;
default: i = Oh;
}
- n = i.bind(null, t, n, e), i = void 0, !On || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (i = !0), r ? i === void 0 ? e.addEventListener(t, n, !0) : e.addEventListener(t, n, {
+ n = i.bind(null, t, n, e), i = void 0, !kn || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (i = !0), r ? i === void 0 ? e.addEventListener(t, n, !0) : e.addEventListener(t, n, {
capture: !0,
passive: i
}) : i === void 0 ? e.addEventListener(t, n, !1) : e.addEventListener(t, n, { passive: i });
@@ -7031,8 +7031,8 @@ var k = /* @__PURE__ */ o(((e) => {
}
r = r.return;
}
- Tn(function() {
- var r = a, i = bn(n), s = [];
+ En(function() {
+ var r = a, i = xn(n), s = [];
a: {
var c = ui.get(e);
if (c !== void 0) {
@@ -7041,17 +7041,17 @@ var k = /* @__PURE__ */ o(((e) => {
case "keypress": if (Pn(n) === 0) break a;
case "keydown":
case "keyup":
- l = er;
+ l = rr;
break;
case "focusin":
- u = "focus", l = Kn;
+ u = "focus", l = Jn;
break;
case "focusout":
- u = "blur", l = Kn;
+ u = "blur", l = Jn;
break;
case "beforeblur":
case "afterblur":
- l = Kn;
+ l = Jn;
break;
case "click": if (n.button === 2) break a;
case "auxclick":
@@ -7062,7 +7062,7 @@ var k = /* @__PURE__ */ o(((e) => {
case "mouseout":
case "mouseover":
case "contextmenu":
- l = V;
+ l = Kn;
break;
case "drag":
case "dragend":
@@ -7072,33 +7072,33 @@ var k = /* @__PURE__ */ o(((e) => {
case "dragover":
case "dragstart":
case "drop":
- l = Gn;
+ l = qn;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
- l = rr;
+ l = B;
break;
case ri:
case ii:
case ai:
- l = qn;
+ l = Yn;
break;
case li:
- l = ir;
+ l = V;
break;
case "scroll":
case "scrollend":
l = Vn;
break;
case "wheel":
- l = ar;
+ l = or;
break;
case "copy":
case "cut":
case "paste":
- l = Jn;
+ l = Xn;
break;
case "gotpointercapture":
case "lostpointercapture":
@@ -7108,19 +7108,19 @@ var k = /* @__PURE__ */ o(((e) => {
case "pointerout":
case "pointerover":
case "pointerup":
- l = tr;
+ l = ir;
break;
case "submit":
- l = nr;
+ l = ar;
break;
case "toggle":
- case "beforetoggle": l = or;
+ case "beforetoggle": l = sr;
}
var d = !!(t & 4), f = !d && (e === "scroll" || e === "scrollend"), p = d ? c === null ? null : c + "Capture" : c;
d = [];
for (var m = r, h; m !== null;) {
var g = m;
- if (h = g.stateNode, g = g.tag, g !== 5 && g !== 26 && g !== 27 || h === null || p === null || (g = En(m, p), g != null && d.push(tp(m, g, h))), f) break;
+ if (h = g.stateNode, g = g.tag, g !== 5 && g !== 26 && g !== 27 || h === null || p === null || (g = Dn(m, p), g != null && d.push(tp(m, g, h))), f) break;
m = m.return;
}
0 < d.length && (c = new l(c, u, null, n, i), s.push({
@@ -7131,8 +7131,8 @@ var k = /* @__PURE__ */ o(((e) => {
}
if (!(t & 7)) {
a: {
- if (l = e === "mouseover" || e === "pointerover", c = e === "mouseout" || e === "pointerout", l && n !== yn && (u = n.relatedTarget || n.fromElement) && (Pt(u) || u[Et])) break a;
- (c || l) && (u = i.window === i ? i : (l = i.ownerDocument) ? l.defaultView || l.parentWindow : window, c ? (l = n.relatedTarget || n.toElement, c = r, l = l ? Pt(l) : null, l !== null && (f = o(l), d = l.tag, l !== f || d !== 5 && d !== 27 && d !== 6) && (l = null)) : (c = null, l = r), c !== l && (d = V, g = "onMouseLeave", p = "onMouseEnter", m = "mouse", (e === "pointerout" || e === "pointerover") && (d = tr, g = "onPointerLeave", p = "onPointerEnter", m = "pointer"), f = c == null ? u : It(c), h = l == null ? u : It(l), u = new d(g, m + "leave", c, n, i), u.target = f, u.relatedTarget = h, g = null, Pt(i) === r && (d = new d(p, m + "enter", l, n, i), d.target = h, d.relatedTarget = f, g = d), f = g, d = c && l ? C(c, l, rp) : null, c !== null && ip(s, u, c, d, !1), l !== null && f !== null && ip(s, f, l, d, !0)));
+ if (l = e === "mouseover" || e === "pointerover", c = e === "mouseout" || e === "pointerout", l && n !== R && (u = n.relatedTarget || n.fromElement) && (Pt(u) || u[Et])) break a;
+ (c || l) && (u = i.window === i ? i : (l = i.ownerDocument) ? l.defaultView || l.parentWindow : window, c ? (l = n.relatedTarget || n.toElement, c = r, l = l ? Pt(l) : null, l !== null && (f = o(l), d = l.tag, l !== f || d !== 5 && d !== 27 && d !== 6) && (l = null)) : (c = null, l = r), c !== l && (d = Kn, g = "onMouseLeave", p = "onMouseEnter", m = "mouse", (e === "pointerout" || e === "pointerover") && (d = ir, g = "onPointerLeave", p = "onPointerEnter", m = "pointer"), f = c == null ? u : It(c), h = l == null ? u : It(l), u = new d(g, m + "leave", c, n, i), u.target = f, u.relatedTarget = h, g = null, Pt(i) === r && (d = new d(p, m + "enter", l, n, i), d.target = h, d.relatedTarget = f, g = d), f = g, d = c && l ? C(c, l, rp) : null, c !== null && ip(s, u, c, d, !1), l !== null && f !== null && ip(s, f, l, d, !0)));
}
a: {
if (c = r ? It(r) : window, l = c.nodeName && c.nodeName.toLowerCase(), l === "select" || l === "input" && c.type === "file") var _ = Er;
@@ -7142,7 +7142,7 @@ var k = /* @__PURE__ */ o(((e) => {
_ = Pr;
var v = Nr;
}
- } else l = c.nodeName, !l || l.toLowerCase() !== "input" || c.type !== "checkbox" && c.type !== "radio" ? r && hn(r.elementType) && (_ = Er) : _ = Fr;
+ } else l = c.nodeName, !l || l.toLowerCase() !== "input" || c.type !== "checkbox" && c.type !== "radio" ? r && _n(r.elementType) && (_ = Er) : _ = Fr;
if (_ &&= _(e, r)) {
xr(s, _, n, i);
break a;
@@ -7169,7 +7169,7 @@ var k = /* @__PURE__ */ o(((e) => {
case "keyup": Zr(s, n, i);
}
var y;
- if (cr) b: {
+ if (lr) b: {
switch (e) {
case "compositionstart":
var b = "onCompositionStart";
@@ -7184,10 +7184,10 @@ var k = /* @__PURE__ */ o(((e) => {
b = void 0;
}
else gr ? mr(e, n) && (b = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (b = "onCompositionStart");
- b && (dr && n.locale !== "ko" && (gr || b !== "onCompositionStart" ? b === "onCompositionEnd" && gr && (y = Nn()) : (An = i, jn = "value" in An ? An.value : An.textContent, gr = !0)), v = np(r, b), 0 < v.length && (b = new Yn(b, e, null, n, i), s.push({
+ b && (fr && n.locale !== "ko" && (gr || b !== "onCompositionStart" ? b === "onCompositionEnd" && gr && (y = Nn()) : (z = i, jn = "value" in z ? z.value : z.textContent, gr = !0)), v = np(r, b), 0 < v.length && (b = new Zn(b, e, null, n, i), s.push({
event: b,
listeners: v
- }), y ? b.data = y : (y = hr(n), y !== null && (b.data = y)))), (y = ur ? _r(e, n) : vr(e, n)) && (b = np(r, "onBeforeInput"), 0 < b.length && (v = new Yn("onBeforeInput", "beforeinput", null, n, i), s.push({
+ }), y ? b.data = y : (y = hr(n), y !== null && (b.data = y)))), (y = dr ? _r(e, n) : vr(e, n)) && (b = np(r, "onBeforeInput"), 0 < b.length && (v = new Zn("onBeforeInput", "beforeinput", null, n, i), s.push({
event: v,
listeners: b
}), v.data = y)), Uf(s, e, r, n, i);
@@ -7205,7 +7205,7 @@ var k = /* @__PURE__ */ o(((e) => {
function np(e, t) {
for (var n = t + "Capture", r = []; e !== null;) {
var i = e, a = i.stateNode;
- if (i = i.tag, i !== 5 && i !== 26 && i !== 27 || a === null || (i = En(e, n), i != null && r.unshift(tp(e, i, a)), i = En(e, t), i != null && r.push(tp(e, i, a))), e.tag === 3) return r;
+ if (i = i.tag, i !== 5 && i !== 26 && i !== 27 || a === null || (i = Dn(e, n), i != null && r.unshift(tp(e, i, a)), i = Dn(e, t), i != null && r.push(tp(e, i, a))), e.tag === 3) return r;
e = e.return;
}
return [];
@@ -7221,7 +7221,7 @@ var k = /* @__PURE__ */ o(((e) => {
for (var a = t._reactName, o = []; n !== null && n !== r;) {
var s = n, c = s.alternate, l = s.stateNode;
if (s = s.tag, c !== null && c === r) break;
- s !== 5 && s !== 26 && s !== 27 || l === null || (c = l, i ? (l = En(n, a), l != null && o.unshift(tp(n, l, c))) : i || (l = En(n, a), l != null && o.push(tp(n, l, c)))), n = n.return;
+ s !== 5 && s !== 26 && s !== 27 || l === null || (c = l, i ? (l = Dn(n, a), l != null && o.unshift(tp(n, l, c))) : i || (l = Dn(n, a), l != null && o.push(tp(n, l, c)))), n = n.return;
}
o.length !== 0 && e.push({
event: t,
@@ -7238,8 +7238,8 @@ var k = /* @__PURE__ */ o(((e) => {
function lp(e, t, n, r, a, o) {
switch (n) {
case "children":
- if (typeof r == "string") t === "body" || t === "textarea" && r === "" || dn(e, r);
- else if (typeof r == "number" || typeof r == "bigint") t !== "body" && dn(e, "" + r);
+ if (typeof r == "string") t === "body" || t === "textarea" && r === "" || pn(e, r);
+ else if (typeof r == "number" || typeof r == "bigint") t !== "body" && pn(e, "" + r);
else return;
break;
case "className":
@@ -7256,7 +7256,7 @@ var k = /* @__PURE__ */ o(((e) => {
Zt(e, n, r);
break;
case "style":
- mn(e, r, o);
+ gn(e, r, o);
return;
case "data": if (t !== "object") {
Zt(e, "data", r);
@@ -7268,7 +7268,7 @@ var k = /* @__PURE__ */ o(((e) => {
e.removeAttribute(n);
break;
}
- r = _n(r), e.setAttribute(n, r);
+ r = bn(r), e.setAttribute(n, r);
break;
case "action":
case "formAction":
@@ -7280,10 +7280,10 @@ var k = /* @__PURE__ */ o(((e) => {
e.removeAttribute(n);
break;
}
- r = _n(r), e.setAttribute(n, r);
+ r = bn(r), e.setAttribute(n, r);
break;
case "onClick":
- r != null && (e.onclick = vn);
+ r != null && (e.onclick = L);
return;
case "onScroll":
r != null && Yf("scroll", e);
@@ -7318,7 +7318,7 @@ var k = /* @__PURE__ */ o(((e) => {
e.removeAttribute("xlink:href");
break;
}
- n = _n(r), e.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", n);
+ n = bn(r), e.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", n);
break;
case "contentEditable":
case "spellCheck":
@@ -7405,7 +7405,7 @@ var k = /* @__PURE__ */ o(((e) => {
break;
case "innerText":
case "textContent": return;
- default: if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") n = z.get(n) || n, Xt(e, n, r);
+ default: if (!(2 < n.length) || n[0] !== "o" && n[0] !== "O" || n[1] !== "n" && n[1] !== "N") n = vn.get(n) || n, Xt(e, n, r);
else return;
}
Jt = !0;
@@ -7413,7 +7413,7 @@ var k = /* @__PURE__ */ o(((e) => {
function up(e, t, n, r, a, o) {
switch (n) {
case "style":
- mn(e, r, o);
+ gn(e, r, o);
return;
case "dangerouslySetInnerHTML":
if (r != null) {
@@ -7425,8 +7425,8 @@ var k = /* @__PURE__ */ o(((e) => {
}
break;
case "children":
- if (typeof r == "string") dn(e, r);
- else if (typeof r == "number" || typeof r == "bigint") dn(e, "" + r);
+ if (typeof r == "string") pn(e, r);
+ else if (typeof r == "number" || typeof r == "bigint") pn(e, "" + r);
else return;
break;
case "onScroll":
@@ -7436,7 +7436,7 @@ var k = /* @__PURE__ */ o(((e) => {
r != null && Yf("scrollend", e);
return;
case "onClick":
- r != null && (e.onclick = vn);
+ r != null && (e.onclick = L);
return;
case "suppressContentEditableWarning":
case "suppressHydrationWarning":
@@ -7516,7 +7516,7 @@ var k = /* @__PURE__ */ o(((e) => {
default: lp(e, t, r, d, n, null);
}
}
- on(e, o, c, l, u, s, a, !1);
+ cn(e, o, c, l, u, s, a, !1);
return;
case "select":
for (a in Yf("invalid", e), r = s = o = null, n) if (n.hasOwnProperty(a) && (c = n[a], c != null)) switch (a) {
@@ -7529,7 +7529,7 @@ var k = /* @__PURE__ */ o(((e) => {
case "multiple": r = c;
default: lp(e, t, a, c, n, null);
}
- t = o, n = s, e.multiple = !!r, t == null ? n != null && cn(e, !!r, n, !0) : cn(e, !!r, t, !1);
+ t = o, n = s, e.multiple = !!r, t == null ? n != null && un(e, !!r, n, !0) : un(e, !!r, t, !1);
return;
case "textarea":
for (s in Yf("invalid", e), o = a = r = null, n) if (n.hasOwnProperty(s) && (c = n[s], c != null)) switch (s) {
@@ -7547,7 +7547,7 @@ var k = /* @__PURE__ */ o(((e) => {
break;
default: lp(e, t, s, c, n, null);
}
- un(e, r, a, o);
+ fn(e, r, a, o);
return;
case "option":
for (l in n) if (n.hasOwnProperty(l) && (r = n[l], r != null)) switch (l) {
@@ -7594,7 +7594,7 @@ var k = /* @__PURE__ */ o(((e) => {
default: lp(e, t, u, r, n, null);
}
return;
- default: if (hn(t)) {
+ default: if (_n(t)) {
for (d in n) n.hasOwnProperty(d) && (r = n[d], r !== void 0 && up(e, t, d, r, n, void 0));
return;
}
@@ -7651,7 +7651,7 @@ var k = /* @__PURE__ */ o(((e) => {
default: m !== f && lp(e, t, p, m, r, f);
}
}
- R(e, s, c, l, u, d, o, a);
+ sn(e, s, c, l, u, d, o, a);
return;
case "select":
for (o in m = s = c = p = null, n) if (l = n[o], n.hasOwnProperty(o) && l != null) switch (o) {
@@ -7669,7 +7669,7 @@ var k = /* @__PURE__ */ o(((e) => {
case "multiple": o !== l && (Jt = !0), s = o;
default: o !== l && lp(e, t, a, o, r, l);
}
- t = c, n = s, r = m, p == null ? !!r != !!n && (t == null ? cn(e, !!n, n ? [] : "", !1) : cn(e, !!n, t, !0)) : cn(e, !!n, p, !1);
+ t = c, n = s, r = m, p == null ? !!r != !!n && (t == null ? un(e, !!n, n ? [] : "", !1) : un(e, !!n, t, !0)) : un(e, !!n, p, !1);
return;
case "textarea":
for (c in m = p = null, n) if (a = n[c], n.hasOwnProperty(c) && a != null && !r.hasOwnProperty(c)) switch (c) {
@@ -7690,7 +7690,7 @@ var k = /* @__PURE__ */ o(((e) => {
break;
default: a !== o && lp(e, t, s, a, r, o);
}
- ln(e, p, m);
+ dn(e, p, m);
return;
case "option":
for (var h in n) if (p = n[h], n.hasOwnProperty(h) && p != null && !r.hasOwnProperty(h)) switch (h) {
@@ -7730,7 +7730,7 @@ var k = /* @__PURE__ */ o(((e) => {
default: lp(e, t, u, p, r, m);
}
return;
- default: if (hn(t)) {
+ default: if (_n(t)) {
for (var _ in n) p = n[_], n.hasOwnProperty(_) && p !== void 0 && !r.hasOwnProperty(_) && up(e, t, _, void 0, r, p);
for (d in r) p = r[d], m = n[d], !r.hasOwnProperty(d) || p === m || p === void 0 && m === void 0 || up(e, t, d, p, r, m);
return;
@@ -8398,7 +8398,7 @@ var k = /* @__PURE__ */ o(((e) => {
var i = n[r];
n.hasOwnProperty(r) && i != null && lp(e, t, r, null, fp, i);
}
- n.dangerouslySetInnerHTML != null && (e.textContent = ""), e.onclick === vn && (e.onclick = null), Nt(e);
+ n.dangerouslySetInnerHTML != null && (e.textContent = ""), e.onclick === L && (e.onclick = null), Nt(e);
}
function Em(e) {
for (var t = e.attributes; t.length;) e.removeAttributeNode(t[0]);
@@ -8436,7 +8436,7 @@ var k = /* @__PURE__ */ o(((e) => {
function Pm(e, t, n) {
var r = Nm;
if (r && typeof t == "string" && t) {
- var i = L(t);
+ var i = on(t);
i = "link[rel=\"" + e + "\"][href=\"" + i + "\"]", typeof n == "string" && (i += "[crossorigin=\"" + n + "\"]"), Om.has(i) || (Om.add(i), e = {
rel: e,
crossOrigin: n,
@@ -8454,8 +8454,8 @@ var k = /* @__PURE__ */ o(((e) => {
Am.L(e, t, n);
var r = Nm;
if (r && e && t) {
- var i = "link[rel=\"preload\"][as=\"" + L(t) + "\"]";
- t === "image" && n && n.imageSrcSet ? (i += "[imagesrcset=\"" + L(n.imageSrcSet) + "\"]", typeof n.imageSizes == "string" && (i += "[imagesizes=\"" + L(n.imageSizes) + "\"]")) : i += "[href=\"" + L(e) + "\"]";
+ var i = "link[rel=\"preload\"][as=\"" + on(t) + "\"]";
+ t === "image" && n && n.imageSrcSet ? (i += "[imagesrcset=\"" + on(n.imageSrcSet) + "\"]", typeof n.imageSizes == "string" && (i += "[imagesizes=\"" + on(n.imageSizes) + "\"]")) : i += "[href=\"" + on(e) + "\"]";
var a = i;
switch (t) {
case "style":
@@ -8479,7 +8479,7 @@ var k = /* @__PURE__ */ o(((e) => {
Am.m(e, t);
var n = Nm;
if (n && e) {
- var r = t && typeof t.as == "string" ? t.as : "script", i = "link[rel=\"modulepreload\"][as=\"" + L(r) + "\"][href=\"" + L(e) + "\"]", a = i;
+ var r = t && typeof t.as == "string" ? t.as : "script", i = "link[rel=\"modulepreload\"][as=\"" + on(r) + "\"][href=\"" + on(e) + "\"]", a = i;
switch (r) {
case "audioworklet":
case "paintworklet":
@@ -8632,7 +8632,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
}
function Um(e) {
- return "href=\"" + L(e) + "\"";
+ return "href=\"" + on(e) + "\"";
}
function Wm(e) {
return "link[rel=\"stylesheet\"][" + e + "]";
@@ -8657,7 +8657,7 @@ var k = /* @__PURE__ */ o(((e) => {
});
}
function qm(e) {
- return "[src=\"" + L(e) + "\"]";
+ return "[src=\"" + on(e) + "\"]";
}
function Jm(e) {
return "script[async]" + e;
@@ -8665,7 +8665,7 @@ var k = /* @__PURE__ */ o(((e) => {
function Ym(e, t, n) {
if (t.count++, t.instance === null) switch (t.type) {
case "style":
- var r = e.querySelector("style[data-href~=\"" + L(n.href) + "\"]");
+ var r = e.querySelector("style[data-href~=\"" + on(n.href) + "\"]");
if (r) return t.instance = r, Rt(r), r;
var a = w({}, n, {
"data-href": n.href,
@@ -8913,7 +8913,7 @@ var k = /* @__PURE__ */ o(((e) => {
var c = 1 << 31 - et(o);
s.entanglements[1] |= c, o &= ~c;
}
- Nf(a), !(nd & 6) && (Cd = He() + 500, Pf(0, !1));
+ Nf(a), !(td & 6) && (Sd = He() + 500, Pf(0, !1));
}
}
break;
@@ -8928,7 +8928,7 @@ var k = /* @__PURE__ */ o(((e) => {
}
}
function kh(e) {
- return e = bn(e), jh(e);
+ return e = xn(e), jh(e);
}
var Ah = null;
function jh(e) {
@@ -9114,7 +9114,7 @@ var k = /* @__PURE__ */ o(((e) => {
if (n === null) {
n = e.nativeEvent;
var r = new n.constructor(n.type, n);
- yn = r, n.target.dispatchEvent(r), yn = null;
+ R = r, n.target.dispatchEvent(r), R = null;
} else return t = Ft(n), t !== null && Ch(t), e.blockedOn = n, !1;
t.shift();
}
@@ -11171,8 +11171,37 @@ function Ft(e, t) {
function It(e, t) {
return Nt(e, dt, t);
}
+// src/core/entity-names.ts
+var Lt = /* @__PURE__ */ l(te(), 1), Rt = N(), zt = /* @__PURE__ */ new Map(), Bt = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Set(), Ht = "zh-CN", Ut = 0, Wt = () => {
+ Ut++, Vt.forEach((e) => e());
+}, Gt = () => Ut, Kt = (e) => (Vt.add(e), () => {
+ Vt.delete(e);
+}), qt = () => Ht;
+function Jt(e) {
+ Ht !== e && (Ht = e, Wt());
+}
+function Yt(e) {
+ zt.clear(), Bt.clear();
+ for (let t of e) Bt.set(`${t.kind}/${t.id}`, t), zt.set(`${t.kind}/${t.canonical_name}`, t);
+ Wt();
+}
+function Xt(e) {
+ Bt.set(`${e.kind}/${e.id}`, e), zt.set(`${e.kind}/${e.canonical_name}`, e), Wt();
+}
+function Zt(e, t, n) {
+ let r = n ? Bt.get(`${e}/${n}`) : void 0;
+ return r?.canonical_name === t ? r : zt.get(`${e}/${t}`);
+}
+function Qt(e, t, n) {
+ let r = Zt(e, t, n);
+ return (Ht === "ja" ? r?.ja : r?.zh_cn) || t;
+}
+function $t(e, t, n) {
+ let r = Zt(e, t, n);
+ return !r || (Ht === "ja" ? r.ja : r.zh_cn) ? "" : Ht === "ja" ? "暂无已核对的日文原文,保留当前名称" : "暂无已核对的中文写法,保留当前名称";
+}
// src/core/entity-links.ts
-var Lt = /* @__PURE__ */ l(te(), 1), Rt = N(), zt = /* @__PURE__ */ new Map(), Bt = /* @__PURE__ */ new Map(), Vt = /* @__PURE__ */ new Map(), Ht = {
+var en = /* @__PURE__ */ new Map(), tn = /* @__PURE__ */ new Map(), nn = /* @__PURE__ */ new Map(), rn = {
performers: "performer",
studios: "studio",
creators: "creator",
@@ -11180,25 +11209,25 @@ var Lt = /* @__PURE__ */ l(te(), 1), Rt = N(), zt = /* @__PURE__ */ new Map(), B
tags: "tag",
series: "series"
};
-function Ut(e, t, n) {
- typeof n == "number" && Number.isSafeInteger(n) && n > 0 && t && (zt.set(`${e}/${t}`, n), Vt.set(`${e}/${n}`, t));
+function an(e, t, n) {
+ typeof n == "number" && Number.isSafeInteger(n) && n > 0 && t && (en.set(`${e}/${t}`, n), nn.set(`${e}/${n}`, t));
}
-var Wt = (e, t) => Vt.get(`${e}/${t}`);
-function Gt(e, t) {
- let n = `${e}/${t}`, r = zt.get(n);
+var on = (e, t) => nn.get(`${e}/${t}`);
+function sn(e, t) {
+ let n = `${e}/${t}`, r = en.get(n);
if (r) return r;
- let i = Bt.get(n);
+ let i = tn.get(n);
return i?.size === 1 ? [...i][0] : void 0;
}
-function Kt(e, t, n) {
+function cn(e, t, n) {
if (typeof n != "number" || !Number.isSafeInteger(n) || n <= 0 || !t) return;
- let r = `${e}/${t}`, i = Bt.get(r) || /* @__PURE__ */ new Set();
- i.add(n), Bt.set(r, i);
+ let r = `${e}/${t}`, i = tn.get(r) || /* @__PURE__ */ new Set();
+ i.add(n), tn.set(r, i);
}
-function qt(e, t) {
+function ln(e, t) {
if (!t || typeof t != "object") return;
let n = t, r = new URL(e, "https://peach.invalid");
- if (![
+ if (r.pathname === "/api/entity/shapes" && Array.isArray(n.name_variants) && Yt(n.name_variants), ![
"/api/entity",
"/api/index",
"/api/entity/shapes",
@@ -11206,21 +11235,26 @@ function qt(e, t) {
"/api/facets",
"/api/suggest"
].includes(r.pathname)) return;
- let i = r.searchParams.get("kind") || r.pathname.slice(5), a = Ht[i] || i;
+ let i = r.searchParams.get("kind") || r.pathname.slice(5), a = rn[i] || i;
if (n.canonical_name && n.id) {
- for (let e of Array.isArray(n.aliases) ? n.aliases : []) Kt(n.kind || a, e, n.id);
- Ut(n.kind || a, n.canonical_name, n.id);
+ n.name_display?.current && Xt({
+ ...n.name_display.current,
+ id: n.id,
+ kind: n.kind || a
+ });
+ for (let e of Array.isArray(n.aliases) ? n.aliases : []) cn(n.kind || a, e, n.id);
+ an(n.kind || a, n.canonical_name, n.id);
}
for (let e of Array.isArray(n.entities) ? n.entities : []) {
- for (let t of (e.names || []).slice(1)) Kt(e.kind, t, e.id);
- Ut(e.kind, e.names?.[0], e.id);
+ for (let t of (e.names || []).slice(1)) cn(e.kind, t, e.id);
+ an(e.kind, e.names?.[0], e.id);
}
- for (let e of Array.isArray(n.items) ? n.items : []) a && Ut(e.entity_kind || a, e.k || e.name, e.entity_id);
- if (["/api/tops", "/api/facets"].includes(r.pathname)) for (let [e, t] of Object.entries(Ht)) for (let r of Array.isArray(n[e]) ? n[e] : []) Ut(t, r.k || r.name, r.entity_id || r.id);
- if (r.pathname === "/api/suggest") for (let e of Array.isArray(n.groups) ? n.groups : []) for (let t of Array.isArray(e.items) ? e.items : []) Ut(e.kind, t.value, t.entity_id);
+ for (let e of Array.isArray(n.items) ? n.items : []) a && an(e.entity_kind || a, e.k || e.name, e.entity_id);
+ if (["/api/tops", "/api/facets"].includes(r.pathname)) for (let [e, t] of Object.entries(rn)) for (let r of Array.isArray(n[e]) ? n[e] : []) an(t, r.k || r.name, r.entity_id || r.id);
+ if (r.pathname === "/api/suggest") for (let e of Array.isArray(n.groups) ? n.groups : []) for (let t of Array.isArray(e.items) ? e.items : []) an(e.kind, t.value, t.entity_id);
}
// ../resources/media-sources.json
-var Jt = [
+var un = [
{
id: "local",
name: "本地磁盘",
@@ -11269,9 +11303,9 @@ var Jt = [
cloud: !0,
icon: "database"
}
-], Yt = Jt, Xt = Jt.map((e) => [e.id, e.label]), Zt = Jt.map((e) => e.id), Qt = Jt.filter((e) => e.cloud).map((e) => e.id), $t = Object.fromEntries(Jt.map((e) => [e.id, e.name])), en = (e) => Jt.find((t) => t.id === e)?.default_cost === "free" ? "free" : "metered";
+], dn = un, fn = un.map((e) => [e.id, e.label]), pn = un.map((e) => e.id), mn = un.filter((e) => e.cloud).map((e) => e.id), hn = Object.fromEntries(un.map((e) => [e.id, e.name])), gn = (e) => un.find((t) => t.id === e)?.default_cost === "free" ? "free" : "metered";
// src/core/request-error.ts
-function tn(e, t = 0) {
+function _n(e, t = 0) {
let n = String(e?.message ?? e ?? ""), r = Number(t || e?.status || n.match(/\b(400|401|403|404|408|409|413|429|500|502|503|504)\b/)?.[1]), i = {
400: "提交内容有误,请检查输入后重试。",
401: "登录已失效,请刷新页面重新登录。",
@@ -11289,19 +11323,19 @@ function tn(e, t = 0) {
return /Failed to fetch|fetch failed|NetworkError|Load failed|network request failed|ERR_CONNECTION/i.test(n) ? "无法连接到 Peach 服务,请确认网络连接和托盘服务已启动。" : e?.name === "TimeoutError" || !r && /timed? ?out|timeout/i.test(n) ? "等待服务响应超时,请检查连接后重试。" : /[㐀-鿿]/.test(n) && !/^请求失败[((]/.test(n) ? n : i[r] ? i[r] : "操作未完成,请重试;持续失败时查看托盘日志。";
}
// src/core/icon-geometry.ts
-var nn = {
+var vn = {
"text-aa": 1.435,
"mark-javdb": 326 / 111
};
-function rn(e) {
- let t = nn[e];
+function yn(e) {
+ let t = vn[e];
return {
wide: !!t,
viewBox: t ? `0 0 ${(24 * t).toFixed(2)} 24` : "0 0 24 24"
};
}
// src/core/library-scope.ts
-function an(e) {
+function bn(e) {
if (!/^\/api\/(items|facets)([?#]|$)/.test(e)) return e;
let t = e.indexOf("#"), n = t < 0 ? e : e.slice(0, t), r = t < 0 ? "" : e.slice(t), i = n.indexOf("?");
if (new URLSearchParams(i < 0 ? "" : n.slice(i + 1)).has("library")) return e;
@@ -11310,10 +11344,10 @@ function an(e) {
}
// src/core/index.ts
var L = (e) => document.querySelector(e), R = (e, t = "") => {
- let { wide: n, viewBox: r } = rn(e), i = [n ? "iconwide" : "", t].filter(Boolean).join(" ");
+ let { wide: n, viewBox: r } = yn(e), i = [n ? "iconwide" : "", t].filter(Boolean).join(" ");
return `<svg${i ? ` class="${i}"` : ""} viewBox="${r}" aria-hidden="true"><use href="#i-${e}"/></svg>`;
-}, on = async (e, t) => {
- t?.method && t.method.toUpperCase() !== "GET" || (e = an(e));
+}, xn = async (e, t) => {
+ t?.method && t.method.toUpperCase() !== "GET" || (e = bn(e));
let { signal: n = null, ...r } = t || {}, i = {
headers: { "Content-Type": "application/json" },
...r
@@ -11323,7 +11357,7 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
try {
a = await fetch(e, i);
} catch (e) {
- throw e?.name === "AbortError" ? e : Error(tn(e), { cause: e });
+ throw e?.name === "AbortError" ? e : Error(_n(e), { cause: e });
}
let o = null;
try {
@@ -11331,10 +11365,10 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
} catch {}
if (!a.ok) {
let e = o && (o.message || o.detail || o.error);
- throw Error(tn(e, a.status));
+ throw Error(_n(e, a.status));
}
- return qt(e, o), o;
-}, sn = (e) => e?.name === "AbortError", cn = async (e, t, n) => {
+ return ln(e, o), o;
+}, Sn = (e) => e?.name === "AbortError", Cn = async (e, t, n) => {
let r = [...e], i = Array(r.length), a = 0, o = async () => {
for (; a < r.length;) {
let e = a++;
@@ -11352,41 +11386,41 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
}
}, s = Math.min(Math.max(1, t), r.length);
return await Promise.all(Array.from({ length: s }, o)), i;
-}, ln = {
+}, wn = {
fresh: "/unseen",
later: "/watch-later",
flagged: "/flagged",
ads: "/junk-files"
-}, un = Object.fromEntries(Object.entries(ln).map(([e, t]) => [t, e])), dn = {
+}, Tn = Object.fromEntries(Object.entries(wn).map(([e, t]) => [t, e])), En = {
fresh: "没看过",
later: "稍后看",
flagged: "已标记",
ads: "垃圾文件"
-}, fn = (e) => e === "/" || e === "/wall" || Object.prototype.hasOwnProperty.call(un, e), pn = {
+}, Dn = (e) => e === "/" || e === "/wall" || Object.prototype.hasOwnProperty.call(Tn, e), On = {
performer: "performers",
studio: "studios",
creator: "creators",
series: "series",
agency: "agencies",
tag: "tags"
-}, mn = {
+}, kn = {
performers: "performer",
studios: "studio",
creators: "creator",
series: "series",
agencies: "agency",
tags: "tag"
-}, hn = (e, t, n) => {
- n && Ut(e, t, n);
- let r = n || Gt(e, t);
- return `/${pn[e] || e}/${r || encodeURIComponent(t)}`;
+}, An = (e, t, n) => {
+ n && an(e, t, n);
+ let r = n || sn(e, t);
+ return `/${On[e] || e}/${r || encodeURIComponent(t)}`;
}, z = (e) => String(e ?? "").replace(/[&<>"']/g, (e) => ({
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
-})[e]), gn = [
+})[e]), jn = [
["nax-pro.com", "NAX"],
["t-powers.co.jp", "T-POWERS"],
["dmm.co.jp", "DMM"],
@@ -11424,16 +11458,16 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
["naturalhigh.co.jp", "Natural High"],
["bangbros.com", "BangBros"],
["dorcelclub.com", "Dorcel"]
-], _n = (e) => String(e).replace(/^www\./, "").toLowerCase(), vn = (e) => {
+], Mn = (e) => String(e).replace(/^www\./, "").toLowerCase(), Nn = (e) => {
try {
- return _n(new URL(e).hostname);
+ return Mn(new URL(e).hostname);
} catch {
return "";
}
-}, yn = (e) => {
- let t = vn(e);
- return t && gn.find(([e]) => t === e || t.endsWith("." + e))?.[1] || "";
-}, bn = (e) => `/link-mark?id=${encodeURIComponent(e.link_id ?? "")}`, xn = (e) => `/site-mark?${new URLSearchParams(e)}`, Sn = [
+}, Pn = (e) => {
+ let t = Nn(e);
+ return t && jn.find(([e]) => t === e || t.endsWith("." + e))?.[1] || "";
+}, Fn = (e) => `/link-mark?id=${encodeURIComponent(e.link_id ?? "")}`, In = (e) => `/site-mark?${new URLSearchParams(e)}`, Ln = [
[["x.com", "twitter.com"], "brand-x"],
[["instagram.com"], "brand-instagram"],
[["threads.com", "threads.net"], "brand-threads"],
@@ -11441,65 +11475,65 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
[["youtube.com", "youtu.be"], "brand-youtube"],
[["facebook.com", "fb.com"], "brand-facebook"],
[["linktr.ee", "linktree.com"], "brand-linktree"]
-], Cn = (e) => {
- let t = vn(e);
- return t && Sn.find(([e]) => e.some((e) => t === e || t.endsWith("." + e)))?.[1] || "";
-}, wn = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase(), Tn = ["web.archive.org"], En = (e) => Tn.includes(vn(e)), Dn = (e, t, n = []) => {
- let r = yn(e.url) || e.label || "";
- if (t !== "studio" && t !== "agency" || En(e.url)) return r;
- let i = [r, e.label].map(wn).filter(Boolean);
- return !i.length || i.includes("官方网站") || i.some((t) => _n(t) === vn(e.url) || n.some((e) => {
- let n = wn(e);
+], Rn = (e) => {
+ let t = Nn(e);
+ return t && Ln.find(([e]) => e.some((e) => t === e || t.endsWith("." + e)))?.[1] || "";
+}, zn = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase(), Bn = ["web.archive.org"], Vn = (e) => Bn.includes(Nn(e)), Hn = (e, t, n = []) => {
+ let r = Pn(e.url) || e.label || "";
+ if (t !== "studio" && t !== "agency" || Vn(e.url)) return r;
+ let i = [r, e.label].map(zn).filter(Boolean);
+ return !i.length || i.includes("官方网站") || i.some((t) => Mn(t) === Nn(e.url) || n.some((e) => {
+ let n = zn(e);
return !!n && (n.includes(t) || t.includes(n));
})) ? "官方网站" : r;
-}, On = (e) => {
+}, Un = (e) => {
let t = Number(e);
return Number.isFinite(t) && t > 0 ? t : 0;
-}, kn = (e) => {
- if (e = On(e), !e) return "—";
+}, Wn = (e) => {
+ if (e = Un(e), !e) return "—";
if (e = Math.round(e), e >= 172800) {
let t = Math.floor(e / 86400), n = Math.floor(e % 86400 / 3600);
return n ? `${t} 天 ${n} 小时` : `${t} 天`;
}
let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = e % 60;
return t ? `${t}:${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}` : `${n}:${String(r).padStart(2, "0")}`;
-}, An = (e) => {
+}, Gn = (e) => {
e = Math.max(0, Math.floor(Number(e) || 0));
let t = e / 3600 | 0, n = e % 3600 / 60 | 0, r = e % 60;
return t ? `${t}:${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}` : `${n}:${String(r).padStart(2, "0")}`;
-}, jn = (e) => {
+}, Kn = (e) => {
if (e == null || e === "") return "大小未知";
let t = Number(e);
return !Number.isFinite(t) || t < 0 ? "大小未知" : t === 0 ? "0 B" : t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : t >= 0x4000000000000 ? (t / 0x4000000000000).toFixed(2) + " PB" : t >= 1099511627776 ? (t / 1099511627776).toFixed(2) + " TB" : t >= 1073741824 ? (t / 1073741824).toFixed(1) + " GB" : Math.floor(t / 1048576) + " MB";
-}, Mn = typeof Intl < "u" && typeof Intl.Segmenter == "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null, Nn = (e) => Mn ? Array.from(Mn.segment(e), (e) => e.segment) : Array.from(e), Pn = (e, t) => {
+}, qn = typeof Intl < "u" && typeof Intl.Segmenter == "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null, Jn = (e) => qn ? Array.from(qn.segment(e), (e) => e.segment) : Array.from(e), Yn = (e, t) => {
let n = String(e ?? "").trim(), r = [];
if (!n || t <= 0) return "";
- if (!Mn) return Array.from(n).slice(0, t).join("");
- for (let e of Mn.segment(n)) if (r.push(e.segment), r.length >= t) break;
+ if (!qn) return Array.from(n).slice(0, t).join("");
+ for (let e of qn.segment(n)) if (r.push(e.segment), r.length >= t) break;
return r.join("");
-}, Fn = (e, t = "?") => Pn(e, 1) || t, In = (e, t) => {
- let n = Nn(String(e ?? ""));
+}, Xn = (e, t = "?") => Yn(e, 1) || t, Zn = (e, t) => {
+ let n = Jn(String(e ?? ""));
return n.length > t ? `${n.slice(0, Math.max(0, t - 1)).join("")}…` : n.join("");
-}, Ln = {
- ...$t,
+}, Qn = {
+ ...hn,
local: "本地",
online: "在线"
-}, Rn = (e, t) => {
+}, $n = (e, t) => {
let n = 2166136261;
for (let r of `${e}\u0000${t}`) n ^= r.codePointAt(0), n = Math.imul(n, 16777619) >>> 0;
return n;
-}, zn = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991), Bn = /* @__PURE__ */ new Set([
+}, er = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991), tr = /* @__PURE__ */ new Set([
"短片-2分内",
"中片-10分内",
"长片-30分内",
"超长片-30分上"
-]), Vn = (e) => String(e || "").split(",").filter((e) => e && !Bn.has(e)).join(","), Hn = class extends Error {
+]), nr = (e) => String(e || "").split(",").filter((e) => e && !tr.has(e)).join(","), rr = class extends Error {
status;
body;
constructor(e, t, n = null) {
- super(tn(e, t)), this.name = "ApiError", this.status = t, this.body = n;
+ super(_n(e, t)), this.name = "ApiError", this.status = t, this.body = n;
}
-}, Un = (e) => {
+}, ir = (e) => {
if (!e || typeof e != "object") return "";
let t = e;
for (let e of [
@@ -11511,9 +11545,9 @@ var L = (e) => document.querySelector(e), R = (e, t = "") => {
if (typeof n == "string" && n) return n;
}
return "";
-}, Wn = (e) => tn(e);
+}, ar = (e) => _n(e);
async function B(e, t) {
- e = an(e);
+ e = bn(e);
let n = await fetch(e, {
headers: { Accept: "application/json" },
credentials: "same-origin",
@@ -11524,8 +11558,8 @@ async function B(e, t) {
} catch {
t?.throwIfAborted();
}
- if (!n.ok) throw new Hn(Un(r) || `请求失败(${n.status})`, n.status);
- return qt(e, r), r;
+ if (!n.ok) throw new rr(ir(r) || `请求失败(${n.status})`, n.status);
+ return ln(e, r), r;
}
async function V(e, t, n = "POST", r) {
let i = await fetch(e, {
@@ -11543,11 +11577,11 @@ async function V(e, t, n = "POST", r) {
} catch {
r?.throwIfAborted();
}
- if (!i.ok) throw new Hn(Un(a) || `请求失败(${i.status})`, i.status, a);
+ if (!i.ok) throw new rr(ir(a) || `请求失败(${i.status})`, i.status, a);
return a;
}
// src/follow-sort.ts
-var Gn = [
+var or = [
["checked", "检查时间"],
["added", "添加时间"],
["name", "创作者名称"],
@@ -11555,7 +11589,7 @@ var Gn = [
["source", "来源名称"],
["provider", "站点"],
["status", "状态"]
-], Kn = "checked", qn = {
+], sr = "checked", cr = {
checked: "desc",
added: "desc",
name: "asc",
@@ -11563,15 +11597,15 @@ var Gn = [
source: "asc",
provider: "asc",
status: "asc"
-}, Jn = (e) => Gn.some(([t]) => t === e);
-function Yn(e, t) {
- let n = Jn(e) ? e : Kn;
+}, lr = (e) => or.some(([t]) => t === e);
+function ur(e, t) {
+ let n = lr(e) ? e : sr;
return {
sort: n,
- dir: t === "asc" || t === "desc" ? t : qn[n]
+ dir: t === "asc" || t === "desc" ? t : cr[n]
};
}
-function Xn(e, t, n = 1) {
+function dr(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;
@@ -11591,10 +11625,10 @@ function Xn(e, t, n = 1) {
t
];
}
-function Zn(e, t) {
+function fr(e, t) {
return Math.max(1, Math.ceil(e / t));
}
-function Qn(e, t) {
+function pr(e, t) {
return Math.min(Math.max(1, Math.floor(e) || 1), t);
}
// src/query/client.ts
@@ -11604,23 +11638,23 @@ var H = new bt({ defaultOptions: { queries: {
refetchOnWindowFocus: !1,
refetchOnMount: !1,
retryOnMount: !1
-} } }), $n = "/api/sources", er = ["media-sources"], tr = (e) => B($n, e), nr = (e) => e?.name === "AbortError" || qe(e);
-async function rr(e) {
+} } }), mr = "/api/sources", hr = ["media-sources"], gr = (e) => B(mr, e), _r = (e) => e?.name === "AbortError" || qe(e);
+async function vr(e) {
e?.throwIfAborted();
let t = () => H.fetchQuery({
- queryKey: er,
- queryFn: () => tr(e)
+ queryKey: hr,
+ queryFn: () => gr(e)
});
try {
let n = await t();
return e?.throwIfAborted(), n;
} catch (n) {
- if (e?.throwIfAborted(), !nr(n)) throw n;
+ if (e?.throwIfAborted(), !_r(n)) throw n;
return await t();
}
}
// src/react/time.ts
-function ir(e) {
+function yr(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);
@@ -11628,22 +11662,22 @@ function ir(e) {
return `${n.getFullYear()}-${r(n.getMonth() + 1)}-${r(n.getDate())} ${r(n.getHours())}:${r(n.getMinutes())}`;
}
// src/react/follow-manage/follow-manage.ts
-var ar = "/api/follow", or = "/api/follow/credentials", sr = "/api/follow/check", cr = "/api/follow/source", lr = "/api/follow/resolve", ur = "/api/follow/suggest", dr = "/api/follow/author-alias", fr = "/api/follow/credential", pr = "/api/follow/status", mr = "/api/feeds", hr = "/api/feeds/source", gr = "/api/feeds/check", _r = "/api/feeds/lookup", vr = ["follow-manage"], yr = ["follow-manage", "credentials"], br = ["follow-manage", "check"], xr = ["follow-manage", "resolve"], Sr = ["follow-manage", "feeds"], Cr = (e) => [
+var br = "/api/follow", xr = "/api/follow/credentials", Sr = "/api/follow/check", Cr = "/api/follow/source", wr = "/api/follow/resolve", Tr = "/api/follow/suggest", Er = "/api/follow/author-alias", Dr = "/api/follow/credential", Or = "/api/follow/status", kr = "/api/feeds", Ar = "/api/feeds/source", jr = "/api/feeds/check", Mr = "/api/feeds/lookup", Nr = ["follow-manage"], Pr = ["follow-manage", "credentials"], Fr = ["follow-manage", "check"], Ir = ["follow-manage", "resolve"], Lr = ["follow-manage", "feeds"], Rr = (e) => [
"follow-manage",
"suggest",
e
-], wr = [["default", "默认视图"], ["table", "表格视图"]], Tr = [
+], zr = [["default", "默认视图"], ["table", "表格视图"]], Br = [
10,
20,
50,
100
-], Er = Object.fromEntries(Gn), Dr = {
+], Vr = Object.fromEntries(or), Hr = {
author: "name",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, Or = (e) => wr.some(([t]) => t === e), kr = (e) => Tr.includes(Number(e)) ? Number(e) : 20, Ar = {
+}, Ur = (e) => zr.some(([t]) => t === e), Wr = (e) => Br.includes(Number(e)) ? Number(e) : 20, Gr = {
checked: ["从近到远", "从远到近"],
added: ["从近到远", "从远到近"],
name: ["倒序", "正序"],
@@ -11651,34 +11685,34 @@ var ar = "/api/follow", or = "/api/follow/credentials", sr = "/api/follow/check"
source: ["倒序", "正序"],
provider: ["倒序", "正序"],
status: ["倒序", "正序"]
-}, jr = (e, t) => `按${Er[e]}${Ar[e][t === "asc" ? 0 : 1]}排序`;
-function Mr(e) {
+}, Kr = (e, t) => `按${Vr[e]}${Gr[e][t === "asc" ? 0 : 1]}排序`;
+function qr(e) {
let t = e.last_status;
return t === "error" || t === "unauthorized" ? 0 : e.enabled ? t === "ok" ? 3 : 2 : 1;
}
-function Nr(e) {
+function Jr(e) {
return e.history_exhausted ? "没有更多" : e.enabled ? e.last_status === "ok" ? "正常" : e.last_status === "error" || e.last_status === "unauthorized" ? "检查失败" : "未检查" : "已暂停";
}
-var Pr = (e) => e.last_status === "error" || e.last_status === "unauthorized";
-function Fr(e) {
+var Yr = (e) => e.last_status === "error" || e.last_status === "unauthorized";
+function Xr(e) {
let t = Number(e) || 0;
return t >= 2880 ? `每 ${Math.round(t / 1440).toLocaleString()} 天` : t >= 60 ? `每 ${Math.round(t / 60)} 小时` : `每 ${t} 分钟`;
}
-function Ir(e) {
+function Zr(e) {
let t = String(e || "").split(/\r?\n/).map((e) => e.trim()).filter(Boolean);
return t.length ? /^Traceback \(most recent call last\)/.test(t[0]) ? t[t.length - 1] : t[0] : "";
}
-var Lr = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), Rr = {
- source: Lr,
- provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || Lr(e, t),
- status: (e, t) => Mr(e) - Mr(t) || Lr(e, t)
-}, zr = (e) => Date.parse(e || "") || 0, Br = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
-function Vr(e, t = []) {
+var Qr = (e, t) => String(e.label || "").localeCompare(String(t.label || ""), "zh-CN", { numeric: !0 }), $r = {
+ source: Qr,
+ provider: (e, t) => String(e.provider_label || "").localeCompare(String(t.provider_label || ""), "zh-CN") || Qr(e, t),
+ status: (e, t) => qr(e) - qr(t) || Qr(e, t)
+}, ei = (e) => Date.parse(e || "") || 0, ti = (e) => String(e || "").replace(/\s*[·|]\s*[A-Za-z0-9_-]+\s*$/, "").replace(/\s+collections?\s*$/i, "").trim();
+function ni(e, t = []) {
if (!e.length) return "";
- let n = (e) => String(e.author_name || "").trim() || Br(e.label), r = e.find((e) => e.entity_name);
+ let n = (e) => String(e.author_name || "").trim() || ti(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 Br(i.canonical_name);
+ if (i) return ti(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);
@@ -11686,18 +11720,18 @@ function Vr(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 Hr(e) {
+function ri(e) {
let t = e.trim().match(/[A-Za-z0-9]/);
return (t ? t[0] : Array.from(e.trim())[0] || "?").toUpperCase();
}
-function Ur(e) {
+function ii(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 Wr(e) {
+function ai(e) {
let t = [], n = /* @__PURE__ */ new Map();
for (let r of e) {
let e = r.author_key || `source:${r.id}`;
@@ -11705,32 +11739,32 @@ function Wr(e) {
}
return t.map((e) => n.get(e));
}
-function Gr(e, t, n, r = []) {
- let i = Wr(e), a = n === qn[t] ? 1 : -1, o = (e) => Vr(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = Rr[t];
+function oi(e, t, n, r = []) {
+ let i = ai(e), a = n === cr[t] ? 1 : -1, o = (e) => ni(e, r), s = (e, t) => o(e).localeCompare(o(t), "zh-CN", { numeric: !0 }), c = $r[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) => zr(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => zr(e.created_at)));
+ let l = (e) => Math.max(...e.map((e) => ei(e.last_checked_at))), u = (e) => Math.max(...e.map((e) => ei(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 Kr(e, t, n, r = []) {
+function si(e, t, n, r = []) {
let i = e.flatMap((e) => {
- let t = Vr(e, r);
+ let t = ni(e, r);
return e.map((n) => ({
source: n,
group: e,
author: t
}));
- }), a = Rr[t];
+ }), a = $r[t];
if (a) {
- let e = n === qn[t] ? 1 : -1;
+ let e = n === cr[t] ? 1 : -1;
i.sort((t, n) => e * a(t.source, n.source));
}
return i;
}
-function qr(e, t, n) {
- let r = Zn(e, t), i = Qn(n, r), a = (i - 1) * t;
+function ci(e, t, n) {
+ let r = fr(e, t), i = pr(n, r), a = (i - 1) * t;
return {
page: i,
pages: r,
@@ -11739,95 +11773,95 @@ function qr(e, t, n) {
end: Math.min(a + t, e)
};
}
-function Jr(e, t) {
+function li(e, t) {
let n = new Set(t.map((e) => e.id));
return new Set([...e].filter((e) => n.has(e)));
}
-function Yr(e, t) {
+function ui(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 Xr(e, t, n) {
+function di(e, t, n) {
let r = new Set(e);
for (let e of t) n ? r.add(e) : r.delete(e);
return r;
}
-var Zr = (e) => B(`${ar}?summary=1`, e), Qr = (e) => B(or, e), $r = (e) => B(sr, e), ei = (e) => B(lr, e), ti = (e, t) => B(`${ur}?q=${encodeURIComponent(e)}`, t), ni = (e) => V(sr, {
+var fi = (e) => B(`${br}?summary=1`, e), pi = (e) => B(xr, e), mi = (e) => B(Sr, e), hi = (e) => B(wr, e), gi = (e, t) => B(`${Tr}?q=${encodeURIComponent(e)}`, t), _i = (e) => V(Sr, {
...e?.length ? { sources: e } : {},
background: !0
-}), ri = (e) => V(lr, {
+}), vi = (e) => V(wr, {
lines: e,
background: !0
-}), ii = (e, t) => V(cr, {
+}), yi = (e, t) => V(Cr, {
action: "enabled",
id: e,
enabled: t
-}), ai = (e) => V(cr, {
+}), bi = (e) => V(Cr, {
action: "remove",
id: e
-}), oi = (e) => V(cr, {
+}), xi = (e) => V(Cr, {
action: "add",
url: e.url,
label: e.label,
author: e.author || "",
aliases: e.aliases || [],
defer_check: !0
-}), si = (e, t) => V(dr, {
+}), Si = (e, t) => V(Er, {
action: "add",
canonical: e,
alias: t
-}), ci = (e) => V(dr, {
+}), Ci = (e) => V(Er, {
action: "remove",
alias: e
-}), li = (e, t, n) => V(dr, {
+}), wi = (e, t, n) => V(Er, {
action: "rename",
canonical_key: e,
canonical: t
-}, "POST", n), ui = (e, t) => V(fr, {
+}, "POST", n), Ti = (e, t) => V(Dr, {
provider: e,
values: t
-}), di = (e, t) => V(pr, {
+}), Ei = (e, t) => V(Or, {
item: e,
to: t
-}), fi = () => B(`${ar}?status=new&limit=1000`);
-async function pi(e) {
- let t = await B(mr, e);
+}), Di = () => B(`${br}?status=new&limit=1000`);
+async function Oi(e) {
+ let t = await B(kr, e);
if (!Array.isArray(t?.sources)) throw Error("没有读到订阅源");
return t;
}
-var mi = (e, t, n) => V(hr, {
+var ki = (e, t, n) => V(Ar, {
action: "enabled",
id: e,
enabled: t
-}, "POST", n), hi = (e, t) => V(hr, {
+}, "POST", n), Ai = (e, t) => V(Ar, {
action: "remove",
id: e
-}, "POST", t), gi = (e, t) => V(gr, t?.length ? { sources: t } : { all: !0 }, "POST", e), _i = (e, t) => B(`${_r}?q=${encodeURIComponent(e)}`, t), vi = (e, t, n) => V(hr, {
+}, "POST", t), ji = (e, t) => V(jr, t?.length ? { sources: t } : { all: !0 }, "POST", e), Mi = (e, t) => B(`${Mr}?q=${encodeURIComponent(e)}`, t), Ni = (e, t, n) => V(Ar, {
action: "follow-name",
name: e,
ids: t
}, "POST", n);
-async function yi(e) {
+async function Pi(e) {
await Promise.all([
H.fetchQuery({
- queryKey: vr,
- queryFn: () => Zr(e)
+ queryKey: Nr,
+ queryFn: () => fi(e)
}),
H.fetchQuery({
- queryKey: yr,
- queryFn: () => Qr(e)
+ queryKey: Pr,
+ queryFn: () => pi(e)
}),
H.fetchQuery({
- queryKey: Sr,
- queryFn: () => pi(e)
+ queryKey: Lr,
+ queryFn: () => Oi(e)
})
]);
}
-function bi(e, t) {
- H.setQueryData(vr, (n) => n && {
+function Fi(e, t) {
+ H.setQueryData(Nr, (n) => n && {
...n,
sources: n.sources.map((n) => n.id === e ? {
...n,
@@ -11835,28 +11869,28 @@ function bi(e, t) {
} : n)
});
}
-function xi(e) {
+function Ii(e) {
let t = new Set(e);
- H.setQueryData(vr, (e) => e && {
+ H.setQueryData(Nr, (e) => e && {
...e,
sources: e.sources.filter((e) => !t.has(e.id))
});
}
-var Si = () => H.invalidateQueries({
- queryKey: vr,
+var Li = () => H.invalidateQueries({
+ queryKey: Nr,
exact: !0
});
-function Ci(e) {
+function Ri(e) {
let t = e.results || [], n = t.reduce((e, t) => e + (t.added || 0), 0), r = t.reduce((e, t) => e + (t.updated || 0), 0), i = t.filter((e) => !e.ok).length, a = [];
return n && a.push(`新增 ${n} 条`), r && a.push(`更新 ${r} 条`), !a.length && i < t.length && a.push("没有更新"), i && a.push(`${i} 个失败`), a.length || a.push("没有更新"), `已检查 ${t.length} 个来源:${a.join(" · ")}`;
}
-function wi(e) {
+function zi(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 Ti = (e) => (e?.results || []).filter((e) => !e.ok), Ei = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", Di = (e) => e.last_checked_at ? ir(e.last_checked_at) : "未检查", Oi = /* @__PURE__ */ new Set([
+var Bi = (e) => (e?.results || []).filter((e) => !e.ok), Vi = (e) => (e?.results || []).find((e) => e.evidence_error)?.evidence_error || "", Hi = (e) => e.last_checked_at ? yr(e.last_checked_at) : "未检查", Ui = /* @__PURE__ */ new Set([
"fanbox",
"patreon",
"subscribestar",
@@ -11870,49 +11904,49 @@ var Ti = (e) => (e?.results || []).filter((e) => !e.ok), Ei = (e) => (e?.results
"gofile",
"f95zone",
"simpcity"
-]), ki = (e) => Oi.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", Ai = {
+]), Wi = (e) => Ui.has(e) ? `/source-icon?provider=${encodeURIComponent(e)}` : "", Gi = {
required: "需要",
optional: "可选",
none: "不需要",
blocked: "暂时无法连接"
-}, ji = (e) => !!e.present && !e.missing.length, Mi = [
+}, Ki = (e) => !!e.present && !e.missing.length, qi = [
["", "全部"],
["new", "未看"],
["saved", "已保存"],
["ignored", "已忽略"]
-], Ni = [
+], Ji = [
["new", "更新时间"],
["hot", "热度"],
["dur", "时长"]
-], Pi = {
+], Yi = {
new: ["从新到旧", "从旧到新"],
hot: ["从高到低", "从低到高"],
dur: ["从长到短", "从短到长"]
-}, Fi = "rand";
-function Ii(e, t) {
+}, Xi = "rand";
+function Zi(e, t) {
let n = (e) => encodeURIComponent(e.join(","));
return `/api/follow?limit=100&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.durMin ? `&dur_min=${e.durMin}` : "") + (e.durMax ? `&dur_max=${e.durMax}` : "") + (e.sort === "new" ? "" : `&sort=${e.sort}`) + (e.sort === "rand" ? `&seed=${e.seed}` : "") + (e.dir === "desc" ? "" : `&dir=${e.dir}`);
}
-var Li = 18e5;
-function Ri(e, t) {
+var Qi = 18e5;
+function $i(e, t) {
return {
queryKey: [
"follow-feed",
- Ii(e, 0),
+ Zi(e, 0),
t
],
- queryFn: ({ pageParam: t, signal: n }) => B(Ii(e, t), n),
+ queryFn: ({ pageParam: t, signal: n }) => B(Zi(e, t), n),
initialPageParam: 0,
getNextPageParam: (e) => e.has_more ? (e.offset || 0) + 100 : void 0,
placeholderData: ke,
- gcTime: Li
+ gcTime: Qi
};
}
-var zi = ["follow-feed", "credentials"], Bi = (e) => B(or, e).catch(() => ({ providers: [] }));
-async function Vi(e, t) {
- let n = Ri(e.view, e.revision);
+var ea = ["follow-feed", "credentials"], ta = (e) => B(xr, e).catch(() => ({ providers: [] }));
+async function na(e, t) {
+ let n = $i(e.view, e.revision);
H.removeQueries({
- queryKey: zi,
+ queryKey: ea,
exact: !0
});
let r = H.getQueryData(n.queryKey) !== void 0;
@@ -11924,13 +11958,13 @@ async function Vi(e, t) {
}),
initialPageParam: 0,
getNextPageParam: n.getNextPageParam,
- gcTime: Li
+ gcTime: Qi
}), H.fetchQuery({
- queryKey: zi,
- queryFn: () => Bi(t)
+ queryKey: ea,
+ queryFn: () => ta(t)
})]);
}
-function Hi(e) {
+function ra(e) {
if (!e?.pages.length) return null;
let t = e.pages, n = t[t.length - 1];
return {
@@ -11939,10 +11973,10 @@ function Hi(e) {
groups: t.flatMap((e) => e.groups || [])
};
}
-function Ui(e, t, n) {
- return [...e].sort((e, r) => Rn(n, t(e)) - Rn(n, t(r)) || String(t(e)).localeCompare(String(t(r))));
+function ia(e, t, n) {
+ return [...e].sort((e, r) => $n(n, t(e)) - $n(n, t(r)) || String(t(e)).localeCompare(String(t(r))));
}
-function Wi(e) {
+function aa(e) {
let t = /* @__PURE__ */ new Set();
return [
e.primary,
@@ -11950,14 +11984,14 @@ function Wi(e) {
...e.duplicates
].filter((e) => !e || t.has(e.id) ? !1 : (t.add(e.id), !0));
}
-function Gi(e) {
+function oa(e) {
let t = H.getQueryCache().findAll({ queryKey: ["follow-feed"] }).sort((e, t) => t.state.dataUpdatedAt - e.state.dataUpdatedAt);
for (let n of t) {
let t = n.state.data;
if (!Array.isArray(t?.pages) || !t.pages.length) continue;
let r = t.pages[t.pages.length - 1];
for (let n of t.pages) for (let t of n.groups || []) {
- let n = Wi(t).find((t) => t.id === e);
+ let n = aa(t).find((t) => t.id === e);
if (n) return {
item: n,
group: t,
@@ -11968,7 +12002,7 @@ function Gi(e) {
}
return null;
}
-function Ki(e) {
+function sa(e) {
H.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
@@ -11978,7 +12012,7 @@ function Ki(e) {
...t,
groups: (t.groups || []).map((t) => {
let n = (t) => t.id === e.id ? e : t;
- return Wi(t).some((t) => t.id === e.id) ? {
+ return aa(t).some((t) => t.id === e.id) ? {
...t,
primary: n(t.primary),
variants: t.variants.map(n),
@@ -11988,30 +12022,30 @@ function Ki(e) {
}))
});
}
-function qi(e, t) {
+function ca(e, t) {
H.setQueriesData({
queryKey: ["follow-feed"],
predicate: (e) => Array.isArray(e.state.data?.pages)
- }, (n) => n && aa(n, null, e, t));
+ }, (n) => n && ba(n, null, e, t));
}
-function Ji(e) {
- return Wi(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
+function la(e) {
+ return aa(e).sort((e, t) => (Date.parse(t.published_at || "") || 0) - (Date.parse(e.published_at || "") || 0) || (+t.id || 0) - (+e.id || 0));
}
-function Yi(e) {
+function ua(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 Xi(e) {
+function da(e) {
let t = /* @__PURE__ */ new Set();
- return Wi(e).forEach((e) => Yi(e).forEach((e) => t.add(e))), t;
+ return aa(e).forEach((e) => ua(e).forEach((e) => t.add(e))), t;
}
-function Zi(e, t) {
+function fa(e, t) {
let n = t === "images" ? "image" : "video";
- return Ji(e).find((e) => Yi(e).has(n)) || e.primary;
+ return la(e).find((e) => ua(e).has(n)) || e.primary;
}
-function Qi(e) {
+function pa(e) {
return {
status: "",
media: "videos",
@@ -12026,16 +12060,16 @@ function Qi(e) {
seed: 0
};
}
-function $i(e) {
- return Ji(e).filter((e) => e.playable && e.media_kind === "video");
+function ma(e) {
+ return la(e).filter((e) => e.playable && e.media_kind === "video");
}
-var ea = {
+var ha = {
video: "个视频",
image: "张图片",
mixed: "个媒体"
};
-function ta({ 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} ${ea[s] || ea.mixed}` : o > 1 ? `${o} 个来源` : "", l = s === "image" || s !== "video" && r ? "pics" : "play", u = /* @__PURE__ */ new Set([t ?? e]), d = e ? [e] : [];
+function ga({ 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} ${ha[s] || ha.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,
@@ -12044,14 +12078,14 @@ function ta({ cover: e = "", coverFace: t = null, stack: n = null, imageView: r
faces: d.length > 1 ? d.slice(0, i) : []
};
}
-function na(e) {
+function _a(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 ra(e, t, n) {
- return e === t ? Pi[e] ? {
+function va(e, t, n) {
+ return e === t ? Yi[e] ? {
sort: e,
dir: n === "asc" ? "desc" : "asc"
} : null : {
@@ -12059,13 +12093,13 @@ function ra(e, t, n) {
dir: "desc"
};
}
-function ia(e, t, n, r) {
- let i = ra(e, n, r);
+function ya(e, t, n, r) {
+ let i = va(e, n, r);
if (!i) return "";
- let a = Pi[i.sort];
+ let a = Yi[i.sort];
return `按${t}${a ? a[+(i.dir === "asc")] : ""}排序`;
}
-function aa(e, t, n, r) {
+function ba(e, t, n, r) {
let i = "", a = e.pages.map((e) => ({
...e,
groups: (e.groups || []).flatMap((e) => {
@@ -12095,7 +12129,7 @@ function aa(e, t, n, r) {
})
};
}
-function oa(e, t) {
+function xa(e, t) {
let n = [];
return e.author && n.push({
kind: "创作者",
@@ -12115,7 +12149,7 @@ function oa(e, t) {
label: e
})), n;
}
-function sa(e, t) {
+function Sa(e, t) {
return t.kind === "创作者" ? {
...e,
author: ""
@@ -12130,7 +12164,7 @@ function sa(e, t) {
tags: e.tags.filter((e) => e !== t.key)
};
}
-function ca(e, t) {
+function Ca(e, t) {
for (let n of e) {
let e = n.primary?.tag_types?.[t];
if (e) return e;
@@ -12138,13 +12172,13 @@ function ca(e, t) {
return "general";
}
// src/react/follow-feed/follow-view.ts
-function la(e, t, n) {
+function wa(e, t, n) {
let r = new URLSearchParams(e), i = (e) => [...new Set((r.get(e) || "").split(",").filter(Boolean))], a = (e) => {
let t = Number(r.get(e));
return t > 0 ? t : 0;
}, o = r.get("status"), s = r.get("sort");
return {
- status: Mi.find(([e]) => e && e === o)?.[0] || "",
+ status: qi.find(([e]) => e && e === o)?.[0] || "",
media: r.get("media") === "images" ? "images" : "videos",
author: i("author")[0] || "",
provider: i("provider")[0] || "",
@@ -12152,16 +12186,16 @@ function la(e, t, n) {
tags: i("tag"),
durMin: a("dur_min"),
durMax: a("dur_max"),
- sort: s === "rand" ? s : Ni.find(([e]) => e === s)?.[0] || "new",
+ sort: s === "rand" ? s : Ji.find(([e]) => e === s)?.[0] || "new",
seed: Number(r.get("seed")) >>> 0 || t || n(),
dir: r.get("dir") === "asc" ? "asc" : "desc"
};
}
-function ua(e) {
+function Ta(e) {
let t = new URLSearchParams();
return e.author && t.set("author", e.author), e.provider && t.set("provider", e.provider), e.tags.length && t.set("tag", e.tags.join(",")), e.work && t.set("work", e.work), e.durMin && t.set("dur_min", String(e.durMin)), e.durMax && t.set("dur_max", String(e.durMax)), e.status && t.set("status", e.status), e.media === "images" && t.set("media", e.media), e.sort !== "new" && t.set("sort", e.sort), e.sort === "rand" && t.set("seed", String(e.seed)), e.dir !== "desc" && t.set("dir", e.dir), "/follow" + (t.size ? `?${t}` : "");
}
-function da(e, t) {
+function Ea(e, t) {
return {
...e,
author: t,
@@ -12174,7 +12208,7 @@ function da(e, t) {
status: ""
};
}
-function fa(e, t) {
+function Da(e, t) {
return {
...e,
author: "",
@@ -12187,24 +12221,24 @@ function fa(e, t) {
};
}
// src/react/follow-feed/follow-controller.ts
-function pa(e, t, n) {
+function Oa(e, t, n) {
let r = () => {
- let t = la(e.location().search, e.view().seed, e.rollSeed);
+ let t = wa(e.location().search, e.view().seed, e.rollSeed);
return e.adoptView(t), t;
}, i = (t) => {
e.live() && e.push(t);
}, a = (t, n = {}) => {
- let r = Ii(e.view(), 0);
- e.adoptView(t), e.route(ua(t)), i({
+ let r = Zi(e.view(), 0);
+ e.adoptView(t), e.route(Ta(t)), i({
...n,
view: e.view()
- }), e.syncPhotoWalls(), Ii(e.view(), 0) !== r && e.scrollTop();
+ }), e.syncPhotoWalls(), Zi(e.view(), 0) !== r && e.scrollTop();
}, o = () => {
let t = e.rollSeed();
e.writeSession({ discoverySeed: t }), a({
...e.view(),
seed: t,
- sort: Fi
+ sort: Xi
}, { seed: e.session().discoverySeed });
}, s = {
...n,
@@ -12241,25 +12275,25 @@ function pa(e, t, n) {
discoverySeed: e.enterSeed(),
scrollY: 0,
...e.live() ? {} : { revision: e.session().revision + 1 }
- }), e.openPage("/follow")) : e.openPage(ua(e.view()));
+ }), e.openPage("/follow")) : e.openPage(Ta(e.view()));
}
};
}
// src/card-art/face-frame.ts
-var ma = .32, ha = .6;
-function ga(e) {
+var ka = .32, Aa = .6;
+function ja(e) {
return e ? Number.isFinite(e.cx) && Number.isFinite(e.cy) && Number(e.faceW) > 0 && Number(e.imgW) > 0 && Number(e.imgH) > 0 : !1;
}
-function _a(e, t, n = 1, r = ma, i = ha) {
- if (!ga(e) || !(t && t.w > 0 && t.h > 0)) return 1;
+function Ma(e, t, n = 1, r = ka, i = Aa) {
+ if (!ja(e) || !(t && t.w > 0 && t.h > 0)) return 1;
let a = n > 0 ? n : 1, o = Math.max(t.w / e.imgW, t.h / e.imgH), s = e.faceW * o;
if (!(s > 0)) return 1;
let c = Math.min(t.w, t.h), l = Math.max(r, 13 / c) * c / s, u = Math.max(t.w / (2 * Math.min(e.cx, 1 - e.cx) * e.imgW * o), t.h / (2 * Math.min(e.cy, 1 - e.cy) * e.imgH * o)), d = e.faceW / (s * a);
return Math.max(1, Math.min(Math.max(l, Math.min(u, i * c / s)), d));
}
-function va(e, t, n = 1, r = ma, i = ha) {
- let a = _a(e, t, n, r, i);
- if (a <= 1 || !ga(e) || !t) return null;
+function Na(e, t, n = 1, r = ka, i = Aa) {
+ let a = Ma(e, t, n, r, i);
+ if (a <= 1 || !ja(e) || !t) return null;
let o = Math.max(t.w / e.imgW, t.h / e.imgH) * a, s = e.imgW * o, c = e.imgH * o, l = Math.min(0, Math.max(t.w - s, t.w / 2 - e.cx * s)), u = Math.min(0, Math.max(t.h - c, t.h / 2 - e.cy * c)), d = (e, t) => Math.round(e / t * 1e4) / 100;
return {
zoom: Math.round(a * 1e3) / 1e3,
@@ -12270,48 +12304,48 @@ function va(e, t, n = 1, r = ma, i = ha) {
};
}
// src/card-art/image-fallback.ts
-var ya = "|", ba = "closest:";
-function xa(e) {
- return String(e ?? "").split(ya).map((e) => e.trim()).filter(Boolean);
+var Pa = "|", Fa = "closest:";
+function Ia(e) {
+ return String(e ?? "").split(Pa).map((e) => e.trim()).filter(Boolean);
}
-function Sa({ drop: e = "self", fallbacks: t = [], initial: n = "", dropClass: r = "", dropStyle: i = !1 } = {}) {
+function La({ drop: e = "self", fallbacks: t = [], initial: n = "", dropClass: r = "", dropStyle: i = !1 } = {}) {
let a = (Array.isArray(t) ? t : [t]).filter(Boolean);
return [
`data-drop="${z(e)}"`,
- a.length ? `data-fallbacks="${z(a.join(ya))}"` : "",
+ a.length ? `data-fallbacks="${z(a.join(Pa))}"` : "",
n ? `data-initial="${z(n)}"` : "",
r ? `data-drop-class="${z(r)}"` : "",
i ? "data-drop-style" : ""
].filter(Boolean).join(" ");
}
-function Ca(e) {
+function Ra(e) {
if (!e || !e.dataset || !e.dataset.drop) return "";
- let t = xa(e.dataset.fallbacks);
+ let t = Ia(e.dataset.fallbacks);
if (t.length) {
let [n = "", ...r] = t;
- return "dropStyle" in e.dataset && e.removeAttribute("style"), delete e.dataset.facebox, r.length ? e.dataset.fallbacks = r.join(ya) : delete e.dataset.fallbacks, n === e.dataset.fallbackNoteSrc && e.dataset.fallbackNote && (e.title = e.dataset.fallbackNote, e.setAttribute("aria-label", e.dataset.fallbackNote)), e.src = n, "retry";
+ return "dropStyle" in e.dataset && e.removeAttribute("style"), delete e.dataset.facebox, r.length ? e.dataset.fallbacks = r.join(Pa) : delete e.dataset.fallbacks, n === e.dataset.fallbackNoteSrc && e.dataset.fallbackNote && (e.title = e.dataset.fallbackNote, e.setAttribute("aria-label", e.dataset.fallbackNote)), e.src = n, "retry";
}
let n = e.dataset.drop;
- if (n.startsWith(ba)) return (e.closest(n.slice(8)) || e).remove(), "drop";
+ if (n.startsWith(Fa)) return (e.closest(n.slice(8)) || e).remove(), "drop";
if (n === "initial") {
let t = document.createElement("span");
return t.className = e.dataset.dropClass || "", t.textContent = e.dataset.initial || "", e.replaceWith(t), "drop";
}
return e.remove(), "drop";
}
-var wa = /* @__PURE__ */ new WeakSet();
-function Ta(e) {
- wa.has(e) || (wa.add(e), e.addEventListener("error", (e) => {
- e.target instanceof HTMLImageElement && Ca(e.target);
+var za = /* @__PURE__ */ new WeakSet();
+function Ba(e) {
+ za.has(e) || (za.add(e), e.addEventListener("error", (e) => {
+ e.target instanceof HTMLImageElement && Ra(e.target);
}, !0));
}
// src/card-art/native-image.ts
-function Ea(e, t, n, r) {
+function Va(e, t, n, r) {
if (!(e > 0 && t > 0 && n > 0 && r > 0)) return 0;
let i = e / n, a = t / r;
return i > 1.001 || a > 1.001 || Math.abs(i - a) > Math.max(i, a) * .01 ? 0 : i;
}
-function Da(e, t, n, r, i = 1) {
+function Ha(e, t, n, r, i = 1) {
let a = Number.isFinite(i) && i > 0 ? i : 1;
e /= a, t /= a;
let o = [
@@ -12326,15 +12360,15 @@ function Da(e, t, n, r, i = 1) {
height: t * c
};
}
-var Oa = .1;
-function ka(e, t, n, r) {
+var Ua = .1;
+function Wa(e, t, n, r) {
if (![
e,
t,
n,
r
].every((e) => Number.isFinite(e) && e > 0)) return null;
- let i = Math.min(n / e, r / t), a = e * i, o = t * i, s = Math.min(n, r) * Oa;
+ let i = Math.min(n / e, r / t), a = e * i, o = t * i, s = Math.min(n, r) * Ua;
return Math.min(a, o) >= s ? null : o < a ? {
width: a,
height: s
@@ -12344,37 +12378,37 @@ function ka(e, t, n, r) {
};
}
// src/card-art/representatives.ts
-var Aa = /* @__PURE__ */ new Map();
-function ja(e) {
+var Ga = /* @__PURE__ */ new Map();
+function Ka(e) {
(e || []).forEach((e) => {
- e.rep && e.has_avatar && Aa.set(e.k, e.rep);
+ e.rep && e.has_avatar && Ga.set(e.k, e.rep);
});
}
-function Ma(e) {
- return Aa.get(e);
+function qa(e) {
+ return Ga.get(e);
}
// src/jav-artwork.ts
-function Na(e) {
+function Ja(e) {
return [
"small",
"sleeve",
"preview"
].includes(String(e)) ? "small" : "big";
}
-function Pa(e) {
+function Ya(e) {
return {
- javLayout: Na(e.javLayout),
- javImage: Fa(e.javLayout === "preview" ? "thumbnail" : e.javImage)
+ javLayout: Ja(e.javLayout),
+ javImage: Xa(e.javLayout === "preview" ? "thumbnail" : e.javImage)
};
}
-function Fa(e) {
+function Xa(e) {
return e === "thumbnail" ? "thumbnail" : "cover";
}
-function Ia(e, t) {
- return e.is_jav && e.code && e.has_cover && (Fa(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
+function Za(e, t) {
+ return e.is_jav && e.code && e.has_cover && (Xa(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";
}
-var La = .704, Ra = .85;
-function za(e, t, n = !1) {
+var Qa = .704, $a = .85;
+function eo(e, t, n = !1) {
let r = Number(e?.px?.[0]), i = Number(e?.px?.[1]), a = Number(e?.x0);
if (!(r > 0 && i > 0 && t > 0) || !Number.isFinite(a)) return null;
let o = (e, t, n) => Math.min(n, Math.max(0, Number.isFinite(Number(e)) ? Number(e) : t)), s = o(a, 0, r), c = Math.max(s, o(e?.x1, r, r)), l = o(e?.y0, 0, i), u = Math.max(l, o(e?.y1, i, i)), d = c - s, f = u - l;
@@ -12394,38 +12428,38 @@ function za(e, t, n = !1) {
height: g(i / f * m)
};
}
-function Ba(e, t) {
+function to(e, t) {
e.querySelectorAll("img[data-jav-image]").forEach((e) => {
- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !(!n || Fa(t) !== "cover" && r), a = i ? n : r;
+ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !(!n || Xa(t) !== "cover" && r), a = i ? n : r;
e.classList.toggle("cover", i), e.classList.toggle("whole", i && e.dataset.javImageLayout !== "big"), e.classList.toggle("front", i && e.dataset.javImageLayout === "big"), e.classList.remove("panel"), e.removeAttribute("style"), e.closest(".pic,[data-media-pic]")?.style.removeProperty("--cover-blur"), a && e.getAttribute("src") !== a && (e.src = a);
});
}
-function Va(e, t) {
+function no(e, t) {
let n = [];
return e.querySelectorAll("img[data-jav-image]").forEach((e) => {
e.dataset.javImageLayout !== t && (e.dataset.javImageLayout = t, e.classList.contains("cover") && (e.classList.toggle("whole", t !== "big"), e.classList.toggle("front", t === "big"), e.classList.remove("panel"), e.removeAttribute("style"), e.closest(".pic,[data-media-pic]")?.style.removeProperty("--cover-blur"), e.complete && e.naturalWidth && n.push(e)));
}), n;
}
// src/card-art/markup.ts
-var Ha = "代表作画面,非本人", Ua = (e, t) => t ? `${e}&v=${encodeURIComponent(t)}` : e, Wa = (e, t = !1) => {
+var ro = "代表作画面,非本人", io = (e, t) => t ? `${e}&v=${encodeURIComponent(t)}` : e, ao = (e, t = !1) => {
let n = t === !0 ? 1 : t || 0;
- return Ua(`/cover?code=${encodeURIComponent(e.cover_key || e.code || "")}${n ? `&thumb=${n}` : ""}`, e.cover_version);
-}, Ga = (e) => Wa(e, (window.devicePixelRatio || 1) <= 1.5 ? 2 : 1), Ka = (e) => `/cover-image?code=${encodeURIComponent(e.code || "")}`, qa = (e, t, n) => Ua(`/logo?studio=${encodeURIComponent(e)}&variant=${t}`, n), Ja = (e) => e && typeof e == "object" ? e : null;
-function Ya(e) {
+ return io(`/cover?code=${encodeURIComponent(e.cover_key || e.code || "")}${n ? `&thumb=${n}` : ""}`, e.cover_version);
+}, oo = (e) => ao(e, (window.devicePixelRatio || 1) <= 1.5 ? 2 : 1), so = (e) => `/cover-image?code=${encodeURIComponent(e.code || "")}`, co = (e, t, n) => io(`/logo?studio=${encodeURIComponent(e)}&variant=${t}`, n), lo = (e) => e && typeof e == "object" ? e : null;
+function uo(e) {
return e && e.is_jav ? "女优" : "艺人";
}
-function Xa({ kind: e = "performer", id: t = null, hasImage: n = !1, version: r = "", rep: i = null, mark: a = null, logo: o = "", logoVersion: s = "", logoVariant: c = "logo", alt: l = "", lazy: u = !0, style: d = "", dropStyle: f = !1, focus: p = null, thumb: m = !0, standIn: h = !1 } = {}) {
- let g = !!(t && n), _ = g ? Ua(`/entity-image?kind=${e}&id=${t}${m ? "&thumb=1" : ""}`, r) : "", v = i ? `/avatar?id=${i}` : "", y = !!o, b = y ? qa(o, c, s) : _ || v || (a ? `/link-mark?id=${a}` : "");
+function fo({ kind: e = "performer", id: t = null, hasImage: n = !1, version: r = "", rep: i = null, mark: a = null, logo: o = "", logoVersion: s = "", logoVariant: c = "logo", alt: l = "", lazy: u = !0, style: d = "", dropStyle: f = !1, focus: p = null, thumb: m = !0, standIn: h = !1 } = {}) {
+ let g = !!(t && n), _ = g ? io(`/entity-image?kind=${e}&id=${t}${m ? "&thumb=1" : ""}`, r) : "", v = i ? `/avatar?id=${i}` : "", y = !!o, b = y ? co(o, c, s) : _ || v || (a ? `/link-mark?id=${a}` : "");
if (!b) return "";
- let x = y ? [_, v].filter(Boolean) : g && v ? [v] : [], S = g && !y, C = S ? to(p) : "", w = d || eo(p);
- return `<img src="${b}" width="128" height="128" alt="${l}"${h && b === v ? ` title="${Ha}" aria-label="${Ha}"` : ""}${h && x.includes(v) ? ` data-fallback-note-src="${z(v)}" data-fallback-note="${Ha}"` : ""}${u ? " loading=\"lazy\"" : ""} decoding="async"${S ? w : ""} ${C}${Sa({
+ let x = y ? [_, v].filter(Boolean) : g && v ? [v] : [], S = g && !y, C = S ? _o(p) : "", w = d || go(p);
+ return `<img src="${b}" width="128" height="128" alt="${l}"${h && b === v ? ` title="${ro}" aria-label="${ro}"` : ""}${h && x.includes(v) ? ` data-fallback-note-src="${z(v)}" data-fallback-note="${ro}"` : ""}${u ? " loading=\"lazy\"" : ""} decoding="async"${S ? w : ""} ${C}${La({
dropStyle: (f || !!C || !!w) && S,
fallbacks: x
})}>`;
}
-function Za(e, t, n, r = "performer", i = null, a = "", o = "icon", s = void 0, c = !0) {
- let l = s === void 0 ? t && t.avatar_focus || null : s, u = !t?.has_image && !a && t?.source_avatar_url ? `<img src="${z(t.source_avatar_url)}" width="128" height="128" alt="" loading="lazy" decoding="async" ${Sa({ fallbacks: t.source_avatar_fallbacks || [] })}>` : "";
- return `<span class="ini">${z(Fn(e))}</span>` + (u || Xa({
+function po(e, t, n, r = "performer", i = null, a = "", o = "icon", s = void 0, c = !0) {
+ let l = s === void 0 ? t && t.avatar_focus || null : s, u = !t?.has_image && !a && t?.source_avatar_url ? `<img src="${z(t.source_avatar_url)}" width="128" height="128" alt="" loading="lazy" decoding="async" ${La({ fallbacks: t.source_avatar_fallbacks || [] })}>` : "";
+ return `<span class="ini">${z(Xn(Qt(r, e, t?.id)))}</span>` + (u || fo({
kind: r,
id: t && t.id,
hasImage: !!(t && t.has_image),
@@ -12440,19 +12474,19 @@ function Za(e, t, n, r = "performer", i = null, a = "", o = "icon", s = void 0,
standIn: !!(t && t.avatar_stand_in)
}));
}
-function Qa(e, t, n) {
- return Za(e, t, n ? Ma(e) : null, n || "performer");
+function mo(e, t, n) {
+ return po(e, t, n ? qa(e) : null, n || "performer");
}
-function $a(e) {
- let t = Ja(e);
+function ho(e) {
+ let t = lo(e);
return t && t.axis === "x" ? `${t.pct}% 50%` : t && t.axis === "y" ? `50% ${t.pct}%` : "";
}
-function eo(e) {
- let t = $a(e);
+function go(e) {
+ let t = ho(e);
return t ? ` style="object-position:${t}"` : "";
}
-function to(e) {
- let t = Ja(e)?.box;
+function _o(e) {
+ let t = lo(e)?.box;
return t ? ` data-facebox="${[
t.cx,
t.cy,
@@ -12461,8 +12495,8 @@ function to(e) {
t.imgH
].map(Number).join(" ")}"` : "";
}
-function no(e, t, n = !1) {
- let r = Ga(e), i = /ブルーレイ|blu[\s-]?ray/i.test(String(e.title || e.display_title || e.name || "")), a = e.cover_frame || {}, o = e.poster_box?.method !== "manual" && (a.layout === "still" || /^(IENEE|IENFE|SDHS)-/i.test(String(e.code || "")) || /(?:【|\[|\(|()\s*(?:[48]K\s*)?VR\s*(?:】|\]|\)|))/i.test(String(e.title || e.display_title || e.name || ""))), s = a.cy == null ? null : o ? Math.min(1, Math.max(0, a.cy)) : Math.min(.6, Math.max(.05, a.cy)), c = [a.cx == null ? "" : ` data-cx="${a.cx}"`, s == null ? "" : ` data-cy="${s}"`].join(""), l = e.poster_box, u = l ? ` data-posterbox="${[
+function vo(e, t, n = !1) {
+ let r = oo(e), i = /ブルーレイ|blu[\s-]?ray/i.test(String(e.title || e.display_title || e.name || "")), a = e.cover_frame || {}, o = e.poster_box?.method !== "manual" && (a.layout === "still" || /^(IENEE|IENFE|SDHS)-/i.test(String(e.code || "")) || /(?:【|\[|\(|()\s*(?:[48]K\s*)?VR\s*(?:】|\]|\)|))/i.test(String(e.title || e.display_title || e.name || ""))), s = a.cy == null ? null : o ? Math.min(1, Math.max(0, a.cy)) : Math.min(.6, Math.max(.05, a.cy)), c = [a.cx == null ? "" : ` data-cx="${a.cx}"`, s == null ? "" : ` data-cy="${s}"`].join(""), l = e.poster_box, u = l ? ` data-posterbox="${[
l.x0,
(l.px || [])[0],
(l.px || [])[1],
@@ -12473,45 +12507,45 @@ function no(e, t, n = !1) {
return `<img class="poster cover ${t === "small" ? "whole" : "front"}" src="${r}"
width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}" decoding="async" data-cover-code="${z(e.code || "")}"${i ? " data-wide-sleeve=\"1\"" : ""}${o ? " data-cover-layout=\"still\"" : ""}${c}${u} data-drop="self">`;
}
-var ro = {
+var yo = {
kind: "",
html: ""
};
-function io(e, t, n, r) {
- let i = Ia(e, r);
- if (!i) return ro;
- let a = e.has_cover && e.code ? Ga(e) : "", o = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "", s = no(e, t, n), c = (s.match(/ data-(?:c[xy]|posterbox)="[^"]*"/g) || []).join(""), l = i === "cover" ? s : `<img class="poster" src="${o}" width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}" decoding="async"${c}>`;
+function bo(e, t, n, r) {
+ let i = Za(e, r);
+ if (!i) return yo;
+ let a = e.has_cover && e.code ? oo(e) : "", o = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "", s = vo(e, t, n), c = (s.match(/ data-(?:c[xy]|posterbox)="[^"]*"/g) || []).join(""), l = i === "cover" ? s : `<img class="poster" src="${o}" width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}" decoding="async"${c}>`;
return {
kind: i === "cover" ? "cover" : "thumb",
html: l.replace("<img ", `<img data-jav-image="${e.id}" data-jav-cover="${z(a)}" data-jav-thumb="${z(o)}" data-jav-image-layout="${t}" `)
};
}
-function ao(e, t, n, r) {
- return e.is_jav ? io(e, t, n, r) : e.follow_thumb_url ? {
+function xo(e, t, n, r) {
+ return e.is_jav ? bo(e, t, n, r) : e.follow_thumb_url ? {
kind: "thumb",
html: `<img class="poster" src="${z(e.follow_thumb_url)}" width="640" height="360" alt="" loading="${n ? "eager" : "lazy"}" decoding="async" referrerpolicy="no-referrer">`
- } : oo(e, t, n, r);
+ } : So(e, t, n, r);
}
-function oo(e, t, n, r) {
- return e.is_jav ? io(e, t, n, r) : e.has_cover && e.cover_key ? {
+function So(e, t, n, r) {
+ return e.is_jav ? bo(e, t, n, r) : e.has_cover && e.cover_key ? {
kind: "cover",
- html: no(e, t, n)
- } : so(e, n);
+ html: vo(e, t, n)
+ } : Co(e, n);
}
-function so(e, t) {
- return !e.has_thumb && !e.has_local_poster ? ro : {
+function Co(e, t) {
+ return !e.has_thumb && !e.has_local_poster ? yo : {
kind: "thumb",
html: `<img class="poster" src="/poster?id=${e.id}&c=4" width="640" height="360" alt="" loading="${t ? "eager" : "lazy"}" decoding="async">`
};
}
-function co(e, t) {
- return oo(e, "small", !1, t).html || "<span class=\"nopic\">无预览</span>";
+function wo(e, t) {
+ return So(e, "small", !1, t).html || "<span class=\"nopic\">无预览</span>";
}
-function lo(e, t) {
+function To(e, t) {
let n = e.has_thumb || e.has_local_poster ? `/poster?id=${e.id}&c=4` : "";
- return e.is_jav ? Ia(e, t) === "cover" ? Wa(e) : n : e.has_cover && e.cover_key ? Wa(e) : n;
+ return e.is_jav ? Za(e, t) === "cover" ? ao(e) : n : e.has_cover && e.cover_key ? ao(e) : n;
}
-function uo(e) {
+function Eo(e) {
let t = e.performers || [], n = e.performer_entities ?? e.entity_refs?.performer ?? [], r = t[0] || "", i = e.is_jav && r ? "" : e.creator || "";
return {
kind: i ? "creator" : r ? "performer" : "",
@@ -12522,33 +12556,33 @@ function uo(e) {
total: e.performer_total || t.length
};
}
-function fo(e) {
- let { kind: t, name: n, coStarred: r, performers: i, refs: a } = uo(e);
- return r ? `<div class="mavstack">${i.slice(0, 5).map((e, t) => `<span class="mav">${Za(e, a[t], Ma(e))}</span>`).join("")}</div>` : `<span class="mav">${Za(n, t === "performer" ? a[0] : e.creator_entity ?? e.entity_refs?.creator?.[0], t ? Ma(n) : null, t || "performer")}</span>`;
+function Do(e) {
+ let { kind: t, name: n, coStarred: r, performers: i, refs: a } = Eo(e);
+ return r ? `<div class="mavstack">${i.slice(0, 5).map((e, t) => `<span class="mav">${po(e, a[t], qa(e))}</span>`).join("")}</div>` : `<span class="mav">${po(n, t === "performer" ? a[0] : e.creator_entity ?? e.entity_refs?.creator?.[0], t ? qa(n) : null, t || "performer")}</span>`;
}
-function po(e, t) {
+function Oo(e, t) {
let n = (e.performers || [])[0];
- return (e.is_jav && n ? n : e.creator) || n || e.studio || e.code || t((e.tags || [])[0] || "") || "为你推荐";
+ return e.is_jav && n ? Qt("performer", n) : e.creator ? Qt("creator", e.creator) : (n ? Qt("performer", n) : "") || e.studio || e.code || t((e.tags || [])[0] || "") || "为你推荐";
}
// src/ui-kit/overlay-scrollbar.ts
-var mo = /* @__PURE__ */ new Map();
-function ho(e) {
- mo.get(e)?.destroy();
+var ko = /* @__PURE__ */ new Map();
+function Ao(e) {
+ ko.get(e)?.destroy();
}
-function go() {
- for (let [e, t] of mo) e.isConnected ? t.repair() : t.destroy();
+function jo() {
+ for (let [e, t] of ko) e.isConnected ? t.repair() : t.destroy();
}
-function _o(e) {
- for (let [t, n] of mo) (t === e || e.contains(t)) && n.destroy();
+function Mo(e) {
+ for (let [t, n] of ko) (t === e || e.contains(t)) && n.destroy();
}
-function vo(e) {
- for (let [t, n] of mo) (t === e || e.contains(t)) && n();
+function No(e) {
+ for (let [t, n] of ko) (t === e || e.contains(t)) && n();
}
-function yo(e, { variant: t = "", axes: n } = {}) {
+function Po(e, { variant: t = "", axes: n } = {}) {
if (!e) return null;
if (e.dataset.overlayScrollbar) {
if (!n || e.dataset.overlayAxes === n.join("")) return null;
- ho(e);
+ Ao(e);
}
let r = e === document.documentElement, i = r ? ["y"] : n ?? ["y", "x"], a = getComputedStyle(e), o = !r && (a.position === "absolute" || a.position === "fixed" || e.matches("dialog,[popover]")), s = r ? document.body : o ? e : e.parentElement;
if (!s) return null;
@@ -12684,54 +12718,54 @@ function yo(e, { variant: t = "", axes: n } = {}) {
e && T();
},
destroy() {
- mo.get(e) === O && (h = !0, mo.delete(e), l.abort(), E.disconnect(), D?.disconnect(), x !== null && cancelAnimationFrame(x), w !== null && cancelAnimationFrame(w), f.forEach(({ track: e }) => e.remove()), d?.remove(), delete e.dataset.overlayScrollbar, delete e.dataset.overlayAxes, delete e.dataset.scrollEdges, e.style.removeProperty("--scroll-edge-top"), e.style.removeProperty("--scroll-edge-bottom"), u && s.style.position === "relative" && ![...mo.keys()].some((e) => e.parentElement === s) && (s.style.position = c));
+ ko.get(e) === O && (h = !0, ko.delete(e), l.abort(), E.disconnect(), D?.disconnect(), x !== null && cancelAnimationFrame(x), w !== null && cancelAnimationFrame(w), f.forEach(({ track: e }) => e.remove()), d?.remove(), delete e.dataset.overlayScrollbar, delete e.dataset.overlayAxes, delete e.dataset.scrollEdges, e.style.removeProperty("--scroll-edge-top"), e.style.removeProperty("--scroll-edge-bottom"), u && s.style.position === "relative" && ![...ko.keys()].some((e) => e.parentElement === s) && (s.style.position = c));
}
});
- return mo.set(e, O), O;
+ return ko.set(e, O), O;
}
// src/ui-kit/collapse.ts
-var bo = /* @__PURE__ */ new WeakMap();
-function xo(e, t, n) {
- Co(t, n, () => e.open, (t) => {
+var Fo = /* @__PURE__ */ new WeakMap();
+function Io(e, t, n) {
+ Ro(t, n, () => e.open, (t) => {
e.open = t;
});
}
-function So(e, t) {
- Co(e, t, () => !e.hidden, (t) => {
+function Lo(e, t) {
+ Ro(e, t, () => !e.hidden, (t) => {
e.hidden = !t;
});
}
-function Co(e, t, n, r) {
+function Ro(e, t, n, r) {
e.classList.add("ui-fcollapse");
- let i = (bo.get(e) || 0) + 1;
- bo.set(e, i);
- let a = () => bo.get(e) === i;
+ let i = (Fo.get(e) || 0) + 1;
+ Fo.set(e, i);
+ let a = () => Fo.get(e) === i;
if (t) {
e.inert = !1;
let t = n() ? e.getBoundingClientRect().height : 0;
- r(!0), To(e, t, a);
- } else e.inert = !0, e.classList.remove("ui-fcollapse-settled"), e.style.height = e.getBoundingClientRect().height + "px", e.getBoundingClientRect(), e.style.height = "0px", wo(e, () => {
+ r(!0), Bo(e, t, a);
+ } else e.inert = !0, e.classList.remove("ui-fcollapse-settled"), e.style.height = e.getBoundingClientRect().height + "px", e.getBoundingClientRect(), e.style.height = "0px", zo(e, () => {
a() && (r(!1), e.style.height = "");
});
}
-function wo(e, t) {
+function zo(e, t) {
let n = !1, r, i = (a) => {
a && a.propertyName !== "height" || n || (n = !0, e.removeEventListener("transitionend", i), clearTimeout(r), t());
};
e.addEventListener("transitionend", i), r = setTimeout(i, 260);
}
-function To(e, t, n = () => !0) {
- e.classList.remove("ui-fcollapse-settled"), e.style.height = t + "px", e.getBoundingClientRect(), e.style.height = e.scrollHeight + "px", wo(e, () => {
+function Bo(e, t, n = () => !0) {
+ e.classList.remove("ui-fcollapse-settled"), e.style.height = t + "px", e.getBoundingClientRect(), e.style.height = e.scrollHeight + "px", zo(e, () => {
n() && (e.style.height = "auto", e.classList.add("ui-fcollapse-settled"));
});
}
// src/ui-kit/sounds.ts
-var Eo = null, Do = !1;
-function Oo() {
+var Vo = null, Ho = !1;
+function Uo() {
let e = globalThis.AudioContext || globalThis.webkitAudioContext;
- return e ? (Eo ||= new e(), Eo.state === "suspended" && Eo.resume()?.catch?.(() => {}), Eo) : null;
+ return e ? (Vo ||= new e(), Vo.state === "suspended" && Vo.resume()?.catch?.(() => {}), Vo) : null;
}
-function ko(e, t, { type: n = "sine", from: r, to: i = r, duration: a, volume: o, attack: s = 0, start: c = 0, filter: l = null }) {
+function Wo(e, t, { type: n = "sine", from: r, to: i = r, duration: a, volume: o, attack: s = 0, start: c = 0, filter: l = null }) {
let u = t + c, d = e.createOscillator(), f = e.createGain();
d.type = n, d.frequency.setValueAtTime(r, u), i !== r && d.frequency.exponentialRampToValueAtTime(i, u + a), s ? (f.gain.setValueAtTime(.001, u), f.gain.exponentialRampToValueAtTime(o, u + s)) : f.gain.setValueAtTime(o, u), f.gain.exponentialRampToValueAtTime(.001, u + a);
let p = d;
@@ -12741,7 +12775,7 @@ function ko(e, t, { type: n = "sine", from: r, to: i = r, duration: a, volume: o
}
p.connect(f), f.connect(e.destination), d.start(u), d.stop(u + a + .01);
}
-function Ao(e, t, { duration: n, volume: r, filter: i, sweepTo: a = null, attack: o = 0 }) {
+function Go(e, t, { duration: n, volume: r, filter: i, sweepTo: a = null, attack: o = 0 }) {
let s = Math.max(1, Math.round(e.sampleRate * n)), c = e.createBuffer(1, s, e.sampleRate), l = c.getChannelData(0);
for (let e = 0; e < s; e++) l[e] = Math.random() * 2 - 1;
let u = e.createBufferSource();
@@ -12753,8 +12787,8 @@ function Ao(e, t, { duration: n, volume: r, filter: i, sweepTo: a = null, attack
u.disconnect(), d.disconnect(), f.disconnect();
}, u.start(t);
}
-var jo = {
- click: (e, t) => Ao(e, t, {
+var Ko = {
+ click: (e, t) => Go(e, t, {
duration: .06,
volume: .12,
filter: {
@@ -12762,24 +12796,24 @@ var jo = {
Q: 1
}
}),
- "toggle-on": (e, t) => ko(e, t, {
+ "toggle-on": (e, t) => Wo(e, t, {
from: 550,
to: 650,
duration: .08,
volume: .15
}),
- "toggle-off": (e, t) => ko(e, t, {
+ "toggle-off": (e, t) => Wo(e, t, {
from: 650,
to: 550,
duration: .08,
volume: .15
}),
success: (e, t) => {
- ko(e, t, {
+ Wo(e, t, {
from: 523,
duration: .12,
volume: .18
- }), ko(e, t, {
+ }), Wo(e, t, {
from: 653.75,
duration: .12,
volume: .18,
@@ -12787,12 +12821,12 @@ var jo = {
});
},
warning: (e, t) => {
- ko(e, t, {
+ Wo(e, t, {
type: "triangle",
from: 600,
duration: .08,
volume: .15
- }), ko(e, t, {
+ }), Wo(e, t, {
type: "triangle",
from: 600,
duration: .08,
@@ -12800,7 +12834,7 @@ var jo = {
start: .16
});
},
- error: (e, t) => ko(e, t, {
+ error: (e, t) => Wo(e, t, {
type: "sawtooth",
from: 400,
to: 200,
@@ -12812,7 +12846,7 @@ var jo = {
Q: 1
}
}),
- whoosh: (e, t) => Ao(e, t, {
+ whoosh: (e, t) => Go(e, t, {
duration: .12,
volume: .08,
attack: .036,
@@ -12822,66 +12856,66 @@ var jo = {
},
sweepTo: 6e3
}),
- pop: (e, t) => ko(e, t, {
+ pop: (e, t) => Wo(e, t, {
from: 1500,
to: 500,
duration: .04,
volume: .15
})
};
-Object.freeze(Object.keys(jo));
-function Mo(e) {
- Do = e === !0;
+Object.freeze(Object.keys(Ko));
+function qo(e) {
+ Ho = e === !0;
}
-function No(e) {
- let t = jo[e];
+function Jo(e) {
+ let t = Ko[e];
if (!t) throw Error(`没有「${e}」这种界面音效`);
- if (!Do) return !1;
- let n = Oo();
+ if (!Ho) return !1;
+ let n = Uo();
return n ? (t(n, n.currentTime), !0) : !1;
}
-var Po = "button,[role=\"button\"],[role=\"tab\"],[role=\"menuitem\"],[role=\"menuitemradio\"],[role=\"menuitemcheckbox\"],[role=\"option\"],summary,a[href]", Fo = "input[type=\"checkbox\"][role=\"switch\"]";
-function Io(e) {
+var Yo = "button,[role=\"button\"],[role=\"tab\"],[role=\"menuitem\"],[role=\"menuitemradio\"],[role=\"menuitemcheckbox\"],[role=\"option\"],summary,a[href]", Xo = "input[type=\"checkbox\"][role=\"switch\"]";
+function Zo(e) {
return e.disabled === !0 || e.getAttribute("aria-disabled") === "true";
}
-var Lo = /* @__PURE__ */ new WeakSet();
-function Ro(e = document) {
- Lo.has(e) || (Lo.add(e), e.addEventListener("click", (e) => {
- let t = e.target?.closest?.(Po);
- t && !Io(t) && No("click");
+var Qo = /* @__PURE__ */ new WeakSet();
+function $o(e = document) {
+ Qo.has(e) || (Qo.add(e), e.addEventListener("click", (e) => {
+ let t = e.target?.closest?.(Yo);
+ t && !Zo(t) && Jo("click");
}, { capture: !0 }), e.addEventListener("change", (e) => {
let t = e.target;
- t?.matches?.(Fo) && !Io(t) && No(t.checked ? "toggle-on" : "toggle-off");
+ t?.matches?.(Xo) && !Zo(t) && Jo(t.checked ? "toggle-on" : "toggle-off");
}, { capture: !0 }));
}
// src/ui-kit/anchored-menu.ts
-var zo = null, Bo = globalThis;
-Bo.__peachMenuCloser || (Bo.__peachMenuCloser = !0, document.addEventListener("click", (e) => {
- if (!zo) return;
+var es = null, ts = globalThis;
+ts.__peachMenuCloser || (ts.__peachMenuCloser = !0, document.addEventListener("click", (e) => {
+ if (!es) return;
let t = e.target;
- zo.menu.contains(t) || zo.toggle.contains(t) || (!zo.mount.contains(t) || t instanceof Element && t.closest("a[href],button,input,select,textarea,summary,[role=button],[role=menuitem],[tabindex]")) && zo.setOpen(!1);
+ es.menu.contains(t) || es.toggle.contains(t) || (!es.mount.contains(t) || t instanceof Element && t.closest("a[href],button,input,select,textarea,summary,[role=button],[role=menuitem],[tabindex]")) && es.setOpen(!1);
}, !0));
-function Vo() {
- zo && zo.setOpen(!1);
+function ns() {
+ es && es.setOpen(!1);
}
-var Ho = /* @__PURE__ */ new WeakMap();
-function Uo(e) {
- Ho.delete(e), e.classList.remove("leaving"), e.hidden && No("whoosh"), e.hidden = !1;
+var rs = /* @__PURE__ */ new WeakMap();
+function is(e) {
+ rs.delete(e), e.classList.remove("leaving"), e.hidden && Jo("whoosh"), e.hidden = !1;
}
-function Wo(e, t) {
- if (e.hidden || Ho.has(e)) return;
+function as(e, t) {
+ if (e.hidden || rs.has(e)) return;
let n = () => {
- Ho.get(e) === n && (Ho.delete(e), e.classList.remove("leaving"), e.hidden = !0, t && t());
+ rs.get(e) === n && (rs.delete(e), e.classList.remove("leaving"), e.hidden = !0, t && t());
};
- Ho.set(e, n), e.classList.add("leaving"), getComputedStyle(e).animationName === "none" ? n() : (e.addEventListener("animationend", (t) => {
+ rs.set(e, n), e.classList.add("leaving"), getComputedStyle(e).animationName === "none" ? n() : (e.addEventListener("animationend", (t) => {
t.target === e && n();
}, { once: !0 }), setTimeout(n, 240));
}
-var Go = () => 8 + (parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--topH")) || 0);
-function Ko(e, t) {
+var os = () => 8 + (parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--topH")) || 0);
+function ss(e, t) {
return e.target instanceof Node && e.target.contains(t);
}
-function qo(e, t, n, { side: r = !1, align: i = "end" } = {}) {
+function cs(e, t, n, { side: r = !1, align: i = "end" } = {}) {
let a = null, o = () => {
let e = t.getBoundingClientRect(), o = n.offsetWidth;
if (a = {
@@ -12891,26 +12925,26 @@ function qo(e, t, n, { side: r = !1, align: i = "end" } = {}) {
n.dataset.placement = "right", n.style.maxHeight = Math.max(0, innerHeight - 32) + "px", n.style.left = Math.max(16, Math.min(e.right + 8, innerWidth - o - 16)) + "px", n.style.top = Math.max(16, Math.min(e.top, innerHeight - n.offsetHeight - 16)) + "px";
return;
}
- let s = Go(), c = innerHeight - 8 - e.bottom - 8, l = e.top - 8 - s, u = n.scrollHeight + n.offsetHeight - n.clientHeight, d = c >= u || c >= l, f = Math.min(u, Math.max(d ? c : l, 0));
+ let s = os(), c = innerHeight - 8 - e.bottom - 8, l = e.top - 8 - s, u = n.scrollHeight + n.offsetHeight - n.clientHeight, d = c >= u || c >= l, f = Math.min(u, Math.max(d ? c : l, 0));
n.dataset.placement = d ? "bottom" : "top", n.style.maxHeight = f + "px";
let p = i === "start" || n.classList.contains("context-card") ? e.left : e.right - o;
n.style.left = Math.max(8, Math.min(p, innerWidth - o - 8)) + "px", n.style.top = (d ? e.bottom + 8 : e.top - 8 - f) + "px";
}, s = (e) => {
- if (!Ko(e, t) || !a) return;
+ if (!ss(e, t) || !a) return;
let n = t.getBoundingClientRect();
(e.target === document || e.target === window || Math.abs(n.left - a.left) > .5 || Math.abs(n.top - a.top) > .5) && d(!1);
}, c = n.hasAttribute("popover"), l = !1, u = !1, d = (r) => {
- u || (r ? (zo && zo.mount !== e && zo.setOpen(!1), l = !0, Uo(n), c && !n.matches(":popover-open") && n.showPopover(), o(), window.addEventListener("resize", o), window.addEventListener("scroll", s, {
+ u || (r ? (es && es.mount !== e && es.setOpen(!1), l = !0, is(n), c && !n.matches(":popover-open") && n.showPopover(), o(), window.addEventListener("resize", o), window.addEventListener("scroll", s, {
capture: !0,
passive: !0
- })) : (l = !1, window.removeEventListener("resize", o), window.removeEventListener("scroll", s, !0), Wo(n, () => {
+ })) : (l = !1, window.removeEventListener("resize", o), window.removeEventListener("scroll", s, !0), as(n, () => {
n.style.left = "", n.style.top = "", n.style.maxHeight = "", c && n.matches(":popover-open") && n.hidePopover();
- })), t.setAttribute("aria-expanded", String(r)), zo = r ? {
+ })), t.setAttribute("aria-expanded", String(r)), es = r ? {
mount: e,
menu: n,
toggle: t,
setOpen: d
- } : zo && zo.mount === e ? null : zo);
+ } : es && es.mount === e ? null : es);
}, f = (e) => {
e.stopPropagation(), d(!l);
}, p = (e) => {
@@ -12920,16 +12954,16 @@ function qo(e, t, n, { side: r = !1, align: i = "end" } = {}) {
setOpen: d,
isOpen: () => l,
dispose: () => {
- u || (u = !0, l = !1, t.removeEventListener("click", f), e.removeEventListener("keydown", p), window.removeEventListener("resize", o), window.removeEventListener("scroll", s, !0), zo?.menu === n && (zo = null), Ho.delete(n), n.classList.remove("leaving"), n.hidden = !0, c && n.matches(":popover-open") && n.hidePopover(), n.style.left = "", n.style.top = "", n.style.maxHeight = "", t.setAttribute("aria-expanded", "false"));
+ u || (u = !0, l = !1, t.removeEventListener("click", f), e.removeEventListener("keydown", p), window.removeEventListener("resize", o), window.removeEventListener("scroll", s, !0), es?.menu === n && (es = null), rs.delete(n), n.classList.remove("leaving"), n.hidden = !0, c && n.matches(":popover-open") && n.hidePopover(), n.style.left = "", n.style.top = "", n.style.maxHeight = "", t.setAttribute("aria-expanded", "false"));
}
};
}
// src/ui-kit/select-field.ts
-function Jo(e) {
+function ls(e) {
return e ? e.startsWith("data:image/png;base64,") ? `<img class="gselectmark" src="${z(e)}" alt="" width="16" height="16">` : R(e, "gselectmark") : "";
}
-function Yo(e, t, { label: n = "", attr: r = "", className: i = "" } = {}) {
- let a = e.find(([e]) => String(e) === String(t)) || e[0] || ["", ""], o = ([, e, t]) => `${Jo(t)}${z(e)}`, s = e.map(([e, t, n]) => `<button type="button" role="option" data-select-option="${z(e)}"
+function us(e, t, { label: n = "", attr: r = "", className: i = "" } = {}) {
+ let a = e.find(([e]) => String(e) === String(t)) || e[0] || ["", ""], o = ([, e, t]) => `${ls(t)}${z(e)}`, s = e.map(([e, t, n]) => `<button type="button" role="option" data-select-option="${z(e)}"
aria-selected="${String(e) === String(a[0])}" tabindex="-1"><span data-select-content>${o([
e,
t,
@@ -12940,13 +12974,13 @@ function Yo(e, t, { label: n = "", attr: r = "", className: i = "" } = {}) {
aria-expanded="false" aria-label="${z(n)}"><span data-select-label>${o(a)}</span>${R("chevron-down")}</button>
<div class="popmenu gselectmenu" role="listbox" aria-label="${z(n)}" popover="manual" data-select-menu hidden>${s}</div></div>`;
}
-function Xo(e) {
+function ds(e) {
let t = e.querySelector("[data-select-trigger]"), n = e.querySelector("[data-select-menu]"), r = e.querySelector("[data-select-label]"), i = () => [...n.querySelectorAll("[data-select-option]")], a = () => n.querySelector("[aria-selected=\"true\"]");
t.addEventListener("click", () => {
let r = `${t.getBoundingClientRect().width}px`;
n.style.minWidth = r, e.hasAttribute("data-fixed-width") && (n.style.width = r);
});
- let o = qo(e, t, n);
+ let o = cs(e, t, n);
t.addEventListener("click", () => {
o.isOpen() && a()?.focus();
});
@@ -12981,44 +13015,44 @@ function Xo(e) {
}), e;
}
// src/ui-kit/media-source-icons.ts
-var Zo = {
+var fs = {
local: "hard-drive",
guangya: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEWUlEQVR42sWXT2hcVRTGf/fNYCZdNNPGTaHaSUXFVQZSLLowoe3GdpEERHFhYqTQRBATcWlpSly56YQu4ipNZivYxCK46Z9EsBGkHdwItdhXrLixzaASo2bucXHve/feNzOagqQXHnPf/XPOd77z3XPfKLwmkxTZit4lkiEiykQK8wA5+5v0c5i5nNj3ZJ03nwPyKpmvEekFpGNZvV6PE58qdT7BEIoLRKqYOo0g6PtOogQEDkDWeS4DVgQ0MVpNqbGNpRSATDCEcLHJYcAAzWz4QHIqZCcdswwloWr7iBpWJzeWlIxTAq4CJSK7MNmQOhXrSGXeWzj205AGAiiLQAAt0JA6HZ09eRRDCKV0UmGoUsq8SzJoKRS7DgFJxpQxmjhRXsRg5pU4AAKIKvL7xmQeGPVWerJIHBACSX9TQw5EAlB75lLnnm1t18NgHqHsAPjGvCj8KHN27rEuONgPnV3w96/wVx3urZrotefMj0n5DABalfME59CjUXwGPGDlEegbgZ5+mtpmHW5fgusz8NtdF30AwKZCa9AKJeNIYERZ4anM0esuwWvzJurttK8+hLUZY1B5gaUpMIHlW+8Wh0YL7O2BU5dhb4lttxc/sEBmnE3lmba6yrf0re1RE7vj7RbOf1iBWhXqdw1D+3rh8DtQLIUgNuvwzXmaUm3T25yCJA3Kgjg+DS+fcXMPYvjkLYhXw1Ql/YHT0H861MXcs7C5bo+2BCzkpg8x3ZpDZTa8cQE6i274XB/8/K0TVt8oPDcI67FxFq9AYQ/sP2zm8wXIdcDWn7D7AOwuGdZsRWzNQFJMegfh1EU3tjoLy+85oR4agVfnzdydFZg/ZuY6izD1PRSKzXbjFageS2tF1FZEIvD0QDj29aKt41bJHV0Z7YiZ31iH7z5rbfdmFRruTsj/q5K7D4TvP9Ys9fZofXkeuntgz5Nw6X1jNDn363FzjbgyAzeqnhCzKXhmAKauuk2LY7C2YAWJExyJ6CyQ5LL5aMvtvVE1YlWZtBIexTAF9zOonyg7tCn1Ht2JohsCPS+Fe3+quas3eRpi6G9o82hpAWCj7t5fGIVdxRCE9mt5ereb0+C3ezWnCS1eXweAmkW4tuj6nUU4fiZTQPCMmijY1wvPj4a14vaKi1pjhScOsG6VAoArlZCFo5NwIgvCA/JUP5z8NLTxxVnn2Hx8uPUND1TbOnB0El45R1N6Ls8aagEeL5kUZY/qgximD3riU5n7Jbz62xeikQXj4GHa/RhmjxgQqkV5F3sSRKfA2hei6pvw+dntO791DSpH4Jc7nuCyAhT3NWTT0Z6BtBiV4MR0ezZuXTPCvb7Q8jpJo/aveNyF9N8AkrarCPvL7lr+o270kK0dD9mUTHAz/C7cwSbUIoRlHlWLWIwoUEGoPwL3McJSpCrUiRjbcfeKKfUxcQSg5lhCMQzEO5D3OophNcdS8O8YQMYpoRkix+j/LkxFDWGZAhVVcSn/Bw2n+w/oK+fWAAAAAElFTkSuQmCC",
115: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAHB0lEQVR4nO2bbUwURxjH/zN38qIcb4JWoIoHFYumWhDbRquNiSlYC4ZGjVYrotHWD1VTLdY00X7zbA22Na21KWqsUMHYSiygJjaRQDW+VK2YioBarVZBQA9QDm6nedajCuxxHrfH7dX+kiXcvszM8+zO7DPP/JfBzcQmfx4O1jpJEmKUgBTHwUYIIAyAwbYRZtoYUCdBVDLwi5yxCgjfo1Uly2vd2T7mjkJj3vgsUVitcwWkqQxstAv1CAFxnoEfZjpdbvXPq05p1gFxqSZDexuWCIhMCMTDHTBcYGA5+n7YdrEwy6xOkS4yJi07uMliWSGEeB9ACPqGBsbYFwE+PpvP7l/Z6BEHCCFYzDRTBgATBMLhCRhofMiqLsrawRgTvSuiFxinbxjK2pErgAnQAAwoE3rMrTmw5s9eXOscxpSNE5iQ9glgEDQEA24LxtNrij8sc+Y67szJscmmTAjpiNaMJ+Q2CemI3Ea1n4CZM/N1p5pqPoXASngDDNmJAcbVBQWzrI5PfRLjzTX7AKTCuyhMNBjTHTmBOypFvvPeZzyRamt775+A2GRTpgTxHbwYDraoqiQrx2kHGFM2TqBBBYAPvBsLGJ9i7+3AenjPn9DiaN/rV6QeSUpxgl4pwotNMeWqbXw/PceYuAiEBvk7dZ2/Xz8MCQvE2JERGB4ZgteXOt8jyRY5cBPi1a4Ro77rybbwVtUIzzDAF7mmOYiPGexSOZt2Hu31tRS12mzbbvctMCYtO1iO7VVmUXqSy8bX323Bjp9OutoUk81GZQc0WSwr1J7YBAb4IiNtnMvlbCs4jpYHba4VIhAu26jkgLhUk8E2pVWVRenj5S7QWyxtVhQcOoecH0+o0h6ykWztNga0t2GJ2vP5oAA/ZKQldtv/1Q+/Yv8vFWg0P3BYhrm5Fa2WdjWbFWKzdVMnB8iZHJVZ/NZ4BPTvfPfzis64NJipgc1W2QG8I4endhor2OCHd1ITOu27/6AN2btK4XEE4mWbYXMAJTD74u5/f+A07jS2QAt02MzlH5Cmqn/3u/d9vV6HyeOM8nFP02Ezo7y9hPu31MwQr86YjHdnv9zjOTXX7+D4uWsoKv0D5WeuwgMIDv/Belq0gFDP+JBAf8zv0veVMEYNlLc508bir1t3sffw78g/eA5/16mS7X4SGNnOacVG7b4/wN+5CWTk4CAsnzcRh79djPlvOnaeWkhCjOK0XKVmoXWNzdhTchalpy7Ld9YZ+vv5YP2yqfK8YfDAALgbASmOxSRvoGmv67GqHcJCBuDFkRHybC5pdBQSno8EY457XPW1O5i9ajca7t13V9Oo359kxuQNlwFEo494JsyAGVNGYeGMcbJzeuLcxZt4e02e63MA+1yh1+C/cXFfQIPc1vxjmJSxFZt3lcJqleye+0LcEKyYP9GdzTH0uQM6oPj+y9xyzM3Kw83ae3bPmzc9ARGDAt3qAI9ysuI6Zn2wG7X1TYrHfX30WDb7FbfVz23iBI9yo/YeFq/bK88VlJicZHRX1WZNOIA4X3ULuw6cVjwWER6I6Ai3rLybOclSoBFy9p2wO/ePHTpQ9foYUMdJkwONUNvQjIuXlSVBOp36w5UEUclJkAQNcdPOXIDTs6oyjMRYshpLQ1gl5big5nq96nVxxio4SdEeps21QVx0uGJesPKK6mo5QbZz0uGRFA0agMLk4ZGh3faX/XaF9HKqQjZXlSyvlUcW0uFBA9BUWKmvUxZZbTps5vIPnS4XHoZecwsU0mgHyypRUU0JK3XpsJnTH1mByXABHoKySFvWzpAXQrtOiT/aXKx+hQwXOlSn/NE+ZldE4E6GDQlGwaZ5eG4YyYcfcbu+CRkf5+Nuk+PFE2d53Fbe8Q/JT0mBiT6CJjlLZ76Eoq8zMTyq88B36WodFqzdgxu37c8SXaDBZqtMpxEnJsW0XgixDm6CNAKUGaLU+OzkMQgN6t/peLtVwjf5x7Alr1xeE3QHjLFPqouz1ivqAwJ8fDabLa3LXF0hHjEsDBMSoqHjHH4+egwM7g9jVCgS46O69XOC0l6Hyiuxs/CU3VBYFRhqycbOu7pgTNmwEAI5aiyMvjbeiEkJRhifDUXkoCB5qbyt3YrmFguu3mxE5dVaHCq7hPIzV2CV+iAWY8isKV6zvUcHiIcSmVKt6IDV1BNXFWd1k8jwbicyJkh4TMIi/EewiaTmKinKudIFpKYi4bEsMfN+LLKI2o6SnNu7inR1HOw9eDlkQ08Kct7TxbLCkiEb3gpDdk8qUcJhmoVU1yQ8hvdRaGs7XHJAQcEsK6muvepJILn8EyjFCafyTDbx9Nca1g9bqM87euwfhzlbw1P9yQxBFZDwmAILaATbR1NJzhpP/P/ZHFzkqf1wsitP7aezSjyVH0/DDlr/fP4fOwTeE5lpP+gAAAAASUVORK5CYII=",
pikpak: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAACY0lEQVR4nNWXy2tTQRSHv7m5RUWttqlNW1OairhKNbrU+lhE/AOkdCOIIO7arty0QhSxCIIQ7VJwIfgfCIJdFB+rgC32AVIflD5CbFUsoohJRiZzb5Ne05p4kxv94HCTc+bO+c0MM3eOoICD/TJswAAQBdoBH5UhA8wDo1mIv7ojpuyAsH9EBuQgkmuASXVJI4lN3BXDawIifXIQwQ28RDA0ERfDwpr2cQ9G7iSdhcOGteZeJ1eYKreB5DS1I2oiCJba2hDQVA9tjdDaCHMfICuhMwDJz5D8BMtftK9E2s2NttrJMOxvzSdT1rIb6goW69KIXsjr5/K+nxlIWWKWrOebJIxNFhXgK7r20QjcPL+59PllGH8LarDvU3oWFHU+CDZpK+TKA3j88vd+zGKd93av/y8lrKxao7Ls6bROrrj6EE6E9WzZppZKrJ0y0Hu8RAGhZuhohqk5nShp2Y/0+nZqxPaoFQsr2my2mNDSkBe01w/7AvAu9QcB/nrYs0vboU4qSsNOwCHAoMYY/5WAsckNt1NJ8WKY5TS+fF8/E7f/Lu5aQDrjLu5agOlzF3ct4NYFd3HXAk51uYv/k9vQLPeFr9/h4gh0dcCBNu17vaiP7nt9sGNblQVs3wo9x+DZNCRm9aUyFICebh0rF9PpWP22+QvqC3f2qLZyKda34XTMLsGLGSrO8xndtxMR6ZfqQ+tz7uczRyDor0zyxY/6LlDkoMqYVsUSKvSqho8SVB/JglqCUWqF4ImharVcueQ96j4bN3KFoiDmeXpJTOXO7QJVoyEZ8mgm0rm6sLA4talFef4LaurBZfZxNPMAAAAASUVORK5CYII=",
onedrive: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAL30lEQVR42u2aa4xd11XHf2ufez2v6/GMY2dix4nHbRw7tI5TmyZgFToKtCKokitoigT9kAopFEFFGqkSAUrDowiJD614SEj5EEG/VUXllQgQLbQVCNqIokoVQmmVKKiNgELcUGfuPXuvtfiw9z73zPUjduxAC3dJW/uc0Zk7Z/3Xf/3XWvsOzG1uc5vb3OY2t7nNbW5z+/9o8r/xR898Kp1txb7fAriABcTFRAKhafwfhkv6x39/YvSv/2cAuO9J3z92e1cc2E+qcDQFRwNYY1gAGkcChMYhgDQOyLPi/tTyYPArnz2x8MVvSwDuf9L3fyPZB2LgvSpOCpCCowLWOCaONo402WkJEIJDAxKcEEDEIfEUxgc+f3r0Z982ANz3CX+oEf/lFnZHcRIQmwyCBScVELxxJDgyyE5Lk0GQUAABwPKLTvyJke7+iU+dka9+ywJw/5O+P415DOfsRCCKE4EY8m6hx4QGpLEc7WaaCtJAECeII5JZIBgAnnheUvPg586s/Om3HAD3P+n7mwl/m+C21iAaRIGJOFGK00BqsgZ4yfnQGDQZhBp5AgxwRAzBwcm7OO42aV5s3vt3b1l97FrfeXAtv7z5I184mybtXTHGtYWF8Eb5z8mpZrSwlAzcQB1UwUSw4JjJFATL6AfAEYJkB90F3AkGLpLLhIBgeOYA4izYUvqtu//iha9/7q3rn/gfZcDr3/P0Vrvd/kxs49tTG9E2kdrI6fvuYOPIPsYKrcHYYKIwcUgCLZDEu+hbcJpmmvcEp6l6UGkvjpDpL57dF3EcA3FwWraHP/rUD+z+g1edAXc99PxmGp9/PLZxS9XwskyV4/dscui12Xl1SJojnAzUIDrZaYGEYOY0jeA4UiIuQTCdpkEXHvfMBBwozgP5R7bLPf4u8IoBCFfy0KmHn3tA4/YzqrplxWlVRdVYWVvk+OmDRKVbybPjavk6ASlBVMETeBIsgUTBk+MRPDqSBItAufeJl+ctP9M6HgWiY9GxCI7uO/Hx/3jiVQPg1MPPfTi1+rgmRZNiKWFJu3X6rcew0GTBU4gJ2lSA0KwBqmAKnkCTgIJEsOhQQCDle0ngE6AtDreOTwogKe/WgrfgEayFZpf+4Os+9uKbrnsKnHr4Xx5NMT2kMdGtpGjK+8Hb97N6w4hxglaL4zZlQSwMUPLPTMg3ASxkGps6TdEECY4nx7w0QFKoXkpiTQME3Ot9ThPS5HeAk9dNBE89/NwDqdXHNSZScT61CY2R1CaaAdz7rruxpmGSyEszEBOF1qdlMBUg3PILh07ocimQxgjBaapDQQl4LgBiU/HbJcRRwIZCGoVcEsWRVmlaVxo5+/T37nnimgG466HnNy1ufyHFtKYxRzw7n0gxK//xrds5dPsG0XLkdzhveSUvouiQ3EvAHHHPJTA4BMtgBCO4IyEr/hQgx3Y3pBuHxJUGD56X5J6A4ITGGTS5irjxtVab33j2+PJHXrEGxPH5R+MkrqU2kmIktTFHvji/sm+FA0c3mCiMe863Wmjfy301SOqIgpgjmlHxZFhrOd/HuW7aWLGxYxPDJoZHJx1aIt6yTFoa4A5mZTkognnuFays0HBwZSl9+NhXXvzy4S+fv++qGfD69zy9Fdv0V1pErsv7mgYx8YYfOs3u/atoiXasANT8L12gaol86eRwz2Wt7GK9Oi+KeE4HdyesNsjRZXShQcVzIyV5UVkQcq/QlOg3hQ1NGaoEJufHwwefObb0+1csgu1LkwdUFU2l3M0AcPCuwyztXWWSprU+zjifDDSBVmcB8RI29253c0yNxi3X+CJ0zXpgeHyFtgkZM8lR93p+UD4GL52kg5nkaJaOEoQQfGG01P7ekX/e9meOLX30ygCI8WwucZYZkCoASjMUDty5Sau9Gm895S+1XxXMHbMaecsCWJx3s5IOmc+mhRFiNHsDiydHpOK8Ghi5glhxFMkfa5BHZ8tOm+QHpbTM7oIHWNqVHtv8p/G/PXvH4p9fFoDNd3x+K43jmqlianRpkBIalcNvvhMLTaZ26fVrxCsYSXPkO+etPFgTWJ1gjpti5ohqBsCMZhcsn9iND0J21ovzLtNr8XyIUhAwkTw8dYhkyriDhPxnRVgYDNJvAscuK4Jtm7ZSG0mT3ir3owPr7DlyICt8EbtYrqvjnfNaXqgIXq7Tlmt8SSdvDW8TNlG8VaxVll63Qlgdds5Xn1JpsWt36SYkLcJXRdEENcE07911WUG4/dCXxj99WQakNm5qUlwN1ZoCiptx8Lu/IzczpbGpL5WqIpd7M3bkuVh+c1PLlI+V9oZnlcTVWLh5yOJrl0hd1NnJAhNUsg6YFRaY9JTcqwDkHsKliORUG4Zi7wd++5IMGO4dnUiTSJxE0qQltRE3Y+P0bTRroxzxWaX3aTpY763FnGB1IMjC4Mnw0k57zJHXmAiNsX5mT3aUndGv9xXoVKNvsiPyeYF6ibpNo1+vHW7d+OLkxCUBWLp5Yzu1mfamuQNbXF/mhpO35T6/p/qxl/dqWfTEneBO8BxlT1URM1peBgSfGD5J3Qct3znClwc7I06vaFBZJ5l5VgGYgtAtFdTzdQUg9XYxfuySACwc2L96wxuOTu/Xljl473eSpEHNy0Q3zXfX3OR4ysIm6rj6VCBUy6BTqJ4SFhVXxZOirSLBGN2x0jmts9TvpUMqDKiptiPy/Yj3Iz+z3LnlkhrgItujY69h9fhrsrKWipqid9N4fUEtNA21wdGS70WVxLw4bx31iRmM2gWaKnvfsh8fNt1nzgKhfiEIoevfSt57J/54KGcl3SCV9+lvyPFLAiDOE2Z2twbp+nb3DIJJPuaqL9edURj5tKbU90x9R1JWTFfFa+ub8rWWfrnZHVg6OppqyGWiX++dUglKqXMvDZI7Ich0rwDQ2ylHzJdshIRPJvVfysdPUp6u0S/1uNdDS2ly8EL/Uu5ELQtipX6sjZV1OWSq7Nu6EdNpb2/9qPvMz8t1NaueBceLw15HbIHQj/7Ohv/SAHzpfcO/ue1D2980kVH2DlQyG6yjXBYOoUMFJ+e+mGUNKEXbk2OqeOdlLn+WjMVDCyzcskKK03ZBZ5y/GBCznjhCCNM2WQoILl1V7FIBwE0+fdlWOLl90k3OulNg7P1V6VXckiL9eu/JwUtnp9MSWFPAUzlLNGPvvQfQeBHq9523HiPs4sOM1zMWkY4BlQVysTSw8JXLAjAc2iOTl+Ssi2SnKnouID4VE+eCwUaKc7W5ccszgJdGyC0/t+e79iGLA1KaOthh5jPOXyL6s9alpshF6d/tA/7yZQ9Ebv3g+T9xs7d1LdTMVukv3i/UiueWLQteYYAnRaOXBkhpRg03veNwd1DSHZjYzuvovRnjCgC46Kxf1V+69/5Meqe8+WXPBIcj+/H2BXvGYXkHfJUMdebwPM/XMLrV4/J8b2ln5N1g/U03llF5GuHZ6z4DZsXvasx3JjA4H7ziM8HDv/hfPxwn6eNS4KuFIXQlM0deyFG30giZaQEgA2Epa4InY/XkGit3rO8QvB1TZe++32m+Qv9n7dO8W7au6puhm3/h3CO2rb/WTwWRWv58WgatnNJqzf06AOWx19XYtW+B9e85uDPnZ6jfP2Pog3Ed7BsM2OTdcu6qvxq7+WfP/byO4696EZjy/WRHsGCemxGtYpjTAM2nPWbOrj1D9p65CRtMO74+3S/GgrpfF+cbtnhQ/vEVfzd468+d+772m/Fjbra3+6V61GW5AfKy14R2Myw5u9Z2sX7PBtY0OxqdPgizAFQmmF8H5wNb/NTFnb+qL0cPf+jfD0xekF/3l9I73XyRrgvMYEzPAUrumzNcHbL3jTfhPeeNndHvpmW/cL9G+yPgAd53Ie2v6dvhw4+eO9Weiw+mcXq7tWmjdoOUbtDdkUZYvnUPK0fWulbBekPNLAAXsMCu2fGP8H7561f9HyQ2H/n6PZOxnrSJv01dgyBhsDxYWdwYHQnLC0ojLyAyrpOjWk6cVHXSp31TaRhJhvvVAVAdfZZF/vDlIj63uc1tbnOb29zmNre5zW1ucwP+G1ME77lSc/kUAAAAAElFTkSuQmCC"
-}, Qo = {
- ...Object.fromEntries(Yt.map((e) => [e.id, Zo[e.id] || e.icon])),
+}, ps = {
+ ...Object.fromEntries(dn.map((e) => [e.id, fs[e.id] || e.icon])),
online: "rss",
smb: "network"
-}, $o = "inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden font-sans", es = {
+}, ms = "inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden font-sans", hs = {
medium: "h-9 rounded-2lg p-2 text-body-medium",
small: "h-8 rounded-lg px-2 py-1.5 text-body-medium"
-}, ts = {
- medium: es.medium,
+}, gs = {
+ medium: hs.medium,
small: "size-8 rounded-lg p-0 text-body-medium"
-}, ns = {
+}, _s = {
medium: "size-5 shrink-0",
small: "size-[18px] shrink-0"
-}, rs = "size-(--icon-inline) shrink-0", is = {
+}, vs = "size-(--icon-inline) shrink-0", ys = {
medium: "inline-flex items-center justify-center px-1 shrink-0",
small: "inline-flex items-center justify-center px-0.5 shrink-0"
-}, as = {
+}, bs = {
primary: "bg-button-primary text-text-white shadow-xs",
secondary: "bg-background-primary-default text-text-primary border border-border-button-default shadow-xs",
ghost: "bg-button-ghost-background text-button-ghost-foreground"
-}, os = (e, t) => `<svg class="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-${e}"/></svg>`;
-function ss(e = "compact") {
- return `<span data-shortcuts-entry class="inline-flex flex-none"><button type="button" data-shortcuts-trigger data-filter-action data-skeleton-action disabled tabindex="-1" aria-label="我的收藏" title="我的收藏" class="inline-grid ${e === "default" ? "size-9" : "size-8"} flex-none place-items-center rounded-(--control-radius) border border-(--border-10) bg-(--surface) text-(--muted)">${os("star", "size-4")}</button></span>`;
+}, xs = (e, t) => `<svg class="${t}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><use href="#i-${e}"/></svg>`;
+function Ss(e = "compact") {
+ return `<span data-shortcuts-entry class="inline-flex flex-none"><button type="button" data-shortcuts-trigger data-filter-action data-skeleton-action disabled tabindex="-1" aria-label="我的收藏" title="我的收藏" class="inline-grid ${e === "default" ? "size-9" : "size-8"} flex-none place-items-center rounded-(--control-radius) border border-(--border-10) bg-(--surface) text-(--muted)">${xs("star", "size-4")}</button></span>`;
}
-function cs(e, t = "", n = e) {
- return `<div data-input-size="medium" class="group flex h-max w-full flex-col items-start gap-1"><div data-rac class="relative flex w-full items-center rounded-2lg bg-background-tertiary-default text-foreground-icon-tertiary ring-2 ring-inset ring-transparent p-2"><div class="flex w-full items-center gap-2 min-w-0"><div class="flex flex-1 items-center gap-0.5 min-w-0">${os("search", "size-5 shrink-0")}<input type="search" enterkeyhint="search" readonly tabindex="-1" aria-label="${z(n)}" value="${z(t)}" placeholder="${z(e)}" class="min-w-0 flex-1 bg-transparent border-0 outline-none p-0 m-0 font-sans text-body-regular text-text-primary pl-1 placeholder:text-text-tertiary"></div></div></div></div>`;
+function Cs(e, t = "", n = e) {
+ return `<div data-input-size="medium" class="group flex h-max w-full flex-col items-start gap-1"><div data-rac class="relative flex w-full items-center rounded-2lg bg-background-tertiary-default text-foreground-icon-tertiary ring-2 ring-inset ring-transparent p-2"><div class="flex w-full items-center gap-2 min-w-0"><div class="flex flex-1 items-center gap-0.5 min-w-0">${xs("search", "size-5 shrink-0")}<input type="search" enterkeyhint="search" readonly tabindex="-1" aria-label="${z(n)}" value="${z(t)}" placeholder="${z(e)}" class="min-w-0 flex-1 bg-transparent border-0 outline-none p-0 m-0 font-sans text-body-regular text-text-primary pl-1 placeholder:text-text-tertiary"></div></div></div></div>`;
}
-function ls({ variant: e = "primary", size: t = "medium", glyph: n, label: r, attrs: i = "", compact: a = !1 }) {
- let o = r ? es[t] : ts[t], s = n ? os(n, r ? rs : ns[t]) : "", c = r ? `<span class="${is[t]}"${a ? " data-compact-label" : ""}>${r}</span>` : "";
- return `<button type="button" class="${$o} ${o} ${as[e]}"${i ? ` ${i}` : ""}>${s}${c}</button>`;
+function ws({ variant: e = "primary", size: t = "medium", glyph: n, label: r, attrs: i = "", compact: a = !1 }) {
+ let o = r ? hs[t] : gs[t], s = n ? xs(n, r ? vs : _s[t]) : "", c = r ? `<span class="${ys[t]}"${a ? " data-compact-label" : ""}>${r}</span>` : "";
+ return `<button type="button" class="${ms} ${o} ${bs[e]}"${i ? ` ${i}` : ""}>${s}${c}</button>`;
}
-var us = {
+var Ts = {
md: {
box: "gap-1.5 px-2.5 py-2 text-body-medium",
value: "gap-[5px]",
@@ -13030,66 +13064,66 @@ var us = {
chevron: "size-3.5"
}
};
-function ds(e, { size: t = "md", className: n = "", attrs: r = "", prefix: i = "" } = {}) {
- let a = us[t], o = `<span class="flex min-w-0 items-center truncate ${a.value}">${e}</span>`, s = i ? `<span class="flex min-w-0 items-center ${t === "sm" ? "gap-1.5" : "gap-2"}"><span aria-hidden="true" class="shrink-0 text-text-tertiary">${i}</span>${o}</span>` : o;
- return `<div class="group flex flex-col${n ? ` ${n}` : ""}"><button type="button" aria-haspopup="listbox"${r ? ` ${r}` : ""} class="flex w-full items-center justify-between rounded-2lg border border-border-button-default bg-background-primary-default shadow-xs text-text-primary ${a.box}">${s}${os("chevron-down", `shrink-0 text-text-secondary ${a.chevron}`)}</button></div>`;
+function Es(e, { size: t = "md", className: n = "", attrs: r = "", prefix: i = "" } = {}) {
+ let a = Ts[t], o = `<span class="flex min-w-0 items-center truncate ${a.value}">${e}</span>`, s = i ? `<span class="flex min-w-0 items-center ${t === "sm" ? "gap-1.5" : "gap-2"}"><span aria-hidden="true" class="shrink-0 text-text-tertiary">${i}</span>${o}</span>` : o;
+ return `<div class="group flex flex-col${n ? ` ${n}` : ""}"><button type="button" aria-haspopup="listbox"${r ? ` ${r}` : ""} class="flex w-full items-center justify-between rounded-2lg border border-border-button-default bg-background-primary-default shadow-xs text-text-primary ${a.box}">${s}${xs("chevron-down", `shrink-0 text-text-secondary ${a.chevron}`)}</button></div>`;
}
-var fs = "flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5 max-compact:flex-col max-compact:items-start max-compact:gap-3 max-compact:p-4 dark:bg-background-primary-default", ps = "flex min-w-0 flex-col gap-2", ms = "text-body-regular text-text-secondary", hs = "text-display-4-medium tabular-nums text-text-primary", gs = "relative inline-block h-8 w-24 rounded-2lg align-middle skeleton-sheen";
-function _s(e) {
- return `<div data-collection-summary="" class="${fs}"><div class="${ps}"><span class="${ms}">${e}</span><strong class="${hs}"><span data-skeleton="count" aria-hidden="true" class="${gs}"></span></strong></div></div>`;
+var Ds = "flex items-end justify-between gap-4 rounded-surface bg-background-secondary-default px-6 py-5 max-compact:flex-col max-compact:items-start max-compact:gap-3 max-compact:p-4 dark:bg-background-primary-default", Os = "flex min-w-0 flex-col gap-2", ks = "text-body-regular text-text-secondary", As = "text-display-4-medium tabular-nums text-text-primary", js = "relative inline-block h-8 w-24 rounded-2lg align-middle skeleton-sheen";
+function Ms(e) {
+ return `<div data-collection-summary="" class="${Ds}"><div class="${Os}"><span class="${ks}">${e}</span><strong class="${As}"><span data-skeleton="count" aria-hidden="true" class="${js}"></span></strong></div></div>`;
}
// src/ui-kit/markup.ts
-var vs = /* @__PURE__ */ new Set([
+var Ns = /* @__PURE__ */ new Set([
"secondary",
"warning",
"error",
"success"
]);
-function ys({ label: e = "", items: t = [], footnote: n = "" } = {}) {
+function Ps({ label: e = "", items: t = [], footnote: n = "" } = {}) {
return `<details class="geist-note-details"><summary>${z(e)}</summary>
<ul>${t.map((e) => `<li>${e.href ? `<a href="${z(e.href)}">${z(e.label || "")}</a>` : `<b>${z(e.label || "")}</b>`}<span>${z(e.note || "")}</span>${e.hint ? `<code>${z(e.hint)}</code>` : ""}</li>`).join("")}</ul>${n ? `<p>${z(n)}</p>` : ""}</details>`;
}
-function bs(e, { variant: t = "secondary", label: n = "", className: r = "", size: i = "medium", filled: a = !1, actionLabel: o = "", actionHref: s = "", details: c = null } = {}) {
- let l = vs.has(t) ? t : "secondary", u = l === "secondary" ? "info" : l === "success" ? "check" : "alert", d = l === "error" ? " role=\"alert\"" : " role=\"note\"", f = o ? s ? `<a class="geist-button" href="${z(s)}" data-note-action>${z(o)}</a>` : `<button type="button" class="geist-button" data-note-action>${z(o)}</button>` : "";
+function Fs(e, { variant: t = "secondary", label: n = "", className: r = "", size: i = "medium", filled: a = !1, actionLabel: o = "", actionHref: s = "", details: c = null } = {}) {
+ let l = Ns.has(t) ? t : "secondary", u = l === "secondary" ? "info" : l === "success" ? "check" : "alert", d = l === "error" ? " role=\"alert\"" : " role=\"note\"", f = o ? s ? `<a class="geist-button" href="${z(s)}" data-note-action>${z(o)}</a>` : `<button type="button" class="geist-button" data-note-action>${z(o)}</button>` : "";
return `<div class="geist-note geist-note-${l}${r ? ` ${z(r)}` : ""}${i === "small" ? " geist-note-small" : ""}${a ? " geist-note-filled" : ""}"${d}>
- ${R(u)}<p>${n ? `<b>${z(n)}</b>` : ""}<span>${z(l === "error" ? tn(e) : e)}</span></p>${f}${c ? ys(c) : ""}</div>`;
+ ${R(u)}<p>${n ? `<b>${z(n)}</b>` : ""}<span>${z(l === "error" ? _n(e) : e)}</span></p>${f}${c ? Ps(c) : ""}</div>`;
}
-function xs(e = "加载中") {
+function Is(e = "加载中") {
let t = Array.from({ length: 10 }, (e, t) => `<i aria-hidden="true" style="--spinner-angle:${t * 36}deg;--spinner-delay:${t * 100 - 900}ms"></i>`).join("");
return `<span class="ui-geist-spinner" role="status" aria-label="${z(e)}">${t}</span>`;
}
-var Ss = "载入中";
-function Cs(e = "正在处理", { className: t = "" } = {}) {
+var Ls = "载入中";
+function Rs(e = "正在处理", { className: t = "" } = {}) {
return `<span class="ui-geist-loading${t ? ` ${z(t)}` : ""}" role="status">
<span class="ui-geist-loading-dots" aria-hidden="true"><i></i><i></i><i></i></span>
<span>${z(e)}</span></span>`;
}
-function ws(e, { active: t = "", attr: n = "data-tab", label: r = "页面视图", className: i = "", panel: a = "" } = {}) {
+function zs(e, { active: t = "", attr: n = "data-tab", label: r = "页面视图", className: i = "", panel: a = "" } = {}) {
let o = e.map(({ value: e, label: r, count: i, symbol: o }) => {
let s = String(e) === String(t), c = i == null ? "" : `<span class="ui-board-tab-count">${z(Number(i).toLocaleString())}</span>`;
return `<button type="button" role="tab" ${n}="${z(e)}" aria-selected="${s}"${a ? ` aria-controls="${z(a)}"` : ""}>${o ? R(o) : ""}${z(r)}${c}</button>`;
}).join("");
return `<div class="ui-board-local-nav ui-board-tabs${i ? ` ${z(i)}` : ""}" role="tablist" aria-label="${z(r)}">${o}</div>`;
}
-function Ts(e, t, n, { className: r = "", actions: i = "" } = {}) {
+function Bs(e, t, n, { className: r = "", actions: i = "" } = {}) {
return `<div class="ui-emptystate${r ? ` ${z(r)}` : ""}" data-geist-empty-state role="status">
<div class="ui-es-icon" aria-hidden="true">${R(e)}</div>
<div class="ui-es-copy"><h3>${z(t)}</h3><p>${z(n)}</p></div>
${i ? `<div class="ui-es-actions">${i}</div>` : ""}
</div>`;
}
-function Es(e = "") {
+function Vs(e = "") {
return `<span class="ui-pcheck"><input type="checkbox" ${e}><span aria-hidden="true">${R("check")}</span></span>`;
}
// src/ui-kit/motion.ts
-function Ds(e, t, n = "a", { className: r = "", iconClass: i = "", label: a = "" } = {}) {
+function Hs(e, t, n = "a", { className: r = "", iconClass: i = "", label: a = "" } = {}) {
return `<span class="iconswap${r ? " " + z(r) : ""}" data-icon-swap data-icon-state="${n === "b" ? "b" : "a"}"${a ? ` aria-label="${z(a)}"` : ""}><span data-icon="a">${R(e, i)}</span><span data-icon="b">${R(t, i)}</span></span>`;
}
-function Os(e, t) {
+function Us(e, t) {
let n = e && (e.matches?.("[data-icon-swap]") ? e : e.querySelector?.("[data-icon-swap]"));
return n && (n.dataset.iconState = t === "b" || t === !0 ? "b" : "a"), n;
}
-function ks(e, t, { html: n = !1 } = {}) {
+function Ws(e, t, { html: n = !1 } = {}) {
if (!e) return;
let r = String(t ?? ""), i = () => {
n ? e.innerHTML = r : e.textContent = r;
@@ -13109,7 +13143,7 @@ function ks(e, t, { html: n = !1 } = {}) {
e.classList.contains("leaving") && (e.removeEventListener("transitionend", s), o());
}, 400);
}
-function As(e, t) {
+function Gs(e, t) {
if (!e) return;
let n = String(t ?? ""), r = e.dataset.popCount;
if (r === n && e.firstElementChild) return;
@@ -13119,7 +13153,7 @@ function As(e, t) {
let a = e.firstElementChild;
a.getBoundingClientRect(), a.classList.add("popping");
}
-function js(e, t = e && e.parentElement, { text: n = e && e.value, scrollLeft: r = e && e.scrollLeft || 0 } = {}) {
+function Ks(e, t = e && e.parentElement, { text: n = e && e.value, scrollLeft: r = e && e.scrollLeft || 0 } = {}) {
if (!e || !t || (t.querySelectorAll(":scope > .cleardissolve").forEach((e) => e.remove()), e.classList.remove("dissolving"), e.value = "", !n || !e.isConnected)) return () => {};
let i = e.getBoundingClientRect(), a = t.getBoundingClientRect();
if (!i.width) return () => {};
@@ -13146,14 +13180,14 @@ function js(e, t = e && e.parentElement, { text: n = e && e.value, scrollLeft: r
};
return o.addEventListener("animationend", d), u = setTimeout(d, 1e3), d;
}
-var Ms = /* @__PURE__ */ new Map();
-function Ns(e, t = "") {
+var qs = /* @__PURE__ */ new Map();
+function Js(e, t = "") {
e && e.querySelectorAll("[data-count-badge]").forEach((e) => {
- let n = `${t}\u0000${e.dataset.countBadge}`, r = e.textContent || "", i = Ms.get(n);
- Ms.set(n, r), e.classList.add("countbadge"), i !== void 0 && i !== r && (e.classList.add("popped"), e.getBoundingClientRect(), e.classList.remove("popped"));
+ let n = `${t}\u0000${e.dataset.countBadge}`, r = e.textContent || "", i = qs.get(n);
+ qs.set(n, r), e.classList.add("countbadge"), i !== void 0 && i !== r && (e.classList.add("popped"), e.getBoundingClientRect(), e.classList.remove("popped"));
});
}
-function Ps(e, t = "[data-reveal-line]") {
+function Ys(e, t = "[data-reveal-line]") {
if (!e) return;
let n = [...e.querySelectorAll(t)];
if (!n.length) return;
@@ -13169,12 +13203,12 @@ function Ps(e, t = "[data-reveal-line]") {
i.classList.contains("revealline") && (i.removeEventListener("transitionend", a), r());
}, 1200);
}
-var Fs = [
+var Xs = [
50,
100,
200
];
-function Is({ mode: e = "cloud", pageSize: t = 100 } = {}) {
+function Zs({ mode: e = "cloud", pageSize: t = 100 } = {}) {
let n = Math.max(1, Math.min(200, Math.floor(t))), r = Array.from({ length: n }, (e, t) => `<span data-tag-skeleton-cell class="skeleton block rounded-lg" style="height:34px;width:${58 + (Math.imul(t + 1, 2654435761) >>> 0) % 153}px;max-width:100%"></span>`).join(""), i = Array.from({ length: Math.min(2, n) }, (e, t) => {
let r = Math.floor(n / 2) + (t === 0 ? n % 2 : 0);
return `<section class="min-w-0 bg-background-secondary-default rounded-2xl px-5 pt-4 pb-3"><span class="skeleton mb-2 block w-20" style="height:24px"></span><div class="index-tag-list gap-x-4 gap-y-0.5">${Array.from({ length: r }, () => "<span data-tag-skeleton-cell class=\"flex h-9 min-w-0 items-center gap-3 px-2.5\"><span class=\"skeleton w-32 max-w-full rounded-md\" style=\"height:16px\"></span><span class=\"skeleton ml-auto w-8 rounded-md\" style=\"height:12px\"></span></span>").join("")}</div></section>`;
@@ -13182,7 +13216,7 @@ function Is({ mode: e = "cloud", pageSize: t = 100 } = {}) {
return `<div data-skeleton="tags/${e === "alphabet" ? "alphabet" : "cloud"}/${n}" role="status" aria-label="正在读取标签" aria-busy="true"><span class="sr-only">正在读取标签</span><div aria-hidden="true">${e === "alphabet" ? `<div class="flex flex-col gap-4">${i}</div>` : `<div class="flex flex-wrap gap-1.75">${r}</div>`}<div class="mt-5 flex flex-wrap items-center justify-between gap-3" data-tag-pagination-skeleton><span class="skeleton block w-32" style="height:16px"></span><div class="flex items-center gap-2"><span class="skeleton block w-28 rounded-md" style="height:32px"></span><span class="skeleton block w-40 rounded-md" style="height:32px"></span></div></div></div></div>`;
}
// src/ui-kit/skeleton.ts
-function Ls(e, t) {
+function Qs(e, t) {
if (!e) return;
if (e.querySelector(".skeleton-awaiting") || !e.querySelector(".skeleton,[data-skeleton],.skeletoncard,.countskeleton") || !e.firstChild) {
t();
@@ -13200,7 +13234,7 @@ function Ls(e, t) {
n.isConnected && (n.removeEventListener("transitionend", i), r());
}, 1e3);
}
-function Rs(e = "正在读取内容", { className: t = "", variant: n = "panel", count: r = 6, fill: i = !0, gridClass: a = "", gridSize: o = "", cardRatio: s = 0 } = {}) {
+function $s(e = "正在读取内容", { className: t = "", variant: n = "panel", count: r = 6, fill: i = !0, gridClass: a = "", gridSize: o = "", cardRatio: s = 0 } = {}) {
let c = (/* @__PURE__ */ new Set([
"panel",
"cards",
@@ -13214,18 +13248,18 @@ function Rs(e = "正在读取内容", { className: t = "", variant: n = "panel",
role="status" aria-label="${z(e)}"><span class="sr-only">${z(e)}</span>
<div${a ? ` class="${z(a)}"` : ""}${o ? ` data-size="${z(o)}"` : ""}${c === "cards" && Number(s) > 0 ? ` style="--skeleton-card-ratio:${Number(s)}"` : ""} aria-hidden="true">${l}</div></div>`;
}
-function zs({ kind: e, layout: t = "big", mode: n = "alphabet" } = {}) {
- if (e === "tags") return Is({ mode: n });
+function ec({ kind: e, layout: t = "big", mode: n = "alphabet" } = {}) {
+ if (e === "tags") return Zs({ mode: n });
let r = `<div class="igrid" data-cells="${e === "studios" || e === "agencies" || e === "series" ? "company" : "people"}" data-layout="${z(t)}">${"<span class=\"icell\"><span class=\"ring skeleton\"></span><span class=\"nm skeleton\">&nbsp;</span><span class=\"n skeleton\">&nbsp;</span></span>".repeat(12)}</div>`, i = "正在读取索引";
return `<div class="skeletonpanel index-skeleton" data-skeleton="index/${z(e)}/${z(t)}/${z(n)}" data-fill=""
role="status" aria-label="${i}"><span class="sr-only">${i}</span><section aria-hidden="true">${r}</section></div>`;
}
-var Bs = {
+var tc = {
av: () => "<span class=\"av avskeleton\"><span class=\"ring\"></span><span class=\"nm\">&nbsp;</span></span>",
brandpill: (e) => `<span class="brandpill brandskeleton" style="width:${e}px"><span class="mk"></span></span>`,
pill: (e) => `<span class="pill tagskeleton" style="width:${e}px"></span>`,
"filter-pill": (e) => `<span class="skeleton" style="width:${e}px;height:var(--control-h-compact);border-radius:8px;flex:none"></span>`
-}, Vs = {
+}, nc = {
av: [0],
brandpill: [
132,
@@ -13268,41 +13302,41 @@ var Bs = {
76,
84
]
-}, Hs = "[data-skeleton],[data-skeleton-tier],.countskeleton";
-function Us(e) {
+}, rc = "[data-skeleton],[data-skeleton-tier],.countskeleton";
+function ic(e) {
if (!e) return;
- let t = [...e.matches?.(Hs) ? [e] : [], ...e.querySelectorAll(Hs)], n = t.filter((e) => !t.some((t) => t !== e && t.contains(e)));
+ let t = [...e.matches?.(rc) ? [e] : [], ...e.querySelectorAll(rc)], n = t.filter((e) => !t.some((t) => t !== e && t.contains(e)));
for (let e of n) e.dataset.skeletonReveal || (e.dataset.skeletonReveal = "pending", e.classList.add("skeleton-awaiting"), setTimeout(() => {
e.isConnected && e.dataset.skeletonReveal === "pending" && (e.dataset.skeletonReveal = "shown", e.classList.remove("skeleton-awaiting"));
}, 180));
}
-var Ws = 64;
-function Gs(e) {
- e = e.filter((e) => e.row && Bs[e.kind] && (!e.row.children.length || e.row.scrollWidth <= e.row.clientWidth)).map((e) => ({
+var ac = 64;
+function oc(e) {
+ e = e.filter((e) => e.row && tc[e.kind] && (!e.row.children.length || e.row.scrollWidth <= e.row.clientWidth)).map((e) => ({
...e,
start: e.row.children.length,
added: 0
}));
let t = (e, t) => {
- let n = Bs[e.kind], r = Vs[e.kind], i = "";
- for (let a = Math.min(Ws, e.added + t); e.added < a; e.added++) i += n(r[e.added % r.length]);
+ let n = tc[e.kind], r = nc[e.kind], i = "";
+ for (let a = Math.min(ac, e.added + t); e.added < a; e.added++) i += n(r[e.added % r.length]);
e.row.insertAdjacentHTML("beforeend", i);
};
- for (let n of e) t(n, Vs[n.kind].length);
+ for (let n of e) t(n, nc[n.kind].length);
for (let n = 0; n < 4; n++) {
- let n = e.filter((e) => e.added < Ws && e.row.scrollWidth <= e.row.clientWidth).map((e) => {
+ let n = e.filter((e) => e.added < ac && e.row.scrollWidth <= e.row.clientWidth).map((e) => {
let t = e.row.children[e.start].getBoundingClientRect(), n = e.row.lastElementChild.getBoundingClientRect(), r = Math.max(1, (n.right - t.left) / e.added);
return [e, Math.ceil((e.row.getBoundingClientRect().right - n.right) / r) + 1];
});
if (!n.length) break;
for (let [e, r] of n) t(e, Math.max(1, r));
}
- for (let t of e) Us(t.row);
+ for (let t of e) ic(t.row);
}
-function Ks(e) {
+function sc(e) {
if (!e) return;
let t = (t) => [...e.matches?.(t) ? [e] : [], ...e.querySelectorAll(t)];
- Gs(t("[data-skeleton-tier]").map((e) => ({
+ oc(t("[data-skeleton-tier]").map((e) => ({
row: e,
kind: e.dataset.skeletonTier
})));
@@ -13315,36 +13349,36 @@ function Ks(e) {
for (; e.children.length > s;) e.lastElementChild.remove();
for (; e.children.length < s;) e.appendChild(t.cloneNode(!0));
}
- Us(e);
+ ic(e);
}
// src/ui-kit/sweep-gate.ts
-var qs = 1e4, Js = /* @__PURE__ */ new WeakMap(), Ys = null;
-function Xs() {
- return Ys || typeof IntersectionObserver != "function" || (Ys = new IntersectionObserver((e) => {
+var cc = 1e4, lc = /* @__PURE__ */ new WeakMap(), uc = null;
+function dc() {
+ return uc || typeof IntersectionObserver != "function" || (uc = new IntersectionObserver((e) => {
for (let { target: t, isIntersecting: n } of e) {
if (!t.isConnected) {
- Qs(t);
+ pc(t);
continue;
}
let e = t;
- e.dataset.sweep !== "stalled" && (n ? (delete e.dataset.sweep, Js.has(e) || Js.set(e, setTimeout(() => {
- Js.delete(e), e.isConnected && (e.dataset.sweep = "stalled");
- }, qs))) : (e.dataset.sweep = "idle", clearTimeout(Js.get(e)), Js.delete(e)));
+ e.dataset.sweep !== "stalled" && (n ? (delete e.dataset.sweep, lc.has(e) || lc.set(e, setTimeout(() => {
+ lc.delete(e), e.isConnected && (e.dataset.sweep = "stalled");
+ }, cc))) : (e.dataset.sweep = "idle", clearTimeout(lc.get(e)), lc.delete(e)));
}
- })), Ys;
+ })), uc;
}
-function Zs(e) {
- Xs()?.observe(e);
+function fc(e) {
+ dc()?.observe(e);
}
-function Qs(e) {
- Ys?.unobserve(e), clearTimeout(Js.get(e)), Js.delete(e), e.dataset?.sweep && delete e.dataset.sweep;
+function pc(e) {
+ uc?.unobserve(e), clearTimeout(lc.get(e)), lc.delete(e), e.dataset?.sweep && delete e.dataset.sweep;
}
// src/ui-kit/scroll.ts
-var $s = /* @__PURE__ */ new Map(), ec, tc = 240, nc = 50, rc = 70, ic = .55, ac = .35, oc = 480;
-function sc(e, t) {
- return !e || !(t > 0) ? 0 : Math.sign(e) * (1 - 1 / (Math.abs(e) * ic / t + 1)) * t;
+var mc = /* @__PURE__ */ new Map(), hc, gc = 240, _c = 50, vc = 70, yc = .55, bc = .35, xc = 480;
+function Sc(e, t) {
+ return !e || !(t > 0) ? 0 : Math.sign(e) * (1 - 1 / (Math.abs(e) * yc / t + 1)) * t;
}
-function cc(e) {
+function Cc(e) {
let t = null, n = 0, r = () => typeof e.animate != "function" || matchMedia("(prefers-reduced-motion:reduce)").matches, i = () => {
t = null, n || e.classList.remove("edgepull");
}, a = (n, r) => {
@@ -13352,11 +13386,11 @@ function cc(e) {
};
return {
drag(i) {
- r() || (t?.cancel(), t = null, n = -sc(i, e.clientWidth), e.classList.toggle("edgepull", !!n), n ? e.style.setProperty("--edge-pull", `${n}px`) : e.style.removeProperty("--edge-pull"));
+ r() || (t?.cancel(), t = null, n = -Sc(i, e.clientWidth), e.classList.toggle("edgepull", !!n), n ? e.style.setProperty("--edge-pull", `${n}px`) : e.style.removeProperty("--edge-pull"));
},
release() {
if (!n) return;
- let t = n, r = Sc();
+ let t = n, r = Lc();
n = 0, e.style.removeProperty("--edge-pull"), a([{
"--edge-pull": `${t}px`,
easing: r.easing
@@ -13364,9 +13398,9 @@ function cc(e) {
},
kick(t) {
if (r() || n) return;
- let i = -sc(t * ac, Math.min(e.clientWidth, oc));
+ let i = -Sc(t * bc, Math.min(e.clientWidth, xc));
if (!i) return;
- let o = Sc();
+ let o = Lc();
a([
{
"--edge-pull": "0px",
@@ -13382,10 +13416,10 @@ function cc(e) {
}
};
}
-function lc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dragIgnore: a = "" } = {}) {
+function wc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dragIgnore: a = "" } = {}) {
if (!e) return;
n && (e.dataset.scrollGesture = "");
- let o = $s.get(e);
+ let o = mc.get(e);
if (o) return o.options.drag ||= t, o.options.fade ||= n, o.update(), o;
let s = {
drag: t,
@@ -13393,7 +13427,7 @@ function lc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dra
wheel: r,
elastic: i,
dragIgnore: a
- }, c = new AbortController(), l = cc(e), u = null, d = 0, f = 0, p = 0, m = !1, h = 0, g = 0, _ = 0, v = 0, y = (t, n) => {
+ }, c = new AbortController(), l = Cc(e), u = null, d = 0, f = 0, p = 0, m = !1, h = 0, g = 0, _ = 0, v = 0, y = (t, n) => {
e.dataset[t] !== n && (e.dataset[t] = n);
}, b = "", x = () => (b ||= getComputedStyle(e).overflowX, [
"auto",
@@ -13419,7 +13453,7 @@ function lc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dra
cancelAnimationFrame(h), h = 0, v = 0;
}, O = (t) => {
let n = Math.min(Math.max(t - g, 0), 64);
- if (g = t, _ += (p - _) * (1 - Math.exp(-n / rc)), Math.abs(p - _) < .5 && (_ = p), e.scrollLeft = _, _ !== p) h = requestAnimationFrame(O);
+ if (g = t, _ += (p - _) * (1 - Math.exp(-n / vc)), Math.abs(p - _) < .5 && (_ = p), e.scrollLeft = _, _ !== p) h = requestAnimationFrame(O);
else if (h = 0, v) {
let e = v;
v = 0, E(e);
@@ -13431,11 +13465,11 @@ function lc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dra
if (t.defaultPrevented || !t.cancelable || Math.abs(t.deltaY) <= Math.abs(t.deltaX) || n <= 0 || !x()) return;
t.preventDefault();
let r = performance.now(), i = Math.abs(t.deltaY);
- r > f && (m = !1), f = r + tc;
+ r > f && (m = !1), f = r + gc;
let a = h ? p : e.scrollLeft, o = a + t.deltaY;
p = Math.min(n, Math.max(0, o));
let c = o === p ? 0 : t.deltaY;
- i < nc || p === a ? (p !== a && (D(), e.scrollLeft = p), c && !h ? E(c) : c && (v = c)) : (c && (v = c), h ||= (_ = e.scrollLeft, g = performance.now(), requestAnimationFrame(O)));
+ i < _c || p === a ? (p !== a && (D(), e.scrollLeft = p), c && !h ? E(c) : c && (v = c)) : (c && (v = c), h ||= (_ = e.scrollLeft, g = performance.now(), requestAnimationFrame(O)));
}, { passive: !1 }), T(e, "mousedown", (t) => {
d = 0, !s.drag || t.button !== 0 || e.scrollWidth - e.clientWidth <= 1 || s.dragIgnore && (t.shiftKey || t.ctrlKey || t.metaKey || t.altKey || t.target.closest?.(s.dragIgnore)) || (t.stopPropagation(), D(), u = {
x: t.pageX,
@@ -13473,18 +13507,18 @@ function lc(e, { drag: t = !1, fade: n = !0, wheel: r = !0, elastic: i = !0, dra
b = "", S();
},
destroy() {
- c.abort(), D(), cancelAnimationFrame(C), C = 0, A.disconnect(), M.disconnect(), $s.delete(e), delete e.dataset.scrollGesture, e.style.cursor = "", $s.size || (ec?.disconnect(), ec = null);
+ c.abort(), D(), cancelAnimationFrame(C), C = 0, A.disconnect(), M.disconnect(), mc.delete(e), delete e.dataset.scrollGesture, e.style.cursor = "", mc.size || (hc?.disconnect(), hc = null);
}
};
- return $s.set(e, ee), ec || (ec = new MutationObserver(() => {
- for (let [e, t] of $s) e.isConnected || t.destroy();
- }), ec.observe(document.body, {
+ return mc.set(e, ee), hc || (hc = new MutationObserver(() => {
+ for (let [e, t] of mc) e.isConnected || t.destroy();
+ }), hc.observe(document.body, {
childList: !0,
subtree: !0
})), ee;
}
-function uc(e) {
- return lc(e, {
+function Tc(e) {
+ return wc(e, {
drag: !0,
fade: !1,
wheel: !1,
@@ -13492,9 +13526,9 @@ function uc(e) {
dragIgnore: "a,button,input,select,textarea,label,[role=\"button\"],[role=\"checkbox\"],[role=\"slider\"],.react-aria-ColumnResizer"
});
}
-var dc = 24, fc = 2e3, pc = 3e3, mc = /* @__PURE__ */ new Map(), hc = /* @__PURE__ */ new Set(), gc = null, _c = null, vc = /* @__PURE__ */ new Map();
-function yc(e) {
- if (!e || mc.has(e) || matchMedia("(prefers-reduced-motion:reduce)").matches) return;
+var Ec = 24, Dc = 2e3, Oc = 3e3, kc = /* @__PURE__ */ new Map(), Ac = /* @__PURE__ */ new Set(), jc = null, Mc = null, Nc = /* @__PURE__ */ new Map();
+function Pc(e) {
+ if (!e || kc.has(e) || matchMedia("(prefers-reduced-motion:reduce)").matches) return;
let t = new AbortController(), n = e.scrollLeft, r = 1, i = 0, a = 0, o = !1, s = !1, c = !0, l = 0, u = -1, d = !1, f = (e, n, r) => e.addEventListener(n, r, {
passive: !0,
signal: t.signal
@@ -13506,11 +13540,11 @@ function yc(e) {
if (!m()) return;
a = requestAnimationFrame(h);
let o = i ? Math.min(t - i, 64) : 0;
- i = t, !(t < l) && (u < 0 && (u = e.scrollWidth - e.clientWidth), d && (d = !1, n = e.scrollLeft), !(u <= 1) && (n = Math.min(u, Math.max(0, n + r * dc * o / 1e3)), e.scrollLeft = n, (n >= u || n <= 0) && (r = n >= u ? -1 : 1, l = t + fc)));
+ i = t, !(t < l) && (u < 0 && (u = e.scrollWidth - e.clientWidth), d && (d = !1, n = e.scrollLeft), !(u <= 1) && (n = Math.min(u, Math.max(0, n + r * Ec * o / 1e3)), e.scrollLeft = n, (n >= u || n <= 0) && (r = n >= u ? -1 : 1, l = t + Dc)));
}, g = () => {
e.isConnected ? !a && m() && (i = 0, a = requestAnimationFrame(h)) : b();
}, _ = () => {
- l = performance.now() + pc;
+ l = performance.now() + Oc;
};
f(e, "pointerenter", () => {
o = !0;
@@ -13530,41 +13564,41 @@ function yc(e) {
});
y.observe(e, { childList: !0 }), f(document, "visibilitychange", g), g();
function b() {
- cancelAnimationFrame(a), a = 0, t.abort(), v.disconnect(), y.disconnect(), mc.delete(e), hc.delete(g), _c?.unobserve(e), vc.delete(e), mc.size || (gc?.disconnect(), gc = null, _c?.disconnect(), _c = null);
+ cancelAnimationFrame(a), a = 0, t.abort(), v.disconnect(), y.disconnect(), kc.delete(e), Ac.delete(g), Mc?.unobserve(e), Nc.delete(e), kc.size || (jc?.disconnect(), jc = null, Mc?.disconnect(), Mc = null);
}
- mc.set(e, b), hc.add(g), gc || (gc = new MutationObserver(() => hc.forEach((e) => e())), gc.observe(document.body, {
+ kc.set(e, b), Ac.add(g), jc || (jc = new MutationObserver(() => Ac.forEach((e) => e())), jc.observe(document.body, {
attributes: !0,
attributeFilter: ["data-detail-open", "data-wall-open"]
- })), typeof IntersectionObserver == "function" && (_c ??= new IntersectionObserver((e) => {
- for (let t of e) vc.get(t.target)?.(t.isIntersecting);
- }), vc.set(e, (e) => {
+ })), typeof IntersectionObserver == "function" && (Mc ??= new IntersectionObserver((e) => {
+ for (let t of e) Nc.get(t.target)?.(t.isIntersecting);
+ }), Nc.set(e, (e) => {
c = e, g();
- }), _c.observe(e));
+ }), Mc.observe(e));
}
-function bc(e) {
- mc.get(e)?.();
+function Fc(e) {
+ kc.get(e)?.();
}
-var xc = null;
-function Sc() {
- if (!xc) {
+var Ic = null;
+function Lc() {
+ if (!Ic) {
let e = getComputedStyle(document.documentElement);
- xc = {
+ Ic = {
easing: e.getPropertyValue("--spring-pane").trim() || "ease",
duration: parseFloat(e.getPropertyValue("--spring-pane-ms")) || 300
};
}
- return xc;
+ return Ic;
}
-function Cc(e, t, n, r = "x") {
- Tc(e), e.style.width = `${n.w}px`, e.style.height = `${n.h}px`;
+function Rc(e, t, n, r = "x") {
+ Bc(e), e.style.width = `${n.w}px`, e.style.height = `${n.h}px`;
let i = r === "y" ? "h" : "w", a = r === "y" ? "y" : "x", o = `${n.x}px ${n.y}px`;
if (t && t[a] !== n[a] && !matchMedia("(prefers-reduced-motion:reduce)").matches) {
- let s = Sc(), c = [e.animate([{ translate: r === "y" ? `${n.x}px ${t.y}px` : `${t.x}px ${n.y}px` }, { translate: o }], {
+ let s = Lc(), c = [e.animate([{ translate: r === "y" ? `${n.x}px ${t.y}px` : `${t.x}px ${n.y}px` }, { translate: o }], {
duration: s.duration,
easing: s.easing,
fill: "none"
})];
- wc.set(e, c);
+ zc.set(e, c);
let l = 1 + Math.min(Math.abs(n[a] - t[a]) / n[i], 1.5) * .12;
c.push(e.animate([
{
@@ -13587,18 +13621,18 @@ function Cc(e, t, n, r = "x") {
}
e.style.translate = o;
}
-var wc = /* @__PURE__ */ new WeakMap();
-function Tc(e) {
- e && (wc.get(e)?.forEach((e) => e.cancel()), wc.delete(e));
+var zc = /* @__PURE__ */ new WeakMap();
+function Bc(e) {
+ e && (zc.get(e)?.forEach((e) => e.cancel()), zc.delete(e));
}
-var Ec = ".reviewtabs,.ftablewrap,.ui-board-local-nav,[data-manage-menu],.follow-workspace-switch,.fmanagenav";
-function Dc(e = document, t = !0) {
+var Vc = ".reviewtabs,.ftablewrap,.ui-board-local-nav,[data-manage-menu],.follow-workspace-switch,.fmanagenav";
+function Hc(e = document, t = !0) {
let n = [...e instanceof HTMLElement ? [e] : [], ...t ? e.querySelectorAll("*") : []];
- n.filter((e) => e instanceof HTMLElement && e.matches(Ec)).forEach((e) => lc(e));
- let r = (e) => e.hasAttribute("data-horizontal-scroll") || $s.has(e) && $s.get(e).options.fade !== !1;
+ n.filter((e) => e instanceof HTMLElement && e.matches(Vc)).forEach((e) => wc(e));
+ let r = (e) => e.hasAttribute("data-horizontal-scroll") || mc.has(e) && mc.get(e).options.fade !== !1;
n.flatMap((e) => {
if (!(e instanceof HTMLElement) || e === document.body || e === document.documentElement || e.closest(".ovtrack,.ui-ov-edges")) return [];
- if (e.closest("[data-skeleton],[data-skeleton-tier]")) return ho(e), [];
+ if (e.closest("[data-skeleton],[data-skeleton-tier]")) return Ao(e), [];
if (e.closest("[inert]")) return [];
let t = r(e), n = t ? ["y"] : ["y", "x"];
if (e.dataset.overlayScrollbar && e.dataset.overlayAxes === n.join("")) return [];
@@ -13610,19 +13644,19 @@ function Dc(e = document, t = !0) {
el: e,
axes: []
}] : [];
- }).forEach(({ el: e, axes: t }) => t.length ? yo(e, { axes: t }) : ho(e));
+ }).forEach(({ el: e, axes: t }) => t.length ? Po(e, { axes: t }) : Ao(e));
}
-function Oc(e = document.body) {
+function Uc(e = document.body) {
let t = 0, n = /* @__PURE__ */ new Map(), r = (e) => !!e.closest(".ovtrack,.ui-ov-edges"), i = () => {
t = 0;
let e = [...n].filter(([e]) => e.isConnected);
n.clear();
- for (let [t, n] of e) e.some(([e, n]) => n && e !== t && e.contains(t)) || Dc(t, n);
- go();
+ for (let [t, n] of e) e.some(([e, n]) => n && e !== t && e.contains(t)) || Hc(t, n);
+ jo();
}, a = (e, a = !0) => {
r(e) || (n.set(e, (n.get(e) ?? !1) || a), t ||= requestAnimationFrame(i));
}, o = new MutationObserver((e) => {
- for (let n of e) if (n.type === "attributes") n.target instanceof HTMLElement && (n.attributeName === "data-theater" && vo(n.target), a(n.target, n.attributeName !== "style"));
+ for (let n of e) if (n.type === "attributes") n.target instanceof HTMLElement && (n.attributeName === "data-theater" && No(n.target), a(n.target, n.attributeName !== "style"));
else {
for (let e of n.addedNodes) e instanceof HTMLElement && a(e);
n.removedNodes.length && !t && (t = requestAnimationFrame(i));
@@ -13646,45 +13680,45 @@ function Oc(e = document.body) {
});
let s = () => a(e);
return window.addEventListener("resize", s, { passive: !0 }), a(e), () => {
- o.disconnect(), window.removeEventListener("resize", s), cancelAnimationFrame(t), n.clear(), _o(e), go();
+ o.disconnect(), window.removeEventListener("resize", s), cancelAnimationFrame(t), n.clear(), Mo(e), jo();
};
}
// src/ui-kit/controls.ts
-function kc(e, t = !0) {
+function Wc(e, t = !0) {
e && (t ? (e.setAttribute("aria-busy", "true"), e.setAttribute("aria-disabled", "true")) : (e.removeAttribute("aria-busy"), e.removeAttribute("aria-disabled")));
}
-var Ac = /* @__PURE__ */ new WeakSet();
-function jc(e = document) {
- Ac.has(e) || (Ac.add(e), e.addEventListener("click", (t) => {
+var Gc = /* @__PURE__ */ new WeakSet();
+function Kc(e = document) {
+ Gc.has(e) || (Gc.add(e), e.addEventListener("click", (t) => {
let n = t.target.closest?.("button[aria-busy=\"true\"],[role=\"button\"][aria-busy=\"true\"]");
n && e.contains(n) && (t.preventDefault(), t.stopImmediatePropagation());
}, !0));
}
-function Mc(e, t, n, r, { attr: i = "", className: a = "", text: o = !1 } = {}) {
+function qc(e, t, n, r, { attr: i = "", className: a = "", text: o = !1 } = {}) {
let s = n.map(([t, n, a]) => `<label title="${z(n)}"><input type="radio" name="${z(e)}" value="${z(t)}" ${i}
${t === r ? "checked" : ""}><span aria-hidden="true">${o ? (a ? R(a) : "") + z(n) : R(a)}</span><span class="sr-only">${z(n)}</span></label>`).join("");
return `<fieldset class="iconswitch${o ? " iconswitch-text" : ""}${a ? ` ${z(a)}` : ""}"><legend class="sr-only">${z(t)}</legend>${s}</fieldset>`;
}
-function Nc(e, t, n) {
+function Jc(e, t, n) {
e?.querySelectorAll(`[${t}]`).forEach((e) => {
e.onchange = () => {
e.checked && n(e.value);
};
});
}
-var Pc = 9;
-function Fc({ value: e = 0, min: t = 0, max: n = 100, step: r = 1, label: i = "", suffix: a = "%", attr: o = "", className: s = "" } = {}) {
+var Yc = 9;
+function Xc({ value: e = 0, min: t = 0, max: n = 100, step: r = 1, label: i = "", suffix: a = "%", attr: o = "", className: s = "" } = {}) {
let c = n > t ? (e - t) / (n - t) * 100 : 0, l = `${e}${a}`;
return `<div class="ui-dial${s ? ` ${z(s)}` : ""}" ${o}>
<div class="ui-dial-slider" data-dial-slider role="slider" tabindex="0" aria-label="${z(i)}"
aria-valuemin="${t}" aria-valuemax="${n}" aria-valuenow="${e}" aria-valuetext="${z(l)}"
data-dial-step="${r}" style="--dial-at:${c}%">
<span class="ui-dial-track" aria-hidden="true"><span class="ui-dial-fill"></span></span>
- <span class="ui-dial-ticks" aria-hidden="true">${"<span></span>".repeat(Pc)}</span>
+ <span class="ui-dial-ticks" aria-hidden="true">${"<span></span>".repeat(Yc)}</span>
<span class="ui-dial-handle" aria-hidden="true"></span>
</div><b class="ui-dial-value mono" data-dial-value>${z(l)}</b></div>`;
}
-function Ic(e, { onInput: t = () => {}, onChange: n = () => {}, suffix: r = "%" } = {}) {
+function Zc(e, { onInput: t = () => {}, onChange: n = () => {}, suffix: r = "%" } = {}) {
let i = e.querySelector("[data-dial-slider]"), a = e.querySelector("[data-dial-value]"), o = e.querySelector(".ui-dial-track"), s = +i.getAttribute("aria-valuemin"), c = +i.getAttribute("aria-valuemax"), l = +i.dataset.dialStep || 1, u = +i.getAttribute("aria-valuenow"), d = (e) => Math.min(c, Math.max(s, Math.round(e / l) * l)), f = () => {
let e = `${u}${r}`;
i.style.setProperty("--dial-at", `${c > s ? (u - s) / (c - s) * 100 : 0}%`), i.setAttribute("aria-valuenow", String(u)), i.setAttribute("aria-valuetext", e), a && (a.textContent = e);
@@ -13732,9 +13766,9 @@ function Ic(e, { onInput: t = () => {}, onChange: n = () => {}, suffix: r = "%"
}
};
}
-function Lc(e, t, n) {
+function Qc(e, t, n) {
n.classList.add("context-card"), n.setAttribute("popover", "manual"), n.setAttribute("role", "dialog"), n.tabIndex = -1, t.setAttribute("aria-haspopup", "dialog"), t.setAttribute("aria-controls", n.id);
- let r = qo(e, t, n), i, a = () => {
+ let r = cs(e, t, n), i, a = () => {
clearTimeout(i), r.setOpen(!1);
}, o = () => {
clearTimeout(i), i = setTimeout(() => {
@@ -13754,7 +13788,7 @@ function Lc(e, t, n) {
hide: a
};
}
-function Rc(e, { selector: t, attribute: n, onMove: r } = {}) {
+function $c(e, { selector: t, attribute: n, onMove: r } = {}) {
let i = () => [...e.querySelectorAll(t)], a = () => i().forEach((e) => e.classList.remove("dragging", "drop-before", "drop-after")), o = null;
i().forEach((e) => {
let t = e.getAttribute(n);
@@ -13775,11 +13809,11 @@ function Rc(e, { selector: t, attribute: n, onMove: r } = {}) {
});
}
// src/ui-kit/modal.ts
-var zc = 0;
-function Bc({ title: e, description: t = "", body: n = "", confirmLabel: r, cancelLabel: i = "取消", onConfirm: a = null, confirmDisabled: o = !1 } = {}) {
+var el = 0;
+function tl({ title: e, description: t = "", body: n = "", confirmLabel: r, cancelLabel: i = "取消", onConfirm: a = null, confirmDisabled: o = !1 } = {}) {
let s = document.activeElement, c = document.createElement("dialog");
c.className = "ui-geist-modal";
- let l = `geist-form-title-${++zc}`;
+ let l = `geist-form-title-${++el}`;
c.setAttribute("aria-labelledby", l), c.innerHTML = `<form class="ui-geist-modal-form" novalidate>
<header class="ui-geist-modal-header"><h3 id="${l}"></h3></header>
<div class="ui-geist-modal-scroll"><div class="ui-geist-modal-body">${t ? "<p></p>" : ""}
@@ -13803,31 +13837,31 @@ function Bc({ title: e, description: t = "", body: n = "", confirmLabel: r, canc
if (e.preventDefault(), !(m || d.disabled)) {
if (!a) p = { confirmed: !0 }, c.close();
else {
- f.innerHTML = "", m = !0, kc(d);
+ f.innerHTML = "", m = !0, Wc(d);
try {
p = {
confirmed: !0,
result: await a()
}, c.close();
} catch (e) {
- f.innerHTML = bs(e.message || "操作未完成", { variant: "error" }), kc(d, !1);
+ f.innerHTML = Fs(e.message || "操作未完成", { variant: "error" }), Wc(d, !1);
} finally {
m = !1;
}
}
}
- }, c.showModal(), yo(c.querySelector(".ui-geist-modal-body")), No("pop"), (c.querySelector(".ui-geist-modal-fields input:not([type=\"checkbox\"])") || d).focus(), {
+ }, c.showModal(), Po(c.querySelector(".ui-geist-modal-body")), Jo("pop"), (c.querySelector(".ui-geist-modal-fields input:not([type=\"checkbox\"])") || d).focus(), {
dialog: c,
confirmButton: d,
done: h,
close: () => c.close()
};
}
-var Vc = 0;
-function Hc({ title: e, body: t, items: n = [], confirmLabel: r, cancelLabel: i = "取消", onConfirm: a = null, danger: o = !1 } = {}) {
+var nl = 0;
+function rl({ title: e, body: t, items: n = [], confirmLabel: r, cancelLabel: i = "取消", onConfirm: a = null, danger: o = !1 } = {}) {
let s = document.activeElement, c = document.createElement("dialog");
c.className = "ui-geist-modal";
- let l = `geist-modal-title-${++Vc}`;
+ let l = `geist-modal-title-${++nl}`;
c.setAttribute("aria-labelledby", l), c.innerHTML = `<header class="ui-geist-modal-header"><h3 id="${l}"></h3></header>
<div class="ui-geist-modal-scroll"><div class="ui-geist-modal-body">
<p></p><div data-modal-error></div></div></div>
@@ -13862,55 +13896,55 @@ function Hc({ title: e, body: t, items: n = [], confirmLabel: r, cancelLabel: i
if (!n) {
if (!a) t = { confirmed: !0 }, c.close();
else {
- p.innerHTML = "", n = !0, kc(f);
+ p.innerHTML = "", n = !0, Wc(f);
try {
t = {
confirmed: !0,
result: await a()
}, c.close();
} catch (e) {
- p.innerHTML = bs(e.message || "操作未完成", { variant: "error" }), kc(f, !1);
+ p.innerHTML = Fs(e.message || "操作未完成", { variant: "error" }), Wc(f, !1);
} finally {
n = !1;
}
}
}
- }, c.showModal(), yo(c.querySelector(".ui-geist-modal-body")), yo(u), No("pop"), (o ? d : f).focus();
+ }, c.showModal(), Po(c.querySelector(".ui-geist-modal-body")), Po(u), Jo("pop"), (o ? d : f).focus();
});
}
// src/onboarding/post-setup-tutorial.ts
-var Uc = "peach.post-setup-tutorial.v1", Wc = "peach.post-setup-tutorial-collapsed.v1", Gc = "peach.post-setup-tutorial-skipped.v1", Kc = (e) => {
+var il = "peach.post-setup-tutorial.v1", al = "peach.post-setup-tutorial-collapsed.v1", ol = "peach.post-setup-tutorial-skipped.v1", sl = (e) => {
try {
return localStorage.getItem(e);
} catch {
return null;
}
-}, qc = (e, t) => {
+}, cl = (e, t) => {
try {
localStorage.setItem(e, t);
} catch {}
-}, Jc = () => Kc("peach.post-setup-tutorial.v1") || "", Yc = (e) => qc(Uc, e), Xc = () => Kc(Wc) === "1", Zc = (e) => qc(Wc, e ? "1" : "0"), Qc = () => {
+}, ll = () => sl("peach.post-setup-tutorial.v1") || "", ul = (e) => cl(il, e), dl = () => sl(al) === "1", fl = (e) => cl(al, e ? "1" : "0"), pl = () => {
try {
- let e = JSON.parse(Kc("peach.post-setup-tutorial-skipped.v1") || "[]");
+ let e = JSON.parse(sl("peach.post-setup-tutorial-skipped.v1") || "[]");
return new Set(Array.isArray(e) ? e.filter((e) => typeof e == "string") : []);
} catch {
return /* @__PURE__ */ new Set();
}
-}, $c = (e) => qc(Gc, JSON.stringify([...e])), el = (e) => JSON.stringify(e.map((e) => [
+}, ml = (e) => cl(ol, JSON.stringify([...e])), hl = (e) => JSON.stringify(e.map((e) => [
e.key,
e.done,
e.label,
e.description,
e.href
-])), tl = 0, nl = () => ++tl, rl = (e) => e === tl;
-function il() {
- $c(/* @__PURE__ */ new Set()), Zc(!1), Yc("pending");
+])), gl = 0, _l = () => ++gl, vl = (e) => e === gl;
+function yl() {
+ ml(/* @__PURE__ */ new Set()), fl(!1), ul("pending");
}
-var al = (e) => `<article class="post-setup-notification post-setup-error">${e}
+var bl = (e) => `<article class="post-setup-notification post-setup-error">${e}
<div><h2>暂时无法检查安装进度</h2><p>切换页面或重新打开后会再检查一次。</p>
<div class="post-setup-error-actions"><button class="geist-button" type="button" data-tutorial-dismiss>关闭</button>
- <button class="geist-button" type="button" data-tutorial-retry>立即重试</button></div></div></article>`, ol = () => window.devicePixelRatio || 1;
-function sl(e) {
+ <button class="geist-button" type="button" data-tutorial-retry>立即重试</button></div></div></article>`, xl = () => window.devicePixelRatio || 1;
+function Sl(e) {
let t = e.parentElement;
if (!t || ([
"position",
@@ -13929,17 +13963,17 @@ function sl(e) {
delete e.dataset.faceFramed;
let n = new ResizeObserver(() => {
let r = t.getBoundingClientRect();
- r.width > 0 && r.height > 0 && (n.disconnect(), sl(e));
+ r.width > 0 && r.height > 0 && (n.disconnect(), Sl(e));
});
n.observe(t);
return;
}
- let [r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.facebox).split(" ").map(Number), c = Ea(e.naturalWidth, e.naturalHeight, o, s);
+ let [r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.facebox).split(" ").map(Number), c = Va(e.naturalWidth, e.naturalHeight, o, s);
if (!c) {
e.style.objectPosition = "50% 50%";
return;
}
- let l = va({
+ let l = Na({
cx: r,
cy: i,
faceW: a * c,
@@ -13948,13 +13982,13 @@ function sl(e) {
}, {
w: n.width,
h: n.height
- }, ol());
+ }, xl());
if (!l) return;
let u = e.style;
u.position = "absolute", u.right = "auto", u.bottom = "auto", u.left = `${l.left}%`, u.top = `${l.top}%`, u.width = `${l.width}%`, u.height = `${l.height}%`, u.maxWidth = "none", u.maxHeight = "none";
}
-function cl(e, t) {
- let n = e.naturalWidth / e.naturalHeight, r = n ? t ?? pl(e) : 0;
+function Cl(e, t) {
+ let n = e.naturalWidth / e.naturalHeight, r = n ? t ?? Ol(e) : 0;
if (e.closest(".pic,[data-media-pic]")?.style.removeProperty("--cover-blur"), !n) return;
e.classList.remove("panel"), [
"--panel-aspect",
@@ -13966,58 +14000,58 @@ function cl(e, t) {
"--cover-y"
].forEach((t) => e.style.removeProperty(t));
let i = e.dataset.coverCode || new URL(e.currentSrc || e.src, location.href).searchParams.get("code") || "";
- e.dataset.frame = e.dataset.coverLayout === "still" || /^FC2(?:-PPV)?-/i.test(i) ? "still" : dl(e) ? "sleeve" : n >= 1.65 ? "still" : n > 1.2 ? "sleeve" : "front";
+ e.dataset.frame = e.dataset.coverLayout === "still" || /^FC2(?:-PPV)?-/i.test(i) ? "still" : El(e) ? "sleeve" : n >= 1.65 ? "still" : n > 1.2 ? "sleeve" : "front";
let a = (t, n, r) => {
if (n == null || !(r > 0 && r < 1)) return;
let i = Math.min(1, Math.max(0, (n - r / 2) / (1 - r)));
e.style.setProperty(t, `${Math.round(i * 100)}%`);
};
- a("--cover-x", ml(e, "cx"), r / n), a("--cover-y", ml(e, "cy"), n / r), ll(e, r), e.dataset.frame !== "still" && (e.classList.contains("whole") || e.dataset.frame === "front") && Math.abs(n / r - 1) > .02 && ul(e);
+ a("--cover-x", kl(e, "cx"), r / n), a("--cover-y", kl(e, "cy"), n / r), wl(e, r), e.dataset.frame !== "still" && (e.classList.contains("whole") || e.dataset.frame === "front") && Math.abs(n / r - 1) > .02 && Tl(e);
}
-function ll(e, t) {
+function wl(e, t) {
if (e.dataset.frame === "front" || e.dataset.coverLayout === "still") return;
let [n = NaN, r = NaN, i = NaN, a = NaN, o = NaN, s = NaN] = String(e.dataset.posterbox || "").split(" ").map(Number);
- if (!e.dataset.posterbox && e.dataset.frame === "sleeve" && (r = e.naturalWidth, i = e.naturalHeight, n = Math.round(r - (dl(e) ? Ra : La) * i), a = 0, o = r, s = i), !Ea(e.naturalWidth, e.naturalHeight, r, i)) return;
- let c = (o - n) / (s - a), l = r / i, u = l >= 1.75 && l < 1.85 && Math.abs(c - .85) <= .02, d = za({
+ if (!e.dataset.posterbox && e.dataset.frame === "sleeve" && (r = e.naturalWidth, i = e.naturalHeight, n = Math.round(r - (El(e) ? $a : Qa) * i), a = 0, o = r, s = i), !Va(e.naturalWidth, e.naturalHeight, r, i)) return;
+ let c = (o - n) / (s - a), l = r / i, u = l >= 1.75 && l < 1.85 && Math.abs(c - .85) <= .02, d = eo({
x0: n,
y0: a,
x1: o,
y1: s,
px: [r, i]
- }, t, dl(e) || u);
- d && (e.style.setProperty("--panel-aspect", `${e.naturalWidth} / ${e.naturalHeight}`), e.classList.add("panel"), e.style.setProperty("--panel-clip", `${d.clip.top}% ${d.clip.right}% ${d.clip.bottom}% ${d.clip.left}%`), e.style.setProperty("--panel-left", `${d.left}%`), e.style.setProperty("--panel-top", `${d.top}%`), e.style.setProperty("--panel-height", `${d.height}%`), e.dataset.frame !== "still" && e.classList.contains("front") && Math.abs(c / t - 1) > .02 && ul(e));
+ }, t, El(e) || u);
+ d && (e.style.setProperty("--panel-aspect", `${e.naturalWidth} / ${e.naturalHeight}`), e.classList.add("panel"), e.style.setProperty("--panel-clip", `${d.clip.top}% ${d.clip.right}% ${d.clip.bottom}% ${d.clip.left}%`), e.style.setProperty("--panel-left", `${d.left}%`), e.style.setProperty("--panel-top", `${d.top}%`), e.style.setProperty("--panel-height", `${d.height}%`), e.dataset.frame !== "still" && e.classList.contains("front") && Math.abs(c / t - 1) > .02 && Tl(e));
}
-function ul(e) {
+function Tl(e) {
let t = (e.dataset.thumbSrc || e.currentSrc || e.src).replace(/"/g, "%22");
e.closest(".pic,[data-media-pic]")?.style.setProperty("--cover-blur", `url("${t}")`);
}
-function dl(e) {
+function El(e) {
let t = e.dataset.coverCode || new URL(e.currentSrc || e.src, location.href).searchParams.get("code") || "", n = e.naturalWidth / e.naturalHeight;
return !/^FC2(?:-PPV)?-/i.test(t) && (e.dataset.wideSleeve === "1" || /^(CWPBD|SMBD)-/i.test(t)) && n >= 1.75 && n < 1.85;
}
-function fl(e) {
+function Dl(e) {
let t = /[?&]thumb=([12])(?=&|$)/.exec(e.src)?.[1];
if (!t || !e.naturalWidth) return;
let { width: n, height: r } = e.getBoundingClientRect();
- (getComputedStyle(e).objectFit === "contain" ? Math.min : Math.max)(n / e.naturalWidth, r / e.naturalHeight) * ol() > 1.01 && (e.dataset.thumbSrc ||= e.src, e.src = t === "2" ? e.src.replace(/([?&])thumb=2(?=&|$)/, "$1thumb=1") : e.src.replace(/[?&]thumb=1(?=&|$)/, ""));
+ (getComputedStyle(e).objectFit === "contain" ? Math.min : Math.max)(n / e.naturalWidth, r / e.naturalHeight) * xl() > 1.01 && (e.dataset.thumbSrc ||= e.src, e.src = t === "2" ? e.src.replace(/([?&])thumb=2(?=&|$)/, "$1thumb=1") : e.src.replace(/[?&]thumb=1(?=&|$)/, ""));
}
-function pl(e) {
+function Ol(e) {
let t = (e.closest(".pic,[data-media-pic]")?.style.getPropertyValue("--card-ratio").trim() || getComputedStyle(e).getPropertyValue("--card-ratio").trim()).split("/").map(Number), n = t.length === 2 ? Number(t[0]) / Number(t[1]) : Number(t[0]);
return Number.isFinite(n) && n > 0 ? n : 16 / 9;
}
-function ml(e, t) {
+function kl(e, t) {
let n = parseFloat(e.dataset[t] ?? "");
return Number.isFinite(n) ? n : null;
}
-var hl = ".pic>img.poster,[data-media-art]>img,.ring>img,[data-tier-ring]>img,[data-person-ring]>img,[data-entity-portrait]>img,[data-hero-ring]>img", gl = /* @__PURE__ */ new WeakMap();
-function _l(e) {
- let t = e.matches(hl) ? [e] : e.querySelectorAll(hl);
- for (let e of t) !e.complete && e.parentElement && (e.parentElement.classList.add("imgwait"), gl.set(e.parentElement, performance.now()), Zs(e.parentElement));
+var Al = ".pic>img.poster,[data-media-art]>img,.ring>img,[data-tier-ring]>img,[data-person-ring]>img,[data-entity-portrait]>img,[data-hero-ring]>img", jl = /* @__PURE__ */ new WeakMap();
+function Ml(e) {
+ let t = e.matches(Al) ? [e] : e.querySelectorAll(Al);
+ for (let e of t) !e.complete && e.parentElement && (e.parentElement.classList.add("imgwait"), jl.set(e.parentElement, performance.now()), fc(e.parentElement));
}
-function vl(e) {
+function Nl(e) {
let t = e.parentElement;
if (!t?.classList.contains("imgwait")) return;
- if (Qs(t), performance.now() - (gl.get(t) ?? NaN) < 180) {
+ if (pc(t), performance.now() - (jl.get(t) ?? NaN) < 180) {
t.classList.remove("imgwait");
return;
}
@@ -14027,90 +14061,90 @@ function vl(e) {
};
t.addEventListener("transitionend", r), n = setTimeout(r, 1e3);
}
-function yl(e) {
+function Pl(e) {
let t = "img.cover,img[data-facebox]", n = e.matches(t) ? [e] : e.querySelectorAll(t);
for (let e of n) {
let t = e;
- t.complete && t.naturalWidth && (t.classList.contains("cover") ? cl(t) : (bl(t), sl(t)));
+ t.complete && t.naturalWidth && (t.classList.contains("cover") ? Cl(t) : (Fl(t), Sl(t)));
}
}
-function bl(e) {
+function Fl(e) {
let t = e.closest("[data-fit-native]");
if (!t || !e.naturalWidth) return;
- let n = t.dataset.fitNative === "mark" ? ka(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight) : null;
+ let n = t.dataset.fitNative === "mark" ? Wa(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight) : null;
if (t.dataset.nativeClamp = String(!!n), n) {
t.dataset.nativeSmall = "false", t.style.setProperty("--markw", n.width + "px"), t.style.setProperty("--markh", n.height + "px"), t.style.setProperty("--markbg", "none");
return;
}
- let { small: r, width: i, height: a } = Da(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight, ol());
+ let { small: r, width: i, height: a } = Ha(e.naturalWidth, e.naturalHeight, t.clientWidth, t.clientHeight, xl());
t.dataset.nativeSmall = String(r), t.style.setProperty("--markw", r ? i + "px" : "100%"), t.style.setProperty("--markh", r ? a + "px" : "100%");
let o = (e.currentSrc || e.src).replace(/"/g, "%22");
t.style.setProperty("--markbg", r ? `url("${o}")` : "none");
}
-function xl(e) {
+function Il(e) {
(e || document).querySelectorAll("[data-fit-native] img").forEach((e) => {
- bl(e), e.dataset.facebox && sl(e);
+ Fl(e), e.dataset.facebox && Sl(e);
});
}
-function Sl(e, t) {
- for (let n of Va(e, t)) cl(n), fl(n);
+function Ll(e, t) {
+ for (let n of no(e, t)) Cl(n), Dl(n);
}
-var Cl = !1;
-function wl() {
- Cl || (Cl = !0, document.addEventListener("load", (e) => {
+var Rl = !1;
+function zl() {
+ Rl || (Rl = !0, document.addEventListener("load", (e) => {
let t = e.target;
- t instanceof HTMLImageElement && (vl(t), bl(t), t.classList.contains("cover") ? (cl(t), fl(t)) : t.dataset.facebox && sl(t));
+ t instanceof HTMLImageElement && (Nl(t), Fl(t), t.classList.contains("cover") ? (Cl(t), Dl(t)) : t.dataset.facebox && Sl(t));
}, !0), new MutationObserver((e) => {
- for (let t of e) for (let e of t.addedNodes) e.nodeType === Node.ELEMENT_NODE && (_l(e), yl(e));
+ for (let t of e) for (let e of t.addedNodes) e.nodeType === Node.ELEMENT_NODE && (Ml(e), Pl(e));
}).observe(document.body, {
childList: !0,
subtree: !0
}), document.addEventListener("error", (e) => {
let t = e.target;
- t instanceof HTMLImageElement && !t.dataset.fallbacks && vl(t);
+ t instanceof HTMLImageElement && !t.dataset.fallbacks && Nl(t);
}, !0));
}
// src/card-art/hover.ts
-var Tl = ".card,[data-media-card],[data-mix-card]", El = {
+var Bl = ".card,[data-media-card],[data-mix-card]", Vl = {
selecting: () => !1,
censored: () => !1,
delaySeconds: () => 0
};
-function Dl(e) {
- El = e;
+function Hl(e) {
+ Vl = e;
}
-var Ol = () => !!window.__scrolling;
-function kl(e = document, t = null) {
- e && e.querySelectorAll && (e.querySelectorAll(Tl).forEach((e) => {
+var Ul = () => !!window.__scrolling;
+function Wl(e = document, t = null) {
+ e && e.querySelectorAll && (e.querySelectorAll(Bl).forEach((e) => {
e !== t && e._stopHover && e._stopHover();
}), e.querySelectorAll("video.hv").forEach((e) => {
- e.closest(Tl) !== t && (e._hop && clearInterval(e._hop), e.pause(), e.removeAttribute("src"), e.load(), e.remove());
+ e.closest(Bl) !== t && (e._hop && clearInterval(e._hop), e.pause(), e.removeAttribute("src"), e.load(), e.remove());
}), e.querySelectorAll("img.ui-hvframes").forEach((e) => {
- e.closest(Tl) !== t && (e.removeAttribute("src"), e.remove());
+ e.closest(Bl) !== t && (e.removeAttribute("src"), e.remove());
}));
}
-function Al(e) {
- e._stopHover?.(), kl(e);
+function Gl(e) {
+ e._stopHover?.(), Wl(e);
}
-function jl(e, t, n) {
+function Kl(e, t, n) {
n ? e.dataset[t] = "" : delete e.dataset[t];
}
-function Ml(e, t) {
+function ql(e, t) {
let n = e, r = e.querySelector("[data-media-pic]");
if (!r) return;
e.dataset.hoverMode = t.location === "local" ? "video" : "frames";
let i, a = () => {
- clearTimeout(i), El.delaySeconds() && (jl(e, "previewing", !0), i = setTimeout(() => {
- El.delaySeconds() && jl(e, "longhover", !0);
- }, El.delaySeconds() * 1e3));
+ clearTimeout(i), Vl.delaySeconds() && (Kl(e, "previewing", !0), i = setTimeout(() => {
+ Vl.delaySeconds() && Kl(e, "longhover", !0);
+ }, Vl.delaySeconds() * 1e3));
}, o = () => {
- clearTimeout(i), jl(e, "previewing", !1), jl(e, "longhover", !1);
+ clearTimeout(i), Kl(e, "previewing", !1), Kl(e, "longhover", !1);
};
if (t.location !== "local") {
if (!t.has_thumb) return;
let i, s = 4, c = null, l = !1;
e.addEventListener("mouseenter", () => {
- if (!(El.selecting() || El.censored())) {
+ if (!(Vl.selecting() || Vl.censored())) {
if (a(), !c) {
c = document.createElement("img"), c.className = "ui-hvframes", c.alt = "";
let e = c;
@@ -14137,9 +14171,9 @@ function Ml(e, t) {
}
let s, c = null;
e.addEventListener("mouseenter", () => {
- El.selecting() || El.censored() || Ol() || (s = setTimeout(() => {
- if (Ol() || El.censored()) return;
- kl(document, e);
+ Vl.selecting() || Vl.censored() || Ul() || (s = setTimeout(() => {
+ if (Ul() || Vl.censored()) return;
+ Wl(document, e);
let n = document.createElement("video");
c = n, n.className = "hv", n.muted = !0, n.playsInline = !0, n.loop = !0, n.preload = "metadata", n.src = "/stream?id=" + t.id;
let i = [
@@ -14174,20 +14208,20 @@ function Ml(e, t) {
n._stopHover = l, e.addEventListener("mouseleave", l);
}
// src/core/tags.ts
-var Nl = (e) => e;
+var Jl = (e) => e;
// src/react/follow-feed/follow-helpers.ts
-function Pl([e, t, , n, r]) {
- return n ? `<img src="/work-icon?work=${encodeURIComponent(e)}" width="128" height="128" alt="" loading="lazy"${eo(r)}${to(r)}>` : z(Pn(t, 2));
+function Yl([e, t, , n, r]) {
+ return n ? `<img src="/work-icon?work=${encodeURIComponent(e)}" width="128" height="128" alt="" loading="lazy"${go(r)}${_o(r)}>` : z(Yn(t, 2));
}
-function Fl(e) {
+function Xl(e) {
return {
...e,
- workMark: Pl,
- tagLabel: Nl
+ workMark: Yl,
+ tagLabel: Jl
};
}
// src/sidebar.ts
-var Il = [
+var Zl = [
"",
"follow",
"jav",
@@ -14196,7 +14230,7 @@ var Il = [
"studios",
"flagged",
"manage"
-], Ll = [
+], Ql = [
"playlists",
"immerse",
"stats",
@@ -14205,12 +14239,12 @@ var Il = [
"trash",
"follow-manage",
"quality"
-], Rl = /* @__PURE__ */ new Set([...Il, ...Ll]), zl = (e) => e === "ads" || e === "dupes" ? "data-cleanup" : e;
-function Bl(e) {
- let t = Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], n = [...new Set(t.map(zl))].filter((e) => Rl.has(e));
- return n.length ? n : [...Il];
+], $l = /* @__PURE__ */ new Set([...Zl, ...Ql]), eu = (e) => e === "ads" || e === "dupes" ? "data-cleanup" : e;
+function tu(e) {
+ let t = Array.isArray(e) ? e.filter((e) => typeof e == "string") : [], n = [...new Set(t.map(eu))].filter((e) => $l.has(e));
+ return n.length ? n : [...Zl];
}
-function Vl(e) {
+function nu(e) {
return [
"/",
"/unseen",
@@ -14220,13 +14254,13 @@ function Vl(e) {
"/junk-files"
].includes(e) || /^\/assets\//.test(e) || /^\/(performers|studios|creators|series|agencies|tags)\/.+/.test(e);
}
-function Hl(e) {
+function ru(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);
}
// src/react/follow-detail/follow-detail-actions.ts
-function Ul(e, t) {
+function iu(e, t) {
return {
...t,
close: () => e.close(),
@@ -14239,64 +14273,64 @@ function Ul(e, t) {
...n,
tags: [...r]
};
- e.adoptView(i), e.rememberReturn(ua(i)), e.close();
+ e.adoptView(i), e.rememberReturn(Ta(i)), e.close();
},
- present: (t) => e.drawer({ tags: Hl([{ tags: t.tags || [] }]) })
+ present: (t) => e.drawer({ tags: ru([{ tags: t.tags || [] }]) })
};
}
// src/shell/index.ts
-var U, Wl, Gl = null, Kl = /* @__PURE__ */ new Set(), ql = /* @__PURE__ */ new Set(), Jl = !1, Yl = null, Xl = null, Zl = "", Ql = "/", $l = null, eu = !1, tu = !1, nu = null, ru = null, iu = null, au = "/follow", ou = "", su = null, cu = !1, lu = 0, uu = 0, du = !1, fu = Math.floor(Math.random() * 4294967295), pu = 0, mu = 0, hu = 0, gu = /* @__PURE__ */ new Set(), _u = 0;
-function vu(e) {
+var U, au, ou = null, su = /* @__PURE__ */ new Set(), cu = /* @__PURE__ */ new Set(), lu = !1, uu = null, du = null, fu = "", pu = "/", mu = null, hu = !1, gu = !1, _u = null, vu = null, yu = null, bu = "/follow", xu = "", Su = null, Cu = !1, wu = 0, Tu = 0, Eu = !1, Du = Math.floor(Math.random() * 4294967295), Ou = 0, ku = 0, Au = 0, ju = /* @__PURE__ */ new Set(), Mu = 0;
+function W(e) {
let t = (t) => Object.prototype.hasOwnProperty.call(e, t);
- t("state") && (U = e.state), t("barsContext") && (Wl = e.barsContext), t("detailReturnBarsContext") && (Gl = e.detailReturnBarsContext), t("selectMode") && (Jl = e.selectMode), t("lastSelectedId") && (Yl = e.lastSelectedId), t("followLastSelectedId") && (Xl = e.followLastSelectedId), t("selectSurface") && (Zl = e.selectSurface), t("detailReturnPath") && (Ql = e.detailReturnPath), t("detailOriginAnchor") && ($l = e.detailOriginAnchor), t("detailOriginAbove") && (eu = e.detailOriginAbove), t("detailReturnNeedsRestore") && (tu = e.detailReturnNeedsRestore), t("activeQueue") && (nu = e.activeQueue), t("pendingQueueRoute") && (ru = e.pendingQueueRoute), t("presentedItem") && (iu = e.presentedItem), t("followDetailReturnPath") && (au = e.followDetailReturnPath), t("configurationRequestedSection") && (ou = e.configurationRequestedSection), t("pageOpens") && (lu = e.pageOpens), t("queueOpens") && (uu = e.queueOpens), t("entityJavLayout") && (du = e.entityJavLayout), t("followDiscoverySeed") && (fu = e.followDiscoverySeed), t("followRevision") && (pu = e.followRevision), t("followScrollY") && (mu = e.followScrollY), t("playlistsRevision") && (hu = e.playlistsRevision), t("runtimeConfigurable") && (su = e.runtimeConfigurable), t("cameFromSetup") && (cu = e.cameFromSetup), yu();
+ t("state") && (U = e.state), t("barsContext") && (au = e.barsContext), t("detailReturnBarsContext") && (ou = e.detailReturnBarsContext), t("selectMode") && (lu = e.selectMode), t("lastSelectedId") && (uu = e.lastSelectedId), t("followLastSelectedId") && (du = e.followLastSelectedId), t("selectSurface") && (fu = e.selectSurface), t("detailReturnPath") && (pu = e.detailReturnPath), t("detailOriginAnchor") && (mu = e.detailOriginAnchor), t("detailOriginAbove") && (hu = e.detailOriginAbove), t("detailReturnNeedsRestore") && (gu = e.detailReturnNeedsRestore), t("activeQueue") && (_u = e.activeQueue), t("pendingQueueRoute") && (vu = e.pendingQueueRoute), t("presentedItem") && (yu = e.presentedItem), t("followDetailReturnPath") && (bu = e.followDetailReturnPath), t("configurationRequestedSection") && (xu = e.configurationRequestedSection), t("pageOpens") && (wu = e.pageOpens), t("queueOpens") && (Tu = e.queueOpens), t("entityJavLayout") && (Eu = e.entityJavLayout), t("followDiscoverySeed") && (Du = e.followDiscoverySeed), t("followRevision") && (Ou = e.followRevision), t("followScrollY") && (ku = e.followScrollY), t("playlistsRevision") && (Au = e.playlistsRevision), t("runtimeConfigurable") && (Su = e.runtimeConfigurable), t("cameFromSetup") && (Cu = e.cameFromSetup), Nu();
}
-function yu() {
- _u += 1;
- for (let e of [...gu]) e();
+function Nu() {
+ Mu += 1;
+ for (let e of [...ju]) e();
}
-function bu(e) {
- return gu.add(e), () => {
- gu.delete(e);
+function Pu(e) {
+ return ju.add(e), () => {
+ ju.delete(e);
};
}
// node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs
-var xu = /* @__PURE__ */ (0, P.createContext)({});
+var Fu = /* @__PURE__ */ (0, P.createContext)({});
// node_modules/framer-motion/dist/es/utils/use-constant.mjs
-function Su(e) {
+function Iu(e) {
let t = (0, P.useRef)(null);
return t.current === null && (t.current = e()), t.current;
}
// node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs
-var Cu = typeof window < "u" ? P.useLayoutEffect : P.useEffect, wu = /* @__PURE__ */ (0, P.createContext)(null);
+var Lu = typeof window < "u" ? P.useLayoutEffect : P.useEffect, Ru = /* @__PURE__ */ (0, P.createContext)(null);
// node_modules/motion-utils/dist/es/array.mjs
-function Tu(e, t) {
+function zu(e, t) {
e.indexOf(t) === -1 && e.push(t);
}
-function Eu(e, t) {
+function Bu(e, t) {
let n = e.indexOf(t);
n > -1 && e.splice(n, 1);
}
// node_modules/motion-utils/dist/es/clamp.mjs
-var Du = (e, t, n) => n > t ? t : n < e ? e : n, Ou = {}, ku = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), Au = (e) => typeof e == "object" && !!e, ju = (e) => /^0[^.\s]+$/u.test(e);
+var Vu = (e, t, n) => n > t ? t : n < e ? e : n, Hu = {}, Uu = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), Wu = (e) => typeof e == "object" && !!e, Gu = (e) => /^0[^.\s]+$/u.test(e);
// node_modules/motion-utils/dist/es/memo.mjs
/*#__NO_SIDE_EFFECTS__*/
-function Mu(e) {
+function Ku(e) {
let t;
return () => (t === void 0 && (t = e()), t);
}
// node_modules/motion-utils/dist/es/noop.mjs
-var Nu = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Pu = (...e) => e.reduce((e, t) => (n) => t(e(n))), Fu = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
+var qu = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Ju = (...e) => e.reduce((e, t) => (n) => t(e(n))), Yu = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
let r = t - e;
return r ? (n - e) / r : 1;
-}, Iu = class {
+}, Xu = class {
constructor() {
this.subscriptions = [];
}
add(e) {
- return Tu(this.subscriptions, e), () => this.remove(e);
+ return zu(this.subscriptions, e), () => this.remove(e);
}
remove(e) {
- Eu(this.subscriptions, e);
+ Bu(this.subscriptions, e);
}
notify(e, t, n) {
let r = this.subscriptions.length;
@@ -14314,146 +14348,146 @@ var Nu = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Pu = (...e) => e.reduce((e, t) =>
clear() {
this.subscriptions.length = 0;
}
-}, Lu = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, Ru = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, zu = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? 1e3 / t * e : 0, Bu = (e, t, n) => {
+}, Zu = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, Qu = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, $u = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? 1e3 / t * e : 0, ed = (e, t, n) => {
let r = t - e;
return ((n - e) % r + r) % r + e;
-}, Vu = (e, t, n) => e * (3 * (1 - e) * ((1 - e) * t + e * n) + e * e);
+}, td = (e, t, n) => e * (3 * (1 - e) * ((1 - e) * t + e * n) + e * e);
/*#__NO_SIDE_EFFECTS__*/
-function Hu(e, t, n, r) {
- return e === t && n === r ? Nu : (i) => {
+function nd(e, t, n, r) {
+ return e === t && n === r ? qu : (i) => {
let a = 0, o = 1, s = i;
for (let t = 0;; t++) {
s >= a && s <= o || (s = (a + o) / 2);
- let r = Vu(s, e, n) - i;
+ let r = td(s, e, n) - i;
if (r * r < 1e-28 || t === 40) break;
- r > 0 ? o = s : a = s, s -= r * 1e-7 / (Vu(s + 1e-7, e, n) - i - r);
+ r > 0 ? o = s : a = s, s -= r * 1e-7 / (td(s + 1e-7, e, n) - i - r);
}
- return Vu(s, t, r);
+ return td(s, t, r);
};
}
// node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs
-var Uu = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Wu = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), Gu = /*@__PURE__*/ Hu(.33, 1.53, .69, .99), Ku = /*@__PURE__*/ Wu(Gu), qu = /*@__PURE__*/ Uu(Ku), Ju = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * Ku(e) : .5 * (2 - 2 ** (-10 * (e - 1))), Yu = (e) => 1 - Math.sin(Math.acos(e)), Xu = /* @__PURE__ */ Wu(Yu), Zu = /* @__PURE__ */ Uu(Yu), Qu = /*@__PURE__*/ Hu(.42, 0, 1, 1), $u = /*@__PURE__*/ Hu(0, 0, .58, 1), ed = /*@__PURE__*/ Hu(.42, 0, .58, 1), td = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number";
+var rd = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= .5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, id = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), ad = /*@__PURE__*/ nd(.33, 1.53, .69, .99), od = /*@__PURE__*/ id(ad), sd = /*@__PURE__*/ rd(od), cd = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? .5 * od(e) : .5 * (2 - 2 ** (-10 * (e - 1))), ld = (e) => 1 - Math.sin(Math.acos(e)), ud = /* @__PURE__ */ id(ld), dd = /* @__PURE__ */ rd(ld), fd = /*@__PURE__*/ nd(.42, 0, 1, 1), pd = /*@__PURE__*/ nd(0, 0, .58, 1), md = /*@__PURE__*/ nd(.42, 0, .58, 1), hd = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number";
// node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
/*#__NO_SIDE_EFFECTS__*/
-function nd(e, t) {
- return /* @__PURE__ */ td(e) ? e[Bu(0, e.length, t)] : e;
+function gd(e, t) {
+ return /* @__PURE__ */ hd(e) ? e[ed(0, e.length, t)] : e;
}
// node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs
-var rd = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] == "number", id = {
- linear: Nu,
- easeIn: Qu,
- easeInOut: ed,
- easeOut: $u,
- circIn: Yu,
- circInOut: Zu,
- circOut: Xu,
- backIn: Ku,
- backInOut: qu,
- backOut: Gu,
- anticipate: Ju
-}, ad = (e) => typeof e == "string", od = (e) => {
- if (/* @__PURE__ */ rd(e)) {
+var _d = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] == "number", vd = {
+ linear: qu,
+ easeIn: fd,
+ easeInOut: md,
+ easeOut: pd,
+ circIn: ld,
+ circInOut: dd,
+ circOut: ud,
+ backIn: od,
+ backInOut: sd,
+ backOut: ad,
+ anticipate: cd
+}, yd = (e) => typeof e == "string", bd = (e) => {
+ if (/* @__PURE__ */ _d(e)) {
let [t, n, r, i] = e;
- return /* @__PURE__ */ Hu(t, n, r, i);
+ return /* @__PURE__ */ nd(t, n, r, i);
}
- return ad(e) ? id[e] : e;
-}, sd = {
+ return yd(e) ? vd[e] : e;
+}, xd = {
delta: 0,
timestamp: 0,
isProcessing: !1
-}, cd;
-function ld() {
- cd = void 0;
+}, Sd;
+function Cd() {
+ Sd = void 0;
}
-var ud = {
- now: () => (cd === void 0 && ud.set(sd.isProcessing || Ou.useManualTiming ? sd.timestamp : performance.now()), cd),
+var wd = {
+ now: () => (Sd === void 0 && wd.set(xd.isProcessing || Hu.useManualTiming ? xd.timestamp : performance.now()), Sd),
set: (e) => {
- cd = e, queueMicrotask(ld);
+ Sd = e, queueMicrotask(Cd);
}
-}, dd = (e) => Math.round(e * 1e5) / 1e5, fd = (e) => (t) => typeof t == "string" && t.startsWith(e), pd = /*@__PURE__*/ fd("--"), md = /*@__PURE__*/ fd("var(--"), hd = (e) => md(e) ? gd.test(e.split("/*")[0].trim()) : !1, gd = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
-function _d(e) {
+}, Td = (e) => Math.round(e * 1e5) / 1e5, Ed = (e) => (t) => typeof t == "string" && t.startsWith(e), Dd = /*@__PURE__*/ Ed("--"), Od = /*@__PURE__*/ Ed("var(--"), kd = (e) => Od(e) ? Ad.test(e.split("/*")[0].trim()) : !1, Ad = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
+function jd(e) {
return typeof e == "string" && e.split("/*")[0].includes("var(--");
}
// node_modules/motion-dom/dist/es/value/types/numbers/index.mjs
-var vd = {
+var Md = {
test: (e) => typeof e == "number",
parse: parseFloat,
transform: (e) => e
-}, yd = {
- ...vd,
- transform: (e) => Du(0, 1, e)
-}, bd = {
- ...vd,
+}, Nd = {
+ ...Md,
+ transform: (e) => Vu(0, 1, e)
+}, Pd = {
+ ...Md,
default: 1
-}, xd = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
+}, Fd = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
// node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs
-function Sd(e) {
+function Id(e) {
return e == null;
}
// node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs
-var Cd = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, wd = (e, t) => (n) => !!(typeof n == "string" && Cd.test(n) && n.startsWith(e) || t && !Sd(n) && Object.prototype.hasOwnProperty.call(n, t)), Td = (e, t, n) => (r) => {
+var Ld = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Rd = (e, t) => (n) => !!(typeof n == "string" && Ld.test(n) && n.startsWith(e) || t && !Id(n) && Object.prototype.hasOwnProperty.call(n, t)), zd = (e, t, n) => (r) => {
if (typeof r != "string") return r;
- let [i, a, o, s] = r.match(xd);
+ let [i, a, o, s] = r.match(Fd);
return {
[e]: parseFloat(i),
[t]: parseFloat(a),
[n]: parseFloat(o),
alpha: s === void 0 ? 1 : parseFloat(s)
};
-}, Ed = (e) => Du(0, 255, e), Dd = {
- ...vd,
- transform: (e) => Math.round(Ed(e))
-}, Od = {
- test: /*@__PURE__*/ wd("rgb", "red"),
- parse: /*@__PURE__*/ Td("red", "green", "blue"),
- transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + Dd.transform(e) + ", " + Dd.transform(t) + ", " + Dd.transform(n) + ", " + dd(yd.transform(r)) + ")"
-}, kd = (e, t, n) => {
+}, Bd = (e) => Vu(0, 255, e), Vd = {
+ ...Md,
+ transform: (e) => Math.round(Bd(e))
+}, Hd = {
+ test: /*@__PURE__*/ Rd("rgb", "red"),
+ parse: /*@__PURE__*/ zd("red", "green", "blue"),
+ transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + Vd.transform(e) + ", " + Vd.transform(t) + ", " + Vd.transform(n) + ", " + Td(Nd.transform(r)) + ")"
+}, Ud = (e, t, n) => {
let r = e.substring(1 + t * n, 1 + (t + 1) * n);
return n > 1 ? r : r + r;
};
-function Ad(e) {
- let t = e.length > 5 ? 2 : 1, n = kd(e, 3, t);
+function Wd(e) {
+ let t = e.length > 5 ? 2 : 1, n = Ud(e, 3, t);
return {
- red: parseInt(kd(e, 0, t), 16),
- green: parseInt(kd(e, 1, t), 16),
- blue: parseInt(kd(e, 2, t), 16),
+ red: parseInt(Ud(e, 0, t), 16),
+ green: parseInt(Ud(e, 1, t), 16),
+ blue: parseInt(Ud(e, 2, t), 16),
alpha: n ? parseInt(n, 16) / 255 : 1
};
}
-var jd = {
- test: /*@__PURE__*/ wd("#"),
- parse: Ad,
- transform: Od.transform
-}, Md = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
+var Gd = {
+ test: /*@__PURE__*/ Rd("#"),
+ parse: Wd,
+ transform: Hd.transform
+}, Kd = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
parse: parseFloat,
transform: (t) => `${t}${e}`
-}), Nd = /*@__PURE__*/ Md("deg"), Pd = /*@__PURE__*/ Md("%"), W = /*@__PURE__*/ Md("px"), Fd = /*@__PURE__*/ Md("vh"), Id = /*@__PURE__*/ Md("vw"), Ld = {
- ...Pd,
- parse: (e) => Pd.parse(e) / 100,
- transform: (e) => Pd.transform(e * 100)
-}, Rd = {
- test: /*@__PURE__*/ wd("hsl", "hue"),
- parse: /*@__PURE__*/ Td("hue", "saturation", "lightness"),
- transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Pd.transform(dd(t)) + ", " + Pd.transform(dd(n)) + ", " + dd(yd.transform(r)) + ")"
-}, zd = {
- test: (e) => Od.test(e) || jd.test(e) || Rd.test(e),
- parse: (e) => Od.test(e) ? Od.parse(e) : Rd.test(e) ? Rd.parse(e) : jd.parse(e),
- transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Od.transform(e) : Rd.transform(e),
+}), qd = /*@__PURE__*/ Kd("deg"), Jd = /*@__PURE__*/ Kd("%"), Yd = /*@__PURE__*/ Kd("px"), Xd = /*@__PURE__*/ Kd("vh"), Zd = /*@__PURE__*/ Kd("vw"), Qd = {
+ ...Jd,
+ parse: (e) => Jd.parse(e) / 100,
+ transform: (e) => Jd.transform(e * 100)
+}, $d = {
+ test: /*@__PURE__*/ Rd("hsl", "hue"),
+ parse: /*@__PURE__*/ zd("hue", "saturation", "lightness"),
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + Jd.transform(Td(t)) + ", " + Jd.transform(Td(n)) + ", " + Td(Nd.transform(r)) + ")"
+}, ef = {
+ test: (e) => Hd.test(e) || Gd.test(e) || $d.test(e),
+ parse: (e) => Hd.test(e) ? Hd.parse(e) : $d.test(e) ? $d.parse(e) : Gd.parse(e),
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Hd.transform(e) : $d.transform(e),
getAnimatableNone: (e) => {
- let t = zd.parse(e);
- return t.alpha = 0, zd.transform(t);
+ let t = ef.parse(e);
+ return t.alpha = 0, ef.transform(t);
}
-}, Bd = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Vd = /*@__PURE__*/ new RegExp(xd.source), Hd = /*@__PURE__*/ new RegExp(Bd.source, "i");
-function Ud(e) {
- return isNaN(e) && typeof e == "string" && (Vd.test(e) || Hd.test(e));
+}, tf = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, nf = /*@__PURE__*/ new RegExp(Fd.source), rf = /*@__PURE__*/ new RegExp(tf.source, "i");
+function af(e) {
+ return isNaN(e) && typeof e == "string" && (nf.test(e) || rf.test(e));
}
-var Wd = "number", Gd = "color", Kd = "var", qd = "var(", Jd = "${}", Yd = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;
-function Xd(e) {
+var of = "number", sf = "color", cf = "var", lf = "var(", uf = "${}", df = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)(?![a-z]*\()/giu;
+function ff(e) {
let t = e.toString();
- return Vd.test(t) || Hd.test(t);
+ return nf.test(t) || rf.test(t);
}
-function Zd(e) {
+function pf(e) {
let t = e.toString(), n = [], r = {
color: [],
number: [],
@@ -14461,50 +14495,50 @@ function Zd(e) {
}, i = [], a = 0;
return {
values: n,
- split: t.replace(Yd, (e) => (zd.test(e) ? (r.color.push(a), i.push(Gd), n.push(zd.parse(e))) : e.startsWith(qd) ? (r.var.push(a), i.push(Kd), n.push(e)) : (r.number.push(a), i.push(Wd), n.push(parseFloat(e))), ++a, Jd)).split(Jd),
+ split: t.replace(df, (e) => (ef.test(e) ? (r.color.push(a), i.push(sf), n.push(ef.parse(e))) : e.startsWith(lf) ? (r.var.push(a), i.push(cf), n.push(e)) : (r.number.push(a), i.push(of), n.push(parseFloat(e))), ++a, uf)).split(uf),
indexes: r,
types: i
};
}
-function Qd(e) {
- return Zd(e).values;
+function mf(e) {
+ return pf(e).values;
}
-function $d({ split: e, types: t }) {
+function hf({ split: e, types: t }) {
let n = e.length;
return (r) => {
let i = "";
for (let a = 0; a < n; a++) if (i += e[a], r[a] !== void 0) {
let e = t[a];
- i += e === Wd ? dd(r[a]) : e === Gd ? zd.transform(r[a]) : r[a];
+ i += e === of ? Td(r[a]) : e === sf ? ef.transform(r[a]) : r[a];
}
return i;
};
}
-function ef(e) {
- return $d(Zd(e));
+function gf(e) {
+ return hf(pf(e));
}
-var tf = (e) => typeof e == "number" ? 0 : zd.test(e) ? zd.getAnimatableNone(e) : e, nf = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : tf(e);
-function rf(e) {
- let t = Zd(e);
- return $d(t)(t.values.map((e, n) => nf(e, t.split[n])));
+var _f = (e) => typeof e == "number" ? 0 : ef.test(e) ? ef.getAnimatableNone(e) : e, vf = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : _f(e);
+function yf(e) {
+ let t = pf(e);
+ return hf(t)(t.values.map((e, n) => vf(e, t.split[n])));
}
-var af = {
- test: Ud,
- parse: Qd,
- createTransformer: ef,
- getAnimatableNone: rf
+var bf = {
+ test: af,
+ parse: mf,
+ createTransformer: gf,
+ getAnimatableNone: yf
};
// node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs
-function of(e, t, n) {
+function xf(e, t, n) {
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
}
-function sf({ hue: e, saturation: t, lightness: n, alpha: r }) {
+function Sf({ hue: e, saturation: t, lightness: n, alpha: r }) {
e /= 360, t /= 100, n /= 100;
let i = 0, a = 0, o = 0;
if (!t) i = a = o = n;
else {
let r = n < .5 ? n * (1 + t) : n + t - n * t, s = 2 * n - r;
- i = of(s, r, e + 1 / 3), a = of(s, r, e), o = of(s, r, e - 1 / 3);
+ i = xf(s, r, e + 1 / 3), a = xf(s, r, e), o = xf(s, r, e - 1 / 3);
}
return {
red: Math.round(i * 255),
@@ -14514,59 +14548,59 @@ function sf({ hue: e, saturation: t, lightness: n, alpha: r }) {
};
}
// node_modules/motion-dom/dist/es/utils/mix/immediate.mjs
-function cf(e, t) {
+function Cf(e, t) {
return (n) => n > 0 ? t : e;
}
// node_modules/motion-dom/dist/es/utils/mix/number.mjs
-var lf = (e, t, n) => e + (t - e) * n, uf = (e, t, n) => {
+var wf = (e, t, n) => e + (t - e) * n, Tf = (e, t, n) => {
let r = e * e, i = n * (t * t - r) + r;
return i < 0 ? 0 : Math.sqrt(i);
-}, df = [
- jd,
- Od,
- Rd
-], ff = (e) => df.find((t) => t.test(e));
-function pf(e) {
- let t = ff(e);
+}, Ef = [
+ Gd,
+ Hd,
+ $d
+], Df = (e) => Ef.find((t) => t.test(e));
+function Of(e) {
+ let t = Df(e);
if (!t) return !1;
let n = t.parse(e);
- return t === Rd && (n = sf(n)), n;
+ return t === $d && (n = Sf(n)), n;
}
-var mf = (e, t) => {
- let n = pf(e), r = pf(t);
- if (!n || !r) return cf(e, t);
+var kf = (e, t) => {
+ let n = Of(e), r = Of(t);
+ if (!n || !r) return Cf(e, t);
let i = { ...n };
- return (e) => (i.red = uf(n.red, r.red, e), i.green = uf(n.green, r.green, e), i.blue = uf(n.blue, r.blue, e), i.alpha = lf(n.alpha, r.alpha, e), Od.transform(i));
-}, hf = /* @__PURE__ */ new Set(["none", "hidden"]);
-function gf(e, t) {
- return hf.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
+ return (e) => (i.red = Tf(n.red, r.red, e), i.green = Tf(n.green, r.green, e), i.blue = Tf(n.blue, r.blue, e), i.alpha = wf(n.alpha, r.alpha, e), Hd.transform(i));
+}, Af = /* @__PURE__ */ new Set(["none", "hidden"]);
+function jf(e, t) {
+ return Af.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
}
// node_modules/motion-dom/dist/es/utils/mix/complex.mjs
-function _f(e, t) {
- return (n) => lf(e, t, n);
+function Mf(e, t) {
+ return (n) => wf(e, t, n);
}
-function vf(e) {
- return typeof e == "number" ? _f : typeof e == "string" ? hd(e) ? cf : zd.test(e) ? mf : Sf : Array.isArray(e) ? yf : typeof e == "object" ? zd.test(e) ? mf : bf : cf;
+function Nf(e) {
+ return typeof e == "number" ? Mf : typeof e == "string" ? kd(e) ? Cf : ef.test(e) ? kf : Lf : Array.isArray(e) ? Pf : typeof e == "object" ? ef.test(e) ? kf : Ff : Cf;
}
-function yf(e, t) {
- let n = [...e], r = n.length, i = e.map((e, n) => vf(e)(e, t[n]));
+function Pf(e, t) {
+ let n = [...e], r = n.length, i = e.map((e, n) => Nf(e)(e, t[n]));
return (e) => {
for (let t = 0; t < r; t++) n[t] = i[t](e);
return n;
};
}
-function bf(e, t) {
+function Ff(e, t) {
let n = {
...e,
...t
}, r = {};
- for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = vf(e[i])(e[i], t[i]));
+ for (let i in n) e[i] !== void 0 && t[i] !== void 0 && (r[i] = Nf(e[i])(e[i], t[i]));
return (e) => {
for (let t in r) n[t] = r[t](e);
return n;
};
}
-function xf(e, t) {
+function If(e, t) {
let n = [], r = {
color: 0,
var: 0,
@@ -14578,28 +14612,28 @@ function xf(e, t) {
}
return n;
}
-var Sf = (e, t) => {
- let n = Zd(e), r = Zd(t);
- return n.indexes.var.length === r.indexes.var.length && n.indexes.color.length === r.indexes.color.length && n.indexes.number.length >= r.indexes.number.length ? hf.has(e) && !r.values.length || hf.has(t) && !n.values.length ? gf(e, t) : Pu(yf(xf(n, r), r.values), $d(r)) : cf(e, t);
-}, Cf = /^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;
-function wf(e, t) {
- let n = Cf.exec(e);
+var Lf = (e, t) => {
+ let n = pf(e), r = pf(t);
+ return n.indexes.var.length === r.indexes.var.length && n.indexes.color.length === r.indexes.color.length && n.indexes.number.length >= r.indexes.number.length ? Af.has(e) && !r.values.length || Af.has(t) && !n.values.length ? jf(e, t) : Ju(Pf(If(n, r), r.values), hf(r)) : Cf(e, t);
+}, Rf = /^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;
+function zf(e, t) {
+ let n = Rf.exec(e);
if (!n) return;
- let r = Cf.exec(t);
+ let r = Rf.exec(t);
if (!r || n[2] !== r[2]) return;
let i = n[2], a = parseFloat(n[1]), o = parseFloat(r[1]);
- return (e) => dd(lf(a, o, e)) + i;
+ return (e) => Td(wf(a, o, e)) + i;
}
-function Tf(e, t, n) {
- if (typeof e == "number" && typeof t == "number" && typeof n == "number") return lf(e, t, n);
+function Bf(e, t, n) {
+ if (typeof e == "number" && typeof t == "number" && typeof n == "number") return wf(e, t, n);
if (typeof e == "string" && typeof t == "string") {
- let n = wf(e, t);
+ let n = zf(e, t);
if (n) return n;
}
- return vf(e)(e, t);
+ return Nf(e)(e, t);
}
// node_modules/motion-dom/dist/es/frameloop/order.mjs
-var Ef = [
+var Vf = [
"setup",
"read",
"resolveKeyframes",
@@ -14610,7 +14644,7 @@ var Ef = [
"postRender"
];
// node_modules/motion-dom/dist/es/frameloop/render-step.mjs
-function Df(e) {
+function Hf(e) {
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = !1, i = !1, a, o = /* @__PURE__ */ new Set(), s = {
delta: 0,
timestamp: 0,
@@ -14640,117 +14674,117 @@ function Df(e) {
return l;
}
// node_modules/motion-dom/dist/es/frameloop/batcher.mjs
-var Of = 40;
-function kf(e, t, n = {
+var Uf = 40;
+function Wf(e, t, n = {
delta: 0,
timestamp: 0,
isProcessing: !1
}) {
- let r = !1, i = !0, a = () => r = !0, o = Ef.reduce((e, t) => (e[t] = Df(a), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => {
- let a = Ou.useManualTiming, o = a ? n.timestamp : performance.now();
- r = !1, a || (n.delta = i ? 1e3 / 60 : Math.max(Math.min(o - n.timestamp, Of), 1)), n.timestamp = o, n.isProcessing = !0, s.process(n), c.process(n), l.process(n), u.process(n), d.process(n), f.process(n), p.process(n), m.process(n), n.isProcessing = !1, r && t && (i = !1, e(h));
+ let r = !1, i = !0, a = () => r = !0, o = Vf.reduce((e, t) => (e[t] = Hf(a), e), {}), { setup: s, read: c, resolveKeyframes: l, preUpdate: u, update: d, preRender: f, render: p, postRender: m } = o, h = () => {
+ let a = Hu.useManualTiming, o = a ? n.timestamp : performance.now();
+ r = !1, a || (n.delta = i ? 1e3 / 60 : Math.max(Math.min(o - n.timestamp, Uf), 1)), n.timestamp = o, n.isProcessing = !0, s.process(n), c.process(n), l.process(n), u.process(n), d.process(n), f.process(n), p.process(n), m.process(n), n.isProcessing = !1, r && t && (i = !1, e(h));
}, g = () => {
r = !0, i = !0, n.isProcessing || e(h);
};
return {
- schedule: Ef.reduce((e, t) => {
+ schedule: Vf.reduce((e, t) => {
let n = o[t];
return e[t] = (e, t = !1, i = !1) => (r || g(), n.schedule(e, t, i)), e;
}, {}),
cancel: (e) => {
- for (let t = 0; t < Ef.length; t++) o[Ef[t]].cancel(e);
+ for (let t = 0; t < Vf.length; t++) o[Vf[t]].cancel(e);
},
state: n,
steps: o
};
}
// node_modules/motion-dom/dist/es/frameloop/frame.mjs
-var { schedule: Af, cancel: jf, steps: Mf } = /* @__PURE__ */ kf(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Nu, !0, sd), Nf = (e) => {
+var { schedule: Gf, cancel: Kf, steps: qf } = /* @__PURE__ */ Wf(typeof requestAnimationFrame < "u" ? requestAnimationFrame : qu, !0, xd), Jf = (e) => {
let t = ({ timestamp: t }) => e(t);
return {
- start: (e = !0) => Af.update(t, e),
- stop: () => jf(t),
- now: () => sd.isProcessing ? sd.timestamp : ud.now()
+ start: (e = !0) => Gf.update(t, e),
+ stop: () => Kf(t),
+ now: () => xd.isProcessing ? xd.timestamp : wd.now()
};
-}, Pf = (e, t, n = 10) => {
+}, Yf = (e, t, n = 10) => {
let r = "", i = Math.max(Math.round(t / n), 2);
for (let t = 0; t < i; t++) r += Math.round(e(t / (i - 1)) * 1e4) / 1e4 + ", ";
return `linear(${r.substring(0, r.length - 2)})`;
-}, Ff = 2e4;
-function If(e, t = 50, n = Ff, r) {
+}, Xf = 2e4;
+function Zf(e, t = 50, n = Xf, r) {
let i = 0, a = e.next(i);
for (r?.push(a.value); !a.done && i < n;) i += t, a = e.next(i), r?.push(a.value);
return i >= n ? Infinity : i;
}
// node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs
-function Lf(e, t = 100, n) {
+function Qf(e, t = 100, n) {
let { keyframes: r, velocity: i } = e, a = r && r[r.length - 1] - r[0], o = n({
...e,
velocity: i && a ? i * t / a : i,
keyframes: [0, t]
- }), s = Math.min(If(o), Ff);
+ }), s = Math.min(Zf(o), Xf);
return {
type: "keyframes",
ease: (e) => o.next(s * e).value / t,
- duration: /* @__PURE__ */ Ru(s)
+ duration: /* @__PURE__ */ Qu(s)
};
}
// node_modules/motion-dom/dist/es/animation/generators/spring.mjs
-var Rf = 100, zf = 10, Bf = 1, Vf = 800, Hf = .3, Uf = .3, Wf = .01, Gf = 2, Kf = .005, qf = .5, Jf = .01, Yf = 10, Xf = .05, Zf = (e) => e < 0 ? 1 / Math.max(1 + e, Xf) : Math.max(1 - e, Xf);
-function Qf(e, t) {
+var $f = 100, ep = 10, tp = 1, np = 800, rp = .3, ip = .3, ap = .01, op = 2, sp = .005, cp = .5, lp = .01, up = 10, dp = .05, fp = (e) => e < 0 ? 1 / Math.max(1 + e, dp) : Math.max(1 - e, dp);
+function pp(e, t) {
if (!(e > 1)) return 1;
let n = Math.sqrt(e * e - 1), r = e - n, i = e + n, a = 2 * n * Math.exp(-t) * (1 + t);
- return tp((e) => i * Math.exp(-r * e) - r * Math.exp(-i * e) - a, (e) => Math.exp(-i * e) - Math.exp(-r * e), t) / t;
+ return gp((e) => i * Math.exp(-r * e) - r * Math.exp(-i * e) - a, (e) => Math.exp(-i * e) - Math.exp(-r * e), t) / t;
}
-function $f(e, t) {
+function mp(e, t) {
return e * Math.sqrt(1 - t * t);
}
-var ep = 12;
-function tp(e, t, n) {
+var hp = 12;
+function gp(e, t, n) {
let r = n;
- for (let n = 1; n < ep; n++) r -= e(r) / t(r);
+ for (let n = 1; n < hp; n++) r -= e(r) / t(r);
return r;
}
-var np = .001;
-function rp({ duration: e = Vf, bounce: t = Hf }) {
- let n, r, i = Zf(t);
- e = Du(Jf, Yf, /* @__PURE__ */ Ru(e)), i < 1 ? (n = (t) => {
- let n = t * i, r = n * e, a = $f(t, i), o = Math.exp(-r);
- return np - n / a * o;
+var _p = .001;
+function vp({ duration: e = np, bounce: t = rp }) {
+ let n, r, i = fp(t);
+ e = Vu(lp, up, /* @__PURE__ */ Qu(e)), i < 1 ? (n = (t) => {
+ let n = t * i, r = n * e, a = mp(t, i), o = Math.exp(-r);
+ return _p - n / a * o;
}, r = (t) => {
- let r = t * i * e, a = i * i * t * t * e, o = Math.exp(-r), s = $f(t * t, i);
- return (-n(t) + np > 0 ? -1 : 1) * -a * o / s;
+ let r = t * i * e, a = i * i * t * t * e, o = Math.exp(-r), s = mp(t * t, i);
+ return (-n(t) + _p > 0 ? -1 : 1) * -a * o / s;
}) : (n = (t) => -.001 + Math.exp(-t * e) * (t * e + 1), r = (t) => Math.exp(-t * e) * (-t * (e * e)));
- let a = 5 / e, o = tp(n, r, a), s = o * Qf(i, o * e), c = s * s;
+ let a = 5 / e, o = gp(n, r, a), s = o * pp(i, o * e), c = s * s;
return {
stiffness: c,
damping: i * 2 * Math.sqrt(c),
- duration: /* @__PURE__ */ Lu(e)
+ duration: /* @__PURE__ */ Zu(e)
};
}
-var ip = (e, t) => (t ? e >= 0 : e > 0) && e < Infinity;
-function ap(e, t) {
- if (ip(e, t)) return e;
+var yp = (e, t) => (t ? e >= 0 : e > 0) && e < Infinity;
+function bp(e, t) {
+ if (yp(e, t)) return e;
}
-function op(e) {
- let t = ap(e.stiffness), n = ap(e.damping, !0), r = ap(e.mass), i = {
+function xp(e) {
+ let t = bp(e.stiffness), n = bp(e.damping, !0), r = bp(e.mass), i = {
...e,
- stiffness: t ?? Rf,
- damping: n ?? zf,
- mass: r ?? Bf,
+ stiffness: t ?? $f,
+ damping: n ?? ep,
+ mass: r ?? tp,
isResolvedFromDuration: !1,
isTimeDefined: (t ?? n ?? r) === void 0 && (e.duration !== void 0 || e.bounce !== void 0)
};
if (i.isTimeDefined) {
if (e.visualDuration) {
- let t = Zf(e.bounce || 0), n = 2 * Math.PI / (e.visualDuration * 1.2) * Qf(t, 2 * Math.PI / 1.2);
+ let t = fp(e.bounce || 0), n = 2 * Math.PI / (e.visualDuration * 1.2) * pp(t, 2 * Math.PI / 1.2);
i.stiffness = n * n, i.damping = 2 * t * Math.sqrt(i.stiffness);
- } else Object.assign(i, rp(i)), i.isResolvedFromDuration = !0;
- ip(i.stiffness) && ip(i.damping, !0) || (i.stiffness = Rf, i.damping = zf);
+ } else Object.assign(i, vp(i)), i.isResolvedFromDuration = !0;
+ yp(i.stiffness) && yp(i.damping, !0) || (i.stiffness = $f, i.damping = ep);
}
return i;
}
-function sp(e = Uf, t = Hf) {
+function Sp(e = ip, t = rp) {
let n = typeof e == "object" ? e : {
visualDuration: e,
keyframes: [0, 1],
@@ -14758,7 +14792,7 @@ function sp(e = Uf, t = Hf) {
}, r = n.keyframes[0], i = n.keyframes[n.keyframes.length - 1], a = {
done: !1,
value: r
- }, { stiffness: o, damping: s, mass: c, duration: l, isResolvedFromDuration: u, isTimeDefined: d } = op({ ...n }), f = (e) => d ? 0 : -/* @__PURE__ */ Ru(e), p = s / (2 * Math.sqrt(o * c)), m = /* @__PURE__ */ Ru(Math.sqrt(o / c)), h = p * m, g = {
+ }, { stiffness: o, damping: s, mass: c, duration: l, isResolvedFromDuration: u, isTimeDefined: d } = xp({ ...n }), f = (e) => d ? 0 : -/* @__PURE__ */ Qu(e), p = s / (2 * Math.sqrt(o * c)), m = /* @__PURE__ */ Qu(Math.sqrt(o / c)), h = p * m, g = {
target: i,
delta: i - r,
velocity: f(n.velocity || 0) || 0,
@@ -14766,12 +14800,12 @@ function sp(e = Uf, t = Hf) {
restDelta: 0
}, _ = () => {
let e = Math.abs(g.delta) < 5;
- g.restSpeed = n.restSpeed || (e ? Wf : Gf), g.restDelta = n.restDelta || (e ? Kf : qf);
+ g.restSpeed = n.restSpeed || (e ? ap : op), g.restDelta = n.restDelta || (e ? sp : cp);
};
_();
let v, y, b;
if (p < 1) {
- let e = $f(m, p), t = {
+ let e = mp(m, p), t = {
A: 0,
sinC: 0,
cosC: 0,
@@ -14809,30 +14843,30 @@ function sp(e = Uf, t = Hf) {
retarget: (e, t) => {
g.target = e[e.length - 1], g.delta = g.target - e[0], g.velocity = f(t), n.restSpeed && n.restDelta || _(), S.calculatedDuration = x, a.done = !1, b();
},
- velocity: (e) => /* @__PURE__ */ Lu(y(e)),
+ velocity: (e) => /* @__PURE__ */ Zu(y(e)),
next: (e) => {
let t = v(e);
if (u) a.done = e >= l;
else {
- let n = /* @__PURE__ */ Lu(y(e));
+ let n = /* @__PURE__ */ Zu(y(e));
a.done = Math.abs(n) <= g.restSpeed && Math.abs(g.target - t) <= g.restDelta;
}
return a.value = a.done ? g.target : t, a;
},
toString: () => {
- let e = Math.min(If(S), Ff), t = Pf((t) => S.next(e * t).value, e, 30);
+ let e = Math.min(Zf(S), Xf), t = Yf((t) => S.next(e * t).value, e, 30);
return e + "ms " + t;
},
toTransition: () => {}
};
return S;
}
-var cp = /* @__PURE__ */ Object.assign(sp, { applyToOptions: (e) => {
- let t = Lf(e, 100, sp);
- return e.ease = t.ease, e.duration = /* @__PURE__ */ Lu(t.duration), e.type = "keyframes", e;
+var Cp = /* @__PURE__ */ Object.assign(Sp, { applyToOptions: (e) => {
+ let t = Qf(e, 100, Sp);
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ Zu(t.duration), e.type = "keyframes", e;
} });
// node_modules/motion-dom/dist/es/animation/generators/inertia.mjs
-function lp({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = .5, restSpeed: u }) {
+function wp({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 325, bounceDamping: i = 10, bounceStiffness: a = 500, modifyTarget: o, min: s, max: c, restDelta: l = .5, restSpeed: u }) {
let d = e[0], f = {
done: !1,
value: d
@@ -14842,7 +14876,7 @@ function lp({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 32
let t = v(e);
f.done = Math.abs(t) <= l, f.value = f.done ? _ : e ? _ + t : d;
}, b, x, S = (e) => {
- p(f.value) && (b = e, x = cp({
+ p(f.value) && (b = e, x = Cp({
keyframes: [f.value, m(f.value)],
velocity: -v(e) / r * 1e3,
damping: i,
@@ -14860,111 +14894,111 @@ function lp({ keyframes: e, velocity: t = 0, power: n = .8, timeConstant: r = 32
};
}
// node_modules/motion-dom/dist/es/utils/interpolate.mjs
-function up(e, t, n) {
- let r = [], i = n || Ou.mix || Tf, a = e.length - 1;
+function Tp(e, t, n) {
+ let r = [], i = n || Hu.mix || Bf, a = e.length - 1;
for (let n = 0; n < a; n++) {
let a = i(e[n], e[n + 1]);
- t && (a = Pu(Array.isArray(t) ? t[n] || Nu : t, a)), r.push(a);
+ t && (a = Ju(Array.isArray(t) ? t[n] || qu : t, a)), r.push(a);
}
return r;
}
-function dp(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
+function Ep(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
let a = e.length;
if (a === 1) return () => t[0];
if (a === 2 && t[0] === t[1]) return () => t[1];
let o = e[0] === e[1];
e[0] > e[a - 1] && (e = [...e].reverse(), t = [...t].reverse());
- let s = up(t, r, i), c = s.length, l = (n) => {
+ let s = Tp(t, r, i), c = s.length, l = (n) => {
if (o && n < e[0]) return t[0];
let r = 0;
if (c > 1) for (; r < e.length - 2 && !(n < e[r + 1]); r++);
- let i = /* @__PURE__ */ Fu(e[r], e[r + 1], n);
+ let i = /* @__PURE__ */ Yu(e[r], e[r + 1], n);
return s[r](i);
};
- return n ? (t) => l(Du(e[0], e[a - 1], t)) : l;
+ return n ? (t) => l(Vu(e[0], e[a - 1], t)) : l;
}
// node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs
-function fp(e, t) {
+function Dp(e, t) {
let n = e[e.length - 1];
for (let r = 1; r <= t; r++) {
- let i = /* @__PURE__ */ Fu(0, t, r);
- e.push(lf(n, 1, i));
+ let i = /* @__PURE__ */ Yu(0, t, r);
+ e.push(wf(n, 1, i));
}
}
// node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs
-function pp(e) {
+function Op(e) {
let t = [0];
- return fp(t, e.length - 1), t;
+ return Dp(t, e.length - 1), t;
}
// node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs
-function mp(e, t) {
+function kp(e, t) {
return e.map((e) => e * t);
}
// node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs
-function hp(e, t) {
- return e.map(() => t || ed).splice(0, e.length - 1);
+function Ap(e, t) {
+ return e.map(() => t || md).splice(0, e.length - 1);
}
-function gp({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
- let i = /* @__PURE__ */ td(r) ? r.map(od) : od(r) || ed, a = {
+function jp({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
+ let i = /* @__PURE__ */ hd(r) ? r.map(bd) : bd(r) || md, a = {
done: !1,
value: t[0]
};
if (t.length === 2 && !Array.isArray(i) && (!n || n.length !== 2 || n[0] === 0 && n[1] === 1)) {
- let [n, r] = t, o = n === r ? void 0 : (Ou.mix || Tf)(n, r);
+ let [n, r] = t, o = n === r ? void 0 : (Hu.mix || Bf)(n, r);
return {
calculatedDuration: e,
- next: (t) => (a.value = o ? o(i(e > 0 ? Du(0, 1, t / e) : 1)) : r, a.done = t >= e, a)
+ next: (t) => (a.value = o ? o(i(e > 0 ? Vu(0, 1, t / e) : 1)) : r, a.done = t >= e, a)
};
}
- let o = dp(mp(n && n.length === t.length ? n : pp(t), e), t, { ease: Array.isArray(i) ? i : hp(t, i) });
+ let o = Ep(kp(n && n.length === t.length ? n : Op(t), e), t, { ease: Array.isArray(i) ? i : Ap(t, i) });
return {
calculatedDuration: e,
next: (t) => (a.value = o(t), a.done = t >= e, a)
};
}
// node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs
-var _p = 5;
-function vp(e, t, n) {
- let r = Math.max(t - _p, 0);
- return /* @__PURE__ */ zu(n - e(r), t - r);
+var Mp = 5;
+function Np(e, t, n) {
+ let r = Math.max(t - Mp, 0);
+ return /* @__PURE__ */ $u(n - e(r), t - r);
}
-function yp(e, t, n = 0) {
- return t <= 0 ? n : e.velocity ? e.velocity(t) : vp((t) => e.next(t).value, t, e.next(t).value);
+function Pp(e, t, n = 0) {
+ return t <= 0 ? n : e.velocity ? e.velocity(t) : Np((t) => e.next(t).value, t, e.next(t).value);
}
// node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs
-var bp = (e) => e !== null;
-function xp(e, { repeat: t, repeatType: n = "loop" }, r, i = 1) {
- let a = e.filter(bp), o = i < 0 || t && n !== "loop" && t % 2 == 1 ? 0 : a.length - 1;
+var Fp = (e) => e !== null;
+function Ip(e, { repeat: t, repeatType: n = "loop" }, r, i = 1) {
+ let a = e.filter(Fp), o = i < 0 || t && n !== "loop" && t % 2 == 1 ? 0 : a.length - 1;
return !o || r === void 0 ? a[o] : r;
}
// node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs
-var Sp = {
- decay: lp,
- inertia: lp,
- tween: gp,
- keyframes: gp,
- spring: cp
+var Lp = {
+ decay: wp,
+ inertia: wp,
+ tween: jp,
+ keyframes: jp,
+ spring: Cp
};
-function Cp(e) {
- typeof e.type == "string" && (e.type = Sp[e.type]);
+function Rp(e) {
+ typeof e.type == "string" && (e.type = Lp[e.type]);
}
// node_modules/motion-dom/dist/es/animation/utils/resolve-start-time.mjs
-var wp = 40, Tp = (e, t) => t - e > wp && !Ou.useManualTiming ? t : e;
+var zp = 40, Bp = (e, t) => t - e > zp && !Hu.useManualTiming ? t : e;
// node_modules/motion-dom/dist/es/animation/utils/notify-inspector.mjs
-function Ep(e, t) {
+function Vp(e, t) {
return {
kind: e,
animation: t,
- timestamp: ud.now(),
- frameTimestamp: sd.timestamp,
- frameIsProcessing: sd.isProcessing
+ timestamp: wd.now(),
+ frameTimestamp: xd.timestamp,
+ frameIsProcessing: xd.isProcessing
};
}
-function Dp(e, t, n) {
+function Hp(e, t, n) {
let r = globalThis.__MOTION_INSPECT__;
if (r) try {
r({
- ...Ep("animation-start", e),
+ ...Vp("animation-start", e),
options: n ? {
...t,
...n
@@ -14972,17 +15006,17 @@ function Dp(e, t, n) {
});
} catch {}
}
-function Op(e, t) {
+function Up(e, t) {
let n = globalThis.__MOTION_INSPECT__;
if (n) try {
n({
- ...Ep("layout-animation-start", e),
+ ...Vp("layout-animation-start", e),
node: t
});
} catch {}
}
// node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs
-var kp = class {
+var Wp = class {
constructor() {
this.isResolved = !1;
}
@@ -15000,21 +15034,21 @@ var kp = class {
then(e, t) {
return this.finished.then(e, t);
}
-}, Ap = (e) => e / 100, jp = (e) => Math.round(e * 1e4) / 1e4, Mp = class extends kp {
+}, Gp = (e) => e / 100, Kp = (e) => Math.round(e * 1e4) / 1e4, qp = class extends Wp {
constructor(e) {
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
done: !1,
value: void 0
}, this.stop = () => {
let { motionValue: e } = this.options;
- e && e.updatedAt !== ud.now() && this.tick(ud.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
- }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause(), Dp(this, this.options);
+ e && e.updatedAt !== wd.now() && this.tick(wd.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
+ }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause(), Hp(this, this.options);
}
initAnimation() {
let { options: e } = this;
- Cp(e);
- let { type: t = gp, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || gp;
- s !== gp && typeof o[0] != "number" && (this.mixKeyframes = Pu(Ap, Tf(o[0], o[1])), o = [0, 100]);
+ Rp(e);
+ let { type: t = jp, repeat: n = 0, repeatDelay: r = 0, repeatType: i, velocity: a = 0 } = e, { keyframes: o } = e, s = t || jp;
+ s !== jp && typeof o[0] != "number" && (this.mixKeyframes = Ju(Gp, Bf(o[0], o[1])), o = [0, 100]);
let c = s(o === e.keyframes ? e : {
...e,
keyframes: o
@@ -15023,7 +15057,7 @@ var kp = class {
...e,
keyframes: [...o].reverse(),
velocity: -a
- })), c.calculatedDuration === null && (c.calculatedDuration = If(c));
+ })), c.calculatedDuration === null && (c.calculatedDuration = Zf(c));
let { calculatedDuration: l } = c;
this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (n + 1) - r, this.generator = c;
}
@@ -15034,61 +15068,61 @@ var kp = class {
let { generator: n, totalDuration: r, calculatedDuration: i } = this;
if (this.startTime === null) return n.next(0);
let { delay: a = 0, keyframes: o, type: s, onUpdate: c, finalKeyframe: l } = this.options;
- this.startTime === this.pendingStartTime && (this.startTime = Tp(this.startTime, e)), this.pendingStartTime = void 0, this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
+ this.startTime === this.pendingStartTime && (this.startTime = Bp(this.startTime, e)), this.pendingStartTime = void 0, this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - r / this.speed, this.startTime)), t ? this.currentTime = e : this.updateTime(e);
let u = this.currentTime - a * (this.playbackSpeed >= 0 ? 1 : -1), d = this.playbackSpeed >= 0 ? u < 0 : u > r;
this.currentTime = Math.max(u, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
let f = this.generate(this.currentTime, d), { done: p } = f;
d || (p = this.playbackSpeed >= 0 ? i < Infinity ? this.currentTime >= r : p : this.currentTime <= 0);
let m = this.holdTime === null && (this.state === "finished" || this.state === "running" && p);
- return m && s !== lp && (f.value = xp(o, this.options, l, this.speed)), c && c(f.value), m && this.finish(), f;
+ return m && s !== wp && (f.value = Ip(o, this.options, l, this.speed)), c && c(f.value), m && this.finish(), f;
}
at(e) {
- return this.holdTime ?? jp((e - this.startTime) * this.playbackSpeed);
+ return this.holdTime ?? Kp((e - this.startTime) * this.playbackSpeed);
}
sampleAt(e, t) {
let { options: n, totalDuration: r } = this, i = this.at(e) - (n.delay || 0);
- return i >= r && n.type !== lp ? xp(n.keyframes, n, t ? void 0 : n.finalKeyframe) : this.generate(Math.max(i, 0), i < 0).value;
+ return i >= r && n.type !== wp ? Ip(n.keyframes, n, t ? void 0 : n.finalKeyframe) : this.generate(Math.max(i, 0), i < 0).value;
}
generate(e, t) {
let { generator: n, totalDuration: r, mixKeyframes: i, mirroredGenerator: a, resolvedDuration: o } = this, { keyframes: s, repeat: c, repeatType: l, repeatDelay: u } = this.options, d = e, f = n;
if (c) {
let t = Math.min(e, r) / o, n = Math.floor(t), i = t % 1;
- !i && t >= 1 && (i = 1), i === 1 && n--, n = Math.min(n, c + 1), n % 2 && (l === "reverse" ? (i = 1 - i, u && (i -= u / o)) : l === "mirror" && (f = a)), d = Du(0, 1, i) * o;
+ !i && t >= 1 && (i = 1), i === 1 && n--, n = Math.min(n, c + 1), n % 2 && (l === "reverse" ? (i = 1 - i, u && (i -= u / o)) : l === "mirror" && (f = a)), d = Vu(0, 1, i) * o;
}
let p;
return t ? (this.delayState.value = s[0], p = this.delayState) : p = f.next(d), i && !t && (p.value = i(p.value)), p;
}
get duration() {
- return /* @__PURE__ */ Ru(this.calculatedDuration);
+ return /* @__PURE__ */ Qu(this.calculatedDuration);
}
get iterationDuration() {
- return this.duration + /* @__PURE__ */ Ru(this.options.delay ?? 0);
+ return this.duration + /* @__PURE__ */ Qu(this.options.delay ?? 0);
}
get time() {
- return /* @__PURE__ */ Ru(this.currentTime);
+ return /* @__PURE__ */ Qu(this.currentTime);
}
set time(e) {
- e = /* @__PURE__ */ Lu(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
+ e = /* @__PURE__ */ Zu(e), this.currentTime = e, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = e, this.tick(e));
}
getGeneratorVelocity() {
- return yp(this.generator, this.currentTime, this.options.velocity);
+ return Pp(this.generator, this.currentTime, this.options.velocity);
}
get speed() {
return this.playbackSpeed;
}
set speed(e) {
let t = this.playbackSpeed !== e;
- t && this.driver && this.updateTime(ud.now()), this.playbackSpeed = e, t && this.driver && (this.time = /* @__PURE__ */ Ru(this.currentTime));
+ t && this.driver && this.updateTime(wd.now()), this.playbackSpeed = e, t && this.driver && (this.time = /* @__PURE__ */ Qu(this.currentTime));
}
play() {
if (this.isStopped) return;
- let { driver: e = Nf, startTime: t } = this.options;
+ let { driver: e = Jf, startTime: t } = this.options;
this.driver ||= e((e) => this.tick(e)), this.options.onPlay?.();
let n = this.driver.now();
this.state === "finished" ? (this.updateFinished(), this.startTime = n) : this.holdTime === null ? this.startTime ||= t ?? (this.pendingStartTime = n) : this.startTime = n - this.holdTime / (this.playbackSpeed || 1), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
}
pause() {
- this.state = "paused", this.updateTime(ud.now()), this.holdTime = this.currentTime;
+ this.state = "paused", this.updateTime(wd.now()), this.holdTime = this.currentTime;
}
complete() {
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -15108,147 +15142,147 @@ var kp = class {
attachTimeline(e) {
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
}
-}, Np = /* @__PURE__ */ new Set([
+}, Jp = /* @__PURE__ */ new Set([
"brightness",
"contrast",
"saturate",
"opacity"
]);
-function Pp(e) {
+function Yp(e) {
let [t, n] = e.slice(0, -1).split("(");
if (t === "drop-shadow") return e;
- let [r] = n.match(xd) || [];
+ let [r] = n.match(Fd) || [];
if (!r) return e;
- let i = n.replace(r, ""), a = +!!Np.has(t);
+ let i = n.replace(r, ""), a = +!!Jp.has(t);
return r !== n && (a *= 100), t + "(" + a + i + ")";
}
-var Fp = /\b([a-z-]*)\(.*?\)/gu, Ip = {
- ...af,
+var Xp = /\b([a-z-]*)\(.*?\)/gu, Zp = {
+ ...bf,
getAnimatableNone: (e) => {
- let t = e.match(Fp);
- return t ? t.map(Pp).join(" ") : e;
+ let t = e.match(Xp);
+ return t ? t.map(Yp).join(" ") : e;
}
-}, Lp = {
- ...af,
+}, Qp = {
+ ...bf,
getAnimatableNone: (e) => {
- let t = af.parse(e);
- return af.createTransformer(e)(t.map((e) => typeof e == "number" ? 0 : typeof e == "object" ? {
+ let t = bf.parse(e);
+ return bf.createTransformer(e)(t.map((e) => typeof e == "number" ? 0 : typeof e == "object" ? {
...e,
alpha: 1
} : e));
}
-}, Rp = {
- ...vd,
+}, $p = {
+ ...Md,
transform: Math.round
-}, zp = {
- rotate: Nd,
- pathRotation: Nd,
- rotateX: Nd,
- rotateY: Nd,
- rotateZ: Nd,
- scale: bd,
- scaleX: bd,
- scaleY: bd,
- scaleZ: bd,
- skew: Nd,
- skewX: Nd,
- skewY: Nd,
- distance: W,
- translateX: W,
- translateY: W,
- translateZ: W,
- x: W,
- y: W,
- z: W,
- perspective: W,
- transformPerspective: W,
- opacity: yd,
- originX: Ld,
- originY: Ld,
- originZ: W
-}, Bp = {
- borderWidth: W,
- borderTopWidth: W,
- borderRightWidth: W,
- borderBottomWidth: W,
- borderLeftWidth: W,
- borderRadius: W,
- borderTopLeftRadius: W,
- borderTopRightRadius: W,
- borderBottomRightRadius: W,
- borderBottomLeftRadius: W,
- width: W,
- maxWidth: W,
- height: W,
- maxHeight: W,
- top: W,
- right: W,
- bottom: W,
- left: W,
- inset: W,
- insetBlock: W,
- insetBlockStart: W,
- insetBlockEnd: W,
- insetInline: W,
- insetInlineStart: W,
- insetInlineEnd: W,
- padding: W,
- paddingTop: W,
- paddingRight: W,
- paddingBottom: W,
- paddingLeft: W,
- paddingBlock: W,
- paddingBlockStart: W,
- paddingBlockEnd: W,
- paddingInline: W,
- paddingInlineStart: W,
- paddingInlineEnd: W,
- margin: W,
- marginTop: W,
- marginRight: W,
- marginBottom: W,
- marginLeft: W,
- marginBlock: W,
- marginBlockStart: W,
- marginBlockEnd: W,
- marginInline: W,
- marginInlineStart: W,
- marginInlineEnd: W,
- fontSize: W,
- backgroundPositionX: W,
- backgroundPositionY: W,
- ...zp,
- zIndex: Rp,
- fillOpacity: yd,
- strokeOpacity: yd,
- numOctaves: Rp
-}, Vp = {
- ...Bp,
- color: zd,
- backgroundColor: zd,
- outlineColor: zd,
- fill: zd,
- stroke: zd,
- borderColor: zd,
- borderTopColor: zd,
- borderRightColor: zd,
- borderBottomColor: zd,
- borderLeftColor: zd,
- filter: Ip,
- WebkitFilter: Ip,
- mask: Lp,
- WebkitMask: Lp
-}, Hp = (e) => Vp[e], Up = /*@__PURE__*/ new Set([Ip, Lp]);
-function Wp(e, t) {
- let n = Hp(e);
- return Up.has(n) || (n = af), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
+}, em = {
+ rotate: qd,
+ pathRotation: qd,
+ rotateX: qd,
+ rotateY: qd,
+ rotateZ: qd,
+ scale: Pd,
+ scaleX: Pd,
+ scaleY: Pd,
+ scaleZ: Pd,
+ skew: qd,
+ skewX: qd,
+ skewY: qd,
+ distance: Yd,
+ translateX: Yd,
+ translateY: Yd,
+ translateZ: Yd,
+ x: Yd,
+ y: Yd,
+ z: Yd,
+ perspective: Yd,
+ transformPerspective: Yd,
+ opacity: Nd,
+ originX: Qd,
+ originY: Qd,
+ originZ: Yd
+}, tm = {
+ borderWidth: Yd,
+ borderTopWidth: Yd,
+ borderRightWidth: Yd,
+ borderBottomWidth: Yd,
+ borderLeftWidth: Yd,
+ borderRadius: Yd,
+ borderTopLeftRadius: Yd,
+ borderTopRightRadius: Yd,
+ borderBottomRightRadius: Yd,
+ borderBottomLeftRadius: Yd,
+ width: Yd,
+ maxWidth: Yd,
+ height: Yd,
+ maxHeight: Yd,
+ top: Yd,
+ right: Yd,
+ bottom: Yd,
+ left: Yd,
+ inset: Yd,
+ insetBlock: Yd,
+ insetBlockStart: Yd,
+ insetBlockEnd: Yd,
+ insetInline: Yd,
+ insetInlineStart: Yd,
+ insetInlineEnd: Yd,
+ padding: Yd,
+ paddingTop: Yd,
+ paddingRight: Yd,
+ paddingBottom: Yd,
+ paddingLeft: Yd,
+ paddingBlock: Yd,
+ paddingBlockStart: Yd,
+ paddingBlockEnd: Yd,
+ paddingInline: Yd,
+ paddingInlineStart: Yd,
+ paddingInlineEnd: Yd,
+ margin: Yd,
+ marginTop: Yd,
+ marginRight: Yd,
+ marginBottom: Yd,
+ marginLeft: Yd,
+ marginBlock: Yd,
+ marginBlockStart: Yd,
+ marginBlockEnd: Yd,
+ marginInline: Yd,
+ marginInlineStart: Yd,
+ marginInlineEnd: Yd,
+ fontSize: Yd,
+ backgroundPositionX: Yd,
+ backgroundPositionY: Yd,
+ ...em,
+ zIndex: $p,
+ fillOpacity: Nd,
+ strokeOpacity: Nd,
+ numOctaves: $p
+}, nm = {
+ ...tm,
+ color: ef,
+ backgroundColor: ef,
+ outlineColor: ef,
+ fill: ef,
+ stroke: ef,
+ borderColor: ef,
+ borderTopColor: ef,
+ borderRightColor: ef,
+ borderBottomColor: ef,
+ borderLeftColor: ef,
+ filter: Zp,
+ WebkitFilter: Zp,
+ mask: Qp,
+ WebkitMask: Qp
+}, rm = (e) => nm[e], im = /*@__PURE__*/ new Set([Zp, Qp]);
+function am(e, t) {
+ let n = rm(e);
+ return im.has(n) || (n = bf), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
}
// node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs
-function Gp(e) {
+function om(e) {
for (let t = 1; t < e.length; t++) e[t] ?? (e[t] = e[t - 1]);
}
// node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs
-var Kp = (e) => e * 180 / Math.PI, qp = (e) => Yp(Kp(Math.atan2(e[1], e[0]))), Jp = {
+var sm = (e) => e * 180 / Math.PI, cm = (e) => um(sm(Math.atan2(e[1], e[0]))), lm = {
x: 4,
y: 5,
translateX: 4,
@@ -15257,44 +15291,44 @@ var Kp = (e) => e * 180 / Math.PI, qp = (e) => Yp(Kp(Math.atan2(e[1], e[0]))), J
scaleY: 3,
scaleZ: () => 1,
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
- rotate: qp,
- rotateZ: qp,
- skewX: (e) => Kp(Math.atan(e[1])),
- skewY: (e) => Kp(Math.atan(e[2])),
+ rotate: cm,
+ rotateZ: cm,
+ skewX: (e) => sm(Math.atan(e[1])),
+ skewY: (e) => sm(Math.atan(e[2])),
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
-}, Yp = (e) => (e %= 360, e < 0 && (e += 360), e), Xp = qp, Zp = (e) => Math.hypot(e[0], e[1]), Qp = (e) => Math.hypot(e[4], e[5]), $p = {
+}, um = (e) => (e %= 360, e < 0 && (e += 360), e), dm = cm, fm = (e) => Math.hypot(e[0], e[1]), pm = (e) => Math.hypot(e[4], e[5]), mm = {
x: 12,
y: 13,
z: 14,
translateX: 12,
translateY: 13,
translateZ: 14,
- scaleX: Zp,
- scaleY: Qp,
+ scaleX: fm,
+ scaleY: pm,
scaleZ: (e) => Math.hypot(e[8], e[9], e[10]),
- scale: (e) => (Zp(e) + Qp(e)) / 2,
- rotateX: (e) => Yp(Kp(Math.atan2(e[6], e[5]))),
- rotateY: (e) => Yp(Kp(Math.atan2(-e[2], e[0]))),
- rotateZ: Xp,
- rotate: Xp,
- skewX: (e) => Kp(Math.atan(e[4])),
- skewY: (e) => Kp(Math.atan(e[1])),
+ scale: (e) => (fm(e) + pm(e)) / 2,
+ rotateX: (e) => um(sm(Math.atan2(e[6], e[5]))),
+ rotateY: (e) => um(sm(Math.atan2(-e[2], e[0]))),
+ rotateZ: dm,
+ rotate: dm,
+ skewX: (e) => sm(Math.atan(e[4])),
+ skewY: (e) => sm(Math.atan(e[1])),
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
};
-function em(e) {
+function hm(e) {
return +!!e.includes("scale");
}
-function tm(e, t) {
- if (!e || e === "none") return em(t);
+function gm(e, t) {
+ if (!e || e === "none") return hm(t);
let n = e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);
- if (!n) return em(t);
- let r = (n[1] ? $p : Jp)[t], i = n[2].split(",").map((e) => parseFloat(e));
+ if (!n) return hm(t);
+ let r = (n[1] ? mm : lm)[t], i = n[2].split(",").map((e) => parseFloat(e));
return typeof r == "function" ? r(i) : i[r];
}
-var nm = (e, t) => {
+var _m = (e, t) => {
let { transform: n = "none" } = getComputedStyle(e);
- return tm(n, t);
-}, rm = [
+ return gm(n, t);
+}, vm = [
"transformPerspective",
"x",
"y",
@@ -15313,14 +15347,14 @@ var nm = (e, t) => {
"skew",
"skewX",
"skewY"
-], im = /* @__PURE__ */ new Set([...rm, "pathRotation"]), am = (e) => e === vd || e === W, om = /* @__PURE__ */ new Set([
+], ym = /* @__PURE__ */ new Set([...vm, "pathRotation"]), bm = (e) => e === Md || e === Yd, xm = /* @__PURE__ */ new Set([
"x",
"y",
"z"
-]), sm = /* @__PURE__ */ rm.filter((e) => !om.has(e));
-function cm(e) {
+]), Sm = /* @__PURE__ */ vm.filter((e) => !xm.has(e));
+function Cm(e) {
let t = [];
- return sm.forEach((n) => {
+ return Sm.forEach((n) => {
let r = e.getValue(n);
if (r !== void 0) {
let e = r.get(), i = +!!n.startsWith("scale");
@@ -15329,16 +15363,16 @@ function cm(e) {
}
}), t;
}
-var lm = /* @__PURE__ */ new Set(["bottom", "right"]);
-function um(e, t, n, r, i, a) {
+var wm = /* @__PURE__ */ new Set(["bottom", "right"]);
+function Tm(e, t, n, r, i, a) {
let o = parseFloat(e);
if (!isNaN(o)) return o;
let { min: s, max: c } = t()[n], l = c - s;
return a === "border-box" ? l : l - parseFloat(r) - parseFloat(i);
}
-var dm = ({ transform: e }) => tm(e, "x"), fm = ({ transform: e }) => tm(e, "y"), pm = {
- width: ({ width: e, paddingLeft: t = "0", paddingRight: n = "0", boxSizing: r }, i) => um(e, i, "x", t, n, r),
- height: ({ height: e, paddingTop: t = "0", paddingBottom: n = "0", boxSizing: r }, i) => um(e, i, "y", t, n, r),
+var Em = ({ transform: e }) => gm(e, "x"), Dm = ({ transform: e }) => gm(e, "y"), Om = {
+ width: ({ width: e, paddingLeft: t = "0", paddingRight: n = "0", boxSizing: r }, i) => Tm(e, i, "x", t, n, r),
+ height: ({ height: e, paddingTop: t = "0", paddingBottom: n = "0", boxSizing: r }, i) => Tm(e, i, "y", t, n, r),
top: ({ top: e }) => parseFloat(e),
left: ({ left: e }) => parseFloat(e),
bottom: ({ top: e }, t) => {
@@ -15349,20 +15383,20 @@ var dm = ({ transform: e }) => tm(e, "x"), fm = ({ transform: e }) => tm(e, "y")
let { x: n } = t();
return parseFloat(e) + (n.max - n.min);
},
- x: dm,
- y: fm,
- translateX: dm,
- translateY: fm
-}, mm = /* @__PURE__ */ new Set(), hm = !1, gm = !1, _m = !1;
-function vm() {
- if (gm) {
+ x: Em,
+ y: Dm,
+ translateX: Em,
+ translateY: Dm
+}, km = /* @__PURE__ */ new Set(), Am = !1, jm = !1, Mm = !1;
+function Nm() {
+ if (jm) {
let e = [], t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
- mm.forEach((r) => {
- r.needsMeasurement && (e.push(r), t.add(r.element), lm.has(r.name) && n.add(r.element));
+ km.forEach((r) => {
+ r.needsMeasurement && (e.push(r), t.add(r.element), wm.has(r.name) && n.add(r.element));
});
let r = /* @__PURE__ */ new Map();
n.forEach((e) => {
- let t = cm(e);
+ let t = Cm(e);
t.length && (r.set(e, t), e.render());
}), e.forEach((e) => e.measureInitialState()), t.forEach((e) => {
e.render();
@@ -15374,29 +15408,29 @@ function vm() {
e.suspendedScrollY !== void 0 && window.scrollTo(0, e.suspendedScrollY);
});
}
- gm = !1, hm = !1, mm.forEach((e) => e.complete(_m)), mm.clear();
+ jm = !1, Am = !1, km.forEach((e) => e.complete(Mm)), km.clear();
}
-function ym() {
- mm.forEach((e) => {
- e.readKeyframes(), e.needsMeasurement && (gm = !0);
+function Pm() {
+ km.forEach((e) => {
+ e.readKeyframes(), e.needsMeasurement && (jm = !0);
});
}
-function bm() {
- _m = !0, ym(), vm(), _m = !1;
+function Fm() {
+ Mm = !0, Pm(), Nm(), Mm = !1;
}
-function xm(e, t, n) {
+function Im(e, t, n) {
if (typeof e == "string") {
- if (ku(e) || ju(e)) return parseFloat(e);
- if (!af.test(e) && af.test(n)) return Wp(t, n);
+ if (Uu(e) || Gu(e)) return parseFloat(e);
+ if (!bf.test(e) && bf.test(n)) return am(t, n);
}
return e ?? void 0;
}
-var Sm = class {
+var Lm = class {
constructor(e, t, n, r, i, a = !1) {
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = t, this.name = n, this.motionValue = r, this.element = i, this.isAsync = a;
}
scheduleResolve() {
- this.state = "scheduled", this.isAsync ? (mm.add(this), hm || (hm = !0, Af.read(ym), Af.resolveKeyframes(vm))) : (this.readKeyframes(), this.complete());
+ this.state = "scheduled", this.isAsync ? (km.add(this), Am || (Am = !0, Gf.read(Pm), Gf.resolveKeyframes(Nm))) : (this.readKeyframes(), this.complete());
}
readKeyframes() {
let { unresolvedKeyframes: e, name: t, element: n, motionValue: r } = this;
@@ -15404,71 +15438,71 @@ var Sm = class {
let i = r?.get(), a = e[e.length - 1];
if (i !== void 0) e[0] = i;
else if (n && t) {
- let r = xm(n.readValue(t, a), t, a);
+ let r = Im(n.readValue(t, a), t, a);
r !== void 0 && (e[0] = r);
}
e[0] === void 0 && (e[0] = a), r && i === void 0 && r.set(e[0]);
}
- Gp(e);
+ om(e);
}
setFinalKeyframe() {}
measureInitialState() {}
renderEndStyles() {}
measureEndState() {}
complete(e = !1) {
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), mm.delete(this);
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, e), km.delete(this);
}
cancel() {
- this.state === "scheduled" && (mm.delete(this), this.state = "pending");
+ this.state === "scheduled" && (km.delete(this), this.state = "pending");
}
resume() {
this.state === "pending" && this.scheduleResolve();
}
-}, Cm = (e) => e.startsWith("--");
+}, Rm = (e) => e.startsWith("--");
// node_modules/motion-dom/dist/es/render/dom/style-set.mjs
-function wm(e, t, n) {
- Cm(t) ? e.style.setProperty(t, n) : e.style[t] = n;
+function zm(e, t, n) {
+ Rm(t) ? e.style.setProperty(t, n) : e.style[t] = n;
}
// node_modules/motion-dom/dist/es/utils/supports/flags.mjs
-var Tm = {};
+var Bm = {};
// node_modules/motion-dom/dist/es/utils/supports/memo.mjs
-function Em(e, t) {
- let n = /* @__PURE__ */ Mu(e);
- return () => Tm[t] ?? n();
+function Vm(e, t) {
+ let n = /* @__PURE__ */ Ku(e);
+ return () => Bm[t] ?? n();
}
// node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs
-var Dm = /* @__PURE__ */ Em(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Om = /*@__PURE__*/ Em(() => {
+var Hm = /* @__PURE__ */ Vm(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Um = /*@__PURE__*/ Vm(() => {
try {
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
} catch {
return !1;
}
return !0;
-}, "linearEasing"), km = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, Am = {
+}, "linearEasing"), Wm = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, Gm = {
linear: "linear",
ease: "ease",
easeIn: "ease-in",
easeOut: "ease-out",
easeInOut: "ease-in-out",
- circIn: /*@__PURE__*/ km([
+ circIn: /*@__PURE__*/ Wm([
0,
.65,
.55,
1
]),
- circOut: /*@__PURE__*/ km([
+ circOut: /*@__PURE__*/ Wm([
.55,
0,
1,
.45
]),
- backIn: /*@__PURE__*/ km([
+ backIn: /*@__PURE__*/ Wm([
.31,
.01,
.66,
-.59
]),
- backOut: /*@__PURE__*/ km([
+ backOut: /*@__PURE__*/ Wm([
.33,
1.53,
.69,
@@ -15476,14 +15510,14 @@ var Dm = /* @__PURE__ */ Em(() => window.ScrollTimeline !== void 0, "scrollTimel
])
};
// node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs
-function jm(e, t) {
- if (e) return typeof e == "function" ? Om() ? Pf(e, t) : "ease-out" : /* @__PURE__ */ rd(e) ? km(e) : Array.isArray(e) ? e.map((e) => jm(e, t) || Am.easeOut) : Am[e];
+function Km(e, t) {
+ if (e) return typeof e == "function" ? Um() ? Yf(e, t) : "ease-out" : /* @__PURE__ */ _d(e) ? Wm(e) : Array.isArray(e) ? e.map((e) => Km(e, t) || Gm.easeOut) : Gm[e];
}
// node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs
-function Mm(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = "loop", ease: s = "easeOut", times: c } = {}, l = void 0) {
+function qm(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatType: o = "loop", ease: s = "easeOut", times: c } = {}, l = void 0) {
let u = { [t]: n };
c && (u.offset = c);
- let d = jm(s, i);
+ let d = Km(s, i);
Array.isArray(d) && (u.easing = d);
let f = {
delay: r,
@@ -15496,27 +15530,27 @@ function Mm(e, t, n, { delay: r = 0, duration: i = 300, repeat: a = 0, repeatTyp
return l && (f.pseudoElement = l), e.animate(u, f);
}
// node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs
-function Nm(e) {
+function Jm(e) {
return typeof e == "function" && "applyToOptions" in e;
}
// node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs
-function Pm({ type: e, ...t }) {
- return Nm(e) && Om() ? e.applyToOptions(t) : (t.duration ??= 300, t.ease ??= "easeOut", t);
+function Ym({ type: e, ...t }) {
+ return Jm(e) && Um() ? e.applyToOptions(t) : (t.duration ??= 300, t.ease ??= "easeOut", t);
}
// node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs
-var Fm = class extends kp {
+var Xm = class extends Wp {
constructor(e) {
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !e) return;
let { element: t, name: n, keyframes: r, pseudoElement: i, allowFlatten: a = !1, finalKeyframe: o, onComplete: s } = e;
this.isPseudoElement = !!i, this.allowFlatten = a, this.options = e;
- let c = Pm(e);
- this.animation = Mm(t, n, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
+ let c = Ym(e);
+ this.animation = qm(t, n, r, c, i), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
if (this.finishedTime = this.time, !i) {
- let e = xp(r, this.options, o, this.speed);
- this.updateMotionValue?.(e), wm(t, n, e), this.animation.cancel();
+ let e = Ip(r, this.options, o, this.speed);
+ this.updateMotionValue?.(e), zm(t, n, e), this.animation.cancel();
}
s?.(), this.notifyFinished();
- }, Dp(this, e, c);
+ }, Hp(this, e, c);
}
play() {
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
@@ -15541,18 +15575,18 @@ var Fm = class extends kp {
}
get duration() {
let e = this.animation.effect?.getComputedTiming?.().duration || 0;
- return /* @__PURE__ */ Ru(Number(e));
+ return /* @__PURE__ */ Qu(Number(e));
}
get iterationDuration() {
let { delay: e = 0 } = this.options || {};
- return this.duration + /* @__PURE__ */ Ru(e);
+ return this.duration + /* @__PURE__ */ Qu(e);
}
get time() {
- return /* @__PURE__ */ Ru(Number(this.animation.currentTime) || 0);
+ return /* @__PURE__ */ Qu(Number(this.animation.currentTime) || 0);
}
set time(e) {
let t = this.finishedTime !== null;
- this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ Lu(e), t && this.animation.pause();
+ this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ Zu(e), t && this.animation.pause();
}
get speed() {
return this.animation.playbackRate;
@@ -15570,30 +15604,30 @@ var Fm = class extends kp {
this.manualStartTime = this.animation.startTime = e;
}
attachTimeline({ timeline: e, onAttach: t, observe: n }) {
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Dm() ? (this.animation.timeline = e, t?.(this.animation), Nu) : n(this);
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Hm() ? (this.animation.timeline = e, t?.(this.animation), qu) : n(this);
}
-}, Im = {
- anticipate: Ju,
- backInOut: qu,
- circInOut: Zu
+}, Zm = {
+ anticipate: cd,
+ backInOut: sd,
+ circInOut: dd
};
-function Lm(e) {
- return e in Im;
+function Qm(e) {
+ return e in Zm;
}
-function Rm(e) {
- typeof e.ease == "string" && Lm(e.ease) && (e.ease = Im[e.ease]);
+function $m(e) {
+ typeof e.ease == "string" && Qm(e.ease) && (e.ease = Zm[e.ease]);
}
-var zm = class extends Fm {
+var eh = class extends Xm {
constructor(e) {
- Rm(e), Cp(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
+ $m(e), Rp(e), super(e), e.startTime !== void 0 && e.autoplay !== !1 && (this.startTime = e.startTime), this.options = e;
}
elapsed() {
- return this.state === "running" ? (ud.now() - this.startTime) * this.speed : this.time * 1e3;
+ return this.state === "running" ? (wd.now() - this.startTime) * this.speed : this.time * 1e3;
}
sample(e) {
if (!this.sampler) {
let { motionValue: e, onUpdate: t, onComplete: n, onPlay: r, onStop: i, element: a, ...o } = this.options;
- this.sampler = new Mp({
+ this.sampler = new qp({
...o,
autoplay: !1
}), this.sampler.stop();
@@ -15611,40 +15645,40 @@ var zm = class extends Fm {
t.set(e);
return;
}
- let { speed: i } = this, a = this.elapsed(), o = this.state === "running" && i ? Du(0, 10, a) : 0, s = this.sample(a);
- n && r && wm(n, r, s), t.setWithVelocity(this.sample(a - o * Math.sign(i)), s, o / Math.abs(i || 1));
+ let { speed: i } = this, a = this.elapsed(), o = this.state === "running" && i ? Vu(0, 10, a) : 0, s = this.sample(a);
+ n && r && zm(n, r, s), t.setWithVelocity(this.sample(a - o * Math.sign(i)), s, o / Math.abs(i || 1));
}
-}, Bm = (e, t) => t !== "zIndex" && !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (af.test(e) || e === "0") && !e.startsWith("url("));
+}, th = (e, t) => t !== "zIndex" && !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && (bf.test(e) || e === "0") && !e.startsWith("url("));
// node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs
-function Vm(e) {
+function nh(e) {
let t = e[0];
if (e.length === 1) return !0;
for (let n = 0; n < e.length; n++) if (e[n] !== t) return !0;
}
-function Hm(e, t, n, r) {
+function rh(e, t, n, r) {
let i = e[0];
if (i === null) return !1;
if (t === "display" || t === "visibility") return !0;
- let a = e[e.length - 1], o = Bm(i, t), s = Bm(a, t);
- return !o || !s ? !1 : Vm(e) || (n === "spring" || Nm(n)) && r;
+ let a = e[e.length - 1], o = th(i, t), s = th(a, t);
+ return !o || !s ? !1 : nh(e) || (n === "spring" || Jm(n)) && r;
}
// node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs
-function Um(e) {
+function ih(e) {
e.duration = 0, e.type = "keyframes";
}
// node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs
-var Wm = /* @__PURE__ */ new Set([
+var ah = /* @__PURE__ */ new Set([
"opacity",
"clipPath",
"filter",
"transform"
-]), Gm = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
-function Km(e) {
- for (let t = 0; t < e.length; t++) if (typeof e[t] == "string" && Gm.test(e[t])) return !0;
+]), oh = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
+function sh(e) {
+ for (let t = 0; t < e.length; t++) if (typeof e[t] == "string" && oh.test(e[t])) return !0;
return !1;
}
// node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs
-var qm = /* @__PURE__ */ new Set([
+var ch = /* @__PURE__ */ new Set([
"color",
"backgroundColor",
"outlineColor",
@@ -15655,58 +15689,58 @@ var qm = /* @__PURE__ */ new Set([
"borderRightColor",
"borderBottomColor",
"borderLeftColor"
-]), Jm = () => !Ou.useManualTiming && Object.hasOwnProperty.call(Element.prototype, "animate");
-function Ym(e) {
+]), lh = () => !Hu.useManualTiming && Object.hasOwnProperty.call(Element.prototype, "animate");
+function uh(e) {
let { motionValue: t, name: n, repeatDelay: r, repeatType: i, damping: a, type: o, keyframes: s } = e;
- if (!n || !(Wm.has(n) || qm.has(n))) return !1;
+ if (!n || !(ah.has(n) || ch.has(n))) return !1;
let c = t?.owner?.current;
if (!(c instanceof HTMLElement) && !(c instanceof SVGElement)) return !1;
let { onUpdate: l, transformTemplate: u } = t.owner.getProps();
- return Jm() && (Wm.has(n) || qm.has(n) && Km(s)) && (n !== "transform" || !u) && !l && !r && i !== "mirror" && a !== 0 && o !== "inertia";
+ return lh() && (ah.has(n) || ch.has(n) && sh(s)) && (n !== "transform" || !u) && !l && !r && i !== "mirror" && a !== 0 && o !== "inertia";
}
// node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs
-var Xm = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Zm = {
+var dh = (e, t) => t && typeof e == "number" ? t.transform(e) : e, fh = {
x: "translateX",
y: "translateY",
z: "translateZ",
transformPerspective: "perspective"
-}, Qm = rm.length, $m = {}, eh = (e, t, n = Xm(t, zp[e])) => ($m[e] || ($m[e] = (Zm[e] || e) + "(")) + n + ")", th = (e, t) => (typeof t == "number" ? t : parseFloat(t)) === +!!e.startsWith("scale");
-function nh(e, t, n) {
+}, ph = vm.length, mh = {}, hh = (e, t, n = dh(t, em[e])) => (mh[e] || (mh[e] = (fh[e] || e) + "(")) + n + ")", gh = (e, t) => (typeof t == "number" ? t : parseFloat(t)) === +!!e.startsWith("scale");
+function _h(e, t, n) {
let r = "";
- for (let i = 0; i < Qm; i++) {
- let a = rm[i], o = e[a];
+ for (let i = 0; i < ph; i++) {
+ let a = vm[i], o = e[a];
if (o === void 0) continue;
- let s = n && (t[a] = Xm(o, Bp[a]));
- th(a, o) || (r += eh(a, o, s || void 0) + " ");
+ let s = n && (t[a] = dh(o, tm[a]));
+ gh(a, o) || (r += hh(a, o, s || void 0) + " ");
}
let i = e.pathRotation;
- return i && (r += eh("rotate", i)), r = r.trim(), n ? n(t, r) : r || "none";
+ return i && (r += hh("rotate", i)), r = r.trim(), n ? n(t, r) : r || "none";
}
// node_modules/motion-dom/dist/es/animation/waapi/transforms/groups.mjs
-var rh = /* @__PURE__ */ new WeakMap(), ih = 200, ah = .001, oh = .1, sh = .001, ch = 100, lh = (e) => /^(linear|ease(In|Out|InOut))$/.test(e), uh = (e, t) => e - t, dh = (e, t, n) => {
+var vh = /* @__PURE__ */ new WeakMap(), yh = 200, bh = .001, xh = .1, Sh = .001, Ch = 100, wh = (e) => /^(linear|ease(In|Out|InOut))$/.test(e), Th = (e, t) => e - t, Eh = (e, t, n) => {
let r = [];
- for (let i = 0; i <= n; i++) r.push(lf(e, t, i / n));
+ for (let i = 0; i <= n; i++) r.push(wf(e, t, i / n));
return r;
-}, fh = (e) => e.motionValue.owner, ph = (e) => rh.get(e), mh = (e, t) => e.latestValues ? e.latestValues[t] : e.getValue(t)?.get(), hh = ({ name: e, motionValue: t }) => e && rm.includes(e) && t?.owner?.current instanceof HTMLElement && Jm() && Om();
-function gh(e) {
- let t = fh(e), { onUpdate: n, transformTemplate: r } = t.getProps();
- return !e.isHandoff && !n && !e.hasOnUpdate && !r && e.type !== "inertia" && (mh(t, "transform") || "none") === "none" && !mh(t, "pathRotation") && !t.projection?.isProjecting();
+}, Dh = (e) => e.motionValue.owner, Oh = (e) => vh.get(e), kh = (e, t) => e.latestValues ? e.latestValues[t] : e.getValue(t)?.get(), Ah = ({ name: e, motionValue: t }) => e && vm.includes(e) && t?.owner?.current instanceof HTMLElement && lh() && Um();
+function jh(e) {
+ let t = Dh(e), { onUpdate: n, transformTemplate: r } = t.getProps();
+ return !e.isHandoff && !n && !e.hasOnUpdate && !r && e.type !== "inertia" && (kh(t, "transform") || "none") === "none" && !kh(t, "pathRotation") && !t.projection?.isProjecting();
}
-var _h = class extends Mp {
+var Mh = class extends qp {
constructor(e) {
- let t = fh(e).current, { driver: n = Nf } = e, r, i = gh(e);
+ let t = Dh(e).current, { driver: n = Jf } = e, r, i = jh(e);
e.driver = (e) => {
let i = n(e);
return {
js: i,
now: i.now,
start: (e = !0) => {
- let n = ph(t);
+ let n = Oh(t);
!n || n.isJS ? i.start(e) : n.schedule(!1, !e);
},
stop: () => {
i.stop();
- let e = ph(t);
+ let e = Oh(t);
e && !e.isFinishing && e.release(r);
}
};
@@ -15717,7 +15751,7 @@ var _h = class extends Mp {
};
}
get group() {
- return ph(fh(this.options).current);
+ return Oh(Dh(this.options).current);
}
get js() {
return this.driver?.js;
@@ -15734,11 +15768,11 @@ var _h = class extends Mp {
return e?.tracks.has(this) && !e.isJS && this.canAccelerate && (t === "running" || t === "paused");
}
liveValue() {
- return this.isAccelerated() ? this.sampleAt(ud.now()) : void 0;
+ return this.isAccelerated() ? this.sampleAt(wd.now()) : void 0;
}
tween() {
- let { keyframes: e, type: t, ease: n, times: r, repeat: i, delay: a = 0 } = this.options, o = /* @__PURE__ */ rd(n) ? km(n) : lh(n) && Am[n];
- if (o && !i && !r && e.length === 2 && t === gp && this.holdTime === null) {
+ let { keyframes: e, type: t, ease: n, times: r, repeat: i, delay: a = 0 } = this.options, o = /* @__PURE__ */ _d(n) ? Wm(n) : wh(n) && Gm[n];
+ if (o && !i && !r && e.length === 2 && t === jp && this.holdTime === null) {
let e = this.startTime + a / this.speed;
return [
e,
@@ -15748,7 +15782,7 @@ var _h = class extends Mp {
}
}
boundaries(e, t) {
- let { startTime: n, speed: r, resolvedDuration: i, options: a } = this, { delay: o = 0, repeat: s = 0, repeatDelay: c = 0, repeatType: l, times: u, keyframes: d, type: f } = a, p = (f || gp) === gp ? u || pp(d) : [0, 1], m = n + o / r, h = [];
+ let { startTime: n, speed: r, resolvedDuration: i, options: a } = this, { delay: o = 0, repeat: s = 0, repeatDelay: c = 0, repeatType: l, times: u, keyframes: d, type: f } = a, p = (f || jp) === jp ? u || Op(d) : [0, 1], m = n + o / r, h = [];
if (this.holdTime !== null || !(i > 0)) return h;
for (let n = Math.max(0, Math.floor((e - m) * r / i)); n <= s; n++) {
let a = m + n * i / r;
@@ -15764,11 +15798,11 @@ var _h = class extends Mp {
return parseFloat(this.sampleAt(e, !0));
}
sync() {
- let e = ud.now();
+ let e = wd.now();
this.options.motionValue.setWithVelocity(this.sampleAt(e - 10, !0), this.sampleAt(e, !0), 10);
}
play() {
- this.isStopped || ((this.group || vh(fh(this.options))).tracks.add(this), super.play());
+ this.isStopped || ((this.group || Nh(Dh(this.options))).tracks.add(this), super.play());
}
pause() {
super.pause(), this.isAccelerated() && (this.sync(), this.group.schedule(!1));
@@ -15776,10 +15810,10 @@ var _h = class extends Mp {
complete() {
super.complete();
let { group: e } = this;
- e && !e.isJS && this.canAccelerate && this.tick(ud.now());
+ e && !e.isJS && this.canAccelerate && this.tick(wd.now());
}
get time() {
- return this.isAccelerated() ? /* @__PURE__ */ Ru(Du(0, this.totalDuration, this.at(ud.now()) - (this.options.delay || 0))) : super.time;
+ return this.isAccelerated() ? /* @__PURE__ */ Qu(Vu(0, this.totalDuration, this.at(wd.now()) - (this.options.delay || 0))) : super.time;
}
set time(e) {
super.time = e, this.isAccelerated() && this.sync();
@@ -15788,13 +15822,13 @@ var _h = class extends Mp {
return this.canAccelerate = !1, this.group?.demote(!0), super.attachTimeline(e);
}
};
-function vh(e) {
+function Nh(e) {
let t = e.current, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map(), i = {}, a = [], o = /* @__PURE__ */ new Map(), s = [], c = !1, l = !1, u = !1, d = !1, f = -Infinity, p = (e) => {
for (let t of n) if (t.name === e) return !0;
}, m = (t, n) => {
let o = {};
- for (let s of t === void 0 ? rm : a) {
- let a = r.get(s), c = t === void 0 ? mh(e, s) : a ? a.sampleAt(n > t && !a.timing()[1] ? n : t) : i[s];
+ for (let s of t === void 0 ? vm : a) {
+ let a = r.get(s), c = t === void 0 ? kh(e, s) : a ? a.sampleAt(n > t && !a.timing()[1] ? n : t) : i[s];
c !== void 0 && (o[s] = c);
}
return o;
@@ -15802,7 +15836,7 @@ function vh(e) {
let n = "";
for (let r in e) {
let i = e[r];
- t && th(r, i) || (n += eh(r, i) + " ");
+ t && gh(r, i) || (n += hh(r, i) + " ");
}
return (t ? n.trim() : n) || "none";
}, g = (e, t) => h(m(e, t)), _ = (e = m()) => {
@@ -15815,7 +15849,7 @@ function vh(e) {
offset: t,
end: n
};
- e.startTime = ud.now() + t, n < Infinity && (e.onfinish = () => {
+ e.startTime = wd.now() + t, n < Infinity && (e.onfinish = () => {
r.isDone = !0, s.some((e) => e.end === Infinity) && (e.cancel(), s = s.filter((e) => e !== r)), A.schedule(!1);
}), e.oncancel = () => s.includes(r) && A.demote(), s.push(r);
}, x = (e, t, n) => {
@@ -15826,34 +15860,34 @@ function vh(e) {
}
return r(t, n) > i / 2 ? [t, n] : [];
}, S = (e, t, n, r) => {
- let i = Math.min(ih, Math.max(2, Math.ceil((n - t) / 10)));
+ let i = Math.min(yh, Math.max(2, Math.ceil((n - t) / 10)));
if (r.length * 4 > i) return;
- let a = dh(t, n, i).concat(r).sort(uh), o = (e) => /* @__PURE__ */ Fu(t, n, e), s, c;
+ let a = Eh(t, n, i).concat(r).sort(Th), o = (e) => /* @__PURE__ */ Yu(t, n, e), s, c;
for (let t of e) {
- let e = a.map((e) => t.numberAt(e)), [n] = e, r = e.map((e) => e - n), i = r[r.length - 1], o = r.some((e) => Math.abs(e) * ah > Math.abs(i)) ? 0 : i, l = r.map((e) => o ? e / o : e);
+ let e = a.map((e) => t.numberAt(e)), [n] = e, r = e.map((e) => e - n), i = r[r.length - 1], o = r.some((e) => Math.abs(e) * bh > Math.abs(i)) ? 0 : i, l = r.map((e) => o ? e / o : e);
if (!o) {
- if (l.some((e) => !(Math.abs(e) <= ah))) return;
+ if (l.some((e) => !(Math.abs(e) <= bh))) return;
} else if (!s) s = l, c = (e) => (t.numberAt(e) - n) / o;
- else if (l.some((e, t) => !(Math.abs(e - s[t]) <= ah))) return;
+ else if (l.some((e, t) => !(Math.abs(e - s[t]) <= bh))) return;
}
- if (!s || s.every((e, t) => Math.abs(e - o(a[t])) <= ah)) return "linear";
- let l = [], u = (e, t = c(e)) => l.push(jp(t) + " " + jp(o(e) * 100) + "%");
+ if (!s || s.every((e, t) => Math.abs(e - o(a[t])) <= bh)) return "linear";
+ let l = [], u = (e, t = c(e)) => l.push(Kp(t) + " " + Kp(o(e) * 100) + "%");
return s.forEach((e, t) => {
t && Math.abs(e - s[t - 1]) > .2 && x(c, a[t - 1], a[t]).forEach((e) => u(e)), u(a[t], e);
}), "linear(" + l + ")";
}, C = (e, t, n, r) => {
- let i = [t], a = (t, n) => e.every((e) => !(Math.abs(e.numberAt((t + n) / 2) - (e.numberAt(t) + e.numberAt(n)) / 2) > (e.name.startsWith("scale") ? sh : oh))), o = (t, n, r) => {
+ let i = [t], a = (t, n) => e.every((e) => !(Math.abs(e.numberAt((t + n) / 2) - (e.numberAt(t) + e.numberAt(n)) / 2) > (e.name.startsWith("scale") ? Sh : xh))), o = (t, n, r) => {
if (n - t < 1 || a(t, n)) i.push(n);
else if (r < 4) o(t, (t + n) / 2, r + 1), o((t + n) / 2, n, r + 1);
else {
for (let r of e) i.push(...x((e) => r.numberAt(e), t, n));
i.push(n);
}
- }, s = dh(t, n, Math.ceil((n - t) / 100));
+ }, s = Eh(t, n, Math.ceil((n - t) / 100));
for (let e of r) s.push(e, Math.min(e + .01, n));
let c = t;
- for (let e of s.sort(uh)) e > c && o(c, e, 0), c = e;
- return i.sort(uh);
+ for (let e of s.sort(Th)) e > c && o(c, e, 0), c = e;
+ return i.sort(Th);
}, w = (e) => {
let t;
for (let n of e) {
@@ -15864,7 +15898,7 @@ function vh(e) {
return t;
}, T = (e, t, n, r = { fill: "both" }, i, a) => {
let o = e.flatMap((e) => e.boundaries(t, n)), s = a || S(e, t, n, o), c = s ? [t, n] : C(e, t, n, o), l = c.map((e) => g(e, i)), u = { transform: l };
- return s || (u.offset = c.map((e) => /* @__PURE__ */ Fu(t, n, e))), l.every((e) => e === l[0]) && (_(m(t, i)), u = null), y(u, {
+ return s || (u.offset = c.map((e) => /* @__PURE__ */ Yu(t, n, e))), l.every((e) => e === l[0]) && (_(m(t, i)), u = null), y(u, {
...r,
duration: n - t,
easing: s || "linear"
@@ -15892,9 +15926,9 @@ function vh(e) {
d.push(e), c = Math.max(c, n);
}
}
- i = {}, a = rm.filter((t) => {
+ i = {}, a = vm.filter((t) => {
if (r.has(t)) return !0;
- let n = i[t] = mh(e, t);
+ let n = i[t] = kh(e, t);
return n !== void 0 && parseFloat(n) !== +!!t.startsWith("scale");
}), v(!1);
let m = !l && w(d);
@@ -15941,11 +15975,11 @@ function vh(e) {
r && n.updatePlaybackRate && n.playState === "running" && Math.abs(Number(n.currentTime) - o) < 20 ? n.playbackRate !== r && n.updatePlaybackRate(r) : r ? (n.playbackRate = r, n.startTime = e - o / r) : (n.startTime = null, n.currentTime = o);
}
return !0;
- }, O = () => !n.size && (u = !0, ph(t) === A && rh.delete(t), A.isJS || v(), !0), k = () => {
- let t = ud.now();
+ }, O = () => !n.size && (u = !0, Oh(t) === A && vh.delete(t), A.isJS || v(), !0), k = () => {
+ let t = wd.now();
if (A.isJS || (A.isFinishing = !0, n.forEach((n) => {
let [r, a] = n.timing();
- n.state === "running" && n.speed > 0 && !a && r <= t + 1 && (n.complete(), i[n.name] = mh(e, n.name), o.has(n) || (c = !0));
+ n.state === "running" && n.speed > 0 && !a && r <= t + 1 && (n.complete(), i[n.name] = kh(e, n.name), o.has(n) || (c = !0));
}), A.isFinishing = !1), l = !1, u || (n.forEach(({ state: e }, t) => {
(e === "idle" || e === "finished") && n.delete(t);
}), O())) return;
@@ -15954,7 +15988,7 @@ function vh(e) {
let r = c, a = d;
if (c = d = !1, r || !D(t)) {
if (a) {
- if (t - f < ch) return A.demote();
+ if (t - f < Ch) return A.demote();
f = t;
}
if (!E(t)) return A.demote();
@@ -15964,7 +15998,7 @@ function vh(e) {
isJS: !1,
isFinishing: !1,
schedule(e, t) {
- u || (c ||= e, d ||= !!t, l || (l = !0, sd.isProcessing ? Af.render(k, !1, !0) : queueMicrotask(k)));
+ u || (c ||= e, d ||= !!t, l || (l = !0, xd.isProcessing ? Gf.render(k, !1, !0) : queueMicrotask(k)));
},
release(e) {
let { state: t } = e;
@@ -15972,7 +16006,7 @@ function vh(e) {
},
check() {
if (!A.isJS) {
- for (let t in i) if (mh(e, t) !== i[t] && !p(t)) return A.schedule(!0, !0);
+ for (let t in i) if (kh(e, t) !== i[t] && !p(t)) return A.schedule(!0, !0);
}
},
demote(e) {
@@ -15981,40 +16015,40 @@ function vh(e) {
}), A.isJS = !0, o = /* @__PURE__ */ new Map(), v(), n.forEach((e) => e.state === "running" && e.js?.start()), !0;
}
};
- return rh.set(t, A), A;
+ return vh.set(t, A), A;
}
// node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs
-var yh = class extends kp {
+var Ph = class extends Wp {
constructor(e) {
super(), this.stop = () => {
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
- }, this.createdAt = ud.now();
+ }, this.createdAt = wd.now();
let { keyframes: t, name: n, motionValue: r, element: i } = e, a = e;
a.autoplay ??= !0, a.delay ??= 0, a.type ??= "keyframes", a.repeat ??= 0, a.repeatDelay ??= 0, a.repeatType ??= "loop";
- let o = i?.KeyframeResolver || Sm;
+ let o = i?.KeyframeResolver || Lm;
this.keyframeResolver = new o(t, (e, t, n) => this.onKeyframesResolved(e, t, a, !n), n, r, i), this.keyframeResolver?.scheduleResolve();
}
onKeyframesResolved(e, t, n, r) {
this.keyframeResolver = void 0;
let { name: i, type: a, velocity: o, delay: s, isHandoff: c, onUpdate: l } = n;
- this.resolvedAt = ud.now();
- let u = Hm(e, i, a, o);
- u || ((Ou.instantAnimations || !s) && l?.(xp(e, n, t)), e[0] = e[e.length - 1], Um(n), n.repeat = 0);
+ this.resolvedAt = wd.now();
+ let u = rh(e, i, a, o);
+ u || ((Hu.instantAnimations || !s) && l?.(Ip(e, n, t)), e[0] = e[e.length - 1], ih(n), n.repeat = 0);
let { onComplete: d } = n;
n.finalKeyframe = t, n.keyframes = e, n.onComplete = () => {
d?.(), this.notifyFinished();
};
- let f = u && !c && Ym(n), p = !f && hh(n);
- r && (f || p || this.resolvedAt !== this.createdAt) && (n.startTime ??= Tp(this.createdAt, this.resolvedAt));
+ let f = u && !c && uh(n), p = !f && Ah(n);
+ r && (f || p || this.resolvedAt !== this.createdAt) && (n.startTime ??= Bp(this.createdAt, this.resolvedAt));
let m;
if (f) {
n.element = n.motionValue?.owner?.current;
try {
- m = new zm(n);
+ m = new eh(n);
} catch {
- m = new Mp(n);
+ m = new qp(n);
}
- } else m = p ? new _h(n) : new Mp(n);
+ } else m = p ? new Mh(n) : new qp(n);
this.pendingTimeline &&= (this.stopTimeline = m.attachTimeline(this.pendingTimeline), void 0), this._animation = m;
}
get finished() {
@@ -16027,7 +16061,7 @@ var yh = class extends kp {
return this._animation?.liveValue?.();
}
get animation() {
- return this._animation || (this.keyframeResolver?.resume(), bm()), this._animation;
+ return this._animation || (this.keyframeResolver?.resume(), Fm()), this._animation;
}
get duration() {
return this.animation.duration;
@@ -16068,7 +16102,7 @@ var yh = class extends kp {
cancel() {
this._animation?.cancel(), this.keyframeResolver?.cancel();
}
-}, bh = class {
+}, Fh = class {
constructor(e) {
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
}
@@ -16108,10 +16142,10 @@ var yh = class extends kp {
return this.getAll("startTime");
}
get duration() {
- return xh(this.animations, "duration");
+ return Ih(this.animations, "duration");
}
get iterationDuration() {
- return xh(this.animations, "iterationDuration");
+ return Ih(this.animations, "iterationDuration");
}
runAll(e) {
this.animations.forEach((t) => t[e]());
@@ -16129,7 +16163,7 @@ var yh = class extends kp {
this.runAll("complete");
}
};
-function xh(e, t) {
+function Ih(e, t) {
let n = 0;
for (let r = 0; r < e.length; r++) {
let i = e[r][t];
@@ -16138,30 +16172,30 @@ function xh(e, t) {
return n;
}
// node_modules/motion-dom/dist/es/animation/GroupAnimationWithThen.mjs
-var Sh = class extends bh {
+var Lh = class extends Fh {
then(e, t) {
return this.finished.finally(e).then(() => {});
}
-}, Ch = /* @__PURE__ */ new WeakMap(), wh = (e, t = "") => `${e}:${t}`;
-function Th(e) {
- let t = Ch.get(e);
- return t || (t = /* @__PURE__ */ new Map(), Ch.set(e, t)), t;
+}, Rh = /* @__PURE__ */ new WeakMap(), zh = (e, t = "") => `${e}:${t}`;
+function Bh(e) {
+ let t = Rh.get(e);
+ return t || (t = /* @__PURE__ */ new Map(), Rh.set(e, t)), t;
}
// node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs
-function Eh(e, t, n, r = 0, i = 1) {
+function Vh(e, t, n, r = 0, i = 1) {
let a = Array.from(e).sort((e, t) => e.sortNodePosition(t)).indexOf(t), o = e.size, s = (o - 1) * r;
return typeof n == "function" ? n(a, o) : i === 1 ? a * r : s - a * r;
}
// node_modules/motion-dom/dist/es/value/index.mjs
-var Dh = 30, Oh = (e) => !isNaN(parseFloat(e)), kh = { current: void 0 }, Ah = class {
+var Hh = 30, Uh = (e) => !isNaN(parseFloat(e)), Wh = { current: void 0 }, Gh = class {
constructor(e, t = {}) {
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (e) => {
- let t = ud.now();
+ let t = wd.now();
if (this.updatedAt !== t && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(e), this.current !== this.prev && (this.dirty(), this.dependents)) for (let e of this.dependents) e.dirty();
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = t.owner;
}
setCurrent(e) {
- this.current = e, this.updatedAt = ud.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Oh(this.current));
+ this.current = e, this.updatedAt = wd.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Uh(this.current));
}
setPrevFrameValue(e = this.current) {
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -16171,16 +16205,16 @@ var Dh = 30, Oh = (e) => !isNaN(parseFloat(e)), kh = { current: void 0 }, Ah = c
}
on(e, t) {
var n;
- return e === "change" ? this.onChangeSubscribe(t) : ((n = this.events)[e] || (n[e] = new Iu())).add(t);
+ return e === "change" ? this.onChangeSubscribe(t) : ((n = this.events)[e] || (n[e] = new Xu())).add(t);
}
onChangeSubscribe(e) {
let { events: t } = this;
- return !t.change && !this.changeSubscriber ? this.changeSubscriber = e : (t.change || (t.change = new Iu(), t.change.add(this.changeSubscriber), this.changeSubscriber = void 0), t.change.add(e)), () => {
+ return !t.change && !this.changeSubscriber ? this.changeSubscriber = e : (t.change || (t.change = new Xu(), t.change.add(this.changeSubscriber), this.changeSubscriber = void 0), t.change.add(e)), () => {
this.changeSubscriber === e ? this.changeSubscriber = void 0 : t.change?.remove(e), this.stopIfUnobserved();
};
}
stopIfUnobserved() {
- Af.read(() => {
+ Gf.read(() => {
!this.changeSubscriber && !this.events.change?.getSize() && this.stop();
});
}
@@ -16211,7 +16245,7 @@ var Dh = 30, Oh = (e) => !isNaN(parseFloat(e)), kh = { current: void 0 }, Ah = c
this.dependents?.delete(e);
}
get() {
- kh.current?.push(this);
+ Wh.current?.push(this);
let e = this.animation?.liveValue?.();
return e === void 0 ? this.current : e;
}
@@ -16222,10 +16256,10 @@ var Dh = 30, Oh = (e) => !isNaN(parseFloat(e)), kh = { current: void 0 }, Ah = c
return this.prev;
}
getVelocity() {
- let e = ud.now();
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Dh) return 0;
- let t = Math.min(this.updatedAt - this.prevUpdatedAt, Dh);
- return /* @__PURE__ */ zu(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
+ let e = wd.now();
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Hh) return 0;
+ let t = Math.min(this.updatedAt - this.prevUpdatedAt, Hh);
+ return /* @__PURE__ */ $u(parseFloat(this.current) - parseFloat(this.prevFrameValue), t);
}
start(e) {
return this.stop(), new Promise((t) => {
@@ -16246,11 +16280,11 @@ var Dh = 30, Oh = (e) => !isNaN(parseFloat(e)), kh = { current: void 0 }, Ah = c
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect?.();
}
};
-function jh(e, t) {
- return new Ah(e, t);
+function Kh(e, t) {
+ return new Gh(e, t);
}
// node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs
-function Mh(e, t) {
+function qh(e, t) {
if (e?.inherit && t) {
let { inherit: n, ...r } = e;
return {
@@ -16261,25 +16295,25 @@ function Mh(e, t) {
return e;
}
// node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs
-function Nh(e, t) {
+function Jh(e, t) {
let n = e?.[t] ?? e?.default ?? e;
- return n === e ? n : Mh(n, e);
+ return n === e ? n : qh(n, e);
}
// node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs
-var Ph = {
+var Yh = {
type: "spring",
stiffness: 500,
damping: 25,
restSpeed: 10
-}, Fh = (e) => ({
+}, Xh = (e) => ({
type: "spring",
stiffness: 550,
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
restSpeed: 10
-}), Ih = {
+}), Zh = {
type: "keyframes",
duration: .8
-}, Lh = {
+}, Qh = {
type: "keyframes",
ease: [
.25,
@@ -16288,7 +16322,7 @@ var Ph = {
1
],
duration: .3
-}, Rh = (e, { keyframes: t }) => t.length > 2 ? Ih : im.has(e) ? e.startsWith("scale") ? Fh(t[1]) : Ph : Lh, zh = /* @__PURE__ */ new Set([
+}, $h = (e, { keyframes: t }) => t.length > 2 ? Zh : ym.has(e) ? e.startsWith("scale") ? Xh(t[1]) : Yh : Qh, eg = /* @__PURE__ */ new Set([
"when",
"delay",
"delayChildren",
@@ -16301,14 +16335,14 @@ var Ph = {
"elapsed",
"out"
]);
-function Bh(e) {
- for (let t in e) if (!zh.has(t)) return !0;
+function tg(e) {
+ for (let t in e) if (!eg.has(t)) return !0;
return !1;
}
// node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs
-var Vh = (e, t, n, r = {}, i, a) => (o) => {
- let s = Nh(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r;
- l -= /* @__PURE__ */ Lu(c);
+var ng = (e, t, n, r = {}, i, a) => (o) => {
+ let s = Jh(r, e) || {}, c = s.delay || r.delay || 0, { elapsed: l = 0 } = r;
+ l -= /* @__PURE__ */ Zu(c);
let u = {
keyframes: Array.isArray(n) ? n : [null, n],
ease: "easeOut",
@@ -16326,195 +16360,195 @@ var Vh = (e, t, n, r = {}, i, a) => (o) => {
element: a ? void 0 : i,
hasOnUpdate: !!s.onUpdate
};
- Bh(s) || Object.assign(u, Rh(e, u)), u.duration &&= /* @__PURE__ */ Lu(u.duration), u.repeatDelay &&= /* @__PURE__ */ Lu(u.repeatDelay), u.from !== void 0 && (u.keyframes[0] = u.from);
+ tg(s) || Object.assign(u, $h(e, u)), u.duration &&= /* @__PURE__ */ Zu(u.duration), u.repeatDelay &&= /* @__PURE__ */ Zu(u.repeatDelay), u.from !== void 0 && (u.keyframes[0] = u.from);
let d = !1;
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Um(u), u.delay === 0 && (d = !0)), (Ou.instantAnimations || Ou.skipAnimations || i?.shouldSkipAnimations || s.skipAnimations) && (d = !0, Um(u), u.delay = 0), u.allowFlatten = !s.type && !s.ease, d && !a && t.get() !== void 0) {
- let e = xp(u.keyframes, s);
+ if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (ih(u), u.delay === 0 && (d = !0)), (Hu.instantAnimations || Hu.skipAnimations || i?.shouldSkipAnimations || s.skipAnimations) && (d = !0, ih(u), u.delay = 0), u.allowFlatten = !s.type && !s.ease, d && !a && t.get() !== void 0) {
+ let e = Ip(u.keyframes, s);
if (e !== void 0) {
- Af.update(() => {
+ Gf.update(() => {
u.onUpdate(e), u.onComplete();
});
return;
}
}
- return s.isSync ? new Mp(u) : new yh(u);
-}, Hh = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
-function Uh(e) {
- let t = Hh.exec(e);
+ return s.isSync ? new qp(u) : new Ph(u);
+}, rg = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
+function eee(e) {
+ let t = rg.exec(e);
if (!t) return [,];
let [, n, r, i] = t;
return [`--${n ?? r}`, i];
}
-function Wh(e, t, n = 1) {
- let [r, i] = Uh(e);
+function ig(e, t, n = 1) {
+ let [r, i] = eee(e);
if (!r) return;
let a = window.getComputedStyle(t).getPropertyValue(r);
if (a) {
let e = a.trim();
- return ku(e) ? parseFloat(e) : e;
+ return Uu(e) ? parseFloat(e) : e;
}
- return hd(i) ? Wh(i, t, n + 1) : i;
+ return kd(i) ? ig(i, t, n + 1) : i;
}
// node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs
-function Gh(e) {
+function tee(e) {
let t = [{}, {}];
return e?.values.forEach((e, n) => {
t[0][n] = e.get(), t[1][n] = e.getVelocity();
}), t;
}
-function Kh(e, t, n, r) {
- let i = (t) => typeof t == "function" ? t(n === void 0 ? e.custom : n, ...Gh(r)) : t;
+function ag(e, t, n, r) {
+ let i = (t) => typeof t == "function" ? t(n === void 0 ? e.custom : n, ...tee(r)) : t;
return t = i(t), typeof t == "string" && (t = e.variants && e.variants[t]), i(t);
}
// node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs
-function qh(e, t, n) {
- return Kh(e.getProps(), t, n, e);
+function og(e, t, n) {
+ return ag(e.getProps(), t, n, e);
}
-var Jh = (e, t) => t === "exit" ? e.presenceContext?.custom : void 0, Yh = /* @__PURE__ */ new Set([
+var sg = (e, t) => t === "exit" ? e.presenceContext?.custom : void 0, cg = /* @__PURE__ */ new Set([
"width",
"height",
"top",
"left",
"right",
"bottom",
- ...rm
-]), Xh = (e) => Array.isArray(e);
+ ...vm
+]), nee = (e) => Array.isArray(e);
// node_modules/motion-dom/dist/es/render/utils/setters.mjs
-function Zh(e, t, n) {
- e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, jh(n));
+function ree(e, t, n) {
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Kh(n));
}
-function Qh(e) {
- return Xh(e) ? e[e.length - 1] || 0 : e;
+function iee(e) {
+ return nee(e) ? e[e.length - 1] || 0 : e;
}
-function $h(e, t) {
- let { transitionEnd: n = {}, transition: r = {}, ...i } = qh(e, t) || {};
+function aee(e, t) {
+ let { transitionEnd: n = {}, transition: r = {}, ...i } = og(e, t) || {};
i = {
...i,
...n
};
- for (let t in i) Zh(e, t, Qh(i[t]));
+ for (let t in i) ree(e, t, iee(i[t]));
}
// node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs
-var eg = (e) => !!(e && e.getVelocity);
+var lg = (e) => !!(e && e.getVelocity);
// node_modules/motion-dom/dist/es/value/will-change/is.mjs
-function tg(e) {
- return !!(eg(e) && e.add);
+function oee(e) {
+ return !!(lg(e) && e.add);
}
// node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs
-function ng(e, t) {
+function ug(e, t) {
let n = e.getValue("willChange");
- if (tg(n)) return n.add(t);
- if (!n && Ou.WillChange) {
- let n = new Ou.WillChange("auto");
+ if (oee(n)) return n.add(t);
+ if (!n && Hu.WillChange) {
+ let n = new Hu.WillChange("auto");
e.addValue("willChange", n), n.add(t);
}
}
// node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs
-var rg = "data-framer-appear-id";
+var dg = "data-framer-appear-id";
// node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs
-function ig(e) {
- return e.props[rg];
+function fg(e) {
+ return e.props[dg];
}
// node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs
-var eee = typeof window < "u";
-function tee({ protectedKeys: e, needsAnimating: t }, n) {
+var see = typeof window < "u";
+function cee({ protectedKeys: e, needsAnimating: t }, n) {
let r = n in e && !t[n];
return t[n] = !1, r;
}
-function ag(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
+function pg(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
let { transition: a, transitionEnd: o, ...s } = t, c = e.getDefaultTransition();
- a = a ? Mh(a, c) : c;
+ a = a ? qh(a, c) : c;
let l = a?.reduceMotion, u = a?.skipAnimations;
r && (a = r);
let d = [], f = i && e.animationState?.getState()[i], p = a?.path;
p && (p.animateValues ? p.animateValues((t) => e.getValue(t, e.latestValues[t] ?? 0), s, a, n, d) : p.animateVisualElement?.(e, s, a, n, d));
for (let t in s) {
let r = e.getValue(t, e.latestValues[t] ?? null), i = s[t];
- if (i === void 0 || f && tee(f, t)) continue;
+ if (i === void 0 || f && cee(f, t)) continue;
let o = {
delay: n,
- ...Nh(f?.out[t] || a || {}, t)
+ ...Jh(f?.out[t] || a || {}, t)
};
u && (o.skipAnimations = !0);
let c = r.get();
if (c !== void 0 && !r.isAnimating() && !Array.isArray(i) && i === c && !o.velocity) {
- Af.update(() => r.set(i));
+ Gf.update(() => r.set(i));
continue;
}
let p = !1;
- if (eee && window.MotionHandoffAnimation) {
- let n = ig(e);
+ if (see && window.MotionHandoffAnimation) {
+ let n = fg(e);
if (n) {
- let e = window.MotionHandoffAnimation(n, t, Af);
+ let e = window.MotionHandoffAnimation(n, t, Gf);
e !== null && (o.startTime = e, p = !0);
}
}
- ng(e, t);
+ ug(e, t);
let m = l ?? e.shouldReduceMotion;
- r.start(Vh(t, r, i, m && Yh.has(t) ? { type: !1 } : o, e, p));
+ r.start(ng(t, r, i, m && cg.has(t) ? { type: !1 } : o, e, p));
let h = r.animation;
h && d.push(h);
}
if (o) {
- let t = () => Af.update(() => {
- o && $h(e, o);
+ let t = () => Gf.update(() => {
+ o && aee(e, o);
});
d.length ? Promise.all(d).then(t) : t();
}
return d;
}
// node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs
-function og(e, t, n = {}) {
- let r = qh(e, t, Jh(e, n.type)), i = n.transitionOverride || (r?.transition ?? (e.getDefaultTransition() || {})), a = () => Promise.all(r ? ag(e, r, n) : []), o = (r = 0) => {
+function mg(e, t, n = {}) {
+ let r = og(e, t, sg(e, n.type)), i = n.transitionOverride || (r?.transition ?? (e.getDefaultTransition() || {})), a = () => Promise.all(r ? pg(e, r, n) : []), o = (r = 0) => {
let { variantChildren: a } = e, { delayChildren: o = 0, staggerChildren: s, staggerDirection: c } = i, l = [];
return a?.forEach((e) => {
- e.notify("AnimationStart", t), l.push(og(e, t, {
+ e.notify("AnimationStart", t), l.push(mg(e, t, {
...n,
- delay: r + (typeof o == "function" ? 0 : o) + Eh(a, e, o, s, c)
+ delay: r + (typeof o == "function" ? 0 : o) + Vh(a, e, o, s, c)
}).then(() => e.notify("AnimationComplete", t)));
}), Promise.all(l);
}, { when: s } = i;
return s ? s === "beforeChildren" ? a().then(() => o()) : o().then(a) : Promise.all([a(), o(n.delay)]);
}
// node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs
-function sg(e, t, n = {}) {
- return e.notify("AnimationStart", t), (Array.isArray(t) ? Promise.all(t.map((t) => og(e, t, n))) : typeof t == "string" ? og(e, t, n) : Promise.all(ag(e, qh(e, t, n.custom), n))).then(() => {
+function lee(e, t, n = {}) {
+ return e.notify("AnimationStart", t), (Array.isArray(t) ? Promise.all(t.map((t) => mg(e, t, n))) : typeof t == "string" ? mg(e, t, n) : Promise.all(pg(e, og(e, t, n.custom), n))).then(() => {
e.notify("AnimationComplete", t);
});
}
// node_modules/motion-dom/dist/es/value/types/auto.mjs
-var nee = {
+var uee = {
test: (e) => e === "auto",
parse: (e) => e
-}, ree = (e) => (t) => t.test(e), cg = [
- vd,
- W,
- Pd,
- Nd,
- Id,
- Fd,
- nee
-], lg = (e) => cg.find(ree(e));
+}, dee = (e) => (t) => t.test(e), fee = [
+ Md,
+ Yd,
+ Jd,
+ qd,
+ Zd,
+ Xd,
+ uee
+], hg = (e) => fee.find(dee(e));
// node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs
-function iee(e) {
- return typeof e == "number" ? e === 0 : e === null || e === "none" || e === "0" || ju(e);
+function pee(e) {
+ return typeof e == "number" ? e === 0 : e === null || e === "none" || e === "0" || Gu(e);
}
// node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs
-var aee = /* @__PURE__ */ new Set([
+var gg = /* @__PURE__ */ new Set([
"auto",
"none",
"0"
]);
-function oee(e, t, n) {
+function mee(e, t, n) {
let r = 0, i;
for (; r < e.length && !i;) {
let t = e[r];
- typeof t == "string" && !aee.has(t) && Xd(t) && (i = e[r]), r++;
+ typeof t == "string" && !gg.has(t) && ff(t) && (i = e[r]), r++;
}
- if (i && n) for (let r of t) e[r] !== i && (e[r] = Wp(n, i));
+ if (i && n) for (let r of t) e[r] !== i && (e[r] = am(n, i));
}
// node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs
-var ug = class extends Sm {
+var _g = class extends Lm {
constructor() {
super(...arguments), this.isAsync = !0;
}
@@ -16525,7 +16559,7 @@ var ug = class extends Sm {
canReadNow() {
let { unresolvedKeyframes: e, element: t, motionValue: n } = this, r = e[0] ?? n?.get();
if (!t?.current || r === void 0) return !1;
- for (let t = 0; t < e.length; t++) if (_d(t ? e[t] : r)) return !1;
+ for (let t = 0; t < e.length; t++) if (jd(t ? e[t] : r)) return !1;
return !0;
}
readKeyframes() {
@@ -16534,32 +16568,32 @@ var ug = class extends Sm {
super.readKeyframes();
for (let n = 0; n < e.length; n++) {
let r = e[n];
- if (typeof r == "string" && (r = r.trim(), hd(r))) {
- let i = Wh(r, t.current);
+ if (typeof r == "string" && (r = r.trim(), kd(r))) {
+ let i = ig(r, t.current);
i !== void 0 && (e[n] = i), n === e.length - 1 && (this.finalKeyframe = r);
}
}
- if (this.resolveNoneKeyframes(), !Yh.has(n) || e.length !== 2) return;
+ if (this.resolveNoneKeyframes(), !cg.has(n) || e.length !== 2) return;
let [r, i] = e;
if (typeof r == "number" && typeof i == "number") return;
- let a = lg(r), o = lg(i);
- if (_d(r) !== _d(i) && pm[n]) this.needsMeasurement = !0;
+ let a = hg(r), o = hg(i);
+ if (jd(r) !== jd(i) && Om[n]) this.needsMeasurement = !0;
else if (a !== o) {
- if (am(a) && am(o)) for (let t = 0; t < e.length; t++) {
+ if (bm(a) && bm(o)) for (let t = 0; t < e.length; t++) {
let n = e[t];
typeof n == "string" && (e[t] = parseFloat(n));
}
- else pm[n] && (this.needsMeasurement = !0);
+ else Om[n] && (this.needsMeasurement = !0);
}
}
resolveNoneKeyframes() {
let { unresolvedKeyframes: e, name: t } = this, n = [];
- for (let t = 0; t < e.length; t++) (e[t] === null || iee(e[t])) && n.push(t);
- n.length && oee(e, n, t);
+ for (let t = 0; t < e.length; t++) (e[t] === null || pee(e[t])) && n.push(t);
+ n.length && mee(e, n, t);
}
measure() {
let { element: e, name: t } = this;
- return pm[t](window.getComputedStyle(e.current), () => e.measureViewportBox());
+ return Om[t](window.getComputedStyle(e.current), () => e.measureViewportBox());
}
measureInitialState() {
let { element: e, unresolvedKeyframes: t, name: n } = this;
@@ -16575,19 +16609,19 @@ var ug = class extends Sm {
let n = t.length - 1, r = t[n];
t[n] = this.measure(), r !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = r), this.resolveNoneKeyframes();
}
-}, dg = [
+}, vg = [
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomRightRadius",
"borderBottomLeftRadius"
-], see = /* @__PURE__ */ new Set([
+], hee = /* @__PURE__ */ new Set([
"borderWidth",
"borderTopWidth",
"borderRightWidth",
"borderBottomWidth",
"borderLeftWidth",
"borderRadius",
- ...dg,
+ ...vg,
"width",
"maxWidth",
"height",
@@ -16630,21 +16664,21 @@ var ug = class extends Sm {
"backgroundPositionY"
]);
// node_modules/motion-dom/dist/es/animation/keyframes/utils/apply-px-defaults.mjs
-function cee(e, t) {
- for (let n = 0; n < e.length; n++) typeof e[n] == "number" && see.has(t) && (e[n] = e[n] + "px");
+function gee(e, t) {
+ for (let n = 0; n < e.length; n++) typeof e[n] == "number" && hee.has(t) && (e[n] = e[n] + "px");
}
// node_modules/motion-dom/dist/es/animation/animate/effects.mjs
-var fg = [];
-function lee(e) {
- pg(e), fg.unshift(e);
+var yg = [];
+function _ee(e) {
+ bg(e), yg.unshift(e);
}
-function pg(e) {
- Eu(fg, e);
+function bg(e) {
+ Bu(yg, e);
}
-function uee(e) {
- return fg.find((t) => t.test(e));
+function vee(e) {
+ return yg.find((t) => t.test(e));
}
-function mg(e, t, n = {}, r) {
+function xg(e, t, n = {}, r) {
let i = [], { velocity: a, path: o } = n, s = n.reduceMotion ?? r?.shouldReduceMotion;
o?.animateValues && r && (t = { ...t }, o.animateValues(e, t, n, 0, i));
for (let o in t) {
@@ -16652,62 +16686,62 @@ function mg(e, t, n = {}, r) {
let c = t[o];
if (c === void 0) continue;
let l = e(o), u = l.get();
- u !== void 0 && !l.isAnimating() && !Array.isArray(c) && c === u && !a ? Af.update(() => l.set(c)) : (l.start(Vh(o, l, c, s && Yh.has(o) ? { type: !1 } : n, r)), l.animation && i.push(l.animation));
+ u !== void 0 && !l.isAnimating() && !Array.isArray(c) && c === u && !a ? Gf.update(() => l.set(c)) : (l.start(ng(o, l, c, s && cg.has(o) ? { type: !1 } : n, r)), l.animation && i.push(l.animation));
}
let { transitionEnd: c } = t;
if (c) {
- let t = () => Af.update(() => {
+ let t = () => Gf.update(() => {
for (let t in c) e(t).set(c[t]);
});
i.length ? Promise.all(i).then(t) : t();
}
return i;
}
-function hg(e, t, n, r, i) {
- return mg((r) => {
+function Sg(e, t, n, r, i) {
+ return xg((r) => {
let a = e.get(t, r);
if (!a) {
let o;
if (!i) {
let i = n[r];
- o = gg(i) ?? e.read(t, r, i);
+ o = Cg(i) ?? e.read(t, r, i);
}
- a = jh(o, { owner: i }), e(t, { [r]: a });
+ a = Kh(o, { owner: i }), e(t, { [r]: a });
}
return a;
}, n, r, i);
}
-function gg(e) {
+function Cg(e) {
let t = Array.isArray(e) ? e[0] : void 0;
return t === null ? void 0 : t;
}
// node_modules/motion-dom/dist/es/utils/is-html-element.mjs
-function _g(e) {
- return Au(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
+function wg(e) {
+ return Wu(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
}
// node_modules/motion-dom/dist/es/utils/is-svg-element.mjs
-function vg(e) {
- return Au(e) && "ownerSVGElement" in e;
+function Tg(e) {
+ return Wu(e) && "ownerSVGElement" in e;
}
// node_modules/motion-dom/dist/es/scope/active.mjs
-var yg = {};
-function bg(e) {
- return yg.current?.add(e), e;
+var Eg = {};
+function Dg(e) {
+ return Eg.current?.add(e), e;
}
-var xg = (e) => yg.current ? yg.current.bind(e) : e;
+var Og = (e) => Eg.current ? Eg.current.bind(e) : e;
// node_modules/motion-dom/dist/es/utils/resolve-elements.mjs
-function Sg(e, t, n) {
+function kg(e, t, n) {
if (e == null) return [];
if (e instanceof EventTarget) return [e];
if (typeof e == "string") {
- let r = t ? t.current : yg.current?.root || document, i = n?.[e] ?? r.querySelectorAll(e);
+ let r = t ? t.current : Eg.current?.root || document, i = n?.[e] ?? r.querySelectorAll(e);
return i ? Array.from(i) : [];
}
return Array.from(e).filter((e) => e != null);
}
// node_modules/motion-dom/dist/es/effects/MotionValueState.mjs
-var dee = class {
- constructor(e = Af.render) {
+var yee = class {
+ constructor(e = Gf.render) {
this.step = e, this.values = /* @__PURE__ */ new Map(), this.pending = [], this.numPending = 0, this.flush = () => {
let { pending: e, numPending: t } = this;
this.numPending = 0;
@@ -16750,10 +16784,10 @@ var dee = class {
}
};
// node_modules/motion-dom/dist/es/effects/utils/create-effect.mjs
-function Cg(e, { step: t, ...n } = {}) {
+function Ag(e, { step: t, ...n } = {}) {
let r = /* @__PURE__ */ new WeakMap();
return Object.assign((n, i) => {
- let a = r.get(n) ?? new dee(t);
+ let a = r.get(n) ?? new yee(t);
r.set(n, a);
let o = [];
for (let t in i) {
@@ -16770,83 +16804,83 @@ function Cg(e, { step: t, ...n } = {}) {
});
}
// node_modules/motion-dom/dist/es/effects/style/transform.mjs
-function fee(e) {
+function bee(e) {
let t = "", { transformKeys: n = [], transformValues: r = {} } = e;
for (let e = 0; e < n.length; e++) {
let i = n[e], a = r[i].getCurrent();
- a !== void 0 && (th(i, a) || (t += (t && " ") + eh(i, a)));
+ a !== void 0 && (gh(i, a) || (t += (t && " ") + hh(i, a)));
}
let i = e.get("pathRotation")?.get();
- return i && (t += (t && " ") + eh("rotate", i)), t || "none";
+ return i && (t += (t && " ") + hh("rotate", i)), t || "none";
}
// node_modules/motion-dom/dist/es/effects/style/index.mjs
-var wg = /* @__PURE__ */ new Set([
+var jg = /* @__PURE__ */ new Set([
"originX",
"originY",
"originZ"
-]), Tg = (e, t) => Xm(e.get(t)?.get(), Bp[t]), Eg = (e, t, n, r) => {
+]), Mg = (e, t) => dh(e.get(t)?.get(), tm[t]), Ng = (e, t, n, r) => {
let i, a;
- if (im.has(n)) {
+ if (ym.has(n)) {
if (n !== "pathRotation") {
let e = t.transformKeys ??= [];
- (t.transformValues ??= {})[n] = r, e.includes(n) || (e.push(n), e.sort((e, t) => rm.indexOf(e) - rm.indexOf(t)));
+ (t.transformValues ??= {})[n] = r, e.includes(n) || (e.push(n), e.sort((e, t) => vm.indexOf(e) - vm.indexOf(t)));
}
- t.get("transform") || (!_g(e) && !t.get("transformBox") && Eg(e, t, "transformBox", new Ah("fill-box")), t.set("transform", new Ah("none"), () => {
- rh.get(e)?.check(), e.style.transform = fee(t);
+ t.get("transform") || (!wg(e) && !t.get("transformBox") && Ng(e, t, "transformBox", new Gh("fill-box")), t.set("transform", new Gh("none"), () => {
+ vh.get(e)?.check(), e.style.transform = bee(t);
})), a = t.get("transform");
- } else wg.has(n) ? (t.get("transformOrigin") || t.set("transformOrigin", new Ah(""), () => {
- let n = Tg(t, "originX") ?? "50%", r = Tg(t, "originY") ?? "50%", i = Tg(t, "originZ") ?? 0;
+ } else jg.has(n) ? (t.get("transformOrigin") || t.set("transformOrigin", new Gh(""), () => {
+ let n = Mg(t, "originX") ?? "50%", r = Mg(t, "originY") ?? "50%", i = Mg(t, "originZ") ?? 0;
e.style.transformOrigin = `${n} ${r} ${i}`;
- }), a = t.get("transformOrigin")) : i = Cm(n) ? () => {
+ }), a = t.get("transformOrigin")) : i = Rm(n) ? () => {
e.style.setProperty(n, r.getCurrent());
} : () => {
- e.style[n] = Xm(r.getCurrent(), Bp[n]);
+ e.style[n] = dh(r.getCurrent(), tm[n]);
};
return t.set(n, r, i, a);
-}, pee = (e) => _g(e) || vg(e), Dg = (e, t) => {
- if (im.has(t)) return nm(e, t);
- let n = getComputedStyle(e), r = Cm(t) ? n.getPropertyValue(t) : n[t];
+}, xee = (e) => wg(e) || Tg(e), Pg = (e, t) => {
+ if (ym.has(t)) return _m(e, t);
+ let n = getComputedStyle(e), r = Rm(t) ? n.getPropertyValue(t) : n[t];
return typeof r == "string" && r.trim() || 0;
-}, mee = /*@__PURE__*/ Cg(Eg, {
- test: pee,
- read: Dg
+}, See = /*@__PURE__*/ Ag(Ng, {
+ test: xee,
+ read: Pg
});
// node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs
-function Og(e) {
+function Fg(e) {
return e.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
}
// node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs
-function kg(e, t, n) {
+function Ig(e, t, n) {
let { style: r, vars: i, transformOrigin: a } = e, o = !1, s = !1;
for (let e in t) {
let n = t[e];
- if (im.has(e)) o = !0;
- else if (pd(e)) i[e] = n;
+ if (ym.has(e)) o = !0;
+ else if (Dd(e)) i[e] = n;
else {
- let t = Xm(n, Bp[e]);
+ let t = dh(n, tm[e]);
e.startsWith("origin") ? (s = !0, a[e] = t) : r[e] = t;
}
}
- if (t.transform || (o || n ? r.transform = nh(t, e.transform, n) : r.transform &&= "none"), s) {
+ if (t.transform || (o || n ? r.transform = _h(t, e.transform, n) : r.transform &&= "none"), s) {
let { originX: e = "50%", originY: t = "50%", originZ: n = 0 } = a;
r.transformOrigin = `${e} ${t} ${n}`;
}
}
// node_modules/motion-dom/dist/es/render/svg/utils/path.mjs
-var hee = {
+var Cee = {
offset: "stroke-dashoffset",
array: "stroke-dasharray"
-}, gee = {
+}, wee = {
offset: "strokeDashoffset",
array: "strokeDasharray"
};
-function _ee(e, t, n = 1, r = 0, i = !0) {
+function Tee(e, t, n = 1, r = 0, i = !0) {
e.pathLength = 1;
- let a = i ? hee : gee;
+ let a = i ? Cee : wee;
e[a.offset] = `${-r}`, e[a.array] = `${t} ${n}`;
}
// node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs
-var Ag = [
+var Lg = [
"transform",
"opacity",
"clipPath",
@@ -16856,52 +16890,52 @@ var Ag = [
"offsetRotate",
"offsetAnchor"
];
-function jg(e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u) {
- if (kg(e, s, l), c) {
+function Rg(e, { attrX: t, attrY: n, attrScale: r, pathLength: i, pathSpacing: a = 1, pathOffset: o = 0, ...s }, c, l, u) {
+ if (Ig(e, s, l), c) {
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
return;
}
e.attrs = e.style, e.style = {};
let { attrs: d, style: f } = e;
- for (let e of Ag) d[e] !== void 0 && (f[e] = d[e], delete d[e]);
- (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && _ee(d, i, a, o, !1);
+ for (let e of Lg) d[e] !== void 0 && (f[e] = d[e], delete d[e]);
+ (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), i !== void 0 && Tee(d, i, a, o, !1);
}
// node_modules/motion-dom/dist/es/effects/attr/index.mjs
-function vee(e, t) {
+function Eee(e, t) {
if (!(t in e)) return !1;
let n = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), t) || Object.getOwnPropertyDescriptor(e, t);
return n && typeof n.set == "function";
}
-var Mg = (e, t, n, r, i = n) => {
- let a = vee(e, i);
- !a && (i.startsWith("data") || i.startsWith("aria")) && (i = Og(i));
- let o = Bp[n] || Bp[i], s = a ? () => {
- e[i] = Xm(r.get(), Bp[n]);
+var zg = (e, t, n, r, i = n) => {
+ let a = Eee(e, i);
+ !a && (i.startsWith("data") || i.startsWith("aria")) && (i = Fg(i));
+ let o = tm[n] || tm[i], s = a ? () => {
+ e[i] = dh(r.get(), tm[n]);
} : () => {
- let t = Xm(r.get(), o);
+ let t = dh(r.get(), o);
t == null ? e.removeAttribute(i) : e.setAttribute(i, String(t));
};
return t.set(n, r, s);
};
// node_modules/motion-dom/dist/es/effects/svg/index.mjs
-function yee(e, t, n, r) {
- return Af.render(() => e.setAttribute("pathLength", "1")), n === "pathOffset" ? t.set(n, r, () => {
+function Dee(e, t, n, r) {
+ return Gf.render(() => e.setAttribute("pathLength", "1")), n === "pathOffset" ? t.set(n, r, () => {
let t = r.get();
e.setAttribute("stroke-dashoffset", `${-t}`);
- }) : (t.get("stroke-dasharray") || t.set("stroke-dasharray", new Ah("1 1"), () => {
+ }) : (t.get("stroke-dasharray") || t.set("stroke-dasharray", new Gh("1 1"), () => {
let n = t.get("pathLength")?.get() ?? 1, r = t.get("pathSpacing")?.get();
e.setAttribute("stroke-dasharray", `${n} ${r ?? 1 - Number(n)}`);
}), t.set(n, r, void 0, t.get("stroke-dasharray")));
}
-var bee = /*@__PURE__*/ Cg((e, t, n, r) => n.startsWith("path") && !im.has(n) ? yee(e, t, n, r) : n.startsWith("attr") ? Mg(e, t, n, r, Ng(n)) : (im.has(n) || wg.has(n) || Cm(n) || n in e.style ? Eg : Mg)(e, t, n, r), {
- test: vg,
- read: (e, t) => im.has(t) ? Bp[t]?.default || 0 : Cm(t) || Ag.includes(t) ? Dg(e, t) || e.getAttribute(Og(t)) || 0 : (t = Ng(t), e.getAttribute(Og(t)) ?? e.getAttribute(t) ?? void 0)
+var Oee = /*@__PURE__*/ Ag((e, t, n, r) => n.startsWith("path") && !ym.has(n) ? Dee(e, t, n, r) : n.startsWith("attr") ? zg(e, t, n, r, Bg(n)) : (ym.has(n) || jg.has(n) || Rm(n) || n in e.style ? Ng : zg)(e, t, n, r), {
+ test: Tg,
+ read: (e, t) => ym.has(t) ? tm[t]?.default || 0 : Rm(t) || Lg.includes(t) ? Pg(e, t) || e.getAttribute(Fg(t)) || 0 : (t = Bg(t), e.getAttribute(Fg(t)) ?? e.getAttribute(t) ?? void 0)
});
-function Ng(e) {
+function Bg(e) {
return e.replace(/^attr([A-Z])/, (e, t) => t.toLowerCase());
}
// node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs
-function Pg({ top: e, left: t, right: n, bottom: r }) {
+function Vg({ top: e, left: t, right: n, bottom: r }) {
return {
x: {
min: t,
@@ -16913,7 +16947,7 @@ function Pg({ top: e, left: t, right: n, bottom: r }) {
}
};
}
-function xee({ x: e, y: t }) {
+function kee({ x: e, y: t }) {
return {
top: t.min,
right: e.max,
@@ -16921,7 +16955,7 @@ function xee({ x: e, y: t }) {
left: e.min
};
}
-function See(e, t) {
+function Aee(e, t) {
if (!t) return e;
let n = t({
x: e.left,
@@ -16938,13 +16972,13 @@ function See(e, t) {
};
}
// node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs
-function Fg(e) {
+function Hg(e) {
return e === void 0 || e === 1;
}
-function Ig({ scale: e, scaleX: t, scaleY: n }) {
- return !Fg(e) || !Fg(t) || !Fg(n);
+function Ug({ scale: e, scaleX: t, scaleY: n }) {
+ return !Hg(e) || !Hg(t) || !Hg(n);
}
-var Lg = [
+var Wg = [
"rotate",
"rotateX",
"rotateY",
@@ -16952,65 +16986,65 @@ var Lg = [
"skewX",
"skewY"
];
-function Rg(e) {
- return Ig(e) || Bg(e) || zg(e);
+function Gg(e) {
+ return Ug(e) || qg(e) || Kg(e);
}
-function zg(e) {
+function Kg(e) {
return e.z || e.rotate || e.rotateX || e.rotateY || e.rotateZ || e.skewX || e.skewY;
}
-function Bg(e) {
- return Vg(e.x) || Vg(e.y);
+function qg(e) {
+ return Jg(e.x) || Jg(e.y);
}
-function Vg(e) {
+function Jg(e) {
return e && e !== "0%";
}
// node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs
-function Hg(e, t, n) {
+function Yg(e, t, n) {
return n + t * (e - n);
}
-function Ug(e, t, n, r, i) {
- return i !== void 0 && (e = Hg(e, i, r)), Hg(e, n, r) + t;
+function Xg(e, t, n, r, i) {
+ return i !== void 0 && (e = Yg(e, i, r)), Yg(e, n, r) + t;
}
-function Wg(e, t = 0, n = 1, r, i) {
- e.min = Ug(e.min, t, n, r, i), e.max = Ug(e.max, t, n, r, i);
+function Zg(e, t = 0, n = 1, r, i) {
+ e.min = Xg(e.min, t, n, r, i), e.max = Xg(e.max, t, n, r, i);
}
-function Gg(e, { x: t, y: n }) {
- Wg(e.x, t.translate, t.scale, t.originPoint), Wg(e.y, n.translate, n.scale, n.originPoint);
+function Qg(e, { x: t, y: n }) {
+ Zg(e.x, t.translate, t.scale, t.originPoint), Zg(e.y, n.translate, n.scale, n.originPoint);
}
-var Kg = .999999999999, qg = 1.0000000000001;
-function Cee(e, t, n, r = !1) {
+var $g = .999999999999, e_ = 1.0000000000001;
+function jee(e, t, n, r = !1) {
let i = n.length;
if (!i) return;
t.x = t.y = 1;
let a, o;
- for (let s = 0; s < i; s++) a = n[s], o = a.projectionDelta, a.options.visualElement?.props.style?.display !== "contents" && (r === !0 && a.options.layoutScroll && a.scroll && a !== a.root && (Jg(e.x, -a.scroll.offset.x), Jg(e.y, -a.scroll.offset.y)), o && (t.x *= o.x.scale, t.y *= o.y.scale, Gg(e, o)), r && (r.path?.[s] || r) !== a && Rg(a.latestValues) && Zg(e, a.latestValues, a.layout?.layoutBox));
- t.x < qg && t.x > Kg && (t.x = 1), t.y < qg && t.y > Kg && (t.y = 1);
+ for (let s = 0; s < i; s++) a = n[s], o = a.projectionDelta, a.options.visualElement?.props.style?.display !== "contents" && (r === !0 && a.options.layoutScroll && a.scroll && a !== a.root && (t_(e.x, -a.scroll.offset.x), t_(e.y, -a.scroll.offset.y)), o && (t.x *= o.x.scale, t.y *= o.y.scale, Qg(e, o)), r && (r.path?.[s] || r) !== a && Gg(a.latestValues) && i_(e, a.latestValues, a.layout?.layoutBox));
+ t.x < e_ && t.x > $g && (t.x = 1), t.y < e_ && t.y > $g && (t.y = 1);
}
-function Jg(e, t) {
+function t_(e, t) {
e.min += t, e.max += t;
}
-function Yg(e, t, n, r, i = .5) {
- Wg(e, t, n, lf(e.min, e.max, i), r);
+function n_(e, t, n, r, i = .5) {
+ Zg(e, t, n, wf(e.min, e.max, i), r);
}
-function Xg(e, t) {
+function r_(e, t) {
return typeof e == "string" ? parseFloat(e) / 100 * (t.max - t.min) : e;
}
-function Zg(e, t, n) {
+function i_(e, t, n) {
let r = n ?? e;
- Yg(e.x, Xg(t.x, r.x), t.scaleX, t.scale, t.originX), Yg(e.y, Xg(t.y, r.y), t.scaleY, t.scale, t.originY);
+ n_(e.x, r_(t.x, r.x), t.scaleX, t.scale, t.originX), n_(e.y, r_(t.y, r.y), t.scaleY, t.scale, t.originY);
}
// node_modules/motion-dom/dist/es/projection/utils/measure.mjs
-function Qg(e, t) {
- return Pg(See(e.getBoundingClientRect(), t));
+function a_(e, t) {
+ return Vg(Aee(e.getBoundingClientRect(), t));
}
-function wee(e, t, n) {
- let r = Qg(e, n), { scroll: i } = t;
- return i && (Jg(r.x, i.offset.x), Jg(r.y, i.offset.y)), r;
+function Mee(e, t, n) {
+ let r = a_(e, n), { scroll: i } = t;
+ return i && (t_(r.x, i.offset.x), t_(r.y, i.offset.y)), r;
}
// node_modules/motion-dom/dist/es/animation/animate/element.mjs
-var Tee = {}, Eee = (e) => vg(e) ? bee : mee, Dee = class {
+var Nee = {}, Pee = (e) => Tg(e) ? Oee : See, Fee = class {
constructor(e, t) {
- this.effect = e, this.current = t, this.KeyframeResolver = ug;
+ this.effect = e, this.current = t, this.KeyframeResolver = _g;
}
getValue(e) {
return this.effect.get(this.current, e);
@@ -17022,194 +17056,194 @@ var Tee = {}, Eee = (e) => vg(e) ? bee : mee, Dee = class {
this.effect.flush(this.current);
}
measureViewportBox() {
- return Qg(this.current);
+ return a_(this.current);
}
getProps() {
- return Tee;
+ return Nee;
}
};
-function Oee(e, t, n, r) {
- if (yg.current?.track(e), r) return mg((e) => r.getValue(e, null), t, n, r);
- let i = Eee(e);
- return hg(i, e, t, n, new Dee(i, e));
+function Iee(e, t, n, r) {
+ if (Eg.current?.track(e), r) return xg((e) => r.getValue(e, null), t, n, r);
+ let i = Pee(e);
+ return Sg(i, e, t, n, new Fee(i, e));
}
// node_modules/motion-dom/dist/es/effects/prop/index.mjs
-var kee = /*@__PURE__*/ Cg((e, t, n, r) => t.set(n, r, () => {
+var Lee = /*@__PURE__*/ Ag((e, t, n, r) => t.set(n, r, () => {
e[n] = r.get();
}), {
- test: (e) => Au(e),
+ test: (e) => Wu(e),
read: (e, t) => {
let n = e[t];
return typeof n == "string" || typeof n == "number" ? n : void 0;
}
-}), { schedule: $g, cancel: Aee } = /* @__PURE__ */ kf(queueMicrotask, !1);
+}), { schedule: o_, cancel: Ree } = /* @__PURE__ */ Wf(queueMicrotask, !1);
// node_modules/motion-dom/dist/es/animation/animate/single-value.mjs
-function e_(e, t, n) {
- let r = eg(e) ? e : jh(e);
- return r.start(Vh("", r, t, n)), r.animation;
+function s_(e, t, n) {
+ let r = lg(e) ? e : Kh(e);
+ return r.start(ng("", r, t, n)), r.animation;
}
// node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs
-var t_ = {}, n_ = {
+var c_ = {}, l_ = {
value: null,
addProjectionMetrics: null
};
// node_modules/motion-dom/dist/es/utils/delay.mjs
-function jee(e, t) {
- let n = ud.now();
- e = xg(e);
+function zee(e, t) {
+ let n = wd.now();
+ e = Og(e);
let r = ({ timestamp: i }) => {
let a = i - n;
- a >= t && (jf(r), e(a - t));
+ a >= t && (Kf(r), e(a - t));
};
- return Af.setup(r, !0), bg(() => jf(r));
+ return Gf.setup(r, !0), Dg(() => Kf(r));
}
// node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs
-function Mee(e) {
- return vg(e) && e.tagName === "svg";
+function Bee(e) {
+ return Tg(e) && e.tagName === "svg";
}
// node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs
-function r_(e) {
- return eg(e) ? e.get() : e;
+function u_(e) {
+ return lg(e) ? e.get() : e;
}
// node_modules/motion-dom/dist/es/value/utils/as-number.mjs
-var i_ = (e) => typeof e == "number" ? e : parseFloat(e), Nee = dg.length, a_ = (e) => typeof e == "number" || W.test(e);
-function Pee(e, t, n, r, i, a) {
- i ? (e.opacity = lf(0, n.opacity ?? 1, Fee(r)), e.opacityExit = lf(t.opacity ?? 1, 0, Iee(r))) : a && (e.opacity = lf(t.opacity ?? 1, n.opacity ?? 1, r));
- for (let i = 0; i < Nee; i++) {
- let a = dg[i], o = o_(t, a), s = o_(n, a);
- (o !== void 0 || s !== void 0) && (o ||= 0, s ||= 0, o === 0 || s === 0 || a_(o) === a_(s) ? (e[a] = Math.max(lf(i_(o), i_(s), r), 0), (Pd.test(s) || Pd.test(o)) && (e[a] += "%")) : e[a] = s);
+var d_ = (e) => typeof e == "number" ? e : parseFloat(e), Vee = vg.length, f_ = (e) => typeof e == "number" || Yd.test(e);
+function Hee(e, t, n, r, i, a) {
+ i ? (e.opacity = wf(0, n.opacity ?? 1, Uee(r)), e.opacityExit = wf(t.opacity ?? 1, 0, Wee(r))) : a && (e.opacity = wf(t.opacity ?? 1, n.opacity ?? 1, r));
+ for (let i = 0; i < Vee; i++) {
+ let a = vg[i], o = p_(t, a), s = p_(n, a);
+ (o !== void 0 || s !== void 0) && (o ||= 0, s ||= 0, o === 0 || s === 0 || f_(o) === f_(s) ? (e[a] = Math.max(wf(d_(o), d_(s), r), 0), (Jd.test(s) || Jd.test(o)) && (e[a] += "%")) : e[a] = s);
}
- for (let i = 0; i < Lg.length; i++) {
- let a = Lg[i];
- (t[a] || n[a]) && (e[a] = lf(t[a] || 0, n[a] || 0, r));
+ for (let i = 0; i < Wg.length; i++) {
+ let a = Wg[i];
+ (t[a] || n[a]) && (e[a] = wf(t[a] || 0, n[a] || 0, r));
}
}
-function o_(e, t) {
+function p_(e, t) {
return e[t] === void 0 ? e.borderRadius : e[t];
}
-var Fee = /*@__PURE__*/ s_(0, .5, Xu), Iee = /*@__PURE__*/ s_(.5, .95, Nu);
-function s_(e, t, n) {
- return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ Fu(e, t, r));
+var Uee = /*@__PURE__*/ m_(0, .5, ud), Wee = /*@__PURE__*/ m_(.5, .95, qu);
+function m_(e, t, n) {
+ return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ Yu(e, t, r));
}
// node_modules/motion-dom/dist/es/projection/geometry/copy.mjs
-function c_(e, t) {
+function h_(e, t) {
e.min = t.min, e.max = t.max;
}
-function l_(e, t) {
- c_(e.x, t.x), c_(e.y, t.y);
+function g_(e, t) {
+ h_(e.x, t.x), h_(e.y, t.y);
}
-function u_(e, t) {
+function __(e, t) {
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
}
// node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs
-var Lee = .9999, Ree = 1.0001, zee = -.01, Bee = .01;
-function d_(e) {
+var Gee = .9999, Kee = 1.0001, qee = -.01, Jee = .01;
+function v_(e) {
return e.max - e.min;
}
-function Vee(e, t, n) {
+function Yee(e, t, n) {
return Math.abs(e - t) <= n;
}
-function f_(e, t, n, r = .5) {
- e.origin = r, e.originPoint = lf(t.min, t.max, e.origin), e.scale = d_(n) / d_(t), e.translate = lf(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Lee && e.scale <= Ree || isNaN(e.scale)) && (e.scale = 1), (e.translate >= zee && e.translate <= Bee || isNaN(e.translate)) && (e.translate = 0);
+function y_(e, t, n, r = .5) {
+ e.origin = r, e.originPoint = wf(t.min, t.max, e.origin), e.scale = v_(n) / v_(t), e.translate = wf(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Gee && e.scale <= Kee || isNaN(e.scale)) && (e.scale = 1), (e.translate >= qee && e.translate <= Jee || isNaN(e.translate)) && (e.translate = 0);
}
-function p_(e, t, n, r) {
- f_(e.x, t.x, n.x, r?.originX), f_(e.y, t.y, n.y, r?.originY);
+function b_(e, t, n, r) {
+ y_(e.x, t.x, n.x, r?.originX), y_(e.y, t.y, n.y, r?.originY);
}
-function m_(e, t, n, r = 0) {
- e.min = (r ? lf(n.min, n.max, r) : n.min) + t.min, e.max = e.min + d_(t);
+function x_(e, t, n, r = 0) {
+ e.min = (r ? wf(n.min, n.max, r) : n.min) + t.min, e.max = e.min + v_(t);
}
-function Hee(e, t, n, r) {
- m_(e.x, t.x, n.x, r?.x), m_(e.y, t.y, n.y, r?.y);
+function Xee(e, t, n, r) {
+ x_(e.x, t.x, n.x, r?.x), x_(e.y, t.y, n.y, r?.y);
}
-function h_(e, t, n, r = 0) {
- let i = r ? lf(n.min, n.max, r) : n.min;
- e.min = t.min - i, e.max = e.min + d_(t);
+function S_(e, t, n, r = 0) {
+ let i = r ? wf(n.min, n.max, r) : n.min;
+ e.min = t.min - i, e.max = e.min + v_(t);
}
-function g_(e, t, n, r) {
- h_(e.x, t.x, n.x, r?.x), h_(e.y, t.y, n.y, r?.y);
+function C_(e, t, n, r) {
+ S_(e.x, t.x, n.x, r?.x), S_(e.y, t.y, n.y, r?.y);
}
// node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs
-function __(e, t, n, r, i) {
- return e -= t, e = Hg(e, 1 / n, r), i !== void 0 && (e = Hg(e, 1 / i, r)), e;
+function w_(e, t, n, r, i) {
+ return e -= t, e = Yg(e, 1 / n, r), i !== void 0 && (e = Yg(e, 1 / i, r)), e;
}
-function Uee(e, t = 0, n = 1, r = .5, i, a = e, o = e) {
- if (Pd.test(t) && (t = parseFloat(t), t = lf(o.min, o.max, t / 100) - o.min), typeof t != "number") return;
- let s = lf(a.min, a.max, r);
- e === a && (s -= t), e.min = __(e.min, t, n, s, i), e.max = __(e.max, t, n, s, i);
+function Zee(e, t = 0, n = 1, r = .5, i, a = e, o = e) {
+ if (Jd.test(t) && (t = parseFloat(t), t = wf(o.min, o.max, t / 100) - o.min), typeof t != "number") return;
+ let s = wf(a.min, a.max, r);
+ e === a && (s -= t), e.min = w_(e.min, t, n, s, i), e.max = w_(e.max, t, n, s, i);
}
-function v_(e, t, [n, r, i], a, o) {
- Uee(e, t[n], t[r], t[i], t.scale, a, o);
+function T_(e, t, [n, r, i], a, o) {
+ Zee(e, t[n], t[r], t[i], t.scale, a, o);
}
-var Wee = [
+var Qee = [
"x",
"scaleX",
"originX"
-], Gee = [
+], $ee = [
"y",
"scaleY",
"originY"
];
-function y_(e, t, n, r) {
- v_(e.x, t, Wee, n?.x, r?.x), v_(e.y, t, Gee, n?.y, r?.y);
+function E_(e, t, n, r) {
+ T_(e.x, t, Qee, n?.x, r?.x), T_(e.y, t, $ee, n?.y, r?.y);
}
// node_modules/motion-dom/dist/es/projection/geometry/models.mjs
-var b_ = () => ({
+var D_ = () => ({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0
-}), x_ = () => ({
- x: b_(),
- y: b_()
-}), S_ = () => ({
+}), O_ = () => ({
+ x: D_(),
+ y: D_()
+}), k_ = () => ({
min: 0,
max: 0
-}), C_ = () => ({
- x: S_(),
- y: S_()
+}), A_ = () => ({
+ x: k_(),
+ y: k_()
});
// node_modules/motion-dom/dist/es/projection/geometry/utils.mjs
-function w_(e) {
+function j_(e) {
return e.translate === 0 && e.scale === 1;
}
-function T_(e) {
- return w_(e.x) && w_(e.y);
+function M_(e) {
+ return j_(e.x) && j_(e.y);
}
-function E_(e, t) {
+function N_(e, t) {
return e.min === t.min && e.max === t.max;
}
-function D_(e, t) {
- return E_(e.x, t.x) && E_(e.y, t.y);
+function ete(e, t) {
+ return N_(e.x, t.x) && N_(e.y, t.y);
}
-function O_(e, t) {
+function P_(e, t) {
return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max);
}
-function k_(e, t) {
- return O_(e.x, t.x) && O_(e.y, t.y);
+function F_(e, t) {
+ return P_(e.x, t.x) && P_(e.y, t.y);
}
-function A_(e) {
- return d_(e.x) / d_(e.y);
+function I_(e) {
+ return v_(e.x) / v_(e.y);
}
-function j_(e, t) {
+function L_(e, t) {
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
}
// node_modules/motion-dom/dist/es/projection/shared/stack.mjs
-var M_ = class {
+var R_ = class {
constructor() {
this.members = [];
}
add(e) {
- Tu(this.members, e);
+ zu(this.members, e);
for (let t = this.members.length - 1; t >= 0; t--) {
let n = this.members[t];
if (n === e || n === this.lead || n === this.prevLead) continue;
let r = n.instance;
- r && r.isConnected !== !1 || n.snapshot || (Eu(this.members, n), n.unmount());
+ r && r.isConnected !== !1 || n.snapshot || (Bu(this.members, n), n.unmount());
}
e.scheduleRender();
}
remove(e) {
- if (Eu(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
+ if (Bu(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
let e = this.members[this.members.length - 1];
e && this.promote(e);
}
@@ -17242,39 +17276,39 @@ var M_ = class {
}
};
// node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs
-function N_(e, t) {
+function z_(e, t) {
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
}
-var P_ = { correct: (e, t) => {
+var B_ = { correct: (e, t) => {
if (!t.target) return e;
if (typeof e == "string") {
- if (W.test(e)) e = parseFloat(e);
+ if (Yd.test(e)) e = parseFloat(e);
else return e;
}
- return `${N_(e, t.target.x)}% ${N_(e, t.target.y)}%`;
-} }, F_ = {
- borderRadius: /* @__PURE__ */ Object.assign({}, P_, { applyTo: /* @__PURE__ */ dg.slice() }),
- borderTopLeftRadius: P_,
- borderTopRightRadius: P_,
- borderBottomLeftRadius: P_,
- borderBottomRightRadius: P_,
+ return `${z_(e, t.target.x)}% ${z_(e, t.target.y)}%`;
+} }, V_ = {
+ borderRadius: /* @__PURE__ */ Object.assign({}, B_, { applyTo: /* @__PURE__ */ vg.slice() }),
+ borderTopLeftRadius: B_,
+ borderTopRightRadius: B_,
+ borderBottomLeftRadius: B_,
+ borderBottomRightRadius: B_,
boxShadow: { correct: (e, { treeScale: t, projectionDelta: n }) => {
- let r = e, i = af.parse(e);
+ let r = e, i = bf.parse(e);
if (i.length > 5) return r;
- let a = af.createTransformer(e), o = typeof i[0] == "number" ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y;
+ let a = bf.createTransformer(e), o = typeof i[0] == "number" ? 0 : 1, s = n.x.scale * t.x, c = n.y.scale * t.y;
i[0 + o] /= s, i[1 + o] /= c;
- let l = lf(s, c, .5);
+ let l = wf(s, c, .5);
return typeof i[2 + o] == "number" && (i[2 + o] /= l), typeof i[3 + o] == "number" && (i[3 + o] /= l), a(i);
} }
};
// node_modules/motion-dom/dist/es/projection/styles/transform.mjs
-function I_(e, t, n) {
+function H_(e, t, n) {
let r = "", i = e.x.translate / t.x, a = e.y.translate / t.y, o = n?.z || 0;
if ((i || a || o) && (r = `translate3d(${i}px, ${a}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
let { transformPerspective: e } = n;
e && (r = `perspective(${e}px) ${r}`);
- for (let e = 0; e < Lg.length; e++) {
- let t = Lg[e], i = n[t];
+ for (let e = 0; e < Wg.length; e++) {
+ let t = Wg[e], i = n[t];
i && (r += `${t}(${i}deg) `), !e && n.pathRotation && (r += `rotate(${n.pathRotation}deg) `);
}
}
@@ -17282,71 +17316,71 @@ function I_(e, t, n) {
return (s !== 1 || c !== 1) && (r += `scale(${s}, ${c})`), r || "none";
}
// node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs
-function L_(e) {
+function U_(e) {
return [e("x"), e("y")];
}
// node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs
-var R_ = (e, t) => e.depth - t.depth, z_ = class {
+var W_ = (e, t) => e.depth - t.depth, G_ = class {
constructor() {
this.children = [], this.isDirty = !1;
}
add(e) {
- Tu(this.children, e), this.isDirty = !0;
+ zu(this.children, e), this.isDirty = !0;
}
remove(e) {
- Eu(this.children, e), this.isDirty = !0;
+ Bu(this.children, e), this.isDirty = !0;
}
forEach(e) {
- this.isDirty && this.children.sort(R_), this.isDirty = !1, this.children.forEach(e);
+ this.isDirty && this.children.sort(W_), this.isDirty = !1, this.children.forEach(e);
}
-}, B_ = {
+}, K_ = {
hasAnimatedSinceResize: !0,
hasEverUpdated: !1
-}, V_ = {
+}, q_ = {
nodes: 0,
calculatedTargetDeltas: 0,
calculatedProjections: 0
-}, H_ = [
+}, J_ = [
"z",
"skew",
"skewZ"
-], Kee = 1e3, qee = 0;
-function U_(e, t, n, r) {
+], tte = 1e3, nte = 0;
+function Y_(e, t, n, r) {
let { latestValues: i } = t;
i[e] && (n[e] = i[e], t.setStaticValue(e, 0), r && (r[e] = 0));
}
-var W_ = (e) => e.instance && rh.get(e.instance)?.demote() && e.resetSkewAndRotation();
-function G_(e) {
+var X_ = (e) => e.instance && vh.get(e.instance)?.demote() && e.resetSkewAndRotation();
+function Z_(e) {
if (e.hasCheckedOptimisedAppear = !0, e.root === e) return;
let { visualElement: t } = e.options;
if (!t) return;
- let n = ig(t);
+ let n = fg(t);
if (window.MotionHasOptimisedAnimation(n, "transform")) {
let { layout: t, layoutId: r } = e.options;
- window.MotionCancelOptimisedAnimation(n, "transform", Af, !(t || r));
+ window.MotionCancelOptimisedAnimation(n, "transform", Gf, !(t || r));
}
let { parent: r } = e;
- r && !r.hasCheckedOptimisedAppear && G_(r);
+ r && !r.hasCheckedOptimisedAppear && Z_(r);
}
-function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
- return Object.assign(t_, {
- ...F_,
- ...t_
+function Q_({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: i }) {
+ return Object.assign(c_, {
+ ...V_,
+ ...c_
}), class {
constructor(e = {}, n = t?.()) {
- this.id = qee++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
+ this.id = nte++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
x: 1,
y: 1
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
}, this.updateProjection = () => {
- this.projectionUpdateScheduled = !1, n_.value && (V_.nodes = V_.calculatedTargetDeltas = V_.calculatedProjections = 0), this.nodes.forEach(Xee), this.nodes.forEach(ite), this.nodes.forEach(ate), this.nodes.forEach(Zee), n_.addProjectionMetrics && n_.addProjectionMetrics(V_);
+ this.projectionUpdateScheduled = !1, l_.value && (q_.nodes = q_.calculatedTargetDeltas = q_.calculatedProjections = 0), this.nodes.forEach(ate), this.nodes.forEach(pte), this.nodes.forEach(mte), this.nodes.forEach(ote), l_.addProjectionMetrics && l_.addProjectionMetrics(q_);
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = e, this.root = n ? n.root || n : this, this.path = n ? [...n.path, n] : [], this.parent = n, this.depth = n ? n.depth + 1 : 0;
for (let e = 0; e < this.path.length; e++) this.path[e].shouldResetTransform = !0;
- this.root === this && (this.nodes = new z_());
+ this.root === this && (this.nodes = new G_());
}
addEventListener(e, t) {
- return this.eventHandlers.has(e) || this.eventHandlers.set(e, new Iu()), this.eventHandlers.get(e).add(t);
+ return this.eventHandlers.has(e) || this.eventHandlers.set(e, new Xu()), this.eventHandlers.get(e).add(t);
}
notifyListeners(e, ...t) {
this.eventHandlers.get(e)?.notify(...t);
@@ -17356,15 +17390,15 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
mount(t) {
if (this.instance) return;
- this.isSVG = vg(t) && !Mee(t), this.instance = t;
+ this.isSVG = Tg(t) && !Bee(t), this.instance = t;
let { layoutId: n, layout: r, visualElement: i } = this.options;
if (i && !i.current && i.mount(t), this.root.nodes.add(this), this.parent?.children.add(this), this.root.hasTreeAnimated && (r || n) && (this.isLayoutDirty = !0), e) {
let n, r = 0, i = () => this.root.updateBlockedByResize = !1;
- Af.read(() => {
+ Gf.read(() => {
r = window.innerWidth;
}), e(t, () => {
let e = window.innerWidth;
- e !== r && (r = e, this.root.updateBlockedByResize = !0, n?.(), n = jee(i, 250), B_.hasAnimatedSinceResize && (B_.hasAnimatedSinceResize = !1, this.nodes.forEach(Y_)));
+ e !== r && (r = e, this.root.updateBlockedByResize = !0, n?.(), n = zee(i, 250), K_.hasAnimatedSinceResize && (K_.hasAnimatedSinceResize = !1, this.nodes.forEach(tv)));
});
}
n && this.root.registerSharedNode(n, this), this.addLayoutListener();
@@ -17376,21 +17410,21 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.target = void 0, this.relativeTarget = void 0;
return;
}
- let a = this.options.transition || n.getDefaultTransition() || lte, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = n.getProps(), c = !this.targetLayout || !k_(this.targetLayout, i), l = !t && r;
+ let a = this.options.transition || n.getDefaultTransition() || vte, { onLayoutAnimationStart: o, onLayoutAnimationComplete: s } = n.getProps(), c = !this.targetLayout || !F_(this.targetLayout, i), l = !t && r;
if (this.options.layoutRoot || this.resumeFrom || l || t && (c || !this.currentAnimation)) {
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
let t = {
- ...Nh(a, "layout"),
+ ...Jh(a, "layout"),
onPlay: o,
onComplete: s
};
(n.shouldReduceMotion || this.options.layoutRoot) && (t.delay = 0, t.type = !1), this.startAnimation(t), this.setAnimationOrigin(e, l, t.path);
- } else t || Y_(this), this.isLead() && this.options.onExitComplete?.();
+ } else t || tv(this), this.isLead() && this.options.onExitComplete?.();
this.targetLayout = i;
}));
}
unmount() {
- this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this), this.getStack()?.remove(this), this.parent?.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), this.hasLayoutListener = !1, jf(this.updateProjection);
+ this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this), this.getStack()?.remove(this), this.parent?.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), this.hasLayoutListener = !1, Kf(this.updateProjection);
}
blockUpdate() {
this.updateManuallyBlocked = !0;
@@ -17402,7 +17436,7 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
return this.updateManuallyBlocked || this.updateBlockedByResize;
}
startUpdate() {
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes?.forEach(ote), this.animationId++);
+ this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes?.forEach(hte), this.animationId++);
}
getTransformTemplate() {
let { visualElement: e } = this.options;
@@ -17413,11 +17447,11 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.options.onExitComplete?.();
return;
}
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && G_(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
- W_(this), this.isLayoutDirty = !0;
+ if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Z_(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
+ X_(this), this.isLayoutDirty = !0;
for (let e = 0; e < this.path.length; e++) {
let t = this.path[e];
- t.shouldResetTransform = !0, W_(t), (typeof t.latestValues.x == "string" || typeof t.latestValues.y == "string") && (t.isLayoutDirty = !0), t.updateScroll("snapshot"), t.options.layoutRoot && t.willUpdate(!1), t.isAnimationBlocked && (t.dragSnapshot ||= t.measure(), this.dragAncestor = t);
+ t.shouldResetTransform = !0, X_(t), (typeof t.latestValues.x == "string" || typeof t.latestValues.y == "string") && (t.isLayoutDirty = !0), t.updateScroll("snapshot"), t.options.layoutRoot && t.willUpdate(!1), t.isAnimationBlocked && (t.dragSnapshot ||= t.measure(), this.dragAncestor = t);
}
let { layoutId: t, layout: n } = this.options;
if (t === void 0 && !n) return;
@@ -17427,39 +17461,39 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
update() {
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
let e = this.updateBlockedByResize;
- this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), e && this.nodes.forEach($ee), this.nodes.forEach(q_);
+ this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), e && this.nodes.forEach(cte), this.nodes.forEach($_);
return;
}
if (this.animationId <= this.animationCommitId) {
- this.nodes.forEach(J_);
+ this.nodes.forEach(ev);
return;
}
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(tte), this.nodes.forEach(nte), this.nodes.forEach(rte), this.nodes.forEach(Jee), this.nodes.forEach(Yee)) : this.nodes.forEach(J_), this.clearAllSnapshots();
- let e = ud.now();
- sd.delta = Du(0, 1e3 / 60, e - sd.timestamp), sd.timestamp = e, sd.isProcessing = !0, Mf.update.process(sd), Mf.preRender.process(sd), Mf.render.process(sd), sd.isProcessing = !1;
+ this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(ute), this.nodes.forEach(dte), this.nodes.forEach(fte), this.nodes.forEach(rte), this.nodes.forEach(ite)) : this.nodes.forEach(ev), this.clearAllSnapshots();
+ let e = wd.now();
+ xd.delta = Vu(0, 1e3 / 60, e - xd.timestamp), xd.timestamp = e, xd.isProcessing = !0, qf.update.process(xd), qf.preRender.process(xd), qf.render.process(xd), xd.isProcessing = !1;
}
didUpdate() {
- this.updateScheduled || (this.updateScheduled = !0, $g.read(this.scheduleUpdate));
+ this.updateScheduled || (this.updateScheduled = !0, o_.read(this.scheduleUpdate));
}
clearAllSnapshots() {
- this.nodes.forEach(Qee), this.sharedNodes.forEach((e, t) => e.members.length ? e.removeLeadSnapshot() : this.sharedNodes.delete(t));
+ this.nodes.forEach(ste), this.sharedNodes.forEach((e, t) => e.members.length ? e.removeLeadSnapshot() : this.sharedNodes.delete(t));
}
scheduleUpdateProjection() {
- this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, Af.preRender(this.updateProjection, !1, !0));
+ this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, Gf.preRender(this.updateProjection, !1, !0));
}
scheduleCheckAfterUnmount() {
- Af.postRender(() => {
+ Gf.postRender(() => {
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
});
}
updateSnapshot() {
- !this.snapshot && this.instance && (this.snapshot = this.measure(), this.snapshot && !d_(this.snapshot.measuredBox.x) && !d_(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
+ !this.snapshot && this.instance && (this.snapshot = this.measure(), this.snapshot && !v_(this.snapshot.measuredBox.x) && !v_(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
}
updateLayout() {
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
if (this.resumeFrom && !this.resumeFrom.instance) for (let e = 0; e < this.path.length; e++) this.path[e].updateScroll();
let e = this.layout;
- this.layout = this.measure(!1), this.layoutCorrected ||= C_(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
+ this.layout = this.measure(!1), this.layoutCorrected ||= A_(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
let { visualElement: t } = this.options;
t?.notify("LayoutMeasure", this.layout.layoutBox, e?.layoutBox);
}
@@ -17479,13 +17513,13 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
resetTransform() {
if (!i) return;
let e = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout;
- e && W_(this);
- let t = this.projectionDelta && !T_(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, "") : void 0, a = r !== this.prevTransformTemplateValue;
- e && this.instance && (t || Rg(this.latestValues) || a) && (i(this.instance, r), this.shouldResetTransform = !1, this.scheduleRender());
+ e && X_(this);
+ let t = this.projectionDelta && !M_(this.projectionDelta), n = this.getTransformTemplate(), r = n ? n(this.latestValues, "") : void 0, a = r !== this.prevTransformTemplateValue;
+ e && this.instance && (t || Gg(this.latestValues) || a) && (i(this.instance, r), this.shouldResetTransform = !1, this.scheduleRender());
}
measure(e = !0) {
let t = this.measurePageBox(), n = this.removeElementScroll(t);
- return e && (n = this.removeTransform(n)), ute(n), {
+ return e && (n = this.removeTransform(n)), yte(n), {
animationId: this.root.animationId,
measuredBox: t,
layoutBox: n,
@@ -17495,42 +17529,42 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
measurePageBox() {
let { visualElement: e } = this.options;
- if (!e) return C_();
+ if (!e) return A_();
let t = e.measureViewportBox();
- if (!(this.scroll?.wasRoot || this.path.some(dte))) {
+ if (!(this.scroll?.wasRoot || this.path.some(bte))) {
let { scroll: e } = this.root;
- e && (Jg(t.x, e.offset.x), Jg(t.y, e.offset.y));
+ e && (t_(t.x, e.offset.x), t_(t.y, e.offset.y));
}
return t;
}
removeElementScroll(e) {
- let t = C_();
- if (l_(t, e), this.scroll?.wasRoot) return t;
+ let t = A_();
+ if (g_(t, e), this.scroll?.wasRoot) return t;
for (let n = 0; n < this.path.length; n++) {
let r = this.path[n], { scroll: i, options: a } = r;
- r !== this.root && i && a.layoutScroll && (i.wasRoot && l_(t, e), Jg(t.x, i.offset.x), Jg(t.y, i.offset.y));
+ r !== this.root && i && a.layoutScroll && (i.wasRoot && g_(t, e), t_(t.x, i.offset.x), t_(t.y, i.offset.y));
}
return t;
}
applyTransform(e, t = !1, n, r, i = 0) {
- let a = n || C_();
- l_(a, e);
+ let a = n || A_();
+ g_(a, e);
for (let e = i; e < this.path.length; e++) {
let n = this.path[e];
- !t && n.options.layoutScroll && n.scroll && n !== n.root && (Jg(a.x, -n.scroll.offset.x), Jg(a.y, -n.scroll.offset.y)), Rg(n.latestValues) && Zg(a, n.latestValues, n.layout?.layoutBox);
+ !t && n.options.layoutScroll && n.scroll && n !== n.root && (t_(a.x, -n.scroll.offset.x), t_(a.y, -n.scroll.offset.y)), Gg(n.latestValues) && i_(a, n.latestValues, n.layout?.layoutBox);
}
- return !r && Rg(this.latestValues) && Zg(a, this.latestValues, this.layout?.layoutBox), a;
+ return !r && Gg(this.latestValues) && i_(a, this.latestValues, this.layout?.layoutBox), a;
}
removeTransform(e) {
- let t = C_();
- l_(t, e);
+ let t = A_();
+ g_(t, e);
for (let e = 0; e < this.path.length; e++) {
let n = this.path[e];
- if (!Rg(n.latestValues)) continue;
+ if (!Gg(n.latestValues)) continue;
let r;
- n.instance && (Ig(n.latestValues) && n.updateSnapshot(), r = C_(), l_(r, n.measurePageBox())), y_(t, n.latestValues, n.snapshot?.layoutBox, r);
+ n.instance && (Ug(n.latestValues) && n.updateSnapshot(), r = A_(), g_(r, n.measurePageBox())), E_(t, n.latestValues, n.snapshot?.layoutBox, r);
}
- return Rg(this.latestValues) && y_(t, this.latestValues), t;
+ return Gg(this.latestValues) && E_(t, this.latestValues), t;
}
setTargetDelta(e) {
this.targetDelta = e, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
@@ -17546,7 +17580,7 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
}
forceRelativeParentToResolveTarget() {
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== sd.timestamp && this.relativeParent.resolveTargetDelta(!0);
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== xd.timestamp && this.relativeParent.resolveTargetDelta(!0);
}
resolveTargetDelta(e = !1) {
let t = this.getLead();
@@ -17555,32 +17589,32 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
if (!(e || n && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
let { layout: r, layoutId: i } = this.options;
if (!this.layout || !(r || i)) return;
- this.resolvedRelativeTargetAt = sd.timestamp;
+ this.resolvedRelativeTargetAt = xd.timestamp;
let a = this.getClosestProjectingParent();
- !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && a && a.layout ? this.createRelativeTarget(a, this.layout.layoutBox, a.layout.layoutBox) : this.removeRelativeTarget()), (this.relativeTarget || this.targetDelta) && (this.target || (this.target = C_(), this.targetWithTransforms = C_()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Hee(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target, !0) : l_(this.target, this.layout.layoutBox), Gg(this.target, this.targetDelta)) : l_(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && a && (!a.resumingFrom == !this.resumingFrom || a.options.layoutRoot && !a.resumingFrom) && !a.options.layoutScroll && a.target && this.animationProgress !== 1 ? this.createRelativeTarget(a, this.target, a.target) : this.relativeParent = this.relativeTarget = void 0), n_.value && V_.calculatedTargetDeltas++);
+ !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && a && a.layout ? this.createRelativeTarget(a, this.layout.layoutBox, a.layout.layoutBox) : this.removeRelativeTarget()), (this.relativeTarget || this.targetDelta) && (this.target || (this.target = A_(), this.targetWithTransforms = A_()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Xee(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target, !0) : g_(this.target, this.layout.layoutBox), Qg(this.target, this.targetDelta)) : g_(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && a && (!a.resumingFrom == !this.resumingFrom || a.options.layoutRoot && !a.resumingFrom) && !a.options.layoutScroll && a.target && this.animationProgress !== 1 ? this.createRelativeTarget(a, this.target, a.target) : this.relativeParent = this.relativeTarget = void 0), l_.value && q_.calculatedTargetDeltas++);
}
getClosestProjectingParent() {
- if (!(!this.parent || Ig(this.parent.latestValues) || Bg(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
+ if (!(!this.parent || Ug(this.parent.latestValues) || qg(this.parent.latestValues))) return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
}
isProjecting() {
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
}
createRelativeTarget(e, t, n) {
- this.relativeParent = e, this.forceRelativeParentToResolveTarget(), this.relativeTarget = C_(), this.relativeTargetOrigin = C_(), g_(this.relativeTargetOrigin, t, n, this.options.layoutAnchor || void 0), l_(this.relativeTarget, this.relativeTargetOrigin);
+ this.relativeParent = e, this.forceRelativeParentToResolveTarget(), this.relativeTarget = A_(), this.relativeTargetOrigin = A_(), C_(this.relativeTargetOrigin, t, n, this.options.layoutAnchor || void 0), g_(this.relativeTarget, this.relativeTargetOrigin);
}
removeRelativeTarget() {
this.relativeParent = this.relativeTarget = void 0;
}
calcProjection() {
let e = this.getLead(), t = !!this.resumingFrom || this !== e, n = !0;
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (n = !1), t && (this.isSharedProjectionDirty || this.isTransformDirty) && (n = !1), this.resolvedRelativeTargetAt === sd.timestamp && (n = !1), n) return;
+ if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (n = !1), t && (this.isSharedProjectionDirty || this.isTransformDirty) && (n = !1), this.resolvedRelativeTargetAt === xd.timestamp && (n = !1), n) return;
let { layout: r, layoutId: i } = this.options;
if (this.isTreeAnimating = !!(this.parent?.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(r || i)) return;
- l_(this.layoutCorrected, this.layout.layoutBox);
+ g_(this.layoutCorrected, this.layout.layoutBox);
let a = this.treeScale.x, o = this.treeScale.y;
- Cee(this.layoutCorrected, this.treeScale, this.path, t && (e.relativeTarget && !e.relativeParent.resumingFrom ? e.relativeParent : !0)), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox, e.targetWithTransforms = C_());
+ jee(this.layoutCorrected, this.treeScale, this.path, t && (e.relativeTarget && !e.relativeParent.resumingFrom ? e.relativeParent : !0)), e.layout && !e.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (e.target = e.layout.layoutBox, e.targetWithTransforms = A_());
let { target: s } = e;
- s ? (!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (u_(this.prevProjectionDelta.x, this.projectionDelta.x), u_(this.prevProjectionDelta.y, this.projectionDelta.y)), p_(this.projectionDelta, this.layoutCorrected, s, this.latestValues), this.treeScale.x === a && this.treeScale.y === o && j_(this.projectionDelta.x, this.prevProjectionDelta.x) && j_(this.projectionDelta.y, this.prevProjectionDelta.y) || (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", s)), n_.value && V_.calculatedProjections++) : this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
+ s ? (!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (__(this.prevProjectionDelta.x, this.projectionDelta.x), __(this.prevProjectionDelta.y, this.projectionDelta.y)), b_(this.projectionDelta, this.layoutCorrected, s, this.latestValues), this.treeScale.x === a && this.treeScale.y === o && L_(this.projectionDelta.x, this.prevProjectionDelta.x) && L_(this.projectionDelta.y, this.prevProjectionDelta.y) || (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", s)), l_.value && q_.calculatedProjections++) : this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
}
hide() {
this.isVisible = !1;
@@ -17592,22 +17626,22 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
this.options.visualElement?.scheduleRender(), e && this.getStack()?.scheduleRender(), this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
}
createProjectionDeltas() {
- this.prevProjectionDelta = x_(), this.projectionDelta = x_(), this.projectionDeltaWithTransform = x_();
+ this.prevProjectionDelta = O_(), this.projectionDelta = O_(), this.projectionDeltaWithTransform = O_();
}
setAnimationOrigin(e, t = !1, n) {
- let r = this.snapshot, i = r ? r.latestValues : {}, a = { ...this.latestValues }, o = x_();
+ let r = this.snapshot, i = r ? r.latestValues : {}, a = { ...this.latestValues }, o = O_();
this.relativeParent && this.relativeParent.options.layoutRoot || (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !t;
- let s = C_(), c = r?.source !== this.layout?.source, l = this.getStack(), u = !l || l.members.length <= 1, d = !(!c || u || this.options.crossfade !== !0 || this.path.some(cte));
+ let s = A_(), c = r?.source !== this.layout?.source, l = this.getStack(), u = !l || l.members.length <= 1, d = !(!c || u || this.options.crossfade !== !0 || this.path.some(_te));
this.animationProgress = 0;
let f, p = n?.interpolateProjection(e);
this.mixTargetDelta = (t) => {
let n = t / 1e3, r = p?.(n);
- X_(o.x, e.x, n), X_(o.y, e.y, n), r && (o.x.translate = r.x, o.y.translate = r.y), this.setTargetDelta(o), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (g_(s, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), ste(this.relativeTarget, this.relativeTargetOrigin, s, n), f && D_(this.relativeTarget, f) && (this.isProjectionDirty = !1), f ||= C_(), l_(f, this.relativeTarget)), c && (this.animationValues = a, Pee(a, i, this.latestValues, n, d, u)), r?.rotate !== void 0 && (this.animationValues ||= a, this.animationValues.pathRotation = r.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = n;
+ nv(o.x, e.x, n), nv(o.y, e.y, n), r && (o.x.translate = r.x, o.y.translate = r.y), this.setTargetDelta(o), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (C_(s, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), gte(this.relativeTarget, this.relativeTargetOrigin, s, n), f && ete(this.relativeTarget, f) && (this.isProjectionDirty = !1), f ||= A_(), g_(f, this.relativeTarget)), c && (this.animationValues = a, Hee(a, i, this.latestValues, n, d, u)), r?.rotate !== void 0 && (this.animationValues ||= a, this.animationValues.pathRotation = r.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = n;
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
}
startAnimation(e) {
- this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation &&= (jf(this.pendingAnimation), void 0), this.pendingAnimation = Af.update(() => {
- B_.hasAnimatedSinceResize = !0, this.motionValue ||= jh(0), this.motionValue.jump(0, !1), this.currentAnimation = e_(this.motionValue, [0, 1e3], {
+ this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation &&= (Kf(this.pendingAnimation), void 0), this.pendingAnimation = Gf.update(() => {
+ K_.hasAnimatedSinceResize = !0, this.motionValue ||= Kh(0), this.motionValue.jump(0, !1), this.currentAnimation = s_(this.motionValue, [0, 1e3], {
...e,
velocity: 0,
isSync: !0,
@@ -17617,7 +17651,7 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
onComplete: () => {
e.onComplete && e.onComplete(), this.completeAnimation();
}
- }), Op(this.currentAnimation, this), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
+ }), Up(this.currentAnimation, this), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
});
}
completeAnimation() {
@@ -17626,20 +17660,20 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
e && e.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
}
finishAnimation() {
- this.currentAnimation && (this.mixTargetDelta?.(Kee), this.currentAnimation.stop()), this.completeAnimation();
+ this.currentAnimation && (this.mixTargetDelta?.(tte), this.currentAnimation.stop()), this.completeAnimation();
}
applyTransformsToTarget() {
let e = this.getLead(), { targetWithTransforms: t, layout: n, latestValues: r } = e, { target: i } = e;
if (t && i && n) {
- if (this !== e && this.layout && n && nv(this.options.animationType, this.layout.layoutBox, n.layoutBox)) {
+ if (this !== e && this.layout && n && cv(this.options.animationType, this.layout.layoutBox, n.layoutBox)) {
let { layoutBox: e } = this.layout, t = i;
- i = this.target || C_(), tv(i.x, t.x, e.x), tv(i.y, t.y, e.y);
+ i = this.target || A_(), sv(i.x, t.x, e.x), sv(i.y, t.y, e.y);
}
- l_(t, i), Zg(t, r), p_(this.projectionDeltaWithTransform, this.layoutCorrected, t, r);
+ g_(t, i), i_(t, r), b_(this.projectionDeltaWithTransform, this.layoutCorrected, t, r);
}
}
registerSharedNode(e, t) {
- this.sharedNodes.has(e) || this.sharedNodes.set(e, new M_()), this.sharedNodes.get(e).add(t);
+ this.sharedNodes.has(e) || this.sharedNodes.set(e, new R_()), this.sharedNodes.get(e).add(t);
let n = t.options.initialPromotionConfig;
t.promote({
transition: n?.transition,
@@ -17672,10 +17706,10 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
let { visualElement: e } = this.options;
if (!e) return;
let { latestValues: t } = e;
- if (!zg(t)) return;
+ if (!Kg(t)) return;
let n = {};
- for (let t = 0; t < H_.length; t++) U_(H_[t], e, n, this.animationValues);
- for (let t = 0; t < Lg.length; t++) U_(Lg[t], e, n, this.animationValues);
+ for (let t = 0; t < J_.length; t++) Y_(J_[t], e, n, this.animationValues);
+ for (let t = 0; t < Wg.length; t++) Y_(Wg[t], e, n, this.animationValues);
e.render();
for (let t in n) e.setStaticValue(t, n[t]), this.animationValues && (this.animationValues[t] = n[t]);
e.scheduleRender();
@@ -17689,70 +17723,70 @@ function K_({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
}
let r = this.getTransformTemplate();
if (this.needsReset) {
- this.needsReset = !1, e.visibility = "", e.opacity = "", e.pointerEvents = r_(t?.pointerEvents) || "", e.transform = r ? r(this.latestValues, "") : "none";
+ this.needsReset = !1, e.visibility = "", e.opacity = "", e.pointerEvents = u_(t?.pointerEvents) || "", e.transform = r ? r(this.latestValues, "") : "none";
return;
}
if (!this.projectionDelta || !this.layout || !n.target) {
- (this.options.layoutId || this.needsShow) && (this.needsShow = !1, e.visibility = "", e.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, e.pointerEvents = r_(t?.pointerEvents) || ""), this.hasProjected && !Rg(this.latestValues) && (e.transform = r ? r({}, "") : "none", this.hasProjected = !1);
+ (this.options.layoutId || this.needsShow) && (this.needsShow = !1, e.visibility = "", e.opacity = this.latestValues.opacity === void 0 ? 1 : this.latestValues.opacity, e.pointerEvents = u_(t?.pointerEvents) || ""), this.hasProjected && !Gg(this.latestValues) && (e.transform = r ? r({}, "") : "none", this.hasProjected = !1);
return;
}
e.visibility = "";
let i = n.animationValues || n.latestValues;
this.applyTransformsToTarget();
- let a = I_(this.projectionDeltaWithTransform, this.treeScale, i);
+ let a = H_(this.projectionDeltaWithTransform, this.treeScale, i);
r && (a = r(i, a)), e.transform = a;
let { x: o, y: s } = this.projectionDelta;
e.transformOrigin = `${o.origin * 100}% ${s.origin * 100}% 0`, e.opacity = n.animationValues ? n === this ? i.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : i.opacityExit : n === this ? i.opacity === void 0 ? "" : i.opacity : i.opacityExit === void 0 ? 0 : i.opacityExit;
- for (let t in t_) {
+ for (let t in c_) {
if (i[t] === void 0) continue;
- let { correct: r, applyTo: o, isCSSVariable: s } = t_[t], c = a === "none" ? i[t] : r(i[t], n);
+ let { correct: r, applyTo: o, isCSSVariable: s } = c_[t], c = a === "none" ? i[t] : r(i[t], n);
if (o) {
let t = o.length;
for (let n = 0; n < t; n++) e[o[n]] = c;
} else s ? this.options.visualElement.renderState.vars[t] = c : e[t] = c;
}
- this.options.layoutId && (e.pointerEvents = n === this ? r_(t?.pointerEvents) || "" : "none");
+ this.options.layoutId && (e.pointerEvents = n === this ? u_(t?.pointerEvents) || "" : "none");
}
clearSnapshot() {
this.resumeFrom = this.snapshot = this.dragSnapshot = this.dragAncestor = void 0;
}
resetTree() {
- this.root.nodes.forEach((e) => e.currentAnimation?.stop()), this.root.nodes.forEach(q_), this.root.sharedNodes.clear();
+ this.root.nodes.forEach((e) => e.currentAnimation?.stop()), this.root.nodes.forEach($_), this.root.sharedNodes.clear();
}
};
}
-function Jee(e) {
- e.updateLayout(), ete(e);
+function rte(e) {
+ e.updateLayout(), lte(e);
}
-function Yee(e) {
+function ite(e) {
let t = e.resumeFrom?.snapshot || e.snapshot;
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
let { layoutBox: n, measuredBox: r } = e.layout, { animationType: i } = e.options, a = t.source !== e.layout.source, o = (r, a) => {
- if (i === "size") L_((e) => {
- let t = d_(r[e]);
+ if (i === "size") U_((e) => {
+ let t = v_(r[e]);
r[e].min = a[e].min, r[e].max = r[e].min + t;
});
else if (i === "x" || i === "y") {
let e = i === "x" ? "y" : "x";
- c_(r[e], a[e]);
- } else nv(i, t.layoutBox, n) && L_((t) => {
- let n = d_(a[t]);
+ h_(r[e], a[e]);
+ } else cv(i, t.layoutBox, n) && U_((t) => {
+ let n = v_(a[t]);
r[t].max = r[t].min + n, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[t].max = e.relativeTarget[t].min + n);
});
}, s = a ? t.measuredBox : t.layoutBox;
o(s, n);
- let c = x_();
- p_(c, n, t.layoutBox);
- let l = x_();
- p_(l, a ? e.applyTransform(r, !0) : n, s);
- let u = !T_(c), d = !1, f = e.getClosestProjectingParent();
+ let c = O_();
+ b_(c, n, t.layoutBox);
+ let l = O_();
+ b_(l, a ? e.applyTransform(r, !0) : n, s);
+ let u = !M_(c), d = !1, f = e.getClosestProjectingParent();
if ((!e.resumeFrom || f?.options.layoutRoot && e.resumeFrom.path.includes(f)) && f && !f.resumeFrom) {
let { snapshot: r, layout: i } = f;
if (r && i) {
- let s = e.options.layoutAnchor || void 0, c = C_();
- g_(c, a ? e.resumeFrom.applyTransform(t.layoutBox, !0, void 0, !0, f.depth + 1) : t.layoutBox, r.layoutBox, s);
- let l = C_();
- g_(l, n, i.layoutBox, s), a && o(c, l), k_(c, l) || (d = !0), f.options.layoutRoot && (e.relativeTarget = l, e.relativeTargetOrigin = c, e.relativeParent = f);
+ let s = e.options.layoutAnchor || void 0, c = A_();
+ C_(c, a ? e.resumeFrom.applyTransform(t.layoutBox, !0, void 0, !0, f.depth + 1) : t.layoutBox, r.layoutBox, s);
+ let l = A_();
+ C_(l, n, i.layoutBox, s), a && o(c, l), F_(c, l) || (d = !0), f.options.layoutRoot && (e.relativeTarget = l, e.relativeTargetOrigin = c, e.relativeParent = f);
}
}
e.notifyListeners("didUpdate", {
@@ -17766,65 +17800,65 @@ function Yee(e) {
} else e.isLead() && e.options.onExitComplete?.();
e.options.transition = void 0;
}
-function Xee(e) {
- n_.value && V_.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty ||= !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty), e.isTransformDirty ||= e.parent.isTransformDirty);
+function ate(e) {
+ l_.value && q_.nodes++, e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty ||= !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty), e.isTransformDirty ||= e.parent.isTransformDirty);
}
-function Zee(e) {
+function ote(e) {
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
}
-function Qee(e) {
+function ste(e) {
e.clearSnapshot();
}
-function q_(e) {
+function $_(e) {
e.clearMeasurements();
}
-function $ee(e) {
+function cte(e) {
e.isLayoutDirty = !0, e.updateLayout();
}
-function J_(e) {
+function ev(e) {
e.isLayoutDirty = !1;
}
-function ete(e) {
+function lte(e) {
let { snapshot: t, dragAncestor: n } = e, r = n?.isAnimationBlocked && n.layout;
if (!t || !r || e.resumeFrom || e.isAnimationBlocked) return;
let i = n.dragSnapshot;
- L_((e) => Jg(t.layoutBox[e], r.layoutBox[e].min - i.layoutBox[e].min));
+ U_((e) => t_(t.layoutBox[e], r.layoutBox[e].min - i.layoutBox[e].min));
}
-function tte(e) {
+function ute(e) {
e.isAnimationBlocked && e.layout && !e.isLayoutDirty && (e.snapshot = e.dragSnapshot || e.layout, e.isLayoutDirty = !0);
}
-function nte(e) {
+function dte(e) {
e.relativeTarget && e.relativeParent?.isLayoutDirty && (e.currentAnimation ? e.isLayoutDirty = !0 : (e.targetDelta = void 0, e.removeRelativeTarget()));
}
-function rte(e) {
+function fte(e) {
let { visualElement: t } = e.options;
t?.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
}
-function Y_(e) {
+function tv(e) {
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
}
-function ite(e) {
+function pte(e) {
e.resolveTargetDelta();
}
-function ate(e) {
+function mte(e) {
e.calcProjection();
}
-function ote(e) {
+function hte(e) {
e.resetSkewAndRotation();
}
-function X_(e, t, n) {
- e.translate = lf(t.translate, 0, n), e.scale = lf(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
+function nv(e, t, n) {
+ e.translate = wf(t.translate, 0, n), e.scale = wf(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
}
-function Z_(e, t, n, r) {
- e.min = lf(t.min, n.min, r), e.max = lf(t.max, n.max, r);
+function rv(e, t, n, r) {
+ e.min = wf(t.min, n.min, r), e.max = wf(t.max, n.max, r);
}
-function ste(e, t, n, r) {
- Z_(e.x, t.x, n.x, r), Z_(e.y, t.y, n.y, r);
+function gte(e, t, n, r) {
+ rv(e.x, t.x, n.x, r), rv(e.y, t.y, n.y, r);
}
-function cte(e) {
+function _te(e) {
return e.animationValues?.opacityExit !== void 0;
}
-var lte = {
+var vte = {
duration: .45,
ease: [
.4,
@@ -17832,61 +17866,61 @@ var lte = {
.1,
1
]
-}, Q_ = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), $_ = Q_("applewebkit/") && !Q_("chrome/") ? Math.round : Nu;
-function ev(e) {
- e.min = $_(e.min), e.max = $_(e.max);
+}, iv = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), av = iv("applewebkit/") && !iv("chrome/") ? Math.round : qu;
+function ov(e) {
+ e.min = av(e.min), e.max = av(e.max);
}
-function ute(e) {
- ev(e.x), ev(e.y);
+function yte(e) {
+ ov(e.x), ov(e.y);
}
-function tv(e, t, n) {
- e.max = d_(n) + (e.min = t.min);
+function sv(e, t, n) {
+ e.max = v_(n) + (e.min = t.min);
}
-function nv(e, t, n) {
- return e === "position" || e === "preserve-aspect" && !Vee(A_(t), A_(n), .2);
+function cv(e, t, n) {
+ return e === "position" || e === "preserve-aspect" && !Yee(I_(t), I_(n), .2);
}
-function dte(e) {
+function bte(e) {
return e !== e.root && e.scroll?.wasRoot;
}
// node_modules/motion-dom/dist/es/events/add-dom-event.mjs
-function rv(e, t, n, r = { passive: !0 }) {
+function lv(e, t, n, r = { passive: !0 }) {
return e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r);
}
// node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs
-var fte = /* @__PURE__ */ K_({
- attachResizeListener: (e, t) => rv(e, "resize", t),
+var xte = /* @__PURE__ */ Q_({
+ attachResizeListener: (e, t) => lv(e, "resize", t),
measureScroll: () => ({
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
}),
checkIsScrollRoot: () => !0
-}), iv = { current: void 0 }, av = /* @__PURE__ */ K_({
+}), uv = { current: void 0 }, dv = /* @__PURE__ */ Q_({
measureScroll: (e) => ({
x: e.scrollLeft,
y: e.scrollTop
}),
defaultParent: () => {
- if (!iv.current) {
- let e = new fte({});
- e.mount(window), e.setOptions({ layoutScroll: !0 }), iv.current = e;
+ if (!uv.current) {
+ let e = new xte({});
+ e.mount(window), e.setOptions({ layoutScroll: !0 }), uv.current = e;
}
- return iv.current;
+ return uv.current;
},
resetTransform: (e, t) => {
e.style.transform = t === void 0 ? "none" : t;
},
checkIsScrollRoot: (e) => window.getComputedStyle(e).position === "fixed"
-}), ov = /* @__PURE__ */ new WeakMap();
+}), fv = /* @__PURE__ */ new WeakMap();
// node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs
-function sv(e) {
+function pv(e) {
return typeof e == "object" && !!e && typeof e.start == "function";
}
// node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs
-function cv(e) {
+function mv(e) {
return typeof e == "string" || Array.isArray(e);
}
// node_modules/motion-dom/dist/es/render/utils/variant-props.mjs
-var lv = [
+var hv = [
"animate",
"whileInView",
"whileFocus",
@@ -17894,29 +17928,29 @@ var lv = [
"whileTap",
"whileDrag",
"exit"
-], uv = /* @__PURE__ */ ["initial"].concat(lv);
+], gv = /* @__PURE__ */ ["initial"].concat(hv);
// node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs
-function dv(e) {
- if (sv(e.animate)) return !0;
- for (let t = 0; t < uv.length; t++) if (cv(e[uv[t]])) return !0;
+function _v(e) {
+ if (pv(e.animate)) return !0;
+ for (let t = 0; t < gv.length; t++) if (mv(e[gv[t]])) return !0;
return !1;
}
-function fv(e) {
- return !!(dv(e) || e.variants);
+function vv(e) {
+ return !!(_v(e) || e.variants);
}
// node_modules/motion-dom/dist/es/render/utils/motion-values.mjs
-function pte(e, t, n) {
+function Ste(e, t, n) {
for (let r in t) {
let i = t[r], a = n[r];
- if (eg(i)) e.addValue(r, i);
- else if (eg(a)) e.addValue(r, jh(i, { owner: e }));
+ if (lg(i)) e.addValue(r, i);
+ else if (lg(a)) e.addValue(r, Kh(i, { owner: e }));
else if (a !== i) {
if (e.hasValue(r)) {
let t = e.getValue(r);
t.liveStyle === !0 ? t.jump(i) : t.hasAnimated || t.set(i);
} else {
let t = e.getStaticValue(r);
- e.addValue(r, jh(t === void 0 ? i : t, { owner: e }));
+ e.addValue(r, Kh(t === void 0 ? i : t, { owner: e }));
}
}
}
@@ -17924,17 +17958,17 @@ function pte(e, t, n) {
return t;
}
// node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs
-var pv = { current: null }, mv = { current: !1 }, mte = typeof window < "u";
-function hv() {
- if (mv.current = !0, mte) {
+var yv = { current: null }, bv = { current: !1 }, Cte = typeof window < "u";
+function xv() {
+ if (bv.current = !0, Cte) {
if (window.matchMedia) {
- let e = window.matchMedia("(prefers-reduced-motion)"), t = () => pv.current = e.matches;
+ let e = window.matchMedia("(prefers-reduced-motion)"), t = () => yv.current = e.matches;
e.addEventListener("change", t), t();
- } else pv.current = !1;
+ } else yv.current = !1;
}
}
// node_modules/motion-dom/dist/es/render/VisualElement.mjs
-var gv = [
+var Sv = [
"AnimationStart",
"AnimationComplete",
"Update",
@@ -17942,35 +17976,35 @@ var gv = [
"LayoutMeasure",
"LayoutAnimationStart",
"LayoutAnimationComplete"
-], _v = {};
-function vv(e) {
- _v = e;
+], Cv = {};
+function wv(e) {
+ Cv = e;
}
-function hte() {
- return _v;
+function wte() {
+ return Cv;
}
-var gte = class {
+var Tte = class {
scrapeMotionValuesFromProps(e, t, n) {
return {};
}
constructor({ parent: e, props: t, presenceContext: n, reducedMotionConfig: r, skipAnimations: i, blockInitialAnimation: a, visualState: o }, s = {}) {
- this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Sm, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Lm, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
- let e = ud.now();
- this.renderScheduledAt < e && (this.renderScheduledAt = e, Af.render(this.render, !1, !0));
+ let e = wd.now();
+ this.renderScheduledAt < e && (this.renderScheduledAt = e, Gf.render(this.render, !1, !0));
};
let { latestValues: c, renderState: l } = o;
- this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = t.initial ? { ...c } : {}, this.renderState = l, this.parent = e, this.props = t, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = s, this.blockInitialAnimation = !!a, this.isControllingVariants = dv(t), this.isVariantNode = fv(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = t.initial ? { ...c } : {}, this.renderState = l, this.parent = e, this.props = t, this.presenceContext = n, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = i, this.options = s, this.blockInitialAnimation = !!a, this.isControllingVariants = _v(t), this.isVariantNode = vv(t), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
let { willChange: u, ...d } = this.scrapeMotionValuesFromProps(t, {}, this);
for (let e in d) {
let t = d[e];
- c[e] !== void 0 && eg(t) && t.set(c[e]);
+ c[e] !== void 0 && lg(t) && t.set(c[e]);
}
}
mount(e) {
if (this.hasBeenMounted) for (let e in this.initialValues) this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
- if (this.current = e, ov.set(e, this), this.projection?.instance || this.projection?.mount(e), this.isVariantNode && !this.isControllingVariants) {
+ if (this.current = e, fv.set(e, this), this.projection?.instance || this.projection?.mount(e), this.isVariantNode && !this.isControllingVariants) {
let e = this;
do
e = e.props.inherit !== !1 && e.parent;
@@ -17980,10 +18014,10 @@ var gte = class {
t.add(this), this.removeFromVariantTree = () => t.delete(this);
}
}
- this.values.forEach((e, t) => this.bindToMotionValue(t, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (mv.current || hv(), this.shouldReduceMotion = pv.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
+ this.values.forEach((e, t) => this.bindToMotionValue(t, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (bv.current || xv(), this.shouldReduceMotion = yv.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
}
unmount() {
- this.projection?.unmount(), jf(this.notifyUpdate), jf(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree?.(), this.parent?.removeChild(this);
+ this.projection?.unmount(), Kf(this.notifyUpdate), Kf(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree?.(), this.parent?.removeChild(this);
for (let e in this.events) this.events[e].clear();
for (let e in this.features) {
let t = this.features[e];
@@ -17998,24 +18032,24 @@ var gte = class {
this.children.delete(e), this.enteringChildren?.delete(e);
}
bindToMotionValue(e, t) {
- if (this.valueSubscriptions.get(e)?.(), t.accelerate && Wm.has(e) && this.current instanceof HTMLElement) {
- let { factory: n, keyframes: r, times: i, ease: a, duration: o } = t.accelerate, s = new Fm({
+ if (this.valueSubscriptions.get(e)?.(), t.accelerate && ah.has(e) && this.current instanceof HTMLElement) {
+ let { factory: n, keyframes: r, times: i, ease: a, duration: o } = t.accelerate, s = new Xm({
element: this.current,
name: e,
keyframes: r,
times: i,
ease: a,
- duration: /* @__PURE__ */ Lu(o)
+ duration: /* @__PURE__ */ Zu(o)
}), c = n(s);
this.valueSubscriptions.set(e, () => {
c(), s.cancel();
});
return;
}
- let n = im.has(e);
+ let n = ym.has(e);
n && this.onBindTransform && this.onBindTransform();
let r = t.on("change", (t) => {
- this.latestValues[e] = t, this.props.onUpdate && Af.preRender(this.notifyUpdate), n && (this.projection && (this.projection.isTransformDirty = !0), rh.get(this.current)?.check()), this.scheduleRender();
+ this.latestValues[e] = t, this.props.onUpdate && Gf.preRender(this.notifyUpdate), n && (this.projection && (this.projection.isTransformDirty = !0), vh.get(this.current)?.check()), this.scheduleRender();
}), i;
typeof window < "u" && window.MotionCheckAppearSync && (i = window.MotionCheckAppearSync(this, e, t)), this.valueSubscriptions.set(e, () => {
r(), i?.();
@@ -18026,8 +18060,8 @@ var gte = class {
}
updateFeatures() {
let e = "animation";
- for (e in _v) {
- let t = _v[e];
+ for (e in Cv) {
+ let t = Cv[e];
if (!t) continue;
let { isEnabled: n, Feature: r } = t;
if (!this.features[e] && r && n(this.props) && (this.features[e] = new r(this)), this.features[e]) {
@@ -18040,7 +18074,7 @@ var gte = class {
this.build(this.renderState, this.latestValues, this.props);
}
measureViewportBox() {
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : C_();
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : A_();
}
getStaticValue(e) {
return this.latestValues[e];
@@ -18050,14 +18084,14 @@ var gte = class {
}
update(e, t) {
let { transformTemplate: n, onUpdate: r } = this.props;
- (e.transformTemplate || n) && this.scheduleRender(), (e.transformTemplate && !n || e.onUpdate && !r) && rh.get(this.current)?.demote(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
- for (let t = 0; t < gv.length; t++) {
- let n = gv[t];
+ (e.transformTemplate || n) && this.scheduleRender(), (e.transformTemplate && !n || e.onUpdate && !r) && vh.get(this.current)?.demote(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = t;
+ for (let t = 0; t < Sv.length; t++) {
+ let n = Sv[t];
this.propEventSubscriptions[n]?.(), delete this.propEventSubscriptions[n];
let r = e["on" + n];
r && (this.propEventSubscriptions[n] = this.on(n, r));
}
- this.prevMotionValues = pte(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue?.();
+ this.prevMotionValues = Ste(this, this.scrapeMotionValuesFromProps(e, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue?.();
}
getProps() {
return this.props;
@@ -18087,27 +18121,27 @@ var gte = class {
}
getValue(e, t) {
let n = this.props.values?.[e];
- return n || (n = this.values.get(e), n === void 0 && t !== void 0 && (n = jh(t ?? this.getDefaultValue?.(e), { owner: this }), this.addValue(e, n)), n);
+ return n || (n = this.values.get(e), n === void 0 && t !== void 0 && (n = Kh(t ?? this.getDefaultValue?.(e), { owner: this }), this.addValue(e, n)), n);
}
readValue(e, t) {
let n = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
- return n != null && (typeof n == "string" && (ku(n) || ju(n)) ? n = parseFloat(n) : typeof n != "number" && !af.test(n) && af.test(t) && (n = Wp(e, t)), this.setBaseTarget(e, eg(n) ? n.get() : n)), eg(n) ? n.get() : n;
+ return n != null && (typeof n == "string" && (Uu(n) || Gu(n)) ? n = parseFloat(n) : typeof n != "number" && !bf.test(n) && bf.test(t) && (n = am(e, t)), this.setBaseTarget(e, lg(n) ? n.get() : n)), lg(n) ? n.get() : n;
}
setBaseTarget(e, t) {
this.baseTarget[e] = t;
}
on(e, t) {
- return (this.events[e] || (this.events[e] = new Iu())).add(t);
+ return (this.events[e] || (this.events[e] = new Xu())).add(t);
}
notify(e, ...t) {
this.events[e]?.notify(...t);
}
scheduleRenderMicrotask() {
- $g.render(this.render);
+ o_.render(this.render);
}
-}, yv = class extends gte {
+}, Tv = class extends Tte {
constructor() {
- super(...arguments), this.KeyframeResolver = ug;
+ super(...arguments), this.KeyframeResolver = _g;
}
sortInstanceNodePosition(e, t) {
return e.compareDocumentPosition(t) & 2 ? 1 : -1;
@@ -18122,105 +18156,105 @@ var gte = class {
handleChildMotionValue() {
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
let { children: e } = this.props;
- eg(e) && (this.childSubscription = e.on("change", (e) => {
+ lg(e) && (this.childSubscription = e.on("change", (e) => {
this.current && (this.current.textContent = `${e}`);
}));
}
};
// node_modules/motion-dom/dist/es/render/html/utils/render.mjs
-function bv(e, { style: t, vars: n }, r, i) {
+function Ev(e, { style: t, vars: n }, r, i) {
let a = e.style, o;
for (o in t) a[o] = t[o];
for (o in i?.applyProjectionStyles(a, r), n) a.setProperty(o, n[o]);
}
// node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs
-function xv(e, { layout: t, layoutId: n }) {
- return im.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!t_[e] || e === "opacity");
+function Dv(e, { layout: t, layoutId: n }) {
+ return ym.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!c_[e] || e === "opacity");
}
// node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs
-function Sv(e, t, n) {
+function Ov(e, t, n) {
let r = e.style, i = t?.style, a = {};
if (!r) return a;
- for (let t in r) (eg(r[t]) || i && eg(i[t]) || xv(t, e) || n?.getValue(t)?.liveStyle !== void 0) && (a[t] = r[t]);
+ for (let t in r) (lg(r[t]) || i && lg(i[t]) || Dv(t, e) || n?.getValue(t)?.liveStyle !== void 0) && (a[t] = r[t]);
return a;
}
// node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs
-function _te(e) {
+function Ete(e) {
return window.getComputedStyle(e);
}
-var vte = class extends yv {
+var Dte = class extends Tv {
constructor() {
- super(...arguments), this.type = "html", this.renderInstance = bv;
+ super(...arguments), this.type = "html", this.renderInstance = Ev;
}
mount(e) {
super.mount(e);
}
readValueFromInstance(e, t) {
- if (im.has(t)) return this.projection?.isProjecting ? em(t) : nm(e, t);
+ if (ym.has(t)) return this.projection?.isProjecting ? hm(t) : _m(e, t);
{
- let n = _te(e), r = (pd(t) ? n.getPropertyValue(t) : n[t]) || 0;
+ let n = Ete(e), r = (Dd(t) ? n.getPropertyValue(t) : n[t]) || 0;
return typeof r == "string" ? r.trim() : r;
}
}
measureInstanceViewportBox(e, { transformPagePoint: t }) {
- return Qg(e, t);
+ return a_(e, t);
}
build(e, t, n) {
- kg(e, t, n.transformTemplate);
+ Ig(e, t, n.transformTemplate);
}
scrapeMotionValuesFromProps(e, t, n) {
- return Sv(e, t, n);
+ return Ov(e, t, n);
}
-}, Cv = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1;
+}, kv = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1;
// node_modules/motion-dom/dist/es/events/event-info.mjs
-function wv(e) {
+function Av(e) {
return { point: {
x: e.pageX,
y: e.pageY
} };
}
-var yte = (e) => (t) => Cv(t) && e(t, wv(t));
+var Ote = (e) => (t) => kv(t) && e(t, Av(t));
// node_modules/motion-dom/dist/es/events/add-pointer-event.mjs
-function Tv(e, t, n, r) {
- return rv(e, t, yte(n), r);
+function jv(e, t, n, r) {
+ return lv(e, t, Ote(n), r);
}
// node_modules/motion-dom/dist/es/resize/handle-element.mjs
-var Ev = /* @__PURE__ */ new WeakMap(), Dv, Ov = (e, t, n) => (r, i) => i && i[0] ? i[0][e + "Size"] : vg(r) && "getBBox" in r ? r.getBBox()[t] : r[n], bte = /*@__PURE__*/ Ov("inline", "width", "offsetWidth"), xte = /*@__PURE__*/ Ov("block", "height", "offsetHeight");
-function Ste({ target: e, borderBoxSize: t }) {
- Ev.get(e)?.forEach((n) => {
+var Mv = /* @__PURE__ */ new WeakMap(), Nv, Pv = (e, t, n) => (r, i) => i && i[0] ? i[0][e + "Size"] : Tg(r) && "getBBox" in r ? r.getBBox()[t] : r[n], kte = /*@__PURE__*/ Pv("inline", "width", "offsetWidth"), Ate = /*@__PURE__*/ Pv("block", "height", "offsetHeight");
+function jte({ target: e, borderBoxSize: t }) {
+ Mv.get(e)?.forEach((n) => {
n(e, {
get width() {
- return bte(e, t);
+ return kte(e, t);
},
get height() {
- return xte(e, t);
+ return Ate(e, t);
}
});
});
}
-function Cte(e) {
- e.forEach(Ste);
+function Mte(e) {
+ e.forEach(jte);
}
-function wte() {
- typeof ResizeObserver < "u" && (Dv = new ResizeObserver(Cte));
+function Nte() {
+ typeof ResizeObserver < "u" && (Nv = new ResizeObserver(Mte));
}
-function Tte(e, t) {
- Dv || wte();
- let n = Sg(e);
+function Pte(e, t) {
+ Nv || Nte();
+ let n = kg(e);
return n.forEach((e) => {
- let n = Ev.get(e);
- n || (n = /* @__PURE__ */ new Set(), Ev.set(e, n)), n.add(t), Dv?.observe(e);
+ let n = Mv.get(e);
+ n || (n = /* @__PURE__ */ new Set(), Mv.set(e, n)), n.add(t), Nv?.observe(e);
}), () => {
n.forEach((e) => {
- let n = Ev.get(e);
- n?.delete(t), n?.size || Dv?.unobserve(e);
+ let n = Mv.get(e);
+ n?.delete(t), n?.size || Nv?.unobserve(e);
});
};
}
// node_modules/motion-dom/dist/es/resize/handle-window.mjs
-var kv = /* @__PURE__ */ new Set(), Av;
-function Ete() {
- Av = () => {
+var Fv = /* @__PURE__ */ new Set(), Iv;
+function Fte() {
+ Iv = () => {
let e = {
get width() {
return window.innerWidth;
@@ -18229,26 +18263,26 @@ function Ete() {
return window.innerHeight;
}
};
- kv.forEach((t) => t(e));
- }, window.addEventListener("resize", Av);
+ Fv.forEach((t) => t(e));
+ }, window.addEventListener("resize", Iv);
}
-function Dte(e) {
- return kv.add(e), Av || Ete(), () => {
- kv.delete(e), !kv.size && typeof Av == "function" && (window.removeEventListener("resize", Av), Av = void 0);
+function Ite(e) {
+ return Fv.add(e), Iv || Fte(), () => {
+ Fv.delete(e), !Fv.size && typeof Iv == "function" && (window.removeEventListener("resize", Iv), Iv = void 0);
};
}
// node_modules/motion-dom/dist/es/resize/index.mjs
-function jv(e, t) {
- return bg(typeof e == "function" ? Dte(e) : Tte(e, t));
+function Lv(e, t) {
+ return Dg(typeof e == "function" ? Ite(e) : Pte(e, t));
}
// node_modules/motion-dom/dist/es/utils/distance.mjs
-var Mv = (e, t) => Math.abs(e - t);
-function Ote(e, t) {
- let n = Mv(e.x, t.x), r = Mv(e.y, t.y);
+var Rv = (e, t) => Math.abs(e - t);
+function Lte(e, t) {
+ let n = Rv(e.x, t.x), r = Rv(e.y, t.y);
return Math.sqrt(n ** 2 + r ** 2);
}
// node_modules/motion-dom/dist/es/gestures/pan/PanSession.mjs
-var Nv = /*#__PURE__*/ new Set(["auto", "scroll"]), Pv = class {
+var zv = /*#__PURE__*/ new Set(["auto", "scroll"]), Bv = class {
constructor(e, t, { transformPagePoint: n, contextWindow: r = window, dragSnapToOrigin: i = !1, distanceThreshold: a = 3, element: o } = {}) {
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.onElementScroll = (e) => {
this.handleScroll(e.target);
@@ -18256,8 +18290,8 @@ var Nv = /*#__PURE__*/ new Set(["auto", "scroll"]), Pv = class {
this.handleScroll(window);
}, this.updatePoint = () => {
if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
- this.hasPendingMove = !1, this.lastRawMoveEventInfo && (this.lastMoveEventInfo = Iv(this.lastRawMoveEventInfo, this.transformPagePoint));
- let e = Rv(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = Ote(e.offset, {
+ this.hasPendingMove = !1, this.lastRawMoveEventInfo && (this.lastMoveEventInfo = Hv(this.lastRawMoveEventInfo, this.transformPagePoint));
+ let e = Wv(this.lastMoveEventInfo, this.history), t = this.startEvent !== null, n = Lte(e.offset, {
x: 0,
y: 0
}) >= this.distanceThreshold;
@@ -18265,99 +18299,99 @@ var Nv = /*#__PURE__*/ new Set(["auto", "scroll"]), Pv = class {
let { point: r } = e;
this.history.push({
...r,
- timestamp: ud.now()
+ timestamp: wd.now()
});
let { onStart: i, onMove: a } = this.handlers;
t || (i?.(this.lastMoveEvent, e), this.startEvent = this.lastMoveEvent), a?.(this.lastMoveEvent, e);
}, this.handlePointerMove = (e, t) => {
- this.handleScroll(window), this.lastMoveEvent = e, this.lastRawMoveEventInfo = t, this.lastMoveEventInfo = Iv(t, this.transformPagePoint), this.hasPendingMove = !0, Af.update(this.updatePoint, !0);
+ this.handleScroll(window), this.lastMoveEvent = e, this.lastRawMoveEventInfo = t, this.lastMoveEventInfo = Hv(t, this.transformPagePoint), this.hasPendingMove = !0, Gf.update(this.updatePoint, !0);
}, this.handlePointerUp = (e, t) => {
this.hasPendingMove && this.updatePoint(), this.end();
let { onEnd: n, onSessionEnd: r, resumeAnimation: i } = this.handlers;
if ((this.dragSnapToOrigin || !this.startEvent) && i?.(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
- let a = Rv(e.type === "pointercancel" ? this.lastMoveEventInfo : Iv(t, this.transformPagePoint), this.history);
+ let a = Wv(e.type === "pointercancel" ? this.lastMoveEventInfo : Hv(t, this.transformPagePoint), this.history);
this.startEvent && n?.(e, a), r?.(e, a);
- }, !Cv(e)) return;
+ }, !kv(e)) return;
this.dragSnapToOrigin = i, this.handlers = t, this.transformPagePoint = n, this.distanceThreshold = a, this.contextWindow = r || window;
- let s = Iv(wv(e), this.transformPagePoint), { point: c } = s;
+ let s = Hv(Av(e), this.transformPagePoint), { point: c } = s;
this.history = [{
...c,
- timestamp: ud.now()
+ timestamp: wd.now()
}];
let { onSessionStart: l } = t;
- l && l(e, Rv(s, this.history));
+ l && l(e, Wv(s, this.history));
let u = {
passive: !0,
capture: !0
};
- this.removeListeners = Pu(Tv(this.contextWindow, "pointermove", this.handlePointerMove, u), Tv(this.contextWindow, "pointerup", this.handlePointerUp, u), Tv(this.contextWindow, "pointercancel", this.handlePointerUp, u)), o && this.startScrollTracking(o);
+ this.removeListeners = Ju(jv(this.contextWindow, "pointermove", this.handlePointerMove, u), jv(this.contextWindow, "pointerup", this.handlePointerUp, u), jv(this.contextWindow, "pointercancel", this.handlePointerUp, u)), o && this.startScrollTracking(o);
}
startScrollTracking(e) {
let t = e.parentElement;
for (; t;) {
let e = getComputedStyle(t);
- (Nv.has(e.overflowX) || Nv.has(e.overflowY)) && this.scrollPositions.set(t, Fv(t)), t = t.parentElement;
+ (zv.has(e.overflowX) || zv.has(e.overflowY)) && this.scrollPositions.set(t, Vv(t)), t = t.parentElement;
}
- this.scrollPositions.set(window, Fv(window)), this.removeScrollListeners = Pu(rv(window, "scroll", this.onElementScroll, { capture: !0 }), rv(window, "scroll", this.onWindowScroll, {}));
+ this.scrollPositions.set(window, Vv(window)), this.removeScrollListeners = Ju(lv(window, "scroll", this.onElementScroll, { capture: !0 }), lv(window, "scroll", this.onWindowScroll, {}));
}
handleScroll(e) {
let t = this.scrollPositions.get(e);
if (!t) return;
- let n = e === window, r = Fv(e), i = {
+ let n = e === window, r = Vv(e), i = {
x: r.x - t.x,
y: r.y - t.y
};
- (i.x !== 0 || i.y !== 0) && (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), Af.update(this.updatePoint, !0));
+ (i.x !== 0 || i.y !== 0) && (n ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(e, r), Gf.update(this.updatePoint, !0));
}
updateHandlers(e) {
this.handlers = e;
}
end() {
- this.removeListeners?.(), this.removeScrollListeners?.(), this.scrollPositions.clear(), jf(this.updatePoint);
+ this.removeListeners?.(), this.removeScrollListeners?.(), this.scrollPositions.clear(), Kf(this.updatePoint);
}
-}, Fv = (e) => e === window ? {
+}, Vv = (e) => e === window ? {
x: window.scrollX,
y: window.scrollY
} : {
x: e.scrollLeft,
y: e.scrollTop
};
-function Iv(e, t) {
+function Hv(e, t) {
return t ? { point: t(e.point) } : e;
}
-function Lv(e, t) {
+function Uv(e, t) {
return {
x: e.x - t.x,
y: e.y - t.y
};
}
-function Rv({ point: e }, t) {
+function Wv({ point: e }, t) {
return {
point: e,
- delta: Lv(e, zv(t)),
- offset: Lv(e, kte(t)),
- velocity: Ate(t, .1)
+ delta: Uv(e, Gv(t)),
+ offset: Uv(e, Rte(t)),
+ velocity: zte(t, .1)
};
}
-function kte(e) {
+function Rte(e) {
return e[0];
}
-function zv(e) {
+function Gv(e) {
return e[e.length - 1];
}
-function Ate(e, t) {
+function zte(e, t) {
if (e.length < 2) return {
x: 0,
y: 0
};
- let n = e.length - 1, r = null, i = zv(e);
- for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ Lu(t)));) n--;
+ let n = e.length - 1, r = null, i = Gv(e);
+ for (; n >= 0 && (r = e[n], !(i.timestamp - r.timestamp > /* @__PURE__ */ Zu(t)));) n--;
if (!r) return {
x: 0,
y: 0
};
- r === e[0] && e.length > 2 && i.timestamp - r.timestamp > /* @__PURE__ */ Lu(t) * 2 && (r = e[1]);
- let a = /* @__PURE__ */ Ru(i.timestamp - r.timestamp);
+ r === e[0] && e.length > 2 && i.timestamp - r.timestamp > /* @__PURE__ */ Zu(t) * 2 && (r = e[1]);
+ let a = /* @__PURE__ */ Qu(i.timestamp - r.timestamp);
if (a === 0) return {
x: 0,
y: 0
@@ -18369,95 +18403,95 @@ function Ate(e, t) {
return o.x === Infinity && (o.x = 0), o.y === Infinity && (o.y = 0), o;
}
// node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs
-var jte = /* @__PURE__ */ new Set([
+var Bte = /* @__PURE__ */ new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A"
]);
-function Mte(e) {
- return jte.has(e.tagName) || e.isContentEditable === !0;
+function Vte(e) {
+ return Bte.has(e.tagName) || e.isContentEditable === !0;
}
-var Nte = /* @__PURE__ */ new Set([
+var Hte = /* @__PURE__ */ new Set([
"INPUT",
"SELECT",
"TEXTAREA"
]);
-function Pte(e) {
- return Nte.has(e.tagName) || e.isContentEditable === !0;
+function Ute(e) {
+ return Hte.has(e.tagName) || e.isContentEditable === !0;
}
// node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs
-var Bv = {
+var Kv = {
x: !1,
y: !1
};
-function Vv() {
- return Bv.x || Bv.y;
+function qv() {
+ return Kv.x || Kv.y;
}
// node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
-function Fte(e) {
- return e === "x" || e === "y" ? Bv[e] ? null : (Bv[e] = !0, () => {
- Bv[e] = !1;
- }) : Bv.x || Bv.y ? null : (Bv.x = Bv.y = !0, () => {
- Bv.x = Bv.y = !1;
+function Wte(e) {
+ return e === "x" || e === "y" ? Kv[e] ? null : (Kv[e] = !0, () => {
+ Kv[e] = !1;
+ }) : Kv.x || Kv.y ? null : (Kv.x = Kv.y = !0, () => {
+ Kv.x = Kv.y = !1;
});
}
// node_modules/motion-dom/dist/es/gestures/drag/utils/constraints.mjs
-function Ite(e, { min: t, max: n }, r) {
- return t !== void 0 && e < t ? e = r ? lf(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? lf(n, e, r.max) : Math.min(e, n)), e;
+function Gte(e, { min: t, max: n }, r) {
+ return t !== void 0 && e < t ? e = r ? wf(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? wf(n, e, r.max) : Math.min(e, n)), e;
}
-function Hv(e, t, n) {
+function Jv(e, t, n) {
return {
min: t === void 0 ? void 0 : e.min + t,
max: n === void 0 ? void 0 : e.max + n - (e.max - e.min)
};
}
-function Uv(e, { top: t, left: n, bottom: r, right: i }) {
+function Yv(e, { top: t, left: n, bottom: r, right: i }) {
return {
- x: Hv(e.x, n, i),
- y: Hv(e.y, t, r)
+ x: Jv(e.x, n, i),
+ y: Jv(e.y, t, r)
};
}
-function Wv(e, t) {
+function Xv(e, t) {
let n = t.min - e.min, r = t.max - e.max;
return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), {
min: n,
max: r
};
}
-function Lte(e, t) {
+function Kte(e, t) {
return {
- x: Wv(e.x, t.x),
- y: Wv(e.y, t.y)
+ x: Xv(e.x, t.x),
+ y: Xv(e.y, t.y)
};
}
-function Rte(e, t) {
- let n = .5, r = d_(e), i = d_(t);
- return i > r ? n = /* @__PURE__ */ Fu(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ Fu(e.min, e.max - i, t.min)), Du(0, 1, n);
+function qte(e, t) {
+ let n = .5, r = v_(e), i = v_(t);
+ return i > r ? n = /* @__PURE__ */ Yu(t.min, t.max - r, e.min) : r > i && (n = /* @__PURE__ */ Yu(e.min, e.max - i, t.min)), Vu(0, 1, n);
}
-function zte(e, t) {
+function Jte(e, t) {
let n = {};
return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
}
-var Gv = .35;
-function Bte(e = Gv) {
- return e === !1 ? e = 0 : e === !0 && (e = Gv), {
- x: Kv(e, "left", "right"),
- y: Kv(e, "top", "bottom")
+var Zv = .35;
+function Yte(e = Zv) {
+ return e === !1 ? e = 0 : e === !0 && (e = Zv), {
+ x: Qv(e, "left", "right"),
+ y: Qv(e, "top", "bottom")
};
}
-function Kv(e, t, n) {
+function Qv(e, t, n) {
return {
- min: qv(e, t),
- max: qv(e, n)
+ min: $v(e, t),
+ max: $v(e, n)
};
}
-function qv(e, t) {
+function $v(e, t) {
return typeof e == "number" ? e : e[t] || 0;
}
// node_modules/motion-dom/dist/es/gestures/drag/VisualElementDragControls.mjs
-function Jv(e) {
+function ey(e) {
let t = "";
for (let n of e.path) {
n.scroll = void 0, n.updateScroll();
@@ -18466,12 +18500,12 @@ function Jv(e) {
}
return t;
}
-var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
+var Xte = /* @__PURE__ */ new WeakMap(), Zte = class {
constructor(e, t = () => e.getProps()) {
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
x: 0,
y: 0
- }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = C_(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e, this.readProps = t;
+ }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = A_(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e, this.readProps = t;
}
start(e, { snapToCursor: t = !1, distanceThreshold: n } = {}) {
if (this.visualElement.presenceContext?.isPresent === !1) return;
@@ -18479,28 +18513,28 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
t && this.snapToCursor(e), this.stopAnimation();
}, i = (e, t) => {
let { drag: n, dragPropagation: r, onDragStart: i } = this.getProps();
- if (n && !r && (this.openDragLock?.(), this.openDragLock = Fte(n), !this.openDragLock)) return;
+ if (n && !r && (this.openDragLock?.(), this.openDragLock = Wte(n), !this.openDragLock)) return;
this.latestPointerEvent = e, this.latestPanInfo = t, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints();
let { projection: a } = this.visualElement;
- a && (a.isAnimationBlocked = !0, a.target = void 0), L_((e) => {
+ a && (a.isAnimationBlocked = !0, a.target = void 0), U_((e) => {
let t = this.getAxisMotionValue(e).get() || 0;
- if (hd(t) && (t = Wh(t, this.visualElement.current) || 0), W.test(t)) t = parseFloat(t);
- else if (Pd.test(t)) {
+ if (kd(t) && (t = ig(t, this.visualElement.current) || 0), Yd.test(t)) t = parseFloat(t);
+ else if (Jd.test(t)) {
let n = a?.layout?.layoutBox[e];
- n && (t = d_(n) * (parseFloat(t) / 100));
+ n && (t = v_(n) * (parseFloat(t) / 100));
}
this.originPoint[e] = t;
- }), i && Af.update(() => i(e, t), !1, !0), ng(this.visualElement, "transform"), this.visualElement.animationState?.setActive("whileDrag", !0);
+ }), i && Gf.update(() => i(e, t), !1, !0), ug(this.visualElement, "transform"), this.visualElement.animationState?.setActive("whileDrag", !0);
}, a = (e, t) => {
this.latestPointerEvent = e, this.latestPanInfo = t;
let { dragPropagation: n, dragDirectionLock: r, onDirectionLock: i, onDrag: a } = this.getProps();
if (!n && !this.openDragLock) return;
let { offset: o } = t;
if (r && this.currentDirection === null) {
- if (this.currentDirection = Wte(o), this.currentDirection === null) return;
+ if (this.currentDirection = $te(o), this.currentDirection === null) return;
i && i(this.currentDirection);
}
- this.updateAxis("x", o), this.updateAxis("y", o), this.visualElement.render(), a && Af.update(() => a(e, t), !1, !0);
+ this.updateAxis("x", o), this.updateAxis("y", o), this.visualElement.render(), a && Gf.update(() => a(e, t), !1, !0);
}, o = (e, t) => {
this.latestPointerEvent = e, this.latestPanInfo = t, this.stop(e, t), this.latestPointerEvent = null, this.latestPanInfo = null;
}, s = () => {
@@ -18510,7 +18544,7 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
y: 0
});
}, { dragSnapToOrigin: c } = this.getProps();
- this.panSession = new Pv(e, {
+ this.panSession = new Bv(e, {
onSessionStart: r,
onStart: i,
onMove: a,
@@ -18530,7 +18564,7 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
let { velocity: o } = i;
this.startAnimation(o, n);
let { onDragEnd: s } = this.getProps();
- s && Af.postRender(() => s(r, i));
+ s && Gf.postRender(() => s(r, i));
}
cancel() {
this.isDragging = !1;
@@ -18542,32 +18576,32 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
}
updateAxis(e, t) {
let { drag: n } = this.readProps();
- if (!t || !Qv(e, n, this.currentDirection)) return;
+ if (!t || !iy(e, n, this.currentDirection)) return;
let r = this.getAxisMotionValue(e), i = this.originPoint[e] + t[e], a = this.constraints && this.constraints[e];
- a && (i = Ite(i, a, this.elastic[e])), r.set(i);
+ a && (i = Gte(i, a, this.elastic[e])), r.set(i);
}
resolveConstraints() {
let { dragConstraints: e, dragElastic: t } = this.getProps(), { projection: n } = this.visualElement, r = n && (n.layout || n.measure(!1)), i = this.constraints;
- Yv(e) ? this.constraints && this.scroll === Jv(n) || (this.constraints = this.resolveRefConstraints()) : this.constraints = e && r ? Uv(r.layoutBox, e) : !1, this.elastic = Bte(t), i !== this.constraints && !Yv(e) && r && this.constraints && !this.hasMutatedConstraints && L_((e) => {
- this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = zte(r.layoutBox[e], this.constraints[e]));
+ ty(e) ? this.constraints && this.scroll === ey(n) || (this.constraints = this.resolveRefConstraints()) : this.constraints = e && r ? Yv(r.layoutBox, e) : !1, this.elastic = Yte(t), i !== this.constraints && !ty(e) && r && this.constraints && !this.hasMutatedConstraints && U_((e) => {
+ this.constraints !== !1 && this.getAxisMotionValue(e) && (this.constraints[e] = Jte(r.layoutBox[e], this.constraints[e]));
});
}
resolveRefConstraints() {
let { dragConstraints: e, onMeasureDragConstraints: t } = this.getProps();
- if (!Yv(e)) return !1;
- let n = Xv(e), { projection: r } = this.visualElement;
+ if (!ty(e)) return !1;
+ let n = ny(e), { projection: r } = this.visualElement;
if (!r || !r.layout) return !1;
- this.scroll = Jv(r);
- let i = wee(n, r.root, this.visualElement.getTransformPagePoint()), a = Lte(r.layout.layoutBox, r.removeElementScroll(i));
+ this.scroll = ey(r);
+ let i = Mee(n, r.root, this.visualElement.getTransformPagePoint()), a = Kte(r.layout.layoutBox, r.removeElementScroll(i));
if (t) {
- let e = t(xee(a));
- this.hasMutatedConstraints = !!e, e && (a = Pg(e));
+ let e = t(kee(a));
+ this.hasMutatedConstraints = !!e, e && (a = Vg(e));
}
return a;
}
startAnimation(e, t) {
- let { drag: n, dragMomentum: r, dragElastic: i, dragTransition: a, dragSnapToOrigin: o, onDragTransitionEnd: s } = this.getProps(), c = this.constraints || {}, l = L_((s) => {
- if (!Qv(s, t || n, this.currentDirection)) return;
+ let { drag: n, dragMomentum: r, dragElastic: i, dragTransition: a, dragSnapToOrigin: o, onDragTransitionEnd: s } = this.getProps(), c = this.constraints || {}, l = U_((s) => {
+ if (!iy(s, t || n, this.currentDirection)) return;
let l = c[s] || {};
(o === !0 || o === s) && (l = {
min: 0,
@@ -18590,10 +18624,10 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
}
startAxisValueAnimation(e, t) {
let n = this.getAxisMotionValue(e);
- return ng(this.visualElement, e), n.start(Vh(e, n, 0, t, this.visualElement, !1));
+ return ug(this.visualElement, e), n.start(ng(e, n, 0, t, this.visualElement, !1));
}
stopAnimation() {
- L_((e) => this.getAxisMotionValue(e).stop());
+ U_((e) => this.getAxisMotionValue(e).stop());
}
getAxisMotionValue(e) {
let t = `_drag${e.toUpperCase()}`;
@@ -18604,50 +18638,50 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
x: e,
y: t
}, i = this.visualElement.getTransformPagePoint()?.(r) || r, a = this.visualElement.measureViewportBox();
- L_((e) => {
- if (!Qv(e, n, this.currentDirection)) return;
+ U_((e) => {
+ if (!iy(e, n, this.currentDirection)) return;
let t = this.getAxisMotionValue(e), { min: r, max: o } = a[e];
- t.set((t.get() || 0) + i[e] - lf(r, o, .5));
+ t.set((t.get() || 0) + i[e] - wf(r, o, .5));
});
}
scalePositionWithinConstraints() {
if (!this.visualElement.current) return;
let { drag: e, dragConstraints: t } = this.getProps(), { projection: n } = this.visualElement;
- if (!Yv(t) || !n || !this.constraints) return;
+ if (!ty(t) || !n || !this.constraints) return;
this.stopAnimation();
let r = this.constraints, i = {
x: 0,
y: 0
};
- L_((e) => {
+ U_((e) => {
let t = this.getAxisMotionValue(e).get();
- i[e] = Rte({
+ i[e] = qte({
min: t,
max: t
}, r[e]);
});
let { transformTemplate: a } = this.visualElement.getProps();
- this.visualElement.current.style.transform = a ? a({}, "") : "none", n.root?.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), L_((t) => {
+ this.visualElement.current.style.transform = a ? a({}, "") : "none", n.root?.updateScroll(), n.updateLayout(), this.constraints = !1, this.resolveConstraints(), U_((t) => {
let n = this.getAxisMotionValue(t);
- if (!Qv(t, e, null) || !n.get()) return;
+ if (!iy(t, e, null) || !n.get()) return;
let { min: r, max: a } = this.constraints[t];
- n.set(lf(r, a, i[t]));
+ n.set(wf(r, a, i[t]));
}), this.visualElement.render();
}
addListeners() {
if (!this.visualElement.current) return;
- Vte.set(this.visualElement, this);
- let e = this.visualElement.current, t = Tv(e, "pointerdown", (t) => {
- let { drag: n, dragListener: r = !0 } = this.getProps(), i = t.target, a = i !== e && Pte(i);
+ Xte.set(this.visualElement, this);
+ let e = this.visualElement.current, t = jv(e, "pointerdown", (t) => {
+ let { drag: n, dragListener: r = !0 } = this.getProps(), i = t.target, a = i !== e && Ute(i);
n && r && !a && this.start(t);
}), n, r = () => {
- let { dragConstraints: t } = this.getProps(), r = Yv(t) && Xv(t);
- r && (this.constraints = this.resolveRefConstraints(), n ||= Ute(e, r, () => this.scalePositionWithinConstraints()));
+ let { dragConstraints: t } = this.getProps(), r = ty(t) && ny(t);
+ r && (this.constraints = this.resolveRefConstraints(), n ||= Qte(e, r, () => this.scalePositionWithinConstraints()));
}, { projection: i } = this.visualElement, a = i.addEventListener("measure", r);
- i.layout || (i.root?.updateScroll(), i.updateLayout()), Af.read(r);
- let o = rv(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", (({ delta: e, hasLayoutChanged: t }) => {
- this.isDragging && t && (L_((t) => {
- if (!Qv(t, this.getProps().drag, this.currentDirection)) return;
+ i.layout || (i.root?.updateScroll(), i.updateLayout()), Gf.read(r);
+ let o = lv(window, "resize", () => this.scalePositionWithinConstraints()), s = i.addEventListener("didUpdate", (({ delta: e, hasLayoutChanged: t }) => {
+ this.isDragging && t && (U_((t) => {
+ if (!iy(t, this.getProps().drag, this.currentDirection)) return;
let n = this.getAxisMotionValue(t);
this.originPoint[t] += e[t].translate, n.set(n.get() + e[t].translate);
}), this.visualElement.render());
@@ -18657,7 +18691,7 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
};
}
getProps() {
- let e = this.readProps(), { dragElastic: t = Gv, dragMomentum: n = !0 } = e;
+ let e = this.readProps(), { dragElastic: t = Zv, dragMomentum: n = !0 } = e;
return {
...e,
dragElastic: t,
@@ -18665,32 +18699,32 @@ var Vte = /* @__PURE__ */ new WeakMap(), Hte = class {
};
}
};
-function Yv(e) {
+function ty(e) {
return !!e && typeof e == "object" && ("current" in e || "nodeType" in e);
}
-var Xv = (e) => "current" in e ? e.current : e;
-function Zv(e) {
+var ny = (e) => "current" in e ? e.current : e;
+function ry(e) {
let t = !0;
return () => {
t ? t = !1 : e();
};
}
-function Ute(e, t, n) {
- let r = jv(e, Zv(n)), i = jv(t, Zv(n));
+function Qte(e, t, n) {
+ let r = Lv(e, ry(n)), i = Lv(t, ry(n));
return () => {
r(), i();
};
}
-function Qv(e, t, n) {
+function iy(e, t, n) {
return (t === !0 || t === e) && (n === null || n === e);
}
-function Wte(e, t = 10) {
+function $te(e, t = 10) {
let n = null;
return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
}
// node_modules/motion-dom/dist/es/gestures/utils/setup.mjs
-function $v(e, t) {
- let n = Sg(e), r = new AbortController();
+function ay(e, t) {
+ let n = kg(e), r = new AbortController();
return [
n,
{
@@ -18698,16 +18732,16 @@ function $v(e, t) {
...t,
signal: r.signal
},
- bg(() => r.abort())
+ Dg(() => r.abort())
];
}
// node_modules/motion-dom/dist/es/gestures/hover.mjs
-function Gte(e) {
- return !(e.pointerType === "touch" || Vv());
+function ene(e) {
+ return !(e.pointerType === "touch" || qv());
}
-function Kte(e, t, n = {}) {
- t = xg(t);
- let [r, i, a] = $v(e, n);
+function tne(e, t, n = {}) {
+ t = Og(t);
+ let [r, i, a] = ay(e, n);
return r.forEach((e) => {
let n = !1, r = !1, a, o = () => {
e.removeEventListener("pointerleave", u);
@@ -18721,7 +18755,7 @@ function Kte(e, t, n = {}) {
e.pointerType !== "touch" && (n ? r = !0 : s(e));
};
e.addEventListener("pointerenter", (n) => {
- if (!Gte(n)) return;
+ if (!ene(n)) return;
r = !1;
let o = t(e, n);
typeof o == "function" && (a = o, e.addEventListener("pointerleave", u, i));
@@ -18729,71 +18763,71 @@ function Kte(e, t, n = {}) {
}), a;
}
// node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs
-var ey = (e, t) => t ? e === t || ey(e, t.parentElement) : !1, ty = /* @__PURE__ */ new WeakSet();
+var oy = (e, t) => t ? e === t || oy(e, t.parentElement) : !1, sy = /* @__PURE__ */ new WeakSet();
// node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs
-function ny(e) {
+function cy(e) {
return (t) => {
t.key === "Enter" && e(t);
};
}
-function ry(e, t) {
+function ly(e, t) {
e.dispatchEvent(new PointerEvent("pointer" + t, {
isPrimary: !0,
bubbles: !0
}));
}
-var iy = (e, t) => {
- let n = !1, r = ny(() => {
- ty.has(e) || (n = !0, ry(e, "down"));
- }), i = ny(() => {
- n && (n = !1, ry(e, "up"));
+var nne = (e, t) => {
+ let n = !1, r = cy(() => {
+ sy.has(e) || (n = !0, ly(e, "down"));
+ }), i = cy(() => {
+ n && (n = !1, ly(e, "up"));
});
e.addEventListener("keydown", r, t), e.addEventListener("keyup", i, t), e.addEventListener("blur", () => {
- e.removeEventListener("keydown", r), e.removeEventListener("keyup", i), n && ry(e, "cancel");
+ e.removeEventListener("keydown", r), e.removeEventListener("keyup", i), n && ly(e, "cancel");
}, {
...t,
once: !0
});
};
// node_modules/motion-dom/dist/es/gestures/press/index.mjs
-function ay(e) {
- return Cv(e) && !Vv();
+function uy(e) {
+ return kv(e) && !qv();
}
-var oy = /* @__PURE__ */ new WeakSet();
-function qte(e, t, n = {}) {
- t = xg(t);
- let [r, i, a] = $v(e, n), o = (e) => {
+var dy = /* @__PURE__ */ new WeakSet();
+function rne(e, t, n = {}) {
+ t = Og(t);
+ let [r, i, a] = ay(e, n), o = (e) => {
let r = e.currentTarget;
- if (!ay(e) || oy.has(e)) return;
- ty.add(r), n.stopPropagation && oy.add(e);
+ if (!uy(e) || dy.has(e)) return;
+ sy.add(r), n.stopPropagation && dy.add(e);
let a = t(r, e), o = {
...i,
capture: !0
}, s = (e, t) => {
- window.removeEventListener("pointerup", c, o), window.removeEventListener("pointercancel", l, o), ty.has(r) && ty.delete(r), ay(e) && typeof a == "function" && a(e, { success: t });
+ window.removeEventListener("pointerup", c, o), window.removeEventListener("pointercancel", l, o), sy.has(r) && sy.delete(r), uy(e) && typeof a == "function" && a(e, { success: t });
}, c = (e) => {
- s(e, r === window || r === document || n.useGlobalTarget || ey(r, e.target));
+ s(e, r === window || r === document || n.useGlobalTarget || oy(r, e.target));
}, l = (e) => {
s(e, !1);
};
window.addEventListener("pointerup", c, o), window.addEventListener("pointercancel", l, o);
};
return r.forEach((e) => {
- (n.useGlobalTarget ? window : e).addEventListener("pointerdown", o, i), _g(e) && (e.addEventListener("focus", () => iy(e, i), i), !Mte(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
+ (n.useGlobalTarget ? window : e).addEventListener("pointerdown", o, i), wg(e) && (e.addEventListener("focus", () => nne(e, i), i), !Vte(e) && !e.hasAttribute("tabindex") && (e.tabIndex = 0));
}), a;
}
// node_modules/motion-dom/dist/es/render/dom/style-computed.mjs
-function sy(e, t) {
+function fy(e, t) {
let n = window.getComputedStyle(e);
- return Cm(t) ? n.getPropertyValue(t) : n[t];
+ return Rm(t) ? n.getPropertyValue(t) : n[t];
}
// node_modules/motion-dom/dist/es/render/Feature.mjs
-var cy = class {
+var py = class {
constructor(e) {
this.isMounted = !1, this.node = e;
}
update() {}
-}, ly = /* @__PURE__ */ new Set([
+}, my = /* @__PURE__ */ new Set([
"baseFrequency",
"diffuseConstant",
"kernelMatrix",
@@ -18817,58 +18851,58 @@ var cy = class {
"startOffset",
"textLength",
"lengthAdjust"
-]), uy = (e) => typeof e == "string" && e.toLowerCase() === "svg";
+]), hy = (e) => typeof e == "string" && e.toLowerCase() === "svg";
// node_modules/motion-dom/dist/es/render/svg/utils/render.mjs
-function Jte(e, t, n, r) {
- bv(e, t, void 0, r);
- for (let n in t.attrs) e.setAttribute(ly.has(n) ? n : Og(n), t.attrs[n]);
+function ine(e, t, n, r) {
+ Ev(e, t, void 0, r);
+ for (let n in t.attrs) e.setAttribute(my.has(n) ? n : Fg(n), t.attrs[n]);
}
// node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs
-function dy(e, t, n) {
- let r = Sv(e, t, n);
- for (let n in e) if (n !== "children" && (eg(e[n]) || eg(t[n]))) {
- let t = rm.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
+function gy(e, t, n) {
+ let r = Ov(e, t, n);
+ for (let n in e) if (n !== "children" && (lg(e[n]) || lg(t[n]))) {
+ let t = vm.indexOf(n) === -1 ? n : "attr" + n.charAt(0).toUpperCase() + n.substring(1);
r[t] = e[n];
}
return r;
}
// node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs
-var Yte = class extends yv {
+var ane = class extends Tv {
constructor() {
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = C_;
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = A_;
}
getBaseTargetFromProps(e, t) {
- return im.has(t) ? super.getBaseTargetFromProps(e, t) ?? em(t) : e[t];
+ return ym.has(t) ? super.getBaseTargetFromProps(e, t) ?? hm(t) : e[t];
}
getDefaultValue(e) {
- return im.has(e) ? this.latestValues[e] ?? em(e) : void 0;
+ return ym.has(e) ? this.latestValues[e] ?? hm(e) : void 0;
}
readValueFromInstance(e, t) {
- if (im.has(t)) {
- let e = Hp(t);
+ if (ym.has(t)) {
+ let e = rm(t);
return e && e.default || 0;
}
- if (Ag.includes(t)) {
+ if (Lg.includes(t)) {
let n = getComputedStyle(e)[t];
if (typeof n == "string" && n) return n.trim();
}
- return t = ly.has(t) ? t : Og(t), e.getAttribute(t);
+ return t = my.has(t) ? t : Fg(t), e.getAttribute(t);
}
scrapeMotionValuesFromProps(e, t, n) {
- return dy(e, t, n);
+ return gy(e, t, n);
}
build(e, t, n) {
- jg(e, t, this.isSVGTag, n.transformTemplate, n.style);
+ Rg(e, t, this.isSVGTag, n.transformTemplate, n.style);
}
renderInstance(e, t, n, r) {
- Jte(e, t, n, r);
+ ine(e, t, n, r);
}
mount(e) {
- this.isSVGTag = uy(e.tagName), super.mount(e);
+ this.isSVGTag = hy(e.tagName), super.mount(e);
}
};
// node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs
-function fy(e, t) {
+function _y(e, t) {
if (!Array.isArray(t)) return !1;
let n = t.length;
if (n !== e.length) return !1;
@@ -18876,18 +18910,18 @@ function fy(e, t) {
return !0;
}
// node_modules/motion-dom/dist/es/render/utils/animation-state.mjs
-var Xte = [...lv].reverse(), py = (e) => e?.out === !0 ? e : e?.out;
-function Zte(e) {
- let t = (t) => Promise.all(t.map(({ animation: t, options: n }) => sg(e, t, n))), n = my(), r = !0, i = !1;
+var one = [...hv].reverse(), vy = (e) => e?.out === !0 ? e : e?.out;
+function sne(e) {
+ let t = (t) => Promise.all(t.map(({ animation: t, options: n }) => lee(e, t, n))), n = yy(), r = !0, i = !1;
function a(a) {
- let { props: o, parent: s, manuallyAnimateOnMount: c } = e, { initial: l } = o, u = r || i, d = [], f = (t = l) => typeof t != "boolean" && qh(e, Array.isArray(t) ? t[0] : t, e.presenceContext?.custom) || void 0, p = /* @__PURE__ */ new Map(), m = {}, h = Infinity, g = e;
+ let { props: o, parent: s, manuallyAnimateOnMount: c } = e, { initial: l } = o, u = r || i, d = [], f = (t = l) => typeof t != "boolean" && og(e, Array.isArray(t) ? t[0] : t, e.presenceContext?.custom) || void 0, p = /* @__PURE__ */ new Map(), m = {}, h = Infinity, g = e;
do
g = g.props.inherit !== !1 && g.parent;
while (g && !g.isControllingVariants);
- let _ = u && py(f(l ?? (g && g.props.initial))?.transition);
- if (Xte.forEach((t, r) => {
- let i = n[t], l = o[t], f = g && g.props[t], v = l === void 0 ? cv(f) || f === !1 ? f : void 0 : l, y = cv(v), b = t === a ? i.isActive : null, x = y && l === void 0 && !(u && c);
- if (i.protectedKeys = { ...m }, !i.isActive && b === null || !v && !i.prevProp || sv(v) || typeof v == "boolean") return;
+ let _ = u && vy(f(l ?? (g && g.props.initial))?.transition);
+ if (one.forEach((t, r) => {
+ let i = n[t], l = o[t], f = g && g.props[t], v = l === void 0 ? mv(f) || f === !1 ? f : void 0 : l, y = mv(v), b = t === a ? i.isActive : null, x = y && l === void 0 && !(u && c);
+ if (i.protectedKeys = { ...m }, !i.isActive && b === null || !v && !i.prevProp || pv(v) || typeof v == "boolean") return;
if (b === !1 && (h = r), t === "exit" && i.isActive && b !== !0) {
m = {
...m,
@@ -18895,14 +18929,14 @@ function Zte(e) {
};
return;
}
- let S = Qte(i.prevProp, v), C = S || y && (b && !x || r > h), w = !1, T = Array.isArray(v) ? v : [v], E = {}, D;
+ let S = cne(i.prevProp, v), C = S || y && (b && !x || r > h), w = !1, T = Array.isArray(v) ? v : [v], E = {}, D;
if (b !== !1) for (let n of T) {
- let { transition: r, transitionEnd: i, ...a } = qh(e, n, Jh(e, t)) || {};
+ let { transition: r, transitionEnd: i, ...a } = og(e, n, sg(e, t)) || {};
E = {
...E,
...a,
...i
- }, D = py(r) || D;
+ }, D = vy(r) || D;
}
let { prevResolvedValues: O } = i;
for (let t in {
@@ -18910,7 +18944,7 @@ function Zte(e) {
...E
}) {
if (t in m) continue;
- let n = E[t], r = O[t], a = Array.isArray(n) && Array.isArray(r) ? !fy(n, r) || S : n !== r, o;
+ let n = E[t], r = O[t], a = Array.isArray(n) && Array.isArray(r) ? !_y(n, r) || S : n !== r, o;
if (a && n == null) p.has(t) || p.set(t, i.prevOut);
else if (a || n !== void 0 && p.has(t)) {
C = !0, o = p.get(t) || _, p.delete(t) && (w = !0), i.needsAnimating[t] = !0;
@@ -18925,8 +18959,8 @@ function Zte(e) {
}), C && (!(x && S) || w)) for (let n of T) {
let r = { type: t };
if (typeof n == "string" && u && c && s?.enteringChildren) {
- let t = qh(s, n)?.transition?.delayChildren;
- r.delay = Eh(s.enteringChildren, e, t);
+ let t = og(s, n)?.transition?.delayChildren;
+ r.delay = Vh(s.enteringChildren, e, t);
}
d.push({
animation: n,
@@ -18943,7 +18977,7 @@ function Zte(e) {
let s = e.getValue(a);
s && (s.liveStyle = !0);
let c = n && !Array.isArray(l) ? n[a] : void 0, u = e.getBaseTargetFromProps(o, a);
- t[a] = (c === void 0 ? u !== void 0 && !eg(u) ? u : e.initialValues[a] === void 0 ? e.baseTarget[a] : void 0 : c) ?? null;
+ t[a] = (c === void 0 ? u !== void 0 && !lg(u) ? u : e.initialValues[a] === void 0 ? e.baseTarget[a] : void 0 : c) ?? null;
}), r && (t.transition = r), d.push({ animation: t });
}
let v = u && e.blockInitialAnimation || r && !c && (o.initial === !1 || o.initial === o.animate);
@@ -18964,16 +18998,16 @@ function Zte(e) {
},
getState: () => n,
reset: () => {
- n = my(), i = !0;
+ n = yy(), i = !0;
}
};
}
-function Qte(e, t) {
- return typeof t == "string" ? t !== e : Array.isArray(t) ? !fy(t, e) : !1;
+function cne(e, t) {
+ return typeof t == "string" ? t !== e : Array.isArray(t) ? !_y(t, e) : !1;
}
-function my() {
+function yy() {
let e = {};
- for (let t of lv) e[t] = {
+ for (let t of hv) e[t] = {
isActive: t === "animate",
protectedKeys: {},
needsAnimating: {},
@@ -18983,55 +19017,55 @@ function my() {
return e;
}
// node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs
-var hy = /* @__PURE__ */ (0, P.createContext)({
+var by = /* @__PURE__ */ (0, P.createContext)({
transformPagePoint: (e) => e,
isStatic: !1,
reducedMotion: "never"
});
// node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs
-function gy(e, t) {
+function xy(e, t) {
if (typeof e == "function") return e(t);
e != null && (e.current = t);
}
-function $te(...e) {
+function lne(...e) {
return (t) => {
let n = !1, r = e.map((e) => {
- let r = gy(e, t);
+ let r = xy(e, t);
return !n && typeof r == "function" && (n = !0), r;
});
if (n) return () => {
for (let t = 0; t < r.length; t++) {
let n = r[t];
- typeof n == "function" ? n() : gy(e[t], null);
+ typeof n == "function" ? n() : xy(e[t], null);
}
};
};
}
-function ene(...e) {
- return P.useCallback($te(...e), e);
+function une(...e) {
+ return P.useCallback(lne(...e), e);
}
// node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
-var _y = (e) => {
+var Sy = (e) => {
let { width: t, height: n } = e?.getBoundingClientRect() || {};
return [t / e?.offsetWidth || 1, n / e?.offsetHeight || 1];
-}, vy = (e) => {
+}, Cy = (e) => {
let { left: t, top: n } = e.getBoundingClientRect(), r = e;
for (; r = r.parentElement || r.parentNode?.host;) {
let { scrollLeft: e, scrollTop: i } = r;
if (e || i) {
- let [a, o] = _y(r);
+ let [a, o] = Sy(r);
t += e * a, n += i * o;
}
if (getComputedStyle(r).position === "fixed") break;
}
- let [i, a] = _y(e.offsetParent);
+ let [i, a] = Sy(e.offsetParent);
return [t / i, n / a];
-}, tne = class extends P.Component {
+}, dne = class extends P.Component {
getSnapshotBeforeUpdate(e) {
let t = this.props.getElement();
- if (_g(t) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
- let e = t.offsetParent, n = _g(e) && e.offsetWidth || 0, r = _g(e) && e.offsetHeight || 0, i = getComputedStyle(t), a = this.props.sizeRef.current;
- a.height = parseFloat(i.height), a.width = parseFloat(i.width), a.top = t.offsetTop, a.left = t.offsetLeft, a.right = n - a.width - a.left, a.bottom = r - a.height - a.top, a.direction = i.direction, a.point = vy(t);
+ if (wg(t) && e.isPresent && !this.props.isPresent && this.props.pop !== !1) {
+ let e = t.offsetParent, n = wg(e) && e.offsetWidth || 0, r = wg(e) && e.offsetHeight || 0, i = getComputedStyle(t), a = this.props.sizeRef.current;
+ a.height = parseFloat(i.height), a.width = parseFloat(i.width), a.top = t.offsetTop, a.left = t.offsetLeft, a.right = n - a.width - a.left, a.bottom = r - a.height - a.top, a.direction = i.direction, a.point = Cy(t);
}
return null;
}
@@ -19040,7 +19074,7 @@ var _y = (e) => {
return this.props.children;
}
};
-function nne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop: a, popNode: o }) {
+function fne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop: a, popNode: o }) {
let s = (0, P.useId)(), c = (0, P.useRef)(null), l = (0, P.useRef)({
width: 0,
height: 0,
@@ -19049,7 +19083,7 @@ function nne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
right: 0,
bottom: 0,
direction: "ltr"
- }), { nonce: u } = (0, P.useContext)(hy), d = ene(c, a === !1 ? void 0 : e.props?.ref ?? e?.ref), f = () => c.current || o?.current?.current, p = (e) => {
+ }), { nonce: u } = (0, P.useContext)(by), d = une(c, a === !1 ? void 0 : e.props?.ref ?? e?.ref), f = () => c.current || o?.current?.current, p = (e) => {
let { width: t, height: i, top: a, left: o, right: c, bottom: u, direction: d } = l.current, f = d === "rtl", p = n === "left" ? f ? `right:${c}` : `left:${o}` : f ? `left:${o}` : `right:${c}`, m = r === "bottom" ? `bottom:${u}` : `top:${a}`;
e?.insertRule(`[data-motion-pop-id="${s}"]{position:absolute!important;width:${t}px!important;height:${i}px!important;${p}px!important;${m}px!important}`);
};
@@ -19062,10 +19096,10 @@ function nne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
let d = i ?? o.head;
d.appendChild(c), p(c.sheet);
let m = 0, h = 0;
- return $g.setup(() => {
- let [e, t] = vy(r);
+ return o_.setup(() => {
+ let [e, t] = Cy(r);
m = l.current.point[0] - e, h = l.current.point[1] - t;
- }), $g.read(() => {
+ }), o_.read(() => {
let { sheet: e } = c;
if (!e || !m && !h) return;
let t = l.current;
@@ -19073,7 +19107,7 @@ function nne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
}), () => {
r.removeAttribute("data-motion-pop-id"), d.contains(c) && d.removeChild(c);
};
- }, [t]), (0, F.jsx)(tne, {
+ }, [t]), (0, F.jsx)(dne, {
isPresent: t,
getElement: f,
sizeRef: l,
@@ -19082,9 +19116,9 @@ function nne({ children: e, isPresent: t, anchorX: n, anchorY: r, root: i, pop:
});
}
// node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs
-var rne = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: a, mode: o, anchorX: s, anchorY: c, root: l }) => {
- let u = Su(ine), d = (0, P.useId)(), f = (0, P.useRef)(), p = (0, P.useRef)(n), m = (0, P.useRef)(r);
- Cu(() => {
+var pne = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i, presenceAffectsLayout: a, mode: o, anchorX: s, anchorY: c, root: l }) => {
+ let u = Iu(mne), d = (0, P.useId)(), f = (0, P.useRef)(), p = (0, P.useRef)(n), m = (0, P.useRef)(r);
+ Lu(() => {
p.current = n, m.current = r;
});
let h = !0, g = (0, P.useMemo)(() => (h = !1, {
@@ -19109,7 +19143,7 @@ var rne = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i
u.forEach((e, t) => u.set(t, !1));
}, [n]), P.useEffect(() => {
!n && !u.size && r && r();
- }, [n]), e = (0, F.jsx)(nne, {
+ }, [n]), e = (0, F.jsx)(fne, {
pop: o === "popLayout",
isPresent: n,
anchorX: s,
@@ -19117,17 +19151,17 @@ var rne = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: i
root: l,
popNode: f,
children: e
- }), (0, F.jsx)(wu.Provider, {
+ }), (0, F.jsx)(Ru.Provider, {
value: g,
children: e
});
};
-function ine() {
+function mne() {
return /* @__PURE__ */ new Map();
}
// node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs
-function yy(e = !0) {
- let t = (0, P.useContext)(wu);
+function wy(e = !0) {
+ let t = (0, P.useContext)(Ru);
if (t === null) return [!0, null];
let { isPresent: n, onExitComplete: r, register: i } = t, a = (0, P.useId)();
(0, P.useEffect)(() => {
@@ -19140,24 +19174,24 @@ function yy(e = !0) {
]);
return !n && r ? [!1, o] : [!0];
}
-function by() {
- return xy((0, P.useContext)(wu));
+function Ty() {
+ return hne((0, P.useContext)(Ru));
}
-function xy(e) {
+function hne(e) {
return e === null || e.isPresent;
}
// node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs
-var Sy = (e) => e.key || "";
-function Cy(e) {
+var Ey = (e) => e.key || "";
+function Dy(e) {
let t = [];
return P.Children.forEach(e, (e) => {
(0, P.isValidElement)(e) && t.push(e);
}), t;
}
// node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs
-var wy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: o = !1, anchorX: s = "left", anchorY: c = "top", root: l }) => {
- let [u, d] = yy(o), f = (0, P.useMemo)(() => Cy(e), [e]), p = o && !u ? [] : f.map(Sy), m = (0, P.useRef)(!0), h = Su(() => /* @__PURE__ */ new Map()), g = (0, P.useRef)(/* @__PURE__ */ new Set()), [_, v] = (0, P.useState)(f), [y, b] = (0, P.useState)(f);
- Cu(() => {
+var Oy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: o = !1, anchorX: s = "left", anchorY: c = "top", root: l }) => {
+ let [u, d] = wy(o), f = (0, P.useMemo)(() => Dy(e), [e]), p = o && !u ? [] : f.map(Ey), m = (0, P.useRef)(!0), h = Iu(() => /* @__PURE__ */ new Map()), g = (0, P.useRef)(/* @__PURE__ */ new Set()), [_, v] = (0, P.useState)(f), [y, b] = (0, P.useState)(f);
+ Lu(() => {
o && !u && !y.length && d?.();
}, [
u,
@@ -19169,10 +19203,10 @@ var wy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presence
(0, P.useEffect)(() => () => {
let e = x.current;
x.current = void 0, e?.();
- }, [y]), Cu(() => {
+ }, [y]), Lu(() => {
m.current = !1;
for (let e = 0; e < y.length; e++) {
- let t = Sy(y[e]);
+ let t = Ey(y[e]);
p.includes(t) ? (h.delete(t), g.current.delete(t)) : h.get(t) !== !0 && h.set(t, !1);
}
}, [
@@ -19184,15 +19218,15 @@ var wy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presence
if (f !== _) {
let e = [...f], t = 0;
for (let n of y) {
- let r = p.indexOf(Sy(n));
+ let r = p.indexOf(Ey(n));
r === -1 ? (e.splice(t++, 0, n), S.push(n)) : t = r + S.length + 1;
}
- return S.every((e) => h.get(Sy(e))) ? e = f : a === "wait" && (e = S), b(Cy(e)), v(f), null;
+ return S.every((e) => h.get(Ey(e))) ? e = f : a === "wait" && (e = S), b(Dy(e)), v(f), null;
}
- let { forceRender: C } = (0, P.useContext)(xu);
+ let { forceRender: C } = (0, P.useContext)(Fu);
return (0, F.jsx)(F.Fragment, { children: y.map((e) => {
- let _ = Sy(e), b = o && !u ? !1 : f === y || p.includes(_);
- return (0, F.jsx)(rne, {
+ let _ = Ey(e), b = o && !u ? !1 : f === y || p.includes(_);
+ return (0, F.jsx)(pne, {
isPresent: b,
initial: !m.current || n ? void 0 : !1,
custom: t,
@@ -19213,8 +19247,8 @@ var wy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presence
children: e
}, _);
}) });
-}, Ty = /* @__PURE__ */ (0, P.createContext)({ strict: !1 }), Ey = {
- animation: ["variants", ...lv],
+}, ky = /* @__PURE__ */ (0, P.createContext)({ strict: !1 }), Ay = {
+ animation: ["variants", ...hv],
exit: ["exit"],
drag: ["drag", "dragControls"],
focus: ["whileFocus"],
@@ -19241,32 +19275,32 @@ var wy = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presence
"onViewportLeave"
],
layout: ["layout", "layoutId"]
-}, Dy = !1;
-function Oy() {
- if (Dy) return;
+}, jy = !1;
+function My() {
+ if (jy) return;
let e = {};
- for (let t in Ey) e[t] = { isEnabled: (e) => Ey[t].some((t) => !!e[t]) };
- vv(e), Dy = !0;
+ for (let t in Ay) e[t] = { isEnabled: (e) => Ay[t].some((t) => !!e[t]) };
+ wv(e), jy = !0;
}
-function ky() {
- return Oy(), hte();
+function Ny() {
+ return My(), wte();
}
// node_modules/framer-motion/dist/es/motion/features/load-features.mjs
-function ane(e) {
- let t = ky();
+function Py(e) {
+ let t = Ny();
for (let n in e) t[n] = {
...t[n],
...e[n]
};
- vv(t);
+ wv(t);
}
// node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs
-function one({ children: e, ...t }) {
- let n = (0, P.useContext)(hy);
+function Fy({ children: e, ...t }) {
+ let n = (0, P.useContext)(by);
t = {
...n,
...t
- }, t.transition = Mh(t.transition, n.transition), t.isStatic = Su(() => t.isStatic);
+ }, t.transition = qh(t.transition, n.transition), t.isStatic = Iu(() => t.isStatic);
let r = (0, P.useMemo)(() => t, [
JSON.stringify(t.transition),
t.transformPagePoint,
@@ -19274,77 +19308,77 @@ function one({ children: e, ...t }) {
t.skipAnimations,
t.isValidProp
]);
- return (0, F.jsx)(hy.Provider, {
+ return (0, F.jsx)(by.Provider, {
value: r,
children: e
});
}
// node_modules/framer-motion/dist/es/context/MotionContext/index.mjs
-var Ay = /* @__PURE__ */ (0, P.createContext)({});
+var Iy = /* @__PURE__ */ (0, P.createContext)({});
// node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs
-function sne(e, t) {
- if (dv(e)) {
+function gne(e, t) {
+ if (_v(e)) {
let { initial: t, animate: n } = e;
return {
- initial: t === !1 || cv(t) ? t : void 0,
- animate: cv(n) ? n : void 0
+ initial: t === !1 || mv(t) ? t : void 0,
+ animate: mv(n) ? n : void 0
};
}
return e.inherit === !1 ? {} : t;
}
// node_modules/framer-motion/dist/es/context/MotionContext/create.mjs
-function cne(e) {
- let { initial: t, animate: n } = sne(e, (0, P.useContext)(Ay));
+function _ne(e) {
+ let { initial: t, animate: n } = gne(e, (0, P.useContext)(Iy));
return (0, P.useMemo)(() => ({
initial: t,
animate: n
- }), [jy(t), jy(n)]);
+ }), [Ly(t), Ly(n)]);
}
-function jy(e) {
+function Ly(e) {
return Array.isArray(e) ? e.join(" ") : e;
}
// node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs
-var My = () => ({
+var Ry = () => ({
style: {},
transform: {},
transformOrigin: {},
vars: {}
});
// node_modules/framer-motion/dist/es/render/html/use-props.mjs
-function Ny(e, t, n) {
- for (let r in t) !eg(t[r]) && !xv(r, n) && (e[r] = t[r]);
+function zy(e, t, n) {
+ for (let r in t) !lg(t[r]) && !Dv(r, n) && (e[r] = t[r]);
}
-function lne({ transformTemplate: e }, t) {
+function vne({ transformTemplate: e }, t) {
return (0, P.useMemo)(() => {
- let n = My();
- return kg(n, t, e), Object.assign({}, n.vars, n.style);
+ let n = Ry();
+ return Ig(n, t, e), Object.assign({}, n.vars, n.style);
}, [t]);
}
-function une(e, t) {
+function yne(e, t) {
let n = e.style || {}, r = {};
- return Ny(r, n, e), Object.assign(r, lne(e, t)), r;
+ return zy(r, n, e), Object.assign(r, vne(e, t)), r;
}
-function dne(e, t) {
- let n = {}, r = une(e, t);
+function bne(e, t) {
+ let n = {}, r = yne(e, t);
return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
}
// node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs
-var Py = () => ({
- ...My(),
+var By = () => ({
+ ...Ry(),
attrs: {}
});
// node_modules/framer-motion/dist/es/render/svg/use-props.mjs
-function fne(e, t, n, r) {
+function xne(e, t, n, r) {
let i = (0, P.useMemo)(() => {
- let n = Py();
- return jg(n, t, uy(r), e.transformTemplate, e.style), {
+ let n = By();
+ return Rg(n, t, hy(r), e.transformTemplate, e.style), {
...n.attrs,
style: { ...n.style }
};
}, [t]);
if (e.style) {
let t = {};
- return Ny(t, e.style, e), {
+ return zy(t, e.style, e), {
...i,
style: {
...t,
@@ -19355,21 +19389,21 @@ function fne(e, t, n, r) {
return i;
}
// node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs
-var pne = /* @__PURE__ */ new Set(/* @__PURE__ */ "animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));
-function Fy(e) {
- return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || pne.has(e);
+var Sne = /* @__PURE__ */ new Set(/* @__PURE__ */ "animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport".split("."));
+function Vy(e) {
+ return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Sne.has(e);
}
// node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs
-function mne(e, t) {
- return e.startsWith("on") ? !Fy(e) : t?.(e) ?? !Fy(e);
+function Cne(e, t) {
+ return e.startsWith("on") ? !Vy(e) : t?.(e) ?? !Vy(e);
}
-function hne(e, t, n, r) {
+function wne(e, t, n, r) {
let i = {};
- for (let a in e) a === "values" && typeof e.values == "object" || eg(e[a]) || (mne(a, r) || n === !0 && Fy(a) || !t && !Fy(a) || e.draggable && a.startsWith("onDrag")) && (i[a] = e[a]);
+ for (let a in e) a === "values" && typeof e.values == "object" || lg(e[a]) || (Cne(a, r) || n === !0 && Vy(a) || !t && !Vy(a) || e.draggable && a.startsWith("onDrag")) && (i[a] = e[a]);
return i;
}
// node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs
-var gne = [
+var Tne = [
"animate",
"circle",
"defs",
@@ -19397,40 +19431,40 @@ var gne = [
"view"
];
// node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs
-function Iy(e) {
- return typeof e != "string" || e.includes("-") ? !1 : !!(gne.indexOf(e) > -1 || /[A-Z]/u.test(e));
+function Hy(e) {
+ return typeof e != "string" || e.includes("-") ? !1 : !!(Tne.indexOf(e) > -1 || /[A-Z]/u.test(e));
}
// node_modules/framer-motion/dist/es/render/dom/use-render.mjs
-function _ne(e, t, n, { latestValues: r }, i, a = !1, o, s) {
- let c = (o ?? Iy(e) ? fne : dne)(t, r, i, e), l = hne(t, typeof e == "string", a, s), u = e === P.Fragment ? {} : {
+function Ene(e, t, n, { latestValues: r }, i, a = !1, o, s) {
+ let c = (o ?? Hy(e) ? xne : bne)(t, r, i, e), l = wne(t, typeof e == "string", a, s), u = e === P.Fragment ? {} : {
...l,
...c,
ref: n
- }, { children: d } = t, f = (0, P.useMemo)(() => eg(d) ? d.get() : d, [d]);
+ }, { children: d } = t, f = (0, P.useMemo)(() => lg(d) ? d.get() : d, [d]);
return (0, P.createElement)(e, {
...u,
children: f
});
}
// node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs
-function vne({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
+function Dne({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, i) {
return {
- latestValues: yne(n, r, i, e),
+ latestValues: One(n, r, i, e),
renderState: t()
};
}
-function yne(e, t, n, r) {
+function One(e, t, n, r) {
let i = {}, a = r(e, {});
- for (let e in a) i[e] = r_(a[e]);
- let { initial: o, animate: s } = e, c = dv(e), l = fv(e);
+ for (let e in a) i[e] = u_(a[e]);
+ let { initial: o, animate: s } = e, c = _v(e), l = vv(e);
t && l && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), s === void 0 && (s = t.animate));
let u = n ? n.initial === !1 : !1;
u ||= o === !1;
let d = u ? s : o;
- if (d && typeof d != "boolean" && !sv(d)) {
+ if (d && typeof d != "boolean" && !pv(d)) {
let t = Array.isArray(d) ? d : [d];
for (let n = 0; n < t.length; n++) {
- let r = Kh(e, t[n]);
+ let r = ag(e, t[n]);
if (r) {
let { transitionEnd: e, transition: t, ...n } = r;
for (let e in n) {
@@ -19447,18 +19481,18 @@ function yne(e, t, n, r) {
}
return i;
}
-var Ly = (e) => (t, n) => {
- let r = (0, P.useContext)(Ay), i = (0, P.useContext)(wu), a = () => vne(e, t, r, i);
- return n ? a() : Su(a);
-}, bne = /*@__PURE__*/ Ly({
- scrapeMotionValuesFromProps: Sv,
- createRenderState: My
-}), xne = /*@__PURE__*/ Ly({
- scrapeMotionValuesFromProps: dy,
- createRenderState: Py
-}), Sne = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
+var Uy = (e) => (t, n) => {
+ let r = (0, P.useContext)(Iy), i = (0, P.useContext)(Ru), a = () => Dne(e, t, r, i);
+ return n ? a() : Iu(a);
+}, kne = /*@__PURE__*/ Uy({
+ scrapeMotionValuesFromProps: Ov,
+ createRenderState: Ry
+}), Ane = /*@__PURE__*/ Uy({
+ scrapeMotionValuesFromProps: gy,
+ createRenderState: By
+}), jne = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
// node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs
-function Cne(e, t, n) {
+function Mne(e, t, n) {
let r = (0, P.useRef)(n);
(0, P.useInsertionEffect)(() => {
r.current = n;
@@ -19476,14 +19510,14 @@ function Cne(e, t, n) {
}, [t]);
}
// node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs
-var Ry = /* @__PURE__ */ (0, P.createContext)({});
+var Wy = /* @__PURE__ */ (0, P.createContext)({});
// node_modules/framer-motion/dist/es/utils/is-ref-object.mjs
-function wne(e) {
+function Nne(e) {
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
}
// node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs
-function Tne(e, t, n, r, i, a) {
- let { visualElement: o } = (0, P.useContext)(Ay), s = (0, P.useContext)(Ty), c = (0, P.useContext)(wu), l = (0, P.useContext)(hy), u = l.reducedMotion, d = l.skipAnimations, f = (0, P.useRef)(null), p = (0, P.useRef)(!1);
+function Pne(e, t, n, r, i, a) {
+ let { visualElement: o } = (0, P.useContext)(Iy), s = (0, P.useContext)(ky), c = (0, P.useContext)(Ru), l = (0, P.useContext)(by), u = l.reducedMotion, d = l.skipAnimations, f = (0, P.useRef)(null), p = (0, P.useRef)(!1);
r ||= s.renderer, !f.current && r && (f.current = r(e, {
visualState: t,
parent: o,
@@ -19494,14 +19528,14 @@ function Tne(e, t, n, r, i, a) {
skipAnimations: d,
isSVG: a
}), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
- let m = f.current, h = (0, P.useContext)(Ry);
- m && !m.projection && i && (m.type === "html" || m.type === "svg") && Ene(f.current, n, i, h), (0, P.useInsertionEffect)(() => {
+ let m = f.current, h = (0, P.useContext)(Wy);
+ m && !m.projection && i && (m.type === "html" || m.type === "svg") && Fne(f.current, n, i, h), (0, P.useInsertionEffect)(() => {
m && m.props !== n && m.update(n, c);
});
- let g = n[rg], _ = (0, P.useRef)(!!g && typeof window < "u" && !window.MotionHandoffIsComplete?.(g) && window.MotionHasOptimisedAnimation?.(g));
- return Cu(() => {
+ let g = n[dg], _ = (0, P.useRef)(!!g && typeof window < "u" && !window.MotionHandoffIsComplete?.(g) && window.MotionHasOptimisedAnimation?.(g));
+ return Lu(() => {
p.current && m && (m.animationState?.animateChanges(), m.enteringChildren = void 0);
- }, []), Cu(() => {
+ }, []), Lu(() => {
p.current = !0, m && (window.MotionIsMounted = !0, m.updateFeatures(), m.scheduleRenderMicrotask(), _.current && m.animationState && m.animationState.animateChanges());
}), (0, P.useEffect)(() => {
m && (!_.current && m.animationState && m.animationState.animateChanges(), _.current &&= (queueMicrotask(() => {
@@ -19509,12 +19543,12 @@ function Tne(e, t, n, r, i, a) {
}), !1), m.enteringChildren = void 0);
}), m;
}
-function Ene(e, t, n, r) {
- let { layoutId: i, layout: a, drag: o, dragConstraints: s, layoutScroll: c, layoutRoot: l, layoutAnchor: u, layoutCrossfade: d } = t, f = e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : zy(e.parent));
+function Fne(e, t, n, r) {
+ let { layoutId: i, layout: a, drag: o, dragConstraints: s, layoutScroll: c, layoutRoot: l, layoutAnchor: u, layoutCrossfade: d } = t, f = e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Gy(e.parent));
f.setOptions({
layoutId: i,
layout: a,
- alwaysMeasureLayout: !!o || s && wne(s),
+ alwaysMeasureLayout: !!o || s && Nne(s),
visualElement: e,
animationType: typeof a == "string" ? a : "both",
initialPromotionConfig: r,
@@ -19526,50 +19560,50 @@ function Ene(e, t, n, r) {
let p = f.getStack()?.lead;
p && !f.root.isUpdateBlocked() && (p.willUpdate(), p.scheduleCheckAfterUnmount());
}
-function zy(e) {
- if (e) return e.options.allowProjection === !1 ? zy(e.parent) : e.projection;
+function Gy(e) {
+ if (e) return e.options.allowProjection === !1 ? Gy(e.parent) : e.projection;
}
// node_modules/framer-motion/dist/es/motion/index.mjs
-function By(e, { forwardMotionProps: t = !1, type: n } = {}, r, i) {
- r && ane(r);
- let a = n ? n === "svg" : Iy(e), o = a ? xne : bne;
+function Ky(e, { forwardMotionProps: t = !1, type: n } = {}, r, i) {
+ r && Py(r);
+ let a = n ? n === "svg" : Hy(e), o = a ? Ane : kne;
function s(n, s) {
- let c, l = Dne(n);
- Su(() => !!iv.current?.sharedNodes.get(l)?.lead && n.initial) && (n = {
+ let c, l = Ine(n);
+ Iu(() => !!uv.current?.sharedNodes.get(l)?.lead && n.initial) && (n = {
...n,
initial: !1
});
let u = {
- ...(0, P.useContext)(hy),
+ ...(0, P.useContext)(by),
...n,
layoutId: l
- }, { isStatic: d, isValidProp: f } = u, p = cne(n), m = o(n, d);
+ }, { isStatic: d, isValidProp: f } = u, p = _ne(n), m = o(n, d);
if (!d && typeof window < "u") {
- One(u, r);
- let t = kne(u);
- p.visualElement = Tne(e, m, u, i, t.ProjectionNode, a), (t.isEnabled || p.visualElement?.projection?.options.layoutId) && (c = t.MeasureLayout);
+ Lne(u, r);
+ let t = Rne(u);
+ p.visualElement = Pne(e, m, u, i, t.ProjectionNode, a), (t.isEnabled || p.visualElement?.projection?.options.layoutId) && (c = t.MeasureLayout);
}
- return (0, F.jsxs)(Ay.Provider, {
+ return (0, F.jsxs)(Iy.Provider, {
value: p,
children: [c && p.visualElement ? (0, F.jsx)(c, {
visualElement: p.visualElement,
...u
- }) : null, _ne(e, n, Cne(m, p.visualElement, s), m, d, t, a, f)]
+ }) : null, Ene(e, n, Mne(m, p.visualElement, s), m, d, t, a, f)]
});
}
s.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
let c = (0, P.forwardRef)(s);
- return c[Sne] = e, c;
+ return c[jne] = e, c;
}
-function Dne({ layoutId: e }) {
- let t = (0, P.useContext)(xu).id;
+function Ine({ layoutId: e }) {
+ let t = (0, P.useContext)(Fu).id;
return t && e !== void 0 ? t + "-" + e : e;
}
-function One(e, t) {
- (0, P.useContext)(Ty).strict;
+function Lne(e, t) {
+ (0, P.useContext)(ky).strict;
}
-function kne(e) {
- let { drag: t, layout: n } = ky();
+function Rne(e) {
+ let { drag: t, layout: n } = Ny();
if (!t && !n) return {};
let r = {
...t,
@@ -19582,19 +19616,19 @@ function kne(e) {
};
}
// node_modules/framer-motion/dist/es/render/components/create-proxy.mjs
-function Ane(e, t) {
- if (typeof Proxy > "u") return By;
- let n = /* @__PURE__ */ new Map(), r = (n, r) => By(n, r, e, t);
- return new Proxy((e, t) => r(e, t), { get: (i, a) => a === "create" ? r : (n.has(a) || n.set(a, By(a, void 0, e, t)), n.get(a)) });
+function zne(e, t) {
+ if (typeof Proxy > "u") return Ky;
+ let n = /* @__PURE__ */ new Map(), r = (n, r) => Ky(n, r, e, t);
+ return new Proxy((e, t) => r(e, t), { get: (i, a) => a === "create" ? r : (n.has(a) || n.set(a, Ky(a, void 0, e, t)), n.get(a)) });
}
// node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs
-var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection: e !== P.Fragment }), Mne = class extends cy {
+var Bne = (e, t) => t.isSVG ?? Hy(e) ? new ane(t) : new Dte(t, { allowProjection: e !== P.Fragment }), Vne = class extends py {
constructor(e) {
- super(e), e.animationState ||= Zte(e);
+ super(e), e.animationState ||= sne(e);
}
updateAnimationControlsSubscription() {
let { animate: e } = this.node.getProps();
- sv(e) && (this.unmountControls = e.subscribe(this.node));
+ pv(e) && (this.unmountControls = e.subscribe(this.node));
}
mount() {
this.updateAnimationControlsSubscription();
@@ -19605,11 +19639,11 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
unmount() {
this.node.animationState.reset(), this.unmountControls?.();
}
-}, Nne = 0, Pne = {
- animation: { Feature: Mne },
- exit: { Feature: class extends cy {
+}, Hne = 0, Une = {
+ animation: { Feature: Vne },
+ exit: { Feature: class extends py {
constructor() {
- super(...arguments), this.id = Nne++;
+ super(...arguments), this.id = Hne++;
}
update() {
let { presenceContext: e, prevPresenceContext: t, animationState: n } = this.node;
@@ -19620,7 +19654,7 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
if (this.exit === !0) {
let { initial: e } = this.node.getProps();
if (e && !Array.isArray(e)) {
- let { transition: t, transitionEnd: n, ...r } = qh(this.node, e) || {};
+ let { transition: t, transitionEnd: n, ...r } = og(this.node, e) || {};
for (let e in r) this.node.getValue(e)?.jump(r[e]);
}
this.node.blockInitialAnimation = !1, n.reset(), n.animateChanges();
@@ -19639,13 +19673,13 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
}
unmount() {}
} }
-}, Fne = class extends cy {
+}, Wne = class extends py {
constructor(e) {
- super(e), this.removeGroupControls = Nu, this.removeListeners = Nu, this.controls = new Hte(e);
+ super(e), this.removeGroupControls = qu, this.removeListeners = qu, this.controls = new Zte(e);
}
mount() {
let { dragControls: e } = this.node.getProps();
- e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || Nu;
+ e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || qu;
}
update() {
let { dragControls: e, drag: t } = this.node.getProps(), { dragControls: n, drag: r } = this.node.prevProps || {};
@@ -19654,14 +19688,14 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
unmount() {
this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
}
-}, Vy = (e) => (t, n) => {
- e && Af.update(() => e(t, n), !1, !0);
-}, Ine = class extends cy {
+}, qy = (e) => (t, n) => {
+ e && Gf.update(() => e(t, n), !1, !0);
+}, Gne = class extends py {
constructor() {
- super(...arguments), this.removePointerDownListener = Nu;
+ super(...arguments), this.removePointerDownListener = qu;
}
onPointerDown(e) {
- this.session = new Pv(e, this.createPanHandlers(), {
+ this.session = new Bv(e, this.createPanHandlers(), {
transformPagePoint: this.node.getTransformPagePoint(),
contextWindow: this.node.current?.ownerDocument.defaultView
});
@@ -19669,16 +19703,16 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
createPanHandlers() {
let { onPanSessionStart: e, onPanStart: t, onPan: n, onPanEnd: r } = this.node.getProps();
return {
- onSessionStart: Vy(e),
- onStart: Vy(t),
- onMove: Vy(n),
+ onSessionStart: qy(e),
+ onStart: qy(t),
+ onMove: qy(n),
onEnd: (e, t) => {
- delete this.session, r && Af.postRender(() => r(e, t));
+ delete this.session, r && Gf.postRender(() => r(e, t));
}
};
}
mount() {
- this.removePointerDownListener = Tv(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
+ this.removePointerDownListener = jv(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
}
update() {
this.session?.updateHandlers(this.createPanHandlers());
@@ -19686,12 +19720,12 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
unmount() {
this.removePointerDownListener(), this.session?.end();
}
-}, Hy = !1, Uy = ({ layout: e, layoutDependency: t, layoutAnchor: n }) => ({
+}, Jy = !1, Yy = ({ layout: e, layoutDependency: t, layoutAnchor: n }) => ({
layout: e,
layoutDependency: t,
layoutAnchor: n,
animationType: typeof e == "string" ? e : "both"
-}), Wy = (e, t) => {
+}), Xy = (e, t) => {
let { snapshot: n } = e, r = e.getStack();
r?.remove(e);
let i = r?.lead;
@@ -19700,33 +19734,33 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
let { resumeFrom: t } = e;
t?.isPresent !== !1 && e.getStack().members.includes(t) && (t.hide(), e.resumeFrom = void 0, e.snapshot = n);
};
-}, Lne = class extends P.Component {
+}, Kne = class extends P.Component {
componentDidMount() {
let { visualElement: e, layoutGroup: t, switchLayoutGroup: n, layoutId: r } = this.props, { projection: i } = e;
- i && (t.group?.add(i), r && n?.register?.(i), Hy && i.root.didUpdate(), i.options.layoutId !== r && Wy(i, r)?.(), i.addEventListener("animationComplete", () => this.safeToRemove()), i.setOptions({
+ i && (t.group?.add(i), r && n?.register?.(i), Jy && i.root.didUpdate(), i.options.layoutId !== r && Xy(i, r)?.(), i.addEventListener("animationComplete", () => this.safeToRemove()), i.setOptions({
...i.options,
- ...Uy(this.props),
+ ...Yy(this.props),
onExitComplete: () => this.safeToRemove()
- })), B_.hasEverUpdated = !0;
+ })), K_.hasEverUpdated = !0;
}
getSnapshotBeforeUpdate(e) {
let { layoutDependency: t, layoutId: n, visualElement: r, drag: i, isPresent: a } = this.props, { projection: o } = r;
- return o && (o.isPresent = a, this.takeOver = e.layoutId === n ? void 0 : (o.willUpdate(), Wy(o, n)), o.setOptions({
+ return o && (o.isPresent = a, this.takeOver = e.layoutId === n ? void 0 : (o.willUpdate(), Xy(o, n)), o.setOptions({
...o.options,
- ...Uy(this.props)
- }), Hy = !0, i || e.layoutDependency !== t || t === void 0 || e.isPresent !== a ? o.willUpdate() : this.safeToRemove(), e.isPresent !== a && (a ? o.promote() : o.relegate() || Af.postRender(() => {
+ ...Yy(this.props)
+ }), Jy = !0, i || e.layoutDependency !== t || t === void 0 || e.isPresent !== a ? o.willUpdate() : this.safeToRemove(), e.isPresent !== a && (a ? o.promote() : o.relegate() || Gf.postRender(() => {
o.getStack()?.members.length || this.safeToRemove();
}))), null;
}
componentDidUpdate() {
let { projection: e } = this.props.visualElement;
- e && (this.takeOver?.(), e.root.didUpdate(), $g.postRender(() => {
+ e && (this.takeOver?.(), e.root.didUpdate(), o_.postRender(() => {
!e.currentAnimation && e.isLead() && this.safeToRemove();
}));
}
componentWillUnmount() {
let { visualElement: e, layoutGroup: t, switchLayoutGroup: n } = this.props, { projection: r } = e;
- Hy = !0, r && (r.scheduleCheckAfterUnmount(), t.group?.remove(r), n?.deregister?.(r));
+ Jy = !0, r && (r.scheduleCheckAfterUnmount(), t.group?.remove(r), n?.deregister?.(r));
}
safeToRemove() {
this.props.safeToRemove?.();
@@ -19735,39 +19769,39 @@ var jne = (e, t) => t.isSVG ?? Iy(e) ? new Yte(t) : new vte(t, { allowProjection
return null;
}
};
-function Gy(e) {
- let [t, n] = yy(), r = (0, P.useContext)(xu);
- return (0, F.jsx)(Lne, {
+function Zy(e) {
+ let [t, n] = wy(), r = (0, P.useContext)(Fu);
+ return (0, F.jsx)(Kne, {
...e,
layoutGroup: r,
- switchLayoutGroup: (0, P.useContext)(Ry),
+ switchLayoutGroup: (0, P.useContext)(Wy),
isPresent: t,
safeToRemove: n
});
}
// node_modules/framer-motion/dist/es/motion/features/drag.mjs
-var Rne = {
- pan: { Feature: Ine },
+var qne = {
+ pan: { Feature: Gne },
drag: {
- Feature: Fne,
- ProjectionNode: av,
- MeasureLayout: Gy
+ Feature: Wne,
+ ProjectionNode: dv,
+ MeasureLayout: Zy
}
};
// node_modules/framer-motion/dist/es/gestures/hover.mjs
-function Ky(e, t, n, r) {
+function Qy(e, t, n, r) {
let { props: i } = e, a = "while" + n;
e.animationState && i[a] && e.animationState.setActive(a, r === "Start");
let o = i["on" + n + r];
- o && Af.postRender(() => o(t, wv(t)));
+ o && Gf.postRender(() => o(t, Av(t)));
}
-var zne = class extends cy {
+var Jne = class extends py {
mount() {
let { current: e } = this.node;
- e && (this.unmount = Kte(e, (e, t) => (Ky(this.node, t, "Hover", "Start"), (e) => Ky(this.node, e, "Hover", "End"))));
+ e && (this.unmount = tne(e, (e, t) => (Qy(this.node, t, "Hover", "Start"), (e) => Qy(this.node, e, "Hover", "End"))));
}
unmount() {}
-}, Bne = class extends cy {
+}, Yne = class extends py {
constructor() {
super(...arguments), this.isActive = !1;
}
@@ -19784,51 +19818,51 @@ var zne = class extends cy {
this.isActive && this.node.animationState && (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
}
mount() {
- this.unmount = Pu(rv(this.node.current, "focus", () => this.onFocus()), rv(this.node.current, "blur", () => this.onBlur()));
+ this.unmount = Ju(lv(this.node.current, "focus", () => this.onFocus()), lv(this.node.current, "blur", () => this.onBlur()));
}
unmount() {}
};
// node_modules/framer-motion/dist/es/gestures/press.mjs
-function qy(e, t, n) {
- e.current instanceof HTMLButtonElement && e.current.disabled || Ky(e, t, "Tap", n);
+function $y(e, t, n) {
+ e.current instanceof HTMLButtonElement && e.current.disabled || Qy(e, t, "Tap", n);
}
-var Vne = class extends cy {
+var Xne = class extends py {
mount() {
let { current: e } = this.node;
if (!e) return;
let { globalTapTarget: t, propagate: n } = this.node.props;
- this.unmount = qte(e, (e, t) => (qy(this.node, t, "Start"), (e, { success: t }) => qy(this.node, e, t ? "" : "Cancel")), {
+ this.unmount = rne(e, (e, t) => ($y(this.node, t, "Start"), (e, { success: t }) => $y(this.node, e, t ? "" : "Cancel")), {
useGlobalTarget: t,
stopPropagation: n?.tap === !1
});
}
unmount() {}
-}, Jy = /* @__PURE__ */ new WeakMap(), Yy = /* @__PURE__ */ new WeakMap(), Hne = (e) => {
- let t = Jy.get(e.target);
+}, eb = /* @__PURE__ */ new WeakMap(), tb = /* @__PURE__ */ new WeakMap(), Zne = (e) => {
+ let t = eb.get(e.target);
t && t(e);
-}, Une = (e) => {
- e.forEach(Hne);
+}, Qne = (e) => {
+ e.forEach(Zne);
};
-function Wne({ root: e, ...t }) {
+function $ne({ root: e, ...t }) {
let n = e || document;
- Yy.has(n) || Yy.set(n, {});
- let r = Yy.get(n), i = JSON.stringify(t);
- return r[i] || (r[i] = new IntersectionObserver(Une, {
+ tb.has(n) || tb.set(n, {});
+ let r = tb.get(n), i = JSON.stringify(t);
+ return r[i] || (r[i] = new IntersectionObserver(Qne, {
root: e,
...t
})), r[i];
}
-function Gne(e, t, n) {
- let r = Wne(t);
- return Jy.set(e, n), r.observe(e), () => {
- Jy.delete(e), r.unobserve(e);
+function ere(e, t, n) {
+ let r = $ne(t);
+ return eb.set(e, n), r.observe(e), () => {
+ eb.delete(e), r.unobserve(e);
};
}
// node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs
-var Kne = {
+var tre = {
some: 0,
all: 1
-}, qne = class extends cy {
+}, nre = class extends py {
constructor() {
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
}
@@ -19837,7 +19871,7 @@ var Kne = {
let { viewport: e = {} } = this.node.getProps(), { root: t, margin: n, amount: r = "some", once: i } = e, a = {
root: t ? t.current : void 0,
rootMargin: n,
- threshold: typeof r == "number" ? r : Kne[r]
+ threshold: typeof r == "number" ? r : tre[r]
}, o = (e) => {
let { isIntersecting: t } = e;
if (this.isInView === t || (this.isInView = t, i && !t && this.hasEnteredView)) return;
@@ -19845,7 +19879,7 @@ var Kne = {
let { onViewportEnter: n, onViewportLeave: r } = this.node.getProps(), a = t ? n : r;
a && a(e);
};
- this.stopObserver = Gne(this.node.current, a, o);
+ this.stopObserver = ere(this.node.current, a, o);
}
mount() {
this.startObserver();
@@ -19857,81 +19891,81 @@ var Kne = {
"amount",
"margin",
"root"
- ].some(Jne(e, t)) && this.startObserver();
+ ].some(rre(e, t)) && this.startObserver();
}
unmount() {
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
}
};
-function Jne({ viewport: e = {} }, { viewport: t = {} } = {}) {
+function rre({ viewport: e = {} }, { viewport: t = {} } = {}) {
return (n) => e[n] !== t[n];
}
// node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs
-var Yne = /*@__PURE__*/ Ane(/* @__PURE__ */ Object.assign({}, Pne, {
- inView: { Feature: qne },
- tap: { Feature: Vne },
- focus: { Feature: Bne },
- hover: { Feature: zne }
-}, Rne, { layout: {
- ProjectionNode: av,
- MeasureLayout: Gy
-} }), jne);
+var ire = /*@__PURE__*/ zne(/* @__PURE__ */ Object.assign({}, Une, {
+ inView: { Feature: nre },
+ tap: { Feature: Xne },
+ focus: { Feature: Yne },
+ hover: { Feature: Jne }
+}, qne, { layout: {
+ ProjectionNode: dv,
+ MeasureLayout: Zy
+} }), Bne);
// node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs
-function Xy() {
- !mv.current && hv();
- let [e] = (0, P.useState)(pv.current);
+function nb() {
+ !bv.current && xv();
+ let [e] = (0, P.useState)(yv.current);
return e;
}
// node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs
-function Zy(e) {
+function rb(e) {
return typeof e == "object" && !Array.isArray(e);
}
// node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs
-function Qy(e, t, n, r) {
- return e == null ? [] : typeof e == "string" && Zy(t) ? Sg(e, n, r) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e.filter((e) => e != null) : [e];
+function ib(e, t, n, r) {
+ return e == null ? [] : typeof e == "string" && rb(t) ? kg(e, n, r) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e.filter((e) => e != null) : [e];
}
// node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs
-function Xne(e, t, n) {
+function are(e, t, n) {
return e * (t + 1) + n * t;
}
// node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs
-function $y(e, t) {
+function ab(e, t) {
if (t.has(e)) return t.get(e);
let [, n, r] = e.match(/^(.+?)([+-][\d.]+)$/) || [];
return t.has(n) ? Math.max(0, t.get(n) + parseFloat(r)) : void 0;
}
-function Zne(e, t, n, r) {
- return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : $y(t, r) ?? e;
+function ore(e, t, n, r) {
+ return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : ab(t, r) ?? e;
}
// node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs
-function Qne(e, t, n) {
+function sre(e, t, n) {
for (let r = 0; r < e.length; r++) {
let i = e[r];
- i.at > t && i.at < n && (Eu(e, i), r--);
+ i.at > t && i.at < n && (Bu(e, i), r--);
}
}
-function $ne(e, t, n, r, i, a) {
- Qne(e, i, a);
+function cre(e, t, n, r, i, a) {
+ sre(e, i, a);
for (let o = 0; o < t.length; o++) e.push({
value: t[o],
- at: lf(i, a, r[o]),
- easing: /* @__PURE__ */ nd(n, o)
+ at: wf(i, a, r[o]),
+ easing: /* @__PURE__ */ gd(n, o)
});
}
// node_modules/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs
-function ere(e, t, n = 0) {
+function lre(e, t, n = 0) {
let r = t + 1 + t * n;
for (let t = 0; t < e.length; t++) e[t] = e[t] / r;
}
// node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs
-function tre(e, t) {
+function ure(e, t) {
return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
}
// node_modules/framer-motion/dist/es/animation/sequence/create.mjs
-var nre = "easeInOut", rre = 20;
-function ire(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
+var dre = "easeInOut", fre = 20;
+function pre(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
let o = t.duration || .3, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = {}, u = /* @__PURE__ */ new Map(), d = 0, f = 0, p = 0, m = (e, n) => {
- let a = n, s = (e) => typeof e == "number" ? n + e : Zne(f, e, d, u);
+ let a = n, s = (e) => typeof e == "number" ? n + e : ore(f, e, d, u);
for (let n = 0; n < e.length; n++) {
let h = e[n];
if (typeof h == "string") {
@@ -19946,10 +19980,10 @@ function ire(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
let [g, _, v = {}] = h;
v.at !== void 0 && (f = s(v.at));
let y = 0, b = (e, n, r, a = 0, s = 0) => {
- let c = are(e), { delay: l = 0, times: u = pp(c), type: d = t.type || "keyframes", repeat: m, repeatType: h, repeatDelay: g = 0, ..._ } = n, { ease: v = t.ease || "easeOut", duration: b } = n, x = typeof l == "function" ? l(a, s) : l, S = c.length, C = Nm(d) ? d : i?.[d || "keyframes"];
+ let c = mre(e), { delay: l = 0, times: u = Op(c), type: d = t.type || "keyframes", repeat: m, repeatType: h, repeatDelay: g = 0, ..._ } = n, { ease: v = t.ease || "easeOut", duration: b } = n, x = typeof l == "function" ? l(a, s) : l, S = c.length, C = Jm(d) ? d : i?.[d || "keyframes"];
if (S <= 2 && C) {
let e = 100;
- if (S === 2 && cre(c)) {
+ if (S === 2 && _re(c)) {
let t = c[1] - c[0];
e = Math.abs(t);
}
@@ -19957,40 +19991,40 @@ function ire(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
...t,
..._
};
- b !== void 0 && (n.duration = /* @__PURE__ */ Lu(b));
- let r = Lf(n, e, C);
+ b !== void 0 && (n.duration = /* @__PURE__ */ Zu(b));
+ let r = Qf(n, e, C);
v = r.ease, b = r.duration;
}
b ??= o;
let w = f + x;
u.length === 1 && u[0] === 0 && (u[1] = 1);
let T = u.length - c.length;
- if (T > 0 && fp(u, T), c.length === 1 && c.unshift(null), m && m < rre) {
+ if (T > 0 && Dp(u, T), c.length === 1 && c.unshift(null), m && m < fre) {
let e = b > 0 ? g / b : 0;
- b = Xne(b, m, g);
+ b = are(b, m, g);
let t = [...c], n = [...u];
v = Array.isArray(v) ? [...v] : [v];
let r = [...v], i = h === "reverse" || h === "mirror", a = t, o = r;
- i && (a = [...t].reverse(), h === "reverse" && (o = [...r].reverse().map((e) => typeof e == "function" ? /* @__PURE__ */ Wu(e) : e)));
+ i && (a = [...t].reverse(), h === "reverse" && (o = [...r].reverse().map((e) => typeof e == "function" ? /* @__PURE__ */ id(e) : e)));
for (let s = 0; s < m; s++) {
let l = i && s % 2 == 0, d = l ? a : t, f = l ? o : r, p = (s + 1) * (1 + e);
e > 0 && (c.push(c[c.length - 1]), u.push(p), v.push("linear")), c.push(...d);
- for (let e = 0; e < d.length; e++) u.push(n[e] + p), v.push(e === 0 ? "linear" : /* @__PURE__ */ nd(f, e - 1));
+ for (let e = 0; e < d.length; e++) u.push(n[e] + p), v.push(e === 0 ? "linear" : /* @__PURE__ */ gd(f, e - 1));
}
- ere(u, m, e);
+ lre(u, m, e);
}
let E = w + b;
- $ne(r, c, v, u, w, E), y = Math.max(x + b, y), p = Math.max(E, p);
+ cre(r, c, v, u, w, E), y = Math.max(x + b, y), p = Math.max(E, p);
};
- if (eg(g)) {
- let e = eb(g, c);
- b(_, v, tb("default", e));
+ if (lg(g)) {
+ let e = ob(g, c);
+ b(_, v, sb("default", e));
} else {
- let e = Qy(g, _, r, l), t = e.length;
+ let e = ib(g, _, r, l), t = e.length;
for (let n = 0; n < t; n++) {
_ = _, v = v;
- let r = e[n], i = eb(r, c);
- for (let e in _) b(_[e], ore(v, e), tb(e, i), n, t);
+ let r = e[n], i = ob(r, c);
+ for (let e in _) b(_[e], hre(v, e), sb(e, i), n, t);
}
}
d = f, f += y, a = Math.max(a, f);
@@ -20000,13 +20034,13 @@ function ire(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
return m(e, 0), a && (a.duration = p, a.labels = u), c.forEach((e, r) => {
for (let i in e) {
let a = e[i];
- a.sort(tre);
+ a.sort(ure);
let o = [], c = [], l = [];
for (let e = 0; e < a.length; e++) {
let { at: t, value: n, easing: r } = a[e];
- o.push(n), c.push(/* @__PURE__ */ Fu(0, p, t)), l.push(r || "easeOut");
+ o.push(n), c.push(/* @__PURE__ */ Yu(0, p, t)), l.push(r || "easeOut");
}
- c[0] !== 0 && (c.unshift(0), o.unshift(o[0]), l.unshift(nre)), c[c.length - 1] !== 1 && (c.push(1), o.push(null)), s.has(r) || s.set(r, {
+ c[0] !== 0 && (c.unshift(0), o.unshift(o[0]), l.unshift(dre)), c[c.length - 1] !== 1 && (c.push(1), o.push(null)), s.has(r) || s.set(r, {
keyframes: {},
transition: {}
});
@@ -20023,45 +20057,45 @@ function ire(e, { defaultTransition: t = {}, ...n } = {}, r, i, a) {
}
}), s;
}
-function eb(e, t) {
+function ob(e, t) {
return !t.has(e) && t.set(e, {}), t.get(e);
}
-function tb(e, t) {
+function sb(e, t) {
return t[e] || (t[e] = []), t[e];
}
-function are(e) {
+function mre(e) {
return Array.isArray(e) ? e : [e];
}
-function ore(e, t) {
+function hre(e, t) {
return e && e[t] ? {
...e,
...e[t]
} : { ...e };
}
-var sre = (e) => typeof e == "number", cre = (e) => e.every(sre);
+var gre = (e) => typeof e == "number", _re = (e) => e.every(gre);
// node_modules/framer-motion/dist/es/animation/animate/subject.mjs
-function lre(e, t) {
- return eg(e) || typeof e == "number" || typeof e == "string" && !Zy(t);
+function vre(e, t) {
+ return lg(e) || typeof e == "number" || typeof e == "string" && !rb(t);
}
-function nb(e, t, n, r) {
+function cb(e, t, n, r) {
let i = [];
- if (lre(e, t)) i.push(e_(e, Zy(t) && t.default || t, n && (n.default || n)));
+ if (vre(e, t)) i.push(s_(e, rb(t) && t.default || t, n && (n.default || n)));
else {
if (e == null) return i;
- let a = Qy(e, t, r), o = a.length;
+ let a = ib(e, t, r), o = a.length;
for (let e = 0; e < o; e++) {
let r = a[e], s = { ...n };
- "delay" in s && typeof s.delay == "function" && (s.delay = s.delay(e, o)), r instanceof Element ? i.push(...Oee(r, t, s, ov.get(r))) : i.push(...hg(uee(r) ?? kee, r, t, s));
+ "delay" in s && typeof s.delay == "function" && (s.delay = s.delay(e, o)), r instanceof Element ? i.push(...Iee(r, t, s, fv.get(r))) : i.push(...Sg(vee(r) ?? Lee, r, t, s));
}
}
return i;
}
// node_modules/framer-motion/dist/es/animation/animate/sequence.mjs
-function ure(e, t, n, r) {
+function yre(e, t, n, r) {
let i = [];
- return ire(e.map((e) => {
+ return pre(e.map((e) => {
if (Array.isArray(e) && typeof e[0] == "function") {
- let t = e[0], n = jh(0);
+ let t = e[0], n = Kh(0);
return n.on("change", t), e.length === 1 ? [n, [0, 1]] : e.length === 2 ? [
n,
[0, 1],
@@ -20073,33 +20107,33 @@ function ure(e, t, n, r) {
];
}
return e;
- }), t, n, { spring: cp }, r).forEach(({ keyframes: e, transition: t }, n) => {
- i.push(...nb(n, e, t));
+ }), t, n, { spring: Cp }, r).forEach(({ keyframes: e, transition: t }, n) => {
+ i.push(...cb(n, e, t));
}), i;
}
// node_modules/framer-motion/dist/es/animation/timeline/index.mjs
-var rb = 0;
-function dre(e, t) {
+var lb = 0;
+function bre(e, t) {
let n = [...e], r = typeof n[0] == "function" ? Math.max(1, n.length - 1) : 2;
return n[r] = {
...n[r],
at: t
}, n;
}
-var ib = (e, t) => t === void 0 ? e : {
+var ub = (e, t) => t === void 0 ? e : {
name: e,
at: t
};
-function ab(e) {
+function db(e) {
e.pause(), e.time = 0, e.stop();
}
-var ob = class e {
+var fb = class e {
constructor(e = [], t = {}, n) {
this.options = t, this.entries = [], this.repeatIndex = 0, this.prevTime = 0, this.markers = [], this.labels = /* @__PURE__ */ new Map(), this.totalDuration = 0, this.isDirty = !1, this.isDone = !1, this.isRebuilding = !1, this.playbackSpeed = 1, this.isWrapped = !1, this.stop = () => {
this.flush(), this.group?.stop();
- }, this.isPaused = t.autoplay === !1, this.newFinished(), e.forEach((e) => this.add(e)), n ? (this.isDirty = !1, this.isWrapped = !0, this.group = new Sh(n), this.watch()) : (this.invalidate(), this.flush());
+ }, this.isPaused = t.autoplay === !1, this.newFinished(), e.forEach((e) => this.add(e)), n ? (this.isDirty = !1, this.isWrapped = !0, this.group = new Lh(n), this.watch()) : (this.invalidate(), this.flush());
let { scope: r } = t;
- r && (r.animations.push(this), this.finished.then(() => Eu(r.animations, this)));
+ r && (r.animations.push(this), this.finished.then(() => Bu(r.animations, this)));
}
add(t, n) {
return t instanceof e && t.adopt(this), this.push({
@@ -20112,7 +20146,7 @@ var ob = class e {
item: e,
at: t,
marker: {
- name: "_m" + rb++,
+ name: "_m" + lb++,
time: 0,
callback: e
}
@@ -20123,7 +20157,7 @@ var ob = class e {
item: t || {},
at: e,
marker: {
- name: "_m" + rb++,
+ name: "_m" + lb++,
time: 0,
callback: t,
pause: !0
@@ -20217,42 +20251,42 @@ var ob = class e {
this.isDirty && !this.parent && this.build();
}
adopt(e) {
- this.group &&= (ab(this.group), void 0), this.isDirty = !1, this.parent = e;
+ this.group &&= (db(this.group), void 0), this.isDirty = !1, this.parent = e;
}
build() {
this.isDirty = !1, this.isWrapped = !1;
let e = this.group, t = 0;
- e && (this.isRebuilding = !0, this.scrollTimeline ? (this.detachScroll?.(), e.cancel()) : (t = e.animations.length ? e.time : 0, ab(e)), this.isRebuilding = !1);
+ e && (this.isRebuilding = !0, this.scrollTimeline ? (this.detachScroll?.(), e.cancel()) : (t = e.animations.length ? e.time : 0, db(e)), this.isRebuilding = !1);
let { defaultTransition: n, onComplete: r, onUpdate: i, onRepeat: a, onReverseComplete: o, autoplay: s, scope: c, ...l } = this.options, u = {};
c?.reduceMotion !== void 0 && (u.reduceMotion = c.reduceMotion), c?.skipAnimations !== void 0 && (u.skipAnimations = c.skipAnimations), Object.assign(u, l);
- let d = /* @__PURE__ */ new Map(), f = {}, p = ure(this.toSequence(d), {
+ let d = /* @__PURE__ */ new Map(), f = {}, p = yre(this.toSequence(d), {
defaultTransition: n,
...u
}, c, f), m = f.labels, h = u.duration ?? f.duration, g = f.duration ? h / f.duration : 1;
if (m.forEach((e, t) => m.set(t, e * g)), this.markers = [], d.forEach((e, t) => {
e.time = m.get(t), m.delete(t), h = Math.max(h, e.time), this.markers.push(e);
}), this.markers.sort((e, t) => e.time - t.time), this.labels = m, this.totalDuration = h, this.clock = this.clockAnimation = void 0, this.markers.length || this.stopAt !== void 0 || i || a) {
- let e = this.clock = jh(0);
- e.on("change", (t) => e === this.clock && this.onClock(t)), p.unshift(this.clockAnimation = e_(e, [0, h], {
+ let e = this.clock = Kh(0);
+ e.on("change", (t) => e === this.clock && this.onClock(t)), p.unshift(this.clockAnimation = s_(e, [0, h], {
...u,
duration: h,
ease: "linear"
}));
}
- let _ = this.group = new Sh(p);
+ let _ = this.group = new Lh(p);
t = Math.min(t, h), this.isDone && t < h && this.newFinished(), this.scrollTimeline ? this.detachScroll = _.attachTimeline(this.scrollTimeline) : (_.speed = this.playbackSpeed, this.isPaused && _.pause(), t && (_.time = t)), this.repeatIndex = this.currentRepeat(), this.prevTime = t || -1, this.watch();
}
toSequence(t) {
- return this.entries.map(({ item: n, at: r, marker: i }) => i ? (t.set(i.name, i), ib(i.name, r)) : n instanceof e ? {
+ return this.entries.map(({ item: n, at: r, marker: i }) => i ? (t.set(i.name, i), ub(i.name, r)) : n instanceof e ? {
sequence: n.toSequence(t),
at: r
- } : typeof n == "string" ? ib(n, r) : r === void 0 ? n : Array.isArray(n) ? dre(n, r) : {
+ } : typeof n == "string" ? ub(n, r) : r === void 0 ? n : Array.isArray(n) ? bre(n, r) : {
...n,
at: r
});
}
resolve(e) {
- return this.flush(), typeof e == "number" ? e : $y(e, this.labels) ?? this.time;
+ return this.flush(), typeof e == "number" ? e : ab(e, this.labels) ?? this.time;
}
currentRepeat() {
let { repeat: e = 0, repeatDelay: t = 0, delay: n = 0 } = this.options, r = this.totalDuration + t, i = (this.clockAnimation?.time ?? 0) - n;
@@ -20296,16 +20330,16 @@ var ob = class e {
}
};
// node_modules/framer-motion/dist/es/animation/animate/index.mjs
-function sb(e) {
+function pb(e) {
return Array.isArray(e) && e.some(Array.isArray);
}
-function cb(e = {}) {
+function mb(e = {}) {
let { scope: t, reduceMotion: n, skipAnimations: r } = e;
function i(e, i, a) {
- let o = yg.current, s = o?.transition, c = {};
+ let o = Eg.current, s = o?.transition, c = {};
n !== void 0 && (c.reduceMotion = n), r !== void 0 && (c.skipAnimations = r);
let l;
- if (sb(e)) {
+ if (pb(e)) {
let n = {
...c,
...i,
@@ -20314,14 +20348,14 @@ function cb(e = {}) {
s && (n.defaultTransition = {
...s,
...n.defaultTransition
- }), l = new ob(e, n);
+ }), l = new fb(e, n);
} else {
let { onComplete: n, ...r } = a || {}, o = {
...c,
...s,
...r
}, { onUpdate: u } = r;
- l = new ob([typeof e == "number" || typeof e == "string" && (typeof i == "string" || Array.isArray(i)) ? [
+ l = new fb([typeof e == "number" || typeof e == "string" && (typeof i == "string" || Array.isArray(i)) ? [
u || (() => {}),
Array.isArray(i) ? i : [e, i],
{
@@ -20336,29 +20370,29 @@ function cb(e = {}) {
...c,
onComplete: n,
scope: t
- }, nb(e, i, o, t));
+ }, cb(e, i, o, t));
}
return o && l.finished.then(o.add(() => l.stop())), l;
}
return i;
}
-var lb = /* @__PURE__ */ Object.assign(/* @__PURE__ */ cb(), {
- addEffect: lee,
- removeEffect: pg
+var hb = /* @__PURE__ */ Object.assign(/* @__PURE__ */ mb(), {
+ addEffect: _ee,
+ removeEffect: bg
});
// node_modules/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs
-function ub(e, t, n, r) {
+function gb(e, t, n, r) {
if (e == null) return [];
- let i = Sg(e, r), a = i.length, o = [];
+ let i = kg(e, r), a = i.length, o = [];
for (let e = 0; e < a; e++) {
let r = i[e], s = { ...n };
typeof s.delay == "function" && (s.delay = s.delay(e, a));
for (let e in t) {
let n = t[e];
Array.isArray(n) || (n = [n]);
- let i = { ...Nh(s, e) };
- i.duration &&= /* @__PURE__ */ Lu(i.duration), i.delay &&= /* @__PURE__ */ Lu(i.delay);
- let a = Th(r), c = wh(e, i.pseudoElement || ""), l = a.get(c);
+ let i = { ...Jh(s, e) };
+ i.duration &&= /* @__PURE__ */ Zu(i.duration), i.delay &&= /* @__PURE__ */ Zu(i.delay);
+ let a = Bh(r), c = zh(e, i.pseudoElement || ""), l = a.get(c);
l && l.stop(), o.push({
map: a,
key: c,
@@ -20374,21 +20408,21 @@ function ub(e, t, n, r) {
}
for (let e = 0; e < o.length; e++) {
let { unresolvedKeyframes: t, options: n } = o[e], { element: r, name: i, pseudoElement: a } = n;
- !a && t[0] === null && (t[0] = sy(r, i)), Gp(t), cee(t, i), !a && t.length < 2 && t.unshift(sy(r, i)), n.keyframes = t;
+ !a && t[0] === null && (t[0] = fy(r, i)), om(t), gee(t, i), !a && t.length < 2 && t.unshift(fy(r, i)), n.keyframes = t;
}
let s = [];
for (let e = 0; e < o.length; e++) {
- let { map: t, key: n, options: r } = o[e], i = new Fm(r);
+ let { map: t, key: n, options: r } = o[e], i = new Xm(r);
t.set(n, i), i.finished.finally(() => t.delete(n)), s.push(i);
}
return s;
}
-var db = /*@__PURE__*/ ((e) => {
+var _b = /*@__PURE__*/ ((e) => {
function t(t, n, r) {
- return new Sh(ub(t, n, r, e));
+ return new Lh(gb(t, n, r, e));
}
return t;
-})(), fb = Yne, pb = class {
+})(), vb = ire, yb = class {
constructor(e) {
this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = this.constructor.type, this.key = e;
}
@@ -20403,22 +20437,22 @@ var db = /*@__PURE__*/ ((e) => {
let r = this.clone();
return t.addDescendants(r, e), r;
}
-}, mb = class extends pb {
+}, bb = class extends yb {
filter(e, t, n) {
- let [r, i] = yb(e, t, this.firstChildKey, n), a = this.clone();
+ let [r, i] = Tb(e, t, this.firstChildKey, n), a = this.clone();
return a.firstChildKey = r, a.lastChildKey = i, a;
}
};
-(class extends pb {
+(class extends yb {
static {
this.type = "header";
}
});
-var hb = class extends pb {
+var xb = class extends yb {
static {
this.type = "loader";
}
-}, gb = class extends mb {
+}, Sb = class extends bb {
static {
this.type = "item";
}
@@ -20429,7 +20463,7 @@ var hb = class extends pb {
}
return null;
}
-}, _b = class extends mb {
+}, Cb = class extends bb {
static {
this.type = "section";
}
@@ -20441,7 +20475,7 @@ var hb = class extends pb {
}
return null;
}
-}, vb = class {
+}, wb = class {
get size() {
return this.itemCount;
}
@@ -20516,14 +20550,14 @@ var hb = class extends pb {
this.firstKey = e, this.lastKey = t, this.frozen = !n;
}
filter(e) {
- let t = new this.constructor(), [n, r] = yb(this, t, this.firstKey, e);
+ let t = new this.constructor(), [n, r] = Tb(this, t, this.firstKey, e);
return t?.commit(n, r), t;
}
constructor() {
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1, this.itemCount = 0;
}
};
-function yb(e, t, n, r) {
+function Tb(e, t, n, r) {
if (n == null) return [null, null];
let i = null, a = null, o = e.getItem(n);
for (; o != null;) {
@@ -20537,7 +20571,7 @@ function yb(e, t, n, r) {
return [i?.key ?? null, a?.key ?? null];
}
// node_modules/react-aria/dist/private/collections/Document.mjs
-var bb = class {
+var Eb = class {
constructor(e) {
this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = e;
}
@@ -20618,7 +20652,7 @@ var bb = class {
for (; e && e.isHidden;) e = e.previousSibling;
return e;
}
-}, xb = class e extends bb {
+}, Db = class e extends Eb {
constructor(e, t) {
super(t), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.isHidden = !1, this.node = null;
}
@@ -20669,7 +20703,7 @@ var bb = class {
setAttribute() {}
setAttributeNS() {}
removeAttribute() {}
-}, fre = class extends bb {
+}, Ob = class extends Eb {
constructor(e) {
super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.keyOwners = /* @__PURE__ */ new Map(), this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = e, this.nextCollection = e;
}
@@ -20677,7 +20711,7 @@ var bb = class {
return !0;
}
createElement(e) {
- return new xb(e, this);
+ return new Db(e, this);
}
getMutableCollection() {
return this.nextCollection ||= this.collection.clone(), this.nextCollection;
@@ -20699,8 +20733,8 @@ var bb = class {
return this.inSubscription || (this.queuedRender = !1, this.updateCollection()), this.collection;
}
updateCollection() {
- for (let e of this.dirtyNodes) e instanceof xb && (!e.isConnected || e.isHidden) ? this.removeNode(e) : e.updateChildIndices();
- for (let e of this.dirtyNodes) e instanceof xb ? (e.isConnected && !e.isHidden && (e.updateNode(), this.addNode(e)), e.node && this.dirtyNodes.delete(e), e.isMutated = !1) : this.dirtyNodes.delete(e);
+ for (let e of this.dirtyNodes) e instanceof Db && (!e.isConnected || e.isHidden) ? this.removeNode(e) : e.updateChildIndices();
+ for (let e of this.dirtyNodes) e instanceof Db ? (e.isConnected && !e.isHidden && (e.updateNode(), this.addNode(e)), e.node && this.dirtyNodes.delete(e), e.isMutated = !1) : this.dirtyNodes.delete(e);
this.nextCollection && (this.nextCollection.commit(this.firstVisibleChild?.node?.key ?? null, this.lastVisibleChild?.node?.key ?? null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null));
}
queueUpdate() {
@@ -20718,13 +20752,13 @@ var bb = class {
}
};
// node_modules/react-aria/dist/private/collections/useCachedChildren.mjs
-function Sb(e) {
+function kb(e) {
let { children: t, items: n, idScope: r, addIdAndValue: i, dependencies: a = [] } = e, o = (0, P.useMemo)(() => void 0, [t]), s = (0, P.useMemo)(() => /* @__PURE__ */ new WeakMap(), [...a, o]);
return (0, P.useMemo)(() => {
if (n && typeof t == "function") {
let e = [];
for (let a of n) {
- let n = pre(a) ? a : null, o = n ? s.get(n) : null;
+ let n = xre(a) ? a : null, o = n ? s.get(n) : null;
if (!o) {
o = t(a);
let c = o.props.id ?? a?.key ?? a?.id;
@@ -20749,7 +20783,7 @@ function Sb(e) {
i
]);
}
-function pre(e) {
+function xre(e) {
switch (typeof e) {
case "object": return e != null;
case "function":
@@ -20758,24 +20792,24 @@ function pre(e) {
}
}
// node_modules/react-aria/dist/private/utils/focusWithoutScrolling.mjs
-function Cb(e) {
+function Ab(e) {
e.focus({ preventScroll: !0 });
}
// node_modules/react-aria/dist/private/utils/domHelpers.mjs
-var wb = (e) => mre(e) ? e.document : hre(e) ? e : e?.ownerDocument ?? (typeof document < "u" ? document : void 0), Tb = (e) => wb(e)?.defaultView ?? (typeof window < "u" ? window : void 0);
-function Eb(e) {
+var jb = (e) => Sre(e) ? e.document : Cre(e) ? e : e?.ownerDocument ?? (typeof document < "u" ? document : void 0), Mb = (e) => jb(e)?.defaultView ?? (typeof window < "u" ? window : void 0);
+function Nb(e) {
return typeof e == "object" && !!e && "nodeType" in e && typeof e.nodeType == "number";
}
-function mre(e) {
+function Sre(e) {
return typeof e == "object" && !!e && "window" in e && e.window === e;
}
-function hre(e) {
- return Eb(e) && e.nodeType === 9;
+function Cre(e) {
+ return Nb(e) && e.nodeType === 9;
}
-function Db(e) {
- return Eb(e) && e.nodeType === 11 && "host" in e;
+function Pb(e) {
+ return Nb(e) && e.nodeType === 11 && "host" in e;
}
-function Ob(e, t, n, r) {
+function Fb(e, t, n, r) {
if (n == null || e == null) return () => {};
let i = Array.isArray(e) ? e : [e];
for (let e of i) e.addEventListener(t, n, r);
@@ -20783,7 +20817,7 @@ function Ob(e, t, n, r) {
for (let e of i) e.removeEventListener(t, n, r);
};
}
-function kb(e, t, n, r) {
+function Ib(e, t, n, r) {
if (e == null) return () => {};
let i = [], a = Array.isArray(e) ? e : [e];
for (let e of a) {
@@ -20797,70 +20831,70 @@ function kb(e, t, n, r) {
};
}
// node_modules/react-stately/dist/private/flags/flags.mjs
-var gre = !1;
-function Ab() {
- return gre;
+var wre = !1;
+function Lb() {
+ return wre;
}
// node_modules/react-aria/dist/private/utils/shadowdom/DOMFunctions.mjs
-function jb(e, t) {
- if (!Ab()) return t && e ? e.contains(t) : !1;
+function Rb(e, t) {
+ if (!Lb()) return t && e ? e.contains(t) : !1;
if (!e || !t) return !1;
let n = t;
for (; n != null;) {
if (n === e) return !0;
- n = typeof n.assignedElements != "function" && n.assignedSlot?.parentNode ? n.assignedSlot.parentNode : Db(n) ? n.host : n.parentNode;
+ n = typeof n.assignedElements != "function" && n.assignedSlot?.parentNode ? n.assignedSlot.parentNode : Pb(n) ? n.host : n.parentNode;
}
return !1;
}
-var Mb = (e = document) => {
- if (!Ab()) return e.activeElement;
+var zb = (e = document) => {
+ if (!Lb()) return e.activeElement;
let t = e.activeElement;
for (; t && "shadowRoot" in t && t.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
return t;
};
function G(e) {
- if (Ab() && e.target instanceof Element && e.target.shadowRoot) {
+ if (Lb() && e.target instanceof Element && e.target.shadowRoot) {
if ("composedPath" in e) return e.composedPath()[0] ?? null;
if ("composedPath" in e.nativeEvent) return e.nativeEvent.composedPath()[0] ?? null;
}
return e.target;
}
-function Nb(e, t) {
+function Bb(e, t) {
if (t === null) return [];
- t ??= Tb(e);
+ t ??= Mb(e);
let n = [t];
- if (!Ab() || !e || e === t) return n;
+ if (!Lb() || !e || e === t) return n;
let r = "getRootNode" in t ? t.getRootNode() : null, i = e.getRootNode() ?? null;
- for (; Db(i) && i !== r;) n.push(i), i = i.host.getRootNode();
+ for (; Pb(i) && i !== r;) n.push(i), i = i.host.getRootNode();
return n;
}
-function Pb(e) {
+function Vb(e) {
if (!e) return !1;
- let t = e.getRootNode(), n = Tb(e);
+ let t = e.getRootNode(), n = Mb(e);
if (!(t instanceof n.Document || t instanceof n.ShadowRoot)) return !1;
let r = t.activeElement;
return r != null && e.contains(r);
}
// node_modules/react-aria/dist/private/utils/isElementVisible.mjs
-var _re = typeof Element < "u" && "checkVisibility" in Element.prototype;
-function vre(e) {
- let t = Tb(e);
+var Tre = typeof Element < "u" && "checkVisibility" in Element.prototype;
+function Ere(e) {
+ let t = Mb(e);
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
let { display: n, visibility: r } = e.style, i = n !== "none" && r !== "hidden" && r !== "collapse";
if (i) {
- let { getComputedStyle: t } = Tb(e), { display: n, visibility: r } = t(e);
+ let { getComputedStyle: t } = Mb(e), { display: n, visibility: r } = t(e);
i = n !== "none" && r !== "hidden" && r !== "collapse";
}
return i;
}
-function yre(e, t) {
+function Dre(e, t) {
return !e.hasAttribute("hidden") && !e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
}
-function Fb(e, t) {
- return _re ? e.checkVisibility({ visibilityProperty: !0 }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && vre(e) && yre(e, t) && (!e.parentElement || Fb(e.parentElement, e));
+function Hb(e, t) {
+ return Tre ? e.checkVisibility({ visibilityProperty: !0 }) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && Ere(e) && Dre(e, t) && (!e.parentElement || Hb(e.parentElement, e));
}
// node_modules/react-aria/dist/private/utils/isFocusable.mjs
-var Ib = [
+var Ub = [
"input:not([disabled]):not([type=hidden])",
"select:not([disabled])",
"textarea:not([disabled])",
@@ -20875,39 +20909,39 @@ var Ib = [
"video[controls]",
"[contenteditable]:not([contenteditable^=\"false\"])",
"permission"
-], bre = Ib.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
-Ib.push("[tabindex]:not([tabindex=\"-1\"]):not([disabled])");
-var xre = Ib.join(":not([hidden]):not([tabindex=\"-1\"]),");
-function Lb(e, t) {
- return e.matches(bre) && !zb(e) && (t?.skipVisibilityCheck || Fb(e));
+], Ore = Ub.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
+Ub.push("[tabindex]:not([tabindex=\"-1\"]):not([disabled])");
+var kre = Ub.join(":not([hidden]):not([tabindex=\"-1\"]),");
+function Wb(e, t) {
+ return e.matches(Ore) && !Kb(e) && (t?.skipVisibilityCheck || Hb(e));
}
-function Rb(e) {
- return e.matches(xre) && Fb(e) && !zb(e);
+function Gb(e) {
+ return e.matches(kre) && Hb(e) && !Kb(e);
}
-function zb(e) {
+function Kb(e) {
let t = e;
for (; t != null;) {
- if (t instanceof Tb(t).HTMLElement && t.inert) return !0;
+ if (t instanceof Mb(t).HTMLElement && t.inert) return !0;
t = t.parentElement;
}
return !1;
}
// node_modules/react-aria/dist/private/utils/useLayoutEffect.mjs
-var Bb = typeof document < "u" ? P.useLayoutEffect : () => {};
+var qb = typeof document < "u" ? P.useLayoutEffect : () => {};
// node_modules/react-aria/dist/private/interactions/utils.mjs
-function Vb(e) {
+function Jb(e) {
let t = e;
return t.nativeEvent = e, t.isDefaultPrevented = () => t.defaultPrevented, t.isPropagationStopped = () => t.cancelBubble, t.persist = () => {}, t;
}
-function Hb(e, t) {
+function Yb(e, t) {
Object.defineProperty(e, "target", { value: t }), Object.defineProperty(e, "currentTarget", { value: t });
}
-function Ub(e) {
+function Xb(e) {
let t = (0, P.useRef)({
isFocused: !1,
observer: null
});
- return Bb(() => {
+ return qb(() => {
let e = t.current;
return () => {
e.observer &&= (e.observer.disconnect(), null);
@@ -20919,14 +20953,14 @@ function Ub(e) {
let n = r;
n.addEventListener("focusout", (r) => {
if (t.current.isFocused = !1, n.disabled) {
- let t = Vb(r);
+ let t = Jb(r);
e?.(t);
}
t.current.observer && (t.current.observer.disconnect(), t.current.observer = null);
}, { once: !0 }), t.current.observer = new MutationObserver(() => {
if (t.current.isFocused && n.disabled) {
t.current.observer?.disconnect();
- let e = n === Mb() ? null : Mb();
+ let e = n === zb() ? null : zb();
n.dispatchEvent(new FocusEvent("blur", { relatedTarget: e })), n.dispatchEvent(new FocusEvent("focusout", {
bubbles: !0,
relatedTarget: e
@@ -20939,80 +20973,80 @@ function Ub(e) {
}
}, [e]);
}
-var Wb = !1;
-function Sre(e) {
- for (; e && !Lb(e, { skipVisibilityCheck: !0 });) e = e.parentElement;
- let t = Mb(Tb(e).document);
+var Zb = !1;
+function Are(e) {
+ for (; e && !Wb(e, { skipVisibilityCheck: !0 });) e = e.parentElement;
+ let t = zb(Mb(e).document);
if (!t || t === e) return;
- let n = e?.getRootNode(), r = n != null && Db(n) ? n : Tb(e), i = (t) => t === e || Eb(t) && jb(e, t), a = (e) => e === t || t != null && Eb(e) && jb(t, e);
- Wb = !0;
+ let n = e?.getRootNode(), r = n != null && Pb(n) ? n : Mb(e), i = (t) => t === e || Nb(t) && Rb(e, t), a = (e) => e === t || t != null && Nb(e) && Rb(t, e);
+ Zb = !0;
let o = !1, s = (e) => {
(a(G(e)) || o) && e.stopImmediatePropagation();
}, c = (n) => {
- (a(G(n)) || o) && (n.stopImmediatePropagation(), !e && !o && (o = !0, Cb(t), d()));
+ (a(G(n)) || o) && (n.stopImmediatePropagation(), !e && !o && (o = !0, Ab(t), d()));
}, l = (e) => {
(i(G(e)) || o) && e.stopImmediatePropagation();
}, u = (e) => {
- (i(G(e)) || o) && (e.stopImmediatePropagation(), o || (o = !0, Cb(t), d()));
+ (i(G(e)) || o) && (e.stopImmediatePropagation(), o || (o = !0, Ab(t), d()));
};
r.addEventListener("blur", s, !0), r.addEventListener("focusout", c, !0), r.addEventListener("focusin", u, !0), r.addEventListener("focus", l, !0);
let d = () => {
- cancelAnimationFrame(f), r.removeEventListener("blur", s, !0), r.removeEventListener("focusout", c, !0), r.removeEventListener("focusin", u, !0), r.removeEventListener("focus", l, !0), Wb = !1, o = !1;
+ cancelAnimationFrame(f), r.removeEventListener("blur", s, !0), r.removeEventListener("focusout", c, !0), r.removeEventListener("focusin", u, !0), r.removeEventListener("focus", l, !0), Zb = !1, o = !1;
}, f = requestAnimationFrame(d);
return d;
}
// node_modules/react-aria/dist/private/utils/platform.mjs
-function Gb(e) {
+function Qb(e) {
if (typeof window > "u" || window.navigator == null) return !1;
let t = window.navigator.userAgentData?.brands;
return Array.isArray(t) && t.some((t) => e.test(t.brand)) || e.test(window.navigator.userAgent);
}
-function Kb(e) {
+function $b(e) {
return typeof window < "u" && window.navigator != null && e.test(window.navigator.userAgentData?.platform || window.navigator.platform);
}
-function qb(e) {
+function ex(e) {
let t = null;
return () => (t ??= e(), t);
}
-var Jb = qb(function() {
- return Kb(/^Mac/i);
-}), Cre = qb(function() {
- return Kb(/^iPhone/i);
-}), Yb = qb(function() {
- return Kb(/^iPad/i) || Jb() && navigator.maxTouchPoints > 1;
-}), Xb = qb(function() {
- return Cre() || Yb();
-}), wre = qb(function() {
- return Jb() || Xb();
-}), Zb = qb(function() {
- return Gb(/AppleWebKit/i) && (Xb() || !Qb());
-}), Qb = qb(function() {
- return Gb(/Chrome|CriOS|CrMo/i);
-}), $b = qb(function() {
- return Gb(/Android/i);
+var tx = ex(function() {
+ return $b(/^Mac/i);
+}), jre = ex(function() {
+ return $b(/^iPhone/i);
+}), nx = ex(function() {
+ return $b(/^iPad/i) || tx() && navigator.maxTouchPoints > 1;
+}), rx = ex(function() {
+ return jre() || nx();
+}), Mre = ex(function() {
+ return tx() || rx();
+}), ix = ex(function() {
+ return Qb(/AppleWebKit/i) && (rx() || !ax());
+}), ax = ex(function() {
+ return Qb(/Chrome|CriOS|CrMo/i);
+}), ox = ex(function() {
+ return Qb(/Android/i);
});
// node_modules/react-aria/dist/private/utils/isVirtualEvent.mjs
-function ex(e) {
- return e.pointerType === "" && e.isTrusted ? !0 : $b() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
+function sx(e) {
+ return e.pointerType === "" && e.isTrusted ? !0 : ox() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
}
-function Tre(e) {
- return !$b() && e.width === 0 && e.height === 0 || $b() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
+function Nre(e) {
+ return !ox() && e.width === 0 && e.height === 0 || ox() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse";
}
// node_modules/react-aria/dist/private/utils/openLink.mjs
-var Ere = /*#__PURE__*/ (0, P.createContext)({
+var Pre = /*#__PURE__*/ (0, P.createContext)({
isNative: !0,
- open: kre,
+ open: Lre,
useHref: (e) => e
});
-function tx() {
- return (0, P.useContext)(Ere);
+function cx() {
+ return (0, P.useContext)(Pre);
}
-function Dre(e, t) {
+function Fre(e, t) {
let n = e.getAttribute("target");
return (!n || n === "_self") && e.origin === location.origin && !e.hasAttribute("download") && !t.metaKey && !t.ctrlKey && !t.altKey && !t.shiftKey;
}
-function nx(e, t, n = !0) {
- let { metaKey: r, ctrlKey: i, altKey: a, shiftKey: o } = t, s = Zb() && Jb() && !Yb() ? new KeyboardEvent("keydown", {
+function lx(e, t, n = !0) {
+ let { metaKey: r, ctrlKey: i, altKey: a, shiftKey: o } = t, s = ix() && tx() && !nx() ? new KeyboardEvent("keydown", {
keyIdentifier: "Enter",
metaKey: r,
ctrlKey: i,
@@ -21027,21 +21061,21 @@ function nx(e, t, n = !0) {
bubbles: !0,
cancelable: !0
});
- nx.isOpening = n, Cb(e), e.dispatchEvent(s), nx.isOpening = !1;
+ lx.isOpening = n, Ab(e), e.dispatchEvent(s), lx.isOpening = !1;
}
-nx.isOpening = !1;
-function Ore(e, t) {
+lx.isOpening = !1;
+function Ire(e, t) {
if (e instanceof HTMLAnchorElement) t(e);
else if (e.hasAttribute("data-href")) {
let n = document.createElement("a");
n.href = e.getAttribute("data-href"), e.hasAttribute("data-target") && (n.target = e.getAttribute("data-target")), e.hasAttribute("data-rel") && (n.rel = e.getAttribute("data-rel")), e.hasAttribute("data-download") && (n.download = e.getAttribute("data-download")), e.hasAttribute("data-ping") && (n.ping = e.getAttribute("data-ping")), e.hasAttribute("data-referrer-policy") && (n.referrerPolicy = e.getAttribute("data-referrer-policy")), e.appendChild(n), t(n), e.removeChild(n);
}
}
-function kre(e, t) {
- Ore(e, (e) => nx(e, t));
+function Lre(e, t) {
+ Ire(e, (e) => lx(e, t));
}
-function rx(e) {
- let t = tx().useHref(e.href ?? "");
+function ux(e) {
+ let t = cx().useHref(e.href ?? "");
return {
"data-href": e.href ? t : void 0,
"data-target": e.target,
@@ -21051,8 +21085,8 @@ function rx(e) {
"data-referrer-policy": e.referrerPolicy
};
}
-function ix(e) {
- let t = tx().useHref(e?.href ?? ""), n = {};
+function dx(e) {
+ let t = cx().useHref(e?.href ?? ""), n = {};
if (e) for (let r of [
"href",
"target",
@@ -21063,138 +21097,138 @@ function ix(e) {
]) r in e && e[r] !== void 0 && (n[r] = r === "href" ? t : e[r]);
return n;
}
-function Are(e, t, n, r) {
- !t.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && !e.isDefaultPrevented() && Dre(e.currentTarget, e) && n && (e.preventDefault(), t.open(e.currentTarget, e, n, r));
+function Rre(e, t, n, r) {
+ !t.isNative && e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.href && !e.isDefaultPrevented() && Fre(e.currentTarget, e) && n && (e.preventDefault(), t.open(e.currentTarget, e, n, r));
}
// node_modules/react-aria/dist/private/ssr/SSRProvider.mjs
-var ax = {
+var fx = {
prefix: String(Math.round(Math.random() * 1e10)),
current: 0
-}, ox = /*#__PURE__*/ P.createContext(ax), jre = /*#__PURE__*/ P.createContext(!1);
+}, px = /*#__PURE__*/ P.createContext(fx), zre = /*#__PURE__*/ P.createContext(!1);
typeof window < "u" && window.document && window.document.createElement;
-var sx = /* @__PURE__ */ new WeakMap();
-function Mre(e = !1) {
- let t = (0, P.useContext)(ox), n = (0, P.useRef)(null);
+var mx = /* @__PURE__ */ new WeakMap();
+function Bre(e = !1) {
+ let t = (0, P.useContext)(px), n = (0, P.useRef)(null);
if (n.current === null && !e) {
let e = P.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;
if (e) {
- let n = sx.get(e);
- n == null ? sx.set(e, {
+ let n = mx.get(e);
+ n == null ? mx.set(e, {
id: t.current,
state: e.memoizedState
- }) : e.memoizedState !== n.state && (t.current = n.id, sx.delete(e));
+ }) : e.memoizedState !== n.state && (t.current = n.id, mx.delete(e));
}
n.current = ++t.current;
}
return n.current;
}
-function Nre(e) {
- let t = (0, P.useContext)(ox), n = Mre(!!e), r = `react-aria${t.prefix}`;
+function Vre(e) {
+ let t = (0, P.useContext)(px), n = Bre(!!e), r = `react-aria${t.prefix}`;
return e || `${r}-${n}`;
}
-function Pre(e) {
- let t = P.useId(), [n] = (0, P.useState)(cx()), r = n ? "react-aria" : `react-aria${ax.prefix}`;
+function Hre(e) {
+ let t = P.useId(), [n] = (0, P.useState)(hx()), r = n ? "react-aria" : `react-aria${fx.prefix}`;
return e || `${r}-${t}`;
}
-var Fre = typeof P.useId == "function" ? Pre : Nre;
-function Ire() {
+var Ure = typeof P.useId == "function" ? Hre : Vre;
+function Wre() {
return !1;
}
-function Lre() {
+function Gre() {
return !0;
}
-function Rre(e) {
+function Kre(e) {
return () => {};
}
-function cx() {
- return typeof P.useSyncExternalStore == "function" ? P.useSyncExternalStore(Rre, Ire, Lre) : (0, P.useContext)(jre);
+function hx() {
+ return typeof P.useSyncExternalStore == "function" ? P.useSyncExternalStore(Kre, Wre, Gre) : (0, P.useContext)(zre);
}
// node_modules/react-aria/dist/private/interactions/useFocusVisible.mjs
-var lx = null, ux = /* @__PURE__ */ new Set(), dx = /* @__PURE__ */ new Map(), fx = !1, px = !1, zre = {
+var gx = null, _x = /* @__PURE__ */ new Set(), vx = /* @__PURE__ */ new Map(), yx = !1, bx = !1, qre = {
Tab: !0,
Escape: !0
};
-function mx(e, t) {
- for (let n of ux) n(e, t);
+function xx(e, t) {
+ for (let n of _x) n(e, t);
}
-function Bre(e) {
- return !(e.metaKey || !Jb() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
+function Jre(e) {
+ return !(e.metaKey || !tx() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
}
-function hx(e) {
- fx = !0, !nx.isOpening && Bre(e) && (lx = "keyboard", mx("keyboard", e));
+function Sx(e) {
+ yx = !0, !lx.isOpening && Jre(e) && (gx = "keyboard", xx("keyboard", e));
}
-function gx(e) {
- lx = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (fx = !0, mx("pointer", e));
+function Cx(e) {
+ gx = "pointer", "pointerType" in e && e.pointerType, (e.type === "mousedown" || e.type === "pointerdown") && (yx = !0, xx("pointer", e));
}
-function _x(e) {
- !nx.isOpening && ex(e) && (fx = !0, lx = "virtual");
+function wx(e) {
+ !lx.isOpening && sx(e) && (yx = !0, gx = "virtual");
}
-function vx(e) {
- if (Wb) return;
- let t = G(e), n = Tb(t), r = wb(t);
- t === n ? px = !0 : t !== r && e.isTrusted && (!fx && !px && (lx = "virtual", mx("virtual", e)), fx = !1, px = !1);
+function Tx(e) {
+ if (Zb) return;
+ let t = G(e), n = Mb(t), r = jb(t);
+ t === n ? bx = !0 : t !== r && e.isTrusted && (!yx && !bx && (gx = "virtual", xx("virtual", e)), yx = !1, bx = !1);
}
-function yx() {
- Wb || (fx = !1, px = !0);
+function Ex() {
+ Zb || (yx = !1, bx = !0);
}
-function bx(e) {
- let t = Mb(wb(G(e)));
+function Dx(e) {
+ let t = zb(jb(G(e)));
queueMicrotask(() => {
- Mb(wb(G(e))) !== t && Tx("keyboard");
+ zb(jb(G(e))) !== t && Mx("keyboard");
});
}
-function xx(e) {
+function Ox(e) {
if (typeof window > "u" || typeof document > "u") return;
- let t = Tb(e), n = wb(e);
- if (dx.get(t)) return;
+ let t = Mb(e), n = jb(e);
+ if (vx.get(t)) return;
let r = t.HTMLElement.prototype.focus;
Reflect.defineProperty(t.HTMLElement.prototype, "focus", {
configurable: !0,
writable: !0,
value: function() {
- fx = !0, r.apply(this, arguments);
+ yx = !0, r.apply(this, arguments);
}
- }), n.addEventListener("keydown", hx, !0), n.addEventListener("keyup", hx, !0), n.addEventListener("click", _x, !0), n.addEventListener("invalid", bx, !0), t.addEventListener("focus", vx, !0), t.addEventListener("blur", yx, !1), typeof PointerEvent < "u" && (n.addEventListener("pointerdown", gx, !0), n.addEventListener("pointermove", gx, !0), n.addEventListener("pointerup", gx, !0)), t.addEventListener("beforeunload", () => {
- Sx(e);
- }, { once: !0 }), dx.set(t, { focus: r });
+ }), n.addEventListener("keydown", Sx, !0), n.addEventListener("keyup", Sx, !0), n.addEventListener("click", wx, !0), n.addEventListener("invalid", Dx, !0), t.addEventListener("focus", Tx, !0), t.addEventListener("blur", Ex, !1), typeof PointerEvent < "u" && (n.addEventListener("pointerdown", Cx, !0), n.addEventListener("pointermove", Cx, !0), n.addEventListener("pointerup", Cx, !0)), t.addEventListener("beforeunload", () => {
+ kx(e);
+ }, { once: !0 }), vx.set(t, { focus: r });
}
-var Sx = (e, t) => {
- let n = Tb(e), r = wb(e);
- t && r.removeEventListener("DOMContentLoaded", t), dx.has(n) && (Reflect.defineProperty(n.HTMLElement.prototype, "focus", {
+var kx = (e, t) => {
+ let n = Mb(e), r = jb(e);
+ t && r.removeEventListener("DOMContentLoaded", t), vx.has(n) && (Reflect.defineProperty(n.HTMLElement.prototype, "focus", {
configurable: !0,
writable: !0,
- value: dx.get(n).focus
- }), r.removeEventListener("keydown", hx, !0), r.removeEventListener("keyup", hx, !0), r.removeEventListener("click", _x, !0), r.removeEventListener("invalid", bx, !0), n.removeEventListener("focus", vx, !0), n.removeEventListener("blur", yx, !1), typeof PointerEvent < "u" && (r.removeEventListener("pointerdown", gx, !0), r.removeEventListener("pointermove", gx, !0), r.removeEventListener("pointerup", gx, !0)), dx.delete(n));
+ value: vx.get(n).focus
+ }), r.removeEventListener("keydown", Sx, !0), r.removeEventListener("keyup", Sx, !0), r.removeEventListener("click", wx, !0), r.removeEventListener("invalid", Dx, !0), n.removeEventListener("focus", Tx, !0), n.removeEventListener("blur", Ex, !1), typeof PointerEvent < "u" && (r.removeEventListener("pointerdown", Cx, !0), r.removeEventListener("pointermove", Cx, !0), r.removeEventListener("pointerup", Cx, !0)), vx.delete(n));
};
-function Vre(e) {
- let t = wb(e), n;
+function Yre(e) {
+ let t = jb(e), n;
return t.readyState === "loading" ? (n = () => {
- xx(e);
- }, t.addEventListener("DOMContentLoaded", n)) : xx(e), () => Sx(e, n);
+ Ox(e);
+ }, t.addEventListener("DOMContentLoaded", n)) : Ox(e), () => kx(e, n);
}
-typeof document < "u" && Vre();
-function Cx() {
- return lx !== "pointer";
+typeof document < "u" && Yre();
+function Ax() {
+ return gx !== "pointer";
}
-function wx() {
- return lx;
+function jx() {
+ return gx;
}
-function Tx(e) {
- lx = e, mx(e, null);
+function Mx(e) {
+ gx = e, xx(e, null);
}
-function Ex() {
- xx();
- let [e, t] = (0, P.useState)(lx);
+function Nx() {
+ Ox();
+ let [e, t] = (0, P.useState)(gx);
return (0, P.useEffect)(() => {
let e = () => {
- t(lx);
+ t(gx);
};
- return ux.add(e), () => {
- ux.delete(e);
+ return _x.add(e), () => {
+ _x.delete(e);
};
- }, []), cx() ? null : e;
+ }, []), hx() ? null : e;
}
-var Hre = /* @__PURE__ */ new Set([
+var Xre = /* @__PURE__ */ new Set([
"checkbox",
"radio",
"range",
@@ -21205,107 +21239,107 @@ var Hre = /* @__PURE__ */ new Set([
"submit",
"reset"
]);
-function Ure(e, t, n) {
- let r = n ? G(n) : void 0, i = wb(r), a = Tb(r), o = a === void 0 ? HTMLInputElement : a.HTMLInputElement, s = a === void 0 ? HTMLTextAreaElement : a.HTMLTextAreaElement, c = a === void 0 ? HTMLElement : a.HTMLElement, l = a === void 0 ? KeyboardEvent : a.KeyboardEvent, u = Mb(i);
- return e = e || u instanceof o && !Hre.has(u.type) || u instanceof s || u instanceof c && u.isContentEditable, !(e && t === "keyboard" && n instanceof l && !zre[n.key]);
+function Zre(e, t, n) {
+ let r = n ? G(n) : void 0, i = jb(r), a = Mb(r), o = a === void 0 ? HTMLInputElement : a.HTMLInputElement, s = a === void 0 ? HTMLTextAreaElement : a.HTMLTextAreaElement, c = a === void 0 ? HTMLElement : a.HTMLElement, l = a === void 0 ? KeyboardEvent : a.KeyboardEvent, u = zb(i);
+ return e = e || u instanceof o && !Xre.has(u.type) || u instanceof s || u instanceof c && u.isContentEditable, !(e && t === "keyboard" && n instanceof l && !qre[n.key]);
}
-function Dx(e = {}) {
- let { isTextInput: t, autoFocus: n } = e, [r, i] = (0, P.useState)(n || Cx());
- return Ox((e) => {
+function Px(e = {}) {
+ let { isTextInput: t, autoFocus: n } = e, [r, i] = (0, P.useState)(n || Ax());
+ return Fx((e) => {
i(e);
}, [t], { isTextInput: t }), { isFocusVisible: r };
}
-function Ox(e, t, n) {
- xx(), (0, P.useEffect)(() => {
+function Fx(e, t, n) {
+ Ox(), (0, P.useEffect)(() => {
if (n?.enabled === !1) return;
let t = (t, r) => {
- Ure(!!n?.isTextInput, t, r) && e(Cx());
+ Zre(!!n?.isTextInput, t, r) && e(Ax());
};
- return ux.add(t), () => {
- ux.delete(t);
+ return _x.add(t), () => {
+ _x.delete(t);
};
}, t);
}
// node_modules/react-aria/dist/private/utils/runAfterTransition.mjs
-var kx = /* @__PURE__ */ new Map(), Ax = /* @__PURE__ */ new Set();
-function jx(e) {
+var Ix = /* @__PURE__ */ new Map(), Lx = /* @__PURE__ */ new Set();
+function Rx(e) {
return "propertyName" in e;
}
-function Wre(e) {
+function Qre(e) {
let t = G(e);
- if (!jx(e) || !t) return;
- let n = kx.get(t);
- n || (n = /* @__PURE__ */ new Set(), kx.set(t, n), t.addEventListener("transitioncancel", Mx, { once: !0 })), n.add(e.propertyName);
+ if (!Rx(e) || !t) return;
+ let n = Ix.get(t);
+ n || (n = /* @__PURE__ */ new Set(), Ix.set(t, n), t.addEventListener("transitioncancel", zx, { once: !0 })), n.add(e.propertyName);
}
-function Mx(e) {
+function zx(e) {
let t = G(e);
- if (!jx(e) || !t) return;
- let n = kx.get(t);
- if (n && (n.delete(e.propertyName), n.size === 0 && (t.removeEventListener("transitioncancel", Mx), kx.delete(t)), kx.size === 0)) for (let e of Ax) e(!0), Ax.delete(e);
+ if (!Rx(e) || !t) return;
+ let n = Ix.get(t);
+ if (n && (n.delete(e.propertyName), n.size === 0 && (t.removeEventListener("transitioncancel", zx), Ix.delete(t)), Ix.size === 0)) for (let e of Lx) e(!0), Lx.delete(e);
}
-function Nx() {
- Ob(document, "transitionrun", Wre), Ob(document, "transitionend", Mx);
+function Bx() {
+ Fb(document, "transitionrun", Qre), Fb(document, "transitionend", zx);
}
-function Gre() {
- for (let [e] of kx) "isConnected" in e && !e.isConnected && kx.delete(e);
+function $re() {
+ for (let [e] of Ix) "isConnected" in e && !e.isConnected && Ix.delete(e);
}
-typeof document < "u" && (document.readyState === "loading" ? Ob(document, "DOMContentLoaded", Nx) : Nx());
-function Px(e) {
+typeof document < "u" && (document.readyState === "loading" ? Fb(document, "DOMContentLoaded", Bx) : Bx());
+function Vx(e) {
let t = window.requestAnimationFrame(() => {
- if (Gre(), kx.size === 0) return e(!1);
- Ax.add(e);
+ if ($re(), Ix.size === 0) return e(!1);
+ Lx.add(e);
});
return () => {
- window.cancelAnimationFrame(t), Ax.delete(e);
+ window.cancelAnimationFrame(t), Lx.delete(e);
};
}
// node_modules/react-aria/dist/private/interactions/focusSafely.mjs
-function Fx(e) {
+function Hx(e) {
if (!e.isConnected) return;
- let t = wb(e);
- if (wx() === "virtual") {
- let n = Mb(t);
- Px(() => {
- let r = Mb(t);
- (r === n || r === t.body) && e.isConnected && Cb(e);
+ let t = jb(e);
+ if (jx() === "virtual") {
+ let n = zb(t);
+ Vx(() => {
+ let r = zb(t);
+ (r === n || r === t.body) && e.isConnected && Ab(e);
});
- } else Cb(e);
+ } else Ab(e);
}
// node_modules/react-aria/dist/private/utils/chain.mjs
-function Ix(...e) {
+function Ux(...e) {
return (...t) => {
for (let n of e) typeof n == "function" && n(...t);
};
}
// node_modules/react-aria/dist/private/utils/useValueEffect.mjs
-function Kre(e) {
+function eie(e) {
let [t, n] = (0, P.useState)(e), r = (0, P.useRef)(t), i = (0, P.useRef)(null), a = (0, P.useRef)(() => {
if (!i.current) return;
let e = i.current.next();
e.done ? i.current = null : r.current === e.value ? a.current() : n(e.value);
});
- return Bb(() => {
+ return qb(() => {
r.current = t, i.current && a.current();
}), [t, (0, P.useCallback)((e) => {
i.current = e(r.current), a.current();
}, [a])];
}
// node_modules/react-aria/dist/private/utils/useId.mjs
-var qre = !!(typeof window < "u" && window.document && window.document.createElement), Lx = /* @__PURE__ */ new Map(), Rx;
-typeof FinalizationRegistry < "u" && (Rx = new FinalizationRegistry((e) => {
- Lx.delete(e);
+var tie = !!(typeof window < "u" && window.document && window.document.createElement), Wx = /* @__PURE__ */ new Map(), Gx;
+typeof FinalizationRegistry < "u" && (Gx = new FinalizationRegistry((e) => {
+ Wx.delete(e);
}));
-var zx = /* @__PURE__ */ new WeakMap();
-function Bx(e) {
- let [t, n] = (0, P.useState)(e), r = (0, P.useRef)(null), i = Fre(t), a = (0, P.useRef)(null), o = zx.get(a);
- if (Rx && o !== i && (o != null && Rx.unregister(a), Rx.register(a, i, a), zx.set(a, i)), qre) {
- let e = Lx.get(i);
- e && !e.includes(r) ? e.push(r) : Lx.set(i, [r]);
- }
- return Bb(() => {
+var Kx = /* @__PURE__ */ new WeakMap();
+function qx(e) {
+ let [t, n] = (0, P.useState)(e), r = (0, P.useRef)(null), i = Ure(t), a = (0, P.useRef)(null), o = Kx.get(a);
+ if (Gx && o !== i && (o != null && Gx.unregister(a), Gx.register(a, i, a), Kx.set(a, i)), tie) {
+ let e = Wx.get(i);
+ e && !e.includes(r) ? e.push(r) : Wx.set(i, [r]);
+ }
+ return qb(() => {
let e = i;
return () => {
- Rx && (Rx.unregister(a), zx.delete(a)), Lx.delete(e);
+ Gx && (Gx.unregister(a), Kx.delete(a)), Wx.delete(e);
};
}, [i]), (0, P.useEffect)(() => {
let e = r.current;
@@ -21314,57 +21348,57 @@ function Bx(e) {
};
}), i;
}
-function Jre(e, t) {
+function nie(e, t) {
if (e === t) return e;
- let n = Lx.get(e);
+ let n = Wx.get(e);
if (n) return n.forEach((e) => e.current = t), t;
- let r = Lx.get(t);
+ let r = Wx.get(t);
return r ? (r.forEach((t) => t.current = e), e) : t;
}
-function Vx(e = []) {
- let t = Bx(), [n, r] = Kre(t), i = (0, P.useCallback)(() => {
+function Jx(e = []) {
+ let t = qx(), [n, r] = eie(t), i = (0, P.useCallback)(() => {
r(function* () {
yield t, yield document.getElementById(t) ? t : void 0;
});
}, [t, r]);
- return Bb(i, [
+ return qb(i, [
t,
i,
...e
]), n;
}
// node_modules/react-aria/dist/private/utils/mergeRefs.mjs
-function Hx(...e) {
+function Yx(...e) {
return e.length === 1 && e[0] ? e[0] : (t) => {
let n = !1, r = e.map((e) => {
- let r = Ux(e, t);
+ let r = Xx(e, t);
return n ||= typeof r == "function", r;
});
if (n) return () => {
r.forEach((t, n) => {
- typeof t == "function" ? t() : Ux(e[n], null);
+ typeof t == "function" ? t() : Xx(e[n], null);
});
};
};
}
-function Ux(e, t) {
+function Xx(e, t) {
if (typeof e == "function") return e(t);
e != null && (e.current = t);
}
// node_modules/clsx/dist/clsx.mjs
-function Wx(e) {
+function Zx(e) {
var t, n, r = "";
if (typeof e == "string" || typeof e == "number") r += e;
else if (typeof e == "object") {
if (Array.isArray(e)) {
var i = e.length;
- for (t = 0; t < i; t++) e[t] && (n = Wx(e[t])) && (r && (r += " "), r += n);
+ for (t = 0; t < i; t++) e[t] && (n = Zx(e[t])) && (r && (r += " "), r += n);
} else for (n in e) e[n] && (r && (r += " "), r += n);
}
return r;
}
-function Gx() {
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Wx(e)) && (r && (r += " "), r += t);
+function Qx() {
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Zx(e)) && (r && (r += " "), r += t);
return r;
}
// node_modules/react-aria/dist/private/utils/mergeProps.mjs
@@ -21374,17 +21408,17 @@ function K(...e) {
let r = e[n];
for (let e in r) {
let n = t[e], i = r[e];
- typeof n == "function" && typeof i == "function" && e[0] === "o" && e[1] === "n" && e.charCodeAt(2) >= 65 && e.charCodeAt(2) <= 90 ? t[e] = Ix(n, i) : (e === "className" || e === "UNSAFE_className") && typeof n == "string" && typeof i == "string" ? t[e] = Gx(n, i) : e === "id" && n && i ? t.id = Jre(n, i) : e === "ref" && n && i ? t.ref = Hx(n, i) : t[e] = i === void 0 ? n : i;
+ typeof n == "function" && typeof i == "function" && e[0] === "o" && e[1] === "n" && e.charCodeAt(2) >= 65 && e.charCodeAt(2) <= 90 ? t[e] = Ux(n, i) : (e === "className" || e === "UNSAFE_className") && typeof n == "string" && typeof i == "string" ? t[e] = Qx(n, i) : e === "id" && n && i ? t.id = nie(n, i) : e === "ref" && n && i ? t.ref = Yx(n, i) : t[e] = i === void 0 ? n : i;
}
}
return t;
}
// node_modules/react-aria/dist/private/interactions/useFocus.mjs
-function Kx(e) {
+function $x(e) {
let { isDisabled: t, onFocus: n, onBlur: r, onFocusChange: i } = e, a = (0, P.useCallback)((e) => {
if (G(e) === e.currentTarget) return r && r(e), i && i(!1), !0;
- }, [r, i]), o = Ub(a), s = (0, P.useCallback)((e) => {
- let t = G(e), r = wb(t), a = r ? Mb(r) : Mb();
+ }, [r, i]), o = Xb(a), s = (0, P.useCallback)((e) => {
+ let t = G(e), r = jb(t), a = r ? zb(r) : zb();
t === e.currentTarget && t === a && (n && n(e), i && i(!0), o(e));
}, [
i,
@@ -21397,7 +21431,7 @@ function Kx(e) {
} };
}
// node_modules/react-aria/dist/private/interactions/createEventHandler.mjs
-function qx(e) {
+function eS(e) {
if (e) return (t) => {
let n = !0;
e({
@@ -21421,33 +21455,33 @@ function qx(e) {
};
}
// node_modules/react-aria/dist/private/interactions/createKeyboardShortcutHandler.mjs
-var Yre = /* @__PURE__ */ new Set([
+var rie = /* @__PURE__ */ new Set([
"shift",
"alt",
"control",
"meta",
"mod"
-]), Xre = [
+]), iie = [
"Alt",
"Control",
"Meta",
"Shift"
];
-function Zre(e) {
+function aie(e) {
let t = /* @__PURE__ */ new Set();
- return e.alt && t.add("Alt"), e.shift && t.add("Shift"), e.ctrl && t.add("Control"), e.meta && t.add("Meta"), e.mod && t.add(Jb() ? "Meta" : "Control"), t;
+ return e.alt && t.add("Alt"), e.shift && t.add("Shift"), e.ctrl && t.add("Control"), e.meta && t.add("Meta"), e.mod && t.add(tx() ? "Meta" : "Control"), t;
}
-function Qre(e) {
+function oie(e) {
let t = /* @__PURE__ */ new Set();
return e.altKey && t.add("Alt"), e.ctrlKey && t.add("Control"), e.metaKey && t.add("Meta"), e.shiftKey && t.add("Shift"), t;
}
-function Jx(e) {
- return Xre.filter((t) => e.has(t));
+function tS(e) {
+ return iie.filter((t) => e.has(t));
}
-function $re(e) {
+function sie(e) {
let t = e.split("+").reduce((e, t) => {
let n = t.toLowerCase();
- return Yre.has(n) ? n === "shift" ? e.shift = !0 : n === "alt" ? e.alt = !0 : n === "control" ? e.ctrl = !0 : n === "meta" ? e.meta = !0 : n === "mod" && (e.mod = !0) : e.key = t, e;
+ return rie.has(n) ? n === "shift" ? e.shift = !0 : n === "alt" ? e.alt = !0 : n === "control" ? e.ctrl = !0 : n === "meta" ? e.meta = !0 : n === "mod" && (e.mod = !0) : e.key = t, e;
}, {
shift: !1,
alt: !1,
@@ -21459,10 +21493,10 @@ function $re(e) {
if (t.key === "") throw Error(`Invalid keyboard shortcut: "${e}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);
return t;
}
-function Yx(e) {
+function nS(e) {
return e.toLowerCase();
}
-var eie = {
+var cie = {
space: " ",
esc: "escape",
del: "delete",
@@ -21474,26 +21508,26 @@ var eie = {
pageup: "pageup",
pagedown: "pagedown"
};
-function tie(e) {
- let t = Yx(e);
- return eie[t] ?? t;
+function lie(e) {
+ let t = nS(e);
+ return cie[t] ?? t;
}
-function nie(e) {
- let t = Jx(Zre(e)), n = tie(e.key);
+function uie(e) {
+ let t = tS(aie(e)), n = lie(e.key);
return t.length > 0 ? `${t.join("+")}+${n}` : n;
}
-function rie(e) {
- let t = Jx(Qre(e)), n = Yx(e.key);
+function die(e) {
+ let t = tS(oie(e)), n = nS(e.key);
return (t.length > 0 ? `${t.join("+")}+` : "") + n;
}
-function iie(e) {
+function fie(e) {
let t = /* @__PURE__ */ new Map();
for (let [n, r] of Object.entries(e)) {
- let e = $re(n);
- t.set(nie(e), r);
+ let e = sie(n);
+ t.set(uie(e), r);
}
return (e) => {
- let n = rie(e), r = t.get(n), i = r?.(e);
+ let n = die(e), r = t.get(n), i = r?.(e);
i === void 0 && r !== void 0 ? i = {
shouldContinuePropagation: !1,
shouldPreventDefault: !0
@@ -21504,23 +21538,23 @@ function iie(e) {
};
}
// node_modules/react-aria/dist/private/interactions/useKeyboard.mjs
-function Xx(e) {
+function rS(e) {
let { shortcuts: t, allowRepeats: n = !1, allowComposing: r = !1 } = e, i, a;
if (t) {
- let o = iie(t), s = qx((e) => {
- jb(e.currentTarget, G(e)) ? e.nativeEvent?.repeat && !n || e.nativeEvent?.isComposing && !r ? e.continuePropagation() : o(e) : e.continuePropagation();
- }), c = qx((e) => {
- jb(e.currentTarget, G(e)) && (e.nativeEvent?.repeat && !n || e.nativeEvent?.isComposing), e.continuePropagation();
+ let o = fie(t), s = eS((e) => {
+ Rb(e.currentTarget, G(e)) ? e.nativeEvent?.repeat && !n || e.nativeEvent?.isComposing && !r ? e.continuePropagation() : o(e) : e.continuePropagation();
+ }), c = eS((e) => {
+ Rb(e.currentTarget, G(e)) && (e.nativeEvent?.repeat && !n || e.nativeEvent?.isComposing), e.continuePropagation();
});
- i = e.onKeyDown ? Ix(e.onKeyDown, s) : s, a = e.onKeyUp ? Ix(e.onKeyUp, c) : c;
- } else i = qx(e.onKeyDown), a = qx(e.onKeyUp);
+ i = e.onKeyDown ? Ux(e.onKeyDown, s) : s, a = e.onKeyUp ? Ux(e.onKeyUp, c) : c;
+ } else i = eS(e.onKeyDown), a = eS(e.onKeyUp);
return { keyboardProps: e.isDisabled ? {} : {
onKeyDown: i,
onKeyUp: a
} };
}
// node_modules/react-aria/dist/private/utils/useObjectRef.mjs
-function Zx(e) {
+function iS(e) {
let t = (0, P.useRef)(null), n = (0, P.useRef)(void 0), r = (0, P.useCallback)((t) => {
if (typeof e == "function") {
let n = e, r = n(t);
@@ -21542,25 +21576,25 @@ function Zx(e) {
}), [r]);
}
// node_modules/react-aria/dist/private/utils/useSyncRef.mjs
-function Qx(e, t) {
- Bb(() => {
+function aS(e, t) {
+ qb(() => {
if (e && e.ref && t) return e.ref.current = t.current, () => {
e.ref && (e.ref.current = null);
};
});
}
// node_modules/react-aria/dist/private/interactions/useFocusable.mjs
-var $x = /*#__PURE__*/ P.createContext(null);
-function aie(e) {
- let t = (0, P.useContext)($x) || {};
- Qx(t, e);
+var oS = /*#__PURE__*/ P.createContext(null);
+function pie(e) {
+ let t = (0, P.useContext)(oS) || {};
+ aS(t, e);
let { ref: n, ...r } = t;
return r;
}
-function eS(e, t) {
- let { focusProps: n } = Kx(e), { keyboardProps: r } = Xx(e), i = K(n, r), a = aie(t), o = e.isDisabled ? {} : a, s = (0, P.useRef)(e.autoFocus);
+function sS(e, t) {
+ let { focusProps: n } = $x(e), { keyboardProps: r } = rS(e), i = K(n, r), a = pie(t), o = e.isDisabled ? {} : a, s = (0, P.useRef)(e.autoFocus);
(0, P.useEffect)(() => {
- s.current && t.current && Fx(t.current), s.current = !1;
+ s.current && t.current && Hx(t.current), s.current = !1;
}, [t]);
let c = e.excludeFromTabOrder ? -1 : 0;
return e.isDisabled && (c = void 0), { focusableProps: K({
@@ -21594,21 +21628,21 @@ typeof HTMLTemplateElement < "u" && (Object.defineProperty(HTMLTemplateElement.p
return this.content.insertBefore(e, t);
}
}));
-var tS = /*#__PURE__*/ (0, P.createContext)(!1);
-function oie(e) {
- if ((0, P.useContext)(tS)) return /*#__PURE__*/ P.createElement(P.Fragment, null, e.children);
- let t = /*#__PURE__*/ P.createElement(tS.Provider, { value: !0 }, e.children);
+var cS = /*#__PURE__*/ (0, P.createContext)(!1);
+function mie(e) {
+ if ((0, P.useContext)(cS)) return /*#__PURE__*/ P.createElement(P.Fragment, null, e.children);
+ let t = /*#__PURE__*/ P.createElement(cS.Provider, { value: !0 }, e.children);
return /*#__PURE__*/ P.createElement("template", null, t);
}
-function nS(e) {
- let t = (t, n) => (0, P.useContext)(tS) ? null : e(t, n);
+function lS(e) {
+ let t = (t, n) => (0, P.useContext)(cS) ? null : e(t, n);
return t.displayName = e.displayName || e.name, (0, P.forwardRef)(t);
}
-function rS() {
- return (0, P.useContext)(tS);
+function uS() {
+ return (0, P.useContext)(cS);
}
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
-var sie = /* @__PURE__ */ o(((e) => {
+var hie = /* @__PURE__ */ o(((e) => {
var t = A();
function n(e, t) {
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
@@ -21646,47 +21680,47 @@ var sie = /* @__PURE__ */ o(((e) => {
}
var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
-})), iS = /* @__PURE__ */ o(((e, t) => {
- t.exports = sie();
-})), cie = iS(), aS = /*#__PURE__*/ (0, P.createContext)(!1), oS = /*#__PURE__*/ (0, P.createContext)(null);
-function sS(e) {
- if ((0, P.useContext)(oS)) return e.content;
- let { collection: t, document: n } = fie(e.createCollection);
- return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(oie, null, /*#__PURE__*/ P.createElement(oS.Provider, { value: n }, e.content)), /*#__PURE__*/ P.createElement(lie, {
+})), dS = /* @__PURE__ */ o(((e, t) => {
+ t.exports = hie();
+})), gie = dS(), fS = /*#__PURE__*/ (0, P.createContext)(!1), pS = /*#__PURE__*/ (0, P.createContext)(null);
+function mS(e) {
+ if ((0, P.useContext)(pS)) return e.content;
+ let { collection: t, document: n } = bie(e.createCollection);
+ return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(mie, null, /*#__PURE__*/ P.createElement(pS.Provider, { value: n }, e.content)), /*#__PURE__*/ P.createElement(_ie, {
render: e.children,
collection: t
}));
}
-function lie({ collection: e, render: t }) {
+function _ie({ collection: e, render: t }) {
return t(e);
}
-function uie(e, t, n) {
- let r = cx(), i = (0, P.useRef)(r);
+function vie(e, t, n) {
+ let r = hx(), i = (0, P.useRef)(r);
i.current = r;
let a = (0, P.useCallback)(() => i.current ? n() : t(), [t, n]);
- return (0, cie.useSyncExternalStore)(e, a);
+ return (0, gie.useSyncExternalStore)(e, a);
}
-var die = typeof P.useSyncExternalStore == "function" ? P.useSyncExternalStore : uie;
-function fie(e) {
- let [t] = (0, P.useState)(() => new fre(e?.() || new vb()));
+var yie = typeof P.useSyncExternalStore == "function" ? P.useSyncExternalStore : vie;
+function bie(e) {
+ let [t] = (0, P.useState)(() => new Ob(e?.() || new wb()));
return {
- collection: die((0, P.useCallback)((e) => t.subscribe(e), [t]), (0, P.useCallback)(() => {
+ collection: yie((0, P.useCallback)((e) => t.subscribe(e), [t]), (0, P.useCallback)(() => {
let e = t.getCollection();
return t.isSSR && t.resetAfterSSR(), e;
}, [t]), (0, P.useCallback)(() => (t.isSSR = !0, t.getCollection()), [t])),
document: t
};
}
-var cS = /*#__PURE__*/ (0, P.createContext)(null);
-function pie(e) {
- return class extends pb {
+var hS = /*#__PURE__*/ (0, P.createContext)(null);
+function xie(e) {
+ return class extends yb {
static {
this.type = e;
}
};
}
-function lS(e, t, n, r, i, a) {
- typeof e == "string" && (e = pie(e));
+function gS(e, t, n, r, i, a) {
+ typeof e == "string" && (e = xie(e));
let o = (0, P.useCallback)((i) => {
i?.setProps(t, n, e, r, a);
}, [
@@ -21695,82 +21729,82 @@ function lS(e, t, n, r, i, a) {
r,
a,
e
- ]), s = (0, P.useContext)(cS);
+ ]), s = (0, P.useContext)(hS);
if (s) {
let o = s.ownerDocument.nodesByProps.get(t);
- return o || (o = s.ownerDocument.createElement(e.type), o.setProps(t, n, e, r, a), s.appendChild(o), s.ownerDocument.updateCollection(), s.ownerDocument.nodesByProps.set(t, o)), i ? /*#__PURE__*/ P.createElement(cS.Provider, { value: o }, i) : null;
+ return o || (o = s.ownerDocument.createElement(e.type), o.setProps(t, n, e, r, a), s.appendChild(o), s.ownerDocument.updateCollection(), s.ownerDocument.nodesByProps.set(t, o)), i ? /*#__PURE__*/ P.createElement(hS.Provider, { value: o }, i) : null;
}
return /*#__PURE__*/ P.createElement(e.type, { ref: o }, i);
}
-function uS(e, t) {
+function _S(e, t) {
let n = ({ node: e }) => t(e.props, e.props.ref, e), r = (0, P.forwardRef)((r, i) => {
- let a = (0, P.useContext)($x);
- if (!(0, P.useContext)(aS)) {
+ let a = (0, P.useContext)(oS);
+ if (!(0, P.useContext)(fS)) {
if (t.length >= 3) throw Error(t.name + " cannot be rendered outside a collection.");
return t(r, i);
}
- return lS(e, r, i, "children" in r ? r.children : null, null, (e) => /*#__PURE__*/ P.createElement($x.Provider, { value: a }, /*#__PURE__*/ P.createElement(n, { node: e })));
+ return gS(e, r, i, "children" in r ? r.children : null, null, (e) => /*#__PURE__*/ P.createElement(oS.Provider, { value: a }, /*#__PURE__*/ P.createElement(n, { node: e })));
});
return r.displayName = t.name, r;
}
-function dS(e, t, n = fS) {
- let r = ({ node: e }) => t(e.props, e.props.ref, e), i = (0, P.forwardRef)((t, i) => lS(e, t, i, null, n(t), (e) => /*#__PURE__*/ P.createElement(r, { node: e })) ?? /*#__PURE__*/ P.createElement(P.Fragment, null));
+function vS(e, t, n = yS) {
+ let r = ({ node: e }) => t(e.props, e.props.ref, e), i = (0, P.forwardRef)((t, i) => gS(e, t, i, null, n(t), (e) => /*#__PURE__*/ P.createElement(r, { node: e })) ?? /*#__PURE__*/ P.createElement(P.Fragment, null));
return i.displayName = t.name, i;
}
-function fS(e) {
- return Sb({
+function yS(e) {
+ return kb({
...e,
addIdAndValue: !0
});
}
-var pS = /*#__PURE__*/ (0, P.createContext)(null);
-function mS(e) {
- let t = (0, P.useContext)(pS), n = (t?.dependencies || []).concat(e.dependencies), r = e.idScope ?? t?.idScope, i = fS({
+var bS = /*#__PURE__*/ (0, P.createContext)(null);
+function xS(e) {
+ let t = (0, P.useContext)(bS), n = (t?.dependencies || []).concat(e.dependencies), r = e.idScope ?? t?.idScope, i = yS({
...e,
idScope: r,
dependencies: n
});
- return (0, P.useContext)(oS) && (i = /*#__PURE__*/ P.createElement(mie, null, i)), t = (0, P.useMemo)(() => ({
+ return (0, P.useContext)(pS) && (i = /*#__PURE__*/ P.createElement(Sie, null, i)), t = (0, P.useMemo)(() => ({
dependencies: n,
idScope: r
- }), [r, ...n]), /*#__PURE__*/ P.createElement(pS.Provider, { value: t }, i);
+ }), [r, ...n]), /*#__PURE__*/ P.createElement(bS.Provider, { value: t }, i);
}
-function mie({ children: e }) {
- let t = (0, P.useContext)(oS), n = (0, P.useMemo)(() => /*#__PURE__*/ P.createElement(oS.Provider, { value: null }, /*#__PURE__*/ P.createElement(aS.Provider, { value: !0 }, e)), [e]);
- return cx() ? /*#__PURE__*/ P.createElement(cS.Provider, { value: t }, n) : /*#__PURE__*/ (0, Lt.createPortal)(n, t);
+function Sie({ children: e }) {
+ let t = (0, P.useContext)(pS), n = (0, P.useMemo)(() => /*#__PURE__*/ P.createElement(pS.Provider, { value: null }, /*#__PURE__*/ P.createElement(fS.Provider, { value: !0 }, e)), [e]);
+ return hx() ? /*#__PURE__*/ P.createElement(hS.Provider, { value: t }, n) : /*#__PURE__*/ (0, Lt.createPortal)(n, t);
}
// node_modules/react-aria/dist/private/utils/constants.mjs
-var hie = "react-aria-clear-focus", gie = "react-aria-focus";
+var Cie = "react-aria-clear-focus", wie = "react-aria-focus";
// node_modules/react-aria/dist/private/focus/virtualFocus.mjs
-function hS(e) {
- let t = vie(wb(e));
- t !== e && (t && _ie(t, e), e && gS(e, t));
+function SS(e) {
+ let t = Eie(jb(e));
+ t !== e && (t && Tie(t, e), e && CS(e, t));
}
-function _ie(e, t) {
+function Tie(e, t) {
e.dispatchEvent(new FocusEvent("blur", { relatedTarget: t })), e.dispatchEvent(new FocusEvent("focusout", {
bubbles: !0,
relatedTarget: t
}));
}
-function gS(e, t) {
+function CS(e, t) {
e.dispatchEvent(new FocusEvent("focus", { relatedTarget: t })), e.dispatchEvent(new FocusEvent("focusin", {
bubbles: !0,
relatedTarget: t
}));
}
-function vie(e) {
- let t = Mb(e), n = t?.getAttribute("aria-activedescendant");
+function Eie(e) {
+ let t = zb(e), n = t?.getAttribute("aria-activedescendant");
return n && e.getElementById(n) || t;
}
// node_modules/react-aria/dist/private/utils/getMetaValue.mjs
-function _S(e, t) {
- let n = Tb(t), r = wb(t);
+function wS(e, t) {
+ let n = Mb(t), r = jb(t);
if (r == null || n == null) return;
let i, a = `meta[name="${CSS.escape(e)}"], meta[property="${CSS.escape(e)}"]`, o = r.querySelector(a);
return o && o instanceof n.HTMLMetaElement && (e === "csp-nonce" && o.nonce && (i ??= o.nonce || void 0), o.content && (i ??= o.content || void 0)), e === "csp-nonce" && (i ??= n.__webpack_nonce__ || globalThis.__webpack_nonce__ || void 0), i;
}
// node_modules/react-aria/dist/private/utils/keyboard.mjs
-var vS = 100, yS = 600, bS = {
+var TS = 100, ES = 600, DS = {
isOpen: !1,
screenWidth: 0,
screenHeight: 0,
@@ -21780,7 +21814,7 @@ var vS = 100, yS = 600, bS = {
endTimeStamp: 0,
resizeTimeStamp: 0,
resizeTimeout: 0
-}, yie = /* @__PURE__ */ new Set([
+}, Die = /* @__PURE__ */ new Set([
"checkbox",
"radio",
"range",
@@ -21791,7 +21825,7 @@ var vS = 100, yS = 600, bS = {
"submit",
"reset"
]);
-function xS() {
+function OS() {
let e = Number(window.visualViewport?.width ?? window.innerWidth), t = Number(window.visualViewport?.height ?? window.innerHeight), n = Number(window.visualViewport?.scale ?? 1);
return {
width: e * n,
@@ -21799,58 +21833,58 @@ function xS() {
angle: window.screen.orientation?.angle ?? 0
};
}
-function bie(e) {
- bS.resizeTimeStamp <= e.timeStamp + 50 && (bS.resizeTimeStamp = e.timeStamp + 150, window.clearTimeout(bS.resizeTimeout), bS.resizeTimeout = window.setTimeout(SS, 150));
-}
-function SS() {
- let e = _S("viewport");
- if ($b() && e?.includes("overlays-content")) return;
- let t = performance.now(), n = xS(), r = t - bS.startTimeStamp, i = bS.screenHeight - n.height, a = bS.screenAngle - n.angle;
- Math.abs(a) % 180 && bS.screenWidth - n.height < vS && (bS.screenWidth = n.width, bS.screenHeight = n.height, bS.screenAngle = n.angle, i = 0), r > yS && (window.clearTimeout(bS.screenTimeout), bS.screenTimeout = window.setTimeout(() => {
- let e = TS(document.hasFocus() ? Mb() : null), t = xS();
- Math.abs(bS.screenAngle - t.angle) % 180 || bS.isOpen && e || (bS.screenWidth = t.width, bS.screenHeight = t.height, bS.screenAngle = t.angle, bS.isOpen = !1);
- }, yS)), r <= yS && i >= vS && (bS.endTimeStamp = t), bS.isOpen = i >= vS;
-}
-function xie() {
- let e = xS(), t = bS.screenAngle - e.angle;
- if (Math.abs(t) % 180 && !bS.isOpen) {
- let e = bS.screenWidth;
- bS.screenWidth = bS.screenHeight, bS.screenHeight = e;
- }
- bS.isOpen || (bS.screenAngle = e.angle);
-}
-function Sie(e) {
- let t = TS(G(e)), n = performance.now(), r = xS(), i = bS.screenHeight - r.height;
- i < vS && t && (bS.screenWidth = r.width, bS.screenHeight = r.height, bS.screenAngle = r.angle, bS.startTimeStamp = n), t && window.clearTimeout(bS.screenTimeout), i >= vS && t && (bS.endTimeStamp = n);
-}
-function CS() {
- let e = xS();
- Ob(window.visualViewport, "resize", Zb() ? SS : bie), Ob(window.screen.orientation, "change", xie), Ob(window, "focus", Sie, {
+function Oie(e) {
+ DS.resizeTimeStamp <= e.timeStamp + 50 && (DS.resizeTimeStamp = e.timeStamp + 150, window.clearTimeout(DS.resizeTimeout), DS.resizeTimeout = window.setTimeout(kS, 150));
+}
+function kS() {
+ let e = wS("viewport");
+ if (ox() && e?.includes("overlays-content")) return;
+ let t = performance.now(), n = OS(), r = t - DS.startTimeStamp, i = DS.screenHeight - n.height, a = DS.screenAngle - n.angle;
+ Math.abs(a) % 180 && DS.screenWidth - n.height < TS && (DS.screenWidth = n.width, DS.screenHeight = n.height, DS.screenAngle = n.angle, i = 0), r > ES && (window.clearTimeout(DS.screenTimeout), DS.screenTimeout = window.setTimeout(() => {
+ let e = MS(document.hasFocus() ? zb() : null), t = OS();
+ Math.abs(DS.screenAngle - t.angle) % 180 || DS.isOpen && e || (DS.screenWidth = t.width, DS.screenHeight = t.height, DS.screenAngle = t.angle, DS.isOpen = !1);
+ }, ES)), r <= ES && i >= TS && (DS.endTimeStamp = t), DS.isOpen = i >= TS;
+}
+function kie() {
+ let e = OS(), t = DS.screenAngle - e.angle;
+ if (Math.abs(t) % 180 && !DS.isOpen) {
+ let e = DS.screenWidth;
+ DS.screenWidth = DS.screenHeight, DS.screenHeight = e;
+ }
+ DS.isOpen || (DS.screenAngle = e.angle);
+}
+function Aie(e) {
+ let t = MS(G(e)), n = performance.now(), r = OS(), i = DS.screenHeight - r.height;
+ i < TS && t && (DS.screenWidth = r.width, DS.screenHeight = r.height, DS.screenAngle = r.angle, DS.startTimeStamp = n), t && window.clearTimeout(DS.screenTimeout), i >= TS && t && (DS.endTimeStamp = n);
+}
+function AS() {
+ let e = OS();
+ Fb(window.visualViewport, "resize", ix() ? kS : Oie), Fb(window.screen.orientation, "change", kie), Fb(window, "focus", Aie, {
capture: !0,
passive: !0
- }), bS.screenWidth = e.width, bS.screenHeight = e.height, bS.screenAngle = e.angle;
+ }), DS.screenWidth = e.width, DS.screenHeight = e.height, DS.screenAngle = e.angle;
}
-typeof document < "u" && (document.readyState === "loading" ? Ob(document, "DOMContentLoaded", CS) : CS());
-function wS() {
- let e = _S("viewport");
- return $b() && e?.includes("overlays-content") ? !1 : bS.isOpen ? !0 : bS.startTimeStamp ? bS.endTimeStamp >= bS.startTimeStamp ? !0 : performance.now() - bS.startTimeStamp <= yS ? bS.endTimeStamp > 0 || window.navigator.maxTouchPoints > 0 : !1 : window.navigator.maxTouchPoints > 0;
+typeof document < "u" && (document.readyState === "loading" ? Fb(document, "DOMContentLoaded", AS) : AS());
+function jS() {
+ let e = wS("viewport");
+ return ox() && e?.includes("overlays-content") ? !1 : DS.isOpen ? !0 : DS.startTimeStamp ? DS.endTimeStamp >= DS.startTimeStamp ? !0 : performance.now() - DS.startTimeStamp <= ES ? DS.endTimeStamp > 0 || window.navigator.maxTouchPoints > 0 : !1 : window.navigator.maxTouchPoints > 0;
}
-function TS(e) {
- if (!(e instanceof Element) || !Lb(e)) return !1;
- let t = e instanceof HTMLTextAreaElement, n = e instanceof HTMLElement && e.isContentEditable, r = e instanceof HTMLInputElement && !yie.has(e.type);
+function MS(e) {
+ if (!(e instanceof Element) || !Wb(e)) return !1;
+ let t = e instanceof HTMLTextAreaElement, n = e instanceof HTMLElement && e.isContentEditable, r = e instanceof HTMLInputElement && !Die.has(e.type);
return t || n || r;
}
-function ES(e) {
- return Jb() ? e.metaKey : e.ctrlKey;
+function NS(e) {
+ return tx() ? e.metaKey : e.ctrlKey;
}
-function DS() {
- return bS.isOpen;
+function PS() {
+ return DS.isOpen;
}
// node_modules/react-aria/dist/private/utils/useEffectEvent.mjs
-var Cie = P.useInsertionEffect ?? Bb;
-function OS(e) {
+var jie = P.useInsertionEffect ?? qb;
+function FS(e) {
let t = (0, P.useRef)(null);
- return Cie(() => {
+ return jie(() => {
t.current = e;
}, [e]), (0, P.useCallback)((...e) => {
let n = t.current;
@@ -21858,10 +21892,10 @@ function OS(e) {
}, []);
}
// node_modules/react-aria/dist/private/utils/useEvent.mjs
-function kS(e, t, n, r) {
- let i = OS(n), a = n == null;
+function IS(e, t, n, r) {
+ let i = FS(n), a = n == null;
(0, P.useEffect)(() => {
- if (!(a || e.current == null)) return Ob(e.current, t, i, r);
+ if (!(a || e.current == null)) return Fb(e.current, t, i, r);
}, [
e,
t,
@@ -21870,16 +21904,16 @@ function kS(e, t, n, r) {
]);
}
// node_modules/react-aria/dist/private/utils/useLabels.mjs
-function AS(e, t) {
+function LS(e, t) {
let { id: n, "aria-label": r, "aria-labelledby": i } = e;
- return n = Bx(n), i && r ? i = [.../* @__PURE__ */ new Set([n, ...i.trim().split(/\s+/)])].join(" ") : i &&= i.trim().split(/\s+/).join(" "), !r && !i && t && (r = t), {
+ return n = qx(n), i && r ? i = [.../* @__PURE__ */ new Set([n, ...i.trim().split(/\s+/)])].join(" ") : i &&= i.trim().split(/\s+/).join(" "), !r && !i && t && (r = t), {
id: n,
"aria-label": r,
"aria-labelledby": i
};
}
// node_modules/react-aria/dist/private/i18n/utils.mjs
-var wie = /* @__PURE__ */ new Set([
+var Mie = /* @__PURE__ */ new Set([
"Arab",
"Syrc",
"Samr",
@@ -21890,7 +21924,7 @@ var wie = /* @__PURE__ */ new Set([
"Adlm",
"Rohg",
"Hebr"
-]), Tie = /* @__PURE__ */ new Set([
+]), Nie = /* @__PURE__ */ new Set([
"ae",
"ar",
"arc",
@@ -21911,19 +21945,19 @@ var wie = /* @__PURE__ */ new Set([
"ur",
"yi"
]);
-function Eie(e) {
+function Pie(e) {
if (Intl.Locale) {
let t = new Intl.Locale(e).maximize(), n = typeof t.getTextInfo == "function" ? t.getTextInfo() : t.textInfo;
if (n) return n.direction === "rtl";
- if (t.script) return wie.has(t.script);
+ if (t.script) return Mie.has(t.script);
}
let t = e.split("-")[0];
- return Tie.has(t);
+ return Nie.has(t);
}
// node_modules/react-aria/dist/private/i18n/useDefaultLocale.mjs
-var jS = Symbol.for("react-aria.i18n.locale");
-function MS() {
- let e = typeof window < "u" && window[jS] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
+var RS = Symbol.for("react-aria.i18n.locale");
+function zS() {
+ let e = typeof window < "u" && window[RS] || typeof navigator < "u" && (navigator.language || navigator.userLanguage) || "en-US";
try {
Intl.DateTimeFormat.supportedLocalesOf([e]);
} catch {
@@ -21931,31 +21965,31 @@ function MS() {
}
return {
locale: e,
- direction: Eie(e) ? "rtl" : "ltr"
+ direction: Pie(e) ? "rtl" : "ltr"
};
}
-var NS = MS(), PS = /* @__PURE__ */ new Set();
-function FS() {
- NS = MS();
- for (let e of PS) e(NS);
+var BS = zS(), VS = /* @__PURE__ */ new Set();
+function HS() {
+ BS = zS();
+ for (let e of VS) e(BS);
}
-function Die() {
- let e = cx(), [t, n] = (0, P.useState)(NS);
- return (0, P.useEffect)(() => (PS.size === 0 && window.addEventListener("languagechange", FS), PS.add(n), () => {
- PS.delete(n), PS.size === 0 && window.removeEventListener("languagechange", FS);
+function Fie() {
+ let e = hx(), [t, n] = (0, P.useState)(BS);
+ return (0, P.useEffect)(() => (VS.size === 0 && window.addEventListener("languagechange", HS), VS.add(n), () => {
+ VS.delete(n), VS.size === 0 && window.removeEventListener("languagechange", HS);
}), []), e ? {
- locale: typeof window < "u" && window[jS] || "en-US",
+ locale: typeof window < "u" && window[RS] || "en-US",
direction: "ltr"
} : t;
}
// node_modules/react-aria/dist/private/i18n/I18nProvider.mjs
-var Oie = /*#__PURE__*/ P.createContext(null);
-function IS() {
- let e = Die();
- return (0, P.useContext)(Oie) || e;
+var Iie = /*#__PURE__*/ P.createContext(null);
+function US() {
+ let e = Fie();
+ return (0, P.useContext)(Iie) || e;
}
// node_modules/@internationalized/string/dist/private/LocalizedStringDictionary.mjs
-var kie = Symbol.for("react-aria.i18n.locale"), Aie = Symbol.for("react-aria.i18n.strings"), LS = void 0, RS = class e {
+var Lie = Symbol.for("react-aria.i18n.locale"), Rie = Symbol.for("react-aria.i18n.strings"), WS = void 0, GS = class e {
constructor(e, t = "en-US") {
this.strings = Object.fromEntries(Object.entries(e).filter(([, e]) => e)), this.defaultLocale = t;
}
@@ -21966,38 +22000,38 @@ var kie = Symbol.for("react-aria.i18n.locale"), Aie = Symbol.for("react-aria.i18
}
getStringsForLocale(e) {
let t = this.strings[e];
- return t || (t = jie(e, this.strings, this.defaultLocale), this.strings[e] = t), t;
+ return t || (t = zie(e, this.strings, this.defaultLocale), this.strings[e] = t), t;
}
static getGlobalDictionaryForPackage(t) {
if (typeof window > "u") return null;
- let n = window[kie];
- if (LS === void 0) {
- let t = window[Aie];
+ let n = window[Lie];
+ if (WS === void 0) {
+ let t = window[Rie];
if (!t) return null;
- LS = {};
- for (let r in t) LS[r] = new e({ [n]: t[r] }, n);
+ WS = {};
+ for (let r in t) WS[r] = new e({ [n]: t[r] }, n);
}
- let r = LS?.[t];
+ let r = WS?.[t];
if (!r) throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
return r;
}
};
-function jie(e, t, n = "en-US") {
+function zie(e, t, n = "en-US") {
if (t[e]) return t[e];
- let r = Mie(e), i = Nie(e);
+ let r = Bie(e), i = Vie(e);
if (i && t[`${r}-${i}`]) return t[`${r}-${i}`];
if (t[r]) return t[r];
for (let e in t) if (e.startsWith(r + "-")) return t[e];
return t[n];
}
-function Mie(e) {
+function Bie(e) {
return Intl.Locale ? new Intl.Locale(e).language : e.split("-")[0];
}
-function Nie(e) {
+function Vie(e) {
if (Intl.Locale) return new Intl.Locale(e).script;
}
// node_modules/@internationalized/string/dist/private/LocalizedStringFormatter.mjs
-var zS = /* @__PURE__ */ new Map(), BS = /* @__PURE__ */ new Map(), Pie = class {
+var KS = /* @__PURE__ */ new Map(), qS = /* @__PURE__ */ new Map(), Hie = class {
constructor(e, t) {
this.locale = e, this.strings = t;
}
@@ -22008,36 +22042,36 @@ var zS = /* @__PURE__ */ new Map(), BS = /* @__PURE__ */ new Map(), Pie = class
plural(e, t, n = "cardinal") {
let r = t["=" + e];
if (r) return typeof r == "function" ? r() : r;
- let i = this.locale + ":" + n, a = zS.get(i);
- return a || (a = new Intl.PluralRules(this.locale, { type: n }), zS.set(i, a)), r = t[a.select(e)] || t.other, typeof r == "function" ? r() : r;
+ let i = this.locale + ":" + n, a = KS.get(i);
+ return a || (a = new Intl.PluralRules(this.locale, { type: n }), KS.set(i, a)), r = t[a.select(e)] || t.other, typeof r == "function" ? r() : r;
}
number(e) {
- let t = BS.get(this.locale);
- return t || (t = new Intl.NumberFormat(this.locale), BS.set(this.locale, t)), t.format(e);
+ let t = qS.get(this.locale);
+ return t || (t = new Intl.NumberFormat(this.locale), qS.set(this.locale, t)), t.format(e);
}
select(e, t) {
let n = e[t] || e.other;
return typeof n == "function" ? n() : n;
}
-}, VS = /* @__PURE__ */ new WeakMap();
-function Fie(e) {
- let t = VS.get(e);
- return t || (t = new RS(e), VS.set(e, t)), t;
+}, JS = /* @__PURE__ */ new WeakMap();
+function Uie(e) {
+ let t = JS.get(e);
+ return t || (t = new GS(e), JS.set(e, t)), t;
}
-function Iie(e, t) {
- return t && RS.getGlobalDictionaryForPackage(t) || Fie(e);
+function Wie(e, t) {
+ return t && GS.getGlobalDictionaryForPackage(t) || Uie(e);
}
-function HS(e, t) {
- let { locale: n } = IS(), r = Iie(e, t);
- return (0, P.useMemo)(() => new Pie(n, r), [n, r]);
+function YS(e, t) {
+ let { locale: n } = US(), r = Wie(e, t);
+ return (0, P.useMemo)(() => new Hie(n, r), [n, r]);
}
// node_modules/react-aria/dist/private/utils/filterDOMProps.mjs
-var Lie = /* @__PURE__ */ new Set(["id"]), Rie = /* @__PURE__ */ new Set([
+var Gie = /* @__PURE__ */ new Set(["id"]), Kie = /* @__PURE__ */ new Set([
"aria-label",
"aria-labelledby",
"aria-describedby",
"aria-details"
-]), zie = /* @__PURE__ */ new Set([
+]), qie = /* @__PURE__ */ new Set([
"href",
"hrefLang",
"target",
@@ -22045,60 +22079,60 @@ var Lie = /* @__PURE__ */ new Set(["id"]), Rie = /* @__PURE__ */ new Set([
"download",
"ping",
"referrerPolicy"
-]), Bie = /* @__PURE__ */ new Set([
+]), Jie = /* @__PURE__ */ new Set([
"dir",
"lang",
"hidden",
"inert",
"translate",
"suppressHydrationWarning"
-]), US = /* @__PURE__ */ new Set(/* @__PURE__ */ "onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart".split(".")), Vie = /^(data-.*)$/;
-function WS(e, t = {}) {
+]), XS = /* @__PURE__ */ new Set(/* @__PURE__ */ "onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart".split(".")), Yie = /^(data-.*)$/;
+function ZS(e, t = {}) {
let { labelable: n, isLink: r, global: i, events: a = i, propNames: o } = t, s = {};
- for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (Lie.has(t) || n && Rie.has(t) || r && zie.has(t) || i && Bie.has(t) || a && (US.has(t) || t.endsWith("Capture") && US.has(t.slice(0, -7))) || o?.has(t) || Vie.test(t)) && (s[t] = e[t]);
+ for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (Gie.has(t) || n && Kie.has(t) || r && qie.has(t) || i && Jie.has(t) || a && (XS.has(t) || t.endsWith("Capture") && XS.has(t.slice(0, -7))) || o?.has(t) || Yie.test(t)) && (s[t] = e[t]);
return s;
}
// node_modules/react-aria/dist/private/interactions/textSelection.mjs
-var GS = "default", KS = "", qS = /* @__PURE__ */ new WeakMap();
-function JS(e) {
- if (Xb() && Zb()) {
- if (GS === "default") {
- let t = wb(e);
- KS = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
- }
- GS = "disabled";
+var QS = "default", $S = "", eC = /* @__PURE__ */ new WeakMap();
+function tC(e) {
+ if (rx() && ix()) {
+ if (QS === "default") {
+ let t = jb(e);
+ $S = t.documentElement.style.webkitUserSelect, t.documentElement.style.webkitUserSelect = "none";
+ }
+ QS = "disabled";
} else if (e instanceof HTMLElement || e instanceof SVGElement) {
let t = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
- qS.set(e, e.style[t]), e.style[t] = "none";
+ eC.set(e, e.style[t]), e.style[t] = "none";
}
}
-function YS(e) {
- if (Xb() && Zb()) {
- if (GS !== "disabled") return;
- GS = "restoring", setTimeout(() => {
- Px(() => {
- if (GS === "restoring") {
- let t = wb(e);
- t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = KS || ""), KS = "", GS = "default";
+function nC(e) {
+ if (rx() && ix()) {
+ if (QS !== "disabled") return;
+ QS = "restoring", setTimeout(() => {
+ Vx(() => {
+ if (QS === "restoring") {
+ let t = jb(e);
+ t.documentElement.style.webkitUserSelect === "none" && (t.documentElement.style.webkitUserSelect = $S || ""), $S = "", QS = "default";
}
});
}, 300);
- } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && qS.has(e)) {
- let t = qS.get(e), n = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
- e.style[n] === "none" && (e.style[n] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), qS.delete(e);
+ } else if ((e instanceof HTMLElement || e instanceof SVGElement) && e && eC.has(e)) {
+ let t = eC.get(e), n = "userSelect" in e.style ? "userSelect" : "webkitUserSelect";
+ e.style[n] === "none" && (e.style[n] = t), e.getAttribute("style") === "" && e.removeAttribute("style"), eC.delete(e);
}
}
// node_modules/react-aria/dist/private/utils/getNonce.mjs
-var XS = /* @__PURE__ */ new WeakMap();
-function ZS(e) {
- let t = wb(e), n = XS.get(t);
- return n ??= _S("csp-nonce", t), n !== void 0 && XS.set(t, n), n;
+var rC = /* @__PURE__ */ new WeakMap();
+function iC(e) {
+ let t = jb(e), n = rC.get(t);
+ return n ??= wS("csp-nonce", t), n !== void 0 && rC.set(t, n), n;
}
// node_modules/react-aria/dist/private/interactions/context.mjs
-var QS = P.createContext({ register: () => {} });
-QS.displayName = "PressResponderContext";
+var aC = P.createContext({ register: () => {} });
+aC.displayName = "PressResponderContext";
// node_modules/react-aria/dist/private/utils/useGlobalListeners.mjs
-function $S() {
+function oC() {
let e = (0, P.useRef)(/* @__PURE__ */ new Map()), t = (0, P.useCallback)((t, n, r, i) => {
let a = i?.once ? (...t) => {
e.current.delete(r), r(...t);
@@ -22124,15 +22158,15 @@ function $S() {
};
}
// node_modules/react-aria/dist/private/interactions/usePress.mjs
-function eC(e) {
- let t = (0, P.useContext)(QS);
+function sC(e) {
+ let t = (0, P.useContext)(aC);
if (t) {
let { register: n, ref: r, ...i } = t;
e = K(i, e), n();
}
- return Qx(t, e.ref), e;
+ return aS(t, e.ref), e;
}
-var tC = class {
+var cC = class {
#e;
constructor(e, t, n, r) {
this.#e = !0;
@@ -22145,9 +22179,9 @@ var tC = class {
get shouldStopPropagation() {
return this.#e;
}
-}, nC = Symbol("linkClicked"), rC = "react-aria-pressable-style", iC = "data-react-aria-pressable";
-function aC(e) {
- let { onPress: t, onPressChange: n, onPressStart: r, onPressEnd: i, onPressUp: a, onClick: o, isDisabled: s, isPressed: c, preventFocusOnPress: l, shouldCancelOnPointerExit: u, allowTextSelectionOnPress: d, ref: f, ...p } = eC(e), [m, h] = (0, P.useState)(!1), g = (0, P.useRef)({
+}, lC = Symbol("linkClicked"), uC = "react-aria-pressable-style", dC = "data-react-aria-pressable";
+function fC(e) {
+ let { onPress: t, onPressChange: n, onPressStart: r, onPressEnd: i, onPressUp: a, onClick: o, isDisabled: s, isPressed: c, preventFocusOnPress: l, shouldCancelOnPointerExit: u, allowTextSelectionOnPress: d, ref: f, ...p } = sC(e), [m, h] = (0, P.useState)(!1), g = (0, P.useRef)({
isPressed: !1,
ignoreEmulatedMouseEvents: !1,
didFirePressStart: !1,
@@ -22157,12 +22191,12 @@ function aC(e) {
isOverTarget: !1,
pointerType: null,
disposables: []
- }), { addGlobalListener: _, removeAllGlobalListeners: v } = $S(), y = (0, P.useCallback)((e, t) => {
+ }), { addGlobalListener: _, removeAllGlobalListeners: v } = oC(), y = (0, P.useCallback)((e, t) => {
let i = g.current;
if (s || i.didFirePressStart) return !1;
let a = !0;
if (i.isTriggeringEvent = !0, r) {
- let n = new tC("pressstart", t, e);
+ let n = new cC("pressstart", t, e);
r(n), a = n.shouldStopPropagation;
}
return n && n(!0), i.isTriggeringEvent = !1, i.didFirePressStart = !0, h(!0), a;
@@ -22176,11 +22210,11 @@ function aC(e) {
o.didFirePressStart = !1, o.isTriggeringEvent = !0;
let c = !0;
if (i) {
- let t = new tC("pressend", r, e);
+ let t = new cC("pressend", r, e);
i(t), c = t.shouldStopPropagation;
}
if (n && n(!1), h(!1), t && a && !s) {
- let n = new tC("press", r, e);
+ let n = new cC("press", r, e);
t(n), c &&= n.shouldStopPropagation;
}
return o.isTriggeringEvent = !1, c;
@@ -22189,19 +22223,19 @@ function aC(e) {
i,
n,
t
- ]), x = OS(b), S = OS((0, P.useCallback)((e, t) => {
+ ]), x = FS(b), S = FS((0, P.useCallback)((e, t) => {
let n = g.current;
if (s) return !1;
if (a) {
n.isTriggeringEvent = !0;
- let r = new tC("pressup", t, e);
+ let r = new cC("pressup", t, e);
return a(r), n.isTriggeringEvent = !1, r.shouldStopPropagation;
}
return !0;
}, [s, a])), C = (0, P.useCallback)((e) => {
let t = g.current;
if (t.isPressed && t.target) {
- t.didFirePressStart && t.pointerType != null && b(cC(t.target, e), t.pointerType, !1), t.isPressed = !1, t.isOverTarget = !1, t.activePointerId = null, t.pointerType = null, v(), d || YS(t.target);
+ t.didFirePressStart && t.pointerType != null && b(hC(t.target, e), t.pointerType, !1), t.isPressed = !1, t.isOverTarget = !1, t.activePointerId = null, t.pointerType = null, v(), d || nC(t.target);
for (let e of t.disposables) e();
t.disposables = [];
}
@@ -22209,7 +22243,7 @@ function aC(e) {
d,
v,
b
- ]), w = OS(C);
+ ]), w = FS(C);
(0, P.useEffect)(() => {
s && g.current.isPressed && w({
currentTarget: g.current.target,
@@ -22226,39 +22260,39 @@ function aC(e) {
}, [s, o]), D = (0, P.useCallback)((e, t) => {
if (!s && o) {
let n = new MouseEvent("click", e);
- Hb(n, t), o(Vb(n));
+ Yb(n, t), o(Jb(n));
}
}, [s, o]), O = (0, P.useMemo)(() => {
let e = g.current, t = {
onKeyDown(t) {
- if (sC(t.nativeEvent, t.currentTarget) && jb(t.currentTarget, G(t))) {
- uC(G(t), t.key) && t.preventDefault();
+ if (mC(t.nativeEvent, t.currentTarget) && Rb(t.currentTarget, G(t))) {
+ _C(G(t), t.key) && t.preventDefault();
let r = !0;
!e.isPressed && !t.repeat && (e.target = t.currentTarget, e.isPressed = !0, e.pointerType = "keyboard", r = y(t, "keyboard"));
let i = t.currentTarget;
- _(wb(t.currentTarget), "keyup", Ix((t) => {
- sC(t, i) && !t.repeat && jb(i, G(t)) && e.target && S(cC(e.target, t), "keyboard");
- }, n), !0), r && t.stopPropagation(), t.metaKey && Jb() && e.metaKeyEvents?.set(t.key, t.nativeEvent);
+ _(jb(t.currentTarget), "keyup", Ux((t) => {
+ mC(t, i) && !t.repeat && Rb(i, G(t)) && e.target && S(hC(e.target, t), "keyboard");
+ }, n), !0), r && t.stopPropagation(), t.metaKey && tx() && e.metaKeyEvents?.set(t.key, t.nativeEvent);
} else t.key === "Meta" && (e.metaKeyEvents = /* @__PURE__ */ new Map());
},
onClick(t) {
- if ((!t || jb(t.currentTarget, G(t))) && t && t.button === 0 && !e.isTriggeringEvent && !nx.isOpening) {
+ if ((!t || Rb(t.currentTarget, G(t))) && t && t.button === 0 && !e.isTriggeringEvent && !lx.isOpening) {
let n = !0;
- if (s && t.preventDefault(), !e.ignoreEmulatedMouseEvents && !e.isPressed && (e.pointerType === "virtual" || ex(t.nativeEvent))) {
+ if (s && t.preventDefault(), !e.ignoreEmulatedMouseEvents && !e.isPressed && (e.pointerType === "virtual" || sx(t.nativeEvent))) {
let e = y(t, "virtual"), r = S(t, "virtual"), i = x(t, "virtual");
E(t), n = e && r && i;
} else if (e.isPressed && e.pointerType !== "keyboard") {
- let r = e.pointerType || t.nativeEvent.pointerType || "virtual", i = S(cC(t.currentTarget, t), r), a = x(cC(t.currentTarget, t), r, !0);
+ let r = e.pointerType || t.nativeEvent.pointerType || "virtual", i = S(hC(t.currentTarget, t), r), a = x(hC(t.currentTarget, t), r, !0);
n = i && a, e.isOverTarget = !1, E(t), w(t);
}
e.ignoreEmulatedMouseEvents = !1, n && t.stopPropagation();
}
}
}, n = (t) => {
- if (e.isPressed && e.target && sC(t, e.target)) {
- uC(G(t), t.key) && t.preventDefault();
- let n = G(t), r = jb(e.target, n);
- x(cC(e.target, t), "keyboard", r), r && D(t, e.target), v(), t.key !== "Enter" && oC(e.target) && jb(e.target, n) && !t[nC] && (t[nC] = !0, nx(e.target, t, !1)), e.isPressed = !1, e.metaKeyEvents?.delete(t.key);
+ if (e.isPressed && e.target && mC(t, e.target)) {
+ _C(G(t), t.key) && t.preventDefault();
+ let n = G(t), r = Rb(e.target, n);
+ x(hC(e.target, t), "keyboard", r), r && D(t, e.target), v(), t.key !== "Enter" && pC(e.target) && Rb(e.target, n) && !t[lC] && (t[lC] = !0, lx(e.target, t, !1)), e.isPressed = !1, e.metaKeyEvents?.delete(t.key);
} else if (t.key === "Meta" && e.metaKeyEvents?.size) {
let t = e.metaKeyEvents;
e.metaKeyEvents = void 0;
@@ -22267,39 +22301,39 @@ function aC(e) {
};
if (typeof PointerEvent < "u") {
t.onPointerDown = (t) => {
- if (t.button !== 0 || !jb(t.currentTarget, G(t))) return;
- if (Tre(t.nativeEvent)) {
+ if (t.button !== 0 || !Rb(t.currentTarget, G(t))) return;
+ if (Nre(t.nativeEvent)) {
e.pointerType = "virtual";
return;
}
e.pointerType = t.pointerType;
let i = !0;
if (!e.isPressed) {
- e.isPressed = !0, e.isOverTarget = !0, e.activePointerId = t.pointerId, e.target = t.currentTarget, d || JS(e.target), i = y(t, e.pointerType);
+ e.isPressed = !0, e.isOverTarget = !0, e.activePointerId = t.pointerId, e.target = t.currentTarget, d || tC(e.target), i = y(t, e.pointerType);
let a = G(t);
- "releasePointerCapture" in a && ("hasPointerCapture" in a ? a.hasPointerCapture(t.pointerId) && a.releasePointerCapture(t.pointerId) : a.releasePointerCapture(t.pointerId)), _(wb(t.currentTarget), "pointerup", n, !1), _(wb(t.currentTarget), "pointercancel", r, !1);
+ "releasePointerCapture" in a && ("hasPointerCapture" in a ? a.hasPointerCapture(t.pointerId) && a.releasePointerCapture(t.pointerId) : a.releasePointerCapture(t.pointerId)), _(jb(t.currentTarget), "pointerup", n, !1), _(jb(t.currentTarget), "pointercancel", r, !1);
}
i && t.stopPropagation();
}, t.onMouseDown = (t) => {
- if (jb(t.currentTarget, G(t)) && t.button === 0) {
+ if (Rb(t.currentTarget, G(t)) && t.button === 0) {
if (l) {
- let n = Sre(t.target);
+ let n = Are(t.target);
n && e.disposables.push(n);
}
t.stopPropagation();
}
}, t.onPointerUp = (t) => {
- jb(t.currentTarget, G(t)) && e.pointerType !== "virtual" && t.button === 0 && !e.isPressed && S(t, e.pointerType || t.pointerType);
+ Rb(t.currentTarget, G(t)) && e.pointerType !== "virtual" && t.button === 0 && !e.isPressed && S(t, e.pointerType || t.pointerType);
}, t.onPointerEnter = (t) => {
- t.pointerId === e.activePointerId && e.target && !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, y(cC(e.target, t), e.pointerType));
+ t.pointerId === e.activePointerId && e.target && !e.isOverTarget && e.pointerType != null && (e.isOverTarget = !0, y(hC(e.target, t), e.pointerType));
}, t.onPointerLeave = (t) => {
- t.pointerId === e.activePointerId && e.target && e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, x(cC(e.target, t), e.pointerType, !1), T(t));
+ t.pointerId === e.activePointerId && e.target && e.isOverTarget && e.pointerType != null && (e.isOverTarget = !1, x(hC(e.target, t), e.pointerType, !1), T(t));
};
let n = (t) => {
if (t.pointerId === e.activePointerId && e.isPressed && t.button === 0 && e.target) {
- if (jb(e.target, G(t)) && e.pointerType != null) {
+ if (Rb(e.target, G(t)) && e.pointerType != null) {
let n = !1, r = setTimeout(() => {
- e.isPressed && e.target instanceof HTMLElement && (n ? w(t) : (Cb(e.target), e.target.click()));
+ e.isPressed && e.target instanceof HTMLElement && (n ? w(t) : (Ab(e.target), e.target.click()));
}, 80);
_(t.currentTarget, "click", () => n = !0, !0), e.disposables.push(() => clearTimeout(r));
} else w(t);
@@ -22309,7 +22343,7 @@ function aC(e) {
w(e);
};
t.onDragStart = (e) => {
- jb(e.currentTarget, G(e)) && w(e);
+ Rb(e.currentTarget, G(e)) && w(e);
};
}
return t;
@@ -22326,14 +22360,14 @@ function aC(e) {
]);
return (0, P.useEffect)(() => {
if (!f) return;
- let e = wb(f.current);
- if (!e || !e.head || e.getElementById(rC)) return;
+ let e = jb(f.current);
+ if (!e || !e.head || e.getElementById(uC)) return;
let t = e.createElement("style");
- t.id = rC;
- let n = ZS(e);
+ t.id = uC;
+ let n = iC(e);
n && (t.nonce = n), t.textContent = `
@layer {
- [${iC}] {
+ [${dC}] {
touch-action: pan-x pan-y pinch-zoom;
}
}
@@ -22341,23 +22375,23 @@ function aC(e) {
}, [f]), (0, P.useEffect)(() => {
let e = g.current;
return () => {
- d || YS(e.target ?? void 0);
+ d || nC(e.target ?? void 0);
for (let t of e.disposables) t();
e.disposables = [];
};
}, [d]), {
isPressed: c || m,
- pressProps: K(p, O, { [iC]: !0 })
+ pressProps: K(p, O, { [dC]: !0 })
};
}
-function oC(e) {
+function pC(e) {
return e.tagName === "A" && e.hasAttribute("href");
}
-function sC(e, t) {
+function mC(e, t) {
let { key: n, code: r } = e, i = t, a = i.getAttribute("role");
- return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof Tb(i).HTMLInputElement && !fC(i, n) || i instanceof Tb(i).HTMLTextAreaElement || i.isContentEditable) && !((a === "link" || !a && oC(i)) && n !== "Enter");
+ return (n === "Enter" || n === " " || n === "Spacebar" || r === "Space") && !(i instanceof Mb(i).HTMLInputElement && !yC(i, n) || i instanceof Mb(i).HTMLTextAreaElement || i.isContentEditable) && !((a === "link" || !a && pC(i)) && n !== "Enter");
}
-function cC(e, t) {
+function hC(e, t) {
let n = t.clientX, r = t.clientY;
return {
currentTarget: e,
@@ -22370,13 +22404,13 @@ function cC(e, t) {
key: t.key
};
}
-function lC(e) {
- return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !oC(e);
+function gC(e) {
+ return e instanceof HTMLInputElement ? !1 : e instanceof HTMLButtonElement ? e.type !== "submit" && e.type !== "reset" : !pC(e);
}
-function uC(e, t) {
- return Jb() && t === "Enter" ? !1 : e instanceof HTMLInputElement ? t === "Enter" && (e.type === "checkbox" || e.type === "radio") ? !1 : !fC(e, t) : lC(e);
+function _C(e, t) {
+ return tx() && t === "Enter" ? !1 : e instanceof HTMLInputElement ? t === "Enter" && (e.type === "checkbox" || e.type === "radio") ? !1 : !yC(e, t) : gC(e);
}
-var dC = /* @__PURE__ */ new Set([
+var vC = /* @__PURE__ */ new Set([
"checkbox",
"radio",
"range",
@@ -22387,11 +22421,11 @@ var dC = /* @__PURE__ */ new Set([
"submit",
"reset"
]);
-function fC(e, t) {
- return e.type === "checkbox" || e.type === "radio" ? t === " " : dC.has(e.type);
+function yC(e, t) {
+ return e.type === "checkbox" || e.type === "radio" ? t === " " : vC.has(e.type);
}
// node_modules/react-aria/dist/private/button/useButton.mjs
-function pC(e, t) {
+function bC(e, t) {
let { elementType: n = "button", isDisabled: r, onPress: i, onPressStart: a, onPressEnd: o, onPressUp: s, onPressChange: c, preventFocusOnPress: l, allowFocusWhenDisabled: u, onClick: d, href: f, target: p, rel: m, type: h = "button" } = e, g;
g = n === "button" ? {
type: h,
@@ -22413,7 +22447,7 @@ function pC(e, t) {
"aria-disabled": !r || n === "input" ? void 0 : r,
rel: n === "a" ? m : void 0
};
- let { pressProps: _, isPressed: v } = aC({
+ let { pressProps: _, isPressed: v } = fC({
onPressStart: a,
onPressEnd: o,
onPressChange: c,
@@ -22423,9 +22457,9 @@ function pC(e, t) {
isDisabled: r,
preventFocusOnPress: l,
ref: t
- }), { focusableProps: y } = eS(e, t);
+ }), { focusableProps: y } = sS(e, t);
u && (y.tabIndex = r ? -1 : y.tabIndex);
- let b = K(y, _, WS(e, { labelable: !0 }));
+ let b = K(y, _, ZS(e, { labelable: !0 }));
return {
isPressed: v,
buttonProps: K(g, b, {
@@ -22439,7 +22473,7 @@ function pC(e, t) {
};
}
// node_modules/react-aria/dist/private/utils/shadowdom/ShadowTreeWalker.mjs
-var mC = class {
+var xC = class {
constructor(e, t, n, r) {
this._walkerStack = [], this._currentSetFor = /* @__PURE__ */ new Set(), this._acceptNode = (e) => {
if (e.nodeType === Node.ELEMENT_NODE) {
@@ -22464,7 +22498,7 @@ var mC = class {
return this._currentNode;
}
set currentNode(e) {
- if (!jb(this.root, e)) throw Error("Cannot set currentNode to a node that is not contained by the root node.");
+ if (!Rb(this.root, e)) throw Error("Cannot set currentNode to a node that is not contained by the root node.");
let t = [], n = e, r = e;
for (this._currentNode = e; n && n !== this.root;) if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
let e = n, i = this._doc.createTreeWalker(e, this.whatToShow, { acceptNode: this._acceptNode });
@@ -22478,7 +22512,7 @@ var mC = class {
}
firstChild() {
let e = this.currentNode, t = this.nextNode();
- return jb(e, t) ? (t && (this.currentNode = t), t) : (this.currentNode = e, null);
+ return Rb(e, t) ? (t && (this.currentNode = t), t) : (this.currentNode = e, null);
}
lastChild() {
let e = this._walkerStack[0].lastChild();
@@ -22542,44 +22576,44 @@ var mC = class {
return null;
}
};
-function hC(e, t, n, r) {
- return Ab() ? new mC(e, t, n, r) : e.createTreeWalker(t, n, r);
+function SC(e, t, n, r) {
+ return Lb() ? new xC(e, t, n, r) : e.createTreeWalker(t, n, r);
}
// node_modules/react-aria/dist/private/focus/FocusScope.mjs
-var gC = /*#__PURE__*/ P.createContext(null), _C = "react-aria-focus-scope-restore", vC = null;
-function yC(e) {
- let { children: t, contain: n, restoreFocus: r, autoFocus: i } = e, a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)([]), { parentNode: c } = (0, P.useContext)(gC) || {}, l = (0, P.useMemo)(() => new LC({ scopeRef: s }), [s]);
- Bb(() => {
- let e = c || RC.root;
- if (RC.getTreeNode(e.scopeRef) && vC && !AC(vC, e.scopeRef)) {
- let t = RC.getTreeNode(vC);
+var CC = /*#__PURE__*/ P.createContext(null), wC = "react-aria-focus-scope-restore", TC = null;
+function EC(e) {
+ let { children: t, contain: n, restoreFocus: r, autoFocus: i } = e, a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)([]), { parentNode: c } = (0, P.useContext)(CC) || {}, l = (0, P.useMemo)(() => new WC({ scopeRef: s }), [s]);
+ qb(() => {
+ let e = c || GC.root;
+ if (GC.getTreeNode(e.scopeRef) && TC && !LC(TC, e.scopeRef)) {
+ let t = GC.getTreeNode(TC);
t && (e = t);
}
- e.addChild(l), RC.addNode(l);
- }, [l, c]), Bb(() => {
- let e = RC.getTreeNode(s);
+ e.addChild(l), GC.addNode(l);
+ }, [l, c]), qb(() => {
+ let e = GC.getTreeNode(s);
e && (e.contain = !!n);
- }, [n]), Bb(() => {
+ }, [n]), qb(() => {
let e = a.current?.nextSibling, t = [], n = (e) => e.stopPropagation();
- for (; e && e !== o.current;) t.push(e), e.addEventListener(_C, n), e = e.nextSibling;
+ for (; e && e !== o.current;) t.push(e), e.addEventListener(wC, n), e = e.nextSibling;
return s.current = t, () => {
- for (let e of t) e.removeEventListener(_C, n);
+ for (let e of t) e.removeEventListener(wC, n);
};
- }, [t]), Uie(s, r, n), TC(s, n), Wie(s, r, n), Hie(s, i), (0, P.useEffect)(() => {
- let e = Mb(wb(s.current ? s.current[0] : void 0)), t = null;
- if (DC(e, s.current)) {
- for (let n of RC.traverse()) n.scopeRef && DC(e, n.scopeRef.current) && (t = n);
- t === RC.getTreeNode(s) && (vC = t.scopeRef);
- }
- }, [s]), Bb(() => () => {
- let e = RC.getTreeNode(s)?.parent?.scopeRef ?? null;
- s !== vC && !AC(s, vC) || e && !RC.getTreeNode(e) || (vC = e), RC.removeTreeNode(s);
+ }, [t]), Zie(s, r, n), MC(s, n), Qie(s, r, n), Xie(s, i), (0, P.useEffect)(() => {
+ let e = zb(jb(s.current ? s.current[0] : void 0)), t = null;
+ if (PC(e, s.current)) {
+ for (let n of GC.traverse()) n.scopeRef && PC(e, n.scopeRef.current) && (t = n);
+ t === GC.getTreeNode(s) && (TC = t.scopeRef);
+ }
+ }, [s]), qb(() => () => {
+ let e = GC.getTreeNode(s)?.parent?.scopeRef ?? null;
+ s !== TC && !LC(s, TC) || e && !GC.getTreeNode(e) || (TC = e), GC.removeTreeNode(s);
}, [s]);
- let u = (0, P.useMemo)(() => bC(s), []), d = (0, P.useMemo)(() => ({
+ let u = (0, P.useMemo)(() => DC(s), []), d = (0, P.useMemo)(() => ({
focusManager: u,
parentNode: l
}), [l, u]);
- return /*#__PURE__*/ P.createElement(gC.Provider, { value: d }, /*#__PURE__*/ P.createElement("span", {
+ return /*#__PURE__*/ P.createElement(CC.Provider, { value: d }, /*#__PURE__*/ P.createElement("span", {
"data-focus-scope-start": !0,
hidden: !0,
ref: a
@@ -22589,154 +22623,154 @@ function yC(e) {
ref: o
}));
}
-function bC(e) {
+function DC(e) {
return {
focusNext(t = {}) {
- let n = e.current, { from: r, tabbable: i, wrap: a, accept: o } = t, s = r || Mb(wb(n[0] ?? void 0)), c = n[0].previousElementSibling, l = IC(xC(n), {
+ let n = e.current, { from: r, tabbable: i, wrap: a, accept: o } = t, s = r || zb(jb(n[0] ?? void 0)), c = n[0].previousElementSibling, l = UC(OC(n), {
tabbable: i,
accept: o
}, n);
- l.currentNode = DC(s, n) ? s : c;
+ l.currentNode = PC(s, n) ? s : c;
let u = l.nextNode();
- return !u && a && (l.currentNode = c, u = l.nextNode()), u && jC(u, !0), u;
+ return !u && a && (l.currentNode = c, u = l.nextNode()), u && RC(u, !0), u;
},
focusPrevious(t = {}) {
- let n = e.current, { from: r, tabbable: i, wrap: a, accept: o } = t, s = r || Mb(wb(n[0] ?? void 0)), c = n[n.length - 1].nextElementSibling, l = IC(xC(n), {
+ let n = e.current, { from: r, tabbable: i, wrap: a, accept: o } = t, s = r || zb(jb(n[0] ?? void 0)), c = n[n.length - 1].nextElementSibling, l = UC(OC(n), {
tabbable: i,
accept: o
}, n);
- l.currentNode = DC(s, n) ? s : c;
+ l.currentNode = PC(s, n) ? s : c;
let u = l.previousNode();
- return !u && a && (l.currentNode = c, u = l.previousNode()), u && jC(u, !0), u;
+ return !u && a && (l.currentNode = c, u = l.previousNode()), u && RC(u, !0), u;
},
focusFirst(t = {}) {
- let n = e.current, { tabbable: r, accept: i } = t, a = IC(xC(n), {
+ let n = e.current, { tabbable: r, accept: i } = t, a = UC(OC(n), {
tabbable: r,
accept: i
}, n);
a.currentNode = n[0].previousElementSibling;
let o = a.nextNode();
- return o && jC(o, !0), o;
+ return o && RC(o, !0), o;
},
focusLast(t = {}) {
- let n = e.current, { tabbable: r, accept: i } = t, a = IC(xC(n), {
+ let n = e.current, { tabbable: r, accept: i } = t, a = UC(OC(n), {
tabbable: r,
accept: i
}, n);
a.currentNode = n[n.length - 1].nextElementSibling;
let o = a.previousNode();
- return o && jC(o, !0), o;
+ return o && RC(o, !0), o;
}
};
}
-function xC(e) {
+function OC(e) {
return e[0].parentElement;
}
-function SC(e) {
- let t = RC.getTreeNode(vC);
+function kC(e) {
+ let t = GC.getTreeNode(TC);
for (; t && t.scopeRef !== e;) {
if (t.contain) return !1;
t = t.parent;
}
return !0;
}
-function CC(e) {
- if (!e.form) return Array.from(wb(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((e) => !e.form);
- let t = e.form.elements.namedItem(e.name), n = Tb(e);
+function AC(e) {
+ if (!e.form) return Array.from(jb(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter((e) => !e.form);
+ let t = e.form.elements.namedItem(e.name), n = Mb(e);
return t instanceof n.RadioNodeList ? Array.from(t).filter((e) => e instanceof n.HTMLInputElement) : t instanceof n.HTMLInputElement ? [t] : [];
}
-function wC(e) {
+function jC(e) {
if (e.checked) return !0;
- let t = CC(e);
+ let t = AC(e);
return t.length > 0 && !t.some((e) => e.checked);
}
-function TC(e, t) {
+function MC(e, t) {
let n = (0, P.useRef)(void 0), r = (0, P.useRef)(void 0);
- Bb(() => {
+ qb(() => {
let i = e.current;
if (!t) {
r.current &&= (cancelAnimationFrame(r.current), void 0);
return;
}
- let a = wb(i ? i[0] : void 0), o = (t) => {
- if (t.key !== "Tab" || t.altKey || t.ctrlKey || t.metaKey || !SC(e) || t.isComposing) return;
- let n = Mb(a), r = e.current;
- if (!r || !DC(n, r)) return;
- let i = IC(xC(r), { tabbable: !0 }, r);
+ let a = jb(i ? i[0] : void 0), o = (t) => {
+ if (t.key !== "Tab" || t.altKey || t.ctrlKey || t.metaKey || !kC(e) || t.isComposing) return;
+ let n = zb(a), r = e.current;
+ if (!r || !PC(n, r)) return;
+ let i = UC(OC(r), { tabbable: !0 }, r);
if (!n) return;
i.currentNode = n;
let o = t.shiftKey ? i.previousNode() : i.nextNode();
- o ||= (i.currentNode = t.shiftKey ? r[r.length - 1].nextElementSibling : r[0].previousElementSibling, t.shiftKey ? i.previousNode() : i.nextNode()), t.preventDefault(), o && (jC(o, !0), o instanceof Tb(o).HTMLInputElement && o.select());
+ o ||= (i.currentNode = t.shiftKey ? r[r.length - 1].nextElementSibling : r[0].previousElementSibling, t.shiftKey ? i.previousNode() : i.nextNode()), t.preventDefault(), o && (RC(o, !0), o instanceof Mb(o).HTMLInputElement && o.select());
}, s = (t) => {
- (!vC || AC(vC, e)) && DC(G(t), e.current) ? (vC = e, n.current = G(t)) : SC(e) && !OC(G(t), e) ? n.current ? jC(n.current) : vC && vC.current && NC(vC.current) : SC(e) && (n.current = G(t));
+ (!TC || LC(TC, e)) && PC(G(t), e.current) ? (TC = e, n.current = G(t)) : kC(e) && !FC(G(t), e) ? n.current ? RC(n.current) : TC && TC.current && BC(TC.current) : kC(e) && (n.current = G(t));
}, c = (t) => {
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
- let r = wx(), i = (r === "virtual" || r === null) && $b() && Qb(), o = Mb(a);
- if (!i && o && SC(e) && !OC(o, e)) {
- vC = e;
+ let r = jx(), i = (r === "virtual" || r === null) && ox() && ax(), o = zb(a);
+ if (!i && o && kC(e) && !FC(o, e)) {
+ TC = e;
let r = G(t);
- r && r.isConnected ? (n.current = r, jC(n.current)) : vC.current && NC(vC.current);
+ r && r.isConnected ? (n.current = r, RC(n.current)) : TC.current && BC(TC.current);
}
});
};
return a.addEventListener("keydown", o, !1), a.addEventListener("focusin", s, !1), i?.forEach((e) => e.addEventListener("focusin", s, !1)), i?.forEach((e) => e.addEventListener("focusout", c, !1)), () => {
a.removeEventListener("keydown", o, !1), a.removeEventListener("focusin", s, !1), i?.forEach((e) => e.removeEventListener("focusin", s, !1)), i?.forEach((e) => e.removeEventListener("focusout", c, !1));
};
- }, [e, t]), Bb(() => () => {
+ }, [e, t]), qb(() => () => {
r.current && cancelAnimationFrame(r.current);
}, [r]);
}
-function EC(e) {
- return OC(e);
+function NC(e) {
+ return FC(e);
}
-function DC(e, t) {
- return !e || !t ? !1 : t.some((t) => jb(t, e));
+function PC(e, t) {
+ return !e || !t ? !1 : t.some((t) => Rb(t, e));
}
-function OC(e, t = null) {
+function FC(e, t = null) {
if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
- for (let { scopeRef: n } of RC.traverse(RC.getTreeNode(t))) if (n && DC(e, n.current)) return !0;
+ for (let { scopeRef: n } of GC.traverse(GC.getTreeNode(t))) if (n && PC(e, n.current)) return !0;
return !1;
}
-function kC(e) {
- return OC(e, vC);
+function IC(e) {
+ return FC(e, TC);
}
-function AC(e, t) {
- let n = RC.getTreeNode(t)?.parent;
+function LC(e, t) {
+ let n = GC.getTreeNode(t)?.parent;
for (; n;) {
if (n.scopeRef === e) return !0;
n = n.parent;
}
return !1;
}
-function jC(e, t = !1) {
+function RC(e, t = !1) {
if (e != null && !t) try {
- Fx(e);
+ Hx(e);
} catch {}
else if (e != null) try {
e.focus();
} catch {}
}
-function MC(e, t = !0) {
- let n = e[0].previousElementSibling, r = xC(e), i = IC(r, { tabbable: t }, e);
+function zC(e, t = !0) {
+ let n = e[0].previousElementSibling, r = OC(e), i = UC(r, { tabbable: t }, e);
i.currentNode = n;
let a = i.nextNode();
- return t && !a && (r = xC(e), i = IC(r, { tabbable: !1 }, e), i.currentNode = n, a = i.nextNode()), a;
+ return t && !a && (r = OC(e), i = UC(r, { tabbable: !1 }, e), i.currentNode = n, a = i.nextNode()), a;
}
-function NC(e, t = !0) {
- jC(MC(e, t));
+function BC(e, t = !0) {
+ RC(zC(e, t));
}
-function Hie(e, t) {
+function Xie(e, t) {
let n = P.useRef(t);
(0, P.useEffect)(() => {
- n.current && (vC = e, !DC(Mb(wb(e.current ? e.current[0] : void 0)), vC.current) && e.current && NC(e.current)), n.current = !1;
+ n.current && (TC = e, !PC(zb(jb(e.current ? e.current[0] : void 0)), TC.current) && e.current && BC(e.current)), n.current = !1;
}, [e]);
}
-function Uie(e, t, n) {
- Bb(() => {
+function Zie(e, t, n) {
+ qb(() => {
if (t || n) return;
- let r = e.current, i = wb(r ? r[0] : void 0), a = (t) => {
+ let r = e.current, i = jb(r ? r[0] : void 0), a = (t) => {
let n = G(t);
- DC(n, e.current) ? vC = e : EC(n) || (vC = null);
+ PC(n, e.current) ? TC = e : NC(n) || (TC = null);
};
return i.addEventListener("focusin", a, !1), r?.forEach((e) => e.addEventListener("focusin", a, !1)), () => {
i.removeEventListener("focusin", a, !1), r?.forEach((e) => e.removeEventListener("focusin", a, !1));
@@ -22747,43 +22781,43 @@ function Uie(e, t, n) {
n
]);
}
-function PC(e) {
- let t = RC.getTreeNode(vC);
+function VC(e) {
+ let t = GC.getTreeNode(TC);
for (; t && t.scopeRef !== e;) {
if (t.nodeToRestore) return !1;
t = t.parent;
}
return t?.scopeRef === e;
}
-function Wie(e, t, n) {
- let r = (0, P.useRef)(typeof document < "u" ? Mb(wb(e.current ? e.current[0] : void 0)) : null);
- Bb(() => {
- let r = e.current, i = wb(r ? r[0] : void 0);
+function Qie(e, t, n) {
+ let r = (0, P.useRef)(typeof document < "u" ? zb(jb(e.current ? e.current[0] : void 0)) : null);
+ qb(() => {
+ let r = e.current, i = jb(r ? r[0] : void 0);
if (!t || n) return;
let a = () => {
- (!vC || AC(vC, e)) && DC(Mb(i), e.current) && (vC = e);
+ (!TC || LC(TC, e)) && PC(zb(i), e.current) && (TC = e);
};
return i.addEventListener("focusin", a, !1), r?.forEach((e) => e.addEventListener("focusin", a, !1)), () => {
i.removeEventListener("focusin", a, !1), r?.forEach((e) => e.removeEventListener("focusin", a, !1));
};
- }, [e, n]), Bb(() => {
- let r = wb(e.current ? e.current[0] : void 0);
+ }, [e, n]), qb(() => {
+ let r = jb(e.current ? e.current[0] : void 0);
if (!t) return;
let i = (t) => {
- if (t.key !== "Tab" || t.altKey || t.ctrlKey || t.metaKey || !SC(e) || t.isComposing) return;
+ if (t.key !== "Tab" || t.altKey || t.ctrlKey || t.metaKey || !kC(e) || t.isComposing) return;
let n = r.activeElement;
- if (!OC(n, e) || !PC(e)) return;
- let i = RC.getTreeNode(e);
+ if (!FC(n, e) || !VC(e)) return;
+ let i = GC.getTreeNode(e);
if (!i) return;
- let a = i.nodeToRestore, o = IC(r.body, { tabbable: !0 });
+ let a = i.nodeToRestore, o = UC(r.body, { tabbable: !0 });
o.currentNode = n;
let s = t.shiftKey ? o.previousNode() : o.nextNode();
- if (a && a.isConnected && a !== r.body || (a = void 0, i.nodeToRestore = void 0), (!s || !OC(s, e)) && a) {
+ if (a && a.isConnected && a !== r.body || (a = void 0, i.nodeToRestore = void 0), (!s || !FC(s, e)) && a) {
o.currentNode = a;
do
s = t.shiftKey ? o.previousNode() : o.nextNode();
- while (OC(s, e));
- t.preventDefault(), t.stopPropagation(), s ? jC(s, !0) : EC(a) ? jC(a, !0) : n.blur();
+ while (FC(s, e));
+ t.preventDefault(), t.stopPropagation(), s ? RC(s, !0) : NC(a) ? RC(a, !0) : n.blur();
}
};
return n || r.addEventListener("keydown", i, !0), () => {
@@ -22793,31 +22827,31 @@ function Wie(e, t, n) {
e,
t,
n
- ]), Bb(() => {
- let n = wb(e.current ? e.current[0] : void 0);
+ ]), qb(() => {
+ let n = jb(e.current ? e.current[0] : void 0);
if (!t) return;
- let i = RC.getTreeNode(e);
+ let i = GC.getTreeNode(e);
if (i) return i.nodeToRestore = r.current ?? void 0, () => {
- let r = RC.getTreeNode(e);
+ let r = GC.getTreeNode(e);
if (!r) return;
- let i = r.nodeToRestore, a = Mb(n);
- if (t && i && (a && OC(a, e) || a === n.body && PC(e))) {
- let t = RC.clone();
+ let i = r.nodeToRestore, a = zb(n);
+ if (t && i && (a && FC(a, e) || a === n.body && VC(e))) {
+ let t = GC.clone();
requestAnimationFrame(() => {
if (n.activeElement === n.body) {
let n = t.getTreeNode(e);
for (; n;) {
if (n.nodeToRestore && n.nodeToRestore.isConnected) {
- FC(n.nodeToRestore);
+ HC(n.nodeToRestore);
return;
}
n = n.parent;
}
for (n = t.getTreeNode(e); n;) {
- if (n.scopeRef && n.scopeRef.current && RC.getTreeNode(n.scopeRef)) {
- let e = MC(n.scopeRef.current, !0);
+ if (n.scopeRef && n.scopeRef.current && GC.getTreeNode(n.scopeRef)) {
+ let e = zC(n.scopeRef.current, !0);
if (e) {
- FC(e);
+ HC(e);
return;
}
}
@@ -22829,21 +22863,21 @@ function Wie(e, t, n) {
};
}, [e, t]);
}
-function FC(e) {
- e.dispatchEvent(new CustomEvent(_C, {
+function HC(e) {
+ e.dispatchEvent(new CustomEvent(wC, {
bubbles: !0,
cancelable: !0
- })) && jC(e);
+ })) && RC(e);
}
-function IC(e, t, n) {
- let r = t?.tabbable ? Rb : Lb, i = wb(e?.nodeType === Node.ELEMENT_NODE ? e : null), a = hC(i, e || i, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
- return jb(t?.from, e) || t?.tabbable && e.tagName === "INPUT" && e.getAttribute("type") === "radio" && (!wC(e) || a.currentNode.tagName === "INPUT" && a.currentNode.type === "radio" && a.currentNode.name === e.name) ? NodeFilter.FILTER_REJECT : r(e) && (!n || DC(e, n)) && (!t?.accept || t.accept(e)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
+function UC(e, t, n) {
+ let r = t?.tabbable ? Gb : Wb, i = jb(e?.nodeType === Node.ELEMENT_NODE ? e : null), a = SC(i, e || i, NodeFilter.SHOW_ELEMENT, { acceptNode(e) {
+ return Rb(t?.from, e) || t?.tabbable && e.tagName === "INPUT" && e.getAttribute("type") === "radio" && (!jC(e) || a.currentNode.tagName === "INPUT" && a.currentNode.type === "radio" && a.currentNode.name === e.name) ? NodeFilter.FILTER_REJECT : r(e) && (!n || PC(e, n)) && (!t?.accept || t.accept(e)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
} });
return t?.from && (a.currentNode = t.from), a;
}
-var Gie = class e {
+var $ie = class e {
constructor() {
- this.fastMap = /* @__PURE__ */ new Map(), this.root = new LC({ scopeRef: null }), this.fastMap.set(null, this.root);
+ this.fastMap = /* @__PURE__ */ new Map(), this.root = new WC({ scopeRef: null }), this.fastMap.set(null, this.root);
}
get size() {
return this.fastMap.size;
@@ -22854,7 +22888,7 @@ var Gie = class e {
addTreeNode(e, t, n) {
let r = this.fastMap.get(t ?? null);
if (!r) return;
- let i = new LC({ scopeRef: e });
+ let i = new WC({ scopeRef: e });
r.addChild(i), i.parent = r, this.fastMap.set(e, i), n && (i.nodeToRestore = n);
}
addNode(e) {
@@ -22865,7 +22899,7 @@ var Gie = class e {
let t = this.fastMap.get(e);
if (!t) return;
let n = t.parent;
- for (let e of this.traverse()) e !== t && t.nodeToRestore && e.nodeToRestore && t.scopeRef && t.scopeRef.current && DC(e.nodeToRestore, t.scopeRef.current) && (e.nodeToRestore = t.nodeToRestore);
+ for (let e of this.traverse()) e !== t && t.nodeToRestore && e.nodeToRestore && t.scopeRef && t.scopeRef.current && PC(e.nodeToRestore, t.scopeRef.current) && (e.nodeToRestore = t.nodeToRestore);
let r = t.children;
n && (n.removeChild(t), r.size > 0 && r.forEach((e) => n && n.addChild(e))), this.fastMap.delete(t.scopeRef);
}
@@ -22877,7 +22911,7 @@ var Gie = class e {
for (let e of this.traverse()) t.addTreeNode(e.scopeRef, e.parent?.scopeRef ?? null, e.nodeToRestore);
return t;
}
-}, LC = class {
+}, WC = class {
constructor(e) {
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = e.scopeRef;
}
@@ -22887,13 +22921,13 @@ var Gie = class e {
removeChild(e) {
this.children.delete(e), e.parent = void 0;
}
-}, RC = new Gie(), zC = 7e3, BC = null;
-function VC(e, t = "assertive", n = zC) {
- BC ? BC.announce(e, t, n) : (BC = new Kie(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? BC.announce(e, t, n) : setTimeout(() => {
- BC?.isAttached() && BC?.announce(e, t, n);
+}, GC = new $ie(), KC = 7e3, qC = null;
+function JC(e, t = "assertive", n = KC) {
+ qC ? qC.announce(e, t, n) : (qC = new eae(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? qC.announce(e, t, n) : setTimeout(() => {
+ qC?.isAttached() && qC?.announce(e, t, n);
}, 100));
}
-var Kie = class {
+var eae = class {
constructor() {
this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
border: 0,
@@ -22918,7 +22952,7 @@ var Kie = class {
destroy() {
this.node &&= (document.body.removeChild(this.node), null);
}
- announce(e, t = "assertive", n = zC) {
+ announce(e, t = "assertive", n = KC) {
if (!this.node) return;
let r = document.createElement("div");
typeof e == "object" ? (r.setAttribute("role", "img"), r.setAttribute("aria-labelledby", e["aria-labelledby"])) : r.textContent = e, t === "assertive" ? this.assertiveLog?.appendChild(r) : this.politeLog?.appendChild(r), e !== "" && setTimeout(() => {
@@ -22930,8 +22964,8 @@ var Kie = class {
}
};
// node_modules/react-aria/dist/private/utils/useUpdateEffect.mjs
-function HC(e, t) {
- let n = (0, P.useRef)(!0), r = (0, P.useRef)(null), i = OS(e);
+function YC(e, t) {
+ let n = (0, P.useRef)(!0), r = (0, P.useRef)(null), i = FS(e);
(0, P.useEffect)(() => (n.current = !0, () => {
n.current = !1;
}), []), (0, P.useEffect)(() => {
@@ -22940,30 +22974,30 @@ function HC(e, t) {
}, t);
}
// node_modules/react-aria/dist/private/utils/isScrollable.mjs
-function UC(e, t) {
+function XC(e, t) {
if (!e) return !1;
let n = window.getComputedStyle(e), r = document.scrollingElement || document.documentElement, i = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
return e === r && n.overflow !== "hidden" && (i = !0), i && t && (i = e.scrollHeight !== e.clientHeight || e.scrollWidth !== e.clientWidth), i;
}
// node_modules/react-aria/dist/private/utils/getScrollParent.mjs
-function WC(e, t) {
+function ZC(e, t) {
let n = e;
- for (UC(n, t) && (n = n.parentElement); n && !UC(n, t);) n = n.parentElement;
+ for (XC(n, t) && (n = n.parentElement); n && !XC(n, t);) n = n.parentElement;
return n || document.scrollingElement || document.documentElement;
}
// node_modules/react-aria/dist/private/utils/getScrollParents.mjs
-function GC(e, t) {
+function QC(e, t) {
let n = [], r = document.scrollingElement || document.documentElement;
- for (; e && (UC(e, t) && n.push(e), e !== r);) e = e.parentElement;
+ for (; e && (XC(e, t) && n.push(e), e !== r);) e = e.parentElement;
return n;
}
// node_modules/react-aria/dist/private/utils/scrollIntoView.mjs
-function KC(e, t, n = {}) {
- e !== t && qie(e, t, t.getBoundingClientRect(), n);
+function $C(e, t, n = {}) {
+ e !== t && tae(e, t, t.getBoundingClientRect(), n);
}
-function qie(e, t, n, r = {}) {
+function tae(e, t, n, r = {}) {
let { block: i = "nearest", inline: a = "nearest" } = r, o = e.scrollTop, s = e.scrollLeft, c = e.getBoundingClientRect(), l = window.getComputedStyle(t), u = window.getComputedStyle(e), d = document.scrollingElement || document.documentElement, f = e === d, p = e === d ? 0 : c.top, m = e === d ? e.clientHeight : c.bottom, h = e === d ? 0 : c.left, g = e === d ? e.clientWidth : c.right, _ = parseFloat(l.scrollMarginTop) || 0, v = parseFloat(l.scrollMarginBottom) || 0, y = parseFloat(l.scrollMarginLeft) || 0, b = parseFloat(l.scrollMarginRight) || 0, x = parseFloat(u.scrollPaddingTop) || 0, S = parseFloat(u.scrollPaddingBottom) || 0, C = parseFloat(u.scrollPaddingLeft) || 0, w = parseFloat(u.scrollPaddingRight) || 0, T = parseFloat(u.borderTopWidth) || 0, E = parseFloat(u.borderBottomWidth) || 0, D = parseFloat(u.borderLeftWidth) || 0, O = parseFloat(u.borderRightWidth) || 0, k = n.top - _, A = n.bottom + v, j = n.left - y, M = n.right + b, ee = e === d ? 0 : D + O, te = e === d ? 0 : T + E, ne = e === d ? 0 : e.offsetWidth - e.clientWidth - ee, N = e === d ? 0 : e.offsetHeight - e.clientHeight - te, re = p + (f ? 0 : T) + x, ie = m - (f ? 0 : E) - S - N, P = h + (f ? 0 : D) + C, F = g - (f ? 0 : O) - w;
- Xb() && Zb() || u.direction === "ltr" ? F -= ne : u.direction === "rtl" && (P += ne);
+ rx() && ix() || u.direction === "ltr" ? F -= ne : u.direction === "rtl" && (P += ne);
let ae = k < re || A > ie, oe = j < P || M > F;
if (ae && i === "start") o += k - re;
else if (ae && i === "center") o += (k + A) / 2 - (re + ie) / 2;
@@ -22984,7 +23018,7 @@ function qie(e, t, n, r = {}) {
top: o
});
}
-function qC(e, t = {}) {
+function ew(e, t = {}) {
let { containingElement: n } = t;
if (e && e.isConnected) {
let t = document.scrollingElement || document.documentElement;
@@ -22997,45 +23031,45 @@ function qC(e, t = {}) {
inline: "center"
}), e.scrollIntoView?.({ block: "nearest" }));
} else {
- let { left: t, top: r } = e.getBoundingClientRect(), i = GC(e, !0);
- for (let t of i) KC(t, e);
+ let { left: t, top: r } = e.getBoundingClientRect(), i = QC(e, !0);
+ for (let t of i) $C(t, e);
let { left: a, top: o } = e.getBoundingClientRect();
if (Math.abs(t - a) > 1 || Math.abs(r - o) > 1) {
- i = n ? GC(n, !0) : [];
- for (let e of i) KC(e, n, {
+ i = n ? QC(n, !0) : [];
+ for (let e of i) $C(e, n, {
block: "center",
inline: "center"
});
- for (let t of GC(e, !0)) KC(t, e);
+ for (let t of QC(e, !0)) $C(t, e);
}
}
}
}
// node_modules/react-aria/dist/private/utils/useDescription.mjs
-var Jie = 0, JC = /* @__PURE__ */ new Map();
-function YC(e) {
+var nae = 0, tw = /* @__PURE__ */ new Map();
+function nw(e) {
let [t, n] = (0, P.useState)();
- return Bb(() => {
+ return qb(() => {
if (!e) return;
- let t = JC.get(e);
+ let t = tw.get(e);
if (t) n(t.element.id);
else {
- let r = `react-aria-description-${Jie++}`;
+ let r = `react-aria-description-${nae++}`;
n(r);
let i = document.createElement("div");
i.id = r, i.style.display = "none", i.textContent = e, document.body.appendChild(i), t = {
refCount: 0,
element: i
- }, JC.set(e, t);
+ }, tw.set(e, t);
}
return t.refCount++, () => {
- t && --t.refCount === 0 && (t.element.remove(), JC.delete(e));
+ t && --t.refCount === 0 && (t.element.remove(), tw.delete(e));
};
}, [e]), { "aria-describedby": e ? t : void 0 };
}
// node_modules/react-aria/dist/private/utils/useFormReset.mjs
-function XC(e, t, n) {
- let r = OS((e) => {
+function rw(e, t, n) {
+ let r = FS((e) => {
n && !e.defaultPrevented && n(t);
});
(0, P.useEffect)(() => {
@@ -23046,21 +23080,21 @@ function XC(e, t, n) {
}, [e]);
}
// node_modules/react-aria/dist/private/form/useFormValidation.mjs
-function ZC(e, t, n) {
+function iw(e, t, n) {
let { validationBehavior: r, focus: i } = e;
- Bb(() => {
+ qb(() => {
if (r === "native" && n?.current && "setCustomValidity" in n.current && !n.current.disabled) {
let e = t.realtimeValidation.isInvalid ? t.realtimeValidation.validationErrors.join(" ") || "Invalid value." : "";
- n.current.setCustomValidity(e), n.current.hasAttribute("title") || (n.current.title = ""), t.realtimeValidation.isInvalid || t.updateValidation(Xie(n.current));
+ n.current.setCustomValidity(e), n.current.hasAttribute("title") || (n.current.title = ""), t.realtimeValidation.isInvalid || t.updateValidation(iae(n.current));
}
});
- let a = (0, P.useRef)(!1), o = OS(() => {
+ let a = (0, P.useRef)(!1), o = FS(() => {
a.current || t.resetValidation();
- }), s = OS((e) => {
+ }), s = FS((e) => {
t.displayValidation.isInvalid || t.commitValidation();
let r = n?.current?.form;
- !e.defaultPrevented && n && r && Zie(r) === n.current && (i ? i() : n.current?.focus(), Tx("keyboard")), e.preventDefault();
- }), c = OS(() => {
+ !e.defaultPrevented && n && r && aae(r) === n.current && (i ? i() : n.current?.focus(), Mx("keyboard")), e.preventDefault();
+ }), c = FS(() => {
t.commitValidation();
});
(0, P.useEffect)(() => {
@@ -23074,7 +23108,7 @@ function ZC(e, t, n) {
};
}, [n, r]);
}
-function Yie(e) {
+function rae(e) {
let t = e.validity;
return {
badInput: t.badInput,
@@ -23090,14 +23124,14 @@ function Yie(e) {
valid: t.valid
};
}
-function Xie(e) {
+function iae(e) {
return {
isInvalid: !e.validity.valid,
- validationDetails: Yie(e),
+ validationDetails: rae(e),
validationErrors: e.validationMessage ? [e.validationMessage] : []
};
}
-function Zie(e) {
+function aae(e) {
for (let t = 0; t < e.elements.length; t++) {
let n = e.elements[t];
if (n.validity?.valid === !1) return n;
@@ -23105,23 +23139,23 @@ function Zie(e) {
return null;
}
// node_modules/react-aria/dist/private/utils/useSlot.mjs
-function Qie(e = !0) {
+function oae(e = !0) {
let [t, n] = (0, P.useState)(e), r = (0, P.useRef)(!1), i = (0, P.useCallback)((e) => {
r.current = !0, n(!!e);
}, []);
- return Bb(() => {
+ return qb(() => {
r.current || n(!1);
}, []), [i, t];
}
-function QC(e = !0) {
- let t = Bx(), [n, r] = Qie(e);
+function aw(e = !0) {
+ let t = qx(), [n, r] = oae(e);
return {
id: r ? t : void 0,
ref: n
};
}
// node_modules/react-stately/dist/private/form/useFormValidationState.mjs
-var $C = {
+var ow = {
badInput: !1,
customError: !1,
patternMismatch: !1,
@@ -23133,18 +23167,18 @@ var $C = {
typeMismatch: !1,
valueMissing: !1,
valid: !0
-}, ew = {
- ...$C,
+}, sw = {
+ ...ow,
customError: !0,
valid: !1
-}, tw = {
+}, cw = {
isInvalid: !1,
- validationDetails: $C,
+ validationDetails: ow,
validationErrors: []
-}, $ie = (0, P.createContext)({}), nw = "__reactAriaFormValidationState";
-function rw(e) {
+}, sae = (0, P.createContext)({}), lw = "__reactAriaFormValidationState";
+function uw(e) {
if (e.__reactAriaFormValidationState) {
- let { realtimeValidation: t, displayValidation: n, updateValidation: r, resetValidation: i, commitValidation: a } = e[nw];
+ let { realtimeValidation: t, displayValidation: n, updateValidation: r, resetValidation: i, commitValidation: a } = e[lw];
return {
realtimeValidation: t,
displayValidation: n,
@@ -23153,70 +23187,70 @@ function rw(e) {
commitValidation: a
};
}
- return eae(e);
+ return cae(e);
}
-function eae(e) {
+function cae(e) {
let { isInvalid: t, validationState: n, name: r, value: i, builtinValidation: a, validate: o, validationBehavior: s = "aria" } = e;
n && (t ||= n === "invalid");
let c = t === void 0 ? null : {
isInvalid: t,
validationErrors: [],
- validationDetails: ew
- }, l = (0, P.useMemo)(() => !o || i == null ? null : aw(tae(o, i)), [o, i]);
+ validationDetails: sw
+ }, l = (0, P.useMemo)(() => !o || i == null ? null : fw(lae(o, i)), [o, i]);
a?.validationDetails.valid && (a = void 0);
- let u = (0, P.useContext)($ie), d = (0, P.useMemo)(() => r ? Array.isArray(r) ? r.flatMap((e) => iw(u[e])) : iw(u[r]) : [], [u, r]), [f, p] = (0, P.useState)(u), [m, h] = (0, P.useState)(!1);
+ let u = (0, P.useContext)(sae), d = (0, P.useMemo)(() => r ? Array.isArray(r) ? r.flatMap((e) => dw(u[e])) : dw(u[r]) : [], [u, r]), [f, p] = (0, P.useState)(u), [m, h] = (0, P.useState)(!1);
u !== f && (p(u), h(!1));
- let g = (0, P.useMemo)(() => aw(m ? [] : d), [m, d]), _ = (0, P.useRef)(tw), [v, y] = (0, P.useState)(tw), b = (0, P.useRef)(tw), x = () => {
+ let g = (0, P.useMemo)(() => fw(m ? [] : d), [m, d]), _ = (0, P.useRef)(cw), [v, y] = (0, P.useState)(cw), b = (0, P.useRef)(cw), x = () => {
if (!S) return;
C(!1);
let e = l || a || _.current;
- ow(e, b.current) || (b.current = e, y(e));
+ pw(e, b.current) || (b.current = e, y(e));
}, [S, C] = (0, P.useState)(!1);
return (0, P.useEffect)(x), {
- realtimeValidation: c || g || l || a || tw,
+ realtimeValidation: c || g || l || a || cw,
displayValidation: s === "native" ? c || g || v : c || g || l || a || v,
updateValidation(e) {
- s === "aria" && !ow(v, e) ? y(e) : _.current = e;
+ s === "aria" && !pw(v, e) ? y(e) : _.current = e;
},
resetValidation() {
- let e = tw;
- ow(e, b.current) || (b.current = e, y(e)), s === "native" && C(!1), h(!0);
+ let e = cw;
+ pw(e, b.current) || (b.current = e, y(e)), s === "native" && C(!1), h(!0);
},
commitValidation() {
s === "native" && C(!0), h(!0);
}
};
}
-function iw(e) {
+function dw(e) {
return e ? Array.isArray(e) ? e : [e] : [];
}
-function tae(e, t) {
+function lae(e, t) {
if (typeof e == "function") {
let n = e(t);
- if (n && typeof n != "boolean") return iw(n);
+ if (n && typeof n != "boolean") return dw(n);
}
return [];
}
-function aw(e) {
+function fw(e) {
return e.length ? {
isInvalid: !0,
validationErrors: e,
- validationDetails: ew
+ validationDetails: sw
} : null;
}
-function ow(e, t) {
+function pw(e, t) {
return e === t || !!e && !!t && e.isInvalid === t.isInvalid && e.validationErrors.length === t.validationErrors.length && e.validationErrors.every((e, n) => e === t.validationErrors[n]) && Object.entries(e.validationDetails).every(([e, n]) => t.validationDetails[e] === n);
}
// node_modules/react-aria/dist/private/toggle/useToggle.mjs
-function sw(e, t, n) {
- let { isDisabled: r = !1, isReadOnly: i = !1, value: a, name: o, form: s, children: c, isRequired: l, validationBehavior: u = "aria", "aria-label": d, "aria-labelledby": f, "aria-describedby": p, onPressStart: m, onPressEnd: h, onPressChange: g, onPress: _, onPressUp: v, onClick: y } = e, b = rw({
+function mw(e, t, n) {
+ let { isDisabled: r = !1, isReadOnly: i = !1, value: a, name: o, form: s, children: c, isRequired: l, validationBehavior: u = "aria", "aria-label": d, "aria-labelledby": f, "aria-describedby": p, onPressStart: m, onPressEnd: h, onPressChange: g, onPress: _, onPressUp: v, onClick: y } = e, b = uw({
...e,
value: t.isSelected
}), { isInvalid: x, validationErrors: S, validationDetails: C } = b.displayValidation;
- ZC(e, b, n);
+ iw(e, b, n);
let w = (e) => {
e.stopPropagation(), t.setSelected(G(e).checked);
- }, { pressProps: T, isPressed: E } = aC({
+ }, { pressProps: T, isPressed: E } = fC({
onPressStart: m,
onPressEnd: h,
onPressChange: g,
@@ -23224,7 +23258,7 @@ function sw(e, t, n) {
onPressUp: v,
onClick: y,
isDisabled: r
- }), [D, O] = (0, P.useState)(!1), { pressProps: k } = aC({
+ }), [D, O] = (0, P.useState)(!1), { pressProps: k } = fC({
onPressStart(e) {
e.pointerType === "keyboard" || e.pointerType === "virtual" ? e.continuePropagation() : (m?.(e), g?.(!0), O(!0));
},
@@ -23241,13 +23275,13 @@ function sw(e, t, n) {
return;
}
_?.(r), t.toggle(), n.current?.focus();
- let { [nw]: i } = e, { commitValidation: a } = i || b;
+ let { [lw]: i } = e, { commitValidation: a } = i || b;
a();
},
isDisabled: r || i
- }), { focusableProps: A } = eS(e, n), j = K(T, A), M = WS(e, { labelable: !0 });
- XC(n, t.defaultSelected, t.setSelected);
- let ee = QC(), te = QC();
+ }), { focusableProps: A } = sS(e, n), j = K(T, A), M = ZS(e, { labelable: !0 });
+ rw(n, t.defaultSelected, t.setSelected);
+ let ee = aw(), te = aw();
return {
labelProps: K(k, { onClick: (e) => e.preventDefault() }),
inputProps: K(M, {
@@ -23283,8 +23317,8 @@ function sw(e, t, n) {
};
}
// node_modules/react-aria/dist/private/checkbox/useCheckbox.mjs
-function cw(e, t, n) {
- let { labelProps: r, inputProps: i, descriptionProps: a, errorMessageProps: o, isSelected: s, isPressed: c, isDisabled: l, isReadOnly: u, isInvalid: d, validationErrors: f, validationDetails: p } = sw(e, t, n), { isIndeterminate: m } = e;
+function hw(e, t, n) {
+ let { labelProps: r, inputProps: i, descriptionProps: a, errorMessageProps: o, isSelected: s, isPressed: c, isDisabled: l, isReadOnly: u, isInvalid: d, validationErrors: f, validationDetails: p } = mw(e, t, n), { isIndeterminate: m } = e;
return (0, P.useEffect)(() => {
n.current && (n.current.indeterminate = !!m);
}), {
@@ -23302,17 +23336,17 @@ function cw(e, t, n) {
};
}
// node_modules/react-aria/dist/private/checkbox/utils.mjs
-var nae = /* @__PURE__ */ new WeakMap();
+var uae = /* @__PURE__ */ new WeakMap();
// node_modules/react-aria/dist/private/label/useLabel.mjs
-function lw(e) {
+function gw(e) {
let { id: t, label: n, "aria-labelledby": r, "aria-label": i, labelElementType: a = "label" } = e;
- t = Bx(t);
- let o = Bx(), s = {};
+ t = qx(t);
+ let o = qx(), s = {};
n && (r = r ? `${o} ${r}` : o, s = {
id: o,
htmlFor: a === "label" ? t : void 0
});
- let c = AS({
+ let c = LS({
id: t,
"aria-label": i,
"aria-labelledby": r
@@ -23323,13 +23357,13 @@ function lw(e) {
};
}
// node_modules/react-aria/dist/private/label/useField.mjs
-function uw(e) {
- let { description: t, errorMessage: n, isInvalid: r, validationState: i } = e, { labelProps: a, fieldProps: o } = lw(e), s = Vx([
+function _w(e) {
+ let { description: t, errorMessage: n, isInvalid: r, validationState: i } = e, { labelProps: a, fieldProps: o } = gw(e), s = Jx([
!!t,
!!n,
r,
i
- ]), c = Vx([
+ ]), c = Jx([
!!t,
!!n,
r,
@@ -23347,26 +23381,26 @@ function uw(e) {
};
}
// node_modules/react-aria/dist/private/interactions/useFocusWithin.mjs
-function dw(e) {
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: i } = e, a = (0, P.useRef)({ isFocusWithin: !1 }), { addGlobalListener: o, removeAllGlobalListeners: s } = $S(), c = (0, P.useCallback)((e) => {
- jb(e.currentTarget, G(e)) && a.current.isFocusWithin && !jb(e.currentTarget, e.relatedTarget) && (a.current.isFocusWithin = !1, s(), n && n(e), i && i(!1));
+function vw(e) {
+ let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: i } = e, a = (0, P.useRef)({ isFocusWithin: !1 }), { addGlobalListener: o, removeAllGlobalListeners: s } = oC(), c = (0, P.useCallback)((e) => {
+ Rb(e.currentTarget, G(e)) && a.current.isFocusWithin && !Rb(e.currentTarget, e.relatedTarget) && (a.current.isFocusWithin = !1, s(), n && n(e), i && i(!1));
}, [
n,
i,
a,
s
- ]), l = Ub(c), u = (0, P.useCallback)((e) => {
- if (!jb(e.currentTarget, G(e))) return;
- let t = G(e), n = wb(t), s = Mb(n);
+ ]), l = Xb(c), u = (0, P.useCallback)((e) => {
+ if (!Rb(e.currentTarget, G(e))) return;
+ let t = G(e), n = jb(t), s = zb(n);
if (!a.current.isFocusWithin && s === t) {
r && r(e), i && i(!0), a.current.isFocusWithin = !0, l(e);
let t = e.currentTarget;
o(n, "focus", (e) => {
let r = G(e);
- if (a.current.isFocusWithin && !jb(t, r)) {
+ if (a.current.isFocusWithin && !Rb(t, r)) {
let e = new n.defaultView.FocusEvent("blur", { relatedTarget: r });
- Hb(e, t);
- let i = Vb(e);
+ Yb(e, t);
+ let i = Jb(e);
c(i);
}
}, { capture: !0 });
@@ -23387,14 +23421,14 @@ function dw(e) {
} };
}
// node_modules/react-stately/dist/private/utils/useControlledState.mjs
-var rae = P.useInsertionEffect ?? P.useLayoutEffect;
-function fw(e, t, n) {
+var dae = P.useInsertionEffect ?? P.useLayoutEffect;
+function yw(e, t, n) {
let [r, i] = (0, P.useState)(e || t), a = (0, P.useRef)(r), o = (0, P.useRef)(e !== void 0), s = e !== void 0;
(0, P.useEffect)(() => {
o.current, o.current = s;
}, [s]);
let c = s ? e : r;
- rae(() => {
+ dae(() => {
a.current = c;
});
let [, l] = (0, P.useReducer)(() => ({}), {});
@@ -23404,8 +23438,8 @@ function fw(e, t, n) {
}, [n])];
}
// node_modules/react-stately/dist/private/toggle/useToggleState.mjs
-function pw(e = {}) {
- let { isReadOnly: t } = e, [n, r] = fw(e.isSelected, e.defaultSelected || !1, e.onChange), [i] = (0, P.useState)(n);
+function bw(e = {}) {
+ let { isReadOnly: t } = e, [n, r] = yw(e.isSelected, e.defaultSelected || !1, e.onChange), [i] = (0, P.useState)(n);
function a(e) {
t || r(e);
}
@@ -23420,26 +23454,26 @@ function pw(e = {}) {
};
}
// node_modules/react-aria/dist/private/checkbox/useCheckboxGroupItem.mjs
-function iae(e, t, n) {
- let r = pw({
+function fae(e, t, n) {
+ let r = bw({
isReadOnly: e.isReadOnly || t.isReadOnly,
isSelected: t.isSelected(e.value),
defaultSelected: t.defaultValue.includes(e.value),
onChange(n) {
n ? t.addValue(e.value) : t.removeValue(e.value), e.onChange && e.onChange(n);
}
- }), { name: i, form: a, descriptionId: o, errorMessageId: s, validationBehavior: c } = nae.get(t);
+ }), { name: i, form: a, descriptionId: o, errorMessageId: s, validationBehavior: c } = uae.get(t);
c = e.validationBehavior ?? c;
- let { realtimeValidation: l } = rw({
+ let { realtimeValidation: l } = uw({
...e,
value: r.isSelected,
name: void 0,
validationBehavior: "aria"
- }), u = (0, P.useRef)(tw), d = () => {
+ }), u = (0, P.useRef)(cw), d = () => {
t.setInvalid(e.value, l.isInvalid ? l : u.current);
};
(0, P.useEffect)(d);
- let f = t.realtimeValidation.isInvalid ? t.realtimeValidation : l, p = c === "native" ? t.displayValidation : f, m = cw({
+ let f = t.realtimeValidation.isInvalid ? t.realtimeValidation : l, p = c === "native" ? t.displayValidation : f, m = hw({
...e,
isReadOnly: e.isReadOnly || t.isReadOnly,
isDisabled: e.isDisabled || t.isDisabled,
@@ -23447,7 +23481,7 @@ function iae(e, t, n) {
form: e.form || a,
isRequired: e.isRequired ?? t.isRequired,
validationBehavior: c,
- [nw]: {
+ [lw]: {
realtimeValidation: f,
displayValidation: p,
resetValidation: t.resetValidation,
@@ -23470,10 +23504,10 @@ function iae(e, t, n) {
};
}
// node_modules/react-stately/dist/private/utils/number.mjs
-function mw(e, t = -Infinity, n = Infinity) {
+function xw(e, t = -Infinity, n = Infinity) {
return Math.min(Math.max(e, t), n);
}
-function hw(e, t) {
+function Sw(e, t) {
let n = e, r = 0, i = t.toString(), a = i.toLowerCase().indexOf("e-");
if (a > 0) r = Math.abs(Math.floor(Math.log10(Math.abs(t)))) + a;
else {
@@ -23486,23 +23520,23 @@ function hw(e, t) {
}
return n;
}
-function gw(e, t, n, r) {
+function Cw(e, t, n, r) {
t = Number(t), n = Number(n);
- let i = (e - (isNaN(t) ? 0 : t)) % r, a = hw(Math.abs(i) * 2 >= r ? e + Math.sign(i) * (r - Math.abs(i)) : e - i, r);
- return isNaN(t) ? !isNaN(n) && a > n && (a = Math.floor(hw(n / r, r)) * r) : a < t ? a = t : !isNaN(n) && a > n && (a = t + Math.floor(hw((n - t) / r, r)) * r), a = hw(a, r), a;
+ let i = (e - (isNaN(t) ? 0 : t)) % r, a = Sw(Math.abs(i) * 2 >= r ? e + Math.sign(i) * (r - Math.abs(i)) : e - i, r);
+ return isNaN(t) ? !isNaN(n) && a > n && (a = Math.floor(Sw(n / r, r)) * r) : a < t ? a = t : !isNaN(n) && a > n && (a = t + Math.floor(Sw((n - t) / r, r)) * r), a = Sw(a, r), a;
}
// node_modules/@internationalized/number/dist/private/NumberFormatter.mjs
-var _w = /* @__PURE__ */ new Map(), vw = !1;
+var ww = /* @__PURE__ */ new Map(), Tw = !1;
try {
- vw = new Intl.NumberFormat("de-DE", { signDisplay: "exceptZero" }).resolvedOptions().signDisplay === "exceptZero";
+ Tw = new Intl.NumberFormat("de-DE", { signDisplay: "exceptZero" }).resolvedOptions().signDisplay === "exceptZero";
} catch {}
-var aae = class {
+var pae = class {
constructor(e, t = {}) {
- this.numberFormatter = oae(e, t), this.options = t;
+ this.numberFormatter = mae(e, t), this.options = t;
}
format(e) {
let t = "";
- return t = !vw && this.options.signDisplay != null ? sae(this.numberFormatter, this.options.signDisplay, e) : this.numberFormatter.format(e), t;
+ return t = !Tw && this.options.signDisplay != null ? hae(this.numberFormatter, this.options.signDisplay, e) : this.numberFormatter.format(e), t;
}
formatToParts(e) {
return this.numberFormatter.formatToParts(e);
@@ -23534,21 +23568,21 @@ var aae = class {
}
resolvedOptions() {
let e = this.numberFormatter.resolvedOptions();
- return !vw && this.options.signDisplay != null && (e = {
+ return !Tw && this.options.signDisplay != null && (e = {
...e,
signDisplay: this.options.signDisplay
}), e;
}
};
-function oae(e, t = {}) {
+function mae(e, t = {}) {
let { numberingSystem: n } = t;
n && e.includes("-nu-") && (e.includes("-u-") || (e += "-u-"), e += `-nu-${n}`);
let r = e + (t ? Object.entries(t).sort((e, t) => e[0] < t[0] ? -1 : 1).join() : "");
- if (_w.has(r)) return _w.get(r);
+ if (ww.has(r)) return ww.get(r);
let i = new Intl.NumberFormat(e, t);
- return _w.set(r, i), i;
+ return ww.set(r, i), i;
}
-function sae(e, t, n) {
+function hae(e, t, n) {
if (t === "auto") return e.format(n);
if (t === "never") return e.format(Math.abs(n));
{
@@ -23561,12 +23595,12 @@ function sae(e, t, n) {
}
}
// node_modules/react-aria/dist/private/interactions/useMove.mjs
-function yw(e) {
+function Ew(e) {
let { onMoveStart: t, onMove: n, onMoveEnd: r } = e, i = (0, P.useRef)({
didMove: !1,
lastPosition: null,
id: null
- }), { addGlobalListener: a, removeGlobalListener: o } = $S(), s = OS((0, P.useCallback)((e, r, a, o) => {
+ }), { addGlobalListener: a, removeGlobalListener: o } = oC(), s = FS((0, P.useCallback)((e, r, a, o) => {
(a !== 0 || o !== 0) && (i.current.didMove || (i.current.didMove = !0, t?.({
type: "movestart",
pointerType: r,
@@ -23588,8 +23622,8 @@ function yw(e) {
t,
n,
i
- ])), c = OS((0, P.useCallback)((e, t) => {
- YS(), i.current.didMove && r?.({
+ ])), c = FS((0, P.useCallback)((e, t) => {
+ nC(), i.current.didMove && r?.({
type: "moveend",
pointerType: t,
shiftKey: e.shiftKey,
@@ -23600,7 +23634,7 @@ function yw(e) {
}, [r, i]));
return { moveProps: (0, P.useMemo)(() => {
let e = {}, t = () => {
- JS(), i.current.didMove = !1;
+ tC(), i.current.didMove = !1;
};
{
let n = (e) => {
@@ -23615,7 +23649,7 @@ function yw(e) {
if (e.pointerId === i.current.id) {
let t = e.pointerType || "mouse";
c(e, t), i.current.id = null;
- let a = Tb(G(e));
+ let a = Mb(G(e));
o(a, "pointermove", n, !1), o(a, "pointerup", r, !1), o(a, "pointercancel", r, !1);
}
};
@@ -23625,7 +23659,7 @@ function yw(e) {
pageX: e.pageX,
pageY: e.pageY
}, i.current.id = e.pointerId;
- let o = Tb(G(e));
+ let o = Mb(G(e));
a(o, "pointermove", n, !1), a(o, "pointerup", r, !1), a(o, "pointercancel", r, !1);
}
};
@@ -23658,7 +23692,7 @@ function yw(e) {
]) };
}
// node_modules/react-aria/dist/private/visually-hidden/VisuallyHidden.mjs
-var bw = {
+var Dw = {
border: 0,
clip: "rect(0 0 0 0)",
clipPath: "inset(50%)",
@@ -23670,37 +23704,37 @@ var bw = {
width: "1px",
whiteSpace: "nowrap"
};
-function xw(e = {}) {
- let { style: t, isFocusable: n } = e, [r, i] = (0, P.useState)(!1), { focusWithinProps: a } = dw({
+function Ow(e = {}) {
+ let { style: t, isFocusable: n } = e, [r, i] = (0, P.useState)(!1), { focusWithinProps: a } = vw({
isDisabled: !n,
onFocusWithinChange: (e) => i(e)
}), o = (0, P.useMemo)(() => r ? t : t ? {
- ...bw,
+ ...Dw,
...t
- } : bw, [r]);
+ } : Dw, [r]);
return { visuallyHiddenProps: {
...a,
style: o
} };
}
-function Sw(e) {
- let { children: t, elementType: n = "div", isFocusable: r, style: i, ...a } = e, { visuallyHiddenProps: o } = xw(e);
+function kw(e) {
+ let { children: t, elementType: n = "div", isFocusable: r, style: i, ...a } = e, { visuallyHiddenProps: o } = Ow(e);
return /*#__PURE__*/ P.createElement(n, K(a, o), t);
}
// node_modules/react-aria/dist/private/textfield/useTextField.mjs
-function cae(e, t) {
- let { inputElementType: n = "input", isDisabled: r = !1, isRequired: i = !1, isReadOnly: a = !1, type: o = "text", validationBehavior: s = "aria" } = e, [c, l] = fw(e.value, e.defaultValue || "", e.onChange), { focusableProps: u } = eS(e, t), d = rw({
+function gae(e, t) {
+ let { inputElementType: n = "input", isDisabled: r = !1, isRequired: i = !1, isReadOnly: a = !1, type: o = "text", validationBehavior: s = "aria" } = e, [c, l] = yw(e.value, e.defaultValue || "", e.onChange), { focusableProps: u } = sS(e, t), d = uw({
...e,
value: c
- }), { isInvalid: f, validationErrors: p, validationDetails: m } = d.displayValidation, { labelProps: h, fieldProps: g, descriptionProps: _, errorMessageProps: v } = uw({
+ }), { isInvalid: f, validationErrors: p, validationDetails: m } = d.displayValidation, { labelProps: h, fieldProps: g, descriptionProps: _, errorMessageProps: v } = _w({
...e,
isInvalid: f,
errorMessage: e.errorMessage || p
- }), y = WS(e, { labelable: !0 }), b = {
+ }), y = ZS(e, { labelable: !0 }), b = {
type: o,
pattern: e.pattern
}, [x] = (0, P.useState)(c);
- return XC(t, e.defaultValue ?? x, l), ZC(e, d, t), {
+ return rw(t, e.defaultValue ?? x, l), iw(e, d, t), {
labelProps: h,
inputProps: K(y, n === "input" ? b : void 0, {
disabled: r,
@@ -23746,26 +23780,26 @@ function cae(e, t) {
};
}
// node_modules/react-aria/dist/private/i18n/useNumberFormatter.mjs
-function lae(e = {}) {
- let { locale: t } = IS();
- return (0, P.useMemo)(() => new aae(t, e), [t, e]);
+function _ae(e = {}) {
+ let { locale: t } = US();
+ return (0, P.useMemo)(() => new pae(t, e), [t, e]);
}
// node_modules/react-aria/dist/private/slider/utils.mjs
-var Cw = /* @__PURE__ */ new WeakMap();
-function ww(e, t) {
- let n = Cw.get(e);
+var Aw = /* @__PURE__ */ new WeakMap();
+function jw(e, t) {
+ let n = Aw.get(e);
if (!n) throw Error("Unknown slider state");
return `${n.id}-${t}`;
}
// node_modules/react-aria/dist/private/slider/useSlider.mjs
-function uae(e, t, n) {
- let { labelProps: r, fieldProps: i } = lw(e), a = e.orientation === "vertical";
- Cw.set(t, {
+function vae(e, t, n) {
+ let { labelProps: r, fieldProps: i } = gw(e), a = e.orientation === "vertical";
+ Aw.set(t, {
id: r.id ?? i.id,
"aria-describedby": e["aria-describedby"],
"aria-details": e["aria-details"]
});
- let { direction: o } = IS(), { addGlobalListener: s, removeGlobalListener: c } = $S(), l = (0, P.useRef)(null), u = o === "rtl", d = (0, P.useRef)(null), { moveProps: f } = yw({
+ let { direction: o } = US(), { addGlobalListener: s, removeGlobalListener: c } = oC(), l = (0, P.useRef)(null), u = o === "rtl", d = (0, P.useRef)(null), { moveProps: f } = Ew({
onMoveStart() {
d.current = null;
},
@@ -23775,7 +23809,7 @@ function uae(e, t, n) {
d.current == null && l.current != null && (d.current = t.getThumbPercent(l.current) * s);
let c = a ? r : e;
if ((a || u) && (c = -c), d.current += c, l.current != null && n.current) {
- let e = mw(d.current / s, 0, 1);
+ let e = xw(d.current / s, 0, 1);
t.setThumbPercent(l.current, e);
}
},
@@ -23799,7 +23833,7 @@ function uae(e, t, n) {
(e.pointerId ?? e.changedTouches?.[0].identifier) === p.current && (l.current != null && (t.setThumbDragging(l.current, !1), l.current = null), c(window, "mouseup", h, !1), c(window, "touchend", h, !1), c(window, "pointerup", h, !1));
};
return "htmlFor" in r && r.htmlFor && (delete r.htmlFor, r.onClick = () => {
- document.getElementById(ww(t, 0))?.focus(), Tx("keyboard");
+ document.getElementById(jw(t, 0))?.focus(), Mx("keyboard");
}), {
labelProps: r,
groupProps: {
@@ -23822,26 +23856,26 @@ function uae(e, t, n) {
}
}, f),
outputProps: {
- htmlFor: t.values.map((e, n) => ww(t, n)).join(" "),
+ htmlFor: t.values.map((e, n) => jw(t, n)).join(" "),
"aria-live": "off"
}
};
}
// node_modules/react-aria/dist/private/slider/useSliderThumb.mjs
-function dae(e, t) {
- let { index: n = 0, isRequired: r, validationState: i, isInvalid: a, trackRef: o, inputRef: s, orientation: c = t.orientation, name: l, form: u } = e, d = e.isDisabled || t.isDisabled, f = c === "vertical", { direction: p } = IS(), { addGlobalListener: m, removeGlobalListener: h } = $S(), g = Cw.get(t), { labelProps: _, fieldProps: v } = lw({
+function yae(e, t) {
+ let { index: n = 0, isRequired: r, validationState: i, isInvalid: a, trackRef: o, inputRef: s, orientation: c = t.orientation, name: l, form: u } = e, d = e.isDisabled || t.isDisabled, f = c === "vertical", { direction: p } = US(), { addGlobalListener: m, removeGlobalListener: h } = oC(), g = Aw.get(t), { labelProps: _, fieldProps: v } = gw({
...e,
- id: ww(t, n),
+ id: jw(t, n),
"aria-labelledby": `${g.id} ${e["aria-labelledby"] ?? ""}`.trim()
}), y = t.values[n], b = (0, P.useCallback)(() => {
- s.current && Cb(s.current);
+ s.current && Ab(s.current);
}, [s]), x = t.focusedThumb === n;
(0, P.useEffect)(() => {
x && b();
}, [x, b]);
let S = p === "rtl", C = (0, P.useRef)(null), w = (e) => {
t.setThumbDragging(n, !0), e(), t.setThumbDragging(n, !1);
- }, { keyboardProps: T } = Xx({
+ }, { keyboardProps: T } = rS({
shortcuts: {
PageUp: () => w(() => {
t.incrementThumb(n, t.pageSize);
@@ -23857,7 +23891,7 @@ function dae(e, t) {
})
},
allowRepeats: !0
- }), { moveProps: E } = yw({
+ }), { moveProps: E } = Ew({
onMoveStart() {
C.current = null, t.setThumbDragging(n, !0);
},
@@ -23868,7 +23902,7 @@ function dae(e, t) {
if (C.current ??= s(n) * g, i === "keyboard") e > 0 && S || e < 0 && !S || r > 0 ? l(n, a ? p : d) : u(n, a ? p : d);
else {
let t = f ? r : e;
- (f || S) && (t = -t), C.current += t, c(n, mw(C.current / g, 0, 1));
+ (f || S) && (t = -t), C.current += t, c(n, xw(C.current / g, 0, 1));
}
},
onMoveEnd() {
@@ -23876,7 +23910,7 @@ function dae(e, t) {
}
});
t.setThumbEditable(n, !d);
- let { focusableProps: D } = eS(K(e, {
+ let { focusableProps: D } = sS(K(e, {
onFocus: () => t.setFocusedThumb(n),
onBlur: () => t.setFocusedThumb(void 0)
}), s), O = (0, P.useRef)(void 0), k = (e) => {
@@ -23896,7 +23930,7 @@ function dae(e, t) {
k(e.changedTouches[0].identifier);
}
});
- return XC(s, t.defaultValues[n], (e) => {
+ return rw(s, t.defaultValues[n], (e) => {
t.setThumbValue(n, e);
}), {
inputProps: K(D, v, {
@@ -23936,42 +23970,42 @@ function dae(e, t) {
};
}
// node_modules/react-aria/dist/private/overlays/ariaHideOutside.mjs
-var fae = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
-function Tw(e) {
+var bae = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
+function Mw(e) {
return e.dataset.liveAnnouncer === "true" || e.dataset.reactAriaTopLayer !== void 0;
}
-var Ew = /* @__PURE__ */ new WeakMap(), Dw = [];
-function Ow(e, t) {
- let n = Tb(e?.[0]), r = t instanceof n.Element ? { root: t } : t, i = r?.root ?? document.body, a = r?.shouldUseInert && fae, o = new Set(e), s = /* @__PURE__ */ new Set(), c = (e) => a && e instanceof n.HTMLElement ? e.inert : e.getAttribute("aria-hidden") === "true", l = (e, t) => {
+var Nw = /* @__PURE__ */ new WeakMap(), Pw = [];
+function Fw(e, t) {
+ let n = Mb(e?.[0]), r = t instanceof n.Element ? { root: t } : t, i = r?.root ?? document.body, a = r?.shouldUseInert && bae, o = new Set(e), s = /* @__PURE__ */ new Set(), c = (e) => a && e instanceof n.HTMLElement ? e.inert : e.getAttribute("aria-hidden") === "true", l = (e, t) => {
a && e instanceof n.HTMLElement ? e.inert = t : t ? e.setAttribute("aria-hidden", "true") : (e.removeAttribute("aria-hidden"), e instanceof n.HTMLElement && (e.inert = !1));
}, u = /* @__PURE__ */ new Set();
- if (Ab()) {
+ if (Lb()) {
let t = i.getRootNode();
for (let n of e) {
let e = n.getRootNode();
- for (; Db(e) && e !== t;) u.add(e), e = e.host.getRootNode();
+ for (; Pb(e) && e !== t;) u.add(e), e = e.host.getRootNode();
}
}
let d = (e) => {
for (let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]")) o.add(t);
let t = (e) => {
if (s.has(e) || o.has(e) || e.parentElement && s.has(e.parentElement) && e.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
- for (let t of o) if (jb(e, t)) return NodeFilter.FILTER_SKIP;
+ for (let t of o) if (Rb(e, t)) return NodeFilter.FILTER_SKIP;
return NodeFilter.FILTER_ACCEPT;
- }, n = hC(wb(e), e, NodeFilter.SHOW_ELEMENT, { acceptNode: t }), r = t(e);
+ }, n = SC(jb(e), e, NodeFilter.SHOW_ELEMENT, { acceptNode: t }), r = t(e);
if (r === NodeFilter.FILTER_ACCEPT && f(e), r !== NodeFilter.FILTER_REJECT) {
let e = n.nextNode();
for (; e != null;) f(e), e = n.nextNode();
}
}, f = (e) => {
- let t = Ew.get(e) ?? 0;
- c(e) && t === 0 || (t === 0 && l(e, !0), s.add(e), Ew.set(e, t + 1));
+ let t = Nw.get(e) ?? 0;
+ c(e) && t === 0 || (t === 0 && l(e, !0), s.add(e), Nw.set(e, t + 1));
};
- Dw.length && Dw[Dw.length - 1].disconnect(), d(i);
+ Pw.length && Pw[Pw.length - 1].disconnect(), d(i);
let p = new MutationObserver((e) => {
for (let t of e) if (t.type === "childList") {
- if (t.target.isConnected && ![...o, ...s].some((e) => jb(e, t.target))) for (let e of t.addedNodes) (e instanceof HTMLElement || e instanceof SVGElement) && Tw(e) ? o.add(e) : e instanceof Element && d(e);
- if (Ab()) {
+ if (t.target.isConnected && ![...o, ...s].some((e) => Rb(e, t.target))) for (let e of t.addedNodes) (e instanceof HTMLElement || e instanceof SVGElement) && Mw(e) ? o.add(e) : e instanceof Element && d(e);
+ if (Lb()) {
for (let e of u) if (!e.isConnected) {
p.disconnect();
break;
@@ -23984,11 +24018,11 @@ function Ow(e, t) {
subtree: !0
});
let m = /* @__PURE__ */ new Set();
- if (Ab()) for (let e of u) {
+ if (Lb()) for (let e of u) {
let t = new MutationObserver((e) => {
for (let t of e) if (t.type === "childList") {
- if (t.target.isConnected && ![...o, ...s].some((e) => jb(e, t.target))) for (let e of t.addedNodes) (e instanceof HTMLElement || e instanceof SVGElement) && Tw(e) ? o.add(e) : e instanceof Element && d(e);
- if (Ab()) {
+ if (t.target.isConnected && ![...o, ...s].some((e) => Rb(e, t.target))) for (let e of t.addedNodes) (e instanceof HTMLElement || e instanceof SVGElement) && Mw(e) ? o.add(e) : e instanceof Element && d(e);
+ if (Lb()) {
for (let e of u) if (!e.isConnected) {
p.disconnect();
break;
@@ -24014,56 +24048,56 @@ function Ow(e, t) {
p.disconnect();
}
};
- return Dw.push(h), () => {
- if (p.disconnect(), Ab()) for (let e of m) e.disconnect();
+ return Pw.push(h), () => {
+ if (p.disconnect(), Lb()) for (let e of m) e.disconnect();
for (let e of s) {
- let t = Ew.get(e);
- t != null && (t === 1 ? (l(e, !1), Ew.delete(e)) : Ew.set(e, t - 1));
+ let t = Nw.get(e);
+ t != null && (t === 1 ? (l(e, !1), Nw.delete(e)) : Nw.set(e, t - 1));
}
- h === Dw[Dw.length - 1] ? (Dw.pop(), Dw.length && Dw[Dw.length - 1].observe()) : Dw.splice(Dw.indexOf(h), 1);
+ h === Pw[Pw.length - 1] ? (Pw.pop(), Pw.length && Pw[Pw.length - 1].observe()) : Pw.splice(Pw.indexOf(h), 1);
};
}
-function kw(e) {
- let t = Dw[Dw.length - 1];
+function Iw(e) {
+ let t = Pw[Pw.length - 1];
if (t && !t.visibleNodes.has(e)) return t.visibleNodes.add(e), () => {
t.visibleNodes.delete(e);
};
}
// node_modules/react-aria/dist/private/listbox/utils.mjs
-var Aw = /* @__PURE__ */ new WeakMap();
-function pae(e) {
+var Lw = /* @__PURE__ */ new WeakMap();
+function xae(e) {
return typeof e == "string" ? e.replace(/\s*/g, "") : "" + e;
}
-function mae(e, t) {
- let n = Aw.get(e);
+function Sae(e, t) {
+ let n = Lw.get(e);
if (!n) throw Error("Unknown list");
- return `${n.id}-option-${pae(t)}`;
+ return `${n.id}-option-${xae(t)}`;
}
// node_modules/react-aria/dist/private/selection/utils.mjs
-function jw(e) {
- return wre() ? e.altKey : e.ctrlKey;
+function Rw(e) {
+ return Mre() ? e.altKey : e.ctrlKey;
}
-function Mw(e, t) {
+function zw(e, t) {
let n = `[data-key="${CSS.escape(String(t))}"]`, r = e.current?.dataset.collection;
return r && (n = `[data-collection="${CSS.escape(r)}"]${n}`), e.current?.querySelector(n);
}
-var Nw = /* @__PURE__ */ new WeakMap();
-function hae(e) {
- let t = Bx();
- return Nw.set(e, t), t;
+var Bw = /* @__PURE__ */ new WeakMap();
+function Cae(e) {
+ let t = qx();
+ return Bw.set(e, t), t;
}
-function gae(e) {
- return Nw.get(e);
+function wae(e) {
+ return Bw.get(e);
}
// node_modules/react-aria/dist/private/selection/DOMLayoutDelegate.mjs
-var Pw = class {
+var Vw = class {
constructor(e) {
this.ref = e;
}
getItemRect(e) {
let t = this.ref.current;
if (!t) return null;
- let n = e == null ? null : Mw(this.ref, e);
+ let n = e == null ? null : zw(this.ref, e);
if (!n) return null;
let r = t.getBoundingClientRect(), i = n.getBoundingClientRect();
return {
@@ -24089,12 +24123,12 @@ var Pw = class {
height: e?.clientHeight ?? 0
};
}
-}, Fw = class {
+}, Hw = class {
constructor(...e) {
if (e.length === 1) {
let t = e[0];
- this.collection = t.collection, this.ref = t.ref, this.collator = t.collator, this.disabledKeys = t.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = t.disabledBehavior || "all", this.orientation = t.orientation || "vertical", this.direction = t.direction, this.layout = t.layout || "stack", this.layoutDelegate = t.layoutDelegate || new Pw(t.ref);
- } else this.collection = e[0], this.disabledKeys = e[1], this.ref = e[2], this.collator = e[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new Pw(this.ref);
+ this.collection = t.collection, this.ref = t.ref, this.collator = t.collator, this.disabledKeys = t.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = t.disabledBehavior || "all", this.orientation = t.orientation || "vertical", this.direction = t.direction, this.layout = t.layout || "stack", this.layoutDelegate = t.layoutDelegate || new Vw(t.ref);
+ } else this.collection = e[0], this.disabledKeys = e[1], this.ref = e[2], this.collator = e[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new Vw(this.ref);
this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
}
isDisabled(e) {
@@ -24134,14 +24168,14 @@ var Pw = class {
return e.x === t.x || e.y !== t.y;
}
isReversed(e) {
- let t = this.getNextKey(e), n = Mw(this.ref, e);
+ let t = this.getNextKey(e), n = zw(this.ref, e);
if (t != null) {
- let e = Mw(this.ref, t);
+ let e = zw(this.ref, t);
return !n || !e ? !1 : n.getBoundingClientRect().top > e.getBoundingClientRect().top;
}
let r = this.getPreviousKey(e);
if (r != null) {
- let e = Mw(this.ref, r);
+ let e = zw(this.ref, r);
return !n || !e ? !1 : e.getBoundingClientRect().top > n.getBoundingClientRect().top;
}
return !1;
@@ -24175,7 +24209,7 @@ var Pw = class {
let t = this.ref.current, n = this.layoutDelegate.getItemRect(e);
if (!n) return null;
let r = this.isReversed(e);
- if (t && !UC(t)) return this.getFirstKey();
+ if (t && !XC(t)) return this.getFirstKey();
let i = e;
if (this.orientation === "horizontal") {
let e = Math.max(0, n.x + n.width - this.layoutDelegate.getVisibleRect().width);
@@ -24190,7 +24224,7 @@ var Pw = class {
let t = this.ref.current, n = this.layoutDelegate.getItemRect(e);
if (!n) return null;
let r = this.isReversed(e);
- if (t && !UC(t)) return this.getLastKey();
+ if (t && !XC(t)) return this.getLastKey();
let i = e;
if (this.orientation === "horizontal") {
let e = Math.min(this.layoutDelegate.getContentSize().width, n.x - n.width + this.layoutDelegate.getVisibleRect().width);
@@ -24213,149 +24247,149 @@ var Pw = class {
}
return null;
}
-}, Iw = {};
-Iw = { longPressMessage: "اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة" };
+}, Uw = {};
+Uw = { longPressMessage: "اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة" };
// node_modules/react-aria/dist/private/intl/menu/bg-BG.mjs
-var Lw = {};
-Lw = { longPressMessage: "Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто" };
+var Ww = {};
+Ww = { longPressMessage: "Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто" };
// node_modules/react-aria/dist/private/intl/menu/cs-CZ.mjs
-var Rw = {};
-Rw = { longPressMessage: "Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku" };
+var Gw = {};
+Gw = { longPressMessage: "Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku" };
// node_modules/react-aria/dist/private/intl/menu/da-DK.mjs
-var zw = {};
-zw = { longPressMessage: "Langt tryk eller tryk på Alt + pil ned for at åbne menuen" };
+var Kw = {};
+Kw = { longPressMessage: "Langt tryk eller tryk på Alt + pil ned for at åbne menuen" };
// node_modules/react-aria/dist/private/intl/menu/de-DE.mjs
-var Bw = {};
-Bw = { longPressMessage: "Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen" };
+var qw = {};
+qw = { longPressMessage: "Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen" };
// node_modules/react-aria/dist/private/intl/menu/el-GR.mjs
-var Vw = {};
-Vw = { longPressMessage: "Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού" };
+var Jw = {};
+Jw = { longPressMessage: "Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού" };
// node_modules/react-aria/dist/private/intl/menu/en-US.mjs
-var Hw = {};
-Hw = { longPressMessage: "Long press or press Alt + ArrowDown to open menu" };
+var Yw = {};
+Yw = { longPressMessage: "Long press or press Alt + ArrowDown to open menu" };
// node_modules/react-aria/dist/private/intl/menu/es-ES.mjs
-var Uw = {};
-Uw = { longPressMessage: "Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú" };
+var Xw = {};
+Xw = { longPressMessage: "Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú" };
// node_modules/react-aria/dist/private/intl/menu/et-EE.mjs
-var Ww = {};
-Ww = { longPressMessage: "Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool" };
+var Zw = {};
+Zw = { longPressMessage: "Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool" };
// node_modules/react-aria/dist/private/intl/menu/fi-FI.mjs
-var Gw = {};
-Gw = { longPressMessage: "Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli" };
+var Qw = {};
+Qw = { longPressMessage: "Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli" };
// node_modules/react-aria/dist/private/intl/menu/fr-FR.mjs
-var Kw = {};
-Kw = { longPressMessage: "Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu." };
+var $w = {};
+$w = { longPressMessage: "Appuyez de manière prolongée ou appuyez sur Alt\xA0+\xA0Flèche vers le bas pour ouvrir le menu." };
// node_modules/react-aria/dist/private/intl/menu/he-IL.mjs
-var qw = {};
-qw = { longPressMessage: "לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט" };
+var eT = {};
+eT = { longPressMessage: "לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט" };
// node_modules/react-aria/dist/private/intl/menu/hr-HR.mjs
-var Jw = {};
-Jw = { longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika" };
+var tT = {};
+tT = { longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika" };
// node_modules/react-aria/dist/private/intl/menu/hu-HU.mjs
-var Yw = {};
-Yw = { longPressMessage: "Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához" };
+var nT = {};
+nT = { longPressMessage: "Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához" };
// node_modules/react-aria/dist/private/intl/menu/it-IT.mjs
-var Xw = {};
-Xw = { longPressMessage: "Premi a lungo o premi Alt + Freccia giù per aprire il menu" };
+var rT = {};
+rT = { longPressMessage: "Premi a lungo o premi Alt + Freccia giù per aprire il menu" };
// node_modules/react-aria/dist/private/intl/menu/ja-JP.mjs
-var Zw = {};
-Zw = { longPressMessage: "長押しまたは Alt+下矢印キーでメニューを開く" };
+var iT = {};
+iT = { longPressMessage: "長押しまたは Alt+下矢印キーでメニューを開く" };
// node_modules/react-aria/dist/private/intl/menu/ko-KR.mjs
-var Qw = {};
-Qw = { longPressMessage: "길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기" };
+var aT = {};
+aT = { longPressMessage: "길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기" };
// node_modules/react-aria/dist/private/intl/menu/lt-LT.mjs
-var $w = {};
-$w = { longPressMessage: "Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“." };
+var oT = {};
+oT = { longPressMessage: "Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“." };
// node_modules/react-aria/dist/private/intl/menu/lv-LV.mjs
-var eT = {};
-eT = { longPressMessage: "Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa" };
+var sT = {};
+sT = { longPressMessage: "Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa" };
// node_modules/react-aria/dist/private/intl/menu/nb-NO.mjs
-var tT = {};
-tT = { longPressMessage: "Langt trykk eller trykk Alt + PilNed for å åpne menyen" };
+var cT = {};
+cT = { longPressMessage: "Langt trykk eller trykk Alt + PilNed for å åpne menyen" };
// node_modules/react-aria/dist/private/intl/menu/nl-NL.mjs
-var nT = {};
-nT = { longPressMessage: "Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen" };
+var lT = {};
+lT = { longPressMessage: "Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen" };
// node_modules/react-aria/dist/private/intl/menu/pl-PL.mjs
-var rT = {};
-rT = { longPressMessage: "Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu" };
+var uT = {};
+uT = { longPressMessage: "Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu" };
// node_modules/react-aria/dist/private/intl/menu/pt-BR.mjs
-var iT = {};
-iT = { longPressMessage: "Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu" };
+var dT = {};
+dT = { longPressMessage: "Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu" };
// node_modules/react-aria/dist/private/intl/menu/pt-PT.mjs
-var aT = {};
-aT = { longPressMessage: "Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu" };
+var fT = {};
+fT = { longPressMessage: "Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu" };
// node_modules/react-aria/dist/private/intl/menu/ro-RO.mjs
-var oT = {};
-oT = { longPressMessage: "Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul" };
+var pT = {};
+pT = { longPressMessage: "Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul" };
// node_modules/react-aria/dist/private/intl/menu/ru-RU.mjs
-var sT = {};
-sT = { longPressMessage: "Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню" };
+var mT = {};
+mT = { longPressMessage: "Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню" };
// node_modules/react-aria/dist/private/intl/menu/sk-SK.mjs
-var cT = {};
-cT = { longPressMessage: "Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol" };
+var hT = {};
+hT = { longPressMessage: "Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol" };
// node_modules/react-aria/dist/private/intl/menu/sl-SI.mjs
-var lT = {};
-lT = { longPressMessage: "Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol" };
+var gT = {};
+gT = { longPressMessage: "Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol" };
// node_modules/react-aria/dist/private/intl/menu/sr-SP.mjs
-var uT = {};
-uT = { longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni" };
+var _T = {};
+_T = { longPressMessage: "Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni" };
// node_modules/react-aria/dist/private/intl/menu/sv-SE.mjs
-var dT = {};
-dT = { longPressMessage: "Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn" };
+var vT = {};
+vT = { longPressMessage: "Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn" };
// node_modules/react-aria/dist/private/intl/menu/tr-TR.mjs
-var fT = {};
-fT = { longPressMessage: "Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın" };
+var yT = {};
+yT = { longPressMessage: "Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın" };
// node_modules/react-aria/dist/private/intl/menu/uk-UA.mjs
-var pT = {};
-pT = { longPressMessage: "Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню" };
+var bT = {};
+bT = { longPressMessage: "Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню" };
// node_modules/react-aria/dist/private/intl/menu/zh-CN.mjs
-var mT = {};
-mT = { longPressMessage: "长按或按 Alt + 向下方向键以打开菜单" };
+var xT = {};
+xT = { longPressMessage: "长按或按 Alt + 向下方向键以打开菜单" };
// node_modules/react-aria/dist/private/intl/menu/zh-TW.mjs
-var hT = {};
-hT = { longPressMessage: "長按或按 Alt+向下鍵以開啟功能表" };
+var ST = {};
+ST = { longPressMessage: "長按或按 Alt+向下鍵以開啟功能表" };
// node_modules/react-aria/dist/private/menu/intlStrings.mjs
-var gT = {};
-gT = {
- "ar-AE": Iw,
- "bg-BG": Lw,
- "cs-CZ": Rw,
- "da-DK": zw,
- "de-DE": Bw,
- "el-GR": Vw,
- "en-US": Hw,
- "es-ES": Uw,
- "et-EE": Ww,
- "fi-FI": Gw,
- "fr-FR": Kw,
- "he-IL": qw,
- "hr-HR": Jw,
- "hu-HU": Yw,
- "it-IT": Xw,
- "ja-JP": Zw,
- "ko-KR": Qw,
- "lt-LT": $w,
- "lv-LV": eT,
- "nb-NO": tT,
- "nl-NL": nT,
- "pl-PL": rT,
- "pt-BR": iT,
- "pt-PT": aT,
- "ro-RO": oT,
- "ru-RU": sT,
- "sk-SK": cT,
- "sl-SI": lT,
- "sr-SP": uT,
- "sv-SE": dT,
- "tr-TR": fT,
- "uk-UA": pT,
- "zh-CN": mT,
- "zh-TW": hT
+var CT = {};
+CT = {
+ "ar-AE": Uw,
+ "bg-BG": Ww,
+ "cs-CZ": Gw,
+ "da-DK": Kw,
+ "de-DE": qw,
+ "el-GR": Jw,
+ "en-US": Yw,
+ "es-ES": Xw,
+ "et-EE": Zw,
+ "fi-FI": Qw,
+ "fr-FR": $w,
+ "he-IL": eT,
+ "hr-HR": tT,
+ "hu-HU": nT,
+ "it-IT": rT,
+ "ja-JP": iT,
+ "ko-KR": aT,
+ "lt-LT": oT,
+ "lv-LV": sT,
+ "nb-NO": cT,
+ "nl-NL": lT,
+ "pl-PL": uT,
+ "pt-BR": dT,
+ "pt-PT": fT,
+ "ro-RO": pT,
+ "ru-RU": mT,
+ "sk-SK": hT,
+ "sl-SI": gT,
+ "sr-SP": _T,
+ "sv-SE": vT,
+ "tr-TR": yT,
+ "uk-UA": bT,
+ "zh-CN": xT,
+ "zh-TW": ST
};
// node_modules/react-aria/dist/private/interactions/useLongPress.mjs
-var _ae = 500;
-function _T(e) {
- let { isDisabled: t, pointerType: n, onLongPressStart: r, onLongPressEnd: i, onLongPress: a, threshold: o = _ae, accessibilityDescription: s } = e, c = (0, P.useRef)(void 0), { addGlobalListener: l, removeAllGlobalListeners: u } = $S(), d = (e) => n ? e.pointerType === n : e.pointerType === "mouse" || e.pointerType === "touch", { pressProps: f } = aC({
+var Tae = 500;
+function wT(e) {
+ let { isDisabled: t, pointerType: n, onLongPressStart: r, onLongPressEnd: i, onLongPress: a, threshold: o = Tae, accessibilityDescription: s } = e, c = (0, P.useRef)(void 0), { addGlobalListener: l, removeAllGlobalListeners: u } = oC(), d = (e) => n ? e.pointerType === n : e.pointerType === "mouse" || e.pointerType === "touch", { pressProps: f } = fC({
isDisabled: t,
onPressStart(e) {
if (e.continuePropagation(), d(e)) {
@@ -24363,12 +24397,12 @@ function _T(e) {
...e,
type: "longpressstart"
}), c.current = setTimeout(() => {
- e.target.dispatchEvent(new PointerEvent("pointercancel", { bubbles: !0 })), l(e.target, "click", (e) => e.preventDefault(), { once: !0 }), wb(e.target).activeElement !== e.target && Cb(e.target), a && a({
+ e.target.dispatchEvent(new PointerEvent("pointercancel", { bubbles: !0 })), l(e.target, "click", (e) => e.preventDefault(), { once: !0 }), jb(e.target).activeElement !== e.target && Ab(e.target), a && a({
...e,
type: "longpress"
}), c.current = void 0;
}, o), e.pointerType === "touch" && l(e.target, "contextmenu", (e) => e.preventDefault(), { once: !0 });
- let t = Tb(e.target);
+ let t = Mb(e.target);
l(t, "pointerup", () => {
setTimeout(() => {
u();
@@ -24383,11 +24417,11 @@ function _T(e) {
});
}
});
- return { longPressProps: K(f, YC(a && !t ? s : void 0)) };
+ return { longPressProps: K(f, nw(a && !t ? s : void 0)) };
}
// node_modules/react-aria/dist/private/interactions/useContextMenu.mjs
-function vae(e) {
- let { onContextMenu: t } = e, n = (0, P.useRef)(!1), { longPressProps: r } = _T({
+function Eae(e) {
+ let { onContextMenu: t } = e, n = (0, P.useRef)(!1), { longPressProps: r } = wT({
onLongPressStart() {
n.current = !1;
},
@@ -24399,7 +24433,7 @@ function vae(e) {
});
}
});
- return t ? { contextMenuProps: K(Xb() ? r : {}, {
+ return t ? { contextMenuProps: K(rx() ? r : {}, {
onContextMenu(e) {
e.stopPropagation(), e.preventDefault(), n.current = !0;
let r = e.currentTarget.getBoundingClientRect();
@@ -24410,7 +24444,7 @@ function vae(e) {
});
},
onKeyDown(e) {
- if (Jb() && e.ctrlKey && e.key === "Enter") {
+ if (tx() && e.ctrlKey && e.key === "Enter") {
n.current = !1;
let r = e.currentTarget;
e.stopPropagation(), setTimeout(() => {
@@ -24429,13 +24463,13 @@ function vae(e) {
}) } : { contextMenuProps: {} };
}
// node_modules/react-aria/dist/private/overlays/useCloseOnScroll.mjs
-var vT = /* @__PURE__ */ new WeakMap();
-function yae(e) {
+var TT = /* @__PURE__ */ new WeakMap();
+function Dae(e) {
let { triggerRef: t, isOpen: n, onClose: r } = e;
- (0, P.useEffect)(() => !n || r === null ? void 0 : Ob(Nb(t.current), "scroll", (e) => {
+ (0, P.useEffect)(() => !n || r === null ? void 0 : Fb(Bb(t.current), "scroll", (e) => {
let n = G(e);
- if (!t.current || n instanceof Node && !jb(n, t.current) || n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement) return;
- let i = r || vT.get(t.current);
+ if (!t.current || n instanceof Node && !Rb(n, t.current) || n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement) return;
+ let i = r || TT.get(t.current);
i && i();
}, !0), [
n,
@@ -24444,14 +24478,14 @@ function yae(e) {
]);
}
// node_modules/react-aria/dist/private/overlays/useOverlayTrigger.mjs
-function bae(e, t, n) {
+function Oae(e, t, n) {
let { type: r } = e, { isOpen: i } = t;
(0, P.useEffect)(() => {
- n && n.current && vT.set(n.current, t.close);
+ n && n.current && TT.set(n.current, t.close);
});
let a;
r === "menu" ? a = !0 : r === "listbox" && (a = "listbox");
- let o = Bx();
+ let o = qx();
return {
triggerProps: {
"aria-haspopup": a,
@@ -24463,14 +24497,14 @@ function bae(e, t, n) {
};
}
// node_modules/react-aria/dist/private/menu/useMenuTrigger.mjs
-function xae(e) {
+function kae(e) {
return e && e.__esModule ? e.default : e;
}
-function yT(e, t, n) {
- let { type: r = "menu", isDisabled: i, trigger: a = "press" } = e, o = Bx(), { triggerProps: s, overlayProps: c } = bae({ type: r }, t, n), l = (e, n, r = "first") => {
+function ET(e, t, n) {
+ let { type: r = "menu", isDisabled: i, trigger: a = "press" } = e, o = qx(), { triggerProps: s, overlayProps: c } = Oae({ type: r }, t, n), l = (e, n, r = "first") => {
if (!e || n.isDefaultPrevented()) return !1;
t.toggle(r);
- }, { keyboardProps: u } = Xx({
+ }, { keyboardProps: u } = rS({
isDisabled: i,
shortcuts: {
Enter: (e) => l(a !== "longPress", e, "first"),
@@ -24482,7 +24516,7 @@ function yT(e, t, n) {
"Alt+ArrowDown": (e) => l(!0, e, "first"),
"Alt+ArrowUp": (e) => l(!0, e, "last")
}
- }), d = HS(xae(gT), "@react-aria/menu"), { longPressProps: f } = _T({
+ }), d = YS(kae(CT), "@react-aria/menu"), { longPressProps: f } = wT({
isDisabled: i || a !== "longPress",
accessibilityDescription: d.format("longPressMessage"),
onLongPressStart() {
@@ -24494,14 +24528,14 @@ function yT(e, t, n) {
}), p = {
preventFocusOnPress: !0,
onPressStart(e) {
- e.pointerType !== "touch" && e.pointerType !== "keyboard" && !i && (Cb(e.target), t.open(e.pointerType === "virtual" ? "first" : null));
+ e.pointerType !== "touch" && e.pointerType !== "keyboard" && !i && (Ab(e.target), t.open(e.pointerType === "virtual" ? "first" : null));
},
onPress(e) {
- e.pointerType === "touch" && !i && (Cb(e.target), t.toggle());
+ e.pointerType === "touch" && !i && (Ab(e.target), t.toggle());
}
};
delete s.onPress;
- let { contextMenuProps: m } = vae({ onContextMenu(e) {
+ let { contextMenuProps: m } = Eae({ onContextMenu(e) {
let n = e.target.getBoundingClientRect();
t.setPoint({
x: n.x + e.x,
@@ -24545,8 +24579,8 @@ function yT(e, t, n) {
};
}
// node_modules/react-aria/dist/private/selection/useTypeSelect.mjs
-var bT = 1e3;
-function xT(e) {
+var DT = 1e3;
+function OT(e) {
let { keyboardDelegate: t, selectionManager: n, onTypeSelect: r } = e, i = (0, P.useRef)({
search: "",
timeout: void 0
@@ -24565,12 +24599,12 @@ function xT(e) {
}
clearTimeout(i.current.timeout), i.current.timeout = setTimeout(() => {
i.current.search = "";
- }, bT);
+ }, DT);
}
} : void 0,
onKeyDown: t.getKeyForSearch ? (e) => {
- let a = Sae(e.key);
- if (!(!a || e.ctrlKey || e.metaKey || e.altKey || !jb(e.currentTarget, G(e)) || i.current.search.length === 0 && a === " ")) {
+ let a = Aae(e.key);
+ if (!(!a || e.ctrlKey || e.metaKey || e.altKey || !Rb(e.currentTarget, G(e)) || i.current.search.length === 0 && a === " ")) {
if (i.current.search += a, t.getKeyForSearch != null) {
let a = t.getKeyForSearch(i.current.search, n.focusedKey);
if (a ??= t.getKeyForSearch(i.current.search), a != null) n.setFocusedKey(a), r && r(a), e.preventDefault(), "continuePropagation" in e || e.stopPropagation();
@@ -24581,32 +24615,32 @@ function xT(e) {
}
clearTimeout(i.current.timeout), i.current.timeout = setTimeout(() => {
i.current.search = "";
- }, bT);
+ }, DT);
}
} : void 0
} };
}
-function Sae(e) {
+function Aae(e) {
return e.length === 1 || !/^[A-Z]/i.test(e) ? e : "";
}
// node_modules/react-aria/dist/private/utils/useUpdateLayoutEffect.mjs
-function ST(e, t) {
+function kT(e, t) {
let n = (0, P.useRef)(!0), r = (0, P.useRef)(null);
- Bb(() => (n.current = !0, () => {
+ qb(() => (n.current = !0, () => {
n.current = !1;
- }), []), Bb(() => {
+ }), []), qb(() => {
n.current ? n.current = !1 : (!r.current || t.some((e, t) => !Object.is(e, r[t]))) && e(), r.current = t;
}, t);
}
// node_modules/react-aria/dist/private/selection/useSelectableCollection.mjs
-function CT(e) {
- let { selectionManager: t, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: a = !1, disallowEmptySelection: o = !1, disallowSelectAll: s = !1, escapeKeyBehavior: c = "clearSelection", selectOnFocus: l = t.selectionBehavior === "replace", disallowTypeAhead: u = !1, shouldUseVirtualFocus: d, allowsTabNavigation: f = !1, scrollRef: p = r, linkBehavior: m = "action", UNSTABLE_focusOnEntry: h } = e, { direction: g } = IS(), _ = tx(), v = (e, n, i) => {
+function AT(e) {
+ let { selectionManager: t, keyboardDelegate: n, ref: r, autoFocus: i = !1, shouldFocusWrap: a = !1, disallowEmptySelection: o = !1, disallowSelectAll: s = !1, escapeKeyBehavior: c = "clearSelection", selectOnFocus: l = t.selectionBehavior === "replace", disallowTypeAhead: u = !1, shouldUseVirtualFocus: d, allowsTabNavigation: f = !1, scrollRef: p = r, linkBehavior: m = "action", UNSTABLE_focusOnEntry: h } = e, { direction: g } = US(), _ = cx(), v = (e, n, i) => {
if (n != null) {
- if (t.isLink(n) && m === "selection" && l && !jw(e)) {
+ if (t.isLink(n) && m === "selection" && l && !Rw(e)) {
(0, Lt.flushSync)(() => {
t.setFocusedKey(n, i);
});
- let a = Mw(r, n), o = t.getItemProps(n);
+ let a = zw(r, n), o = t.getItemProps(n);
if (a) {
_.open(a, e, o.href, o.routerOptions);
return;
@@ -24618,7 +24652,7 @@ function CT(e) {
t.extendSelection(n);
return;
}
- if (l && !jw(e)) {
+ if (l && !Rw(e)) {
t.replaceSelection(n);
return;
}
@@ -24645,9 +24679,9 @@ function CT(e) {
}, x = (e) => {
if (n.getFirstKey) {
if (t.focusedKey === null && e.shiftKey) return !1;
- let r = n.getFirstKey(t.focusedKey, ES(e));
+ let r = n.getFirstKey(t.focusedKey, NS(e));
if (t.setFocusedKey(r), r != null) {
- if (ES(e) && e.shiftKey && t.selectionMode === "multiple") {
+ if (NS(e) && e.shiftKey && t.selectionMode === "multiple") {
t.extendSelection(r);
return;
}
@@ -24679,9 +24713,9 @@ function CT(e) {
}, w = (e) => {
if (n.getLastKey) {
if (t.focusedKey === null && e.shiftKey) return !1;
- let r = n.getLastKey(t.focusedKey, ES(e));
+ let r = n.getLastKey(t.focusedKey, NS(e));
if (t.setFocusedKey(r), r != null) {
- if (ES(e) && e.shiftKey && t.selectionMode === "multiple") {
+ if (NS(e) && e.shiftKey && t.selectionMode === "multiple") {
t.extendSelection(r);
return;
}
@@ -24712,12 +24746,12 @@ function CT(e) {
else return !1;
}, k = () => {
if (!f && r.current) {
- let e = IC(r.current, { tabbable: !0 }), t, n;
+ let e = UC(r.current, { tabbable: !0 }), t, n;
do
n = e.lastChild(), n && (t = n);
while (n);
- let i = Mb();
- t && (!Pb(t) || i && !Rb(i)) && Cb(t);
+ let i = zb();
+ t && (!Vb(t) || i && !Gb(i)) && Ab(t);
}
return {
shouldContinuePropagation: !0,
@@ -24727,11 +24761,11 @@ function CT(e) {
shouldContinuePropagation: !0,
shouldPreventDefault: !1
}), j = (e, t) => ({
- [Jb() ? e + "+Shift+Alt" : e + "+Shift+Control"]: t,
+ [tx() ? e + "+Shift+Alt" : e + "+Shift+Control"]: t,
[e + "+Shift"]: t,
- [Jb() ? e + "+Alt" : e + "+Control"]: t,
+ [tx() ? e + "+Alt" : e + "+Control"]: t,
[e]: t
- }), { keyboardProps: M } = Xx({
+ }), { keyboardProps: M } = rS({
shortcuts: {
...j("ArrowDown", y),
...j("ArrowUp", b),
@@ -24741,7 +24775,7 @@ function CT(e) {
...j("PageUp", E)
},
allowRepeats: !0
- }), { keyboardProps: ee } = Xx({ shortcuts: {
+ }), { keyboardProps: ee } = rS({ shortcuts: {
...j("Home", x),
...j("End", w),
"Mod+A": D,
@@ -24752,7 +24786,7 @@ function CT(e) {
top: 0,
left: 0
});
- kS(p, "scroll", () => {
+ IS(p, "scroll", () => {
te.current = {
top: p.current?.scrollTop ?? 0,
left: p.current?.scrollLeft ?? 0
@@ -24760,11 +24794,11 @@ function CT(e) {
});
let ne = (e) => {
if (t.isFocused) {
- jb(e.currentTarget, G(e)) || t.setFocused(!1);
+ Rb(e.currentTarget, G(e)) || t.setFocused(!1);
return;
}
- if (!jb(e.currentTarget, G(e))) return;
- let i = wx();
+ if (!Rb(e.currentTarget, G(e))) return;
+ let i = jx();
t.setFocused(!0);
let a = (e) => {
e != null && (t.setFocusedKey(e), l && !t.isSelected(e) && t.replaceSelection(e));
@@ -24775,27 +24809,27 @@ function CT(e) {
r && e.currentTarget.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING ? a(t.lastSelectedKey ?? n.getLastKey?.()) : a(t.firstSelectedKey ?? n.getFirstKey?.());
} else p.current && (p.current.scrollTop = te.current.top, p.current.scrollLeft = te.current.left);
if (t.focusedKey != null && p.current) {
- let e = Mw(r, t.focusedKey);
- e instanceof HTMLElement && (!Pb(e) && !d && Cb(e), (i === "keyboard" || h && i === "virtual") && qC(e, { containingElement: r.current }));
+ let e = zw(r, t.focusedKey);
+ e instanceof HTMLElement && (!Vb(e) && !d && Ab(e), (i === "keyboard" || h && i === "virtual") && ew(e, { containingElement: r.current }));
}
}, N = (e) => {
- jb(e.currentTarget, e.relatedTarget) || t.setFocused(!1);
+ Rb(e.currentTarget, e.relatedTarget) || t.setFocused(!1);
}, re = (0, P.useRef)(!1);
- kS(r, gie, d ? (e) => {
+ IS(r, wie, d ? (e) => {
let { detail: n } = e;
e.stopPropagation(), t.setFocused(!0), n?.focusStrategy === "first" && (re.current = !0);
} : void 0);
let ie = n.getFirstKey?.() ?? null;
- ST(() => {
+ kT(() => {
if (re.current) {
if (ie == null) {
- let e = Mb();
- hS(r.current), gS(e, null), t.collection.size > 0 && (re.current = !1);
+ let e = zb();
+ SS(r.current), CS(e, null), t.collection.size > 0 && (re.current = !1);
} else t.setFocusedKey(ie), re.current = !1;
}
- }, [ie, t.collection.size]), ST(() => {
+ }, [ie, t.collection.size]), kT(() => {
t.collection.size > 0 && (re.current = !1);
- }, [t.focusedKey]), kS(r, hie, d ? (e) => {
+ }, [t.focusedKey]), IS(r, Cie, d ? (e) => {
e.stopPropagation(), t.setFocused(!1), e.detail?.clearFocusKey && t.setFocusedKey(null);
} : void 0);
let F = (0, P.useRef)(i), ae = (0, P.useRef)(!1);
@@ -24810,22 +24844,22 @@ function CT(e) {
break;
}
}
- t.setFocused(!0), t.setFocusedKey(e), e != null && l && !a.size && t.canSelectItem(e) && t.replaceSelection(e), e == null && !d && r.current && Fx(r.current), t.collection.size > 0 && (F.current = !1, ae.current = !0);
+ t.setFocused(!0), t.setFocusedKey(e), e != null && l && !a.size && t.canSelectItem(e) && t.replaceSelection(e), e == null && !d && r.current && Hx(r.current), t.collection.size > 0 && (F.current = !1, ae.current = !0);
}
});
let oe = (0, P.useRef)(t.focusedKey), se = (0, P.useRef)(null);
(0, P.useEffect)(() => {
if (t.isFocused && t.focusedKey != null && (t.focusedKey !== oe.current || ae.current) && p.current && r.current) {
- let e = wx(), n = Mw(r, t.focusedKey);
+ let e = jx(), n = zw(r, t.focusedKey);
if (!(n instanceof HTMLElement)) return;
(e === "keyboard" || ae.current) && (se.current && cancelAnimationFrame(se.current), se.current = requestAnimationFrame(() => {
- p.current && (KC(p.current, n), e !== "virtual" && qC(n, { containingElement: r.current }));
+ p.current && ($C(p.current, n), e !== "virtual" && ew(n, { containingElement: r.current }));
}));
}
- !d && t.isFocused && t.focusedKey == null && oe.current != null && r.current && Fx(r.current), oe.current = t.focusedKey, ae.current = !1;
+ !d && t.isFocused && t.focusedKey == null && oe.current != null && r.current && Hx(r.current), oe.current = t.focusedKey, ae.current = !1;
}), (0, P.useEffect)(() => () => {
se.current && cancelAnimationFrame(se.current);
- }, []), kS(r, "react-aria-focus-scope-restore", (e) => {
+ }, []), IS(r, "react-aria-focus-scope-restore", (e) => {
e.preventDefault(), t.setFocused(!0);
});
let ce = {
@@ -24835,27 +24869,27 @@ function CT(e) {
onMouseDown(e) {
p.current === G(e) && e.preventDefault();
}
- }, { typeSelectProps: le } = xT({
+ }, { typeSelectProps: le } = OT({
keyboardDelegate: n,
selectionManager: t
});
u || (ce = K(le, ce));
let ue;
d || (ue = t.focusedKey == null ? 0 : -1);
- let de = hae(t.collection);
+ let de = Cae(t.collection);
return { collectionProps: K(ce, {
tabIndex: ue,
"data-collection": de
}) };
}
// node_modules/react-stately/dist/private/collections/getChildNodes.mjs
-function wT(e, t) {
+function jT(e, t) {
return typeof t.getChildren == "function" ? t.getChildren(e.key) : e.childNodes;
}
-function TT(e) {
- return ET(e, 0);
+function MT(e) {
+ return NT(e, 0);
}
-function ET(e, t) {
+function NT(e, t) {
if (t < 0) return;
let n = 0;
for (let r of e) {
@@ -24863,106 +24897,106 @@ function ET(e, t) {
n++;
}
}
-function DT(e) {
+function PT(e) {
let t;
for (let n of e) t = n;
return t;
}
-function OT(e, t, n) {
+function FT(e, t, n) {
if (t.parentKey === n.parentKey) return t.index - n.index;
- let r = [...kT(e, t), t], i = [...kT(e, n), n], a = r.slice(0, i.length).findIndex((e, t) => e !== i[t]);
+ let r = [...IT(e, t), t], i = [...IT(e, n), n], a = r.slice(0, i.length).findIndex((e, t) => e !== i[t]);
return a === -1 ? r.findIndex((e) => e === n) >= 0 ? 1 : (i.findIndex((e) => e === t), -1) : (t = r[a], n = i[a], t.index - n.index);
}
-function kT(e, t) {
+function IT(e, t) {
let n = [], r = t;
for (; r?.parentKey != null;) r = e.getItem(r.parentKey), r && n.unshift(r);
return n;
}
// node_modules/react-stately/dist/private/collections/getItemCount.mjs
-var AT = /* @__PURE__ */ new WeakMap();
-function jT(e) {
- let t = AT.get(e);
+var LT = /* @__PURE__ */ new WeakMap();
+function RT(e) {
+ let t = LT.get(e);
if (t != null) return t;
let n = 0, r = (t) => {
- for (let i of t) i.type === "section" ? r(wT(i, e)) : i.type === "item" && n++;
+ for (let i of t) i.type === "section" ? r(jT(i, e)) : i.type === "item" && n++;
};
- return r(e), AT.set(e, n), n;
+ return r(e), LT.set(e, n), n;
}
// node_modules/react-aria/dist/private/i18n/useCollator.mjs
-var MT = /* @__PURE__ */ new Map();
-function NT(e) {
- let { locale: t } = IS(), n = t + (e ? Object.entries(e).sort((e, t) => e[0] < t[0] ? -1 : 1).join() : "");
- if (MT.has(n)) return MT.get(n);
+var zT = /* @__PURE__ */ new Map();
+function BT(e) {
+ let { locale: t } = US(), n = t + (e ? Object.entries(e).sort((e, t) => e[0] < t[0] ? -1 : 1).join() : "");
+ if (zT.has(n)) return zT.get(n);
let r = new Intl.Collator(t, e);
- return MT.set(n, r), r;
+ return zT.set(n, r), r;
}
// node_modules/react-aria/dist/private/interactions/PressResponder.mjs
-var Cae = /*#__PURE__*/ P.forwardRef(({ children: e, ...t }, n) => {
- let r = (0, P.useRef)(!1), i = (0, P.useContext)(QS), a = K(i || {}, {
+var jae = /*#__PURE__*/ P.forwardRef(({ children: e, ...t }, n) => {
+ let r = (0, P.useRef)(!1), i = (0, P.useContext)(aC), a = K(i || {}, {
...t,
register() {
r.current = !0, i && i.register();
}
});
- return a.ref = Zx(n || i?.ref), Qx(i, a.ref), (0, P.useEffect)(() => {
+ return a.ref = iS(n || i?.ref), aS(i, a.ref), (0, P.useEffect)(() => {
r.current ||= !0;
- }, []), /*#__PURE__*/ P.createElement(QS.Provider, { value: a }, e);
+ }, []), /*#__PURE__*/ P.createElement(aC.Provider, { value: a }, e);
});
-function wae({ children: e }) {
+function Mae({ children: e }) {
let t = (0, P.useMemo)(() => ({ register: () => {} }), []);
- return /*#__PURE__*/ P.createElement(QS.Provider, { value: t }, e);
+ return /*#__PURE__*/ P.createElement(aC.Provider, { value: t }, e);
}
// node_modules/react-aria/dist/private/overlays/PortalProvider.mjs
-var PT = /*#__PURE__*/ (0, P.createContext)({});
-function FT(e) {
- let { getContainer: t } = e, { getContainer: n } = IT();
- return /*#__PURE__*/ P.createElement(PT.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
+var VT = /*#__PURE__*/ (0, P.createContext)({});
+function HT(e) {
+ let { getContainer: t } = e, { getContainer: n } = UT();
+ return /*#__PURE__*/ P.createElement(VT.Provider, { value: { getContainer: t === null ? void 0 : t ?? n } }, e.children);
}
-function IT() {
- return (0, P.useContext)(PT) ?? {};
+function UT() {
+ return (0, P.useContext)(VT) ?? {};
}
// node_modules/react-aria/dist/private/overlays/Overlay.mjs
-var LT = /*#__PURE__*/ P.createContext(null);
-function RT(e) {
- let t = cx(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [i, a] = (0, P.useState)(!1), o = (0, P.useMemo)(() => ({
+var WT = /*#__PURE__*/ P.createContext(null);
+function GT(e) {
+ let t = hx(), { portalContainer: n = t ? null : document.body, isExiting: r } = e, [i, a] = (0, P.useState)(!1), o = (0, P.useMemo)(() => ({
contain: i,
setContain: a
- }), [i, a]), { getContainer: s } = IT();
+ }), [i, a]), { getContainer: s } = UT();
if (!e.portalContainer && s && (n = s()), !n) return null;
let c = e.children;
- return e.disableFocusManagement || (c = /*#__PURE__*/ P.createElement(yC, {
+ return e.disableFocusManagement || (c = /*#__PURE__*/ P.createElement(EC, {
restoreFocus: !0,
contain: (e.shouldContainFocus || i) && !r
- }, c)), c = /*#__PURE__*/ P.createElement(LT.Provider, { value: o }, /*#__PURE__*/ P.createElement(wae, null, /*#__PURE__*/ P.createElement($x.Provider, { value: null }, c))), /*#__PURE__*/ Lt.createPortal(c, n);
+ }, c)), c = /*#__PURE__*/ P.createElement(WT.Provider, { value: o }, /*#__PURE__*/ P.createElement(Mae, null, /*#__PURE__*/ P.createElement(oS.Provider, { value: null }, c))), /*#__PURE__*/ Lt.createPortal(c, n);
}
-function zT() {
- let e = (0, P.useContext)(LT)?.setContain;
- Bb(() => {
+function KT() {
+ let e = (0, P.useContext)(WT)?.setContain;
+ qb(() => {
e?.(!0);
}, [e]);
}
// node_modules/react-aria/dist/private/dialog/useDialog.mjs
-function Tae(e, t) {
- let { role: n = "dialog", isEntering: r } = e, i = Vx();
+function Nae(e, t) {
+ let { role: n = "dialog", isEntering: r } = e, i = Jx();
i = e["aria-label"] ? void 0 : i;
- let a = Vx();
+ let a = Jx();
a = n === "alertdialog" && !e["aria-describedby"] ? a : void 0;
let o = (0, P.useRef)(!1);
(0, P.useEffect)(() => {
- if (!r && t.current && !Pb(t.current)) {
- Fx(t.current);
+ if (!r && t.current && !Vb(t.current)) {
+ Hx(t.current);
let e = setTimeout(() => {
- (Mb() === t.current || Mb() === document.body) && (o.current = !0, t.current && (t.current.blur(), Fx(t.current)), o.current = !1);
+ (zb() === t.current || zb() === document.body) && (o.current = !0, t.current && (t.current.blur(), Hx(t.current)), o.current = !1);
}, 500);
return () => {
clearTimeout(e);
};
}
- }, [t, r]), zT(), (0, P.useRef)(!1), (0, P.useEffect)(() => {});
+ }, [t, r]), KT(), (0, P.useRef)(!1), (0, P.useEffect)(() => {});
let s = e["aria-describedby"] ?? a;
return {
dialogProps: {
- ...WS(e, { labelable: !0 }),
+ ...ZS(e, { labelable: !0 }),
role: n,
tabIndex: -1,
"aria-labelledby": e["aria-labelledby"] ?? i,
@@ -24976,23 +25010,23 @@ function Tae(e, t) {
};
}
// node_modules/react-aria/dist/private/focus/useFocusRing.mjs
-function BT(e = {}) {
+function qT(e = {}) {
let { autoFocus: t = !1, isTextInput: n, within: r } = e, i = (0, P.useRef)({
isFocused: !1,
- isFocusVisible: t || Cx()
+ isFocusVisible: t || Ax()
}), [a, o] = (0, P.useState)(!1), [s, c] = (0, P.useState)(() => i.current.isFocused && i.current.isFocusVisible), l = (0, P.useCallback)(() => c(i.current.isFocused && i.current.isFocusVisible), []), u = (0, P.useCallback)((e) => {
- i.current.isFocused = e, i.current.isFocusVisible = Cx(), o(e), l();
+ i.current.isFocused = e, i.current.isFocusVisible = Ax(), o(e), l();
}, [l]);
- Ox((e) => {
+ Fx((e) => {
i.current.isFocusVisible = e, l();
}, [n, a], {
enabled: a,
isTextInput: n
});
- let { focusProps: d } = Kx({
+ let { focusProps: d } = $x({
isDisabled: r,
onFocusChange: u
- }), { focusWithinProps: f } = dw({
+ }), { focusWithinProps: f } = vw({
isDisabled: !r,
onFocusWithinChange: u
});
@@ -25003,41 +25037,41 @@ function BT(e = {}) {
};
}
// node_modules/react-aria/dist/private/i18n/useListFormatter.mjs
-function Eae(e = {}) {
- let { locale: t } = IS();
+function Pae(e = {}) {
+ let { locale: t } = US();
return (0, P.useMemo)(() => new Intl.ListFormat(t, e), [t, e]);
}
// node_modules/react-aria/dist/private/interactions/useHover.mjs
-var VT = !1, HT = 0;
-function Dae() {
- VT = !0, setTimeout(() => {
- VT = !1;
+var JT = !1, YT = 0;
+function Fae() {
+ JT = !0, setTimeout(() => {
+ JT = !1;
}, 500);
}
-function UT(e) {
- e.pointerType === "touch" && Dae();
+function XT(e) {
+ e.pointerType === "touch" && Fae();
}
-function Oae() {
- let e = wb(null);
- if (e !== void 0) return HT === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", UT), HT++, () => {
- HT--, !(HT > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", UT);
+function Iae() {
+ let e = jb(null);
+ if (e !== void 0) return YT === 0 && typeof PointerEvent < "u" && e.addEventListener("pointerup", XT), YT++, () => {
+ YT--, !(YT > 0) && typeof PointerEvent < "u" && e.removeEventListener("pointerup", XT);
};
}
-function WT(e) {
+function ZT(e) {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: i } = e, [a, o] = (0, P.useState)(!1), s = (0, P.useRef)({
isHovered: !1,
ignoreEmulatedMouseEvents: !1,
pointerType: "",
target: null
}).current;
- (0, P.useEffect)(Oae, []);
- let { addGlobalListener: c, removeAllGlobalListeners: l } = $S(), { hoverProps: u, triggerHoverEnd: d } = (0, P.useMemo)(() => {
+ (0, P.useEffect)(Iae, []);
+ let { addGlobalListener: c, removeAllGlobalListeners: l } = oC(), { hoverProps: u, triggerHoverEnd: d } = (0, P.useMemo)(() => {
let e = (e, r) => {
- if (s.pointerType = r, i || r === "touch" || s.isHovered || !jb(e.currentTarget, G(e))) return;
+ if (s.pointerType = r, i || r === "touch" || s.isHovered || !Rb(e.currentTarget, G(e))) return;
s.isHovered = !0;
let l = e.currentTarget;
- s.target = l, c(wb(G(e)), "pointerover", (e) => {
- s.isHovered && s.target && !jb(s.target, G(e)) && a(e, e.pointerType);
+ s.target = l, c(jb(G(e)), "pointerover", (e) => {
+ s.isHovered && s.target && !Rb(s.target, G(e)) && a(e, e.pointerType);
}, { capture: !0 }), t && t({
type: "hoverstart",
target: l,
@@ -25052,9 +25086,9 @@ function WT(e) {
}), n && n(!1), o(!1));
}, u = {};
return typeof PointerEvent < "u" && (u.onPointerEnter = (t) => {
- VT && t.pointerType === "mouse" || e(t, t.pointerType);
+ JT && t.pointerType === "mouse" || e(t, t.pointerType);
}, u.onPointerLeave = (e) => {
- !i && jb(e.currentTarget, G(e)) && a(e, e.pointerType);
+ !i && Rb(e.currentTarget, G(e)) && a(e, e.pointerType);
}), {
hoverProps: u,
triggerHoverEnd: a
@@ -25076,22 +25110,22 @@ function WT(e) {
};
}
// node_modules/react-aria/dist/private/interactions/useInteractOutside.mjs
-function kae(e) {
+function Lae(e) {
let { ref: t, onInteractOutside: n, isDisabled: r, onInteractOutsideStart: i } = e, a = (0, P.useRef)({
isPointerDown: !1,
ignoreEmulatedMouseEvents: !1
- }), o = OS((e) => {
- n && GT(e, t) && (i && i(e), a.current.isPointerDown = !0);
- }), s = OS((e) => {
+ }), o = FS((e) => {
+ n && QT(e, t) && (i && i(e), a.current.isPointerDown = !0);
+ }), s = FS((e) => {
n && n(e);
});
(0, P.useEffect)(() => {
let e = a.current;
if (r) return;
- let n = t.current, i = wb(n);
+ let n = t.current, i = jb(n);
if (typeof PointerEvent < "u") {
let n = (n) => {
- e.isPointerDown && GT(n, t) && s(n), e.isPointerDown = !1;
+ e.isPointerDown && QT(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);
@@ -25099,28 +25133,28 @@ function kae(e) {
}
}, [t, r]);
}
-function GT(e, t) {
+function QT(e, t) {
if (e.button > 0) return !1;
let n = G(e);
if (n) {
let e = n.ownerDocument;
- if (!e || !jb(e.documentElement, n) || n.closest("[data-react-aria-top-layer]")) return !1;
+ if (!e || !Rb(e.documentElement, n) || n.closest("[data-react-aria-top-layer]")) return !1;
}
return t.current ? !e.composedPath().includes(t.current) : !1;
}
// node_modules/react-aria/dist/private/gridlist/utils.mjs
-var KT = /* @__PURE__ */ new WeakMap();
-function qT(e, t) {
- let { id: n } = KT.get(e) ?? {};
+var $T = /* @__PURE__ */ new WeakMap();
+function eE(e, t) {
+ let { id: n } = $T.get(e) ?? {};
if (!n) throw Error("Unknown list");
- return `${n}-${Aae(t)}`;
+ return `${n}-${Rae(t)}`;
}
-function Aae(e) {
+function Rae(e) {
return typeof e == "string" ? e.replace(/\s*/g, "") : "" + e;
}
// node_modules/react-aria/dist/private/intl/grid/ar-AE.mjs
-var JT = {};
-JT = {
+var tE = {};
+tE = {
deselectedItem: (e) => `${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,
longPressToSelect: "اضغط مطولًا للدخول إلى وضع التحديد.",
select: "تحديد",
@@ -25133,8 +25167,8 @@ JT = {
selectedItem: (e) => `${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`
};
// node_modules/react-aria/dist/private/intl/grid/bg-BG.mjs
-var YT = {};
-YT = {
+var nE = {};
+nE = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,
longPressToSelect: "Натиснете и задръжте за да влезете в избирателен режим.",
select: "Изберете",
@@ -25147,8 +25181,8 @@ YT = {
selectedItem: (e) => `${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`
};
// node_modules/react-aria/dist/private/intl/grid/cs-CZ.mjs
-var XT = {};
-XT = {
+var rE = {};
+rE = {
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",
@@ -25161,8 +25195,8 @@ XT = {
selectedItem: (e) => `Vybr\xe1na polo\u{17E}ka ${e.item}.`
};
// node_modules/react-aria/dist/private/intl/grid/da-DK.mjs
-var ZT = {};
-ZT = {
+var iE = {};
+iE = {
deselectedItem: (e) => `${e.item} ikke valgt.`,
longPressToSelect: "Lav et langt tryk for at aktivere valgtilstand.",
select: "Vælg",
@@ -25175,8 +25209,8 @@ ZT = {
selectedItem: (e) => `${e.item} valgt.`
};
// node_modules/react-aria/dist/private/intl/grid/de-DE.mjs
-var QT = {};
-QT = {
+var aE = {};
+aE = {
deselectedItem: (e) => `${e.item} nicht ausgew\xe4hlt.`,
longPressToSelect: "Gedrückt halten, um Auswahlmodus zu öffnen.",
select: "Auswählen",
@@ -25189,8 +25223,8 @@ QT = {
selectedItem: (e) => `${e.item} ausgew\xe4hlt.`
};
// node_modules/react-aria/dist/private/intl/grid/el-GR.mjs
-var $T = {};
-$T = {
+var oE = {};
+oE = {
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: "Επιλογή",
@@ -25203,8 +25237,8 @@ $T = {
selectedItem: (e) => `\u{395}\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}.`
};
// node_modules/react-aria/dist/private/intl/grid/en-US.mjs
-var eE = {};
-eE = {
+var sE = {};
+sE = {
deselectedItem: (e) => `${e.item} not selected.`,
select: "Select",
selectedCount: (e, t) => `${t.plural(e.count, {
@@ -25217,8 +25251,8 @@ eE = {
longPressToSelect: "Long press to enter selection mode."
};
// node_modules/react-aria/dist/private/intl/grid/es-ES.mjs
-var tE = {};
-tE = {
+var cE = {};
+cE = {
deselectedItem: (e) => `${e.item} no seleccionado.`,
longPressToSelect: "Mantenga pulsado para abrir el modo de selección.",
select: "Seleccionar",
@@ -25231,8 +25265,8 @@ tE = {
selectedItem: (e) => `${e.item} seleccionado.`
};
// node_modules/react-aria/dist/private/intl/grid/et-EE.mjs
-var nE = {};
-nE = {
+var lE = {};
+lE = {
deselectedItem: (e) => `${e.item} pole valitud.`,
longPressToSelect: "Valikurežiimi sisenemiseks vajutage pikalt.",
select: "Vali",
@@ -25245,8 +25279,8 @@ nE = {
selectedItem: (e) => `${e.item} valitud.`
};
// node_modules/react-aria/dist/private/intl/grid/fi-FI.mjs
-var rE = {};
-rE = {
+var uE = {};
+uE = {
deselectedItem: (e) => `Kohdetta ${e.item} ei valittu.`,
longPressToSelect: "Siirry valintatilaan painamalla pitkään.",
select: "Valitse",
@@ -25259,8 +25293,8 @@ rE = {
selectedItem: (e) => `${e.item} valittu.`
};
// node_modules/react-aria/dist/private/intl/grid/fr-FR.mjs
-var iE = {};
-iE = {
+var dE = {};
+dE = {
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",
@@ -25273,8 +25307,8 @@ iE = {
selectedItem: (e) => `${e.item} s\xe9lectionn\xe9.`
};
// node_modules/react-aria/dist/private/intl/grid/he-IL.mjs
-var aE = {};
-aE = {
+var fE = {};
+fE = {
deselectedItem: (e) => `${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,
longPressToSelect: "הקשה ארוכה לכניסה למצב בחירה.",
select: "בחר",
@@ -25287,8 +25321,8 @@ aE = {
selectedItem: (e) => `${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`
};
// node_modules/react-aria/dist/private/intl/grid/hr-HR.mjs
-var oE = {};
-oE = {
+var pE = {};
+pE = {
deselectedItem: (e) => `Stavka ${e.item} nije odabrana.`,
longPressToSelect: "Dugo pritisnite za ulazak u način odabira.",
select: "Odaberite",
@@ -25301,8 +25335,8 @@ oE = {
selectedItem: (e) => `Stavka ${e.item} je odabrana.`
};
// node_modules/react-aria/dist/private/intl/grid/hu-HU.mjs
-var sE = {};
-sE = {
+var mE = {};
+mE = {
deselectedItem: (e) => `${e.item} nincs kijel\xf6lve.`,
longPressToSelect: "Nyomja hosszan a kijelöléshez.",
select: "Kijelölés",
@@ -25315,8 +25349,8 @@ sE = {
selectedItem: (e) => `${e.item} kijel\xf6lve.`
};
// node_modules/react-aria/dist/private/intl/grid/it-IT.mjs
-var cE = {};
-cE = {
+var hE = {};
+hE = {
deselectedItem: (e) => `${e.item} non selezionato.`,
longPressToSelect: "Premi a lungo per passare alla modalità di selezione.",
select: "Seleziona",
@@ -25329,8 +25363,8 @@ cE = {
selectedItem: (e) => `${e.item} selezionato.`
};
// node_modules/react-aria/dist/private/intl/grid/ja-JP.mjs
-var lE = {};
-lE = {
+var gE = {};
+gE = {
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: "選択",
@@ -25343,8 +25377,8 @@ lE = {
selectedItem: (e) => `${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`
};
// node_modules/react-aria/dist/private/intl/grid/ko-KR.mjs
-var uE = {};
-uE = {
+var _E = {};
+_E = {
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: "선택",
@@ -25357,8 +25391,8 @@ uE = {
selectedItem: (e) => `${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`
};
// node_modules/react-aria/dist/private/intl/grid/lt-LT.mjs
-var dE = {};
-dE = {
+var vE = {};
+vE = {
deselectedItem: (e) => `${e.item} nepasirinkta.`,
longPressToSelect: "Norėdami įjungti pasirinkimo režimą, paspauskite ir palaikykite.",
select: "Pasirinkti",
@@ -25371,8 +25405,8 @@ dE = {
selectedItem: (e) => `Pasirinkta: ${e.item}.`
};
// node_modules/react-aria/dist/private/intl/grid/lv-LV.mjs
-var fE = {};
-fE = {
+var yE = {};
+yE = {
deselectedItem: (e) => `Vienums ${e.item} nav atlas\u{12B}ts.`,
longPressToSelect: "Ilgi turiet nospiestu. lai ieslēgtu atlases režīmu.",
select: "Atlasīt",
@@ -25385,8 +25419,8 @@ fE = {
selectedItem: (e) => `Atlas\u{12B}ts vienums ${e.item}.`
};
// node_modules/react-aria/dist/private/intl/grid/nb-NO.mjs
-var pE = {};
-pE = {
+var bE = {};
+bE = {
deselectedItem: (e) => `${e.item} er ikke valgt.`,
longPressToSelect: "Bruk et langt trykk for å gå inn i valgmodus.",
select: "Velg",
@@ -25399,8 +25433,8 @@ pE = {
selectedItem: (e) => `${e.item} er valgt.`
};
// node_modules/react-aria/dist/private/intl/grid/nl-NL.mjs
-var mE = {};
-mE = {
+var xE = {};
+xE = {
deselectedItem: (e) => `${e.item} niet geselecteerd.`,
longPressToSelect: "Druk lang om de selectiemodus te openen.",
select: "Selecteren",
@@ -25413,8 +25447,8 @@ mE = {
selectedItem: (e) => `${e.item} geselecteerd.`
};
// node_modules/react-aria/dist/private/intl/grid/pl-PL.mjs
-var hE = {};
-hE = {
+var SE = {};
+SE = {
deselectedItem: (e) => `Nie zaznaczono ${e.item}.`,
longPressToSelect: "Naciśnij i przytrzymaj, aby wejść do trybu wyboru.",
select: "Zaznacz",
@@ -25427,8 +25461,8 @@ hE = {
selectedItem: (e) => `Zaznaczono ${e.item}.`
};
// node_modules/react-aria/dist/private/intl/grid/pt-BR.mjs
-var gE = {};
-gE = {
+var CE = {};
+CE = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Mantenha pressionado para entrar no modo de seleção.",
select: "Selecionar",
@@ -25441,8 +25475,8 @@ gE = {
selectedItem: (e) => `${e.item} selecionado.`
};
// node_modules/react-aria/dist/private/intl/grid/pt-PT.mjs
-var _E = {};
-_E = {
+var wE = {};
+wE = {
deselectedItem: (e) => `${e.item} n\xe3o selecionado.`,
longPressToSelect: "Prima continuamente para entrar no modo de seleção.",
select: "Selecionar",
@@ -25455,8 +25489,8 @@ _E = {
selectedItem: (e) => `${e.item} selecionado.`
};
// node_modules/react-aria/dist/private/intl/grid/ro-RO.mjs
-var vE = {};
-vE = {
+var TE = {};
+TE = {
deselectedItem: (e) => `${e.item} neselectat.`,
longPressToSelect: "Apăsați lung pentru a intra în modul de selectare.",
select: "Selectare",
@@ -25469,8 +25503,8 @@ vE = {
selectedItem: (e) => `${e.item} selectat.`
};
// node_modules/react-aria/dist/private/intl/grid/ru-RU.mjs
-var yE = {};
-yE = {
+var EE = {};
+EE = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Нажмите и удерживайте для входа в режим выбора.",
select: "Выбрать",
@@ -25483,8 +25517,8 @@ yE = {
selectedItem: (e) => `${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`
};
// node_modules/react-aria/dist/private/intl/grid/sk-SK.mjs
-var bE = {};
-bE = {
+var DE = {};
+DE = {
deselectedItem: (e) => `Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,
longPressToSelect: "Dlhším stlačením prejdite do režimu výberu.",
select: "Vybrať",
@@ -25497,8 +25531,8 @@ bE = {
selectedItem: (e) => `Vybrat\xe9 polo\u{17E}ky: ${e.item}.`
};
// node_modules/react-aria/dist/private/intl/grid/sl-SI.mjs
-var xE = {};
-xE = {
+var OE = {};
+OE = {
deselectedItem: (e) => `Element ${e.item} ni izbran.`,
longPressToSelect: "Za izbirni način pritisnite in dlje časa držite.",
select: "Izberite",
@@ -25511,8 +25545,8 @@ xE = {
selectedItem: (e) => `Element ${e.item} je izbran.`
};
// node_modules/react-aria/dist/private/intl/grid/sr-SP.mjs
-var SE = {};
-SE = {
+var kE = {};
+kE = {
deselectedItem: (e) => `${e.item} nije izabrano.`,
longPressToSelect: "Dugo pritisnite za ulazak u režim biranja.",
select: "Izaberite",
@@ -25525,8 +25559,8 @@ SE = {
selectedItem: (e) => `${e.item} je izabrano.`
};
// node_modules/react-aria/dist/private/intl/grid/sv-SE.mjs
-var CE = {};
-CE = {
+var AE = {};
+AE = {
deselectedItem: (e) => `${e.item} ej markerat.`,
longPressToSelect: "Tryck länge när du vill öppna väljarläge.",
select: "Markera",
@@ -25539,8 +25573,8 @@ CE = {
selectedItem: (e) => `${e.item} markerat.`
};
// node_modules/react-aria/dist/private/intl/grid/tr-TR.mjs
-var wE = {};
-wE = {
+var jE = {};
+jE = {
deselectedItem: (e) => `${e.item} se\xe7ilmedi.`,
longPressToSelect: "Seçim moduna girmek için uzun basın.",
select: "Seç",
@@ -25553,8 +25587,8 @@ wE = {
selectedItem: (e) => `${e.item} se\xe7ildi.`
};
// node_modules/react-aria/dist/private/intl/grid/uk-UA.mjs
-var TE = {};
-TE = {
+var ME = {};
+ME = {
deselectedItem: (e) => `${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,
longPressToSelect: "Виконайте довге натиснення, щоб перейти в режим вибору.",
select: "Вибрати",
@@ -25567,8 +25601,8 @@ TE = {
selectedItem: (e) => `${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`
};
// node_modules/react-aria/dist/private/intl/grid/zh-CN.mjs
-var EE = {};
-EE = {
+var NE = {};
+NE = {
deselectedItem: (e) => `\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,
longPressToSelect: "长按以进入选择模式。",
select: "选择",
@@ -25581,8 +25615,8 @@ EE = {
selectedItem: (e) => `\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`
};
// node_modules/react-aria/dist/private/intl/grid/zh-TW.mjs
-var DE = {};
-DE = {
+var PE = {};
+PE = {
deselectedItem: (e) => `\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,
longPressToSelect: "長按以進入選擇模式。",
select: "選取",
@@ -25595,54 +25629,54 @@ DE = {
selectedItem: (e) => `\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`
};
// node_modules/react-aria/dist/private/grid/intlStrings.mjs
-var OE = {};
-OE = {
- "ar-AE": JT,
- "bg-BG": YT,
- "cs-CZ": XT,
- "da-DK": ZT,
- "de-DE": QT,
- "el-GR": $T,
- "en-US": eE,
- "es-ES": tE,
- "et-EE": nE,
- "fi-FI": rE,
- "fr-FR": iE,
- "he-IL": aE,
- "hr-HR": oE,
- "hu-HU": sE,
- "it-IT": cE,
- "ja-JP": lE,
- "ko-KR": uE,
- "lt-LT": dE,
- "lv-LV": fE,
- "nb-NO": pE,
- "nl-NL": mE,
- "pl-PL": hE,
- "pt-BR": gE,
- "pt-PT": _E,
- "ro-RO": vE,
- "ru-RU": yE,
- "sk-SK": bE,
- "sl-SI": xE,
- "sr-SP": SE,
- "sv-SE": CE,
- "tr-TR": wE,
- "uk-UA": TE,
- "zh-CN": EE,
- "zh-TW": DE
+var FE = {};
+FE = {
+ "ar-AE": tE,
+ "bg-BG": nE,
+ "cs-CZ": rE,
+ "da-DK": iE,
+ "de-DE": aE,
+ "el-GR": oE,
+ "en-US": sE,
+ "es-ES": cE,
+ "et-EE": lE,
+ "fi-FI": uE,
+ "fr-FR": dE,
+ "he-IL": fE,
+ "hr-HR": pE,
+ "hu-HU": mE,
+ "it-IT": hE,
+ "ja-JP": gE,
+ "ko-KR": _E,
+ "lt-LT": vE,
+ "lv-LV": yE,
+ "nb-NO": bE,
+ "nl-NL": xE,
+ "pl-PL": SE,
+ "pt-BR": CE,
+ "pt-PT": wE,
+ "ro-RO": TE,
+ "ru-RU": EE,
+ "sk-SK": DE,
+ "sl-SI": OE,
+ "sr-SP": kE,
+ "sv-SE": AE,
+ "tr-TR": jE,
+ "uk-UA": ME,
+ "zh-CN": NE,
+ "zh-TW": PE
};
// node_modules/react-aria/dist/private/grid/useGridSelectionAnnouncement.mjs
-function jae(e) {
+function zae(e) {
return e && e.__esModule ? e.default : e;
}
-function kE(e, t) {
- let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = HS(jae(OE), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, P.useRef)(i), o = (0, P.useCallback)(() => {
+function IE(e, t) {
+ let { getRowText: n = (e) => t.collection.getTextValue?.(e) ?? t.collection.getItem(e)?.textValue } = e, r = YS(zae(FE), "@react-aria/grid"), i = t.selectionManager.rawSelection, a = (0, P.useRef)(i), o = (0, P.useCallback)(() => {
if (!t.selectionManager.isFocused || i === a.current) {
a.current = i;
return;
}
- let e = AE(i, a.current), o = AE(a.current, i), s = t.selectionManager.selectionBehavior === "replace", c = [];
+ let e = LE(i, a.current), o = LE(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)) {
@@ -25662,7 +25696,7 @@ function kE(e, t) {
t && c.push(r.format("deselectedItem", { item: t }));
}
}
- t.selectionManager.selectionMode === "multiple" && (c.length === 0 || i === "all" || i.size > 1 || a.current === "all" || a.current?.size > 1) && c.push(i === "all" ? r.format("selectedAll") : r.format("selectedCount", { count: i.size })), c.length > 0 && VC(c.join(" ")), a.current = i;
+ t.selectionManager.selectionMode === "multiple" && (c.length === 0 || i === "all" || i.size > 1 || a.current === "all" || a.current?.size > 1) && c.push(i === "all" ? r.format("selectedAll") : r.format("selectedCount", { count: i.size })), c.length > 0 && JC(c.join(" ")), a.current = i;
}, [
i,
t.selectionManager.selectedKeys,
@@ -25673,7 +25707,7 @@ function kE(e, t) {
n,
r
]);
- HC(() => {
+ YC(() => {
if (t.selectionManager.isFocused) o();
else {
let e = requestAnimationFrame(o);
@@ -25681,20 +25715,20 @@ function kE(e, t) {
}
}, [i, t.selectionManager.isFocused]);
}
-function AE(e, t) {
+function LE(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);
return n;
}
// node_modules/react-aria/dist/private/focus/useHasTabbableChild.mjs
-function jE(e, t) {
+function RE(e, t) {
let n = t?.isDisabled, [r, i] = (0, P.useState)(!1);
- return Bb(() => {
+ return qb(() => {
if (e?.current && !n) {
let t = () => {
if (e.current) {
- let t = IC(e.current, { tabbable: !0 });
+ let t = UC(e.current, { tabbable: !0 });
i(!!t.nextNode());
}
};
@@ -25712,12 +25746,12 @@ function jE(e, t) {
}), !n && r;
}
// node_modules/react-aria/dist/private/grid/useHighlightSelectionDescription.mjs
-function Mae(e) {
+function Bae(e) {
return e && e.__esModule ? e.default : e;
}
-function ME(e) {
- let t = HS(Mae(OE), "@react-aria/grid"), n = Ex(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
- return YC((0, P.useMemo)(() => {
+function zE(e) {
+ let t = YS(Bae(FE), "@react-aria/grid"), n = Nx(), r = (n === "pointer" || n === "virtual" || n == null) && typeof window < "u" && "ontouchstart" in window;
+ return nw((0, P.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;
}, [
@@ -25729,11 +25763,11 @@ function ME(e) {
]));
}
// node_modules/react-aria/dist/private/selection/useSelectableList.mjs
-function NE(e) {
- let { selectionManager: t, collection: n, disabledKeys: r, ref: i, keyboardDelegate: a, layoutDelegate: o, orientation: s } = e, c = NT({
+function BE(e) {
+ let { selectionManager: t, collection: n, disabledKeys: r, ref: i, keyboardDelegate: a, layoutDelegate: o, orientation: s } = e, c = BT({
usage: "search",
sensitivity: "base"
- }), l = t.disabledBehavior, u = (0, P.useMemo)(() => a || new Fw({
+ }), l = t.disabledBehavior, u = (0, P.useMemo)(() => a || new Hw({
collection: n,
disabledKeys: r,
disabledBehavior: l,
@@ -25750,7 +25784,7 @@ function NE(e) {
c,
l,
s
- ]), { collectionProps: d } = CT({
+ ]), { collectionProps: d } = AT({
...e,
ref: i,
selectionManager: t,
@@ -25759,10 +25793,10 @@ function NE(e) {
return { listProps: d };
}
// node_modules/react-aria/dist/private/gridlist/useGridList.mjs
-function Nae(e, t, n) {
+function Vae(e, t, n) {
let { isVirtualized: r, keyboardDelegate: i, layoutDelegate: a, onAction: o, disallowTypeAhead: s, linkBehavior: c = "action", keyboardNavigationBehavior: l = "arrow", escapeKeyBehavior: u = "clearSelection", shouldSelectOnPressUp: d } = e;
!e["aria-label"] && !e["aria-labelledby"] && console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
- let { listProps: f } = NE({
+ let { listProps: f } = BE({
selectionManager: t.selectionManager,
collection: t.collection,
disabledKeys: t.disabledKeys,
@@ -25777,30 +25811,30 @@ function Nae(e, t, n) {
autoFocus: e.autoFocus,
escapeKeyBehavior: u,
UNSTABLE_focusOnEntry: e.UNSTABLE_focusOnEntry
- }), p = Bx(e.id);
- KT.set(t, {
+ }), p = qx(e.id);
+ $T.set(t, {
id: p,
onAction: o,
linkBehavior: c,
keyboardNavigationBehavior: l,
shouldSelectOnPressUp: d
});
- let m = ME({
+ let m = zE({
selectionManager: t.selectionManager,
hasItemActions: !!o
- }), h = jE(n, { isDisabled: t.collection.size !== 0 }), g = K(WS(e, { labelable: !0 }), {
+ }), h = RE(n, { isDisabled: t.collection.size !== 0 }), g = K(ZS(e, { labelable: !0 }), {
role: "grid",
id: p,
"aria-multiselectable": t.selectionManager.selectionMode === "multiple" ? "true" : void 0
}, t.collection.size === 0 ? { tabIndex: h ? -1 : 0 } : f, m);
- return r && (g["aria-rowcount"] = t.collection.size, g["aria-colcount"] = 1), kE({}, t), { gridProps: g };
+ return r && (g["aria-rowcount"] = t.collection.size, g["aria-colcount"] = 1), IE({}, t), { gridProps: g };
}
// node_modules/react-aria/dist/private/selection/useSelectableItem.mjs
-function PE(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 = tx();
- t = Bx(t);
+function VE(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 = cx();
+ t = qx(t);
let p = (e) => {
- if (e.pointerType === "keyboard" && jw(e)) n.toggleSelection(r);
+ if (e.pointerType === "keyboard" && Rw(e)) n.toggleSelection(r);
else {
if (n.selectionMode === "none") return;
if (n.isLink(r)) {
@@ -25811,11 +25845,11 @@ function PE(e) {
}
if (d === "override" || d === "none") return;
}
- n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : e && e.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || e && (ES(e) || e.pointerType === "touch" || e.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
+ n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : e && e.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || e && (NS(e) || e.pointerType === "touch" || e.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
}
};
(0, P.useEffect)(() => {
- r === n.focusedKey && n.isFocused && (o ? hS(i.current) : s ? s() : Mb() !== i.current && i.current && Fx(i.current));
+ r === n.focusedKey && n.isFocused && (o ? SS(i.current) : s ? s() : zb() !== i.current && i.current && Hx(i.current));
}, [
i,
r,
@@ -25843,22 +25877,22 @@ function PE(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 || IE(e.key)) && p(e);
+ C.current = e.pointerType, T.current = w, e.pointerType === "keyboard" && (!S || UE(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" && !FE(e.key)) return;
+ if (e.pointerType === "keyboard" && !HE(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 || IE(e.key))) && p(e);
+ C.current = e.pointerType, T.current = w, E.current = b, v && (e.pointerType === "mouse" && !b || e.pointerType === "keyboard" && (!y || UE(e.key))) && p(e);
}, k.onPress = (e) => {
- (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && S && FE(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 && HE(e.key) || e.pointerType === "mouse" && E.current) && (S ? O(e) : v && p(e));
});
- let A = gae(n.collection);
+ let A = wae(n.collection);
if (m["data-collection"] = A, m["data-key"] = r, k.preventFocusOnPress = o, o && (k = K(k, {
onPressStart(e) {
e.pointerType !== "touch" && (n.setFocused(!0), n.setFocusedKey(r));
@@ -25873,10 +25907,10 @@ function PE(e) {
"onPress",
"onPressUp",
"onClick"
- ]) D[e] && (k[e] = Ix(k[e], D[e]));
- let { pressProps: j, isPressed: M } = aC(k), ee = x ? (e) => {
+ ]) D[e] && (k[e] = Ux(k[e], D[e]));
+ let { pressProps: j, isPressed: M } = fC(k), ee = x ? (e) => {
C.current === "mouse" && (e.stopPropagation(), e.preventDefault(), O(e));
- } : void 0, { longPressProps: te } = _T({
+ } : void 0, { longPressProps: te } = wT({
isDisabled: !w,
onLongPress(e) {
e.pointerType === "touch" && (p(e), n.setSelectionBehavior("toggle"));
@@ -25884,7 +25918,7 @@ function PE(e) {
}), ne = (e) => {
C.current === "touch" && T.current && e.preventDefault();
}, N = d !== "none" && n.isLink(r) ? (e) => {
- nx.isOpening || e.preventDefault();
+ lx.isOpening || e.preventDefault();
} : void 0, re = K(m, v || b || o && !c ? j : {}, w ? te : {}, {
onDoubleClick: ee,
onDragStartCapture: ne,
@@ -25897,7 +25931,7 @@ function PE(e) {
if (e != null) return e !== A;
t = t.parentElement;
}
- return Rb(e);
+ return Gb(e);
}, F = re.onPointerDown;
re.onPointerDown = (e) => {
let t = G(e);
@@ -25917,14 +25951,14 @@ function PE(e) {
hasAction: S
};
}
-function FE(e) {
+function HE(e) {
return e === "Enter";
}
-function IE(e) {
+function UE(e) {
return e === " ";
}
// node_modules/react-aria/dist/private/gridlist/useGridListItem.mjs
-var LE = {
+var WE = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -25934,18 +25968,18 @@ var LE = {
rtl: "ArrowRight"
}
};
-function Pae(e, t, n) {
- let { node: r, isVirtualized: i, focusMode: a = "row", allowsArrowNavigation: o } = e, { direction: s } = IS(), { onAction: c, linkBehavior: l, keyboardNavigationBehavior: u, shouldSelectOnPressUp: d } = KT.get(t), f = Vx(), p = (0, P.useRef)(null), m = () => {
+function Hae(e, t, n) {
+ let { node: r, isVirtualized: i, focusMode: a = "row", allowsArrowNavigation: o } = e, { direction: s } = US(), { onAction: c, linkBehavior: l, keyboardNavigationBehavior: u, shouldSelectOnPressUp: d } = $T.get(t), f = Jx(), p = (0, P.useRef)(null), m = () => {
if (n.current !== null) {
if (a === "child") {
- if (Pb(n.current) && n.current !== Mb(wb(n.current))) return;
- let e = IC(n.current, { tabbable: !0 }).firstChild();
+ if (Vb(n.current) && n.current !== zb(jb(n.current))) return;
+ let e = UC(n.current, { tabbable: !0 }).firstChild();
if (e) {
- Fx(e), qC(e, { containingElement: WC(e) });
+ Hx(e), ew(e, { containingElement: ZC(e) });
return;
}
}
- (p.current != null && r.key !== p.current || !Pb(n.current)) && Fx(n.current);
+ (p.current != null && r.key !== p.current || !Vb(n.current)) && Hx(n.current);
}
}, h = {}, g = e.hasChildItems, _ = t.selectionManager.isLink(r.key);
if (r != null && "expandedKeys" in t) {
@@ -25955,7 +25989,7 @@ function Pae(e, t, n) {
if (r.level >= 0 && r?.parentKey != null) {
let e = t.collection.getItem(r.parentKey);
if (e) {
- let n = Fae(e, t.collection);
+ let n = Uae(e, t.collection);
i = [...n].filter((e) => e.type === "item").length, a > 0 && n[0].type !== "item" && --a;
}
} else i = [...t.collection].filter((e) => e.level === 0 && e.type === "item").length;
@@ -25966,75 +26000,75 @@ function Pae(e, t, n) {
"aria-setsize": i
};
}
- let { itemProps: v, ...y } = PE({
+ let { itemProps: v, ...y } = VE({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
isVirtualized: i,
shouldSelectOnPressUp: e.shouldSelectOnPressUp || d,
- onAction: c || r.props?.onAction ? Ix(r.props?.onAction, c ? () => c(r.key) : void 0) : void 0,
+ onAction: c || r.props?.onAction ? Ux(r.props?.onAction, c ? () => c(r.key) : void 0) : void 0,
focus: m,
linkBehavior: l
}), b = (e) => {
- let i = Mb(wb(n.current));
- if (!jb(e.currentTarget, G(e)) || !n.current || !i) return;
- let a = IC(n.current);
- if (a.currentNode = i, !RE(e, t, r, g, s, i, n.current, o)) switch (e.key) {
+ let i = zb(jb(n.current));
+ if (!Rb(e.currentTarget, G(e)) || !n.current || !i) return;
+ let a = UC(n.current);
+ if (a.currentNode = i, !GE(e, t, r, g, s, i, n.current, o)) switch (e.key) {
case "ArrowLeft":
if (u === "arrow") {
let t = s === "rtl" ? a.nextNode() : a.previousNode();
- if (t) e.preventDefault(), e.stopPropagation(), Fx(t), qC(t, { containingElement: WC(n.current) });
- else if (e.preventDefault(), e.stopPropagation(), s === "rtl") Fx(n.current), qC(n.current, { containingElement: WC(n.current) });
+ if (t) e.preventDefault(), e.stopPropagation(), Hx(t), ew(t, { containingElement: ZC(n.current) });
+ else if (e.preventDefault(), e.stopPropagation(), s === "rtl") Hx(n.current), ew(n.current, { containingElement: ZC(n.current) });
else {
a.currentNode = n.current;
- let e = zE(a);
- e && (Fx(e), qC(e, { containingElement: WC(n.current) }));
+ let e = KE(a);
+ e && (Hx(e), ew(e, { containingElement: ZC(n.current) }));
}
}
break;
case "ArrowRight":
if (u === "arrow") {
let t = s === "rtl" ? a.previousNode() : a.nextNode();
- if (t) e.preventDefault(), e.stopPropagation(), Fx(t), qC(t, { containingElement: WC(n.current) });
- else if (e.preventDefault(), e.stopPropagation(), s === "ltr") Fx(n.current), qC(n.current, { containingElement: WC(n.current) });
+ if (t) e.preventDefault(), e.stopPropagation(), Hx(t), ew(t, { containingElement: ZC(n.current) });
+ else if (e.preventDefault(), e.stopPropagation(), s === "ltr") Hx(n.current), ew(n.current, { containingElement: ZC(n.current) });
else {
a.currentNode = n.current;
- let e = zE(a);
- e && (Fx(e), qC(e, { containingElement: WC(n.current) }));
+ let e = KE(a);
+ e && (Hx(e), ew(e, { containingElement: ZC(n.current) }));
}
}
break;
case "ArrowUp":
- case "ArrowDown": !e.altKey && jb(n.current, G(e)) && (e.stopPropagation(), e.preventDefault(), n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent)));
+ case "ArrowDown": !e.altKey && Rb(n.current, G(e)) && (e.stopPropagation(), e.preventDefault(), n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent)));
}
}, x = (e) => {
- p.current = r.key, G(e) === n.current ? a === "child" && e.relatedTarget && jb(n.current, e.relatedTarget) || requestAnimationFrame(() => {
- a === "child" && Mb(wb(n.current)) === n.current && m();
- }) : Cx() || t.selectionManager.setFocusedKey(r.key);
+ p.current = r.key, G(e) === n.current ? a === "child" && e.relatedTarget && Rb(n.current, e.relatedTarget) || requestAnimationFrame(() => {
+ a === "child" && zb(jb(n.current)) === n.current && m();
+ }) : Ax() || t.selectionManager.setFocusedKey(r.key);
}, S = (e) => {
- let i = Mb(wb(n.current));
- if (jb(e.currentTarget, G(e)) && n.current && i) {
+ let i = zb(jb(n.current));
+ if (Rb(e.currentTarget, G(e)) && n.current && i) {
if (u === "tab") {
if (G(e) !== n.current && e.key !== "Tab") {
e.stopPropagation();
return;
}
- if (RE(e, t, r, g, s, i, n.current, o)) return;
+ if (GE(e, t, r, g, s, i, n.current, o)) return;
}
if (e.key === "Tab" && u === "tab") {
- let t = IC(n.current, { tabbable: !0 });
+ let t = UC(n.current, { tabbable: !0 });
t.currentNode = i, (e.shiftKey ? t.previousNode() : t.nextNode()) && e.stopPropagation();
}
}
- }, C = rx(r.props), w = K(v, y.hasAction ? C : {}, {
+ }, C = ux(r.props), w = K(v, y.hasAction ? C : {}, {
role: "row",
onKeyDownCapture: u === "arrow" || o ? b : void 0,
onFocus: x,
"aria-label": r["aria-label"] || r.textValue || void 0,
"aria-selected": t.selectionManager.canSelectItem(r.key) ? t.selectionManager.isSelected(r.key) : void 0,
"aria-disabled": t.selectionManager.isDisabled(r.key) || void 0,
- "aria-labelledby": f && (r["aria-label"] || r.textValue) ? `${qT(t, r.key)} ${f}` : void 0,
- id: qT(t, r.key)
+ "aria-labelledby": f && (r["aria-label"] || r.textValue) ? `${eE(t, r.key)} ${f}` : void 0,
+ id: eE(t, r.key)
});
a === "child" && o && u === "tab" && (w.tabIndex = -1);
let T = w.onKeyDown;
@@ -26055,66 +26089,66 @@ function Pae(e, t, n) {
...y
};
}
-function RE(e, t, n, r, i, a, o, s) {
+function GE(e, t, n, r, i, a, o, s) {
if (!("expandedKeys" in t) || !s && a !== o) return !1;
- if (e.key === LE.expand[i] && t.selectionManager.focusedKey === n.key && r && !t.expandedKeys.has(n.key)) return t.toggleKey(n.key), e.stopPropagation(), !0;
- if (e.key === LE.collapse[i] && t.selectionManager.focusedKey === n.key) {
+ if (e.key === WE.expand[i] && t.selectionManager.focusedKey === n.key && r && !t.expandedKeys.has(n.key)) return t.toggleKey(n.key), e.stopPropagation(), !0;
+ if (e.key === WE.collapse[i] && t.selectionManager.focusedKey === n.key) {
if (r && t.expandedKeys.has(n.key)) return t.toggleKey(n.key), e.stopPropagation(), !0;
if (!t.expandedKeys.has(n.key) && n.parentKey && t.collection.getItem(n.parentKey)?.type === "item") return t.selectionManager.setFocusedKey(n.parentKey), e.stopPropagation(), !0;
}
return !1;
}
-function zE(e) {
+function KE(e) {
let t = null, n = null;
do
n = e.lastChild(), n && (t = n);
while (n);
return t;
}
-function Fae(e, t) {
+function Uae(e, t) {
let n = t.getChildren?.(e.key), r = n ? Array.from(n) : [], i = r.length > 0 ? r[0] : null, a = [];
for (; i;) a.push(i), i = i.nextKey == null ? null : t.getItem(i.nextKey);
return a;
}
// node_modules/react-aria/dist/private/grid/useGridSelectionCheckbox.mjs
-function Iae(e) {
+function Wae(e) {
return e && e.__esModule ? e.default : e;
}
-function BE(e, t) {
- let { key: n } = e, r = t.selectionManager, i = Bx(), a = !t.selectionManager.canSelectItem(n), o = t.selectionManager.isSelected(n);
+function qE(e, t) {
+ let { key: n } = e, r = t.selectionManager, i = qx(), a = !t.selectionManager.canSelectItem(n), o = t.selectionManager.isSelected(n);
return { checkboxProps: {
id: i,
- "aria-label": HS(Iae(OE), "@react-aria/grid").format("select"),
+ "aria-label": YS(Wae(FE), "@react-aria/grid").format("select"),
isSelected: o,
isDisabled: a,
onChange: () => r.toggleSelection(n)
} };
}
// node_modules/react-aria/dist/private/gridlist/useGridListSelectionCheckbox.mjs
-function Lae(e, t) {
- let { key: n } = e, { checkboxProps: r } = BE(e, t);
+function Gae(e, t) {
+ let { key: n } = e, { checkboxProps: r } = qE(e, t);
return { checkboxProps: {
...r,
- "aria-labelledby": `${r.id} ${qT(t, n)}`
+ "aria-labelledby": `${r.id} ${eE(t, n)}`
} };
}
// node_modules/react-aria/dist/private/listbox/useListBox.mjs
-function Rae(e, t, n) {
- let r = WS(e, { labelable: !0 }), i = e.selectionBehavior || "toggle", a = e.orientation || "vertical", o = e.linkBehavior || (i === "replace" ? "action" : "override");
+function Kae(e, t, n) {
+ let r = ZS(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 } = NE({
+ let { listProps: s } = BE({
...e,
ref: n,
selectionManager: t.selectionManager,
collection: t.collection,
disabledKeys: t.disabledKeys,
linkBehavior: o
- }), { focusWithinProps: c } = dw({
+ }), { focusWithinProps: c } = vw({
onFocusWithin: e.onFocus,
onBlurWithin: e.onBlur,
onFocusWithinChange: e.onFocusChange
- }), l = Bx(e.id);
- Aw.set(t, {
+ }), l = qx(e.id);
+ Lw.set(t, {
id: l,
shouldUseVirtualFocus: e.shouldUseVirtualFocus,
shouldSelectOnPressUp: e.shouldSelectOnPressUp,
@@ -26124,7 +26158,7 @@ function Rae(e, t, n) {
linkBehavior: o,
UNSTABLE_itemBehavior: e.UNSTABLE_itemBehavior
});
- let { labelProps: u, fieldProps: d } = lw({
+ let { labelProps: u, fieldProps: d } = gw({
...e,
id: l,
labelElementType: "span"
@@ -26139,8 +26173,8 @@ function Rae(e, t, n) {
};
}
// node_modules/react-aria/dist/private/listbox/useListBoxSection.mjs
-function zae(e) {
- let { heading: t, "aria-label": n } = e, r = Bx();
+function qae(e) {
+ let { heading: t, "aria-label": n } = e, r = qx();
return {
itemProps: { role: "presentation" },
headingProps: t ? {
@@ -26158,8 +26192,8 @@ function zae(e) {
};
}
// node_modules/react-aria/dist/private/listbox/useOption.mjs
-function Bae(e, t, n) {
- let { key: r } = e, i = Aw.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 = Vx(), f = Vx(), p = {
+function Jae(e, t, n) {
+ let { key: r } = e, i = Lw.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 = Jx(), f = Jx(), p = {
role: "option",
"aria-disabled": a || void 0,
"aria-selected": t.selectionManager.selectionMode === "none" ? void 0 : o,
@@ -26169,9 +26203,9 @@ function Bae(e, t, n) {
}, m = t.collection.getItem(r);
if (u) {
let e = Number(m?.index);
- p["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, p["aria-setsize"] = jT(t.collection);
+ p["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, p["aria-setsize"] = RT(t.collection);
}
- let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = mae(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = PE({
+ let h = i?.onAction ? () => i?.onAction?.(r) : void 0, g = Sae(t, r), { itemProps: _, isPressed: v, isFocused: y, hasAction: b, allowsSelection: x } = VE({
selectionManager: t.selectionManager,
key: r,
ref: n,
@@ -26180,18 +26214,18 @@ function Bae(e, t, n) {
isVirtualized: u,
shouldUseVirtualFocus: l,
isDisabled: a,
- onAction: h || m?.props?.onAction ? Ix(m?.props?.onAction, h) : void 0,
+ onAction: h || m?.props?.onAction ? Ux(m?.props?.onAction, h) : void 0,
linkBehavior: i?.linkBehavior,
UNSTABLE_itemBehavior: i?.UNSTABLE_itemBehavior,
id: g
- }), { hoverProps: S } = WT({
+ }), { hoverProps: S } = ZT({
isDisabled: a || !c,
onHoverStart() {
- Cx() || (t.selectionManager.setFocused(!0), t.selectionManager.setFocusedKey(r));
+ Ax() || (t.selectionManager.setFocused(!0), t.selectionManager.setFocusedKey(r));
}
- }), C = WS(m?.props);
+ }), C = ZS(m?.props);
delete C.id;
- let w = ix(m?.props);
+ let w = dx(m?.props);
return {
optionProps: {
...p,
@@ -26201,7 +26235,7 @@ function Bae(e, t, n) {
labelProps: { id: d },
descriptionProps: { id: f },
isFocused: y,
- isFocusVisible: y && t.selectionManager.isFocused && Cx(),
+ isFocusVisible: y && t.selectionManager.isFocused && Ax(),
isSelected: o,
isDisabled: a,
isPressed: v,
@@ -26210,12 +26244,12 @@ function Bae(e, t, n) {
};
}
// node_modules/react-aria/dist/private/menu/utils.mjs
-var VE = /* @__PURE__ */ new WeakMap();
+var JE = /* @__PURE__ */ new WeakMap();
// node_modules/react-aria/dist/private/menu/useMenu.mjs
-function Vae(e, t, n) {
+function Yae(e, t, n) {
let { shouldFocusWrap: r = !0, onKeyDown: i, onKeyUp: a, ...o } = e;
!e["aria-label"] && e["aria-labelledby"];
- let s = WS(e, { labelable: !0 }), { listProps: c } = NE({
+ let s = ZS(e, { labelable: !0 }), { listProps: c } = BE({
...o,
ref: n,
selectionManager: t.selectionManager,
@@ -26224,7 +26258,7 @@ function Vae(e, t, n) {
shouldFocusWrap: r,
linkBehavior: "override"
});
- return VE.set(t, {
+ return JE.set(t, {
onClose: e.onClose,
onAction: e.onAction,
shouldUseVirtualFocus: e.shouldUseVirtualFocus
@@ -26240,15 +26274,15 @@ function Vae(e, t, n) {
}) };
}
// node_modules/react-aria/dist/private/menu/useMenuItem.mjs
-function Hae(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 = VE.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = tx(), M = () => {
+function Xae(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 = JE.get(t), k = t.collection.getItem(i), A = e.onClose || O.onClose, j = cx(), M = () => {
if (!w && (k?.props?.onAction ? k.props.onAction() : e.onAction && e.onAction(i), O.onAction)) {
let e = O.onAction;
e(i, k?.value);
}
}, ee = "menuitem";
w || (C.selectionMode === "single" ? ee = "menuitemradio" : C.selectionMode === "multiple" && (ee = "menuitemcheckbox"));
- let te = Vx(), ne = Vx(), N = Vx(), re = {
+ let te = Jx(), ne = Jx(), N = Jx(), re = {
id: r,
"aria-disabled": E || void 0,
role: ee,
@@ -26265,17 +26299,17 @@ function Hae(e, t, n) {
};
if (C.selectionMode !== "none" && !w && (re["aria-checked"] = D), s) {
let e = Number(k?.index);
- re["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, re["aria-setsize"] = jT(t.collection);
+ re["aria-posinset"] = Number.isNaN(e) ? void 0 : e + 1, re["aria-setsize"] = RT(t.collection);
}
let ie = (0, P.useRef)(!1), F = (e) => {
f?.(e), ie.current = e;
}, ae = (0, P.useRef)(null), oe = (e) => {
e.pointerType !== "keyboard" && (ae.current = { pointerType: e.pointerType }), e.pointerType === "mouse" && (ie.current || e.target.click()), u?.(e);
}, se = (e) => {
- m?.(e), M(), Are(e, j, k.props.href, k?.props.routerOptions);
+ m?.(e), M(), Rre(e, j, k.props.href, k?.props.routerOptions);
let t = ae.current?.pointerType === "keyboard" ? ae.current?.key === "Enter" || C.selectionMode === "none" || C.isLink(i) : C.selectionMode !== "multiple" || C.isLink(i);
t = o ?? a ?? t, A && !w && t && A(), ae.current = null;
- }, { itemProps: ce, isFocused: le } = PE({
+ }, { itemProps: ce, isFocused: le } = VE({
id: r,
selectionManager: C,
key: i,
@@ -26284,27 +26318,27 @@ function Hae(e, t, n) {
allowsDifferentPressOrigin: !0,
linkBehavior: "none",
shouldUseVirtualFocus: O.shouldUseVirtualFocus
- }), { pressProps: ue, isPressed: de } = aC({
+ }), { pressProps: ue, isPressed: de } = fC({
onPressStart: l,
onPress: d,
onPressUp: oe,
onPressChange: F,
onPressEnd: p,
isDisabled: E
- }), { hoverProps: fe } = WT({
+ }), { hoverProps: fe } = ZT({
isDisabled: E,
onHoverStart(e) {
- !Cx() && !(T && c) && (C.setFocused(!0), C.setFocusedKey(i)), h?.(e);
+ !Ax() && !(T && c) && (C.setFocused(!0), C.setFocusedKey(i)), h?.(e);
},
onHoverChange: g,
onHoverEnd: _
- }), { keyboardProps: pe } = Xx({
+ }), { keyboardProps: pe } = rS({
shortcuts: {
" ": (e) => {
ae.current = {
pointerType: "keyboard",
key: " "
- }, G(e).click(), Tx("keyboard");
+ }, G(e).click(), Mx("keyboard");
},
Enter: (e) => {
ae.current = {
@@ -26312,8 +26346,8 @@ function Hae(e, t, n) {
key: "Enter"
};
let t = G(e);
- if (t.tagName !== "A") t.click(), Tx("keyboard");
- else return Tx("keyboard"), {
+ if (t.tagName !== "A") t.click(), Mx("keyboard");
+ else return Mx("keyboard"), {
shouldPreventDefault: !1,
shouldContinuePropagation: !1
};
@@ -26321,13 +26355,13 @@ function Hae(e, t, n) {
},
onKeyDown: v,
onKeyUp: y
- }), { focusableProps: me } = eS({
+ }), { focusableProps: me } = sS({
onBlur: S,
onFocus: b,
onFocusChange: x
- }, n), he = WS(k?.props);
+ }, n), he = ZS(k?.props);
delete he.id;
- let I = ix(k?.props);
+ let I = dx(k?.props);
return {
menuItemProps: {
...re,
@@ -26342,15 +26376,15 @@ function Hae(e, t, n) {
descriptionProps: { id: ne },
keyboardShortcutProps: { id: N },
isFocused: le,
- isFocusVisible: le && C.isFocused && Cx() && !T,
+ isFocusVisible: le && C.isFocused && Ax() && !T,
isSelected: D,
isPressed: de,
isDisabled: E
};
}
// node_modules/react-aria/dist/private/menu/useMenuSection.mjs
-function Uae(e) {
- let { heading: t, "aria-label": n } = e, r = Bx();
+function Zae(e) {
+ let { heading: t, "aria-label": n } = e, r = qx();
return {
itemProps: { role: "presentation" },
headingProps: t ? {
@@ -26365,15 +26399,15 @@ function Uae(e) {
};
}
// node_modules/react-aria/dist/private/utils/useResizeObserver.mjs
-function Wae() {
+function Qae() {
return window.ResizeObserver !== void 0;
}
-function HE(e) {
- let { ref: t, box: n, onResize: r } = e, i = OS(r);
+function YE(e) {
+ let { ref: t, box: n, onResize: r } = e, i = FS(r);
(0, P.useEffect)(() => {
let e = t?.current;
if (e) {
- if (Wae()) {
+ if (Qae()) {
let t = new window.ResizeObserver((e) => {
e.length && i();
});
@@ -26388,154 +26422,154 @@ function HE(e) {
}, [t, n]);
}
// node_modules/react-aria/dist/private/intl/overlays/ar-AE.mjs
-var UE = {};
-UE = { dismiss: "تجاهل" };
+var XE = {};
+XE = { dismiss: "تجاهل" };
// node_modules/react-aria/dist/private/intl/overlays/bg-BG.mjs
-var WE = {};
-WE = { dismiss: "Отхвърляне" };
+var ZE = {};
+ZE = { dismiss: "Отхвърляне" };
// node_modules/react-aria/dist/private/intl/overlays/cs-CZ.mjs
-var GE = {};
-GE = { dismiss: "Odstranit" };
+var QE = {};
+QE = { dismiss: "Odstranit" };
// node_modules/react-aria/dist/private/intl/overlays/da-DK.mjs
-var KE = {};
-KE = { dismiss: "Luk" };
+var $E = {};
+$E = { dismiss: "Luk" };
// node_modules/react-aria/dist/private/intl/overlays/de-DE.mjs
-var qE = {};
-qE = { dismiss: "Schließen" };
+var eD = {};
+eD = { dismiss: "Schließen" };
// node_modules/react-aria/dist/private/intl/overlays/el-GR.mjs
-var JE = {};
-JE = { dismiss: "Απόρριψη" };
+var tD = {};
+tD = { dismiss: "Απόρριψη" };
// node_modules/react-aria/dist/private/intl/overlays/en-US.mjs
-var YE = {};
-YE = { dismiss: "Dismiss" };
+var nD = {};
+nD = { dismiss: "Dismiss" };
// node_modules/react-aria/dist/private/intl/overlays/es-ES.mjs
-var XE = {};
-XE = { dismiss: "Descartar" };
+var rD = {};
+rD = { dismiss: "Descartar" };
// node_modules/react-aria/dist/private/intl/overlays/et-EE.mjs
-var ZE = {};
-ZE = { dismiss: "Lõpeta" };
+var iD = {};
+iD = { dismiss: "Lõpeta" };
// node_modules/react-aria/dist/private/intl/overlays/fi-FI.mjs
-var QE = {};
-QE = { dismiss: "Hylkää" };
+var aD = {};
+aD = { dismiss: "Hylkää" };
// node_modules/react-aria/dist/private/intl/overlays/fr-FR.mjs
-var $E = {};
-$E = { dismiss: "Rejeter" };
+var oD = {};
+oD = { dismiss: "Rejeter" };
// node_modules/react-aria/dist/private/intl/overlays/he-IL.mjs
-var eD = {};
-eD = { dismiss: "התעלם" };
+var sD = {};
+sD = { dismiss: "התעלם" };
// node_modules/react-aria/dist/private/intl/overlays/hr-HR.mjs
-var tD = {};
-tD = { dismiss: "Odbaci" };
+var cD = {};
+cD = { dismiss: "Odbaci" };
// node_modules/react-aria/dist/private/intl/overlays/hu-HU.mjs
-var nD = {};
-nD = { dismiss: "Elutasítás" };
+var lD = {};
+lD = { dismiss: "Elutasítás" };
// node_modules/react-aria/dist/private/intl/overlays/it-IT.mjs
-var rD = {};
-rD = { dismiss: "Ignora" };
+var uD = {};
+uD = { dismiss: "Ignora" };
// node_modules/react-aria/dist/private/intl/overlays/ja-JP.mjs
-var iD = {};
-iD = { dismiss: "閉じる" };
+var dD = {};
+dD = { dismiss: "閉じる" };
// node_modules/react-aria/dist/private/intl/overlays/ko-KR.mjs
-var aD = {};
-aD = { dismiss: "무시" };
+var fD = {};
+fD = { dismiss: "무시" };
// node_modules/react-aria/dist/private/intl/overlays/lt-LT.mjs
-var oD = {};
-oD = { dismiss: "Atmesti" };
+var pD = {};
+pD = { dismiss: "Atmesti" };
// node_modules/react-aria/dist/private/intl/overlays/lv-LV.mjs
-var sD = {};
-sD = { dismiss: "Nerādīt" };
+var mD = {};
+mD = { dismiss: "Nerādīt" };
// node_modules/react-aria/dist/private/intl/overlays/nb-NO.mjs
-var cD = {};
-cD = { dismiss: "Lukk" };
+var hD = {};
+hD = { dismiss: "Lukk" };
// node_modules/react-aria/dist/private/intl/overlays/nl-NL.mjs
-var lD = {};
-lD = { dismiss: "Negeren" };
+var gD = {};
+gD = { dismiss: "Negeren" };
// node_modules/react-aria/dist/private/intl/overlays/pl-PL.mjs
-var uD = {};
-uD = { dismiss: "Zignoruj" };
+var _D = {};
+_D = { dismiss: "Zignoruj" };
// node_modules/react-aria/dist/private/intl/overlays/pt-BR.mjs
-var dD = {};
-dD = { dismiss: "Descartar" };
+var vD = {};
+vD = { dismiss: "Descartar" };
// node_modules/react-aria/dist/private/intl/overlays/pt-PT.mjs
-var fD = {};
-fD = { dismiss: "Dispensar" };
+var yD = {};
+yD = { dismiss: "Dispensar" };
// node_modules/react-aria/dist/private/intl/overlays/ro-RO.mjs
-var pD = {};
-pD = { dismiss: "Revocare" };
+var bD = {};
+bD = { dismiss: "Revocare" };
// node_modules/react-aria/dist/private/intl/overlays/ru-RU.mjs
-var mD = {};
-mD = { dismiss: "Пропустить" };
+var xD = {};
+xD = { dismiss: "Пропустить" };
// node_modules/react-aria/dist/private/intl/overlays/sk-SK.mjs
-var hD = {};
-hD = { dismiss: "Zrušiť" };
+var SD = {};
+SD = { dismiss: "Zrušiť" };
// node_modules/react-aria/dist/private/intl/overlays/sl-SI.mjs
-var gD = {};
-gD = { dismiss: "Opusti" };
+var CD = {};
+CD = { dismiss: "Opusti" };
// node_modules/react-aria/dist/private/intl/overlays/sr-SP.mjs
-var _D = {};
-_D = { dismiss: "Odbaci" };
+var wD = {};
+wD = { dismiss: "Odbaci" };
// node_modules/react-aria/dist/private/intl/overlays/sv-SE.mjs
-var vD = {};
-vD = { dismiss: "Avvisa" };
+var TD = {};
+TD = { dismiss: "Avvisa" };
// node_modules/react-aria/dist/private/intl/overlays/tr-TR.mjs
-var yD = {};
-yD = { dismiss: "Kapat" };
+var ED = {};
+ED = { dismiss: "Kapat" };
// node_modules/react-aria/dist/private/intl/overlays/uk-UA.mjs
-var bD = {};
-bD = { dismiss: "Скасувати" };
+var DD = {};
+DD = { dismiss: "Скасувати" };
// node_modules/react-aria/dist/private/intl/overlays/zh-CN.mjs
-var xD = {};
-xD = { dismiss: "取消" };
+var OD = {};
+OD = { dismiss: "取消" };
// node_modules/react-aria/dist/private/intl/overlays/zh-TW.mjs
-var SD = {};
-SD = { dismiss: "關閉" };
+var kD = {};
+kD = { dismiss: "關閉" };
// node_modules/react-aria/dist/private/overlays/intlStrings.mjs
-var CD = {};
-CD = {
- "ar-AE": UE,
- "bg-BG": WE,
- "cs-CZ": GE,
- "da-DK": KE,
- "de-DE": qE,
- "el-GR": JE,
- "en-US": YE,
- "es-ES": XE,
- "et-EE": ZE,
- "fi-FI": QE,
- "fr-FR": $E,
- "he-IL": eD,
- "hr-HR": tD,
- "hu-HU": nD,
- "it-IT": rD,
- "ja-JP": iD,
- "ko-KR": aD,
- "lt-LT": oD,
- "lv-LV": sD,
- "nb-NO": cD,
- "nl-NL": lD,
- "pl-PL": uD,
- "pt-BR": dD,
- "pt-PT": fD,
- "ro-RO": pD,
- "ru-RU": mD,
- "sk-SK": hD,
- "sl-SI": gD,
- "sr-SP": _D,
- "sv-SE": vD,
- "tr-TR": yD,
- "uk-UA": bD,
- "zh-CN": xD,
- "zh-TW": SD
+var AD = {};
+AD = {
+ "ar-AE": XE,
+ "bg-BG": ZE,
+ "cs-CZ": QE,
+ "da-DK": $E,
+ "de-DE": eD,
+ "el-GR": tD,
+ "en-US": nD,
+ "es-ES": rD,
+ "et-EE": iD,
+ "fi-FI": aD,
+ "fr-FR": oD,
+ "he-IL": sD,
+ "hr-HR": cD,
+ "hu-HU": lD,
+ "it-IT": uD,
+ "ja-JP": dD,
+ "ko-KR": fD,
+ "lt-LT": pD,
+ "lv-LV": mD,
+ "nb-NO": hD,
+ "nl-NL": gD,
+ "pl-PL": _D,
+ "pt-BR": vD,
+ "pt-PT": yD,
+ "ro-RO": bD,
+ "ru-RU": xD,
+ "sk-SK": SD,
+ "sl-SI": CD,
+ "sr-SP": wD,
+ "sv-SE": TD,
+ "tr-TR": ED,
+ "uk-UA": DD,
+ "zh-CN": OD,
+ "zh-TW": kD
};
// node_modules/react-aria/dist/private/overlays/DismissButton.mjs
-function Gae(e) {
+function $ae(e) {
return e && e.__esModule ? e.default : e;
}
-function wD(e) {
- let { onDismiss: t, ...n } = e, r = AS(n, HS(Gae(CD), "@react-aria/overlays").format("dismiss")), i = () => {
+function jD(e) {
+ let { onDismiss: t, ...n } = e, r = LS(n, YS($ae(AD), "@react-aria/overlays").format("dismiss")), i = () => {
t && t();
};
- return /*#__PURE__*/ P.createElement(Sw, null, /*#__PURE__*/ P.createElement("button", {
+ return /*#__PURE__*/ P.createElement(kw, null, /*#__PURE__*/ P.createElement("button", {
...r,
tabIndex: -1,
onClick: i,
@@ -26546,35 +26580,35 @@ function wD(e) {
}));
}
// node_modules/react-aria/dist/private/overlays/useOverlay.mjs
-var TD = [];
-function ED(e, t) {
+var MD = [];
+function ND(e, t) {
let { onClose: n, shouldCloseOnBlur: r, isOpen: i, isDismissable: a = !1, isKeyboardDismissDisabled: o = !1, shouldCloseOnInteractOutside: s } = e, c = (0, P.useRef)(void 0);
(0, P.useEffect)(() => {
- if (i && !TD.includes(t)) return TD.push(t), () => {
- let e = TD.indexOf(t);
- e >= 0 && TD.splice(e, 1);
+ if (i && !MD.includes(t)) return MD.push(t), () => {
+ let e = MD.indexOf(t);
+ e >= 0 && MD.splice(e, 1);
};
}, [i, t]);
let l = () => {
- TD[TD.length - 1] === t && n && n();
+ MD[MD.length - 1] === t && n && n();
}, u = (e) => {
- let n = TD[TD.length - 1];
+ let n = MD[MD.length - 1];
c.current = n, (!s || s(G(e))) && n === t && e.stopPropagation();
}, d = (e) => {
- (!s || s(G(e))) && (TD[TD.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
- }, { keyboardProps: f } = Xx({ shortcuts: { Escape: () => {
+ (!s || s(G(e))) && (MD[MD.length - 1] === t && e.stopPropagation(), c.current === t && l()), c.current = void 0;
+ }, { keyboardProps: f } = rS({ shortcuts: { Escape: () => {
if (!o) l();
else return !1;
} } });
- kae({
+ Lae({
ref: t,
onInteractOutside: a && i ? d : void 0,
onInteractOutsideStart: u
});
- let { focusWithinProps: p } = dw({
+ let { focusWithinProps: p } = vw({
isDisabled: !r,
onBlurWithin: (e) => {
- e.relatedTarget && !kC(e.relatedTarget) && (!s || s(e.relatedTarget)) && n?.();
+ e.relatedTarget && !IC(e.relatedTarget) && (!s || s(e.relatedTarget)) && n?.();
}
});
return {
@@ -26586,87 +26620,87 @@ function ED(e, t) {
};
}
// node_modules/react-aria/dist/private/utils/runAfterKeyboard.mjs
-var Kae = 200, qae = 50, Jae = 600, DD = /* @__PURE__ */ new WeakMap(), OD = /* @__PURE__ */ new Set(), kD = /* @__PURE__ */ new Set();
-function Yae(e, t) {
- let n = DS();
- if (e !== n || t.aborted) for (let e of kD) e(n), kD.delete(e);
- if (!e && n && Zb() && !t.aborted) window.clearInterval(DD.get(window)), DD.set(window, AD(Kae));
+var eoe = 200, toe = 50, noe = 600, PD = /* @__PURE__ */ new WeakMap(), FD = /* @__PURE__ */ new Set(), ID = /* @__PURE__ */ new Set();
+function roe(e, t) {
+ let n = PS();
+ if (e !== n || t.aborted) for (let e of ID) e(n), ID.delete(e);
+ if (!e && n && ix() && !t.aborted) window.clearInterval(PD.get(window)), PD.set(window, LD(eoe));
else {
- if (e !== n || t.aborted) for (let e of OD) e(n), OD.delete(e);
- (kD.size + OD.size <= 0 || t.aborted) && (window.clearInterval(DD.get(window)), DD.delete(window));
+ if (e !== n || t.aborted) for (let e of FD) e(n), FD.delete(e);
+ (ID.size + FD.size <= 0 || t.aborted) && (window.clearInterval(PD.get(window)), PD.delete(window));
}
}
-function AD(e = Jae) {
- return window.setInterval(Yae, qae, DS(), AbortSignal.timeout(e));
+function LD(e = noe) {
+ return window.setInterval(roe, toe, PS(), AbortSignal.timeout(e));
}
-function jD(e) {
- if (!wS()) return e(!1), () => {};
+function RD(e) {
+ if (!jS()) return e(!1), () => {};
let t = window.requestAnimationFrame(() => {
t = window.requestAnimationFrame(() => {
- let t = TS(document.hasFocus() ? Mb() : null);
- if (DS() === t || DS() && !t) return e(t);
- kD.add(e), DD.has(window) || DD.set(window, AD());
+ let t = MS(document.hasFocus() ? zb() : null);
+ if (PS() === t || PS() && !t) return e(t);
+ ID.add(e), PD.has(window) || PD.set(window, LD());
});
});
return () => {
- window.cancelAnimationFrame(t), kD.delete(e);
+ window.cancelAnimationFrame(t), ID.delete(e);
};
}
-function Xae(e) {
- if (!wS()) return e(!1), () => {};
+function ioe(e) {
+ if (!jS()) return e(!1), () => {};
let t = window.requestAnimationFrame(() => {
t = window.requestAnimationFrame(() => {
- let t = TS(document.hasFocus() ? Mb() : null);
- if (DS() === t) return e(t);
- OD.add(e), DD.has(window) || DD.set(window, AD());
+ let t = MS(document.hasFocus() ? zb() : null);
+ if (PS() === t) return e(t);
+ FD.add(e), PD.has(window) || PD.set(window, LD());
});
});
return () => {
- window.cancelAnimationFrame(t), OD.delete(e);
+ window.cancelAnimationFrame(t), FD.delete(e);
};
}
// node_modules/react-aria/dist/private/overlays/usePreventScroll.mjs
-var MD = typeof document < "u" && window.visualViewport, ND = 0, PD;
-function FD(e = {}) {
+var zD = typeof document < "u" && window.visualViewport, BD = 0, VD;
+function HD(e = {}) {
let { isDisabled: t, UNSTABLE_overrideFocus: n } = e;
- Bb(() => {
- if (!t) return ND++, ND === 1 && (PD = Xb() && Zb() ? Qae() : Zae(n)), () => {
- ND--, ND === 0 && PD();
+ qb(() => {
+ if (!t) return BD++, BD === 1 && (VD = rx() && ix() ? ooe() : aoe(n)), () => {
+ BD--, BD === 0 && VD();
};
}, [t, n]);
}
-function Zae(e) {
+function aoe(e) {
let t = window.innerWidth - document.documentElement.clientWidth;
- return Ix(t > 0 && ("scrollbarGutter" in document.documentElement.style ? kb(document.documentElement, "scrollbar-gutter", "stable") : kb(document.documentElement, "padding-right", `${t}px`)), kb(document.documentElement, "overflow", "hidden"), e && LD(), e && wS() && ID());
+ return Ux(t > 0 && ("scrollbarGutter" in document.documentElement.style ? Ib(document.documentElement, "scrollbar-gutter", "stable") : Ib(document.documentElement, "padding-right", `${t}px`)), Ib(document.documentElement, "overflow", "hidden"), e && WD(), e && jS() && UD());
}
-function Qae() {
- let e = kb(document.documentElement, "overflow", "hidden"), t, n = !1, r = (e) => {
+function ooe() {
+ let e = Ib(document.documentElement, "overflow", "hidden"), t, n = !1, r = (e) => {
let r = G(e);
- t = UC(r, !0) ? r : WC(r, !0), n = !1;
+ t = XC(r, !0) ? r : ZC(r, !0), n = !1;
let i = r.ownerDocument.defaultView.getSelection();
i && !i.isCollapsed && i.containsNode(r, !0) && (n = !0), e.composedPath().some((e) => e instanceof HTMLInputElement && e.type === "range") && (n = !0), "selectionStart" in r && "selectionEnd" in r && r.selectionStart < r.selectionEnd && r.ownerDocument.activeElement === r && (n = !0);
- }, i = document.createElement("style"), a = ZS();
+ }, i = document.createElement("style"), a = iC();
a && (i.nonce = a), i.textContent = "@layer {\n * {\n overscroll-behavior: contain;\n }\n}", document.head.prepend(i);
let o = (e) => {
e.touches.length === 2 || n || (!t || t === document.documentElement || t === document.body || t.scrollHeight === t.clientHeight && t.scrollWidth === t.clientWidth) && e.preventDefault();
- }, s = LD(), c = Ix(Ob(document, "touchstart", r, {
+ }, s = WD(), c = Ux(Fb(document, "touchstart", r, {
passive: !1,
capture: !0
- }), Ob(document, "touchmove", o, {
+ }), Fb(document, "touchmove", o, {
passive: !1,
capture: !0
- }), ID());
+ }), UD());
return () => {
e(), c(), i.remove(), s();
};
}
-function ID() {
- return Ob(document, "blur", (e) => {
+function UD() {
+ return Fb(document, "blur", (e) => {
let t = G(e), n = e.relatedTarget;
- n && TS(n) ? n.focus() : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
+ n && MS(n) ? n.focus() : n || (t.parentElement?.closest("[tabindex]"))?.focus({ preventScroll: !0 });
}, !0);
}
-function LD() {
+function WD() {
let e = HTMLElement.prototype.focus;
return Reflect.defineProperty(HTMLElement.prototype, "focus", {
configurable: !0,
@@ -26677,9 +26711,9 @@ function LD() {
preventScroll: !0
}), !t || !t.preventScroll) {
let e = () => {
- Mb() === this && $ae(this);
+ zb() === this && soe(this);
};
- jD((t) => t ? e() : Xae(() => e()));
+ RD((t) => t ? e() : ioe(() => e()));
}
}
}), () => {
@@ -26690,15 +26724,15 @@ function LD() {
});
};
}
-function $ae(e) {
+function soe(e) {
let t = document.scrollingElement || document.documentElement, n = e;
for (; n && n !== t && n.isConnected;) {
- let e = WC(n);
+ let e = ZC(n);
if (e !== document.documentElement && e !== document.body && e !== n) {
let t = e.getBoundingClientRect(), r = n.getBoundingClientRect();
if (r.top < t.top || r.bottom > t.top + n.clientHeight) {
let n = t.bottom;
- MD && (n = Math.min(n, MD.offsetTop + MD.height));
+ zD && (n = Math.min(n, zD.offsetTop + zD.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)),
@@ -26710,19 +26744,19 @@ function $ae(e) {
}
}
// node_modules/react-aria/dist/private/overlays/useModalOverlay.mjs
-function eoe(e, t, n) {
- let { overlayProps: r, underlayProps: i } = ED({
+function coe(e, t, n) {
+ let { overlayProps: r, underlayProps: i } = ND({
...e,
isOpen: t.isOpen,
onClose: t.close
}, n);
- FD({
+ HD({
isDisabled: !t.isOpen,
UNSTABLE_overrideFocus: e.UNSTABLE_overrideFocus
- }), zT();
+ }), KT();
let { isEntering: a } = e;
return (0, P.useEffect)(() => {
- if (t.isOpen && n.current) return a ? kw(n.current) : Ow([n.current], { shouldUseInert: !0 });
+ if (t.isOpen && n.current) return a ? Iw(n.current) : Fw([n.current], { shouldUseInert: !0 });
}, [
t.isOpen,
a,
@@ -26733,33 +26767,33 @@ function eoe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/overlays/calculatePosition.mjs
-var RD = {
+var GD = {
top: "top",
bottom: "top",
left: "left",
right: "left"
-}, zD = {
+}, KD = {
top: "bottom",
bottom: "top",
left: "right",
right: "left"
-}, toe = {
+}, loe = {
top: "left",
left: "top"
-}, BD = {
+}, qD = {
top: "height",
left: "width"
-}, VD = {
+}, JD = {
width: "totalWidth",
height: "totalHeight"
-}, HD = {}, noe = () => typeof document < "u" ? window.visualViewport : null;
-function UD(e, t) {
+}, YD = {}, uoe = () => typeof document < "u" ? window.visualViewport : null;
+function XD(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} = YD(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
- return Zb() && (e.tagName === "BODY" || e.tagName === "HTML") && l && (c.top = 0, c.left = 0, o = t?.pageTop ?? 0, s = t?.pageLeft ?? 0), {
+ } else ({width: n, height: r, top: o, left: s} = nO(e, !1)), c.top = e.scrollTop, c.left = e.scrollLeft, i = n, a = r;
+ return ix() && (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,
totalWidth: i,
@@ -26769,7 +26803,7 @@ function UD(e, t) {
left: s
};
}
-function roe(e) {
+function doe(e) {
return {
top: e.scrollTop,
left: e.scrollLeft,
@@ -26777,11 +26811,11 @@ function roe(e) {
height: e.scrollHeight
};
}
-function WD(e, t, n, r, i, a, o) {
- let s = i.scroll[e] ?? 0, c = r[BD[e]], l = o[e] + r.scroll[RD[e]] + a, u = o[e] + r.scroll[RD[e]] + c - a, d = t - s + r.scroll[RD[e]] + o[e] - r[RD[e]], f = t - s + n + r.scroll[RD[e]] + o[e] - r[RD[e]];
+function ZD(e, t, n, r, i, a, o) {
+ let s = i.scroll[e] ?? 0, c = r[qD[e]], l = o[e] + r.scroll[GD[e]] + a, u = o[e] + r.scroll[GD[e]] + c - a, d = t - s + r.scroll[GD[e]] + o[e] - r[GD[e]], f = t - s + n + r.scroll[GD[e]] + o[e] - r[GD[e]];
return d < l ? l - d : f > u ? Math.max(u - f, l - d) : 0;
}
-function ioe(e) {
+function foe(e) {
let t = window.getComputedStyle(e);
return {
top: parseInt(t.marginTop, 10) || 0,
@@ -26790,55 +26824,55 @@ function ioe(e) {
right: parseInt(t.marginRight, 10) || 0
};
}
-function GD(e) {
- if (HD[e]) return HD[e];
- let [t, n] = e.split(" "), r = RD[t] || "right", i = toe[r];
- RD[n] || (n = "center");
- let a = BD[r], o = BD[i];
- return HD[e] = {
+function QD(e) {
+ if (YD[e]) return YD[e];
+ let [t, n] = e.split(" "), r = GD[t] || "right", i = loe[r];
+ GD[n] || (n = "center");
+ let a = qD[r], o = qD[i];
+ return YD[e] = {
placement: t,
crossPlacement: n,
axis: r,
crossAxis: i,
size: a,
crossSize: o
- }, HD[e];
+ }, YD[e];
}
-function KD(e, t, n, r, i, a, o, s, c, l, u) {
+function $D(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] = mw(_[m], v, y), d === p) {
- let t = s ? u[h] : u[VD[h]];
- _[zD[p]] = Math.floor(t - e[p] + i);
+ if (_[m] = xw(_[m], v, y), d === p) {
+ let t = s ? u[h] : u[JD[h]];
+ _[KD[p]] = Math.floor(t - e[p] + i);
} else _[p] = Math.floor(e[p] + e[h] + i);
return _;
}
-function aoe(e, t, n, r, i, a, o, s, c, l, u) {
- let d = (e.top == null ? c[VD.height] - (e.bottom ?? 0) - o : e.top) - (c.scroll.top ?? 0), f = l ? n.top : 0, p = {
+function poe(e, t, n, r, i, a, o, s, c, l, u) {
+ let d = (e.top == null ? c[JD.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 qD(e, t, n, r, i, a, o, s) {
+function eO(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[zD[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[zD[l]] - i);
+ return c === l ? Math.max(0, n[l] - (o.scroll[l] ?? 0) - (e[l] + (s ? t[l] : 0)) - (r[l] ?? 0) - r[KD[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[KD[l]] - i);
}
-function ooe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
- let v = GD(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = KD(t, s, n, v, u, d, l, f, m, h, c), T = u, E = qD(s, l, t, i, a + u, v, c, g);
+function moe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
+ let v = QD(e), { size: y, crossAxis: b, crossSize: x, placement: S, crossPlacement: C } = v, w = $D(t, s, n, v, u, d, l, f, m, h, c), T = u, E = eO(s, l, t, i, a + u, v, c, g);
if (o && n[y] > E) {
- let e = GD(`${zD[S]} ${C}`), r = KD(t, s, n, e, u, d, l, f, m, h, c);
- qD(s, l, t, i, a + u, e, c, g) > E && (v = e, w = r, T = u);
+ let e = QD(`${KD[S]} ${C}`), r = $D(t, s, n, e, u, d, l, f, m, h, c);
+ eO(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 = WD(b, w[b], n[x], s, c, a, l);
+ let O = ZD(b, w[b], n[x], s, c, a, l);
w[b] += O;
- let k = aoe(w, s, l, f, i, a, n.height, D, c, g, _);
- p && p < k && (k = p), n.height = Math.min(n.height, k), w = KD(t, s, n, v, T, d, l, f, m, h, c), O = WD(b, w[b], n[x], s, c, a, l), w[b] += O;
- let A = {}, j = t[b] - w[b] - i[RD[b]], M = j + .5 * t[x], ee = m / 2 + h, te = RD[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), ne = n[x] - te - m / 2 - h;
- A[b] = mw(mw(M, t[b] + m / 2 - (w[b] + i[RD[b]]), t[b] + t[x] - m / 2 - (w[b] + i[RD[b]])), ee, ne), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
+ let k = poe(w, s, l, f, i, a, n.height, D, c, g, _);
+ p && p < k && (k = p), n.height = Math.min(n.height, k), w = $D(t, s, n, v, T, d, l, f, m, h, c), O = ZD(b, w[b], n[x], s, c, a, l), w[b] += O;
+ let A = {}, j = t[b] - w[b] - i[GD[b]], M = j + .5 * t[x], ee = m / 2 + h, te = GD[b] === "left" ? (i.left ?? 0) + (i.right ?? 0) : (i.top ?? 0) + (i.bottom ?? 0), ne = n[x] - te - m / 2 - h;
+ A[b] = xw(xw(M, t[b] + m / 2 - (w[b] + i[GD[b]]), t[b] + t[x] - m / 2 - (w[b] + i[GD[b]])), ee, ne), {placement: S, crossPlacement: C} = v, m ? j = A[b] : C === "right" ? j += t[x] : C === "center" && (j += t[x] / 2);
let N = S === "left" || S === "top" ? n[y] : 0, re = {
x: S === "top" || S === "bottom" ? j : N,
y: S === "left" || S === "right" ? j : N
@@ -26852,17 +26886,17 @@ function ooe(e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _) {
triggerAnchorPoint: re
};
}
-function soe(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 = noe(), h = r instanceof HTMLElement ? coe(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? YD(n, !1, p) : XD(n, h, !1, p);
+function hoe(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 = uoe(), h = r instanceof HTMLElement ? goe(r) : document.documentElement, g = h === document.documentElement, _ = window.getComputedStyle(h).position, v = !!_ && _ !== "static", y = g ? nO(n, !1, p) : rO(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 = YD(r, !0), x = ioe(r);
+ let b = nO(r, !0), x = foe(r);
b.width += (x.left ?? 0) + (x.right ?? 0), b.height += (x.top ?? 0) + (x.bottom ?? 0);
- let S = roe(i), C = UD(s, m), w = UD(h, m), T;
+ let S = doe(i), C = XD(s, m), w = XD(h, m), T;
if ((s.tagName === "BODY" || s.tagName === "HTML") && !g) {
- let e = JD(h, !1);
+ let e = tO(h, !1);
T = {
top: -(e.top - C.top),
left: -(e.left - C.left),
@@ -26874,11 +26908,11 @@ function soe(e) {
left: 0,
width: 0,
height: 0
- } : XD(s, h, !1);
- let E = jb(s, h);
- return ooe(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
+ } : rO(s, h, !1);
+ let E = Rb(s, h);
+ return moe(t, y, b, S, x, a, o, C, w, T, c, l, v, u, d, f, E, m);
}
-function JD(e, t) {
+function tO(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,
@@ -26887,8 +26921,8 @@ function JD(e, t) {
height: a
};
}
-function YD(e, t, n) {
- let { top: r, left: i, width: a, height: o } = n || JD(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
+function nO(e, t, n) {
+ let { top: r, left: i, width: a, height: o } = n || tO(e, t), { scrollTop: s, scrollLeft: c, clientTop: l, clientLeft: u } = document.documentElement;
return {
top: r + s - l,
left: i + c - u,
@@ -26896,29 +26930,29 @@ function YD(e, t, n) {
height: o
};
}
-function XD(e, t, n, r) {
+function rO(e, t, n, r) {
let i = window.getComputedStyle(e), a;
- if (i.position === "fixed") a = r || JD(e, n);
+ if (i.position === "fixed") a = r || tO(e, n);
else {
- a = YD(e, n, r);
- let i = YD(t, n), o = window.getComputedStyle(t);
+ a = nO(e, n, r);
+ let i = nO(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 coe(e) {
+function goe(e) {
let t = e.offsetParent;
- if (t && t === document.body && window.getComputedStyle(t).position === "static" && !ZD(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !ZD(t);) t = t.parentElement;
+ if (t && t === document.body && window.getComputedStyle(t).position === "static" && !iO(t) && (t = document.documentElement), t == null) for (t = e.parentElement; t && !iO(t);) t = t.parentElement;
return t || document.documentElement;
}
-function ZD(e) {
+function iO(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";
}
// node_modules/react-aria/dist/private/overlays/useOverlayPosition.mjs
-var QD = typeof document < "u" ? window.visualViewport : null;
-function loe(e) {
- let { direction: t } = IS(), { 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, P.useState)(null), x = [
+var aO = typeof document < "u" ? window.visualViewport : null;
+function _oe(e) {
+ let { direction: t } = US(), { 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, P.useState)(null), x = [
p,
s,
i.current,
@@ -26935,15 +26969,15 @@ function loe(e) {
g,
_,
n
- ], S = (0, P.useRef)(QD?.scale);
+ ], S = (0, P.useRef)(aO?.scale);
(0, P.useEffect)(() => {
- m && (S.current = QD?.scale);
+ m && (S.current = aO?.scale);
}, [m]);
let C = (0, P.useCallback)(() => {
- if (p === !1 || !m || !i.current || !r.current || !u || QD?.scale !== S.current) return;
+ if (p === !1 || !m || !i.current || !r.current || !u || aO?.scale !== S.current) return;
let e = null;
- if (o.current && Pb(o.current)) {
- let t = Mb()?.getBoundingClientRect(), n = o.current.getBoundingClientRect();
+ if (o.current && Vb(o.current)) {
+ let t = zb()?.getBoundingClientRect(), n = o.current.getBoundingClientRect();
e = {
type: "top",
offset: (t?.top ?? 0) - n.top
@@ -26951,8 +26985,8 @@ function loe(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 = soe({
- placement: doe(s, t),
+ let y = hoe({
+ placement: yoe(s, t),
overlayNode: i.current,
targetNode: r.current,
scrollNode: o.current || i.current,
@@ -26962,28 +26996,28 @@ function loe(e) {
offset: d,
crossOffset: f,
maxHeight: g,
- arrowSize: n ?? (a?.current ? JD(a.current, !0).width : 0),
+ arrowSize: n ?? (a?.current ? tO(a.current, !0).width : 0),
arrowBoundaryOffset: _,
targetRect: v?.(r.current)
});
if (!y.position) return;
h.style.top = "", h.style.bottom = "", h.style.left = "", h.style.right = "", Object.keys(y.position).forEach((e) => h.style[e] = y.position[e] + "px"), h.style.maxHeight = y.maxHeight == null ? "" : y.maxHeight + "px";
- let x = Mb();
+ let x = zb();
if (e && x && o.current) {
let t = x.getBoundingClientRect(), n = o.current.getBoundingClientRect(), r = t[e.type] - n[e.type];
o.current.scrollTop += r - e.offset;
}
b(y);
}, x);
- Bb(C, x), uoe(C), HE({
+ qb(C, x), voe(C), YE({
ref: i,
onResize: C
- }), HE({
+ }), YE({
ref: r,
onResize: C
});
let w = (0, P.useRef)(!1);
- Bb(() => {
+ qb(() => {
let e, t = () => {
w.current = !0, clearTimeout(e), e = setTimeout(() => {
w.current = !1;
@@ -26991,16 +27025,16 @@ function loe(e) {
}, n = () => {
w.current && t();
};
- QD?.addEventListener("resize", t), QD?.addEventListener("scroll", n);
- let r = Ob(Nb(window), "scroll", n);
+ aO?.addEventListener("resize", t), aO?.addEventListener("scroll", n);
+ let r = Fb(Bb(window), "scroll", n);
return () => {
- QD?.removeEventListener("resize", t), QD?.removeEventListener("scroll", n), r();
+ aO?.removeEventListener("resize", t), aO?.removeEventListener("scroll", n), r();
};
}, [C]);
let T = (0, P.useCallback)(() => {
w.current || h?.();
}, [h, w]);
- return yae({
+ return Dae({
triggerRef: r,
isOpen: m,
onClose: h && T
@@ -27026,24 +27060,24 @@ function loe(e) {
updatePosition: C
};
}
-function uoe(e) {
- Bb(() => (window.addEventListener("resize", e, !1), () => {
+function voe(e) {
+ qb(() => (window.addEventListener("resize", e, !1), () => {
window.removeEventListener("resize", e, !1);
}), [e]);
}
-function doe(e, t) {
+function yoe(e, t) {
return t === "rtl" ? e.replace("start", "right").replace("end", "left") : e.replace("start", "left").replace("end", "right");
}
// node_modules/react-aria/dist/private/overlays/usePopover.mjs
-function foe(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 } = ED({
+function boe(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 } = ND({
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 } = loe({
+ }, i ?? r), { overlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = _oe({
...c,
targetRef: n,
overlayRef: r,
@@ -27051,15 +27085,15 @@ function foe(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)
});
- FD({ isDisabled: a || !t.isOpen }), (0, P.useEffect)(() => {
- if (t.isOpen && r.current) return a ? kw(i?.current ?? r.current) : Ow([i?.current ?? r.current], { shouldUseInert: !0 });
+ HD({ isDisabled: a || !t.isOpen }), (0, P.useEffect)(() => {
+ if (t.isOpen && r.current) return a ? Iw(i?.current ?? r.current) : Fw([i?.current ?? r.current], { shouldUseInert: !0 });
}, [
a,
t.isOpen,
r,
i
]);
- let { focusWithinProps: g } = dw(e);
+ let { focusWithinProps: g } = vw(e);
return {
popoverProps: K(u, f, g),
arrowProps: p,
@@ -27069,12 +27103,12 @@ function foe(e, t) {
};
}
// node_modules/react-aria/dist/private/radio/utils.mjs
-var $D = /* @__PURE__ */ new WeakMap();
+var oO = /* @__PURE__ */ new WeakMap();
// node_modules/react-aria/dist/private/radio/useRadio.mjs
-function poe(e, t, n) {
+function xoe(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: _ } = aC({
+ }, { pressProps: g, isPressed: _ } = fC({
onPressStart: s,
onPressEnd: c,
onPressChange: l,
@@ -27082,7 +27116,7 @@ function poe(e, t, n) {
onPressUp: d,
onClick: f,
isDisabled: p
- }), { pressProps: v, isPressed: y } = aC({
+ }), { pressProps: v, isPressed: y } = fC({
onPressStart: s,
onPressEnd: c,
onPressChange: l,
@@ -27092,11 +27126,11 @@ function poe(e, t, n) {
onPress(e) {
u?.(e), t.setSelectedValue(r), n.current?.focus();
}
- }), { focusableProps: b } = eS(K(e, { onFocus: () => t.setLastFocusedValue(r) }), n), x = K(g, b), S = WS(e, { labelable: !0 }), C = -1;
+ }), { focusableProps: b } = sS(K(e, { onFocus: () => t.setLastFocusedValue(r) }), n), x = K(g, b), S = ZS(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 } = $D.get(t);
- XC(n, t.defaultSelectedValue, t.setSelectedValue), ZC({ validationBehavior: O }, t, n);
- let k = QC();
+ let { name: w, form: T, descriptionId: E, errorMessageId: D, validationBehavior: O } = oO.get(t);
+ rw(n, t.defaultSelectedValue, t.setSelectedValue), iw({ validationBehavior: O }, t, n);
+ let k = aw();
return {
labelProps: K(v, (0, P.useMemo)(() => ({
onClick: (e) => e.preventDefault(),
@@ -27127,13 +27161,13 @@ function poe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/radio/useRadioGroup.mjs
-function moe(e, t) {
- let { name: n, form: r, isReadOnly: i, isRequired: a, isDisabled: o, orientation: s = "vertical", validationBehavior: c = "aria" } = e, { direction: l } = IS(), { isInvalid: u, validationErrors: d, validationDetails: f } = t.displayValidation, { labelProps: p, fieldProps: m, descriptionProps: h, errorMessageProps: g } = uw({
+function Soe(e, t) {
+ let { name: n, form: r, isReadOnly: i, isRequired: a, isDisabled: o, orientation: s = "vertical", validationBehavior: c = "aria" } = e, { direction: l } = US(), { isInvalid: u, validationErrors: d, validationDetails: f } = t.displayValidation, { labelProps: p, fieldProps: m, descriptionProps: h, errorMessageProps: g } = _w({
...e,
labelElementType: "span",
isInvalid: t.isInvalid,
errorMessage: e.errorMessage || d
- }), _ = WS(e, { labelable: !0 }), { focusWithinProps: v } = dw({
+ }), _ = ZS(e, { labelable: !0 }), { focusWithinProps: v } = vw({
onBlurWithin(n) {
e.onBlur?.(n), t.selectedValue || t.setLastFocusedValue(null);
},
@@ -27141,13 +27175,13 @@ function moe(e, t) {
onFocusWithinChange: e.onFocusChange
});
function y(e, n) {
- let r = IC(n.currentTarget, {
+ let r = UC(n.currentTarget, {
from: G(n),
- accept: (e) => e instanceof Tb(e).HTMLInputElement && e.type === "radio"
+ accept: (e) => e instanceof Mb(e).HTMLInputElement && e.type === "radio"
}), i;
return e === "next" ? (i = r.nextNode(), i ||= (r.currentNode = n.currentTarget, r.firstChild())) : (i = r.previousNode(), i ||= (r.currentNode = n.currentTarget, r.lastChild())), i ? (i.focus(), t.setSelectedValue(i.value), !0) : !1;
}
- let { keyboardProps: b } = Xx({
+ let { keyboardProps: b } = rS({
shortcuts: {
ArrowRight: (e) => y(l === "rtl" && s !== "vertical" ? "prev" : "next", e),
ArrowLeft: (e) => y(l === "rtl" && s !== "vertical" ? "next" : "prev", e),
@@ -27155,8 +27189,8 @@ function moe(e, t) {
ArrowUp: (e) => y("prev", e)
},
allowRepeats: !0
- }), x = Bx(n);
- return $D.set(t, {
+ }), x = qx(n);
+ return oO.set(t, {
name: x,
form: r,
descriptionId: h.id,
@@ -27184,21 +27218,21 @@ function moe(e, t) {
};
}
// node_modules/react-aria/dist/private/select/useSelect.mjs
-var eO = /* @__PURE__ */ new WeakMap();
-function hoe(e, t, n) {
- let { keyboardDelegate: r, isDisabled: i, isRequired: a, name: o, form: s, validationBehavior: c = "aria" } = e, l = NT({
+var sO = /* @__PURE__ */ new WeakMap();
+function Coe(e, t, n) {
+ let { keyboardDelegate: r, isDisabled: i, isRequired: a, name: o, form: s, validationBehavior: c = "aria" } = e, l = BT({
usage: "search",
sensitivity: "base"
- }), u = (0, P.useMemo)(() => r || new Fw(t.collection, t.disabledKeys, n, l), [
+ }), u = (0, P.useMemo)(() => r || new Hw(t.collection, t.disabledKeys, n, l), [
r,
t.collection,
t.disabledKeys,
l,
n
- ]), { menuTriggerProps: d, menuProps: f } = yT({
+ ]), { menuTriggerProps: d, menuProps: f } = ET({
isDisabled: i,
type: "listbox"
- }, t, n), { keyboardProps: p } = Xx({
+ }, t, n), { keyboardProps: p } = rS({
shortcuts: {
ArrowLeft: () => {
if (t.selectionManager.selectionMode === "multiple") return !1;
@@ -27214,21 +27248,21 @@ function hoe(e, t, n) {
allowRepeats: !0,
onKeyDown: e.onKeyDown,
onKeyUp: e.onKeyUp
- }), { typeSelectProps: m } = xT({
+ }), { typeSelectProps: m } = OT({
keyboardDelegate: u,
selectionManager: t.selectionManager,
onTypeSelect(e) {
t.setSelectedKey(e);
}
- }), { isInvalid: h, validationErrors: g, validationDetails: _ } = t.displayValidation, { labelProps: v, fieldProps: y, descriptionProps: b, errorMessageProps: x } = uw({
+ }), { isInvalid: h, validationErrors: g, validationDetails: _ } = t.displayValidation, { labelProps: v, fieldProps: y, descriptionProps: b, errorMessageProps: x } = _w({
...e,
labelElementType: "span",
isInvalid: h,
errorMessage: e.errorMessage || g
});
t.selectionManager.selectionMode === "multiple" && (m = {});
- let S = WS(e, { labelable: !0 }), C = K(m, d, y), w = Bx();
- return eO.set(t, {
+ let S = ZS(e, { labelable: !0 }), C = K(m, d, y), w = qx();
+ return sO.set(t, {
isDisabled: i,
isRequired: a,
name: o,
@@ -27238,13 +27272,13 @@ function hoe(e, t, n) {
labelProps: {
...v,
onClick: () => {
- e.isDisabled || (n.current?.focus(), Tx("keyboard"));
+ e.isDisabled || (n.current?.focus(), Mx("keyboard"));
}
},
triggerProps: K(S, {
...C,
isDisabled: i,
- onKeyDown: Ix(C.onKeyDown, p.onKeyDown),
+ onKeyDown: Ux(C.onKeyDown, p.onKeyDown),
onKeyUp: p.onKeyUp,
"aria-labelledby": [
w,
@@ -27268,7 +27302,7 @@ function hoe(e, t, n) {
disallowEmptySelection: !0,
linkBehavior: "selection",
onBlur: (n) => {
- jb(n.currentTarget, n.relatedTarget) || (e.onBlur && e.onBlur(n), e.onFocusChange && e.onFocusChange(!1), t.setFocused(!1));
+ Rb(n.currentTarget, n.relatedTarget) || (e.onBlur && e.onBlur(n), e.onFocusChange && e.onFocusChange(!1), t.setFocused(!1));
},
"aria-labelledby": [y["aria-labelledby"], C["aria-label"] && !y["aria-labelledby"] ? C.id : null].filter(Boolean).join(" ")
},
@@ -27288,13 +27322,13 @@ function hoe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/select/HiddenSelect.mjs
-function goe(e, t, n) {
- let r = eO.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = xw({ style: {
+function woe(e, t, n) {
+ let r = sO.get(t) || {}, { autoComplete: i, name: a = r.name, form: o = r.form, isDisabled: s = r.isDisabled } = e, { validationBehavior: c, isRequired: l } = r, { visuallyHiddenProps: u } = Ow({ style: {
position: "fixed",
top: 0,
left: 0
} });
- XC(e.selectRef, t.defaultValue, t.setValue), ZC({
+ rw(e.selectRef, t.defaultValue, t.setValue), iw({
validationBehavior: c,
focus: () => n.current?.focus()
}, t, e.selectRef);
@@ -27324,8 +27358,8 @@ function goe(e, t, n) {
}
};
}
-function _oe(e) {
- let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, P.useRef)(null), c = (0, P.useRef)(null), { containerProps: l, selectProps: u } = goe({
+function Toe(e) {
+ let { state: t, triggerRef: n, label: r, name: i, form: a, isDisabled: o } = e, s = (0, P.useRef)(null), c = (0, P.useRef)(null), { containerProps: l, selectProps: u } = woe({
...e,
selectRef: t.collection.size <= 300 ? s : c
}, t, n), d = Array.isArray(t.value) ? t.value : [t.value];
@@ -27349,7 +27383,7 @@ function _oe(e) {
value: e ?? ""
})))));
if (i) {
- let { validationBehavior: e } = eO.get(t) || {};
+ let { validationBehavior: e } = sO.get(t) || {};
d.length === 0 && (d = [null]);
let n = d.map((t, n) => {
let r = {
@@ -27379,8 +27413,8 @@ function _oe(e) {
return null;
}
// node_modules/react-aria/dist/private/separator/useSeparator.mjs
-function voe(e) {
- let t = WS(e, { labelable: !0 }), n;
+function Eoe(e) {
+ let t = ZS(e, { labelable: !0 }), n;
return e.orientation === "vertical" && (n = "vertical"), e.elementType === "hr" ? { separatorProps: t } : { separatorProps: {
...t,
role: "separator",
@@ -27388,8 +27422,8 @@ function voe(e) {
} };
}
// node_modules/react-aria/dist/private/switch/useSwitch.mjs
-function yoe(e, t, n) {
- let { labelProps: r, inputProps: i, isSelected: a, ...o } = sw(e, t, n);
+function Doe(e, t, n) {
+ let { labelProps: r, inputProps: i, isSelected: a, ...o } = mw(e, t, n);
return {
labelProps: r,
inputProps: {
@@ -27402,10 +27436,10 @@ function yoe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/grid/GridKeyboardDelegate.mjs
-var tO = class {
+var cO = 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 boe(e.layout) : new Pw(e.ref)), this.focusMode = e.focusMode ?? "row";
+ this.layoutDelegate = e.layoutDelegate || (e.layout ? new Ooe(e.layout) : new Vw(e.ref)), this.focusMode = e.focusMode ?? "row";
}
isCell(e) {
return e.type === "cell";
@@ -27441,7 +27475,7 @@ var tO = class {
let n = this.collection.getItem(e);
if (!n) return null;
let r = 0;
- for (let e of wT(n, this.collection)) {
+ for (let e of jT(n, this.collection)) {
if (e.colSpan && e.colSpan + r > t || (e.colSpan && (r = r + e.colSpan - 1), r === t)) return e.key ?? null;
r++;
}
@@ -27475,13 +27509,13 @@ var tO = class {
let t = this.collection.getItem(e);
if (!t) return null;
if (this.isRow(t)) {
- let e = wT(t, this.collection);
- return (this.direction === "rtl" ? DT(e)?.key : TT(e)?.key) ?? null;
+ let e = jT(t, this.collection);
+ return (this.direction === "rtl" ? PT(e)?.key : MT(e)?.key) ?? null;
}
if (this.isCell(t) && t.parentKey != null) {
let n = this.collection.getItem(t.parentKey);
if (!n) return null;
- let r = wT(n, this.collection), i = (this.direction === "rtl" ? ET(r, t.index - 1) : ET(r, t.index + 1)) ?? null;
+ let r = jT(n, this.collection), i = (this.direction === "rtl" ? NT(r, t.index - 1) : NT(r, t.index + 1)) ?? null;
return i ? i.key ?? null : this.focusMode === "row" ? t.parentKey ?? null : (this.direction === "rtl" ? this.getFirstKey(e) : this.getLastKey(e)) ?? null;
}
return null;
@@ -27490,13 +27524,13 @@ var tO = class {
let t = this.collection.getItem(e);
if (!t) return null;
if (this.isRow(t)) {
- let e = wT(t, this.collection);
- return (this.direction === "rtl" ? TT(e)?.key : DT(e)?.key) ?? null;
+ let e = jT(t, this.collection);
+ return (this.direction === "rtl" ? MT(e)?.key : PT(e)?.key) ?? null;
}
if (this.isCell(t) && t.parentKey != null) {
let n = this.collection.getItem(t.parentKey);
if (!n) return null;
- let r = wT(n, this.collection), i = (this.direction === "rtl" ? ET(r, t.index + 1) : ET(r, t.index - 1)) ?? null;
+ let r = jT(n, this.collection), i = (this.direction === "rtl" ? NT(r, t.index + 1) : NT(r, t.index - 1)) ?? null;
return i ? i.key ?? null : this.focusMode === "row" ? t.parentKey ?? null : (this.direction === "rtl" ? this.getLastKey(e) : this.getFirstKey(e)) ?? null;
}
return null;
@@ -27507,13 +27541,13 @@ var tO = class {
if (r = this.collection.getItem(n), !r) return null;
if (this.isCell(r) && !t && r.parentKey != null) {
let e = this.collection.getItem(r.parentKey);
- return e ? TT(wT(e, this.collection))?.key ?? null : null;
+ return e ? MT(jT(e, this.collection))?.key ?? null : null;
}
}
if (n = this.findNextKey(void 0, (e) => e.type === "item"), n != null && (r && this.isCell(r) && t || this.focusMode === "cell")) {
let e = this.collection.getItem(n);
if (!e) return null;
- n = TT(wT(e, this.collection))?.key ?? null;
+ n = MT(jT(e, this.collection))?.key ?? null;
}
return n;
}
@@ -27523,13 +27557,13 @@ var tO = class {
if (r = this.collection.getItem(n), !r) return null;
if (this.isCell(r) && !t && r.parentKey != null) {
let e = this.collection.getItem(r.parentKey);
- return e ? DT(wT(e, this.collection))?.key ?? null : null;
+ return e ? PT(jT(e, this.collection))?.key ?? null : null;
}
}
if (n = this.findPreviousKey(void 0, (e) => e.type === "item"), n != null && (r && this.isCell(r) && t || this.focusMode === "cell")) {
let e = this.collection.getItem(n);
if (!e) return null;
- n = DT(wT(e, this.collection))?.key ?? null;
+ n = PT(jT(e, this.collection))?.key ?? null;
}
return n;
}
@@ -27565,13 +27599,13 @@ var tO = class {
if (!t) return null;
if (t.textValue) {
let n = t.textValue.slice(0, e.length);
- if (this.collator.compare(n, e) === 0) return this.isRow(t) && this.focusMode === "cell" ? TT(wT(t, this.collection))?.key ?? null : t.key;
+ if (this.collator.compare(n, e) === 0) return this.isRow(t) && this.focusMode === "cell" ? MT(jT(t, this.collection))?.key ?? null : t.key;
}
n = this.findNextKey(n, (e) => e.type === "item"), n == null && !a && (n = this.getFirstKey(), a = !0);
}
return null;
}
-}, boe = class {
+}, Ooe = class {
constructor(e) {
this.layout = e;
}
@@ -27584,15 +27618,15 @@ var tO = class {
getVisibleRect() {
return this.layout.virtualizer.visibleRect;
}
-}, nO = /* @__PURE__ */ new WeakMap();
+}, lO = /* @__PURE__ */ new WeakMap();
// node_modules/react-aria/dist/private/grid/useGrid.mjs
-function xoe(e, t, n) {
+function koe(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 = NT({
+ let h = BT({
usage: "search",
sensitivity: "base"
- }), { direction: g } = IS(), _ = t.selectionManager.disabledBehavior, v = (0, P.useMemo)(() => a || new tO({
+ }), { direction: g } = US(), _ = t.selectionManager.disabledBehavior, v = (0, P.useMemo)(() => a || new cO({
collection: t.collection,
disabledKeys: t.disabledKeys,
disabledBehavior: _,
@@ -27609,7 +27643,7 @@ function xoe(e, t, n) {
g,
h,
o
- ]), { collectionProps: y } = CT({
+ ]), { collectionProps: y } = AT({
ref: n,
selectionManager: m,
keyboardDelegate: v,
@@ -27617,8 +27651,8 @@ function xoe(e, t, n) {
scrollRef: s,
disallowTypeAhead: i,
escapeKeyBehavior: d
- }), b = Bx(e.id);
- nO.set(t, {
+ }), b = qx(e.id);
+ lO.set(t, {
keyboardDelegate: v,
actions: {
onRowAction: l,
@@ -27627,42 +27661,42 @@ function xoe(e, t, n) {
shouldSelectOnPressUp: f,
keyboardNavigationBehavior: p
});
- let x = ME({
+ let x = zE({
selectionManager: m,
hasItemActions: !!(l || u)
- }), S = WS(e, { labelable: !0 }), C = (0, P.useCallback)((e) => {
- m.isFocused ? jb(e.currentTarget, G(e)) || m.setFocused(!1) : jb(e.currentTarget, G(e)) && m.setFocused(!0);
+ }), S = ZS(e, { labelable: !0 }), C = (0, P.useCallback)((e) => {
+ m.isFocused ? Rb(e.currentTarget, G(e)) || m.setFocused(!1) : Rb(e.currentTarget, G(e)) && m.setFocused(!0);
}, [m]), w = (0, P.useMemo)(() => ({
onBlur: y.onBlur,
onFocus: C
- }), [C, y.onBlur]), T = jE(n, { isDisabled: t.collection.size !== 0 }), E = K(S, {
+ }), [C, y.onBlur]), T = RE(n, { isDisabled: t.collection.size !== 0 }), E = K(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), kE({ getRowText: c }, t), { gridProps: E };
+ return r && (E["aria-rowcount"] = t.collection.size, E["aria-colcount"] = t.collection.columnCount), IE({ getRowText: c }, t), { gridProps: E };
}
// node_modules/react-aria/dist/private/table/utils.mjs
-var rO = /* @__PURE__ */ new WeakMap();
-function iO(e) {
+var uO = /* @__PURE__ */ new WeakMap();
+function dO(e) {
return typeof e == "string" ? e.replace(/\s*/g, "") : "" + e;
}
-function aO(e, t) {
- let n = rO.get(e);
+function fO(e, t) {
+ let n = uO.get(e);
if (!n) throw Error("Unknown grid");
- return `${n}-${iO(t)}`;
+ return `${n}-${dO(t)}`;
}
-function oO(e, t, n) {
- let r = rO.get(e);
+function pO(e, t, n) {
+ let r = uO.get(e);
if (!r) throw Error("Unknown grid");
- return `${r}-${iO(t)}-${iO(n)}`;
+ return `${r}-${dO(t)}-${dO(n)}`;
}
-function sO(e, t) {
- return [...e.collection.rowHeaderColumnKeys].map((n) => oO(e, t, n)).join(" ");
+function mO(e, t) {
+ return [...e.collection.rowHeaderColumnKeys].map((n) => pO(e, t, n)).join(" ");
}
// node_modules/react-aria/dist/private/intl/table/ar-AE.mjs
-var cO = {};
-cO = {
+var hO = {};
+hO = {
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: "طي",
@@ -27676,8 +27710,8 @@ cO = {
sortable: "عمود قابل للترتيب"
};
// node_modules/react-aria/dist/private/intl/table/bg-BG.mjs
-var lO = {};
-lO = {
+var gO = {};
+gO = {
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: "Свиване",
@@ -27691,8 +27725,8 @@ lO = {
sortable: "сортираща колона"
};
// node_modules/react-aria/dist/private/intl/table/cs-CZ.mjs
-var uO = {};
-uO = {
+var _O = {};
+_O = {
ascending: "vzestupně",
ascendingSort: (e) => `\u{159}azeno vzestupn\u{11B} podle sloupce ${e.columnName}`,
collapse: "Sbalit",
@@ -27706,8 +27740,8 @@ uO = {
sortable: "sloupec s možností řazení"
};
// node_modules/react-aria/dist/private/intl/table/da-DK.mjs
-var dO = {};
-dO = {
+var vO = {};
+vO = {
ascending: "stigende",
ascendingSort: (e) => `sorteret efter kolonne ${e.columnName} i stigende r\xe6kkef\xf8lge`,
collapse: "Skjul",
@@ -27721,8 +27755,8 @@ dO = {
sortable: "sorterbar kolonne"
};
// node_modules/react-aria/dist/private/intl/table/de-DE.mjs
-var fO = {};
-fO = {
+var yO = {};
+yO = {
ascending: "aufsteigend",
ascendingSort: (e) => `sortiert nach Spalte ${e.columnName} in aufsteigender Reihenfolge`,
collapse: "Reduzieren",
@@ -27736,8 +27770,8 @@ fO = {
sortable: "sortierbare Spalte"
};
// node_modules/react-aria/dist/private/intl/table/el-GR.mjs
-var pO = {};
-pO = {
+var bO = {};
+bO = {
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: "Σύμπτυξη",
@@ -27751,8 +27785,8 @@ pO = {
sortable: "Στήλη διαλογής"
};
// node_modules/react-aria/dist/private/intl/table/en-US.mjs
-var mO = {};
-mO = {
+var xO = {};
+xO = {
select: "Select",
selectAll: "Select All",
sortable: "sortable column",
@@ -27766,8 +27800,8 @@ mO = {
collapse: "Collapse"
};
// node_modules/react-aria/dist/private/intl/table/es-ES.mjs
-var hO = {};
-hO = {
+var SO = {};
+SO = {
ascending: "ascendente",
ascendingSort: (e) => `ordenado por columna ${e.columnName} en sentido ascendente`,
collapse: "Contraer",
@@ -27781,8 +27815,8 @@ hO = {
sortable: "columna ordenable"
};
// node_modules/react-aria/dist/private/intl/table/et-EE.mjs
-var gO = {};
-gO = {
+var CO = {};
+CO = {
ascending: "tõusev järjestus",
ascendingSort: (e) => `sorditud veeru j\xe4rgi ${e.columnName} t\xf5usvas j\xe4rjestuses`,
collapse: "Ahenda",
@@ -27796,8 +27830,8 @@ gO = {
sortable: "sorditav veerg"
};
// node_modules/react-aria/dist/private/intl/table/fi-FI.mjs
-var _O = {};
-_O = {
+var wO = {};
+wO = {
ascending: "nouseva",
ascendingSort: (e) => `lajiteltu sarakkeen ${e.columnName} mukaan nousevassa j\xe4rjestyksess\xe4`,
collapse: "Pienennä",
@@ -27811,8 +27845,8 @@ _O = {
sortable: "lajiteltava sarake"
};
// node_modules/react-aria/dist/private/intl/table/fr-FR.mjs
-var vO = {};
-vO = {
+var TO = {};
+TO = {
ascending: "croissant",
ascendingSort: (e) => `tri\xe9 en fonction de la colonne\xa0${e.columnName} par ordre croissant`,
collapse: "Réduire",
@@ -27826,8 +27860,8 @@ vO = {
sortable: "colonne triable"
};
// node_modules/react-aria/dist/private/intl/table/he-IL.mjs
-var yO = {};
-yO = {
+var EO = {};
+EO = {
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: "כווץ",
@@ -27841,8 +27875,8 @@ yO = {
sortable: "עמודה שניתן למיין"
};
// node_modules/react-aria/dist/private/intl/table/hr-HR.mjs
-var bO = {};
-bO = {
+var DO = {};
+DO = {
ascending: "rastući",
ascendingSort: (e) => `razvrstano po stupcima ${e.columnName} rastu\u{107}em redoslijedom`,
collapse: "Sažmi",
@@ -27856,8 +27890,8 @@ bO = {
sortable: "stupac koji se može razvrstati"
};
// node_modules/react-aria/dist/private/intl/table/hu-HU.mjs
-var xO = {};
-xO = {
+var OO = {};
+OO = {
ascending: "növekvő",
ascendingSort: (e) => `rendezve a(z) ${e.columnName} oszlop szerint, n\xf6vekv\u{151} sorrendben`,
collapse: "Összecsukás",
@@ -27871,8 +27905,8 @@ xO = {
sortable: "rendezendő oszlop"
};
// node_modules/react-aria/dist/private/intl/table/it-IT.mjs
-var SO = {};
-SO = {
+var kO = {};
+kO = {
ascending: "crescente",
ascendingSort: (e) => `in ordine crescente in base alla colonna ${e.columnName}`,
collapse: "Comprimi",
@@ -27886,8 +27920,8 @@ SO = {
sortable: "colonna ordinabile"
};
// node_modules/react-aria/dist/private/intl/table/ja-JP.mjs
-var CO = {};
-CO = {
+var AO = {};
+AO = {
ascending: "昇順",
ascendingSort: (e) => `\u{5217} ${e.columnName} \u{3092}\u{6607}\u{9806}\u{3067}\u{4E26}\u{3079}\u{66FF}\u{3048}`,
collapse: "折りたたむ",
@@ -27901,8 +27935,8 @@ CO = {
sortable: "並べ替え可能な列"
};
// node_modules/react-aria/dist/private/intl/table/ko-KR.mjs
-var wO = {};
-wO = {
+var jO = {};
+jO = {
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: "접기",
@@ -27916,8 +27950,8 @@ wO = {
sortable: "정렬 가능한 열"
};
// node_modules/react-aria/dist/private/intl/table/lt-LT.mjs
-var TO = {};
-TO = {
+var MO = {};
+MO = {
ascending: "didėjančia tvarka",
ascendingSort: (e) => `surikiuota pagal stulpel\u{12F} ${e.columnName} did\u{117}jan\u{10D}ia tvarka`,
collapse: "Sutraukti",
@@ -27931,8 +27965,8 @@ TO = {
sortable: "rikiuojamas stulpelis"
};
// node_modules/react-aria/dist/private/intl/table/lv-LV.mjs
-var EO = {};
-EO = {
+var NO = {};
+NO = {
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",
@@ -27946,8 +27980,8 @@ EO = {
sortable: "kārtojamā kolonna"
};
// node_modules/react-aria/dist/private/intl/table/nb-NO.mjs
-var DO = {};
-DO = {
+var PO = {};
+PO = {
ascending: "stigende",
ascendingSort: (e) => `sortert etter kolonne ${e.columnName} i stigende rekkef\xf8lge`,
collapse: "Skjul",
@@ -27961,8 +27995,8 @@ DO = {
sortable: "kolonne som kan sorteres"
};
// node_modules/react-aria/dist/private/intl/table/nl-NL.mjs
-var OO = {};
-OO = {
+var FO = {};
+FO = {
ascending: "oplopend",
ascendingSort: (e) => `gesorteerd in oplopende volgorde in kolom ${e.columnName}`,
collapse: "Samenvouwen",
@@ -27976,8 +28010,8 @@ OO = {
sortable: "sorteerbare kolom"
};
// node_modules/react-aria/dist/private/intl/table/pl-PL.mjs
-var kO = {};
-kO = {
+var IO = {};
+IO = {
ascending: "rosnąco",
ascendingSort: (e) => `posortowano wed\u{142}ug kolumny ${e.columnName} w porz\u{105}dku rosn\u{105}cym`,
collapse: "Zwiń",
@@ -27991,8 +28025,8 @@ kO = {
sortable: "kolumna z możliwością sortowania"
};
// node_modules/react-aria/dist/private/intl/table/pt-BR.mjs
-var AO = {};
-AO = {
+var LO = {};
+LO = {
ascending: "crescente",
ascendingSort: (e) => `classificado pela coluna ${e.columnName} em ordem crescente`,
collapse: "Recolher",
@@ -28006,8 +28040,8 @@ AO = {
sortable: "coluna classificável"
};
// node_modules/react-aria/dist/private/intl/table/pt-PT.mjs
-var jO = {};
-jO = {
+var RO = {};
+RO = {
ascending: "ascendente",
ascendingSort: (e) => `Ordenar por coluna ${e.columnName} em ordem ascendente`,
collapse: "Colapsar",
@@ -28021,8 +28055,8 @@ jO = {
sortable: "Coluna ordenável"
};
// node_modules/react-aria/dist/private/intl/table/ro-RO.mjs
-var MO = {};
-MO = {
+var zO = {};
+zO = {
ascending: "crescătoare",
ascendingSort: (e) => `sortate dup\u{103} coloana ${e.columnName} \xeen ordine cresc\u{103}toare`,
collapse: "Restrângeți",
@@ -28036,8 +28070,8 @@ MO = {
sortable: "coloană sortabilă"
};
// node_modules/react-aria/dist/private/intl/table/ru-RU.mjs
-var NO = {};
-NO = {
+var BO = {};
+BO = {
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: "Свернуть",
@@ -28051,8 +28085,8 @@ NO = {
sortable: "сортируемый столбец"
};
// node_modules/react-aria/dist/private/intl/table/sk-SK.mjs
-var PO = {};
-PO = {
+var VO = {};
+VO = {
ascending: "vzostupne",
ascendingSort: (e) => `zoraden\xe9 zostupne pod\u{13E}a st\u{13A}pca ${e.columnName}`,
collapse: "Zbaliť",
@@ -28066,8 +28100,8 @@ PO = {
sortable: "zoraditeľný stĺpec"
};
// node_modules/react-aria/dist/private/intl/table/sl-SI.mjs
-var FO = {};
-FO = {
+var HO = {};
+HO = {
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",
@@ -28081,8 +28115,8 @@ FO = {
sortable: "razvrstljivi stolpec"
};
// node_modules/react-aria/dist/private/intl/table/sr-SP.mjs
-var IO = {};
-IO = {
+var UO = {};
+UO = {
ascending: "rastući",
ascendingSort: (e) => `sortirano po kolonama ${e.columnName} rastu\u{107}im redosledom`,
collapse: "Skupi",
@@ -28096,8 +28130,8 @@ IO = {
sortable: "kolona koja se može sortirati"
};
// node_modules/react-aria/dist/private/intl/table/sv-SE.mjs
-var LO = {};
-LO = {
+var WO = {};
+WO = {
ascending: "stigande",
ascendingSort: (e) => `sorterat p\xe5 kolumn ${e.columnName} i stigande ordning`,
collapse: "Dölj",
@@ -28111,8 +28145,8 @@ LO = {
sortable: "sorterbar kolumn"
};
// node_modules/react-aria/dist/private/intl/table/tr-TR.mjs
-var RO = {};
-RO = {
+var GO = {};
+GO = {
ascending: "artan sırada",
ascendingSort: (e) => `${e.columnName} s\xfctuna g\xf6re artan d\xfczende s\u{131}rala`,
collapse: "Daralt",
@@ -28126,8 +28160,8 @@ RO = {
sortable: "Sıralanabilir sütun"
};
// node_modules/react-aria/dist/private/intl/table/uk-UA.mjs
-var zO = {};
-zO = {
+var KO = {};
+KO = {
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: "Згорнути",
@@ -28141,8 +28175,8 @@ zO = {
sortable: "сортувальний стовпець"
};
// node_modules/react-aria/dist/private/intl/table/zh-CN.mjs
-var BO = {};
-BO = {
+var qO = {};
+qO = {
ascending: "升序",
ascendingSort: (e) => `\u{6309}\u{5217} ${e.columnName} \u{5347}\u{5E8F}\u{6392}\u{5E8F}`,
collapse: "折叠",
@@ -28156,8 +28190,8 @@ BO = {
sortable: "可排序的列"
};
// node_modules/react-aria/dist/private/intl/table/zh-TW.mjs
-var VO = {};
-VO = {
+var JO = {};
+JO = {
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: "收合",
@@ -28171,45 +28205,45 @@ VO = {
sortable: "可排序的欄"
};
// node_modules/react-aria/dist/private/table/intlStrings.mjs
-var HO = {};
-HO = {
- "ar-AE": cO,
- "bg-BG": lO,
- "cs-CZ": uO,
- "da-DK": dO,
- "de-DE": fO,
- "el-GR": pO,
- "en-US": mO,
- "es-ES": hO,
- "et-EE": gO,
- "fi-FI": _O,
- "fr-FR": vO,
- "he-IL": yO,
- "hr-HR": bO,
- "hu-HU": xO,
- "it-IT": SO,
- "ja-JP": CO,
- "ko-KR": wO,
- "lt-LT": TO,
- "lv-LV": EO,
- "nb-NO": DO,
- "nl-NL": OO,
- "pl-PL": kO,
- "pt-BR": AO,
- "pt-PT": jO,
- "ro-RO": MO,
- "ru-RU": NO,
- "sk-SK": PO,
- "sl-SI": FO,
- "sr-SP": IO,
- "sv-SE": LO,
- "tr-TR": RO,
- "uk-UA": zO,
- "zh-CN": BO,
- "zh-TW": VO
+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
};
// node_modules/react-aria/dist/private/table/TableKeyboardDelegate.mjs
-var Soe = class extends tO {
+var Aoe = class extends cO {
isCell(e) {
return e.type === "cell" || e.type === "rowheader" || e.type === "column";
}
@@ -28217,7 +28251,7 @@ var Soe = class extends tO {
let n = this.collection.getItem(e);
if (!n) return null;
if (n.type === "column") {
- let e = TT(wT(n, this.collection));
+ let e = MT(jT(n, this.collection));
if (e) return e.key;
let t = this.getFirstKey();
return t == null || !this.collection.getItem(t) ? null : super.getKeyForItemInRowByIndex(t, n.index);
@@ -28238,13 +28272,13 @@ var Soe = class extends tO {
let t = this.findNextKey(e.key, (e) => e.type === "column");
if (t != null) return t;
let n = this.collection.headerRows[e.level];
- for (let e of wT(n, this.collection)) if (e.type === "column") return e.key;
+ for (let e of jT(n, this.collection)) if (e.type === "column") return e.key;
return null;
}
findPreviousColumnKey(e) {
let t = this.findPreviousKey(e.key, (e) => e.type === "column");
if (t != null) return t;
- let n = this.collection.headerRows[e.level], r = [...wT(n, this.collection)];
+ let n = this.collection.headerRows[e.level], r = [...jT(n, this.collection)];
for (let e = r.length - 1; e >= 0; e--) {
let t = r[e];
if (t.type === "column") return t.key;
@@ -28273,7 +28307,7 @@ var Soe = class extends tO {
let t = o.textValue.slice(0, e.length);
if (this.collator.compare(t, e) === 0) return o.key;
}
- for (let r of wT(o, this.collection)) {
+ for (let r of jT(o, this.collection)) {
let a = n.columns[r.index];
if (n.rowHeaderColumnKeys.has(a.key) && r.textValue) {
let a = r.textValue.slice(0, e.length);
@@ -28286,14 +28320,14 @@ var Soe = class extends tO {
}
};
// node_modules/react-aria/dist/private/table/useTable.mjs
-function Coe(e) {
+function joe(e) {
return e && e.__esModule ? e.default : e;
}
-function woe(e, t, n) {
- let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = NT({
+function Moe(e, t, n) {
+ let { keyboardDelegate: r, isVirtualized: i, layoutDelegate: a, layout: o } = e, s = BT({
usage: "search",
sensitivity: "base"
- }), { direction: c } = IS(), l = t.selectionManager.disabledBehavior, u = (0, P.useMemo)(() => r || new Soe({
+ }), { direction: c } = US(), l = t.selectionManager.disabledBehavior, u = (0, P.useMemo)(() => r || new Aoe({
collection: t.collection,
disabledKeys: t.disabledKeys,
disabledBehavior: l,
@@ -28312,51 +28346,51 @@ function woe(e, t, n) {
s,
a,
o
- ]), d = Bx(e.id);
- rO.set(t, d);
- let { gridProps: f } = xoe({
+ ]), d = qx(e.id);
+ uO.set(t, d);
+ let { gridProps: f } = koe({
...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 = HS(Coe(HO), "@react-aria/table"), g = (0, P.useMemo)(() => {
+ let { column: p, direction: m } = t.sortDescriptor || {}, h = YS(joe(YO), "@react-aria/table"), g = (0, P.useMemo)(() => {
let e = t.collection.columns.find((e) => e.key === p)?.textValue ?? "";
return m && p ? h.format(`${m}Sort`, { columnName: e }) : void 0;
}, [
m,
p,
t.collection.columns
- ]), _ = YC(g);
- return HC(() => {
- g && VC(g, "assertive", 500);
+ ]), _ = nw(g);
+ return YC(() => {
+ g && JC(g, "assertive", 500);
}, [g]), { gridProps: K(f, _, { "aria-describedby": [_["aria-describedby"], f["aria-describedby"]].filter(Boolean).join(" ") }) };
}
// node_modules/react-aria/dist/private/grid/useGridCell.mjs
-function UO(e, t, n) {
- let { node: r, isVirtualized: i, focusMode: a, allowsArrowNavigation: o, shouldSelectOnPressUp: s, onAction: c } = e, { direction: l } = IS(), { keyboardDelegate: u, actions: { onCellAction: d }, keyboardNavigationBehavior: f } = nO.get(t), p = a ?? (f === "tab" ? "cell" : "child"), m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = () => {
+function XO(e, t, n) {
+ let { node: r, isVirtualized: i, focusMode: a, allowsArrowNavigation: o, shouldSelectOnPressUp: s, onAction: c } = e, { direction: l } = US(), { keyboardDelegate: u, actions: { onCellAction: d }, keyboardNavigationBehavior: f } = lO.get(t), p = a ?? (f === "tab" ? "cell" : "child"), m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = () => {
if (n.current) {
- let e = IC(n.current);
+ let e = UC(n.current);
if (p === "child") {
- let i = Mb(wb(n.current));
- if (Pb(n.current) && n.current !== i) return;
- let a = wb(n.current);
+ let i = zb(jb(n.current));
+ if (Vb(n.current) && n.current !== i) return;
+ let a = jb(n.current);
if (!i || i === a.body || i === n.current) {
let e = h.current;
- if (e && m.current === r.key && jb(n.current, e)) {
- Fx(e);
+ if (e && m.current === r.key && Rb(n.current, e)) {
+ Hx(e);
return;
}
}
- let o = t.selectionManager.childFocusStrategy === "last" ? WO(e) : e.firstChild();
+ let o = t.selectionManager.childFocusStrategy === "last" ? ZO(e) : e.firstChild();
if (o) {
- Fx(o);
+ Hx(o);
return;
}
}
- (m.current != null && r.key !== m.current || !Pb(n.current)) && Fx(n.current);
+ (m.current != null && r.key !== m.current || !Vb(n.current)) && Hx(n.current);
}
- }, { itemProps: _, isPressed: v } = PE({
+ }, { itemProps: _, isPressed: v } = VE({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
@@ -28368,44 +28402,44 @@ function UO(e, t, n) {
}), y = K(_, {
role: "gridcell",
onKeyDownCapture: f !== "tab" || o ? (e) => {
- let i = Mb(wb(n.current));
- if (!jb(e.currentTarget, G(e)) || t.isKeyboardNavigationDisabled || !n.current || !i) return;
- let a = IC(n.current);
+ let i = zb(jb(n.current));
+ if (!Rb(e.currentTarget, G(e)) || t.isKeyboardNavigationDisabled || !n.current || !i) return;
+ let a = UC(n.current);
switch (a.currentNode = i, e.key) {
case "ArrowLeft": {
let t = l === "rtl" ? a.nextNode() : a.previousNode();
- if (p === "child" && t === n.current && (t = null), e.preventDefault(), e.stopPropagation(), t) Fx(t), qC(t, { containingElement: WC(n.current) });
+ if (p === "child" && t === n.current && (t = null), e.preventDefault(), e.stopPropagation(), t) Hx(t), ew(t, { containingElement: ZC(n.current) });
else {
if (u.getKeyLeftOf?.(r.key) !== r.key) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "rtl" ? (Fx(n.current), qC(n.current, { containingElement: WC(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : WO(a), t && (Fx(t), qC(t, { containingElement: WC(n.current) })));
+ p === "cell" && l === "rtl" ? (Hx(n.current), ew(n.current, { containingElement: ZC(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? a.firstChild() : ZO(a), t && (Hx(t), ew(t, { containingElement: ZC(n.current) })));
}
break;
}
case "ArrowRight": {
let t = l === "rtl" ? a.previousNode() : a.nextNode();
- if (p === "child" && t === n.current && (t = null), e.preventDefault(), e.stopPropagation(), t) Fx(t), qC(t, { containingElement: WC(n.current) });
+ if (p === "child" && t === n.current && (t = null), e.preventDefault(), e.stopPropagation(), t) Hx(t), ew(t, { containingElement: ZC(n.current) });
else {
if (u.getKeyRightOf?.(r.key) !== r.key) {
n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent));
break;
}
- p === "cell" && l === "ltr" ? (Fx(n.current), qC(n.current, { containingElement: WC(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? WO(a) : a.firstChild(), t && (Fx(t), qC(t, { containingElement: WC(n.current) })));
+ p === "cell" && l === "ltr" ? (Hx(n.current), ew(n.current, { containingElement: ZC(n.current) })) : (a.currentNode = n.current, t = l === "rtl" ? ZO(a) : a.firstChild(), t && (Hx(t), ew(t, { containingElement: ZC(n.current) })));
}
break;
}
case "ArrowUp":
- case "ArrowDown": !e.altKey && jb(n.current, G(e)) && (e.stopPropagation(), e.preventDefault(), n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent)));
+ case "ArrowDown": !e.altKey && Rb(n.current, G(e)) && (e.stopPropagation(), e.preventDefault(), n.current.parentElement?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type, e.nativeEvent)));
}
} : void 0,
onKeyDown: f === "tab" ? (e) => {
- let r = Mb(wb(n.current));
- if (jb(e.currentTarget, G(e)) && !t.isKeyboardNavigationDisabled && n.current && r) {
+ let r = zb(jb(n.current));
+ if (Rb(e.currentTarget, G(e)) && !t.isKeyboardNavigationDisabled && n.current && r) {
if (f === "tab" && G(e) !== n.current && e.key !== "Tab") e.stopPropagation();
else if (e.key === "Tab" && f === "tab") {
- let t = IC(n.current, { tabbable: !0 });
+ let t = UC(n.current, { tabbable: !0 });
t.currentNode = r, (e.shiftKey ? t.previousNode() : t.nextNode()) && e.stopPropagation();
}
}
@@ -28416,9 +28450,9 @@ function UO(e, t, n) {
onFocus: (e) => {
if (m.current = r.key, G(e) !== n.current) {
let i = G(e);
- n.current && jb(n.current, i) && (h.current = i), Cx() || t.selectionManager.setFocusedKey(r.key);
- } else p === "child" && e.relatedTarget && jb(n.current, e.relatedTarget) || requestAnimationFrame(() => {
- p === "child" && Mb(wb(n.current)) === n.current && g();
+ n.current && Rb(n.current, i) && (h.current = i), Ax() || t.selectionManager.setFocusedKey(r.key);
+ } else p === "child" && e.relatedTarget && Rb(n.current, e.relatedTarget) || requestAnimationFrame(() => {
+ p === "child" && zb(jb(n.current)) === n.current && g();
});
},
...p === "child" && f === "tab" ? { tabIndex: -1 } : {}
@@ -28433,7 +28467,7 @@ function UO(e, t, n) {
isPressed: v
};
}
-function WO(e) {
+function ZO(e) {
let t = null, n = null;
do
n = e.lastChild(), n && (t = n);
@@ -28441,32 +28475,32 @@ function WO(e) {
return t;
}
// node_modules/react-aria/dist/private/table/useTableCell.mjs
-function Toe(e, t, n) {
- let { gridCellProps: r, isPressed: i } = UO(e, t, n), a = e.node.column?.key;
- return a != null && t.collection.rowHeaderColumnKeys.has(a) && (r.role = "rowheader", r.id = oO(t, e.node.parentKey, a)), {
+function Noe(e, t, n) {
+ let { gridCellProps: r, isPressed: i } = XO(e, t, n), a = e.node.column?.key;
+ return a != null && t.collection.rowHeaderColumnKeys.has(a) && (r.role = "rowheader", r.id = pO(t, e.node.parentKey, a)), {
gridCellProps: r,
isPressed: i
};
}
// node_modules/react-aria/dist/private/table/useTableColumnHeader.mjs
-function Eoe(e) {
+function Poe(e) {
return e && e.__esModule ? e.default : e;
}
-function Doe(e, t, n) {
- let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = UO({
+function Foe(e, t, n) {
+ let { node: r } = e, i = r.props.allowsSorting, { gridCellProps: a } = XO({
focusMode: "child",
...e
- }, t, n), o = r.props.isSelectionCell && t.selectionManager.selectionMode === "single", { pressProps: s, isPressed: c } = aC({
+ }, t, n), o = r.props.isSelectionCell && t.selectionManager.selectionMode === "single", { pressProps: s, isPressed: c } = fC({
isDisabled: !i || o,
onPress() {
t.sort(r.key);
},
ref: n
- }), { focusableProps: l } = eS({}, n), u, d = t.sortDescriptor?.column === r.key, f = t.sortDescriptor?.direction;
- r.props.allowsSorting && !$b() && (u = d ? f : "none");
- let p = HS(Eoe(HO), "@react-aria/table"), m;
- i && (m = `${p.format("sortable")}`, d && f && $b() && (m = `${m}, ${p.format(f)}`));
- let h = YC(m), g = t.collection.size === 0;
+ }), { focusableProps: l } = sS({}, n), u, d = t.sortDescriptor?.column === r.key, f = t.sortDescriptor?.direction;
+ r.props.allowsSorting && !ox() && (u = d ? f : "none");
+ let p = YS(Poe(YO), "@react-aria/table"), m;
+ i && (m = `${p.format("sortable")}`, d && f && ox() && (m = `${m}, ${p.format(f)}`));
+ let h = nw(m), g = t.collection.size === 0;
return (0, P.useEffect)(() => {
g && t.selectionManager.focusedKey === r.key && t.selectionManager.setFocusedKey(null);
}, [
@@ -28477,7 +28511,7 @@ function Doe(e, t, n) {
columnHeaderProps: {
...K(l, a, s, h, g ? { tabIndex: -1 } : null),
role: "columnheader",
- id: aO(t, r.key),
+ id: fO(t, r.key),
"aria-colspan": r.colSpan && r.colSpan > 1 ? r.colSpan : void 0,
"aria-sort": u
},
@@ -28485,17 +28519,17 @@ function Doe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/table/useTableColumnResize.mjs
-function Ooe(e) {
+function Ioe(e) {
return e && e.__esModule ? e.default : e;
}
-function koe(e, t, n) {
- let { column: r, triggerRef: i, isDisabled: a, onResizeStart: o, onResize: s, onResizeEnd: c, "aria-label": l } = e, u = HS(Ooe(HO), "@react-aria/table"), d = Bx(), f = t.resizingColumn === r.key, p = (0, P.useRef)(f), m = (0, P.useRef)(null), h = (0, P.useRef)(!1), g = t.tableState.isKeyboardNavigationDisabled, [_, v] = (0, P.useState)(!1), { direction: y } = IS(), b = (0, P.useCallback)((e) => {
+function Loe(e, t, n) {
+ let { column: r, triggerRef: i, isDisabled: a, onResizeStart: o, onResize: s, onResizeEnd: c, "aria-label": l } = e, u = YS(Ioe(YO), "@react-aria/table"), d = qx(), f = t.resizingColumn === r.key, p = (0, P.useRef)(f), m = (0, P.useRef)(null), h = (0, P.useRef)(!1), g = t.tableState.isKeyboardNavigationDisabled, [_, v] = (0, P.useState)(!1), { direction: y } = US(), b = (0, P.useCallback)((e) => {
p.current || (m.current = t.updateResizedColumns(e.key, t.getColumnWidth(e.key)), t.startResize(e.key), t.tableState.setKeyboardNavigationDisabled(!0), o?.(m.current)), p.current = !0;
}, [t, o]), x = (0, P.useCallback)((e, n) => {
let r = t.updateResizedColumns(e.key, n);
s?.(r), m.current = r;
}, [t, s]), S = (0, P.useCallback)((e) => {
- p.current && (m.current ??= t.updateResizedColumns(e.key, t.getColumnWidth(e.key)), t.endResize(), t.tableState.setKeyboardNavigationDisabled(!1), c?.(m.current), p.current = !1, i?.current && !h.current && Fx(i.current)), m.current = null;
+ p.current && (m.current ??= t.updateResizedColumns(e.key, t.getColumnWidth(e.key)), t.endResize(), t.tableState.setKeyboardNavigationDisabled(!1), c?.(m.current), p.current = !1, i?.current && !h.current && Hx(i.current)), m.current = null;
}, [
t,
i,
@@ -28503,14 +28537,14 @@ function koe(e, t, n) {
]), C = () => {
if (g) S(r);
else return !1;
- }, { keyboardProps: w } = Xx({ shortcuts: {
+ }, { keyboardProps: w } = rS({ shortcuts: {
Escape: () => C(),
Enter: () => {
g ? S(r) : b(r);
},
" ": () => C(),
Tab: () => C()
- } }), T = (0, P.useRef)(0), { moveProps: E } = yw({
+ } }), T = (0, P.useRef)(0), { moveProps: E } = Ew({
onMoveStart(e) {
T.current = t.getColumnWidth(r.key), e.pointerType === "mouse" && v(!0), b(r);
},
@@ -28526,12 +28560,12 @@ function koe(e, t, n) {
g && E.onKeyDown?.(e);
}, [g, E]), O = Math.floor(t.getColumnMinWidth(r.key)), k = Math.floor(t.getColumnMaxWidth(r.key));
k === Infinity && (k = 2 ** 53 - 1);
- let A = Math.floor(t.getColumnWidth(r.key)), j = Ex();
+ let A = Math.floor(t.getColumnWidth(r.key)), j = Nx();
j === "virtual" && typeof window < "u" && "ontouchstart" in window && (j = "touch");
- let M = YC(i?.current == null && (j === "keyboard" || j === "virtual") && !f ? u.format("resizerDescription") : void 0), ee = {
+ let M = nw(i?.current == null && (j === "keyboard" || j === "virtual") && !f ? u.format("resizerDescription") : void 0), ee = {
"aria-label": l,
"aria-orientation": "horizontal",
- "aria-labelledby": `${d} ${aO(t.tableState, r.key)}`,
+ "aria-labelledby": `${d} ${fO(t.tableState, r.key)}`,
"aria-valuetext": u.format("columnSize", { value: A }),
type: "range",
min: O,
@@ -28539,11 +28573,11 @@ function koe(e, t, n) {
value: A,
...M
}, te = (0, P.useCallback)(() => {
- n.current && Fx(n.current);
- }, [n]), ne = t.resizingColumn, N = (0, P.useRef)(null), re = OS(b);
+ n.current && Hx(n.current);
+ }, [n]), ne = t.resizingColumn, N = (0, P.useRef)(null), re = FS(b);
(0, P.useEffect)(() => {
if (N.current !== ne && ne != null && ne === r.key) {
- h.current = Mb() === n.current, re(r);
+ h.current = zb() === n.current, re(r);
let e = setTimeout(() => te(), 0), t = setTimeout(te, 400);
return () => {
clearTimeout(e), clearTimeout(t);
@@ -28559,7 +28593,7 @@ function koe(e, t, n) {
let ie = (e) => {
let n = t.getColumnWidth(r.key), i = parseFloat(G(e).value);
i = i > n ? n + 10 : n - 10, x(r, i);
- }, { pressProps: F } = aC({
+ }, { pressProps: F } = fC({
preventFocusOnPress: !0,
onPressStart: (e) => {
e.ctrlKey || e.altKey || e.metaKey || e.shiftKey || e.pointerType === "keyboard" || (e.pointerType === "virtual" && t.resizingColumn != null ? S(r) : (te(), e.pointerType !== "virtual" && b(r)));
@@ -28567,7 +28601,7 @@ function koe(e, t, n) {
onPress: (e) => {
(e.pointerType === "touch" && h.current || e.pointerType === "mouse") && t.resizingColumn != null && S(r);
}
- }), { visuallyHiddenProps: ae } = xw();
+ }), { visuallyHiddenProps: ae } = Ow();
return {
resizerProps: K(w, {
...E,
@@ -28586,19 +28620,19 @@ function koe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/table/useTableHeaderRow.mjs
-function Aoe(e, t, n) {
+function Roe(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 };
}
// node_modules/react-aria/dist/private/grid/useGridRow.mjs
-function joe(e, t, n) {
- let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = nO.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = PE({
+function zoe(e, t, n) {
+ let { node: r, isVirtualized: i, shouldSelectOnPressUp: a, onAction: o } = e, { actions: s, shouldSelectOnPressUp: c } = lO.get(t), l = s.onRowAction ? () => s.onRowAction?.(r.key) : o, { itemProps: u, ...d } = VE({
selectionManager: t.selectionManager,
key: r.key,
ref: n,
isVirtualized: i,
shouldSelectOnPressUp: c || a,
- onAction: l || r?.props?.onAction ? Ix(r?.props?.onAction, l) : void 0,
+ onAction: l || r?.props?.onAction ? Ux(r?.props?.onAction, l) : void 0,
isDisabled: t.collection.size === 0
}), f = t.selectionManager.isSelected(r.key), p = {
role: "row",
@@ -28612,10 +28646,10 @@ function joe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/table/useTableRow.mjs
-function Moe(e) {
+function Boe(e) {
return e && e.__esModule ? e.default : e;
}
-var GO = {
+var QO = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -28625,21 +28659,21 @@ var GO = {
rtl: "ArrowRight"
}
};
-function Noe(e, t, n) {
- let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = joe(e, t, n), { direction: s } = IS();
+function Voe(e, t, n) {
+ let { node: r, isVirtualized: i } = e, { rowProps: a, ...o } = zoe(e, t, n), { direction: s } = US();
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 = HS(Moe(HO), "@react-aria/table"), u = AS({
+ let c = t.treeColumn != null && (t.expandedKeys === "all" || t.expandedKeys.has(r.key)), l = YS(Boe(YO), "@react-aria/table"), u = LS({
"aria-label": c ? l.format("collapse") : l.format("expand"),
- "aria-labelledby": sO(t, r.key)
+ "aria-labelledby": mO(t, r.key)
}), d = {}, f = {};
if (t.treeColumn != null) {
let e = t.collection.getItem(r.key);
if (e != null) {
- let n = KO(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 = KO(t.collection, a);
+ let n = $O(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 = $O(t.collection, a);
for (; l && l.type !== "item" && l.prevKey != null;) l = t.collection.getItem(l.prevKey);
d = {
onKeyDown: (n) => {
- n.key === GO.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === GO.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 === QO.expand[s] && t.selectionManager.focusedKey === e.key && i && t.expandedKeys !== "all" && !t.expandedKeys.has(e.key) ? (t.toggleKey(e.key), n.stopPropagation()) : n.key === QO.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,
@@ -28657,42 +28691,42 @@ function Noe(e, t, n) {
};
}
}
- let p = rx(r.props), m = o.hasAction ? p : {};
+ let p = ux(r.props), m = o.hasAction ? p : {};
return {
rowProps: {
...K(a, d, m),
- "aria-labelledby": sO(t, r.key)
+ "aria-labelledby": mO(t, r.key)
},
expandButtonProps: f,
...o
};
}
-function KO(e, t) {
+function $O(e, t) {
return "lastChildKey" in t ? t.lastChildKey == null ? null : e.getItem(t.lastChildKey) : Array.from(t.childNodes).findLast((e) => e.parentKey === t.key);
}
// node_modules/react-aria/dist/private/grid/useGridRowGroup.mjs
-function Poe() {
+function Hoe() {
return { rowGroupProps: { role: "rowgroup" } };
}
// node_modules/react-aria/dist/private/table/useTableRowGroup.mjs
-function qO() {
- return Poe();
+function ek() {
+ return Hoe();
}
// node_modules/react-aria/dist/private/table/useTableSelectionCheckbox.mjs
-function Foe(e) {
+function Uoe(e) {
return e && e.__esModule ? e.default : e;
}
-function Ioe(e, t) {
- let { key: n } = e, { checkboxProps: r } = BE(e, t);
+function Woe(e, t) {
+ let { key: n } = e, { checkboxProps: r } = qE(e, t);
return { checkboxProps: {
...r,
- "aria-labelledby": `${r.id} ${sO(t, n)}`
+ "aria-labelledby": `${r.id} ${mO(t, n)}`
} };
}
-function Loe(e) {
+function Goe(e) {
let { isEmpty: t, isSelectAll: n, selectionMode: r } = e.selectionManager;
return { checkboxProps: {
- "aria-label": HS(Foe(HO), "@react-aria/table").format(r === "single" ? "select" : "selectAll"),
+ "aria-label": YS(Uoe(YO), "@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,
@@ -28700,22 +28734,22 @@ function Loe(e) {
} };
}
// node_modules/react-aria/dist/private/tabs/utils.mjs
-var JO = /* @__PURE__ */ new WeakMap();
-function YO(e, t, n) {
- return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${JO.get(e)}-${n}-${t}`) : "";
+var tk = /* @__PURE__ */ new WeakMap();
+function nk(e, t, n) {
+ return e ? (typeof t == "string" && (t = t.replace(/\s+/g, "")), `${tk.get(e)}-${n}-${t}`) : "";
}
// node_modules/react-aria/dist/private/tabs/useTab.mjs
-function Roe(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 } = PE({
+function Koe(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 } = VE({
selectionManager: o,
key: r,
ref: n,
isDisabled: l,
shouldSelectOnPressUp: a ?? u?.props.href != null,
linkBehavior: "selection"
- }), p = YO(t, r, "tab"), m = YO(t, r, "tabpanel"), { tabIndex: h } = d, g = WS(u?.props, { labelable: !0 });
+ }), p = nk(t, r, "tab"), m = nk(t, r, "tabpanel"), { tabIndex: h } = d, g = ZS(u?.props, { labelable: !0 });
delete g.id;
- let _ = ix(u?.props), { focusableProps: v } = eS({
+ let _ = dx(u?.props), { focusableProps: v } = sS({
...u?.props,
isDisabled: l
}, n);
@@ -28734,7 +28768,7 @@ function Roe(e, t, n) {
};
}
// node_modules/react-aria/dist/private/tabs/TabsKeyboardDelegate.mjs
-var zoe = class {
+var qoe = class {
constructor(e, t, n, r = /* @__PURE__ */ new Set()) {
this.collection = e, this.flipDirection = t === "rtl", this.disabledKeys = r, this.tabDirection = n === "horizontal";
}
@@ -28777,11 +28811,11 @@ var zoe = class {
}
};
// node_modules/react-aria/dist/private/tabs/useTabList.mjs
-function Boe(e, t, n) {
- let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = IS(), { collectionProps: l } = CT({
+function Joe(e, t, n) {
+ let { orientation: r = "horizontal", keyboardActivation: i = "automatic" } = e, { collection: a, selectionManager: o, disabledKeys: s } = t, { direction: c } = US(), { collectionProps: l } = AT({
ref: n,
selectionManager: o,
- keyboardDelegate: (0, P.useMemo)(() => new zoe(a, c, r, s), [
+ keyboardDelegate: (0, P.useMemo)(() => new qoe(a, c, r, s), [
a,
s,
r,
@@ -28791,9 +28825,9 @@ function Boe(e, t, n) {
disallowEmptySelection: !0,
scrollRef: n,
linkBehavior: "selection"
- }), u = Bx();
- return JO.set(t, u), { tabListProps: {
- ...K(l, AS({
+ }), u = qx();
+ return tk.set(t, u), { tabListProps: {
+ ...K(l, LS({
...e,
id: u
})),
@@ -28803,12 +28837,12 @@ function Boe(e, t, n) {
} };
}
// node_modules/react-aria/dist/private/tabs/useTabPanel.mjs
-function Voe(e, t, n) {
- let r = jE(n) ? void 0 : 0, i = YO(t, e.id ?? t?.selectedKey, "tabpanel");
- return { tabPanelProps: K(AS({
+function Yoe(e, t, n) {
+ let r = RE(n) ? void 0 : 0, i = nk(t, e.id ?? t?.selectedKey, "tabpanel");
+ return { tabPanelProps: K(LS({
...e,
id: i,
- "aria-labelledby": YO(t, t?.selectedKey, "tab")
+ "aria-labelledby": nk(t, t?.selectedKey, "tab")
}), {
tabIndex: r,
role: "tabpanel",
@@ -28817,265 +28851,265 @@ function Voe(e, t, n) {
}) };
}
// node_modules/react-aria/dist/private/tree/useTree.mjs
-function Hoe(e, t, n) {
- let { gridProps: r } = Nae(e, t, n);
+function Xoe(e, t, n) {
+ let { gridProps: r } = Vae(e, t, n);
return r.role = "treegrid", { gridProps: r };
}
// node_modules/react-aria/dist/private/intl/tree/ar-AE.mjs
-var XO = {};
-XO = {
+var rk = {};
+rk = {
collapse: "طي",
expand: "تمديد"
};
// node_modules/react-aria/dist/private/intl/tree/bg-BG.mjs
-var ZO = {};
-ZO = {
+var ik = {};
+ik = {
collapse: "Свиване",
expand: "Разширяване"
};
// node_modules/react-aria/dist/private/intl/tree/cs-CZ.mjs
-var QO = {};
-QO = {
+var ak = {};
+ak = {
collapse: "Sbalit",
expand: "Roztáhnout"
};
// node_modules/react-aria/dist/private/intl/tree/da-DK.mjs
-var $O = {};
-$O = {
+var ok = {};
+ok = {
collapse: "Skjul",
expand: "Udvid"
};
// node_modules/react-aria/dist/private/intl/tree/de-DE.mjs
-var ek = {};
-ek = {
+var sk = {};
+sk = {
collapse: "Reduzieren",
expand: "Erweitern"
};
// node_modules/react-aria/dist/private/intl/tree/el-GR.mjs
-var tk = {};
-tk = {
+var ck = {};
+ck = {
collapse: "Σύμπτυξη",
expand: "Ανάπτυξη"
};
// node_modules/react-aria/dist/private/intl/tree/en-US.mjs
-var nk = {};
-nk = {
+var lk = {};
+lk = {
expand: "Expand",
collapse: "Collapse"
};
// node_modules/react-aria/dist/private/intl/tree/es-ES.mjs
-var rk = {};
-rk = {
+var uk = {};
+uk = {
collapse: "Contraer",
expand: "Expandir"
};
// node_modules/react-aria/dist/private/intl/tree/et-EE.mjs
-var ik = {};
-ik = {
+var dk = {};
+dk = {
collapse: "Ahenda",
expand: "Laienda"
};
// node_modules/react-aria/dist/private/intl/tree/fi-FI.mjs
-var ak = {};
-ak = {
+var fk = {};
+fk = {
collapse: "Pienennä",
expand: "Laajenna"
};
// node_modules/react-aria/dist/private/intl/tree/fr-FR.mjs
-var ok = {};
-ok = {
+var pk = {};
+pk = {
collapse: "Réduire",
expand: "Développer"
};
// node_modules/react-aria/dist/private/intl/tree/he-IL.mjs
-var sk = {};
-sk = {
+var mk = {};
+mk = {
collapse: "כווץ",
expand: "הרחב"
};
// node_modules/react-aria/dist/private/intl/tree/hr-HR.mjs
-var ck = {};
-ck = {
+var hk = {};
+hk = {
collapse: "Sažmi",
expand: "Proširi"
};
// node_modules/react-aria/dist/private/intl/tree/hu-HU.mjs
-var lk = {};
-lk = {
+var gk = {};
+gk = {
collapse: "Összecsukás",
expand: "Kibontás"
};
// node_modules/react-aria/dist/private/intl/tree/it-IT.mjs
-var uk = {};
-uk = {
+var _k = {};
+_k = {
collapse: "Comprimi",
expand: "Espandi"
};
// node_modules/react-aria/dist/private/intl/tree/ja-JP.mjs
-var dk = {};
-dk = {
+var vk = {};
+vk = {
collapse: "折りたたむ",
expand: "展開"
};
// node_modules/react-aria/dist/private/intl/tree/ko-KR.mjs
-var fk = {};
-fk = {
+var yk = {};
+yk = {
collapse: "접기",
expand: "펼치기"
};
// node_modules/react-aria/dist/private/intl/tree/lt-LT.mjs
-var pk = {};
-pk = {
+var bk = {};
+bk = {
collapse: "Sutraukti",
expand: "Išskleisti"
};
// node_modules/react-aria/dist/private/intl/tree/lv-LV.mjs
-var mk = {};
-mk = {
+var xk = {};
+xk = {
collapse: "Sakļaut",
expand: "Izvērst"
};
// node_modules/react-aria/dist/private/intl/tree/nb-NO.mjs
-var hk = {};
-hk = {
+var Sk = {};
+Sk = {
collapse: "Skjul",
expand: "Utvid"
};
// node_modules/react-aria/dist/private/intl/tree/nl-NL.mjs
-var gk = {};
-gk = {
+var Ck = {};
+Ck = {
collapse: "Samenvouwen",
expand: "Uitvouwen"
};
// node_modules/react-aria/dist/private/intl/tree/pl-PL.mjs
-var _k = {};
-_k = {
+var wk = {};
+wk = {
collapse: "Zwiń",
expand: "Rozwiń"
};
// node_modules/react-aria/dist/private/intl/tree/pt-BR.mjs
-var vk = {};
-vk = {
+var Tk = {};
+Tk = {
collapse: "Recolher",
expand: "Expandir"
};
// node_modules/react-aria/dist/private/intl/tree/pt-PT.mjs
-var yk = {};
-yk = {
+var Ek = {};
+Ek = {
collapse: "Colapsar",
expand: "Expandir"
};
// node_modules/react-aria/dist/private/intl/tree/ro-RO.mjs
-var bk = {};
-bk = {
+var Dk = {};
+Dk = {
collapse: "Restrângeți",
expand: "Extindeți"
};
// node_modules/react-aria/dist/private/intl/tree/ru-RU.mjs
-var xk = {};
-xk = {
+var Ok = {};
+Ok = {
collapse: "Свернуть",
expand: "Развернуть"
};
// node_modules/react-aria/dist/private/intl/tree/sk-SK.mjs
-var Sk = {};
-Sk = {
+var kk = {};
+kk = {
collapse: "Zbaliť",
expand: "Rozbaliť"
};
// node_modules/react-aria/dist/private/intl/tree/sl-SI.mjs
-var Ck = {};
-Ck = {
+var Ak = {};
+Ak = {
collapse: "Strni",
expand: "Razširi"
};
// node_modules/react-aria/dist/private/intl/tree/sr-SP.mjs
-var wk = {};
-wk = {
+var jk = {};
+jk = {
collapse: " Skupi",
expand: "Proširi"
};
// node_modules/react-aria/dist/private/intl/tree/sv-SE.mjs
-var Tk = {};
-Tk = {
+var Mk = {};
+Mk = {
collapse: "Dölj",
expand: "Expandera"
};
// node_modules/react-aria/dist/private/intl/tree/tr-TR.mjs
-var Ek = {};
-Ek = {
+var Nk = {};
+Nk = {
collapse: "Daralt",
expand: "Genişlet"
};
// node_modules/react-aria/dist/private/intl/tree/uk-UA.mjs
-var Dk = {};
-Dk = {
+var Pk = {};
+Pk = {
collapse: "Згорнути",
expand: "Розгорнути"
};
// node_modules/react-aria/dist/private/intl/tree/zh-CN.mjs
-var Ok = {};
-Ok = {
+var Fk = {};
+Fk = {
collapse: "折叠",
expand: "扩展"
};
// node_modules/react-aria/dist/private/intl/tree/zh-TW.mjs
-var kk = {};
-kk = {
+var Ik = {};
+Ik = {
collapse: "收合",
expand: "展開"
};
// node_modules/react-aria/dist/private/tree/intlStrings.mjs
-var Ak = {};
-Ak = {
- "ar-AE": XO,
- "bg-BG": ZO,
- "cs-CZ": QO,
- "da-DK": $O,
- "de-DE": ek,
- "el-GR": tk,
- "en-US": nk,
- "es-ES": rk,
- "et-EE": ik,
- "fi-FI": ak,
- "fr-FR": ok,
- "he-IL": sk,
- "hr-HR": ck,
- "hu-HU": lk,
- "it-IT": uk,
- "ja-JP": dk,
- "ko-KR": fk,
- "lt-LT": pk,
- "lv-LV": mk,
- "nb-NO": hk,
- "nl-NL": gk,
- "pl-PL": _k,
- "pt-BR": vk,
- "pt-PT": yk,
- "ro-RO": bk,
- "ru-RU": xk,
- "sk-SK": Sk,
- "sl-SI": Ck,
- "sr-SP": wk,
- "sv-SE": Tk,
- "tr-TR": Ek,
- "uk-UA": Dk,
- "zh-CN": Ok,
- "zh-TW": kk
+var Lk = {};
+Lk = {
+ "ar-AE": rk,
+ "bg-BG": ik,
+ "cs-CZ": ak,
+ "da-DK": ok,
+ "de-DE": sk,
+ "el-GR": ck,
+ "en-US": lk,
+ "es-ES": uk,
+ "et-EE": dk,
+ "fi-FI": fk,
+ "fr-FR": pk,
+ "he-IL": mk,
+ "hr-HR": hk,
+ "hu-HU": gk,
+ "it-IT": _k,
+ "ja-JP": vk,
+ "ko-KR": yk,
+ "lt-LT": bk,
+ "lv-LV": xk,
+ "nb-NO": Sk,
+ "nl-NL": Ck,
+ "pl-PL": wk,
+ "pt-BR": Tk,
+ "pt-PT": Ek,
+ "ro-RO": Dk,
+ "ru-RU": Ok,
+ "sk-SK": kk,
+ "sl-SI": Ak,
+ "sr-SP": jk,
+ "sv-SE": Mk,
+ "tr-TR": Nk,
+ "uk-UA": Pk,
+ "zh-CN": Fk,
+ "zh-TW": Ik
};
// node_modules/react-aria/dist/private/tree/useTreeItem.mjs
-function Uoe(e) {
+function Zoe(e) {
return e && e.__esModule ? e.default : e;
}
-function jk(e, t, n) {
- let { node: r } = e, i = Pae(e, t, n), a = i.rowProps["aria-expanded"] === !0, o = HS(Uoe(Ak), "@react-aria/tree"), s = {
+function Rk(e, t, n) {
+ let { node: r } = e, i = Hae(e, t, n), a = i.rowProps["aria-expanded"] === !0, o = YS(Zoe(Lk), "@react-aria/tree"), s = {
onPress: () => {
i.isDisabled || (t.toggleKey(r.key), t.selectionManager.setFocused(!0), t.selectionManager.setFocusedKey(r.key));
},
excludeFromTabOrder: !0,
preventFocusOnPress: !0,
"data-react-aria-prevent-focus": !0,
- ...AS({
+ ...LS({
"aria-label": a ? o.format("collapse") : o.format("expand"),
"aria-labelledby": i.rowProps.id
})
@@ -29086,15 +29120,15 @@ function jk(e, t, n) {
};
}
// src/react/components/selection-dock.tsx
-var Mk = "(prefers-reduced-motion: reduce)", Woe = () => matchMedia(Mk).matches, Goe = (e) => {
- let t = matchMedia(Mk);
+var zk = "(prefers-reduced-motion: reduce)", Qoe = () => matchMedia(zk).matches, $oe = (e) => {
+ let t = matchMedia(zk);
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
-}, Nk = /* @__PURE__ */ new Map(), Pk = () => {
+}, Bk = /* @__PURE__ */ new Map(), Vk = () => {
let e = document.documentElement;
- Nk.size ? e.style.setProperty("--selection-dock-space", `${Math.max(...Nk.values())}px`) : e.style.removeProperty("--selection-dock-space");
+ Bk.size ? e.style.setProperty("--selection-dock-space", `${Math.max(...Bk.values())}px`) : e.style.removeProperty("--selection-dock-space");
};
-function Koe({ children: e, count: t, label: n }) {
- let r = (0, P.useRef)(null), i = by(), a = (0, P.useSyncExternalStore)(Goe, Woe, () => !1), { isFocusVisible: o } = Dx(), s = a || o, c = {
+function ese({ children: e, count: t, label: n }) {
+ let r = (0, P.useRef)(null), i = Ty(), a = (0, P.useSyncExternalStore)($oe, Qoe, () => !1), { isFocusVisible: o } = Px(), s = a || o, c = {
opacity: 0,
transform: "translate(-50%, 8px)"
};
@@ -29102,12 +29136,12 @@ function Koe({ children: e, count: t, label: n }) {
let e = r.current;
if (!e || !i) return;
let t = () => {
- Nk.set(e, Math.ceil(e.offsetHeight + (parseFloat(getComputedStyle(e).bottom) || 0) + 16)), Pk();
+ Bk.set(e, Math.ceil(e.offsetHeight + (parseFloat(getComputedStyle(e).bottom) || 0) + 16)), Vk();
}, n = new ResizeObserver(t);
return n.observe(e), window.addEventListener("resize", t), t(), () => {
- n.disconnect(), window.removeEventListener("resize", t), Nk.delete(e), Pk();
+ n.disconnect(), window.removeEventListener("resize", t), Bk.delete(e), Vk();
};
- }, [i]), /* @__PURE__ */ (0, F.jsxs)(fb.div, {
+ }, [i]), /* @__PURE__ */ (0, F.jsxs)(vb.div, {
ref: r,
role: "group",
"aria-label": n,
@@ -29140,17 +29174,17 @@ function Koe({ children: e, count: t, label: n }) {
}), e]
});
}
-function Fk({ visible: e, ...t }) {
- return /* @__PURE__ */ (0, F.jsx)(wy, { children: e ? /* @__PURE__ */ (0, F.jsx)(Koe, { ...t }, "selection") : null });
+function Hk({ visible: e, ...t }) {
+ return /* @__PURE__ */ (0, F.jsx)(Oy, { children: e ? /* @__PURE__ */ (0, F.jsx)(ese, { ...t }, "selection") : null });
}
// src/react/batch-dock/batch-dock-api.ts
-var Ik = {
+var Uk = {
group: "clear",
operation: "clear",
label: "取消",
glyph: "x"
};
-function qoe(e, t = !1) {
+function tse(e, t = !1) {
switch (e) {
case "trash": return [
{
@@ -29166,7 +29200,7 @@ function qoe(e, t = !1) {
glyph: "trash",
danger: !0
},
- Ik
+ Uk
];
case "junk": return [
t ? {
@@ -29187,7 +29221,7 @@ function qoe(e, t = !1) {
glyph: "trash",
danger: !0
},
- Ik
+ Uk
];
case "follow": return [
{
@@ -29208,7 +29242,7 @@ function qoe(e, t = !1) {
label: "忽略",
glyph: "eye-off"
},
- Ik
+ Uk
];
default: return [
{
@@ -29242,38 +29276,38 @@ function qoe(e, t = !1) {
glyph: "trash",
danger: !0
},
- Ik
+ Uk
];
}
}
// src/react/batch-dock/batch-dock-island.tsx
-var Lk = null, Rk = {
+var Wk = null, Gk = {
count: 0,
context: "catalog",
junkDismissed: !1
-}, zk = /* @__PURE__ */ new Set();
-function Joe(e) {
- return zk.add(e), () => {
- zk.delete(e);
+}, Kk = /* @__PURE__ */ new Set();
+function nse(e) {
+ return Kk.add(e), () => {
+ Kk.delete(e);
};
}
-function Bk() {
- for (let e of [...zk]) e();
+function rse() {
+ for (let e of [...Kk]) e();
}
-var Yoe = { render(e) {
- Rk = e, (0, Lt.flushSync)(Bk);
+var ise = { render(e) {
+ Gk = e, (0, Lt.flushSync)(rse);
} };
-function Xoe(e) {
- return Lk = e, Yoe;
+function ase(e) {
+ return Wk = e, ise;
}
-function Zoe() {
- let e = (0, P.useSyncExternalStore)(Joe, () => Rk);
- return Lk ? /* @__PURE__ */ (0, F.jsx)(Qoe, {
- host: Lk,
+function ose() {
+ let e = (0, P.useSyncExternalStore)(nse, () => Gk);
+ return Wk ? /* @__PURE__ */ (0, F.jsx)(sse, {
+ host: Wk,
props: e
}) : null;
}
-function Qoe({ host: e, props: t }) {
+function sse({ host: e, props: t }) {
let n = t.count > 0;
return (0, P.useLayoutEffect)(() => {
document.body.toggleAttribute("data-batch-dock-open", n);
@@ -29283,11 +29317,11 @@ function Qoe({ host: e, props: t }) {
className: "peach-react",
"data-batch-scope": "",
"data-context": t.context,
- children: /* @__PURE__ */ (0, F.jsx)(Fk, {
+ children: /* @__PURE__ */ (0, F.jsx)(Hk, {
label: "所选项目操作",
visible: t.count > 0,
count: `已选 ${t.count.toLocaleString()} 项`,
- children: qoe(t.context, t.junkDismissed).map((t) => /* @__PURE__ */ (0, F.jsxs)("button", {
+ children: tse(t.context, t.junkDismissed).map((t) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-batch-group": t.group,
"data-batch-action": t.operation,
@@ -29303,11 +29337,11 @@ function Qoe({ host: e, props: t }) {
});
}
// src/number-setting.ts
-function Vk(e, t, n, r) {
+function qk(e, t, n, r) {
return Number.isInteger(e) && e >= t && e <= n ? e : r;
}
// src/settings-store.ts
-function $oe(e, t) {
+function Jk(e, t) {
let n = /* @__PURE__ */ new Set(), r = 0, i = () => {
r += 1, n.forEach((e) => e());
};
@@ -29326,7 +29360,7 @@ function $oe(e, t) {
};
}
// src/sort-preferences.ts
-var Hk = [
+var Yk = [
["seed", "随机"],
["rating", "评分"],
["o", "高潮计数"],
@@ -29335,7 +29369,7 @@ var Hk = [
["size", "体积"],
["new", "入库时间"],
["played", "观看时间"]
-], Uk = ["release", "发行时间"], Wk = [...Hk, Uk].map(([e]) => e), Gk = {
+], Xk = ["release", "发行时间"], Zk = [...Yk, Xk].map(([e]) => e), Qk = {
rating: ["从高到低", "从低到高"],
o: ["从多到少", "从少到多"],
plays: ["从多到少", "从少到多"],
@@ -29344,43 +29378,43 @@ var Hk = [
new: ["从新到旧", "从旧到新"],
played: ["从近到远", "从远到近"],
release: ["从新到旧", "从旧到新"]
-}, Kk = {
+}, $k = {
big: ["size", "desc"],
short: ["dur", "asc"],
long: ["dur", "desc"]
-}, qk = (e, t, n = Gk) => (n[e] || [])[+(t === "asc")] || "", Jk = (e, t = Gk) => t[e] ? "desc" : "";
-function Yk(e, t, n, r = Gk) {
+}, eA = (e, t, n = Qk) => (n[e] || [])[+(t === "asc")] || "", tA = (e, t = Qk) => t[e] ? "desc" : "";
+function nA(e, t, n, r = Qk) {
return e === t ? r[e] ? {
sort: e,
dir: n === "asc" ? "desc" : "asc"
} : null : {
sort: e,
- dir: Jk(e, r)
+ dir: tA(e, r)
};
}
-function Xk(e, t, n) {
+function rA(e, t, n) {
return e === "seed" ? "" : e === t && n === "asc" ? "asc" : "desc";
}
-function Zk(e, t, n, r, i = n) {
- let a = e ? Kk[e] : void 0, o = a ? a[0] : e, s = o && Wk.includes(o) ? o : i;
- return Gk[s] ? {
+function iA(e, t, n, r, i = n) {
+ let a = e ? $k[e] : void 0, o = a ? a[0] : e, s = o && Zk.includes(o) ? o : i;
+ return Qk[s] ? {
sort: s,
- dir: t === "asc" || t === "desc" ? t : a ? a[1] : e ? "desc" : Xk(s, n, r)
+ dir: t === "asc" || t === "desc" ? t : a ? a[1] : e ? "desc" : rA(s, n, r)
} : {
sort: s,
dir: ""
};
}
// src/appearance/home-glow.ts
-var Qk = [
+var aA = [
"spot1",
"spot2",
"spot3"
-], ese = [
+], cse = [
"光晕一",
"光晕二",
"光晕三"
-], $k = "native", eA = [
+], oA = "native", sA = [
[
"ash",
"灰雾",
@@ -29686,7 +29720,7 @@ var Qk = [
"rose"
],
[
- $k,
+ oA,
"玻璃原色",
{
spot1: {
@@ -29704,7 +29738,7 @@ var Qk = [
},
"blue"
]
-], tA = (e) => e === $k, nA = [...eA.map(([e, t]) => [e, t]), ["custom", "自定义"]], tse = (e) => (nA.find(([t]) => t === e) || nA[0])[1], rA = (e) => structuredClone((eA.find(([t]) => t === e) || eA[0])[2]), iA = [
+], cA = (e) => e === oA, lA = [...sA.map(([e, t]) => [e, t]), ["custom", "自定义"]], lse = (e) => (lA.find(([t]) => t === e) || lA[0])[1], uA = (e) => structuredClone((sA.find(([t]) => t === e) || sA[0])[2]), dA = [
["red", "红"],
["orange", "橙"],
["amber", "琥珀"],
@@ -29717,7 +29751,7 @@ var Qk = [
["violet", "紫罗兰"],
["fuchsia", "品红"],
["rose", "玫红"]
-], aA = "blue", oA = (e) => iA.some(([t]) => t === e) ? e : aA, nse = (e) => (eA.find(([t]) => t === e) || [])[3] || "blue", rse = [
+], fA = "blue", pA = (e) => dA.some(([t]) => t === e) ? e : fA, use = (e) => (sA.find(([t]) => t === e) || [])[3] || "blue", dse = [
["all", "全部"],
["gray", "灰"],
["red", "红"],
@@ -29727,7 +29761,7 @@ var Qk = [
["blue", "蓝"],
["purple", "紫"],
["brown", "棕"]
-], ise = [
+], fse = [
[
"gray",
"云灰",
@@ -30123,11 +30157,11 @@ var Qk = [
"霁蓝",
"#6686b8"
]
-], sA = (e, t, n, r) => Number.isInteger(e) && e >= t && e <= n ? e : r, cA = (e, t) => /^#[0-9a-f]{6}$/i.test(String(e)) ? String(e).toLowerCase() : t, ase = (e, t) => `rgba(${[
+], mA = (e, t, n, r) => Number.isInteger(e) && e >= t && e <= n ? e : r, hA = (e, t) => /^#[0-9a-f]{6}$/i.test(String(e)) ? String(e).toLowerCase() : t, pse = (e, t) => `rgba(${[
1,
3,
5
-].map((t) => parseInt(e.slice(t, t + 2), 16)).join(",")},${(t / 100).toFixed(2)})`, ose = {
+].map((t) => parseInt(e.slice(t, t + 2), 16)).join(",")},${(t / 100).toFixed(2)})`, mse = {
strength: [
0,
100,
@@ -30153,7 +30187,7 @@ var Qk = [
100,
50
]
-}, lA = {
+}, gA = {
on: !0,
preset: "ash",
strength: 100,
@@ -30161,56 +30195,56 @@ var Qk = [
speed: 100,
soften: 50,
size: 50,
- ...rA("ash")
+ ...uA("ash")
};
-function uA(e) {
- let t = e && typeof e == "object" ? e : {}, n = nA.some(([e]) => e === t.preset), r = n ? t.preset : "ash", i = rA(r === "custom" ? "ash" : r), a = {
+function _A(e) {
+ let t = e && typeof e == "object" ? e : {}, n = lA.some(([e]) => e === t.preset), r = n ? t.preset : "ash", i = uA(r === "custom" ? "ash" : r), a = {
on: t.on !== !1,
preset: r
};
- for (let [e, [n, r, i]] of Object.entries(ose)) a[e] = sA(+t[e], n, r, i);
- for (let e of Qk) {
+ for (let [e, [n, r, i]] of Object.entries(mse)) a[e] = mA(+t[e], n, r, i);
+ for (let e of aA) {
let r = n && t[e] && typeof t[e] == "object" ? t[e] : {}, o = i[e];
a[e] = {
- color: cA(r.color, o.color),
- alpha: sA(+r.alpha, 0, 100, o.alpha)
+ color: hA(r.color, o.color),
+ alpha: mA(+r.alpha, 0, 100, o.alpha)
};
}
return a;
}
-var sse = (e) => `conic-gradient(from -90deg,${e.map((t, n) => `${t} ${(n * 100 / e.length).toFixed(3)}% ${((n + 1) * 100 / e.length).toFixed(3)}%`).join(",")})`, dA = /* @__PURE__ */ new WeakMap();
-function cse(e, t) {
+var hse = (e) => `conic-gradient(from -90deg,${e.map((t, n) => `${t} ${(n * 100 / e.length).toFixed(3)}% ${((n + 1) * 100 / e.length).toFixed(3)}%`).join(",")})`, vA = /* @__PURE__ */ new WeakMap();
+function gse(e, t) {
if (!e) return;
- let n = dA.get(e);
- n || (n = /* @__PURE__ */ new Map(), dA.set(e, n));
- let r = t.on && !tA(t.preset), i = (t, r) => {
+ let n = vA.get(e);
+ n || (n = /* @__PURE__ */ new Map(), vA.set(e, n));
+ let r = t.on && !cA(t.preset), i = (t, r) => {
n.get(t) !== r && (n.set(t, r), e.style.setProperty(t, r));
};
- i("--glow-strength", String(r ? t.strength / 100 : 0)), i("--glow-noise", String(r ? t.noise / 100 : 0)), i("--glow-soften", (.7 + t.soften / 100 * .6).toFixed(3)), i("--glow-size", (.5 + t.size / 100).toFixed(3)), i("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), i("--glow-drift-play", t.speed ? "running" : "paused"), Qk.forEach((e, n) => {
+ i("--glow-strength", String(r ? t.strength / 100 : 0)), i("--glow-noise", String(r ? t.noise / 100 : 0)), i("--glow-soften", (.7 + t.soften / 100 * .6).toFixed(3)), i("--glow-size", (.5 + t.size / 100).toFixed(3)), i("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), i("--glow-drift-play", t.speed ? "running" : "paused"), aA.forEach((e, n) => {
let r = t[e];
- i(`--glow-spot-${n + 1}-color`, ase(r.color, r.alpha));
+ i(`--glow-spot-${n + 1}-color`, pse(r.color, r.alpha));
});
}
-function lse(e, t) {
+function _se(e, t) {
if (!e) return;
- let n = !t.on || tA(t.preset);
+ let n = !t.on || cA(t.preset);
e.toggleAttribute("data-glow-native", n), e.style.setProperty("--glow-drift-scale", t.speed ? (100 / t.speed).toFixed(3) : "1"), e.style.setProperty("--glow-drift-play", t.speed ? "running" : "paused"), n ? (e.style.removeProperty("--glass-tint-a"), e.style.removeProperty("--glass-tint-b")) : (e.style.setProperty("--glass-tint-a", t.spot1.color), e.style.setProperty("--glass-tint-b", t.spot2.color));
}
// src/appearance/settings.ts
-var use = "peach.settings.v1", fA = [
+var vse = "peach.settings.v1", yse = [
"system",
"light",
"dark"
-], pA = [
+], yA = [
0,
7,
30,
90
-], mA = [
+], bse = [
"feedHideGroupCompilations",
"feedHideSoloCompilations",
"feedHideExcerpts"
-], hA = {
+], bA = {
batchSize: 60,
defaultSort: "seed",
sortDefaultsVersion: 3,
@@ -30230,54 +30264,57 @@ var use = "peach.settings.v1", fA = [
theaterMode: !1,
theme: "system",
groupCollapse: !0,
- sidebarOrder: [...Il],
- homeGlow: lA,
- accent: aA
-}, gA = (e, t, n) => t.includes(e) ? e : n;
-function dse(e) {
+ sidebarOrder: [...Zl],
+ homeGlow: gA,
+ accent: fA,
+ performerNameLanguage: "zh-CN"
+}, xA = (e, t, n) => t.includes(e) ? e : n;
+function xse(e) {
let t = e && typeof e == "object" ? e : {}, n = {
- ...hA,
+ ...bA,
...t
};
- n.followInitialDays = pA.includes(+n.followInitialDays) ? +n.followInitialDays : 30, delete n.rotateMinutes;
+ n.followInitialDays = yA.includes(+n.followInitialDays) ? +n.followInitialDays : 30, delete n.rotateMinutes;
let r = !1, i = +n.sortDefaultsVersion || 0;
i < 2 && n.defaultSort === "new" && (n.defaultSort = "seed", r = !0);
- let a = Kk[n.defaultSort];
- return i < 3 && a && (n.defaultSort = a[0], r = !0), n.sortDefaultsVersion = 3, n.batchSize = Vk(+n.batchSize, 1, 200, 60), n.defaultSort = gA(n.defaultSort, Wk, "seed"), n.hoverDelaySeconds = Vk(+n.hoverDelaySeconds, 0, 60, 5), n.seekSeconds = Vk(+n.seekSeconds, 1, 300, 10), delete n.loginDays, delete n.metadataRefreshDays, n.ambientMode = n.ambientMode !== !1, n.theaterMode = n.theaterMode === !0, n.groupCollapse = n.groupCollapse !== !1, n.detailAutoplay = n.detailAutoplay !== !1, n.miniplayer = n.miniplayer !== !1, n.uiSounds = n.uiSounds !== !1, n.feedAutoScroll = n.feedAutoScroll !== !1, n.feedHideGroupCompilations = n.feedHideGroupCompilations !== !1, n.feedHideSoloCompilations = n.feedHideSoloCompilations === !0, n.feedHideExcerpts = n.feedHideExcerpts !== !1, n.searchHistoryLimit = Vk(+n.searchHistoryLimit, 0, 50, 10), n.relatedLimit = Vk(+n.relatedLimit, 0, 60, 20), n.feedLimit = Vk(+n.feedLimit, 1, 100, 12), Object.assign(n, Pa(n)), n.theme = gA(n.theme, fA, "system"), n.homeGlow = uA(n.homeGlow), n.accent = oA(n.accent), n.sidebarOrder = Bl(n.sidebarOrder), {
+ let a = $k[n.defaultSort];
+ return i < 3 && a && (n.defaultSort = a[0], r = !0), n.sortDefaultsVersion = 3, n.batchSize = qk(+n.batchSize, 1, 200, 60), n.defaultSort = xA(n.defaultSort, Zk, "seed"), n.hoverDelaySeconds = qk(+n.hoverDelaySeconds, 0, 60, 5), n.seekSeconds = qk(+n.seekSeconds, 1, 300, 10), delete n.loginDays, delete n.metadataRefreshDays, n.ambientMode = n.ambientMode !== !1, n.theaterMode = n.theaterMode === !0, n.groupCollapse = n.groupCollapse !== !1, n.detailAutoplay = n.detailAutoplay !== !1, n.miniplayer = n.miniplayer !== !1, n.uiSounds = n.uiSounds !== !1, n.feedAutoScroll = n.feedAutoScroll !== !1, n.feedHideGroupCompilations = n.feedHideGroupCompilations !== !1, n.feedHideSoloCompilations = n.feedHideSoloCompilations === !0, n.feedHideExcerpts = n.feedHideExcerpts !== !1, n.searchHistoryLimit = qk(+n.searchHistoryLimit, 0, 50, 10), n.relatedLimit = qk(+n.relatedLimit, 0, 60, 20), n.feedLimit = qk(+n.feedLimit, 1, 100, 12), Object.assign(n, Ya(n)), n.theme = xA(n.theme, yse, "system"), n.performerNameLanguage = xA(n.performerNameLanguage, ["zh-CN", "ja"], "zh-CN"), n.homeGlow = _A(n.homeGlow), n.accent = pA(n.accent), n.sidebarOrder = tu(n.sidebarOrder), {
settings: n,
migrated: r
};
}
-function fse(e) {
+function Sse(e) {
let t = {};
try {
t = JSON.parse(e.getItem("peach.settings.v1") || "{}");
} catch {}
- return dse(t);
-}
-var _A = null;
-function vA() {
- if (_A) return _A;
- let { settings: e, migrated: t } = fse(localStorage);
- return _A = $oe(use, e), t && _A.save(), _A;
-}
-function yA(e, t, n = vA()) {
- let r = n.value, i = e && e.followInitialDays;
- pA.includes(i) && (r.followInitialDays = i, n.save());
- for (let t of mA) typeof e?.[t] == "boolean" && e[t] !== r[t] && (r[t] = e[t], n.save());
- let a = e && e.searchHistoryLimit;
- Number.isInteger(a) && a >= 0 && a <= 50 ? a !== r.searchHistoryLimit && (r.searchHistoryLimit = Vk(a, 0, 50, 10), n.save(), t("searchHistoryLimit")) : e && e.searchHistoryLimit === null && r.searchHistoryLimit !== hA.searchHistoryLimit && pse(n);
- let o = Array.isArray(e && e.sidebarOrder) ? e.sidebarOrder : null;
- o && o.length && o.join(",") !== r.sidebarOrder.join(",") && (r.sidebarOrder = o, n.save());
-}
-function pse(e = vA()) {
- return on("/api/settings", {
+ return xse(t);
+}
+var SA = null;
+function CA() {
+ if (SA) return SA;
+ let { settings: e, migrated: t } = Sse(localStorage);
+ return SA = Jk(vse, e), t && SA.save(), SA;
+}
+function wA(e, t, n = CA()) {
+ let r = n.value, i = e?.performerNameLanguage;
+ (i === "zh-CN" || i === "ja") && i !== r.performerNameLanguage && (r.performerNameLanguage = i, n.save(), t("performerNameLanguage"));
+ let a = e && e.followInitialDays;
+ yA.includes(a) && (r.followInitialDays = a, n.save());
+ for (let t of bse) typeof e?.[t] == "boolean" && e[t] !== r[t] && (r[t] = e[t], n.save());
+ let o = e && e.searchHistoryLimit;
+ Number.isInteger(o) && o >= 0 && o <= 50 ? o !== r.searchHistoryLimit && (r.searchHistoryLimit = qk(o, 0, 50, 10), n.save(), t("searchHistoryLimit")) : e && e.searchHistoryLimit === null && r.searchHistoryLimit !== bA.searchHistoryLimit && TA(n);
+ let s = Array.isArray(e && e.sidebarOrder) ? e.sidebarOrder : null;
+ s && s.length && s.join(",") !== r.sidebarOrder.join(",") && (r.sidebarOrder = s, n.save());
+}
+function TA(e = CA()) {
+ return xn("/api/settings", {
method: "POST",
body: JSON.stringify({ searchHistoryLimit: e.value.searchHistoryLimit })
}).catch(() => {});
}
// src/appearance/theme.ts
-var mse = [
+var Cse = [
[
"system",
"跟随系统",
@@ -30293,31 +30330,31 @@ var mse = [
"深色",
"moon"
]
-], hse = null, bA = () => hse ??= matchMedia("(prefers-color-scheme: dark)"), xA = null;
-function gse() {
- return xA || (xA = document.createElement("style"), xA.textContent = "*:not(.board-theme-thumb),*::before,*::after{transition:none!important}"), xA.isConnected || document.head.append(xA), () => {
+], wse = null, EA = () => wse ??= matchMedia("(prefers-color-scheme: dark)"), DA = null;
+function Tse() {
+ return DA || (DA = document.createElement("style"), DA.textContent = "*:not(.board-theme-thumb),*::before,*::after{transition:none!important}"), DA.isConnected || document.head.append(DA), () => {
getComputedStyle(document.documentElement).opacity;
let e = () => {
- cancelAnimationFrame(t), clearTimeout(n), xA?.remove();
+ cancelAnimationFrame(t), clearTimeout(n), DA?.remove();
}, t = requestAnimationFrame(e), n = setTimeout(e, 100);
};
}
-function SA(e = vA().value.theme) {
- let t = gse(), n = document.documentElement;
+function OA(e = CA().value.theme) {
+ let t = Tse(), n = document.documentElement;
e === "system" ? delete n.dataset.theme : n.dataset.theme = e;
- let r = e === "dark" || e === "system" && bA().matches;
+ let r = e === "dark" || e === "system" && EA().matches;
n.classList.toggle("dark", r), document.querySelectorAll("[data-board-theme]").forEach((e) => e.setAttribute("aria-pressed", String(e.dataset.boardTheme === "dark" === r))), document.querySelector(".board-theme-toggle")?.classList.toggle("is-dark", r), document.querySelectorAll("meta[data-theme-color]").forEach((e) => {
e.media = e.dataset.themeColor === "dark" === r ? "all" : "not all";
}), t();
}
-var CA = !1;
-function _se() {
- CA || (CA = !0, bA().addEventListener("change", () => {
- vA().value.theme === "system" && SA();
+var kA = !1;
+function Ese() {
+ kA || (kA = !0, EA().addEventListener("change", () => {
+ CA().value.theme === "system" && OA();
}));
}
// src/appearance/layout.ts
-var wA = [[
+var AA = [[
"big",
"大图",
"maximize"
@@ -30325,7 +30362,7 @@ var wA = [[
"small",
"小图",
"layout-grid"
-]], TA = [[
+]], jA = [[
"big",
"大图",
"maximize"
@@ -30333,7 +30370,7 @@ var wA = [[
"small",
"小图",
"layout-grid"
-]], EA = [[
+]], MA = [[
"fixed",
"固定比例",
"layout-grid"
@@ -30341,127 +30378,127 @@ var wA = [[
"masonry",
"瀑布流",
"columns-2"
-]], DA = .75, OA = () => vA().value, kA = (e = OA()) => Na(e.javLayout), vse = (e = OA()) => Na(e.homeLayout), AA = (e, t = OA()) => e ? vse(t) : kA(t), jA = TA.map(([e]) => e), MA = EA.map(([e]) => e), NA = (e = OA()) => gA(e.photoSize, jA, "small"), PA = (e = OA()) => gA(e.photoLayout, MA, "masonry"), FA = null;
-function IA(e, t = OA()) {
+]], NA = .75, PA = () => CA().value, FA = (e = PA()) => Ja(e.javLayout), Dse = (e = PA()) => Ja(e.homeLayout), IA = (e, t = PA()) => e ? Dse(t) : FA(t), LA = jA.map(([e]) => e), RA = MA.map(([e]) => e), zA = (e = PA()) => xA(e.photoSize, LA, "small"), BA = (e = PA()) => xA(e.photoLayout, RA, "masonry"), VA = null;
+function HA(e, t = PA()) {
let n = {
active: e.active,
- size: AA(e.home, t),
+ size: IA(e.home, t),
portrait: e.portrait,
javImage: t.javImage
- }, r = FA;
- return (!r || Object.keys(n).some((e) => n[e] !== r[e])) && (FA = n), FA;
+ }, r = VA;
+ return (!r || Object.keys(n).some((e) => n[e] !== r[e])) && (VA = n), VA;
}
-function LA(e) {
- return e.portrait ? 9 / 16 : e.active && e.size === "big" ? DA : 16 / 9;
+function UA(e) {
+ return e.portrait ? 9 / 16 : e.active && e.size === "big" ? NA : 16 / 9;
}
-function yse(e, t = vA()) {
- t.value.homeLayout = Na(e), t.save();
+function Ose(e, t = CA()) {
+ t.value.homeLayout = Ja(e), t.save();
}
-function RA(e, t = vA()) {
- t.value.javLayout = Na(e), t.save();
+function WA(e, t = CA()) {
+ t.value.javLayout = Ja(e), t.save();
}
-function bse(e, t = vA()) {
- t.value.homeLayout = t.value.javLayout = Na(e), t.save();
+function kse(e, t = CA()) {
+ t.value.homeLayout = t.value.javLayout = Ja(e), t.save();
}
-function xse(e, t = vA()) {
- t.value.photoSize = gA(e, jA, "small"), t.save();
+function Ase(e, t = CA()) {
+ t.value.photoSize = xA(e, LA, "small"), t.save();
}
-function zA(e, t = vA()) {
- t.value.photoLayout = gA(e, MA, "masonry"), t.save();
+function GA(e, t = CA()) {
+ t.value.photoLayout = xA(e, RA, "masonry"), t.save();
}
// src/appearance/density.ts
-var BA = "density", VA = {
+var KA = "density", qA = {
big: "336px",
dense: "168px"
-}, HA = () => localStorage.getItem(BA) === "dense" ? "dense" : "big";
-function UA(e, t) {
- let [n, r] = TA;
- if (e.querySelector("[data-icon-swap]")) Os(e, t === r[0] ? "b" : "a");
+}, JA = () => localStorage.getItem(KA) === "dense" ? "dense" : "big";
+function YA(e, t) {
+ let [n, r] = jA;
+ if (e.querySelector("[data-icon-swap]")) Us(e, t === r[0] ? "b" : "a");
else {
let i = e.querySelector(":scope > [data-glass-drift]");
- e.innerHTML = Ds(n[2], r[2], t === r[0] ? "b" : "a"), i && e.append(i);
+ e.innerHTML = Hs(n[2], r[2], t === r[0] ? "b" : "a"), i && e.append(i);
}
- WA(e, "aria-label", t === "big" ? "切换为小图" : "切换为大图");
+ XA(e, "aria-label", t === "big" ? "切换为小图" : "切换为大图");
}
-function WA(e, t, n) {
+function XA(e, t, n) {
e.getAttribute(t) !== n && e.setAttribute(t, n);
}
-var GA = () => document.querySelector("#density");
-function KA(e = HA()) {
+var ZA = () => document.querySelector("#density");
+function QA(e = JA()) {
let t = document.documentElement;
- t.style.getPropertyValue("--tile") !== VA[e] && t.style.setProperty("--tile", VA[e]), WA(document.body, "data-density", e);
- let n = GA();
- n && (WA(n, "aria-pressed", String(e === "dense")), WA(n, "title", "当前:" + (e === "big" ? "大图" : "密集")), UA(n, e === "big" ? "big" : "small"));
+ t.style.getPropertyValue("--tile") !== qA[e] && t.style.setProperty("--tile", qA[e]), XA(document.body, "data-density", e);
+ let n = ZA();
+ n && (XA(n, "aria-pressed", String(e === "dense")), XA(n, "title", "当前:" + (e === "big" ? "大图" : "密集")), YA(n, e === "big" ? "big" : "small"));
}
-function qA() {
- let e = HA() === "big" ? "dense" : "big";
- localStorage.setItem(BA, e), KA(e);
+function jse() {
+ let e = JA() === "big" ? "dense" : "big";
+ localStorage.setItem(KA, e), QA(e);
}
-function JA(e) {
- let t = GA();
- t && (WA(t, "aria-pressed", String(e === "small")), WA(t, "title", "当前:" + (e === "big" ? "大图" : "小图")), UA(t, e));
+function Mse(e) {
+ let t = ZA();
+ t && (XA(t, "aria-pressed", String(e === "small")), XA(t, "title", "当前:" + (e === "big" ? "大图" : "小图")), YA(t, e));
}
// src/appearance/glow.ts
-function YA(e = vA()) {
- cse(document.querySelector(".glowlayer"), e.value.homeGlow);
+function $A(e = CA()) {
+ gse(document.querySelector(".glowlayer"), e.value.homeGlow);
}
-var XA = 0;
-function ZA(e = vA()) {
- XA ||= requestAnimationFrame(() => {
- XA = 0, YA(e);
+var ej = 0;
+function tj(e = CA()) {
+ ej ||= requestAnimationFrame(() => {
+ ej = 0, $A(e);
});
}
-function QA(e = vA()) {
- lse(document.documentElement, e.value.homeGlow);
+function nj(e = CA()) {
+ _se(document.documentElement, e.value.homeGlow);
}
-function $A(e = vA()) {
+function rj(e = CA()) {
document.documentElement.dataset.accent = e.value.accent;
}
-var ej = (e, t, n) => ({
+var ij = (e, t, n) => ({
key: e,
label: t,
- native: tA(e),
- fill: tA(e) ? "" : sse(n)
+ native: cA(e),
+ fill: cA(e) ? "" : hse(n)
});
-function tj(e) {
- let t = eA.map(([e, t, n]) => ej(e, t, Qk.map((e) => n[e].color)));
- return e.preset === "custom" && t.push(ej("custom", "自定义", Qk.map((t) => e[t].color))), t;
+function Nse(e) {
+ let t = sA.map(([e, t, n]) => ij(e, t, aA.map((e) => n[e].color)));
+ return e.preset === "custom" && t.push(ij("custom", "自定义", aA.map((t) => e[t].color))), t;
}
-var Sse = iA;
-function Cse(e, t = vA()) {
+var aj = dA;
+function oj(e, t = CA()) {
if (e === "custom") return;
let n = t.value.homeGlow;
- n.preset = e, Object.assign(n, rA(e)), t.value.accent = nse(e), t.save(), ZA(t), QA(t), $A(t);
+ n.preset = e, Object.assign(n, uA(e)), t.value.accent = use(e), t.save(), tj(t), nj(t), rj(t);
}
-function wse(e, t = vA()) {
- t.value.accent = oA(e), t.save(), $A(t);
+function sj(e, t = CA()) {
+ t.value.accent = pA(e), t.save(), rj(t);
}
-function Tse(e = vA()) {
+function cj(e = CA()) {
let t = e.value.homeGlow;
- t.preset = lA.preset, Object.assign(t, rA(t.preset)), e.value.accent = aA, e.save(), ZA(e), QA(e), $A(e);
+ t.preset = gA.preset, Object.assign(t, uA(t.preset)), e.value.accent = fA, e.save(), tj(e), nj(e), rj(e);
}
-function nj(e, t) {
- e.style.setProperty("--glow-swatch", t.on ? t.spot1.color : "var(--color-accent-500)"), e.toggleAttribute("data-glow-native", t.on && tA(t.preset)), e.toggleAttribute("data-glow-off", !t.on);
+function lj(e, t) {
+ e.style.setProperty("--glow-swatch", t.on ? t.spot1.color : "var(--color-accent-500)"), e.toggleAttribute("data-glow-native", t.on && cA(t.preset)), e.toggleAttribute("data-glow-off", !t.on);
}
-function Ese(e, t = vA()) {
- return nj(e, t.value.homeGlow), t.subscribe(() => nj(e, t.value.homeGlow));
+function uj(e, t = CA()) {
+ return lj(e, t.value.homeGlow), t.subscribe(() => lj(e, t.value.homeGlow));
}
// src/react/components/glow-preset-grid.tsx
-function rj({ store: e, label: t, hidden: n }) {
+function dj({ store: e, label: t, hidden: n }) {
let r = e.value.homeGlow;
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-glow-grid": "",
role: "group",
"aria-label": t,
hidden: n,
- children: tj(r).map((t) => /* @__PURE__ */ (0, F.jsx)("button", {
+ children: Nse(r).map((t) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-glow-chip": "",
"data-glow-preset": t.key,
"aria-pressed": t.key === r.preset,
title: t.label,
"aria-label": t.label,
- onClick: () => Cse(t.key, e),
+ onClick: () => oj(t.key, e),
children: /* @__PURE__ */ (0, F.jsx)("span", {
"data-glow-ball": "",
"aria-hidden": "true",
@@ -30472,14 +30509,14 @@ function rj({ store: e, label: t, hidden: n }) {
});
}
// src/react/glow-picker/glow-picker-island.tsx
-var ij = null;
-function Dse(e) {
- ij = e;
+var fj = null;
+function Pse(e) {
+ fj = e;
}
-function Ose() {
- return ij ? /* @__PURE__ */ (0, F.jsx)(kse, { host: ij }) : null;
+function Fse() {
+ return fj ? /* @__PURE__ */ (0, F.jsx)(Ise, { host: fj }) : null;
}
-function kse({ host: e }) {
+function Ise({ host: e }) {
let { store: t } = e;
(0, P.useSyncExternalStore)(t.subscribe, t.version);
let { homeGlow: n, accent: r } = t.value;
@@ -30491,11 +30528,11 @@ function kse({ host: e }) {
children: [/* @__PURE__ */ (0, F.jsx)("span", { children: "光晕" }), /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-glow-preset-reset": "",
- onClick: () => Tse(t),
+ onClick: () => cj(t),
children: "重置"
})]
}),
- /* @__PURE__ */ (0, F.jsx)(rj, {
+ /* @__PURE__ */ (0, F.jsx)(dj, {
store: t,
label: "光晕",
hidden: !n.on
@@ -30509,14 +30546,14 @@ function kse({ host: e }) {
"data-accent-grid": "",
role: "group",
"aria-label": "强调色",
- children: Sse.map(([e, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
+ children: aj.map(([e, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-glow-chip": "",
"data-accent": e,
"aria-pressed": e === r,
title: n,
"aria-label": n,
- onClick: () => wse(e, t),
+ onClick: () => sj(e, t),
children: /* @__PURE__ */ (0, F.jsx)("span", {
"data-glow-ball": "",
"aria-hidden": "true",
@@ -30534,31 +30571,31 @@ function kse({ host: e }) {
] });
}
// src/player/host.ts
-var aj = null;
-function Ase(e) {
- aj = e;
+var pj = null;
+function Lse(e) {
+ pj = e;
}
-function oj() {
- if (!aj) throw Error("播放器还没有接上宿主(configurePlayer)");
- return aj;
+function mj() {
+ if (!pj) throw Error("播放器还没有接上宿主(configurePlayer)");
+ return pj;
}
// src/player/menu.ts
-var sj = null;
-function jse(e) {
- sj = e;
+var hj = null;
+function Rse(e) {
+ hj = e;
}
-function Mse() {
+function zse() {
let e = document.getElementById("playerMenu");
return e || (e = document.createElement("div"), e.className = "popmenu", e.setAttribute("data-player-context-menu", ""), e.id = "playerMenu", e.setAttribute("role", "menu"), e.setAttribute("aria-label", "播放器菜单"), e.hidden = !0, document.body.append(e)), e;
}
-var cj = null, lj = (e, t) => t ? e.replace("<svg", `<svg ${t}=""`) : e;
-function uj() {
+var gj = null, _j = (e, t) => t ? e.replace("<svg", `<svg ${t}=""`) : e;
+function vj() {
let e = document.getElementById("playerMenu");
- e?.matches(":popover-open") && e.hidePopover(), e && e.parentElement !== document.body && document.body.append(e), e && Wo(e, () => {
+ e?.matches(":popover-open") && e.hidePopover(), e && e.parentElement !== document.body && document.body.append(e), e && as(e, () => {
e.innerHTML = "";
- }), cj &&= (cj(), null);
+ }), gj &&= (gj(), null);
}
-async function Nse(e) {
+async function Bse(e) {
try {
return await navigator.clipboard.writeText(e), !0;
} catch {
@@ -30571,8 +30608,8 @@ async function Nse(e) {
return t.remove(), n;
}
}
-function Pse(e) {
- let t = !!sj?.inMiniplayer(e), n = e.peachItem, r = sj?.kind(e) ?? "item", i = (t) => {
+function Vse(e) {
+ let t = !!hj?.inMiniplayer(e), n = e.peachItem, r = hj?.kind(e) ?? "item", i = (t) => {
let i = new URL(r === "follow" ? `/posts/${n?.id}` : `/assets/${n?.id}`, location.origin);
if (r !== "follow" && location.pathname === i.pathname) {
let e = new URLSearchParams(location.search);
@@ -30588,7 +30625,7 @@ function Pse(e) {
}
return t && i.searchParams.set("t", String(Math.floor(e.currentTime() || 0))), i.href;
}, a = (e, t) => {
- Nse(i(e)).then((e) => oj().toast(e ? t : "复制失败,请手动复制地址栏", {
+ Bse(i(e)).then((e) => mj().toast(e ? t : "复制失败,请手动复制地址栏", {
timeout: 4e3,
warn: !e
}));
@@ -30600,11 +30637,11 @@ function Pse(e) {
}, t ? {
icon: "maximize-2",
label: "展开",
- run: () => sj?.expand()
+ run: () => hj?.expand()
} : {
icon: "picture-in-picture-2",
label: "迷你播放器",
- run: () => sj?.toMiniplayer()
+ run: () => hj?.toMiniplayer()
}];
document.pictureInPictureEnabled && o.push({
icon: "player-pip",
@@ -30627,29 +30664,29 @@ function Pse(e) {
run: () => s.click()
}), o;
}
-function Fse(e, t, n) {
- let r = Mse();
- uj();
- let i = oj().stage();
+function Hse(e, t, n) {
+ let r = zse();
+ vj();
+ let i = mj().stage();
i instanceof HTMLDialogElement && i.open && i.append(r), r.setAttribute("popover", "manual");
- let a = Pse(e);
+ let a = Vse(e);
r.innerHTML = a.map((e, t) => {
let n = e.checked !== void 0;
- return `<button type="button" role="${n ? "menuitemcheckbox" : "menuitem"}"${n ? ` aria-checked="${e.checked}"` : ""} data-player-menu="${t}">${lj(R(e.icon), e.fill ? "data-player-menu-fill" : "")}<span>${z(e.label)}</span>${n ? lj(R("check"), "data-player-menu-check") : ""}</button>`;
- }).join(""), Uo(r), r.showPopover(), r.style.left = `${Math.max(8, Math.min(t, innerWidth - r.offsetWidth - 8))}px`, r.style.top = `${Math.max(8, Math.min(n, innerHeight - r.offsetHeight - 8))}px`;
+ return `<button type="button" role="${n ? "menuitemcheckbox" : "menuitem"}"${n ? ` aria-checked="${e.checked}"` : ""} data-player-menu="${t}">${_j(R(e.icon), e.fill ? "data-player-menu-fill" : "")}<span>${z(e.label)}</span>${n ? _j(R("check"), "data-player-menu-check") : ""}</button>`;
+ }).join(""), is(r), r.showPopover(), r.style.left = `${Math.max(8, Math.min(t, innerWidth - r.offsetWidth - 8))}px`, r.style.top = `${Math.max(8, Math.min(n, innerHeight - r.offsetHeight - 8))}px`;
let o = [...r.querySelectorAll("[data-player-menu]")];
o.forEach((e) => {
e.onclick = (t) => {
t.stopPropagation();
let n = a[Number(e.dataset.playerMenu)];
- uj(), n?.run();
+ vj(), n?.run();
};
});
let s = (e) => {
- r.contains(e.target) || uj();
+ r.contains(e.target) || vj();
}, c = (e) => {
if (e.key === "Escape") {
- e.preventDefault(), e.stopPropagation(), uj();
+ e.preventDefault(), e.stopPropagation(), vj();
return;
}
if (e.key !== "ArrowDown" && e.key !== "ArrowUp") return;
@@ -30657,49 +30694,49 @@ function Fse(e, t, n) {
let t = o.indexOf(document.activeElement);
o[(t + (e.key === "ArrowDown" ? 1 : -1) + o.length) % o.length]?.focus();
}, l = (t) => {
- Ko(t, e.el()) && uj();
+ ss(t, e.el()) && vj();
};
setTimeout(() => {
document.addEventListener("pointerdown", s, !0), document.addEventListener("keydown", c, !0), window.addEventListener("scroll", l, {
capture: !0,
passive: !0
});
- }, 0), cj = () => {
+ }, 0), gj = () => {
document.removeEventListener("pointerdown", s, !0), document.removeEventListener("keydown", c, !0), window.removeEventListener("scroll", l, !0);
}, o[0]?.focus();
}
-function Ise(e) {
+function Use(e) {
e.el().addEventListener("contextmenu", (t) => {
- t.target.closest(".vjs-peach-settings-menu") || (t.preventDefault(), Fse(e, t.clientX, t.clientY));
- }), e.on("dispose", uj);
+ t.target.closest(".vjs-peach-settings-menu") || (t.preventDefault(), Hse(e, t.clientX, t.clientY));
+ }), e.on("dispose", vj);
}
// src/player/registry.ts
-var dj = null, fj = () => dj;
-function pj(e) {
- dj = e;
+var yj = null, bj = () => yj;
+function xj(e) {
+ yj = e;
}
-function mj(e) {
+function Sj(e) {
e && !e.isDisposed() && requestAnimationFrame(() => {
e.isDisposed() || e.trigger("resize");
});
}
// src/player/stats.ts
-function hj(e) {
+function Cj(e) {
let t = e.currentTime || 0;
for (let n = 0; n < e.buffered.length; n++) if (e.buffered.start(n) <= t && e.buffered.end(n) >= t) return Math.max(0, e.buffered.end(n) - t);
return 0;
}
-function Lse(e) {
+function Wse(e) {
let t = e.currentTime || 0;
for (let n = 0; n < e.buffered.length; n++) if (e.buffered.start(n) <= t + .25 && e.buffered.end(n) >= t) return e.buffered.end(n);
return e.buffered.length ? e.buffered.end(e.buffered.length - 1) : 0;
}
-var gj = 3e3;
-function _j(e, t) {
- let n = Number(e) || 0, r = On(t) || 0;
+var wj = 3e3;
+function Tj(e, t) {
+ let n = Number(e) || 0, r = Un(t) || 0;
return n > 0 && r > 0 ? n * 8 / r : 0;
}
-function Rse(e) {
+function Gse(e) {
let t = [], n = null, r = 0, i = 0;
return {
bitrate: Number(e) || 0,
@@ -30714,10 +30751,10 @@ function Rse(e) {
},
sample(e) {
if (!e) return i;
- let a = performance.now(), o = Lse(e), s = e.currentTime || 0;
+ let a = performance.now(), o = Wse(e), s = e.currentTime || 0;
if (n) {
let e = (a - n.at) / 1e3, i = Math.abs(s - n.ct) > e * 4 + 1, c = o - n.frontier;
- !i && c > 0 && (r += c), e * 1e3 > gj * 2 && (t.length = 0);
+ !i && c > 0 && (r += c), e * 1e3 > wj * 2 && (t.length = 0);
}
for (n = {
at: a,
@@ -30726,55 +30763,55 @@ function Rse(e) {
}, t.push({
at: a,
advanced: r
- }); t.length > 2 && a - t[0].at > gj;) t.shift();
+ }); t.length > 2 && a - t[0].at > wj;) t.shift();
let c = t[0], l = (a - c.at) / 1e3, u = r - c.advanced;
return l >= .5 && u > 0 && this.bitrate > 0 && (i = u * this.bitrate / l), i;
}
};
}
-var vj = 24;
-function yj(e, t) {
- e.push(Number.isFinite(t) && t > 0 ? t : 0), e.length > vj && e.splice(0, e.length - vj);
+var Ej = 24;
+function Dj(e, t) {
+ e.push(Number.isFinite(t) && t > 0 ? t : 0), e.length > Ej && e.splice(0, e.length - Ej);
}
-var bj = "peach-player-panel";
-function xj(e, t, n, r) {
- let i = [...Array(Math.max(0, vj - e.length)).fill(null), ...e], a = Math.max(1, n || 0), o = i.map((e) => {
+var Oj = "peach-player-panel";
+function kj(e, t, n, r) {
+ let i = [...Array(Math.max(0, Ej - e.length)).fill(null), ...e], a = Math.max(1, n || 0), o = i.map((e) => {
if (e === null) return "<i aria-hidden=\"true\"></i>";
let n = e <= 0 ? 0 : Math.max(.08, Math.min(1, e / a));
return `<i data-bar="${t === "buffer" ? e < 5 ? "low" : e < 15 ? "mid" : "good" : "on"}" style="height:${(n * 100).toFixed(1)}%" aria-hidden="true"></i>`;
}).join("");
return `<span data-player-stats-plot="${t}" role="img" aria-label="${z(r)}">${o}</span>`;
}
-function zse() {
+function Kse() {
return `<button data-player-stats-button="" id="playerStatsBtn" aria-label="播放统计" title="播放统计" aria-pressed="false" hidden>${R("chart")}</button>
<div data-player-net="" id="playerNet" role="status" aria-live="polite" hidden></div>
<div data-player-stats="" id="playerStats" role="status" hidden></div>`;
}
-function Sj(e, t = "") {
+function Aj(e, t = "") {
let n = t ? encodeURIComponent(t) : "";
return performance.getEntriesByType("resource").filter((t) => t.name.includes("/stream") && (t.name.includes(`/stream?id=${e}`) || t.name.includes(`/stream/hls/${e}/`)) && (!n || t.name.includes(`session=${n}`)));
}
-function Cj(e, t = "") {
- let n = Sj(e, t), r = n.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), i = n.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
+function jj(e, t = "") {
+ let n = Aj(e, t), r = n.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), i = n.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
return r > 0 && i > 0 ? r * 8 / i : 0;
}
-function wj(e, t, n = "", r = null) {
+function Mj(e, t, n = "", r = null) {
let i = 0;
try {
i = Number(e?.bandwidth?.()) || 0;
} catch {}
- return i > 0 ? i : r ? Number(r.bits) || 0 : Cj(t, n);
+ return i > 0 ? i : r ? Number(r.bits) || 0 : jj(t, n);
}
-function Tj(e) {
+function Nj(e) {
if (!Number.isFinite(e) || e <= 0) return "加载中…";
let t = e / 8;
return t >= 1048576 ? `${(t / 1048576).toFixed(1)} MB/s` : `${Math.max(1, Math.round(t / 1024))} KB/s`;
}
-function Bse(e, t) {
- return e > 0 ? Tj(e) : t > 0 ? `已缓冲 ${Math.round(t)} 秒` : Tj(0);
+function qse(e, t) {
+ return e > 0 ? Nj(e) : t > 0 ? `已缓冲 ${Math.round(t)} 秒` : Nj(0);
}
// src/player/subtitle-style.ts
-var Ej = {
+var Pj = {
font: {
label: "字体",
values: [
@@ -30877,7 +30914,7 @@ var Ej = {
["shadow", "阴影"]
]
}
-}, Dj = {
+}, Fj = {
font: "sans",
size: "100",
color: "white",
@@ -30887,7 +30924,7 @@ var Ej = {
window: "black",
windowOpacity: "0",
edge: "shadow"
-}, Oj = "peach.caption-style.v1", Vse = {
+}, Ij = "peach.caption-style.v1", Jse = {
white: "255,255,255",
yellow: "255,255,0",
green: "0,255,0",
@@ -30896,7 +30933,7 @@ var Ej = {
magenta: "255,0,255",
red: "255,0,0",
black: "0,0,0"
-}, Hse = {
+}, Yse = {
sans: "Arial,sans-serif",
mono: "Consolas,monospace",
serif: "Georgia,serif",
@@ -30904,28 +30941,28 @@ var Ej = {
casual: "\"Comic Sans MS\",sans-serif",
cursive: "cursive",
"small-caps": "Arial,sans-serif"
-}, Use = {
+}, Xse = {
none: "none",
raised: "-1px -1px 0 #ddd,1px 1px 0 #222",
depressed: "1px 1px 0 #ddd,-1px -1px 0 #222",
outline: "-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000",
shadow: "2px 2px 3px #000"
};
-function Wse() {
+function Zse() {
let e = {};
try {
- e = JSON.parse(localStorage.getItem(Oj) || "{}") || {};
+ e = JSON.parse(localStorage.getItem(Ij) || "{}") || {};
} catch {}
- return Object.fromEntries(Object.entries(Dj).map(([t, n]) => [t, Ej[t].values.some(([n]) => n === e[t]) ? e[t] : n]));
+ return Object.fromEntries(Object.entries(Fj).map(([t, n]) => [t, Pj[t].values.some(([n]) => n === e[t]) ? e[t] : n]));
}
-function kj(e, t, n, r) {
- let i = Wse(), a = /* @__PURE__ */ new Set(), o = document.createElement("div");
+function Lj(e, t, n, r) {
+ let i = Zse(), a = /* @__PURE__ */ new Set(), o = document.createElement("div");
o.className = "vjs-peach-captions", o.setAttribute("aria-hidden", "true");
let s = document.createElement("div");
s.className = "vjs-peach-caption-window", o.append(s), e.querySelector("media-container").append(o), e.dataset.peachCaptions = "";
let c = () => {
- let t = (e, t) => `rgba(${Vse[e]},${Number(t) / 100})`;
- e.style.setProperty("--peach-caption-font", Hse[i.font]), e.style.setProperty("--peach-caption-scale", String(Number(i.size) / 100)), e.style.setProperty("--peach-caption-color", t(i.color, i.opacity)), e.style.setProperty("--peach-caption-background", t(i.background, i.backgroundOpacity)), e.style.setProperty("--peach-caption-window", t(i.window, i.windowOpacity)), e.style.setProperty("--peach-caption-edge", Use[i.edge]), e.style.setProperty("--peach-caption-variant", i.font === "small-caps" ? "small-caps" : "normal");
+ let t = (e, t) => `rgba(${Jse[e]},${Number(t) / 100})`;
+ e.style.setProperty("--peach-caption-font", Yse[i.font]), e.style.setProperty("--peach-caption-scale", String(Number(i.size) / 100)), e.style.setProperty("--peach-caption-color", t(i.color, i.opacity)), e.style.setProperty("--peach-caption-background", t(i.background, i.backgroundOpacity)), e.style.setProperty("--peach-caption-window", t(i.window, i.windowOpacity)), e.style.setProperty("--peach-caption-edge", Xse[i.edge]), e.style.setProperty("--peach-caption-variant", i.font === "small-caps" ? "small-caps" : "normal");
}, l = () => {
s.replaceChildren();
for (let e of t.textTracks) if (e.mode === "showing" && ["subtitles", "captions"].includes(e.kind)) for (let t of Array.from(e.activeCues || [])) {
@@ -30941,15 +30978,15 @@ function kj(e, t, n, r) {
if (!n.aborted) {
if (e.caption_style) {
let t = {
- ...Dj,
+ ...Fj,
...e.caption_style
};
- for (let e of Object.keys(Dj)) a.has(e) || (i[e] = t[e]);
+ for (let e of Object.keys(Fj)) a.has(e) || (i[e] = t[e]);
c();
} else {
let e = !1;
try {
- e = !!localStorage.getItem(Oj);
+ e = !!localStorage.getItem(Ij);
} catch {}
e && !a.size && r.save({ caption_style: i }).catch(() => {});
}
@@ -30957,18 +30994,18 @@ function kj(e, t, n, r) {
}), {
current: () => i,
set(e, t) {
- Ej[e].values.some(([e]) => e === t) && (a.add(e), i = {
+ Pj[e].values.some(([e]) => e === t) && (a.add(e), i = {
...i,
[e]: t
}, c(), r?.save({ caption_style: { [e]: t } }).catch(() => {}));
},
reset() {
- Object.keys(Dj).forEach((e) => a.add(e)), i = { ...Dj }, c(), r?.save({ caption_style: i }).catch(() => {});
+ Object.keys(Fj).forEach((e) => a.add(e)), i = { ...Fj }, c(), r?.save({ caption_style: i }).catch(() => {});
}
};
}
// src/player/memory.ts
-var Aj = /* @__PURE__ */ new Map(), jj = /* @__PURE__ */ new WeakMap(), Gse = class {
+var Rj = /* @__PURE__ */ new Map(), zj = /* @__PURE__ */ new WeakMap(), Qse = class {
cleanup = new AbortController();
reading;
listeners = /* @__PURE__ */ new Set();
@@ -30996,8 +31033,8 @@ var Aj = /* @__PURE__ */ new Map(), jj = /* @__PURE__ */ new WeakMap(), Gse = cl
}
load() {
return this.url ? this.reading ||= (async () => {
- await Aj.get(this.url)?.catch(() => {});
- let e = await on(this.url, { signal: this.cleanup.signal });
+ await Rj.get(this.url)?.catch(() => {});
+ let e = await xn(this.url, { signal: this.cleanup.signal });
return this.cleanup.signal.aborted || (this.restored = e, this.restorers.forEach((t) => t(e)), this.changed()), e;
})().catch((e) => {
throw this.reading = void 0, this.cleanup.signal.aborted || (this.error = "播放记忆未读取,请重试", this.changed()), e;
@@ -31008,7 +31045,7 @@ var Aj = /* @__PURE__ */ new Map(), jj = /* @__PURE__ */ new WeakMap(), Gse = cl
}
save(e) {
if (!this.url) return Promise.resolve();
- let t = (Aj.get(this.url) || Promise.resolve()).catch(() => {}).then(async () => {
+ let t = (Rj.get(this.url) || Promise.resolve()).catch(() => {}).then(async () => {
let t = {
...this.unsaved,
...e,
@@ -31035,8 +31072,8 @@ var Aj = /* @__PURE__ */ new Map(), jj = /* @__PURE__ */ new WeakMap(), Gse = cl
this.changed();
}
});
- return Aj.set(this.url, t), t.finally(() => {
- Aj.get(this.url) === t && Aj.delete(this.url);
+ return Rj.set(this.url, t), t.finally(() => {
+ Rj.get(this.url) === t && Rj.delete(this.url);
}).catch(() => {}), t;
}
async retry() {
@@ -31045,12 +31082,12 @@ var Aj = /* @__PURE__ */ new Map(), jj = /* @__PURE__ */ new WeakMap(), Gse = cl
} catch {}
}
};
-function Mj(e) {
- let t = jj.get(e);
- return t || (t = new Gse(e), jj.set(e, t)), t;
+function Bj(e) {
+ let t = zj.get(e);
+ return t || (t = new Qse(e), zj.set(e, t)), t;
}
-function Nj(e, t) {
- let n = Mj(e), r = Number(e.playbackRate()) || 1, i = !1, a = () => {
+function Vj(e, t) {
+ let n = Bj(e), r = Number(e.playbackRate()) || 1, i = !1, a = () => {
t.defaultPlaybackRate = r, Number(e.playbackRate()) !== r && e.playbackRate(r);
};
return n.restore((t) => {
@@ -31063,7 +31100,7 @@ function Nj(e, t) {
};
}
// src/player/subtitle-memory.ts
-var Pj = class {
+var Hj = class {
player;
video;
changed;
@@ -31074,7 +31111,7 @@ var Pj = class {
ready;
error = "";
constructor(e, t, n = () => {}) {
- this.player = e, this.video = t, this.changed = n, this.memory = Mj(e);
+ this.player = e, this.video = t, this.changed = n, this.memory = Bj(e);
let r = this.cleanup.signal;
t.textTracks.addEventListener("addtrack", () => {
this.apply(), this.changed();
@@ -31171,7 +31208,7 @@ var Pj = class {
throw a.remove(), URL.revokeObjectURL(i), e;
}
}
-}, Fj = () => "<svg viewBox=\"0 0 36 36\" aria-hidden=\"true\"><path d=\"M11,11 C9.89,11 9,11.9 9,13 L9,23 C9,24.1 9.89,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M17,17 L15.5,17 L15.5,16.5 L13.5,16.5 L13.5,19.5 L15.5,19.5 L15.5,19 L17,19 L17,20 C17,20.55 16.55,21 16,21 L13,21 C12.45,21 12,20.55 12,20 L12,16 C12,15.45 12.45,15 13,15 L16,15 C16.55,15 17,15.45 17,16 L17,17 L17,17 Z M24,17 L22.5,17 L22.5,16.5 L20.5,16.5 L20.5,19.5 L22.5,19.5 L22.5,19 L24,19 L24,20 C24,20.55 23.55,21 23,21 L20,21 C19.45,21 19,20.55 19,20 L19,16 C19,15.45 19.45,15 20,15 L23,15 C23.55,15 24,15.45 24,16 L24,17 L24,17 Z\"/></svg>", Kse = class {
+}, Uj = () => "<svg viewBox=\"0 0 36 36\" aria-hidden=\"true\"><path d=\"M11,11 C9.89,11 9,11.9 9,13 L9,23 C9,24.1 9.89,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M17,17 L15.5,17 L15.5,16.5 L13.5,16.5 L13.5,19.5 L15.5,19.5 L15.5,19 L17,19 L17,20 C17,20.55 16.55,21 16,21 L13,21 C12.45,21 12,20.55 12,20 L12,16 C12,15.45 12.45,15 13,15 L16,15 C16.55,15 17,15.45 17,16 L17,17 L17,17 Z M24,17 L22.5,17 L22.5,16.5 L20.5,16.5 L20.5,19.5 L22.5,19.5 L22.5,19 L24,19 L24,20 C24,20.55 23.55,21 23,21 L20,21 C19.45,21 19,20.55 19,20 L19,16 C19,15.45 19.45,15 20,15 L23,15 C23.55,15 24,15.45 24,16 L24,17 L24,17 Z\"/></svg>", $se = class {
player;
video;
panels;
@@ -31190,7 +31227,7 @@ var Pj = class {
more = !1;
searched = !1;
constructor(e, t, n) {
- this.player = e, this.video = t, this.panels = n, this.styles = kj(e.el(), t, this.cleanup.signal, Mj(e)), this.cc = e.el().querySelector(".vjs-subtitles-control > button"), this.cc.innerHTML = Fj(), this.cc.onclick = () => {
+ this.player = e, this.video = t, this.panels = n, this.styles = Lj(e.el(), t, this.cleanup.signal, Bj(e)), this.cc = e.el().querySelector(".vjs-subtitles-control > button"), this.cc.innerHTML = Uj(), this.cc.onclick = () => {
let e = this.tracks().find((e) => e.mode === "showing");
e ? (this.last = e, this.select(null)) : this.tracks().length ? this.select(this.last && this.tracks().includes(this.last) ? this.last : this.tracks()[0]) : this.show();
}, this.input.type = "file", this.input.accept = ".srt,.ass,.ssa,.vtt", this.input.hidden = !0, this.input.setAttribute("aria-label", "加载字幕文件"), e.el().append(this.input), this.input.addEventListener("change", () => {
@@ -31200,7 +31237,7 @@ var Pj = class {
this.sync(), this.page === "tracks" && this.show(0);
}, { signal: this.cleanup.signal }), e.on("dispose", () => {
this.hide(), this.cleanup.abort();
- }), this.session = new Pj(e, t, () => {
+ }), this.session = new Hj(e, t, () => {
this.sync(), this.page === "tracks" && this.show(0);
}), this.sync();
}
@@ -31248,7 +31285,7 @@ var Pj = class {
}
options(e = 1) {
this.page = "options";
- let t = this.styles.current(), n = this.panel(this.header("字幕选项") + `<div class="vjs-peach-panel-menu">${Object.entries(Ej).map(([e, n]) => {
+ let t = this.styles.current(), n = this.panel(this.header("字幕选项") + `<div class="vjs-peach-panel-menu">${Object.entries(Pj).map(([e, n]) => {
let r = n.values.find(([n]) => n === t[e])?.[1] || "";
return `<button type="button" class="vjs-peach-caption-setting" data-subtitle-style="${e}"><span>${z(n.label)}</span><b>${z(r)}</b>${R("player-menu-next")}</button>`;
}).join("")}<button type="button" class="vjs-peach-caption-action" data-subtitle-reset>重置</button></div>`, () => this.show(-1), e);
@@ -31260,7 +31297,7 @@ var Pj = class {
}
styleOptions(e) {
this.page = "style";
- let t = Ej[e];
+ let t = Pj[e];
this.panel(this.header(t.label) + `<div class="vjs-peach-panel-menu">${t.values.map(([t, n]) => {
let r = this.styles.current()[e] === t;
return `<button type="button" class="vjs-peach-menu-option" role="menuitemradio" aria-checked="${r}" data-subtitle-value="${z(t)}"><span class="vjs-peach-option-check">${r ? R("check") : ""}</span><span class="vjs-peach-option-label">${z(n)}</span></button>`;
@@ -31272,7 +31309,7 @@ var Pj = class {
}
status(e, t = !1, n = !1) {
let r = this.player.el().querySelector(".vjs-peach-panel:not(.vjs-peach-panel-leaving) [data-subtitle-status]");
- r && (r.hidden = !1, r.innerHTML = `${n ? xs("") : ""}<span>${z(e)}</span>`, r.toggleAttribute("data-error", t));
+ r && (r.hidden = !1, r.innerHTML = `${n ? Is("") : ""}<span>${z(e)}</span>`, r.toggleAttribute("data-error", t));
}
busy() {
return this.request?.abort(), this.request = new AbortController(), this.request.signal;
@@ -31325,9 +31362,9 @@ var Pj = class {
async runSearch(e, t = this.offset) {
if (e.getAttribute("aria-busy") === "true") return;
let n = this.busy(), r = this.generation, i = e.querySelector("[data-subtitle-more],[data-subtitle-retry]"), a = e.querySelector("[data-subtitle-results]");
- e.setAttribute("aria-busy", "true"), i && kc(i), a.inert = !0, this.status("正在搜索字幕", !1, !0);
+ e.setAttribute("aria-busy", "true"), i && Wc(i), a.inert = !0, this.status("正在搜索字幕", !1, !0);
try {
- let i = await on(`/api/subtitles/search?q=${encodeURIComponent(this.query)}&offset=${t}`, { signal: n });
+ let i = await xn(`/api/subtitles/search?q=${encodeURIComponent(this.query)}&offset=${t}`, { signal: n });
if (n.aborted || r !== this.generation) return;
this.offset = t, this.results.push(...i.results), this.more = i.more, this.searched = !0, this.searchResults(e);
} catch (i) {
@@ -31335,7 +31372,7 @@ var Pj = class {
this.runSearch(e, t);
});
} finally {
- e.removeAttribute("aria-busy"), i && kc(i, !1), a.inert = !1;
+ e.removeAttribute("aria-busy"), i && Wc(i, !1), a.inert = !1;
}
}
async showFiles(e) {
@@ -31345,7 +31382,7 @@ var Pj = class {
}), n = this.busy(), r = this.generation;
this.status("正在读取字幕文件", !1, !0);
try {
- let i = await on(`/api/subtitles/subtitlecat/${e.id}`, { signal: n });
+ let i = await xn(`/api/subtitles/subtitlecat/${e.id}`, { signal: n });
if (n.aborted || r !== this.generation) return;
let a = i.files.filter((e) => e.playable);
t.querySelector("[data-subtitle-files]").innerHTML = a.map((e) => `<button type="button" class="vjs-peach-subtitle-result" data-subtitle-online="${e.index}"><span>${z(e.name)}</span><small>${z(e.language)}</small></button>`).join(""), this.status(a.length ? "选择要加载的字幕" : "这条结果没有可加载的文本字幕"), t.querySelectorAll("[data-subtitle-online]").forEach((t) => {
@@ -31376,7 +31413,7 @@ var Pj = class {
}
};
// src/player/timeline.ts
-function qse(e, t) {
+function ece(e, t) {
if (!Number.isFinite(e) || e < 0 || t.frames <= 0) return null;
if (!t.cues?.length) return t.interval > 0 ? Math.min(t.frames - 1, Math.floor(e / t.interval)) : null;
let n = 0, r = t.cues.length;
@@ -31388,8 +31425,8 @@ function qse(e, t) {
return !a || e >= a[1] && (i !== t.cues.length - 1 || e !== a[1]) ? null : i;
}
// src/player/rotation.ts
-function Ij(e, t) {
- let n = 0, r = !1, i = Mj(e), a = e.el(), o = a.querySelector("media-container") || a, s = [
+function Wj(e, t) {
+ let n = 0, r = !1, i = Bj(e), a = e.el(), o = a.querySelector("media-container") || a, s = [
"width",
"height",
"inset",
@@ -31417,7 +31454,7 @@ function Ij(e, t) {
};
}
// src/player/pip.ts
-function Jse(e, t, n, r) {
+function tce(e, t, n, r) {
let i = e.el().querySelector("video");
if (!i || !t) return;
let a = t, o = !!document.pictureInPictureEnabled && typeof i.requestPictureInPicture == "function" || typeof i.webkitSetPresentationMode == "function";
@@ -31449,7 +31486,7 @@ function Jse(e, t, n, r) {
});
}
// src/player/controls.ts
-function Lj(e, t, n = "") {
+function Gj(e, t, n = "") {
if (!e) return () => {};
let r = e.querySelector(":scope>.vjs-peach-tooltip");
r || (r = document.createElement("span"), r.className = "vjs-peach-tooltip", r.setAttribute("role", "tooltip"), r.innerHTML = "<span class=\"vjs-peach-tooltip-text\"></span><kbd hidden></kbd>", e.append(r));
@@ -31460,27 +31497,27 @@ function Lj(e, t, n = "") {
};
return o(), o;
}
-function Rj(e, t) {
+function Kj(e, t) {
e?.closest(".video-js")?.querySelector(`.vjs-control-bar ${t}`)?.click();
}
-function Yse(e, t = !0) {
- let n = oj(), r = n.settings();
+function nce(e, t = !0) {
+ let n = mj(), r = n.settings();
r.ambientMode = !!e, t && n.saveSettings(), n.stage()?.toggleAttribute("data-ambient", r.ambientMode), document.dispatchEvent(new CustomEvent("peachambientchange", { detail: { enabled: r.ambientMode } }));
}
-var zj = /* @__PURE__ */ new WeakMap();
-function Bj(e) {
+var qj = /* @__PURE__ */ new WeakMap();
+function Jj(e) {
if (!e) return;
- let t = oj().settings().theaterMode;
- e.setAttribute("aria-pressed", String(t)), e.querySelector("use")?.setAttribute("href", t ? "#i-theater-exit" : "#i-theater-enter"), zj.get(e)?.(t ? "默认视图" : "影院模式");
+ let t = mj().settings().theaterMode;
+ e.setAttribute("aria-pressed", String(t)), e.querySelector("use")?.setAttribute("href", t ? "#i-theater-exit" : "#i-theater-enter"), qj.get(e)?.(t ? "默认视图" : "影院模式");
}
-function Vj(e, t = !0) {
- let n = oj(), r = n.settings();
+function Yj(e, t = !0) {
+ let n = mj(), r = n.settings();
r.theaterMode = !!e, t && n.saveSettings();
let i = n.stage();
- i?.toggleAttribute("data-theater", r.theaterMode), Bj(i?.querySelector("[data-player-theater]")), mj(fj());
+ i?.toggleAttribute("data-theater", r.theaterMode), Jj(i?.querySelector("[data-player-theater]")), Sj(bj());
}
-function Xse(e) {
- let t = oj().stage(), n = t?.querySelector("[data-ambient-canvas]");
+function rce(e) {
+ let t = mj().stage(), n = t?.querySelector("[data-ambient-canvas]");
if (!t || !n) return () => {};
let r = n.getContext("2d", { alpha: !1 });
if (!r) return () => {};
@@ -31503,9 +31540,9 @@ function Xse(e) {
}, u = (t) => {
e.requestVideoFrameCallback ? e.requestVideoFrameCallback((e) => d(t, e)) : requestAnimationFrame((e) => d(t, e));
}, d = (t, n) => {
- i || t !== o || (oj().settings().ambientMode ? e.paused || (!document.hidden && n - a > 480 && (a = n, l()), u(t)) : c());
+ i || t !== o || (mj().settings().ambientMode ? e.paused || (!document.hidden && n - a > 480 && (a = n, l()), u(t)) : c());
}, f = () => {
- !i && oj().settings().ambientMode && (l(), e.paused || u(++o));
+ !i && mj().settings().ambientMode && (l(), e.paused || u(++o));
}, p = (e) => {
let n = !!e.detail.enabled;
t.toggleAttribute("data-ambient", n), n ? f() : (o++, c());
@@ -31514,7 +31551,7 @@ function Xse(e) {
i = !0, o++, document.removeEventListener("peachambientchange", p), e.removeEventListener("play", f), e.removeEventListener("loadeddata", f), c();
};
}
-function Hj(e, t, n = 0, r = null) {
+function Xj(e, t, n = 0, r = null) {
let i = e.el().querySelector(".vjs-control-bar");
if (!i || i.querySelector("[data-player-quality]")) return;
let a = document.createElement("div");
@@ -31524,8 +31561,8 @@ function Hj(e, t, n = 0, r = null) {
let o = i.querySelector(".vjs-fullscreen-control");
i.insertBefore(a, o || null);
let s = a.querySelector("button"), c = a.querySelector("[data-player-quality-badge]");
- Lj(s, "设置");
- let l = a.querySelector(".vjs-peach-settings-menu"), u = Ij(e, t), d = Nj(e, t), f = Mj(e), p, m = typeof e.qualityLevels == "function" ? e.qualityLevels() : null, h = r, g = "auto", _ = (e, t) => {
+ Gj(s, "设置");
+ let l = a.querySelector(".vjs-peach-settings-menu"), u = Wj(e, t), d = Vj(e, t), f = Bj(e), p, m = typeof e.qualityLevels == "function" ? e.qualityLevels() : null, h = r, g = "auto", _ = (e, t) => {
let n = [Number(e), Number(t)].filter((e) => e > 0);
return n.length ? Math.min(...n) : 0;
}, v = () => {
@@ -31564,11 +31601,11 @@ function Hj(e, t, n = 0, r = null) {
active: n
};
}, b = () => l.getAttribute("aria-hidden") !== "true", x = (e) => {
- l.setAttribute("aria-hidden", String(!e)), s.setAttribute("aria-expanded", String(e)), e || p?.hide(), e && document.dispatchEvent(new CustomEvent(bj, { detail: "settings" }));
+ l.setAttribute("aria-hidden", String(!e)), s.setAttribute("aria-expanded", String(e)), e || p?.hide(), e && document.dispatchEvent(new CustomEvent(Oj, { detail: "settings" }));
}, S = () => x(!1), C = (e) => {
e.detail !== "settings" && S();
};
- document.addEventListener(bj, C);
+ document.addEventListener(Oj, C);
let w = null, T = 0, E = (e, t) => {
let n = ++T;
w && (clearTimeout(w), w = null, l.classList.remove("vjs-peach-popup-animating"), l.style.height = ""), l.querySelectorAll(".vjs-peach-panel-leaving").forEach((e) => e.remove()), l.scrollTop = 0;
@@ -31584,15 +31621,15 @@ function Hj(e, t, n = 0, r = null) {
}), i;
}, D = (e, t) => e.querySelector(t), O = "main", k = (e = 0) => {
O = "main";
- let { active: t } = y(), n = d.current(), r = E(`<div class="vjs-peach-panel-menu"><button type="button" class="vjs-peach-menu-row" role="menuitemcheckbox" data-player-ambient aria-checked="${oj().settings().ambientMode}">
+ let { active: t } = y(), n = d.current(), r = E(`<div class="vjs-peach-panel-menu"><button type="button" class="vjs-peach-menu-row" role="menuitemcheckbox" data-player-ambient aria-checked="${mj().settings().ambientMode}">
${R("player-ambient")}<span>氛围模式</span><i class="vjs-peach-switch" aria-hidden="true"></i></button>
<button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-speed>${R("player-speed")}<span>播放速度</span><b>${n === 1 ? "正常" : `${n}×`}</b>${R("player-menu-next")}</button>
- <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-subtitles><span class="vjs-peach-menu-cc" aria-hidden="true">${Fj()}</span><span>字幕</span><b>${z(p?.label() || "关闭")}</b>${R("player-menu-next")}</button>
+ <button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-subtitles><span class="vjs-peach-menu-cc" aria-hidden="true">${Uj()}</span><span>字幕</span><b>${z(p?.label() || "关闭")}</b>${R("player-menu-next")}</button>
<button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-rotation>${R("rotate-cw", "vjs-peach-menu-line-icon")}<span>画面旋转</span><b>${u.angle()}°</b>${R("player-menu-next")}</button>
<button type="button" class="vjs-peach-menu-row" role="menuitem" data-player-quality-view>${R("player-quality")}<span>清晰度</span><b>${z(t.label)}</b>${R("player-menu-next")}</button>
<div data-player-memory-error hidden><p class="vjs-peach-subtitle-status" role="status"></p><button type="button" class="vjs-peach-menu-row" data-player-memory-retry>重试保存播放记忆</button></div></div>`, e);
D(r, "[data-player-ambient]").onclick = () => {
- Yse(!oj().settings().ambientMode), k();
+ nce(!mj().settings().ambientMode), k();
}, D(r, "[data-player-speed]").onclick = () => ne(), D(r, "[data-player-subtitles]").onclick = () => p?.show(), D(r, "[data-player-quality-view]").onclick = () => re(), D(r, "[data-player-rotation]").onclick = () => j(), D(r, "[data-player-memory-retry]").onclick = () => {
f.retry();
}, A();
@@ -31696,8 +31733,8 @@ function Hj(e, t, n = 0, r = null) {
A(), ie();
});
return e.on("dispose", () => {
- F(), t.removeEventListener("loadedmetadata", ie), t.removeEventListener("resize", ie), t.removeEventListener("ratechange", ie), T++, document.removeEventListener("pointerdown", P), document.removeEventListener(bj, C), w && clearTimeout(w);
- }), p = new Kse(e, t, {
+ F(), t.removeEventListener("loadedmetadata", ie), t.removeEventListener("resize", ie), t.removeEventListener("ratechange", ie), T++, document.removeEventListener("pointerdown", P), document.removeEventListener(Oj, C), w && clearTimeout(w);
+ }), p = new $se(e, t, {
render: E,
open: () => {
O = "subtitles", x(!0);
@@ -31706,21 +31743,21 @@ function Hj(e, t, n = 0, r = null) {
back: () => {
p?.hide(), k(-1);
}
- }), y(), Zse(e, a), Qse(e), (e) => {
+ }), y(), ice(e, a), ace(e), (e) => {
h = e?.length ? e : null, ie();
};
}
-function Zse(e, t) {
+function ice(e, t) {
let n = e.el().querySelector(".vjs-control-bar");
if (!n || n.querySelector("[data-player-theater]")) return;
- let r = oj().settings().theaterMode, i = document.createElement("div");
+ let r = mj().settings().theaterMode, i = document.createElement("div");
i.className = "vjs-peach-theater vjs-control", i.innerHTML = `<button type="button" data-player-theater aria-pressed="${r}">${R(r ? "theater-exit" : "theater-enter")}</button>`, n.insertBefore(i, t.nextSibling);
let a = i.querySelector("button");
- zj.set(a, Lj(a, "影院模式", "T")), Bj(a), a.onclick = (e) => {
- e.stopPropagation(), Vj(!oj().settings().theaterMode);
+ qj.set(a, Gj(a, "影院模式", "T")), Jj(a), a.onclick = (e) => {
+ e.stopPropagation(), Yj(!mj().settings().theaterMode);
};
}
-function Qse(e) {
+function ace(e) {
let t = e.el().querySelector(".vjs-control-bar");
if (!t || t.querySelector(".vjs-peach-right-controls")) return;
let n = t.querySelector(":scope>.vjs-play-control");
@@ -31732,7 +31769,7 @@ function Qse(e) {
e.dataset.peachExplicitIcon = "";
let r = document.createElementNS("http://www.w3.org/2000/svg", "svg");
return r.setAttribute("viewBox", n.getAttribute("viewBox") || ""), r.setAttribute("aria-hidden", "true"), r.setAttribute("class", "vjs-peach-control-icon vjs-peach-morph-icon"), r.innerHTML = n.innerHTML, e.append(r), r;
- }, a = (e) => [...document.getElementById(`i-${e}`)?.querySelectorAll("path") || []], o = i(n, "player-play")?.querySelector("path"), s = a("player-play")[0]?.getAttribute("d") || "", c = a("player-pause")[0]?.getAttribute("d") || "", l = Lj(n, "播放", "K"), u = CSS.supports("d", "path(\"M0 0\")"), d = () => {
+ }, a = (e) => [...document.getElementById(`i-${e}`)?.querySelectorAll("path") || []], o = i(n, "player-play")?.querySelector("path"), s = a("player-play")[0]?.getAttribute("d") || "", c = a("player-pause")[0]?.getAttribute("d") || "", l = Gj(n, "播放", "K"), u = CSS.supports("d", "path(\"M0 0\")"), d = () => {
let t = e.paused() || e.ended(), n = t ? s : c;
o && (u ? o.style.setProperty("d", `path("${n}")`) : o.setAttribute("d", n)), l(t ? "播放" : "暂停");
};
@@ -31743,7 +31780,7 @@ function Qse(e) {
], d), d();
let f = t.querySelector(":scope>.vjs-volume-panel"), p = f?.querySelector(":scope>.vjs-mute-control"), m = i(p, "player-volume");
m && a("player-volume-muted").forEach((e) => m.append(e.cloneNode(!0)));
- let h = Lj(p, "静音", "M"), g = () => {
+ let h = Gj(p, "静音", "M"), g = () => {
let t = e.muted() || e.volume() === 0;
m && (m.dataset.silent = String(t), m.dataset.loud = String(!t && e.volume() > .5)), h(t ? "取消静音" : "静音");
};
@@ -31769,9 +31806,9 @@ function Qse(e) {
});
let x = document.createElement("button"), S = !1;
x.type = "button", x.className = "vjs-peach-time vjs-control", x.dataset.playerTime = "", x.innerHTML = "<span class=\"vjs-peach-time-text\"></span>";
- let C = x.querySelector(".vjs-peach-time-text"), w = Lj(x, "显示剩余时间"), T = () => {
- let t = Math.max(0, Number(e.currentTime()) || 0), n = Math.max(0, Number(e.duration()) || 0), r = An(Math.max(0, n - t));
- C.textContent = `${S ? `-${r}` : An(t)} / ${An(n)}`, x.dataset.remaining = String(S), w(S ? "显示已播放时间" : "显示剩余时间", S ? `剩余 ${r},总时长 ${An(n)};点击显示已播放时间` : `已播放 ${An(t)},总时长 ${An(n)};点击显示剩余时间`);
+ let C = x.querySelector(".vjs-peach-time-text"), w = Gj(x, "显示剩余时间"), T = () => {
+ let t = Math.max(0, Number(e.currentTime()) || 0), n = Math.max(0, Number(e.duration()) || 0), r = Gn(Math.max(0, n - t));
+ C.textContent = `${S ? `-${r}` : Gn(t)} / ${Gn(n)}`, x.dataset.remaining = String(S), w(S ? "显示已播放时间" : "显示剩余时间", S ? `剩余 ${r},总时长 ${Gn(n)};点击显示已播放时间` : `已播放 ${Gn(t)},总时长 ${Gn(n)};点击显示剩余时间`);
};
x.onclick = (e) => {
e.stopPropagation(), S = !S, T();
@@ -31781,10 +31818,10 @@ function Qse(e) {
"loadedmetadata"
], T), T(), f ? f.insertAdjacentElement("afterend", x) : t.append(x);
let E = t.querySelector(":scope>.vjs-picture-in-picture-control");
- Lj(t.querySelector(".vjs-subtitles-control>button"), "字幕"), r(E, "player-pip"), Jse(e, E, Lj(E, "画中画"), (e) => oj().toast(e, { warn: !0 }));
- let D = t.querySelector(":scope>.vjs-fullscreen-control"), O = r(D, "player-fullscreen-enter"), k = Lj(D, "全屏", "F"), A = () => {
+ Gj(t.querySelector(".vjs-subtitles-control>button"), "字幕"), r(E, "player-pip"), tce(e, E, Gj(E, "画中画"), (e) => mj().toast(e, { warn: !0 }));
+ let D = t.querySelector(":scope>.vjs-fullscreen-control"), O = r(D, "player-fullscreen-enter"), k = Gj(D, "全屏", "F"), A = () => {
let t = !!e.isFullscreen();
- e.el().toggleAttribute("data-peach-fullscreen", t), O?.setAttribute("href", t ? "#i-player-fullscreen-exit" : "#i-player-fullscreen-enter"), k(t ? "退出全屏" : "全屏"), mj(e);
+ e.el().toggleAttribute("data-peach-fullscreen", t), O?.setAttribute("href", t ? "#i-player-fullscreen-exit" : "#i-player-fullscreen-enter"), k(t ? "退出全屏" : "全屏"), Sj(e);
};
e.on([
"fullscreenchange",
@@ -31805,7 +31842,7 @@ function Qse(e) {
});
let ee = document.createElement("div");
ee.className = "vjs-peach-expand vjs-control", ee.innerHTML = `<button type="button" data-player-expand aria-expanded="false">${R("player-expand")}</button><span class="vjs-peach-hover" aria-hidden="true"></span>`, M.prepend(ee);
- let te = ee.querySelector("button"), ne = Lj(te, "展开控件"), N = (t) => {
+ let te = ee.querySelector("button"), ne = Gj(te, "展开控件"), N = (t) => {
e.el().classList.toggle("vjs-peach-right-expanded", t), te.setAttribute("aria-expanded", String(t)), ne(t ? "收起控件" : "展开控件");
};
te.onclick = (t) => {
@@ -31817,18 +31854,18 @@ function Qse(e) {
}, ie = new ResizeObserver(re);
ie.observe(e.el()), e.on("dispose", () => ie.disconnect()), N(!1), re();
}
-function Uj(e, t, n = {}) {
+function Zj(e, t, n = {}) {
let r = e.el().querySelector(".vjs-control-bar .vjs-progress-control");
if (!r || r.querySelector("[data-player-seek-preview]")) return;
let i = !!t && n.thumbnail !== !1, a = document.createElement("div");
a.className = "vjs-peach-seek-preview", a.dataset.playerSeekPreview = "", a.hidden = !0, a.innerHTML = `${i ? "<i class=\"vjs-peach-seek-frame\" hidden><img alt=\"\"></i>" : ""}<span class="mono">0:00</span>`, r.append(a);
let o = a.querySelector(".vjs-peach-seek-frame"), s = a.querySelector("img"), c = a.querySelector("span"), l = null, u = "", d = !1;
- o && t?.id && on(`/api/timeline?id=${encodeURIComponent(t.id)}`).then((e) => {
+ o && t?.id && xn(`/api/timeline?id=${encodeURIComponent(t.id)}`).then((e) => {
e && e.frames > 0 && (e.interval > 0 || e.cues?.length) && (l = e);
}).catch(() => {});
let f = (e, n, r, i) => {
if (!t) return;
- let a = n.columns || 10, o = a * (n.rows || 10), s = qse(e, n);
+ let a = n.columns || 10, o = a * (n.rows || 10), s = ece(e, n);
if (s === null) return !1;
let c = Math.floor(s / o), l = s % o, f = Math.ceil(Math.min(o, n.frames - c * o) / a);
d = !!n.cues;
@@ -31836,10 +31873,10 @@ function Uj(e, t, n = {}) {
return p !== u && (u = p, i.src = p), r.hidden = !1, t.width && t.height && (r.style.aspectRatio = `${t.width} / ${t.height}`), i.style.objectFit = "fill", i.style.width = `${a * 100}%`, i.style.height = `${f * 100}%`, i.style.left = `${-(l % a) * 100}%`, i.style.top = `${-Math.floor(l / a) * 100}%`, !0;
}, p = -1, m = (n) => {
if (n.pointerType === "touch") return;
- let i = On(e.duration()) || On(t?.duration);
+ let i = Un(e.duration()) || Un(t?.duration);
if (!i) return;
let m = r.getBoundingClientRect(), h = Math.min(1, Math.max(0, (n.clientX - m.left) / m.width)), g = o ? Math.min(240, Math.max(160, m.width * .28)) : 76, _ = Math.min(m.width - g / 2, Math.max(g / 2, n.clientX - m.left));
- if (a.style.left = `${_}px`, a.hidden = !1, c.textContent = An(i * h), !o || !s || !t || l && f(i * h, l, o, s) || l?.fallback && f(i * h, l.fallback, o, s)) return;
+ if (a.style.left = `${_}px`, a.hidden = !1, c.textContent = Gn(i * h), !o || !s || !t || l && f(i * h, l, o, s) || l?.fallback && f(i * h, l.fallback, o, s)) return;
let v = Math.min(8, Math.floor(h * 9));
(v !== p || u !== `poster:${v}`) && (p = v, o.hidden = !1, s.removeAttribute("style"), d = !1, u = `poster:${v}`, s.src = `/poster?id=${encodeURIComponent(t.id)}&c=${v}`);
}, h = () => {
@@ -31853,13 +31890,13 @@ function Uj(e, t, n = {}) {
r.removeEventListener("pointermove", m), r.removeEventListener("pointerleave", h);
});
}
-function $se(e, t) {
+function oce(e, t) {
let n = navigator.mediaSession;
if (!n || typeof n.setActionHandler != "function") return;
- let r = () => On(e.duration()) || On(t.duration) || 0, i = (t) => {
+ let r = () => Un(e.duration()) || Un(t.duration) || 0, i = (t) => {
let n = r();
e.currentTime(Math.max(0, n ? Math.min(n, t) : t));
- }, a = () => Math.max(1, Number(oj().settings().seekSeconds) || 10), o = [
+ }, a = () => Math.max(1, Number(mj().settings().seekSeconds) || 10), o = [
["play", () => {
e.play();
}],
@@ -31900,12 +31937,12 @@ function $se(e, t) {
} catch {}
});
}
-function Wj(e) {
+function Qj(e) {
let t = e.el().querySelector(".vjs-loading-spinner");
t && !t.querySelector(".vjs-peach-spinner-container") && (t.innerHTML = "<span class=\"vjs-peach-spinner-container\"><span class=\"vjs-peach-spinner-rotator\"><span class=\"vjs-peach-spinner-left\"><span class=\"vjs-peach-spinner-circle\"></span></span><span class=\"vjs-peach-spinner-right\"><span class=\"vjs-peach-spinner-circle\"></span></span></span></span>");
}
-function Gj(e, t) {
- on(`/api/assets/${t}/subtitles`).then((t) => {
+function $j(e, t) {
+ xn(`/api/assets/${t}/subtitles`).then((t) => {
e && !e.isDisposed() && (t?.subtitles || []).filter((e) => e.playable).forEach((t) => {
e.addRemoteTextTrack({
id: t.id,
@@ -31920,35 +31957,35 @@ function Gj(e, t) {
}).catch(() => {});
}
// src/player/progress.ts
-var Kj = "peach.playback-position.v1", qj = /* @__PURE__ */ new WeakMap();
-function Jj(e) {
- qj.get(e)?.(), qj.delete(e);
+var eM = "peach.playback-position.v1", tM = /* @__PURE__ */ new WeakMap();
+function nM(e) {
+ tM.get(e)?.(), tM.delete(e);
}
-function Yj(e, t, n = null) {
+function rM(e, t, n = null) {
let r = e === "follow" ? t.id : t.location === "online" ? t.follow_item_id : null;
return r ? `follow:${r}:${n ?? "main"}` : `item:${t.id}`;
}
-function ece(e) {
+function sce(e) {
try {
- let t = localStorage.getItem(`${Kj}:${e}`), n = t === null || !t.trim() ? NaN : Number(t);
+ let t = localStorage.getItem(`${eM}:${e}`), n = t === null || !t.trim() ? NaN : Number(t);
return Number.isFinite(n) && n >= 0 ? n : null;
} catch {
return null;
}
}
-function tce(e, t) {
- let n = ece(e);
+function cce(e, t) {
+ let n = sce(e);
if (n !== null) return n;
let r = Number(t.leave_ratio);
- return r > 0 && r < 1 ? r * On(t.duration) : 0;
+ return r > 0 && r < 1 ? r * Un(t.duration) : 0;
}
-function nce(e, t) {
- Jj(t);
+function lce(e, t) {
+ nM(t);
let n = t.readyState >= 1, r = () => {
if (!n || !Number.isFinite(t.currentTime)) return;
let r = t.ended ? 0 : Math.max(0, t.currentTime);
try {
- localStorage.setItem(`${Kj}:${e}`, String(r));
+ localStorage.setItem(`${eM}:${e}`, String(r));
} catch {}
}, i = () => {
n = !0;
@@ -31962,7 +31999,7 @@ function nce(e, t) {
"pause",
"ended"
]) t.addEventListener(e, r);
- window.addEventListener("pagehide", r), document.addEventListener("visibilitychange", r), qj.set(t, () => {
+ window.addEventListener("pagehide", r), document.addEventListener("visibilitychange", r), tM.set(t, () => {
r(), t.removeEventListener("loadedmetadata", i), t.removeEventListener("emptied", a);
for (let e of [
"timeupdate",
@@ -31974,28 +32011,28 @@ function nce(e, t) {
});
}
// src/player/telemetry.ts
-var Xj = /* @__PURE__ */ new WeakMap();
-function Zj(e) {
- Xj.get(e)?.(), Xj.delete(e);
+var iM = /* @__PURE__ */ new WeakMap();
+function aM(e) {
+ iM.get(e)?.(), iM.delete(e);
}
-function Qj(e, t, n, r) {
+function oM(e, t, n, r) {
let i = () => t(!1), a = () => {
n(), t(!1);
};
- e.addEventListener("seeking", r), e.addEventListener("emptied", a), window.addEventListener("pagehide", i), Xj.set(e, () => {
+ e.addEventListener("seeking", r), e.addEventListener("emptied", a), window.addEventListener("pagehide", i), iM.set(e, () => {
n(), t(!1), e.onplay = null, e.ontimeupdate = null, e.onpause = null, e.onended = null, e.removeEventListener("seeking", r), e.removeEventListener("emptied", a), window.removeEventListener("pagehide", i);
});
}
-function $j(e, t, n = {}) {
+function sM(e, t, n = {}) {
if (!t) return;
let r = 0, i = 0, a = 0, o = null, s = (e) => e ? document.querySelector(e) : null, c = () => {
- let r = On(e.duration) || On(t.duration);
+ let r = Un(e.duration) || Un(t.duration);
if (!r) return;
let i = Math.min(t.currentTime / r, 1), a = s(n.watched), o = s(n.mark), c = s(n.ratio);
a && (a.style.width = `${(i * 100).toFixed(1)}%`), o && (o.style.left = `${(i * 100).toFixed(1)}%`), c && (c.textContent = `${(i * 100).toFixed(0)}%`);
}, l = (n) => {
- let r = On(e.duration) || On(t.duration);
- (i || n || a) && (on("/api/activity", {
+ let r = Un(e.duration) || Un(t.duration);
+ (i || n || a) && (xn("/api/activity", {
method: "POST",
keepalive: !0,
body: JSON.stringify({
@@ -32027,14 +32064,14 @@ function $j(e, t, n = {}) {
u(), l(!1);
}, t.onended = () => {
u(), l(!0), n.onEnded?.();
- }, Qj(t, l, u, () => {
+ }, oM(t, l, u, () => {
a++;
}), c();
}
-function rce(e, t) {
+function uce(e, t) {
let n = 0, r = 0, i = !1, a = null, o = (n) => {
- let i = On(e.duration) || On(t.duration);
- (r || n) && (on("/api/follow/activity", {
+ let i = Un(e.duration) || Un(t.duration);
+ (r || n) && (xn("/api/follow/activity", {
method: "POST",
keepalive: !0,
body: JSON.stringify({
@@ -32049,7 +32086,7 @@ function rce(e, t) {
a && clearInterval(a), a = null;
};
t.onplay = () => {
- i || (i = !0, on("/api/follow/play", {
+ i || (i = !0, xn("/api/follow/play", {
method: "POST",
body: JSON.stringify({ item: e.id })
}).then((t) => {
@@ -32062,22 +32099,22 @@ function rce(e, t) {
s(), o(!1);
}, t.onended = () => {
s(), o(!0);
- }, Qj(t, o, s, () => {});
+ }, oM(t, o, s, () => {});
}
// src/player/dispose.ts
-function eM(e) {
+function cM(e) {
if (!e || e.isDisposed()) return;
let t = e.el()?.querySelector("video");
try {
e.pause();
} catch {}
- t && (Jj(t), Zj(t));
+ t && (nM(t), aM(t));
try {
e.dispose();
} catch {}
}
// src/core/random-id.ts
-function tM() {
+function lM() {
if (typeof crypto.randomUUID == "function") return crypto.randomUUID();
let e = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
@@ -32085,34 +32122,34 @@ function tM() {
return `${t.slice(0, 8)}-${t.slice(8, 12)}-${t.slice(12, 16)}-${t.slice(16, 20)}-${t.slice(20)}`;
}
// src/player/stream.ts
-function nM() {
- return tM();
+function uM() {
+ return lM();
}
-function rM(e, t) {
+function dM(e, t) {
return {
src: `/stream?id=${e.id}&session=${encodeURIComponent(t)}`,
type: String(e.name || "").toLowerCase().endsWith(".webm") ? "video/webm" : "video/mp4"
};
}
-function iM(e) {
+function dce(e) {
return e.location === "online" && e.follow_item_id ? {
src: `/follow-stream?id=${e.follow_item_id}`,
type: "video/mp4"
} : null;
}
-async function aM(e, t) {
- let n = iM(e);
+async function fM(e, t) {
+ let n = dce(e);
if (n) return n;
try {
- let n = await on(`/api/stream-plan?id=${e.id}&session=${encodeURIComponent(t)}`);
+ let n = await xn(`/api/stream-plan?id=${e.id}&session=${encodeURIComponent(t)}`);
if (n?.src) return {
src: n.src,
type: n.mime_type || (n.protocol === "hls" ? "application/vnd.apple.mpegurl" : "video/mp4")
};
} catch {}
- return rM(e, t);
+ return dM(e, t);
}
-function oM(e) {
+function pM(e) {
e && fetch(`/api/stream-cancel?session=${encodeURIComponent(e)}`, {
method: "POST",
credentials: "same-origin",
@@ -32121,22 +32158,22 @@ function oM(e) {
document.documentElement.dataset.peachStreamCancel = JSON.stringify(e);
}).catch(() => {});
}
-var sM = "";
-function cM() {
- return sM;
+var mM = "";
+function hM() {
+ return mM;
}
-function lM() {
- return sM ||= nM(), sM;
+function gM() {
+ return mM ||= uM(), mM;
}
-var uM = (e) => rM(e, lM()), dM = (e) => aM(e, lM());
-function fM() {
- let e = sM;
- e && (sM = "", oM(e));
+var fce = (e) => dM(e, gM()), pce = (e) => fM(e, gM());
+function _M() {
+ let e = mM;
+ e && (mM = "", pM(e));
}
// src/player/v10-player.ts
-var pM = (e) => typeof e == "string" ? [e] : e, mM = (e, t) => {
+var vM = (e) => typeof e == "string" ? [e] : e, yM = (e, t) => {
let n = document.createElement("div"), r = document.createElement("video-player");
- n.className = "video-js vjs-paused vjs-user-active", n.id = e.id || `peach-player-${tM()}`, n.setAttribute("lang", "zh-CN");
+ n.className = "video-js vjs-paused vjs-user-active", n.id = e.id || `peach-player-${lM()}`, n.setAttribute("lang", "zh-CN");
let i = document.createElement("media-container"), a = document.createElement("hlsjs-video");
e.parentNode?.replaceChild(n, e), e.removeAttribute("id"), e.className = "vjs-tech", e.slot = "media", e.controls = !1, e.preload = t.preload === "auto" ? "auto" : t.preload === "none" ? "none" : "metadata", t.poster && (e.poster = String(t.poster)), a.append(e), i.append(a), r.append(i), n.append(r), t.controls !== !1 && i.insertAdjacentHTML("beforeend", "<div class=\"vjs-loading-spinner\" aria-label=\"正在缓冲\"></div>\n <div class=\"vjs-error-display\"><div class=\"vjs-modal-dialog-content\" role=\"alert\"></div></div>\n <div class=\"vjs-control-bar\">\n <media-play-button class=\"vjs-play-control vjs-control vjs-button\" label=\"播放\"></media-play-button>\n <div class=\"vjs-volume-panel vjs-control vjs-volume-panel-horizontal\">\n <media-mute-button class=\"vjs-mute-control vjs-control vjs-button\" label=\"静音\"></media-mute-button>\n <div class=\"vjs-volume-control vjs-volume-horizontal\"><media-volume-slider class=\"vjs-volume-bar vjs-slider vjs-slider-horizontal\" label=\"音量\">\n <media-slider-track><media-slider-fill class=\"vjs-volume-level\"></media-slider-fill></media-slider-track>\n <media-slider-thumb class=\"vjs-volume-thumb\"></media-slider-thumb>\n <media-slider-value class=\"vjs-volume-tooltip\"></media-slider-value>\n </media-volume-slider></div>\n </div>\n <div class=\"vjs-progress-control vjs-control\"><media-time-slider class=\"vjs-progress-holder vjs-slider vjs-slider-horizontal\" label=\"播放进度\">\n <media-slider-track><media-slider-buffer class=\"vjs-load-progress\"></media-slider-buffer><media-slider-fill class=\"vjs-play-progress\"></media-slider-fill></media-slider-track>\n <media-slider-thumb class=\"vjs-progress-thumb\"></media-slider-thumb>\n </media-time-slider></div>\n <div class=\"vjs-subtitles-control vjs-control\"><button type=\"button\" class=\"vjs-button\" aria-label=\"开启字幕\" aria-pressed=\"false\">CC</button></div>\n <media-pip-button class=\"vjs-picture-in-picture-control vjs-control vjs-button\" label=\"画中画\"></media-pip-button>\n <media-fullscreen-button class=\"vjs-fullscreen-control vjs-control vjs-button\" label=\"全屏\"></media-fullscreen-button>\n </div>");
let o = new EventTarget(), s = new AbortController(), c = s.signal, l = !1, u = 0, d = 0, f = 0, p = {
@@ -32231,9 +32268,9 @@ var pM = (e) => typeof e == "string" ? [e] : e, mM = (e, t) => {
e && Array.isArray(e.levels) && !x.has(e) && (x.add(e), e.on("hlsManifestParsed", w), e.on("hlsLevelSwitched", w)), w();
};
return e.addEventListener("loadedmetadata", T, { signal: c }), {
- on: (e, t) => pM(e).forEach((e) => o.addEventListener(e, t, { signal: c })),
- off: (e, t) => pM(e).forEach((e) => o.removeEventListener(e, t)),
- one: (e, t) => pM(e).forEach((e) => o.addEventListener(e, t, {
+ on: (e, t) => vM(e).forEach((e) => o.addEventListener(e, t, { signal: c })),
+ off: (e, t) => vM(e).forEach((e) => o.removeEventListener(e, t)),
+ one: (e, t) => vM(e).forEach((e) => o.addEventListener(e, t, {
once: !0,
signal: c
})),
@@ -32288,7 +32325,7 @@ var pM = (e) => typeof e == "string" ? [e] : e, mM = (e, t) => {
n.id = String(t.id || ""), t.legacyId && (n.dataset.subtitleAlias = String(t.legacyId)), n.kind = String(t.kind || "subtitles"), n.src = String(t.src || ""), n.srclang = String(t.srclang || ""), n.label = String(t.label || ""), e.append(n);
}
};
-}, hM = "/vendor/videojs/10.2.0/", gM = [
+}, bM = "/vendor/videojs/10.2.0/", xM = [
"video-player.js",
"media/hlsjs-video.js",
"media/dash-video.js",
@@ -32306,17 +32343,17 @@ var pM = (e) => typeof e == "string" ? [e] : e, mM = (e, t) => {
"ui/slider-value.js",
"i18n.js",
"locales/zh-CN.js"
-], _M = null;
-function vM() {
- return _M ??= Promise.all(gM.map((e) => import(
+], SM = null;
+function CM() {
+ return SM ??= Promise.all(xM.map((e) => import(
/* @vite-ignore */
- `${hM}${e}`
-))).then(() => mM).catch((e) => {
- throw _M = null, e;
- }), _M;
+ `${bM}${e}`
+))).then(() => yM).catch((e) => {
+ throw SM = null, e;
+ }), SM;
}
// src/player/immerse-player.ts
-var yM = {
+var wM = {
controls: !1,
preload: "auto",
posterImage: !1,
@@ -32328,42 +32365,42 @@ var yM = {
errorDisplay: !1,
textTrackSettings: !1
};
-function bM(e, t) {
+function TM(e, t) {
let { item: n, session: r } = t, i = null, a = !1;
- return Promise.all([aM(n, r), vM().catch(() => null)]).then(([o, s]) => {
+ return Promise.all([fM(n, r), CM().catch(() => null)]).then(([o, s]) => {
if (a) return;
- let c = rM(n, r), l = String(o.type || "").includes("mpegurl");
+ let c = dM(n, r), l = String(o.type || "").includes("mpegurl");
if (!s) e.src = (l ? c : o).src;
else {
- let t = s(e, yM);
- i = t, t.peachItem = n, t.peachPlaybackKey = Yj("item", n);
+ let t = s(e, wM);
+ i = t, t.peachItem = n, t.peachPlaybackKey = rM("item", n);
let r = new AbortController();
- kj(t.el(), e, r.signal, Mj(t)), Ij(t, e), Nj(t, e), t.on("dispose", () => r.abort()), new Pj(t, e), Gj(t, n.id), l && t.one("error", () => {
+ Lj(t.el(), e, r.signal, Bj(t)), Wj(t, e), Vj(t, e), t.on("dispose", () => r.abort()), new Hj(t, e), $j(t, n.id), l && t.one("error", () => {
a || t.src(c);
}), t.src(o);
}
- $j(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
+ sM(n, e, t.onEnded ? { onEnded: t.onEnded } : {}), t.onLoaded?.();
}), () => {
- a || (a = !0, oM(r), i ? eM(i) : (e.pause(), Zj(e), e.removeAttribute("src"), e.load()));
+ a || (a = !0, pM(r), i ? cM(i) : (e.pause(), aM(e), e.removeAttribute("src"), e.load()));
};
}
// src/player/detail-player.ts
-var xM = /* @__PURE__ */ new WeakMap(), SM = null, CM = null, wM = null;
-function TM() {
- SM &&= (clearInterval(SM), null), CM &&= (clearInterval(CM), null), wM &&= (clearTimeout(wM), null);
+var EM = /* @__PURE__ */ new WeakMap(), DM = null, OM = null, kM = null;
+function AM() {
+ DM &&= (clearInterval(DM), null), OM &&= (clearInterval(OM), null), kM &&= (clearTimeout(kM), null);
}
-async function ice(e, t, n, r = {}) {
- let i = fj();
+async function jM(e, t, n, r = {}) {
+ let i = bj();
if (i && !i.isDisposed()) return i;
- let a = oj(), o = r.resume ?? null;
+ let a = mj(), o = r.resume ?? null;
o?.autoplay && (n = !0);
- let s = () => r.source ? Promise.resolve(r.source) : dM(e), c;
+ let s = () => r.source ? Promise.resolve(r.source) : pce(e), c;
try {
- c = await vM();
+ c = await CM();
} catch {
return t.controls = !0, s().then((e) => {
t.addEventListener("loadedmetadata", () => {
- o && o.time > 0 && (t.currentTime = Math.min(o.time, On(t.duration) || o.time));
+ o && o.time > 0 && (t.currentTime = Math.min(o.time, Un(t.duration) || o.time));
}, { once: !0 }), t.src = e.src, n && t.play().catch(() => {});
}).catch(() => {}), null;
}
@@ -32372,7 +32409,7 @@ async function ice(e, t, n, r = {}) {
preload: "metadata",
language: "zh-CN",
responsive: !0,
- poster: r.poster || lo(e, a.settings().javImage),
+ poster: r.poster || To(e, a.settings().javImage),
controlBar: {
pictureInPictureToggle: !0,
currentTimeDisplay: !1,
@@ -32385,15 +32422,15 @@ async function ice(e, t, n, r = {}) {
} }
}
});
- pj(l), l.peachItem = e, l.peachPlaybackKey = r.playbackKey || Yj("item", e), Ise(l), l.on("loadedmetadata", () => {
+ xj(l), l.peachItem = e, l.peachPlaybackKey = r.playbackKey || rM("item", e), Use(l), l.on("loadedmetadata", () => {
let e = l.el()?.querySelector("video");
e?.videoWidth && e.videoHeight && l.el().style.setProperty("--peach-video-ratio", `${e.videoWidth}/${e.videoHeight}`);
});
- let u = On(e.duration), d = {
+ let u = Un(e.duration), d = {
speed: [],
activity: [],
buffer: []
- }, f = Number(r.size ?? e.size) || 0, p = Rse(_j(f, e.duration)), m = 0, h = !1, g = () => fj() === l && !l.isDisposed(), _ = () => {
+ }, f = Number(r.size ?? e.size) || 0, p = Gse(Tj(f, e.duration)), m = 0, h = !1, g = () => bj() === l && !l.isDisposed(), _ = () => {
if (!u || h || !g()) return;
let e = Number(l.duration());
(!Number.isFinite(e) || Math.abs(e - u) > Math.max(2, u * .001)) && (h = !0, l.duration(u), queueMicrotask(() => {
@@ -32404,23 +32441,23 @@ async function ice(e, t, n, r = {}) {
ready: !1,
updateStats: () => {}
};
- xM.set(l, y), y.updateStats = () => {
+ EM.set(l, y), y.updateStats = () => {
let n = y.chrome?.statsPanel;
if (!n || n.hidden || !g()) return;
- let i = t.getVideoPlaybackQuality ? t.getVideoPlaybackQuality() : null, a = t.getBoundingClientRect(), o = `${t.videoWidth || e.width || "?"}×${t.videoHeight || e.height || "?"}`, s = v(), c = cM(), h = s ? Sj(e.id, c) : [], _ = h.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), b = h.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
+ let i = t.getVideoPlaybackQuality ? t.getVideoPlaybackQuality() : null, a = t.getBoundingClientRect(), o = `${t.videoWidth || e.width || "?"}×${t.videoHeight || e.height || "?"}`, s = v(), c = hM(), h = s ? Aj(e.id, c) : [], _ = h.reduce((e, t) => e + (t.transferSize || t.encodedBodySize || 0), 0), b = h.reduce((e, t) => e + (t.duration || 0), 0) / 1e3;
p.sample(t);
- let x = wj(l, e.id, c, s ? null : p) || (b > 0 ? _ * 8 / b : 0), S = s ? _ : p.bitrate > 0 ? p.bytes() : p.seconds, C = Math.max(0, S - m);
+ let x = Mj(l, e.id, c, s ? null : p) || (b > 0 ? _ * 8 / b : 0), S = s ? _ : p.bitrate > 0 ? p.bytes() : p.seconds, C = Math.max(0, S - m);
m = S;
- let w = hj(t);
- yj(d.speed, x), yj(d.activity, C), yj(d.buffer, w);
+ let w = Cj(t);
+ Dj(d.speed, x), Dj(d.activity, C), Dj(d.buffer, w);
let T = String(e.name || ""), E = (T.includes(".") ? T.split(".").pop() || "" : s ? "" : String(l.currentSource()?.type || "").split("/").pop() || "").toUpperCase() || "—", D = x ? `${(x / 1e6).toFixed(1)} Mbps` : "—", O = s || p.bitrate > 0, k = s ? [
"网络活动",
- `${_ ? jn(_) : "—"} · ${h.length} 请求`,
- `最近一秒网络活动 ${C ? jn(C) : "0 B"}`
+ `${_ ? Kn(_) : "—"} · ${h.length} 请求`,
+ `最近一秒网络活动 ${C ? Kn(C) : "0 B"}`
] : [
"已下载",
- O ? `${jn(S)}${f > 0 ? ` / ${jn(f)}` : ""}` : `${S.toFixed(0)} 秒`,
- O ? `最近一秒下载 ${C ? jn(C) : "0 B"}` : `最近一秒下载 ${C.toFixed(1)} 秒`
+ O ? `${Kn(S)}${f > 0 ? ` / ${Kn(f)}` : ""}` : `${S.toFixed(0)} 秒`,
+ O ? `最近一秒下载 ${C ? Kn(C) : "0 B"}` : `最近一秒下载 ${C.toFixed(1)} 秒`
];
n.innerHTML = `<dl>${[
["视频 ID / 会话", c && !r.source ? `${e.id} / ${c.slice(0, 8)}` : `${e.id}`],
@@ -32430,19 +32467,19 @@ async function ice(e, t, n, r = {}) {
[
"连接速度",
D,
- xj(d.speed, "speed", Math.max(1e7, ...d.speed), `连接速度 ${D === "—" ? "暂无数据" : D}`)
+ kj(d.speed, "speed", Math.max(1e7, ...d.speed), `连接速度 ${D === "—" ? "暂无数据" : D}`)
],
[
k[0],
k[1],
- xj(d.activity, "activity", Math.max(1, ...d.activity), k[2])
+ kj(d.activity, "activity", Math.max(1, ...d.activity), k[2])
],
[
"缓冲健康",
`${w.toFixed(1)} 秒`,
- xj(d.buffer, "buffer", 30, `当前可连续播放 ${w.toFixed(1)} 秒`)
+ kj(d.buffer, "buffer", 30, `当前可连续播放 ${w.toFixed(1)} 秒`)
],
- ["播放时间", `${An(t.currentTime)} / ${An(u || l.duration())}`],
+ ["播放时间", `${Gn(t.currentTime)} / ${Gn(u || l.duration())}`],
["日期", (/* @__PURE__ */ new Date()).toLocaleString()]
].map(([e, t, n]) => `<dt>${z(e)}</dt><dd${n ? " data-player-stats-metric=\"\"" : ""}>${n || ""}<span>${z(t)}</span></dd>`).join("")}</dl>`;
}, l.on([
@@ -32456,15 +32493,15 @@ async function ice(e, t, n, r = {}) {
if (!n || l.isDisposed()) return;
let r = v();
r || p.sample(t);
- let i = wj(l, e.id, cM(), r ? null : p), a = r ? Tj(i) : Bse(i, hj(t));
+ let i = Mj(l, e.id, hM(), r ? null : p), a = r ? Nj(i) : qse(i, Cj(t));
n.innerHTML = `${R("gauge")}<span class="sr-only">加载速度</span><span>${z(a)}</span>`;
}, C = () => {
let e = y.chrome?.netBadge;
- e && e.isConnected && (e.hidden = !1, S(), CM && clearInterval(CM), CM = setInterval(S, 500));
+ e && e.isConnected && (e.hidden = !1, S(), OM && clearInterval(OM), OM = setInterval(S, 500));
}, w = () => {
let e = y.chrome?.netBadge;
- e && (wM && clearTimeout(wM), wM = setTimeout(() => {
- e.hidden = !0, CM &&= (clearInterval(CM), null);
+ e && (kM && clearTimeout(kM), kM = setTimeout(() => {
+ e.hidden = !0, OM &&= (clearInterval(OM), null);
}, 1400));
};
return l.on([
@@ -32475,7 +32512,7 @@ async function ice(e, t, n, r = {}) {
], C), l.on(["canplay", "playing"], () => {
S(), w();
}), l.on("error", () => {
- b && !x && !l.isDisposed() ? (x = !0, b = !1, l.src(uM(e)), n && l.play()?.catch(() => {})) : r.checkSourceStatus !== !1 && a.loadSourceStatus().then((t) => {
+ b && !x && !l.isDisposed() ? (x = !0, b = !1, l.src(fce(e)), n && l.play()?.catch(() => {})) : r.checkSourceStatus !== !1 && a.loadSourceStatus().then((t) => {
t[String(e.root_id || e.location)] !== !1 || l.isDisposed() || l.error({
code: 2,
message: `媒体目录无法访问 · ${a.offlineReason(String(e.root_id || e.location))}`
@@ -32483,29 +32520,29 @@ async function ice(e, t, n, r = {}) {
});
}), l.ready(() => {
_();
- let n = Hj(l, t, e.height, r.qualities ?? null);
+ let n = Xj(l, t, e.height, r.qualities ?? null);
r.mediaPromise?.then((t) => {
if (!g()) return;
n?.(t?.qualities?.length ? t.qualities : null);
let r = Number(t?.size) || 0;
- r > 0 && !f && (f = r, p.bitrate = _j(r, e.duration));
- }).catch(() => {}), Uj(l, e, { thumbnail: !r.source }), $se(l, e), Wj(l), r.source || Gj(l, e.id), y.ready = !0, y.chrome?.statsButton && (y.chrome.statsButton.hidden = !1);
+ r > 0 && !f && (f = r, p.bitrate = Tj(r, e.duration));
+ }).catch(() => {}), Zj(l, e, { thumbnail: !r.source }), oce(l, e), Qj(l), r.source || $j(l, e.id), y.ready = !0, y.chrome?.statsButton && (y.chrome.statsButton.hidden = !1);
}), s().then((e) => {
g() && (b = String(e.type || "").includes("mpegurl"), o && o.time > 0 && l.one("loadedmetadata", () => {
if (l.isDisposed()) return;
- let e = On(l.el().querySelector("video")?.duration) || On(l.duration());
+ let e = Un(l.el().querySelector("video")?.duration) || Un(l.duration());
l.currentTime(Math.min(o.time, e || o.time));
}), l.src(e), _(), setTimeout(_, 0), setTimeout(_, 250), n && l.play()?.catch(() => {}));
}).catch(() => {}), l;
}
-var ace = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
-function EM(e, t = null) {
- if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", ace), e.querySelector(":scope > #playerStatsBtn")) return;
+var MM = "<canvas data-ambient-canvas=\"\" width=\"32\" height=\"18\"></canvas>";
+function NM(e, t = null) {
+ if (e.querySelector(":scope > [data-ambient-canvas]") || e.insertAdjacentHTML("afterbegin", MM), e.querySelector(":scope > #playerStatsBtn")) return;
let n = document.createElement("template");
- n.innerHTML = zse(), e.insertBefore(n.content, t);
+ n.innerHTML = Kse(), e.insertBefore(n.content, t);
}
-function DM(e, t) {
- let n = xM.get(e);
+function PM(e, t) {
+ let n = EM.get(e);
if (!n || e.isDisposed()) return () => {};
let r = (e) => t.querySelector(`:scope > #${e}`), i = {
statsButton: r("playerStatsBtn"),
@@ -32517,29 +32554,29 @@ function DM(e, t) {
if (a && o) {
a.hidden = !n.ready;
let e = () => {
- o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), SM &&= (clearInterval(SM), null));
+ o.hidden || (o.hidden = !0, a.setAttribute("aria-pressed", "false"), DM &&= (clearInterval(DM), null));
};
a.onclick = () => {
- o.hidden ? (document.dispatchEvent(new CustomEvent(bj, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), SM && clearInterval(SM), SM = setInterval(n.updateStats, 1e3)) : e();
+ o.hidden ? (document.dispatchEvent(new CustomEvent(Oj, { detail: "stats" })), o.hidden = !1, a.setAttribute("aria-pressed", "true"), n.updateStats(), DM && clearInterval(DM), DM = setInterval(n.updateStats, 1e3)) : e();
};
let t = (t) => {
t.detail !== "stats" && e();
};
- document.addEventListener(bj, t), s = () => document.removeEventListener(bj, t);
+ document.addEventListener(Oj, t), s = () => document.removeEventListener(Oj, t);
}
- let c = e.el().querySelector("video"), l = c ? Xse(c) : () => {}, u = !0, d = () => {
- u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, TM()));
+ let c = e.el().querySelector("video"), l = c ? rce(c) : () => {}, u = !0, d = () => {
+ u && (u = !1, s(), l(), n.chrome === i && (n.chrome = null, AM()));
};
return e.one("dispose", d), d;
}
-function OM(e, t) {
- if (t.kind === "immerse") return bM(e, t);
- let { kind: n, item: r, media: i = null, handedOff: a, onPlayer: o } = t, s = oj(), c = t.chrome === !1 ? null : e.parentElement;
- c && EM(c, e);
- let l = Yj(n, r, i?.index ?? null), u = {
+function FM(e, t) {
+ if (t.kind === "immerse") return TM(e, t);
+ let { kind: n, item: r, media: i = null, handedOff: a, onPlayer: o } = t, s = mj(), c = t.chrome === !1 ? null : e.parentElement;
+ c && NM(c, e);
+ let l = rM(n, r, i?.index ?? null), u = {
playbackKey: l,
resume: t.resume ?? {
- time: tce(l, r),
+ time: cce(l, r),
autoplay: !1
}
};
@@ -32552,43 +32589,43 @@ function OM(e, t) {
checkSourceStatus: !1,
size: i?.size,
poster: r.thumb_url,
- mediaPromise: on(`/follow-qualities?id=${encodeURIComponent(r.id)}`).catch(() => null)
+ mediaPromise: xn(`/follow-qualities?id=${encodeURIComponent(r.id)}`).catch(() => null)
};
else {
- let t = lo(r, s.settings().javImage);
+ let t = To(r, s.settings().javImage);
t && (e.poster = t);
}
let d = null, f = !1, p = () => {}, m = e, h = () => {
- p(), !(d && a?.(d)) && (Jj(m), d ? (fj() === d && (pj(null), TM()), eM(d)) : Zj(m));
+ p(), !(d && a?.(d)) && (nM(m), d ? (bj() === d && (xj(null), AM()), cM(d)) : aM(m));
};
- return ice(r, e, t.autoplay ?? s.settings().detailAutoplay, u).then((t) => {
- d = t, f ? h() : (m = t?.el().querySelector("video") ?? e, nce(l, m), n === "follow" ? rce(r, m) : (m.addEventListener("play", () => {
- on("/api/play", {
+ return jM(r, e, t.autoplay ?? s.settings().detailAutoplay, u).then((t) => {
+ d = t, f ? h() : (m = t?.el().querySelector("video") ?? e, lce(l, m), n === "follow" ? uce(r, m) : (m.addEventListener("play", () => {
+ xn("/api/play", {
method: "POST",
body: JSON.stringify({ id: r.id })
}).catch(() => {});
- }, { once: !0 }), $j(r, m, {
+ }, { once: !0 }), sM(r, m, {
watched: "#watched",
mark: "#mark",
ratio: "#ratioTxt"
- })), t ? (c && (p = DM(t, c)), o?.(t)) : o?.(null));
+ })), t ? (c && (p = PM(t, c)), o?.(t)) : o?.(null));
}), () => {
f = !0, h();
};
}
// src/player/playback.ts
-function kM(e) {
+function IM(e) {
e && (e.paused ? e.play()?.catch(() => {}) : e.pause());
}
-function AM(e, t) {
+function LM(e, t) {
let n = e.duration, r = (e.currentTime || 0) + t;
e.currentTime = Number.isFinite(n) ? Math.max(0, Math.min(n, r)) : Math.max(0, r);
}
// src/player/preview-player.ts
-function oce(e, t, n) {
+function mce(e, t, n) {
e.controls = !1;
let r = !1, i = null;
- return vM().then((a) => {
+ return CM().then((a) => {
if (r) return;
i = a(e, {
controls: !0,
@@ -32613,56 +32650,56 @@ function oce(e, t, n) {
o.on("error", () => {
r || n();
}), o.ready(() => {
- r || o.isDisposed() || (Hj(o, e), Uj(o, null, { thumbnail: !1 }), Wj(o));
+ r || o.isDisposed() || (Xj(o, e), Zj(o, null, { thumbnail: !1 }), Qj(o));
}), o.src(t);
}).catch(() => {
r || n();
}), () => {
- r = !0, eM(i), i || (e.pause(), e.removeAttribute("src"), e.load(), e.remove());
+ r = !0, cM(i), i || (e.pause(), e.removeAttribute("src"), e.load(), e.remove());
};
}
// src/react/catalog-grid/catalog-view.ts
-var jM = "peach.catalog-view.v1", MM = /* @__PURE__ */ new Set(), NM = "cards";
-function PM() {
+var RM = "peach.catalog-view.v1", zM = /* @__PURE__ */ new Set(), BM = "cards";
+function VM() {
try {
- return localStorage.getItem(jM) === "list" ? "list" : "cards";
+ return localStorage.getItem(RM) === "list" ? "list" : "cards";
} catch {
- return NM;
+ return BM;
}
}
-function sce(e) {
- NM = e === "list" ? "list" : "cards";
+function hce(e) {
+ BM = e === "list" ? "list" : "cards";
try {
- localStorage.setItem(jM, NM);
+ localStorage.setItem(RM, BM);
} catch {}
- MM.forEach((e) => e());
+ zM.forEach((e) => e());
}
-function cce(e) {
- MM.add(e);
+function gce(e) {
+ zM.add(e);
let t = (t) => {
- (t.key === jM || t.key === null) && e();
+ (t.key === RM || t.key === null) && e();
};
return addEventListener("storage", t), () => {
- MM.delete(e), removeEventListener("storage", t);
+ zM.delete(e), removeEventListener("storage", t);
};
}
-var FM = () => (0, P.useSyncExternalStore)(cce, PM, () => "cards");
-function IM(e, t) {
+var HM = () => (0, P.useSyncExternalStore)(gce, VM, () => "cards");
+function UM(e, t) {
let n = new URLSearchParams(Object.entries(e).filter(([, e]) => e));
return t && n.set("exclude_vertical", "1"), n.toString();
}
-var lce = (e, t) => [
+var _ce = (e, t) => [
"catalog-grid",
"catalog",
e,
t
-], uce = (e, t) => [
+], vce = (e, t) => [
"catalog-grid",
"entity",
e,
t
];
-async function dce(e, t, n, r, i) {
+async function yce(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 B(`/api/items?${a}`, i), s = {
@@ -32672,22 +32709,22 @@ async function dce(e, t, n, r, i) {
};
return t || s.items.length || r || (s.libraryEmpty = (await B("/api/items?limit=1&thumb=0", i)).total === 0), s;
}
-var fce = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, pce = (e, t) => {
+var bce = (e) => (t) => (t.offset === 0 ? t.items.length < (t.total || 0) : t.has_more) ? t.offset + e : void 0, xce = (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 LM(e) {
- let t = IM(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
+function WM(e) {
+ let t = UM(e.filters || {}, !!e.excludeVertical), n = e.batchSize || 60, r = e.filters?.state === "trash";
return {
- queryKey: lce(t, e.revision || 0),
- queryFn: ({ pageParam: e, signal: i }) => dce(t, e, n, r, i),
+ queryKey: _ce(t, e.revision || 0),
+ queryFn: ({ pageParam: e, signal: i }) => yce(t, e, n, r, i),
initialPageParam: 0,
- getNextPageParam: fce(n)
+ getNextPageParam: bce(n)
};
}
-function mce(e) {
+function Sce(e) {
return {
- queryKey: uce(e.entityKey || "", e.revision || 0),
+ queryKey: vce(e.entityKey || "", e.revision || 0),
queryFn: async ({ pageParam: t, signal: n }) => {
if (!e.fetchPage) return {
items: [],
@@ -32702,12 +32739,12 @@ function mce(e) {
};
},
initialPageParam: 0,
- getNextPageParam: pce
+ getNextPageParam: xce
};
}
-async function hce(e, t) {
- if (e.mode !== "catalog" || e.wall || PM() === "list") return;
- let n = LM(e);
+async function Cce(e, t) {
+ if (e.mode !== "catalog" || e.wall || VM() === "list") return;
+ let n = WM(e);
await H.fetchInfiniteQuery({
...n,
queryFn: ({ pageParam: e }) => n.queryFn({
@@ -32716,11 +32753,11 @@ async function hce(e, t) {
})
});
}
-function gce(e) {
+function wce(e) {
let t = JSON.stringify(e);
return H.getQueryCache().findAll({ queryKey: e.slice(0, -1) }).filter((e) => JSON.stringify(e.queryKey) !== t && Array.isArray(e.state.data?.pages)).sort((e, t) => t.state.dataUpdatedAt - e.state.dataUpdatedAt)[0]?.state.data;
}
-function RM(e, t, n) {
+function GM(e, t, n) {
return n ? e.filter((e) => {
let n = e.part_group?.key;
if (n) {
@@ -32735,24 +32772,24 @@ function RM(e, t, n) {
return !0;
}) : [...e];
}
-var zM = (e, t) => !!e && !!Ia(e, t);
-function _ce(e, t) {
- let n = (e) => zM(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) => zM(e, t)) || e[e.length - 1];
+var KM = (e, t) => !!e && !!Za(e, t);
+function Tce(e, t) {
+ let n = (e) => KM(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) => KM(e, t)) || e[e.length - 1];
}
-function vce(e, { collapse: t, mix: n, javImage: r }) {
+function Ece(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 = RM(c.items.filter((e) => !a.has(e.id) && !!a.add(e.id)), i, t), l = e.map((e) => ({
+ let e = GM(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 = _ce(e, r);
+ let t = Tce(e, r);
t && l.splice(7, 0, {
kind: "mix",
seed: t
@@ -32765,16 +32802,16 @@ function vce(e, { collapse: t, mix: n, javImage: r }) {
pageStarts: s
};
}
-function yce(e, t, n) {
+function Dce(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 bce(e, t) {
+function Oce(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 xce(e, t) {
+function kce(e, t) {
let n = [...t].sort((e, t) => e.at - t.at), r = [], i = 0;
for (let t of n) r.push({
start: i,
@@ -32787,10 +32824,10 @@ function xce(e, t) {
strip: null
}), r;
}
-function BM(e, t) {
- VM((t) => t.id === e, t);
+function qM(e, t) {
+ JM((t) => t.id === e, t);
}
-function VM(e, t) {
+function JM(e, t) {
H.setQueriesData({ queryKey: ["catalog-grid", "table"] }, (n) => n?.items.some(e) ? {
...n,
items: n.items.map((n) => e(n) ? {
@@ -32811,34 +32848,34 @@ function VM(e, t) {
} : n)
});
}
-var HM = (e) => Math.min(Math.max(e || 0, 0), 100), UM = (e) => Math.round(HM(e) / 20), Sce = (e) => {
- let t = UM(e);
+var YM = (e) => Math.min(Math.max(e || 0, 0), 100), XM = (e) => Math.round(YM(e) / 20), Ace = (e) => {
+ let t = XM(e);
return t ? `${t} 星` : "未评分";
-}, WM = (e, t) => t === UM(e) ? 0 : t * 20, GM = (e) => ["item", e], KM = (e) => [
+}, ZM = (e, t) => t === XM(e) ? 0 : t * 20, QM = (e) => ["item", e], $M = (e) => [
"item-queue",
e.kind,
e.kind === "playlist" ? e.playlistId : e.seedId
-], Cce = (e, t) => [
+], jce = (e, t) => [
"item-related",
e,
t
-], wce = (e) => `/api/item?id=${e}`, Tce = (e, t) => `/api/related?id=${e}&limit=${t}`, qM = "/api/playlist", JM = "/api/feedback", YM = "/api/item-tag", XM = "/api/watch-later", ZM = "/api/quality-goal", QM = "/api/preference", $M = class extends Error {};
-async function eN(e, t) {
- let n = await B(wce(e), t);
- if (n.error) throw new $M(n.error);
+], Mce = (e) => `/api/item?id=${e}`, Nce = (e, t) => `/api/related?id=${e}&limit=${t}`, eN = "/api/playlist", tN = "/api/feedback", nN = "/api/item-tag", rN = "/api/watch-later", iN = "/api/quality-goal", aN = "/api/preference", oN = class extends Error {};
+async function sN(e, t) {
+ let n = await B(Mce(e), t);
+ if (n.error) throw new oN(n.error);
return n;
}
-async function tN(e, t, n) {
+async function cN(e, t, n) {
if (e.kind === "mix") {
- let r = e.seedId, [i, a] = await Promise.all([eN(r, n), t.mixRelated(r)]);
- return H.setQueryData(GM(i.id), i), {
+ let r = e.seedId, [i, a] = await Promise.all([sN(r, n), t.mixRelated(r)]);
+ return H.setQueryData(QM(i.id), i), {
kind: "mix",
seedId: r,
- title: `Mix · ${po(i, t.tagLabel)}`,
+ title: `Mix · ${Oo(i, t.tagLabel)}`,
items: [i, ...a.filter((e) => e.id !== i.id)]
};
}
- if (e.kind === "playlist") return nN(await B(`${qM}?id=${e.playlistId}`, n));
+ if (e.kind === "playlist") return lN(await B(`${eN}?id=${e.playlistId}`, n));
let r = await B(`/api/${e.kind}?id=${e.seedId}`, n);
if (r.error || !r.items?.length) throw Error(r.error || "这一组已不存在");
return {
@@ -32849,19 +32886,19 @@ async function tN(e, t, n) {
versionCount: e.kind === "editions" ? r.count : void 0
};
}
-var nN = (e) => ({
+var lN = (e) => ({
kind: "playlist",
playlistId: e.id,
title: e.name,
items: e.items || [],
currentAssetId: e.current_asset_id
-}), rN = (e) => e.disposal === "vanished";
-function iN(e, t) {
+}), uN = (e) => e.disposal === "vanished";
+function dN(e, t) {
if (e.kind === "mix") return t;
- let n = e.kind === "playlist" ? e.items.filter((e) => !rN(e)) : e.items;
+ let n = e.kind === "playlist" ? e.items.filter((e) => !uN(e)) : e.items;
return n.length ? t != null && n.some((e) => e.id === t) ? t : e.kind === "playlist" && n.some((t) => t.id === e.currentAssetId) ? e.currentAssetId : n[0].id : null;
}
-function Ece(e, t) {
+function Pce(e, t) {
if (t?.kind !== "parts" && t?.kind !== "editions") return e;
let n = t.items.find((t) => t.id === e.id)?.part_label || "";
return e.part_label === n ? e : {
@@ -32869,20 +32906,20 @@ function Ece(e, t) {
part_label: n
};
}
-function aN(e, t) {
+function fN(e, t) {
if (!e || e.kind !== "parts" && e.kind !== "editions") return null;
let n = e.items.findIndex((e) => e.id === t), r = e.items[n], i = e.items[n + 1];
return !r?.part_label || !i?.part_label ? null : e.kind === "parts" || r.version_id != null && r.version_id === i.version_id ? i : null;
}
-async function oN(e, t) {
+async function pN(e, t) {
let { queue: n, actions: r } = e, i = null, a = !1;
if (n) {
- let o = KM(n);
+ let o = $M(n);
try {
let r = n.fresh ? void 0 : H.getQueryData(o);
a = !r && n.kind === "mix", i = r || await H.fetchQuery({
queryKey: o,
- queryFn: () => tN(n, e.helpers, t),
+ queryFn: () => cN(n, e.helpers, t),
staleTime: 0
});
} catch (n) {
@@ -32894,21 +32931,21 @@ async function oN(e, t) {
return;
}
}
- let o = i ? iN(i, e.id) : e.id;
+ let o = i ? dN(i, e.id) : e.id;
if (o == null) {
r.redirect(i?.kind === "playlist" ? { kind: "playlists" } : { kind: "gone" });
return;
}
- let s, c = a && o === i?.seedId ? H.getQueryData(GM(o)) : void 0;
+ let s, c = a && o === i?.seedId ? H.getQueryData(QM(o)) : void 0;
try {
s = c || await H.fetchQuery({
- queryKey: GM(o),
- queryFn: () => eN(o, t),
+ queryKey: QM(o),
+ queryFn: () => sN(o, t),
staleTime: 0
});
} catch (e) {
if (t.aborted) throw e;
- if (e instanceof $M) {
+ if (e instanceof oN) {
r.redirect({ kind: "gone" });
return;
}
@@ -32919,9 +32956,9 @@ async function oN(e, t) {
id: Number(s.follow_item_id)
});
}
-function Dce(e) {
+function Fce(e) {
let t = e.entity_refs || {}, n = /* @__PURE__ */ new Set(), r = (e) => {
- let t = wn(e.name);
+ let t = zn(e.name);
return !e.name || n.has(t) ? !1 : (n.add(t), !0);
}, i = (t.performer?.length ? t.performer : (e.performers || []).map((e) => ({
id: null,
@@ -32941,111 +32978,111 @@ function Dce(e) {
unowned: !i.length && !c.length && !String(e.creator || "").trim()
};
}
-function Oce(e, t) {
+function Ice(e, t) {
let n = /* @__PURE__ */ new Map();
return (e.tags || []).filter((e) => !t.isDurationTag(e.k)).forEach((e) => {
- let r = wn(t.tagLabel(e.k)), i = n.get(r);
- (!i || wn(e.k) === r && wn(i.k) !== r) && n.set(r, e);
+ let r = zn(t.tagLabel(e.k)), i = n.get(r);
+ (!i || zn(e.k) === r && zn(i.k) !== r) && n.set(r, e);
}), [...n.values()].slice(0, 40);
}
-var sN = (e, t) => (e.tags || []).some((e) => wn(e.k) === wn(t)), cN = (e, t) => ({
+var mN = (e, t) => (e.tags || []).some((e) => zn(e.k) === zn(t)), hN = (e, t) => ({
...e,
- tags: (e.tags || []).filter((e) => wn(e.k) !== wn(t))
-}), lN = (e, t) => sN(e, t.k) ? e : {
+ tags: (e.tags || []).filter((e) => zn(e.k) !== zn(t))
+}), gN = (e, t) => mN(e, t.k) ? e : {
...e,
tags: [...e.tags || [], t]
-}, uN = "peach.recentTags";
-function dN() {
+}, _N = "peach.recentTags";
+function vN() {
try {
- let e = JSON.parse(localStorage.getItem(uN) || "[]");
+ let e = JSON.parse(localStorage.getItem(_N) || "[]");
return Array.isArray(e) ? e.map(String) : [];
} catch {
return [];
}
}
-function fN(e) {
+function yN(e) {
try {
- let t = dN().filter((t) => wn(t) !== wn(e));
- localStorage.setItem(uN, JSON.stringify([e, ...t].slice(0, 12)));
+ let t = vN().filter((t) => zn(t) !== zn(e));
+ localStorage.setItem(_N, JSON.stringify([e, ...t].slice(0, 12)));
} catch {}
}
-function kce(e, t, n) {
- let r = wn(e), i = new Map(t.map((e) => [wn(e.k), e])), a = t.filter((e) => !r || wn(e.k).includes(r)).slice(0, 120), o = r ? [] : n.map((e) => i.get(wn(e)) || {
+function Lce(e, t, n) {
+ let r = zn(e), i = new Map(t.map((e) => [zn(e.k), e])), a = t.filter((e) => !r || zn(e.k).includes(r)).slice(0, 120), o = r ? [] : n.map((e) => i.get(zn(e)) || {
k: e,
n: 0
- }).filter((e, t, n) => n.findIndex((t) => wn(t.k) === wn(e.k)) === t).slice(0, 12), s = a.some((e) => wn(e.k) === r);
+ }).filter((e, t, n) => n.findIndex((t) => zn(t.k) === zn(e.k)) === t).slice(0, 12), s = a.some((e) => zn(e.k) === r);
return {
recent: o,
results: a,
create: r && !s ? e.trim() : ""
};
}
-var Ace = {
+var Rce = {
中字: "subtitle",
无码: "uncensored",
无码破解: "cracked",
有码: "censored"
-}, jce = {
+}, zce = {
mix: "Mix",
parts: "分卷",
editions: "版本",
playlist: "播放列表"
};
-function Mce(e) {
+function Bce(e) {
let t = (e.kind === "editions" ? e.versionCount ?? e.items.length : e.items.length).toLocaleString(), n = e.kind === "parts" ? `${t} 卷` : e.kind === "editions" ? `${t} 个版本` : `${t} 个视频`;
return {
- title: jce[e.kind],
+ title: zce[e.kind],
summary: e.kind === "editions" ? n : `${e.title} · ${n}`
};
}
-var pN = (e = "") => /^\d+$/.test(e) ? `第 ${e} 卷` : /^[a-h]$/i.test(e) ? `${e.toUpperCase()} 卷` : e, Nce = (e, t) => (t?.kind === "parts" || t?.kind === "editions") && e.part_label ? `<small class="javedition partlabel">${z(pN(e.part_label))}</small>` : "";
-function Pce(e, t, n, r) {
+var bN = (e = "") => /^\d+$/.test(e) ? `第 ${e} 卷` : /^[a-h]$/i.test(e) ? `${e.toUpperCase()} 卷` : e, Vce = (e, t) => (t?.kind === "parts" || t?.kind === "editions") && e.part_label ? `<small class="javedition partlabel">${z(bN(e.part_label))}</small>` : "";
+function Hce(e, t, n, r) {
let i = e.filter((e) => e !== t), a = i.indexOf(n);
return i.splice(a + +!!r, 0, t), i;
}
-var Fce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
-function Ice(e, t) {
+var Uce = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
+function Wce(e, t) {
return t ? "offline" : String(e.name || "").toLowerCase().endsWith(".iso") ? "disc" : e.location === "online" && !e.follow_item_id ? "online" : e.cost === "metered" && e.location !== "online" ? "metered" : "";
}
-function Lce(e) {
+function Gce(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 mN(e, t) {
+function xN(e, t) {
return e === "dislike" ? t.feedback === "dislike" ? "已标记不合口味" : "已取消不合口味" : e === "seen" ? t.feedback === "seen" ? "已标记看过" : "已取消看过" : e === "dispose" ? t.disposal === "trash" ? "已移入回收站" : "已移出回收站" : "已记录一次高潮";
}
// src/react/immerse/immerse.ts
-var Rce = (e, t, n) => [
+var Kce = (e, t, n) => [
"immerse-list",
e,
t,
n
];
-function zce(e) {
+function qce(e) {
let t = new URLSearchParams();
for (let [n, r] of Object.entries(e)) r && t.set(n, String(r));
return t.delete("orient"), t.set("sort", "rand"), t.set("limit", "60"), t.set("offset", "0"), t.set("thumb", ""), t.toString();
}
-var Bce = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.root_id || e.location || ""));
-function Vce(e, t = Math.random) {
+var Jce = (e, t) => e.cost !== "metered" && !!e.duration && !t(String(e.root_id || e.location || ""));
+function Yce(e, t = Math.random) {
for (let n = e.length - 1; n > 0; n--) {
let r = Math.floor(t() * (n + 1));
[e[n], e[r]] = [e[r], e[n]];
}
return e;
}
-async function Hce(e, t) {
- return Vce(((await B(`/api/items?${e}`)).items || []).filter((e) => Bce(e, t)));
+async function Xce(e, t) {
+ return Yce(((await B(`/api/items?${e}`)).items || []).filter((e) => Jce(e, t)));
}
-var hN = (e) => H.ensureQueryData({
- queryKey: GM(e),
- queryFn: ({ signal: t }) => eN(e, t)
+var SN = (e) => H.ensureQueryData({
+ queryKey: QM(e),
+ queryFn: ({ signal: t }) => sN(e, t)
});
-function Uce(e, t) {
+function Zce(e, t) {
let n = new Set(e.map((e) => e.id));
return e.concat(t.filter((e) => !n.has(e.id)));
}
-function Wce(e) {
+function Qce(e) {
let t = e.performers || [], n = t.length ? t.slice(0, 3).join("、") + (t.length > 3 ? ` 等 ${t.length} 人` : "") : e.creator || "未归属", r = t.length ? "performer" : e.creator ? "creator" : "";
return {
who: n,
@@ -33054,306 +33091,306 @@ function Wce(e) {
ref: r && e.entity_refs?.[r]?.[0] || null
};
}
-function Gce(e, t, n) {
+function $ce(e, t, n) {
if (!e || !t || !n || !Number.isFinite(n)) return null;
let r = e / t;
return (r > n ? r / n : n / r) > 1.05 ? "contain" : "cover";
}
-function Kce(e, t) {
+function ele(e, t) {
return e.videoWidth && e.videoHeight ? e.videoWidth >= e.videoHeight : !!(t.width && t.height && t.width > 0 && t.height > 0 && t.width >= t.height);
}
-var qce = 15e3, gN = {
+var tle = 15e3, CN = {
open: !1,
idle: !1,
wide: !1,
loading: null,
shown: null
-}, _N = null, vN = null, yN = gN, bN = /* @__PURE__ */ new Set(), xN = 0, SN = 0, CN = 0, wN = "", TN = [], EN = 0, DN = !1, ON = !1, kN = null, AN = /* @__PURE__ */ new Set(), jN = "", MN = null, NN = 0, PN = null, FN = !1;
-function IN() {
- if (!_N) throw Error("沉浸模式还没有接上宿主(configureImmerse)");
- return _N;
+}, wN = null, TN = null, EN = CN, DN = /* @__PURE__ */ new Set(), ON = 0, kN = 0, AN = 0, jN = "", MN = [], NN = 0, PN = !1, FN = !1, IN = null, LN = /* @__PURE__ */ new Set(), RN = "", zN = null, BN = 0, VN = null, HN = !1;
+function UN() {
+ if (!wN) throw Error("沉浸模式还没有接上宿主(configureImmerse)");
+ return wN;
}
-function Jce(e) {
- return bN.add(e), () => {
- bN.delete(e);
+function nle(e) {
+ return DN.add(e), () => {
+ DN.delete(e);
};
}
-function Yce() {
- for (let e of [...bN]) e();
+function rle() {
+ for (let e of [...DN]) e();
}
-function LN() {
- (0, Lt.flushSync)(Yce);
+function WN() {
+ (0, Lt.flushSync)(rle);
}
-function RN() {
- let e = MN ? Cj(MN.id) : 0;
- return e ? `${jN} · ${Tj(e)}` : jN;
+function GN() {
+ let e = zN ? jj(zN.id) : 0;
+ return e ? `${RN} · ${Nj(e)}` : RN;
}
-function zN(e, t = null) {
- clearInterval(NN), NN = 0, e === null ? (yN = {
- ...yN,
+function KN(e, t = null) {
+ clearInterval(BN), BN = 0, e === null ? (EN = {
+ ...EN,
loading: null
- }, LN()) : (jN = e, MN = t, yN = {
- ...yN,
- loading: RN()
- }, LN(), NN = window.setInterval(() => {
- MN = TN[EN] ?? null, yN = {
- ...yN,
- loading: RN()
- }, LN();
+ }, WN()) : (RN = e, zN = t, EN = {
+ ...EN,
+ loading: GN()
+ }, WN(), BN = window.setInterval(() => {
+ zN = MN[NN] ?? null, EN = {
+ ...EN,
+ loading: GN()
+ }, WN();
}, 500));
}
-function Xce(e) {
+function ile(e) {
let t = document.createElement("div");
t.dataset.immerseSlide = "", e && (t.style.transform = `translateY(${e}%)`);
let n = document.createElement("video");
- n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), vN.track.append(t);
- let r = nM(), i = () => {}, a = {
+ n.className = "video-js", n.playsInline = !0, n.preload = "auto", t.append(n), TN.track.append(t);
+ let r = uM(), i = () => {}, a = {
el: t,
video: n,
session: r,
- release: () => oM(r),
+ release: () => pM(r),
disposed: !1,
gone: new Promise((e) => {
i = e;
}),
leave: i
};
- return AN.add(a), a;
+ return LN.add(a), a;
}
-function Zce(e, t) {
+function ale(e, t) {
return new Promise((n) => {
- e.release = OM(e.video, {
+ e.release = FM(e.video, {
kind: "immerse",
item: t,
session: e.session,
onLoaded: n,
onEnded: () => {
- yN.open && KN(1);
+ EN.open && $N(1);
}
}), e.gone.then(n);
});
}
-function BN(e) {
- e && !e.disposed && (e.disposed = !0, AN.delete(e), e.leave(), e.release(), e.el.remove(), kN === e && (kN = null));
+function qN(e) {
+ e && !e.disposed && (e.disposed = !0, LN.delete(e), e.leave(), e.release(), e.el.remove(), IN === e && (IN = null));
}
-var VN = [
+var JN = [
"loadeddata",
"canplay",
"error"
];
-function Qce(e) {
+function ole(e) {
let { video: t } = e;
return t.readyState >= 3 ? Promise.resolve() : new Promise((n) => {
let r = !1, i = () => {
- r || (r = !0, clearTimeout(a), VN.forEach((e) => t.removeEventListener(e, i)), n());
+ r || (r = !0, clearTimeout(a), JN.forEach((e) => t.removeEventListener(e, i)), n());
};
- VN.forEach((e) => t.addEventListener(e, i, { once: !0 }));
- let a = setTimeout(i, qce);
+ JN.forEach((e) => t.addEventListener(e, i, { once: !0 }));
+ let a = setTimeout(i, tle);
e.gone.then(i);
});
}
-function HN(e) {
- let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = Gce(e.videoWidth, e.videoHeight, n);
+function YN(e) {
+ let t = e.closest("[data-immerse-track]"), n = t && t.clientWidth && t.clientHeight ? t.clientWidth / t.clientHeight : window.innerWidth / window.innerHeight, r = $ce(e.videoWidth, e.videoHeight, n);
r === "contain" ? e.dataset.fit = "contain" : r && delete e.dataset.fit;
}
-var UN = () => vN?.track.querySelectorAll("video").forEach(HN);
-function $ce(e) {
- delete e.dataset.fit, e.readyState >= 1 ? HN(e) : e.addEventListener("loadedmetadata", () => HN(e), { once: !0 });
+var XN = () => TN?.track.querySelectorAll("video").forEach(YN);
+function sle(e) {
+ delete e.dataset.fit, e.readyState >= 1 ? YN(e) : e.addEventListener("loadedmetadata", () => YN(e), { once: !0 });
}
-function ele(e) {
- yN = {
- ...yN,
+function cle(e) {
+ EN = {
+ ...EN,
wide: e
- }, LN(), UN();
+ }, WN(), XN();
}
-var WN = () => {
- let e = wN;
+var ZN = () => {
+ let e = jN;
return H.fetchQuery({
- queryKey: Rce(e, SN, CN),
- queryFn: () => Hce(e, IN().sourceOffline),
+ queryKey: Kce(e, kN, AN),
+ queryFn: () => Xce(e, UN().sourceOffline),
staleTime: Infinity
});
};
-function tle(e, t) {
- let n = () => On(e.duration) || On(t.duration);
+function lle(e, t) {
+ let n = () => Un(e.duration) || Un(t.duration);
e.addEventListener("timeupdate", () => {
let t = n();
- t && vN && (vN.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
- }), PN = {
+ t && TN && (TN.progress.style.width = `${(e.currentTime / t * 100).toFixed(2)}%`);
+ }), VN = {
video: e,
duration: n
};
}
-async function GN(e = 0) {
- let t = TN[EN];
- if (!t || DN) return;
- let n = xN;
- IN().route(t.id), DN = !0, zN(e ? "切换中" : "加载中", t);
+async function QN(e = 0) {
+ let t = MN[NN];
+ if (!t || PN) return;
+ let n = ON;
+ UN().route(t.id), PN = !0, KN(e ? "切换中" : "加载中", t);
let r = null;
try {
- if (await hN(t.id).catch((e) => {
- if (!(e instanceof $M)) throw e;
- }), n !== xN) return;
- let i = kN, a = !!(e && i);
- a || BN(i);
- let o = Xce(a ? e > 0 ? 100 : -100 : 0);
- if (r = o, $ce(o.video), await Zce(o, t), await Qce(o), o.disposed || (ele(Kce(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
+ if (await SN(t.id).catch((e) => {
+ if (!(e instanceof oN)) throw e;
+ }), n !== ON) return;
+ let i = IN, a = !!(e && i);
+ a || qN(i);
+ let o = ile(a ? e > 0 ? 100 : -100 : 0);
+ if (r = o, sle(o.video), await ale(o, t), await ole(o), o.disposed || (cle(ele(o.video, t)), a && i && (requestAnimationFrame(() => requestAnimationFrame(() => {
i.el.style.transform = `translateY(${e > 0 ? -100 : 100}%)`, o.el.style.transform = "";
- })), await new Promise((e) => setTimeout(e, 210)), BN(i), o.el.style.transform = ""), o.disposed)) return;
- kN = o, r = null, o.video.play()?.catch(() => {}), yN = {
- ...yN,
+ })), await new Promise((e) => setTimeout(e, 210)), qN(i), o.el.style.transform = ""), o.disposed)) return;
+ IN = o, r = null, o.video.play()?.catch(() => {}), EN = {
+ ...EN,
idle: !1,
shown: {
item: t,
- index: EN,
- length: TN.length
+ index: NN,
+ length: MN.length
}
- }, tle(o.video, t), V("/api/play", { id: t.id }).catch(() => {}), zN(null);
+ }, lle(o.video, t), V("/api/play", { id: t.id }).catch(() => {}), KN(null);
} catch {
- BN(r), n === xN && zN(null);
+ qN(r), n === ON && KN(null);
} finally {
- n === xN && (DN = !1);
+ n === ON && (PN = !1);
}
}
-async function KN(e) {
- if (DN || !yN.open) return;
- let t = xN;
- if (EN += e, zN("切换中", TN[EN] ?? null), EN >= TN.length - 3 && !ON) {
- ON = !0;
+async function $N(e) {
+ if (PN || !EN.open) return;
+ let t = ON;
+ if (NN += e, KN("切换中", MN[NN] ?? null), NN >= MN.length - 3 && !FN) {
+ FN = !0;
try {
- CN += 1;
- let e = await WN();
- t === xN && (TN = Uce(TN, e));
+ AN += 1;
+ let e = await ZN();
+ t === ON && (MN = Zce(MN, e));
} catch {} finally {
- ON = !1;
+ FN = !1;
}
}
- t === xN && (EN >= TN.length && (EN = 0), EN < 0 && (EN = TN.length - 1), await GN(e));
+ t === ON && (NN >= MN.length && (NN = 0), NN < 0 && (NN = MN.length - 1), await QN(e));
}
-async function nle(e) {
- let t = ++xN;
- qN(), SN += 1, CN = 0, wN = zce(IN().filters()), H.removeQueries({ queryKey: ["immerse-list"] }), yN = {
- ...yN,
+async function ule(e) {
+ let t = ++ON;
+ eP(), kN += 1, AN = 0, jN = qce(UN().filters()), H.removeQueries({ queryKey: ["immerse-list"] }), EN = {
+ ...EN,
open: !0,
idle: !0,
shown: null
- }, document.body.setAttribute("data-immerse-open", ""), zN("加载内容");
+ }, document.body.setAttribute("data-immerse-open", ""), KN("加载内容");
try {
- let n = await WN();
+ let n = await ZN();
if (e && !n.some((t) => t.id === e)) {
- let t = await hN(e).catch((e) => {
- if (e instanceof $M) return null;
+ let t = await SN(e).catch((e) => {
+ if (e instanceof oN) return null;
throw e;
});
t?.id && (n = [t, ...n.filter((t) => t.id !== e)]);
}
- if (t !== xN) return;
- if (TN = n, !TN.length) {
- JN(), IN().warn("当前筛选下没有可直接播放的内容");
+ if (t !== ON) return;
+ if (MN = n, !MN.length) {
+ tP(), UN().warn("当前筛选下没有可直接播放的内容");
return;
}
- EN = Math.max(0, TN.findIndex((t) => t.id === e)), await GN();
+ NN = Math.max(0, MN.findIndex((t) => t.id === e)), await QN();
} catch {
- if (t !== xN) return;
- zN(null), JN();
+ if (t !== ON) return;
+ KN(null), tP();
}
}
-function qN() {
- clearInterval(NN), NN = 0, eP(), QN = null, PN = null, FN = !1, [...AN].forEach(BN), DN = !1;
+function eP() {
+ clearInterval(BN), BN = 0, sP(), aP = null, VN = null, HN = !1, [...LN].forEach(qN), PN = !1;
}
-function JN() {
- yN.open && (xN++, qN(), yN = gN, document.body.removeAttribute("data-immerse-open"), LN(), IN().closed());
+function tP() {
+ EN.open && (ON++, eP(), EN = CN, document.body.removeAttribute("data-immerse-open"), WN(), UN().closed());
}
-var YN = 0, XN = null, ZN = 0, QN = null, $N = 0;
-function eP() {
- clearTimeout(YN), YN = 0, XN = null;
+var nP = 0, rP = null, iP = 0, aP = null, oP = 0;
+function sP() {
+ clearTimeout(nP), nP = 0, rP = null;
}
-function rle(e) {
- let t = kN?.video;
+function dle(e) {
+ let t = IN?.video;
if (!t) return;
let n = e < window.innerWidth / 2 ? -1 : 1, r = Date.now();
- XN && XN.side === n && r - XN.at <= 280 ? (eP(), AM(t, IN().seekSeconds() * n)) : (YN && (clearTimeout(YN), YN = 0, kM(t)), XN = {
+ rP && rP.side === n && r - rP.at <= 280 ? (sP(), LM(t, UN().seekSeconds() * n)) : (nP && (clearTimeout(nP), nP = 0, IM(t)), rP = {
side: n,
at: r
- }, YN = window.setTimeout(() => {
- YN = 0, XN = null, yN.open && kM(kN?.video);
+ }, nP = window.setTimeout(() => {
+ nP = 0, rP = null, EN.open && IM(IN?.video);
}, 280));
}
-function ile() {
- Date.now() < ZN || kM(kN?.video);
+function fle() {
+ Date.now() < iP || IM(IN?.video);
}
-var tP = (e) => vN?.bar.toggleAttribute("data-scrubbing", e);
-function nP(e) {
- vN && (vN.progress.style.width = `${(e * 100).toFixed(2)}%`);
+var cP = (e) => TN?.bar.toggleAttribute("data-scrubbing", e);
+function lP(e) {
+ TN && (TN.progress.style.width = `${(e * 100).toFixed(2)}%`);
}
-function rP(e) {
+function uP(e) {
let t = e.target;
if (e.touches.length !== 1 || !t?.closest("[data-immerse-track]")) {
- QN = null;
+ aP = null;
return;
}
- let n = kN?.video;
- QN = {
+ let n = IN?.video;
+ aP = {
x: e.touches[0].clientX,
y: e.touches[0].clientY,
axis: "",
from: n && n.currentTime || 0
};
}
-function iP(e) {
- if (!QN || e.touches.length !== 1) return;
- let t = e.touches[0].clientX - QN.x, n = e.touches[0].clientY - QN.y;
- if (!QN.axis) {
+function dP(e) {
+ if (!aP || e.touches.length !== 1) return;
+ let t = e.touches[0].clientX - aP.x, n = e.touches[0].clientY - aP.y;
+ if (!aP.axis) {
if (Math.abs(t) < 12 && Math.abs(n) < 12) return;
- QN.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", QN.axis === "x" && tP(!0);
+ aP.axis = Math.abs(t) > Math.abs(n) ? "x" : "y", aP.axis === "x" && cP(!0);
}
- if (QN.axis !== "x") return;
- let r = kN?.video, i = r && r.duration || 0;
- i && (e.preventDefault(), QN.to = Math.min(i, Math.max(0, QN.from + t / window.innerWidth * i)), nP(QN.to / i));
+ if (aP.axis !== "x") return;
+ let r = IN?.video, i = r && r.duration || 0;
+ i && (e.preventDefault(), aP.to = Math.min(i, Math.max(0, aP.from + t / window.innerWidth * i)), lP(aP.to / i));
}
-function aP(e) {
- if (!QN) return;
- let t = QN;
- if (QN = null, ZN = Date.now() + 700, tP(!1), t.axis === "x") {
- let e = kN?.video;
+function fP(e) {
+ if (!aP) return;
+ let t = aP;
+ if (aP = null, iP = Date.now() + 700, cP(!1), t.axis === "x") {
+ let e = IN?.video;
e && t.to != null && (e.currentTime = t.to);
return;
}
let n = e.changedTouches[0], r = n.clientX - t.x, i = t.y - n.clientY;
- Math.abs(i) > 60 ? (eP(), KN(i > 0 ? 1 : -1)) : Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), rle(n.clientX));
+ Math.abs(i) > 60 ? (sP(), $N(i > 0 ? 1 : -1)) : Math.abs(r) <= 14 && Math.abs(i) <= 14 && (e.preventDefault(), dle(n.clientX));
}
-function oP() {
- QN = null, tP(!1);
+function pP() {
+ aP = null, cP(!1);
}
-function sP(e) {
+function mP(e) {
let t = Date.now();
- t - $N < 260 || ($N = t, KN(e.deltaY > 0 ? 1 : -1));
+ t - oP < 260 || (oP = t, $N(e.deltaY > 0 ? 1 : -1));
}
-function cP(e) {
- let t = vN.bar.getBoundingClientRect();
+function hP(e) {
+ let t = TN.bar.getBoundingClientRect();
return Math.min(1, Math.max(0, (e.clientX - t.left) / t.width));
}
-function ale(e) {
- PN?.duration() && (FN = !0, tP(!0), e.currentTarget.setPointerCapture(e.pointerId), nP(cP(e)), e.preventDefault());
+function ple(e) {
+ VN?.duration() && (HN = !0, cP(!0), e.currentTarget.setPointerCapture(e.pointerId), lP(hP(e)), e.preventDefault());
}
-function ole(e) {
- FN && nP(cP(e));
+function mle(e) {
+ HN && lP(hP(e));
}
-function sle(e) {
- if (!FN) return;
- FN = !1, tP(!1);
- let t = PN?.duration();
- PN && t && (PN.video.currentTime = t * cP(e));
+function hle(e) {
+ if (!HN) return;
+ HN = !1, cP(!1);
+ let t = VN?.duration();
+ VN && t && (VN.video.currentTime = t * hP(e));
}
-function cle() {
- FN = !1, tP(!1);
+function gle() {
+ HN = !1, cP(!1);
}
-async function lP(e, t) {
- let n = await V(JM, {
+async function gP(e, t) {
+ let n = await V(tN, {
id: e,
kind: t
- }), r = H.getQueryData(GM(e));
- if (!r) return BM(e, {
+ }), r = H.getQueryData(QM(e));
+ if (!r) return qM(e, {
feedback: n.feedback ?? void 0,
o_count: n.o_count
}), n;
@@ -33362,7 +33399,7 @@ async function lP(e, t) {
feedback: n.feedback ?? void 0,
o_count: n.o_count
};
- return H.setQueryData(GM(e), i), BM(e, {
+ return H.setQueryData(QM(e), i), qM(e, {
feedback: i.feedback,
disposal: i.disposal,
watch_later: i.watch_later,
@@ -33370,7 +33407,7 @@ async function lP(e, t) {
o_count: i.o_count
}), n;
}
-var lle = [
+var _le = [
{
kind: "dislike",
glyph: "thumbs-down",
@@ -33387,31 +33424,31 @@ var lle = [
label: "记一次高潮"
}
];
-function uP(e) {
+function _P(e) {
return Pt({
- queryKey: GM(e ?? 0),
- queryFn: ({ signal: t }) => eN(e, t),
+ queryKey: QM(e ?? 0),
+ queryFn: ({ signal: t }) => sN(e, t),
enabled: e != null,
staleTime: Infinity
}).data;
}
-function ule({ kind: e, glyph: t, label: n, id: r }) {
- let i = uP(r), a = Ft({
+function vle({ kind: e, glyph: t, label: n, id: r }) {
+ let i = _P(r), a = Ft({
mutationFn: async (t) => {
- let n = H.getQueryData(GM(t))?.feedback || null;
+ let n = H.getQueryData(QM(t))?.feedback || null;
return {
- result: await lP(t, e),
+ result: await gP(t, e),
before: n
};
},
onSuccess: ({ result: t, before: n }, r) => {
- IN().toast(mN(e, t), { undo: async () => {
- e === "o" ? await lP(r, "o-undo") : (t.feedback && await lP(r, t.feedback), n && await lP(r, n));
+ UN().toast(xN(e, t), { undo: async () => {
+ e === "o" ? await gP(r, "o-undo") : (t.feedback && await gP(r, t.feedback), n && await gP(r, n));
} }), e === "dislike" && t.feedback === "dislike" && setTimeout(() => {
- KN(1);
+ $N(1);
}, 260);
},
- onError: (e) => IN().failure("更新反馈", e)
+ onError: (e) => UN().failure("更新反馈", e)
}), o = a.isPending, s = e !== "o" && i ? i.feedback === e ? "true" : "false" : void 0;
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-immerse-action": "",
@@ -33442,12 +33479,12 @@ function ule({ kind: e, glyph: t, label: n, id: r }) {
})]
});
}
-function dle({ shown: e }) {
- let t = e?.item ?? null, n = uP(t?.id ?? null), r = n ? Wce(n) : null, i = IN(), a = (e) => {
- e.preventDefault(), n && (JN(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
+function yle({ shown: e }) {
+ let t = e?.item ?? null, n = _P(t?.id ?? null), r = n ? Qce(n) : null, i = UN(), a = (e) => {
+ e.preventDefault(), n && (tP(), n.performers?.[0] ? i.openEntity("performer", n.performers[0]) : n.creator ? i.openEntity("creator", n.creator) : i.openUnowned());
}, o = () => {
- t && (JN(), i.openItem(t.id));
- }, s = r ? Za(r.name, r.ref, Ma(r.name), r.kind || "performer") : "";
+ t && (tP(), i.openItem(t.id));
+ }, s = r ? po(r.name, r.ref, qa(r.name), r.kind || "performer") : "";
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-immerse-ui": "",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -33465,7 +33502,7 @@ function dle({ shown: e }) {
onClick: a,
children: r?.who ?? ""
}),
- /* @__PURE__ */ (0, F.jsx)("span", { children: e && t ? `· ${kn(t.duration)} · ${t.ctx_orient || ""} · ${e.index + 1}/${e.length}` : "" })
+ /* @__PURE__ */ (0, F.jsx)("span", { children: e && t ? `· ${Wn(t.duration)} · ${t.ctx_orient || ""} · ${e.index + 1}/${e.length}` : "" })
]
}), /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -33475,18 +33512,18 @@ function dle({ shown: e }) {
})]
});
}
-var fle = { __html: xs("媒体加载中") };
-function ple({ view: e }) {
+var ble = { __html: Is("媒体加载中") };
+function xle({ view: e }) {
let t = (0, P.useRef)(null), n = (0, P.useRef)(null), r = (0, P.useRef)(null), i = (0, P.useRef)(null);
(0, P.useLayoutEffect)(() => {
let e = t.current;
- return vN = {
+ return TN = {
root: e,
track: n.current,
bar: r.current,
progress: i.current
- }, e.addEventListener("touchstart", rP, { passive: !0 }), e.addEventListener("touchmove", iP, { passive: !1 }), e.addEventListener("touchend", aP, { passive: !1 }), e.addEventListener("touchcancel", oP, { passive: !0 }), e.addEventListener("wheel", sP, { passive: !0 }), () => {
- e.removeEventListener("touchstart", rP), e.removeEventListener("touchmove", iP), e.removeEventListener("touchend", aP), e.removeEventListener("touchcancel", oP), e.removeEventListener("wheel", sP), vN = null;
+ }, e.addEventListener("touchstart", uP, { passive: !0 }), e.addEventListener("touchmove", dP, { passive: !1 }), e.addEventListener("touchend", fP, { passive: !1 }), e.addEventListener("touchcancel", pP, { passive: !0 }), e.addEventListener("wheel", mP, { passive: !0 }), () => {
+ e.removeEventListener("touchstart", uP), e.removeEventListener("touchmove", dP), e.removeEventListener("touchend", fP), e.removeEventListener("touchcancel", pP), e.removeEventListener("wheel", mP), TN = null;
};
}, []);
let a = e.shown?.item.id ?? null, o = (e) => e ? "" : void 0;
@@ -33503,10 +33540,10 @@ function ple({ view: e }) {
children: [/* @__PURE__ */ (0, F.jsx)("div", {
ref: n,
"data-immerse-track": "",
- onClick: ile
+ onClick: fle
}), /* @__PURE__ */ (0, F.jsx)("div", {
"data-immerse-actions": "",
- children: lle.map((e) => /* @__PURE__ */ (0, F.jsx)(ule, {
+ children: _le.map((e) => /* @__PURE__ */ (0, F.jsx)(vle, {
...e,
id: a
}, e.kind))
@@ -33519,7 +33556,7 @@ function ple({ view: e }) {
hidden: e.loading === null,
children: [/* @__PURE__ */ (0, F.jsx)("span", {
"data-immerse-spinner": "",
- dangerouslySetInnerHTML: fle
+ dangerouslySetInnerHTML: ble
}), /* @__PURE__ */ (0, F.jsx)("span", { children: e.loading ?? "" })]
}),
/* @__PURE__ */ (0, F.jsx)("button", {
@@ -33527,7 +33564,7 @@ function ple({ view: e }) {
"data-immerse-close": "",
title: "关闭",
"aria-label": "关闭",
- onClick: JN,
+ onClick: tP,
children: /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: "#i-x" })
@@ -33536,89 +33573,89 @@ function ple({ view: e }) {
/* @__PURE__ */ (0, F.jsx)("div", {
ref: r,
"data-immerse-bar": "",
- onPointerDown: ale,
- onPointerMove: ole,
- onPointerUp: sle,
- onPointerCancel: cle,
+ onPointerDown: ple,
+ onPointerMove: mle,
+ onPointerUp: hle,
+ onPointerCancel: gle,
children: /* @__PURE__ */ (0, F.jsx)("i", { ref: i })
}),
- /* @__PURE__ */ (0, F.jsx)(dle, { shown: e.shown })
+ /* @__PURE__ */ (0, F.jsx)(yle, { shown: e.shown })
]
});
}
-var mle = {
- open: nle,
- close: JN,
- isOpen: () => yN.open,
- activeVideo: () => yN.open ? kN?.video ?? null : null
+var Sle = {
+ open: ule,
+ close: tP,
+ isOpen: () => EN.open,
+ activeVideo: () => EN.open ? IN?.video ?? null : null
};
-function hle(e) {
- if (!yN.open) return;
+function Cle(e) {
+ if (!EN.open) return;
let t = e.target;
- t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && KN(1), e.key === "ArrowUp" && KN(-1));
+ t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) || e.ctrlKey || e.metaKey || e.altKey || (e.key === "ArrowDown" && $N(1), e.key === "ArrowUp" && $N(-1));
}
-function gle(e) {
- let t = !_N;
- return _N = e, t && (document.addEventListener("keydown", hle), addEventListener("resize", () => {
- yN.open && UN();
+function wle(e) {
+ let t = !wN;
+ return wN = e, t && (document.addEventListener("keydown", Cle), addEventListener("resize", () => {
+ EN.open && XN();
}), addEventListener("pagehide", () => {
- AN.forEach((e) => oM(e.session));
- })), mle;
+ LN.forEach((e) => pM(e.session));
+ })), Sle;
}
-function _le() {
- let e = (0, P.useSyncExternalStore)(Jce, () => yN);
- return _N ? /* @__PURE__ */ (0, F.jsx)(ple, { view: e }) : null;
+function Tle() {
+ let e = (0, P.useSyncExternalStore)(nle, () => EN);
+ return wN ? /* @__PURE__ */ (0, F.jsx)(xle, { view: e }) : null;
}
// src/manage-header.ts
-var dP = {
+var vP = {
"/junk-files": "垃圾文件",
"/duplicates": "重复文件",
"/review": "人工复核",
"/trash": "回收站",
"/quality-goals": "高清版",
"/sources": "来源和凭证"
-}, vle = /* @__PURE__ */ new Set(["/data-cleanup", "/sources"]);
-function yle(e) {
- let t = dP[e.path] ? "cleanup" : e.section;
+}, Ele = /* @__PURE__ */ new Set(["/data-cleanup", "/sources"]);
+function Dle(e) {
+ let t = vP[e.path] ? "cleanup" : e.section;
return e.menu.some(([e]) => e === t) ? t : "";
}
-var ble = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t.toLocaleString()}`;
-function fP(e) {
+var Ole = ({ total: e, shown: t }) => `${e.toLocaleString()} 个符合 · 显示 ${t.toLocaleString()}`;
+function yP(e) {
let t = e.sections.find(([t]) => t === e.section);
if (!t) return null;
- let n = dP[e.path] ?? "";
+ let n = vP[e.path] ?? "";
return {
title: e.section === "cleanup" && n || t[1],
- pressed: yle(e),
+ pressed: Dle(e),
crumb: n,
- compact: vle.has(e.path) || e.section === "configuration",
+ compact: Ele.has(e.path) || e.section === "configuration",
lede: e.section === "trash" ? e.trash ? {
kind: "count",
- text: ble(e.trash),
+ text: Ole(e.trash),
total: e.trash.total
} : { kind: "skeleton" } : { kind: "none" }
};
}
-var pP = (e) => e.replace(/[&<>"']/g, (e) => ({
+var bP = (e) => e.replace(/[&<>"']/g, (e) => ({
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
"\"": "&quot;",
"'": "&#39;"
-})[e]), mP = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${pP(e)}"/></svg>`, hP = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
-function xle(e) {
- let t = fP(e);
+})[e]), xP = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${bP(e)}"/></svg>`, SP = "<span class=\"skeleton\" data-trash-lede-skeleton=\"text\" aria-hidden=\"true\"></span><span class=\"skeleton\" data-trash-lede-skeleton=\"action\" aria-hidden=\"true\"></span>";
+function kle(e) {
+ let t = yP(e);
if (!t) return "";
let n = e.menu.map(([e, n, r]) => {
let i = e === t.pressed;
- return `<button type="button" data-manage="${pP(e)}" data-pill-variant="gray" aria-pressed="${i}"${i ? " aria-current=\"page\" data-pill-selected=\"\"" : ""}>${mP(r)}<span>${pP(n)}</span></button>`;
- }).join(""), r = t.crumb ? `<nav data-manage-crumb="" aria-label="Breadcrumb"><ol><li><a href="/data-cleanup">数据管理</a>${mP("chevron-right")}</li><li aria-current="true"><span>${pP(t.crumb)}</span></li></ol></nav>` : "", i = t.lede.kind === "none" ? "" : `<p class="mono" data-manage-lede="">${t.lede.kind === "skeleton" ? hP : `<span data-lede-text="">${pP(t.lede.text)}</span>${t.lede.total ? Sle : ""}`}</p>`;
- return `<nav data-manage-bar="" aria-label="管理"><div data-manage-menu="" data-pill-nav="" role="group">${n}</div></nav>` + r + `<h2 data-manage-title=""${t.compact ? " data-compact=\"\"" : ""}>${pP(t.title)}</h2>` + i;
+ return `<button type="button" data-manage="${bP(e)}" data-pill-variant="gray" aria-pressed="${i}"${i ? " aria-current=\"page\" data-pill-selected=\"\"" : ""}>${xP(r)}<span>${bP(n)}</span></button>`;
+ }).join(""), r = t.crumb ? `<nav data-manage-crumb="" aria-label="Breadcrumb"><ol><li><a href="/data-cleanup">数据管理</a>${xP("chevron-right")}</li><li aria-current="true"><span>${bP(t.crumb)}</span></li></ol></nav>` : "", i = t.lede.kind === "none" ? "" : `<p class="mono" data-manage-lede="">${t.lede.kind === "skeleton" ? SP : `<span data-lede-text="">${bP(t.lede.text)}</span>${t.lede.total ? Ale : ""}`}</p>`;
+ return `<nav data-manage-bar="" aria-label="管理"><div data-manage-menu="" data-pill-nav="" role="group">${n}</div></nav>` + r + `<h2 data-manage-title=""${t.compact ? " data-compact=\"\"" : ""}>${bP(t.title)}</h2>` + i;
}
-var Sle = "<button type=\"button\" data-empty-trash=\"\" title=\"永久删除回收站内容\">清空回收站</button>";
+var Ale = "<button type=\"button\" data-empty-trash=\"\" title=\"永久删除回收站内容\">清空回收站</button>";
// src/react/settings-panel/icon.tsx
-function gP({ name: e }) {
- let { wide: t, viewBox: n } = rn(e);
+function CP({ name: e }) {
+ let { wide: t, viewBox: n } = yn(e);
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: n,
className: t ? "iconwide" : void 0,
@@ -33626,7 +33663,7 @@ function gP({ name: e }) {
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
}
-function Cle({ name: e }) {
+function jle({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
@@ -33634,88 +33671,88 @@ function Cle({ name: e }) {
});
}
// node_modules/tailwind-merge/dist/bundle-mjs.mjs
-var wle = (e, t) => {
+var Mle = (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;
-}, Tle = (e, t) => ({
+}, Nle = (e, t) => ({
classGroupId: e,
validator: t
-}), _P = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
+}), wP = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
nextPart: e,
validators: t,
classGroupId: n
-}), vP = "-", yP = [], Ele = "arbitrary..", Dle = (e) => {
- let t = kle(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
+}), TP = "-", EP = [], Ple = "arbitrary..", Fle = (e) => {
+ let t = Lle(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
return {
getClassGroupId: (e) => {
- if (e.startsWith("[") && e.endsWith("]")) return Ole(e);
- let n = e.split(vP);
- return bP(n, +(n[0] === "" && n.length > 1), t);
+ if (e.startsWith("[") && e.endsWith("]")) return Ile(e);
+ let n = e.split(TP);
+ return DP(n, +(n[0] === "" && n.length > 1), t);
},
getConflictingClassGroupIds: (e, t) => {
if (t) {
let t = r[e], i = n[e];
- return t ? i ? wle(i, t) : t : i || yP;
+ return t ? i ? Mle(i, t) : t : i || EP;
}
- return n[e] || yP;
+ return n[e] || EP;
}
};
-}, bP = (e, t, n) => {
+}, DP = (e, t, n) => {
if (e.length - t === 0) return n.classGroupId;
let r = e[t], i = n.nextPart.get(r);
if (i) {
- let n = bP(e, t + 1, i);
+ let n = DP(e, t + 1, i);
if (n) return n;
}
let a = n.validators;
if (a === null) return;
- let o = t === 0 ? e.join(vP) : e.slice(t).join(vP), s = a.length;
+ let o = t === 0 ? e.join(TP) : e.slice(t).join(TP), s = a.length;
for (let e = 0; e < s; e++) {
let t = a[e];
if (t.validator(o)) return t.classGroupId;
}
-}, Ole = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
+}, Ile = (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 ? Ele + r : void 0;
-})(), kle = (e) => {
+ return r ? Ple + r : void 0;
+})(), Lle = (e) => {
let { theme: t, classGroups: n } = e;
- return Ale(n, t);
-}, Ale = (e, t) => {
- let n = _P();
+ return Rle(n, t);
+}, Rle = (e, t) => {
+ let n = wP();
for (let r in e) {
let i = e[r];
- xP(i, n, r, t);
+ OP(i, n, r, t);
}
return n;
-}, xP = (e, t, n, r) => {
+}, OP = (e, t, n, r) => {
let i = e.length;
for (let a = 0; a < i; a++) {
let i = e[a];
- jle(i, t, n, r);
+ zle(i, t, n, r);
}
-}, jle = (e, t, n, r) => {
- typeof e == "string" ? Mle(e, t, n) : typeof e == "function" ? Nle(e, t, n, r) : Ple(e, t, n, r);
-}, Mle = (e, t, n) => {
- let r = e === "" ? t : SP(t, e);
+}, zle = (e, t, n, r) => {
+ typeof e == "string" ? Ble(e, t, n) : typeof e == "function" ? Vle(e, t, n, r) : Hle(e, t, n, r);
+}, Ble = (e, t, n) => {
+ let r = e === "" ? t : kP(t, e);
r.classGroupId = n;
-}, Nle = (e, t, n, r) => {
- Fle(e) ? xP(e(r), t, n, r) : (t.validators === null && (t.validators = []), t.validators.push(Tle(n, e)));
-}, Ple = (e, t, n, r) => {
+}, Vle = (e, t, n, r) => {
+ Ule(e) ? OP(e(r), t, n, r) : (t.validators === null && (t.validators = []), t.validators.push(Nle(n, e)));
+}, Hle = (e, t, n, r) => {
let i = Object.entries(e), a = i.length;
for (let e = 0; e < a; e++) {
let [a, o] = i[e];
- xP(o, SP(t, a), n, r);
+ OP(o, kP(t, a), n, r);
}
-}, SP = (e, t) => {
- let n = e, r = t.split(vP), i = r.length;
+}, kP = (e, t) => {
+ let n = e, r = t.split(TP), i = r.length;
for (let e = 0; e < i; e++) {
let t = r[e], i = n.nextPart.get(t);
- i || (i = _P(), n.nextPart.set(t, i)), n = i;
+ i || (i = wP(), n.nextPart.set(t, i)), n = i;
}
return n;
-}, Fle = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Ile = (e) => {
+}, Ule = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Wle = (e) => {
if (e < 1) return {
get: () => void 0,
set: () => {}
@@ -33733,19 +33770,19 @@ var wle = (e, t) => {
e in n ? n[e] = t : i(e, t);
}
};
-}, CP = "!", wP = ":", Lle = [], TP = (e, t, n, r, i) => ({
+}, AP = "!", jP = ":", Gle = [], MP = (e, t, n, r, i) => ({
modifiers: e,
hasImportantModifier: t,
baseClassName: n,
maybePostfixModifierPosition: r,
isExternal: i
-}), Rle = (e) => {
+}), Kle = (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 === wP) {
+ if (o === jP) {
t.push(e.slice(i, s)), i = s + 1;
continue;
}
@@ -33757,13 +33794,13 @@ var wle = (e, t) => {
o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
}
let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
- s.endsWith(CP) ? (c = s.slice(0, -1), l = !0) : s.startsWith(CP) && (c = s.slice(1), l = !0);
+ s.endsWith(AP) ? (c = s.slice(0, -1), l = !0) : s.startsWith(AP) && (c = s.slice(1), l = !0);
let u = a && a > i ? a - i : void 0;
- return TP(t, l, c, u);
+ return MP(t, l, c, u);
};
if (t) {
- let e = t + wP, n = r;
- r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : TP(Lle, !1, t, void 0, !0);
+ let e = t + jP, n = r;
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : MP(Gle, !1, t, void 0, !0);
}
if (n) {
let e = r;
@@ -33773,7 +33810,7 @@ var wle = (e, t) => {
});
}
return r;
-}, zle = (e) => {
+}, qle = (e) => {
let t = /* @__PURE__ */ new Map();
return e.orderSensitiveModifiers.forEach((e, n) => {
t.set(e, 1e6 + n);
@@ -33785,18 +33822,18 @@ var wle = (e, t) => {
}
return r.length > 0 && (r.sort(), n.push(...r)), n;
};
-}, Ble = (e) => ({
- cache: Ile(e.cacheSize),
- parseClassName: Rle(e),
- sortModifiers: zle(e),
- postfixLookupClassGroupIds: Vle(e),
- ...Dle(e)
-}), Vle = (e) => {
+}, Jle = (e) => ({
+ cache: Wle(e.cacheSize),
+ parseClassName: Kle(e),
+ sortModifiers: qle(e),
+ postfixLookupClassGroupIds: Yle(e),
+ ...Fle(e)
+}), Yle = (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;
-}, Hle = /\s+/, Ule = (e, t) => {
- let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(Hle), l = "";
+}, Xle = /\s+/, Zle = (e, t) => {
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a, postfixLookupClassGroupIds: o } = t, s = [], c = e.trim().split(Xle), 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) {
@@ -33816,7 +33853,7 @@ var wle = (e, t) => {
}
h = !1;
}
- let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + CP : _, y = v + g;
+ let _ = d.length === 0 ? "" : d.length === 1 ? d[0] : a(d).join(":"), v = f ? _ + AP : _, y = v + g;
if (s.indexOf(y) > -1) continue;
s.push(y);
let b = i(g, h);
@@ -33827,34 +33864,34 @@ var wle = (e, t) => {
l = t + (l.length > 0 ? " " + l : l);
}
return l;
-}, Wle = (...e) => {
+}, Qle = (...e) => {
let t = 0, n, r, i = "";
- for (; t < e.length;) (n = e[t++]) && (r = EP(n)) && (i && (i += " "), i += r);
+ for (; t < e.length;) (n = e[t++]) && (r = NP(n)) && (i && (i += " "), i += r);
return i;
-}, EP = (e) => {
+}, NP = (e) => {
if (typeof e == "string") return e;
let t, n = "";
- for (let r = 0; r < e.length; r++) e[r] && (t = EP(e[r])) && (n && (n += " "), n += t);
+ for (let r = 0; r < e.length; r++) e[r] && (t = NP(e[r])) && (n && (n += " "), n += t);
return n;
-}, DP = (e, ...t) => {
- let n, r, i, a, o = (o) => (n = Ble(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
+}, PP = (e, ...t) => {
+ let n, r, i, a, o = (o) => (n = Jle(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 = Ule(e, n);
+ let a = Zle(e, n);
return i(e, a), a;
};
- return a = o, (...e) => a(Wle(...e));
-}, Gle = [], OP = (e) => {
- let t = (t) => t[e] || Gle;
+ return a = o, (...e) => a(Qle(...e));
+}, $le = [], FP = (e) => {
+ let t = (t) => t[e] || $le;
return t.isThemeGetter = !0, t.themeKey = e, t;
-}, kP = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, AP = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Kle = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, qle = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Jle = /\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$/, Yle = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, Xle = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Zle = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, jP = (e) => Kle.test(e), MP = (e) => !!e && !Number.isNaN(Number(e)), NP = (e) => !!e && Number.isInteger(Number(e)), PP = (e) => e.endsWith("%") && MP(e.slice(0, -1)), FP = (e) => qle.test(e), IP = () => !0, Qle = (e) => Jle.test(e) && !Yle.test(e), LP = () => !1, $le = (e) => Xle.test(e), eue = (e) => Zle.test(e), tue = (e) => !RP(e) && !UP(e), nue = (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)), rue = (e) => qP(e, ZP, LP), RP = (e) => kP.test(e), zP = (e) => qP(e, QP, Qle), BP = (e) => qP(e, due, MP), iue = (e) => qP(e, eF, IP), aue = (e) => qP(e, $P, LP), VP = (e) => qP(e, YP, LP), oue = (e) => qP(e, XP, eue), HP = (e) => qP(e, tF, $le), UP = (e) => AP.test(e), WP = (e) => JP(e, QP), sue = (e) => JP(e, $P), GP = (e) => JP(e, YP), cue = (e) => JP(e, ZP), lue = (e) => JP(e, XP), KP = (e) => JP(e, tF, !0), uue = (e) => JP(e, eF, !0), qP = (e, t, n) => {
- let r = kP.exec(e);
+}, IP = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, LP = /^\((?:(\w[\w-]*):)?(.+)\)$/i, eue = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, tue = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, nue = /\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$/, rue = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/, iue = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, aue = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, RP = (e) => eue.test(e), zP = (e) => !!e && !Number.isNaN(Number(e)), BP = (e) => !!e && Number.isInteger(Number(e)), VP = (e) => e.endsWith("%") && zP(e.slice(0, -1)), HP = (e) => tue.test(e), UP = () => !0, oue = (e) => nue.test(e) && !rue.test(e), WP = () => !1, sue = (e) => iue.test(e), cue = (e) => aue.test(e), lue = (e) => !GP(e) && !XP(e), uue = (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)), due = (e) => eF(e, iF, WP), GP = (e) => IP.test(e), KP = (e) => eF(e, aF, oue), qP = (e) => eF(e, yue, zP), fue = (e) => eF(e, sF, UP), pue = (e) => eF(e, oF, WP), JP = (e) => eF(e, nF, WP), mue = (e) => eF(e, rF, cue), YP = (e) => eF(e, cF, sue), XP = (e) => LP.test(e), ZP = (e) => tF(e, aF), hue = (e) => tF(e, oF), QP = (e) => tF(e, nF), gue = (e) => tF(e, iF), _ue = (e) => tF(e, rF), $P = (e) => tF(e, cF, !0), vue = (e) => tF(e, sF, !0), eF = (e, t, n) => {
+ let r = IP.exec(e);
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
-}, JP = (e, t, n = !1) => {
- let r = AP.exec(e);
+}, tF = (e, t, n = !1) => {
+ let r = LP.exec(e);
return r ? r[1] ? t(r[1]) : n : !1;
-}, YP = (e) => e === "position" || e === "percentage", XP = (e) => e === "image" || e === "url", ZP = (e) => e === "length" || e === "size" || e === "bg-size", QP = (e) => e === "length", due = (e) => e === "number", $P = (e) => e === "family-name", eF = (e) => e === "number" || e === "weight", tF = (e) => e === "shadow", nF = () => {
- let e = OP("color"), t = OP("font"), n = OP("text"), r = OP("font-weight"), i = OP("tracking"), a = OP("leading"), o = OP("breakpoint"), s = OP("container"), c = OP("spacing"), l = OP("radius"), u = OP("shadow"), d = OP("inset-shadow"), f = OP("text-shadow"), p = OP("drop-shadow"), m = OP("blur"), h = OP("perspective"), g = OP("aspect"), _ = OP("ease"), v = OP("animate"), y = () => [
+}, nF = (e) => e === "position" || e === "percentage", rF = (e) => e === "image" || e === "url", iF = (e) => e === "length" || e === "size" || e === "bg-size", aF = (e) => e === "length", yue = (e) => e === "number", oF = (e) => e === "family-name", sF = (e) => e === "number" || e === "weight", cF = (e) => e === "shadow", lF = () => {
+ let e = FP("color"), t = FP("font"), n = FP("text"), r = FP("font-weight"), i = FP("tracking"), a = FP("leading"), o = FP("breakpoint"), s = FP("container"), c = FP("spacing"), l = FP("radius"), u = FP("shadow"), d = FP("inset-shadow"), f = FP("text-shadow"), p = FP("drop-shadow"), m = FP("blur"), h = FP("perspective"), g = FP("aspect"), _ = FP("ease"), v = FP("animate"), y = () => [
"auto",
"avoid",
"all",
@@ -33879,8 +33916,8 @@ var wle = (e, t) => {
"left-bottom"
], x = () => [
...b(),
- UP,
- RP
+ XP,
+ GP
], S = () => [
"auto",
"hidden",
@@ -33892,43 +33929,43 @@ var wle = (e, t) => {
"contain",
"none"
], w = () => [
- UP,
- RP,
+ XP,
+ GP,
c
], T = () => [
- jP,
+ RP,
"full",
"auto",
...w()
], E = () => [
- NP,
+ BP,
"none",
"subgrid",
- UP,
- RP
+ XP,
+ GP
], D = () => [
"auto",
{ span: [
"full",
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
] },
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
], O = () => [
- NP,
+ BP,
"auto",
- UP,
- RP
+ XP,
+ GP
], k = () => [
"auto",
"min",
"max",
"fr",
- UP,
- RP
+ XP,
+ GP
], A = () => [
"start",
"end",
@@ -33948,7 +33985,7 @@ var wle = (e, t) => {
"center-safe",
"end-safe"
], M = () => ["auto", ...w()], ee = () => [
- jP,
+ RP,
"auto",
"full",
"dvw",
@@ -33963,7 +34000,7 @@ var wle = (e, t) => {
...w()
], te = () => [
s,
- jP,
+ RP,
"screen",
"full",
"dvw",
@@ -33974,7 +34011,7 @@ var wle = (e, t) => {
"fit",
...w()
], ne = () => [
- jP,
+ RP,
"screen",
"full",
"lh",
@@ -33987,13 +34024,13 @@ var wle = (e, t) => {
...w()
], N = () => [
e,
- UP,
- RP
+ XP,
+ GP
], re = () => [
...b(),
- GP,
- VP,
- { position: [UP, RP] }
+ QP,
+ JP,
+ { position: [XP, GP] }
], ie = () => ["no-repeat", { repeat: [
"",
"x",
@@ -34004,25 +34041,25 @@ var wle = (e, t) => {
"auto",
"cover",
"contain",
- cue,
- rue,
- { size: [UP, RP] }
+ gue,
+ due,
+ { size: [XP, GP] }
], F = () => [
- PP,
- WP,
- zP
+ VP,
+ ZP,
+ KP
], ae = () => [
"",
"none",
"full",
l,
- UP,
- RP
+ XP,
+ GP
], oe = () => [
"",
- MP,
- WP,
- zP
+ zP,
+ ZP,
+ KP
], se = () => [
"solid",
"dashed",
@@ -34046,32 +34083,32 @@ var wle = (e, t) => {
"color",
"luminosity"
], le = () => [
- MP,
- PP,
- GP,
- VP
+ zP,
+ VP,
+ QP,
+ JP
], ue = () => [
"",
"none",
m,
- UP,
- RP
+ XP,
+ GP
], de = () => [
"none",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
], fe = () => [
"none",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
], pe = () => [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
], me = () => [
- jP,
+ RP,
"full",
...w()
];
@@ -34085,17 +34122,17 @@ var wle = (e, t) => {
"bounce"
],
aspect: ["video"],
- blur: [FP],
- breakpoint: [FP],
- color: [IP],
- container: [FP],
- "drop-shadow": [FP],
+ blur: [HP],
+ breakpoint: [HP],
+ color: [UP],
+ container: [HP],
+ "drop-shadow": [HP],
ease: [
"in",
"out",
"in-out"
],
- font: [tue],
+ font: [lue],
"font-weight": [
"thin",
"extralight",
@@ -34107,7 +34144,7 @@ var wle = (e, t) => {
"extrabold",
"black"
],
- "inset-shadow": [FP],
+ "inset-shadow": [HP],
leading: [
"none",
"tight",
@@ -34124,11 +34161,11 @@ var wle = (e, t) => {
"distant",
"none"
],
- radius: [FP],
- shadow: [FP],
- spacing: ["px", MP],
- text: [FP],
- "text-shadow": [FP],
+ radius: [HP],
+ shadow: [HP],
+ spacing: ["px", zP],
+ text: [HP],
+ "text-shadow": [HP],
tracking: [
"tighter",
"tight",
@@ -34142,9 +34179,9 @@ var wle = (e, t) => {
aspect: [{ aspect: [
"auto",
"square",
- jP,
RP,
- UP,
+ GP,
+ XP,
g
] }],
container: ["container"],
@@ -34152,15 +34189,15 @@ var wle = (e, t) => {
"",
"normal",
"size",
- UP,
- RP
+ XP,
+ GP
] }],
- "container-named": [nue],
+ "container-named": [uue],
columns: [{ columns: [
- MP,
+ zP,
"auto",
- RP,
- UP,
+ GP,
+ XP,
s
] }],
"break-after": [{ "break-after": y() }],
@@ -34257,13 +34294,13 @@ var wle = (e, t) => {
"collapse"
],
z: [{ z: [
- NP,
+ BP,
"auto",
- UP,
- RP
+ XP,
+ GP
] }],
basis: [{ basis: [
- jP,
+ RP,
"full",
"auto",
s,
@@ -34281,32 +34318,32 @@ var wle = (e, t) => {
"wrap-reverse"
] }],
flex: [{ flex: [
- MP,
- jP,
+ zP,
+ RP,
"auto",
"initial",
"none",
- RP
+ GP
] }],
grow: [{ grow: [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
shrink: [{ shrink: [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
order: [{ order: [
- NP,
+ BP,
"first",
"last",
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"grid-cols": [{ "grid-cols": E() }],
"col-start-end": [{ col: D() }],
@@ -34413,15 +34450,15 @@ var wle = (e, t) => {
"font-size": [{ text: [
"base",
n,
- WP,
- zP
+ ZP,
+ KP
] }],
"font-smoothing": ["antialiased", "subpixel-antialiased"],
"font-style": ["italic", "not-italic"],
"font-weight": [{ font: [
r,
- uue,
- iue
+ vue,
+ fue
] }],
"font-stretch": [{ "font-stretch": [
"ultra-condensed",
@@ -34433,15 +34470,15 @@ var wle = (e, t) => {
"expanded",
"extra-expanded",
"ultra-expanded",
- PP,
- RP
+ VP,
+ GP
] }],
"font-family": [{ font: [
- sue,
- aue,
+ hue,
+ pue,
t
] }],
- "font-features": [{ "font-features": [RP] }],
+ "font-features": [{ "font-features": [GP] }],
"fvn-normal": ["normal-nums"],
"fvn-ordinal": ["ordinal"],
"fvn-slashed-zero": ["slashed-zero"],
@@ -34450,14 +34487,14 @@ var wle = (e, t) => {
"fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
tracking: [{ tracking: [
i,
- UP,
- RP
+ XP,
+ GP
] }],
"line-clamp": [{ "line-clamp": [
- MP,
+ zP,
"none",
- UP,
- BP
+ XP,
+ qP
] }],
leading: [{ leading: [
"none",
@@ -34466,16 +34503,16 @@ var wle = (e, t) => {
] }],
"list-image": [{ "list-image": [
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"list-style-position": [{ list: ["inside", "outside"] }],
"list-style-type": [{ list: [
"disc",
"decimal",
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"text-alignment": [{ text: [
"left",
@@ -34495,18 +34532,18 @@ var wle = (e, t) => {
],
"text-decoration-style": [{ decoration: [...se(), "wavy"] }],
"text-decoration-thickness": [{ decoration: [
- MP,
+ zP,
"from-font",
"auto",
- UP,
- zP
+ XP,
+ KP
] }],
"text-decoration-color": [{ decoration: N() }],
"underline-offset": [{ "underline-offset": [
- MP,
+ zP,
"auto",
- UP,
- RP
+ XP,
+ GP
] }],
"text-transform": [
"uppercase",
@@ -34527,9 +34564,9 @@ var wle = (e, t) => {
] }],
indent: [{ indent: w() }],
"tab-size": [{ tab: [
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
] }],
"vertical-align": [{ align: [
"baseline",
@@ -34540,8 +34577,8 @@ var wle = (e, t) => {
"text-bottom",
"sub",
"super",
- UP,
- RP
+ XP,
+ GP
] }],
whitespace: [{ whitespace: [
"normal",
@@ -34569,8 +34606,8 @@ var wle = (e, t) => {
] }],
content: [{ content: [
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"bg-attachment": [{ bg: [
"fixed",
@@ -34605,24 +34642,24 @@ var wle = (e, t) => {
"l",
"tl"
] },
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
],
radial: [
"",
- UP,
- RP
+ XP,
+ GP
],
conic: [
"",
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
]
},
- lue,
- oue
+ _ue,
+ mue
] }],
"bg-color": [{ bg: N() }],
"gradient-from-pos": [{ from: F() }],
@@ -34689,15 +34726,15 @@ var wle = (e, t) => {
"hidden"
] }],
"outline-offset": [{ "outline-offset": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"outline-w": [{ outline: [
"",
- MP,
- WP,
- zP
+ zP,
+ ZP,
+ KP
] }],
"outline-color": [{ outline: N() }],
shadow: [{ shadow: [
@@ -34705,35 +34742,35 @@ var wle = (e, t) => {
"inner",
"none",
u,
- KP,
- HP
+ $P,
+ YP
] }],
"shadow-color": [{ shadow: N() }],
"inset-shadow": [{ "inset-shadow": [
"none",
d,
- KP,
- HP
+ $P,
+ YP
] }],
"inset-shadow-color": [{ "inset-shadow": N() }],
"ring-w": [{ ring: oe() }],
"ring-w-inset": ["ring-inset"],
"ring-color": [{ ring: N() }],
- "ring-offset-w": [{ "ring-offset": [MP, zP] }],
+ "ring-offset-w": [{ "ring-offset": [zP, KP] }],
"ring-offset-color": [{ "ring-offset": N() }],
"inset-ring-w": [{ "inset-ring": oe() }],
"inset-ring-color": [{ "inset-ring": N() }],
"text-shadow": [{ "text-shadow": [
"none",
f,
- KP,
- HP
+ $P,
+ YP
] }],
"text-shadow-color": [{ "text-shadow": N() }],
opacity: [{ opacity: [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"mix-blend": [{ "mix-blend": [
...ce(),
@@ -34755,7 +34792,7 @@ var wle = (e, t) => {
"intersect",
"exclude"
] }],
- "mask-image-linear-pos": [{ "mask-linear": [MP] }],
+ "mask-image-linear-pos": [{ "mask-linear": [zP] }],
"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": N() }],
@@ -34784,7 +34821,7 @@ var wle = (e, t) => {
"mask-image-y-to-pos": [{ "mask-y-to": le() }],
"mask-image-y-from-color": [{ "mask-y-from": N() }],
"mask-image-y-to-color": [{ "mask-y-to": N() }],
- "mask-image-radial": [{ "mask-radial": [UP, RP] }],
+ "mask-image-radial": [{ "mask-radial": [XP, GP] }],
"mask-image-radial-from-pos": [{ "mask-radial-from": le() }],
"mask-image-radial-to-pos": [{ "mask-radial-to": le() }],
"mask-image-radial-from-color": [{ "mask-radial-from": N() }],
@@ -34795,7 +34832,7 @@ var wle = (e, t) => {
farthest: ["side", "corner"]
}] }],
"mask-image-radial-pos": [{ "mask-radial-at": b() }],
- "mask-image-conic-pos": [{ "mask-conic": [MP] }],
+ "mask-image-conic-pos": [{ "mask-conic": [zP] }],
"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": N() }],
@@ -34819,111 +34856,111 @@ var wle = (e, t) => {
"mask-type": [{ "mask-type": ["alpha", "luminance"] }],
"mask-image": [{ mask: [
"none",
- UP,
- RP
+ XP,
+ GP
] }],
filter: [{ filter: [
"",
"none",
- UP,
- RP
+ XP,
+ GP
] }],
blur: [{ blur: ue() }],
brightness: [{ brightness: [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
contrast: [{ contrast: [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"drop-shadow": [{ "drop-shadow": [
"",
"none",
p,
- KP,
- HP
+ $P,
+ YP
] }],
"drop-shadow-color": [{ "drop-shadow": N() }],
grayscale: [{ grayscale: [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"hue-rotate": [{ "hue-rotate": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
invert: [{ invert: [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
saturate: [{ saturate: [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
sepia: [{ sepia: [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-filter": [{ "backdrop-filter": [
"",
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"backdrop-blur": [{ "backdrop-blur": ue() }],
"backdrop-brightness": [{ "backdrop-brightness": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-contrast": [{ "backdrop-contrast": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-grayscale": [{ "backdrop-grayscale": [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-invert": [{ "backdrop-invert": [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-opacity": [{ "backdrop-opacity": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-saturate": [{ "backdrop-saturate": [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"backdrop-sepia": [{ "backdrop-sepia": [
"",
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
"border-collapse": [{ border: ["collapse", "separate"] }],
"border-spacing": [{ "border-spacing": w() }],
@@ -34939,39 +34976,39 @@ var wle = (e, t) => {
"shadow",
"transform",
"none",
- UP,
- RP
+ XP,
+ GP
] }],
"transition-behavior": [{ transition: ["normal", "discrete"] }],
duration: [{ duration: [
- MP,
+ zP,
"initial",
- UP,
- RP
+ XP,
+ GP
] }],
ease: [{ ease: [
"linear",
"initial",
_,
- UP,
- RP
+ XP,
+ GP
] }],
delay: [{ delay: [
- MP,
- UP,
- RP
+ zP,
+ XP,
+ GP
] }],
animate: [{ animate: [
"none",
v,
- UP,
- RP
+ XP,
+ GP
] }],
backface: [{ backface: ["hidden", "visible"] }],
perspective: [{ perspective: [
h,
- UP,
- RP
+ XP,
+ GP
] }],
"perspective-origin": [{ "perspective-origin": x() }],
rotate: [{ rotate: de() }],
@@ -34987,8 +35024,8 @@ var wle = (e, t) => {
"skew-x": [{ "skew-x": pe() }],
"skew-y": [{ "skew-y": pe() }],
transform: [{ transform: [
- UP,
- RP,
+ XP,
+ GP,
"",
"none",
"gpu",
@@ -35002,9 +35039,9 @@ var wle = (e, t) => {
"translate-z": [{ "translate-z": me() }],
"translate-none": ["translate-none"],
zoom: [{ zoom: [
- NP,
- UP,
- RP
+ BP,
+ XP,
+ GP
] }],
accent: [{ accent: N() }],
appearance: [{ appearance: ["none", "auto"] }],
@@ -35054,8 +35091,8 @@ var wle = (e, t) => {
"nwse-resize",
"zoom-in",
"zoom-out",
- UP,
- RP
+ XP,
+ GP
] }],
"field-sizing": [{ "field-sizing": ["fixed", "content"] }],
"pointer-events": [{ "pointer-events": ["auto", "none"] }],
@@ -35141,15 +35178,15 @@ var wle = (e, t) => {
"scroll",
"contents",
"transform",
- UP,
- RP
+ XP,
+ GP
] }],
fill: [{ fill: ["none", ...N()] }],
"stroke-w": [{ stroke: [
- MP,
- WP,
zP,
- BP
+ ZP,
+ KP,
+ qP
] }],
stroke: [{ stroke: ["none", ...N()] }],
"forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
@@ -35407,16 +35444,16 @@ var wle = (e, t) => {
"selection"
]
};
-}, fue = (e, { cacheSize: t, prefix: n, experimentalParseClassName: r, extend: i = {}, override: a = {} }) => (rF(e, "cacheSize", t), rF(e, "prefix", n), rF(e, "experimentalParseClassName", r), iF(e.theme, a.theme), iF(e.classGroups, a.classGroups), iF(e.conflictingClassGroups, a.conflictingClassGroups), iF(e.conflictingClassGroupModifiers, a.conflictingClassGroupModifiers), rF(e, "postfixLookupClassGroups", a.postfixLookupClassGroups), rF(e, "orderSensitiveModifiers", a.orderSensitiveModifiers), aF(e.theme, i.theme), aF(e.classGroups, i.classGroups), aF(e.conflictingClassGroups, i.conflictingClassGroups), aF(e.conflictingClassGroupModifiers, i.conflictingClassGroupModifiers), oF(e, i, "postfixLookupClassGroups"), oF(e, i, "orderSensitiveModifiers"), e), rF = (e, t, n) => {
+}, bue = (e, { cacheSize: t, prefix: n, experimentalParseClassName: r, extend: i = {}, override: a = {} }) => (uF(e, "cacheSize", t), uF(e, "prefix", n), uF(e, "experimentalParseClassName", r), dF(e.theme, a.theme), dF(e.classGroups, a.classGroups), dF(e.conflictingClassGroups, a.conflictingClassGroups), dF(e.conflictingClassGroupModifiers, a.conflictingClassGroupModifiers), uF(e, "postfixLookupClassGroups", a.postfixLookupClassGroups), uF(e, "orderSensitiveModifiers", a.orderSensitiveModifiers), fF(e.theme, i.theme), fF(e.classGroups, i.classGroups), fF(e.conflictingClassGroups, i.conflictingClassGroups), fF(e.conflictingClassGroupModifiers, i.conflictingClassGroupModifiers), pF(e, i, "postfixLookupClassGroups"), pF(e, i, "orderSensitiveModifiers"), e), uF = (e, t, n) => {
n !== void 0 && (e[t] = n);
-}, iF = (e, t) => {
- if (t) for (let n in t) rF(e, n, t[n]);
-}, aF = (e, t) => {
- if (t) for (let n in t) oF(e, t, n);
-}, oF = (e, t, n) => {
+}, dF = (e, t) => {
+ if (t) for (let n in t) uF(e, n, t[n]);
+}, fF = (e, t) => {
+ if (t) for (let n in t) pF(e, t, n);
+}, pF = (e, t, n) => {
let r = t[n];
r !== void 0 && (e[n] = e[n] ? e[n].concat(r) : r);
-}, pue = (e, ...t) => typeof e == "function" ? DP(nF, e, ...t) : DP(() => fue(nF(), e), ...t), mue = [
+}, xue = (e, ...t) => typeof e == "function" ? PP(lF, e, ...t) : PP(() => bue(lF(), e), ...t), Sue = [
"large-title",
"display-1",
"display-2",
@@ -35430,17 +35467,17 @@ var wle = (e, t) => {
"body-2",
"caption-1",
"caption-2"
-], hue = [
+], Cue = [
"regular",
"medium",
"semibold",
"bold"
-], sF = pue({ extend: { classGroups: { "font-size": [{ text: mue.flatMap((e) => hue.map((t) => `${e}-${t}`)) }] } } });
-function cF(e) {
+], mF = xue({ extend: { classGroups: { "font-size": [{ text: Sue.flatMap((e) => Cue.map((t) => `${e}-${t}`)) }] } } });
+function hF(e) {
return e;
}
// src/react/components/pill-tab.tsx
-var gue = typeof window < "u" ? P.useLayoutEffect : P.useEffect, lF = cF({
+var wue = typeof window < "u" ? P.useLayoutEffect : P.useEffect, gF = hF({
radius: {
blue: "rounded-full",
gray: "rounded-2lg"
@@ -35462,9 +35499,9 @@ var gue = typeof window < "u" ? P.useLayoutEffect : P.useEffect, lF = cF({
gray: "text-text-primary"
}
});
-function uF({ children: e, className: t, ref: n, container: r, ...i }) {
+function _F({ children: e, className: t, ref: n, container: r, ...i }) {
let a = (0, P.useRef)(null), [o, s] = (0, P.useState)(null);
- gue(() => {
+ wue(() => {
let e = r === void 0 ? a.current : r;
if (!e) return;
let t = () => {
@@ -35500,7 +35537,7 @@ function uF({ children: e, className: t, ref: n, container: r, ...i }) {
}, l = o && /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
"data-pill-thumb": "",
- className: sF("pointer-events-none absolute left-0 top-0", lF.radius[o.variant], lF.thumb[o.variant]),
+ className: mF("pointer-events-none absolute left-0 top-0", gF.radius[o.variant], gF.thumb[o.variant]),
style: {
"--pill-left": `${o.left}px`,
"--pill-top": `${o.top}px`,
@@ -35511,43 +35548,43 @@ function uF({ children: e, className: t, ref: n, container: r, ...i }) {
return r === void 0 ? /* @__PURE__ */ (0, F.jsxs)("div", {
ref: c,
role: "group",
- className: sF("relative inline-flex items-center gap-1", t),
+ className: mF("relative inline-flex items-center gap-1", t),
...i,
children: [l, e]
}) : r ? (0, Lt.createPortal)(l, r) : null;
}
// src/react/manage-header/manage-header-island.tsx
-var dF = null, fF = null, pF = /* @__PURE__ */ new Set();
-function _ue(e) {
- return pF.add(e), () => {
- pF.delete(e);
+var vF = null, yF = null, bF = /* @__PURE__ */ new Set();
+function Tue(e) {
+ return bF.add(e), () => {
+ bF.delete(e);
};
}
-function vue() {
- for (let e of [...pF]) e();
+function Eue() {
+ for (let e of [...bF]) e();
}
-var yue = { render(e) {
- fF = e, (0, Lt.flushSync)(vue);
+var Due = { render(e) {
+ yF = e, (0, Lt.flushSync)(Eue);
} };
-function bue(e) {
- return dF = e, fF = null, yue;
+function Oue(e) {
+ return vF = e, yF = null, Due;
}
-function xue() {
- let e = (0, P.useSyncExternalStore)(_ue, () => fF);
- return dF && e ? /* @__PURE__ */ (0, F.jsx)(Sue, {
- host: dF,
+function kue() {
+ let e = (0, P.useSyncExternalStore)(Tue, () => yF);
+ return vF && e ? /* @__PURE__ */ (0, F.jsx)(Aue, {
+ host: vF,
props: e
}) : null;
}
-function Sue({ host: e, props: t }) {
- let n = fP(t);
+function Aue({ host: e, props: t }) {
+ let n = yP(t);
return n ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(Cue, {
+ /* @__PURE__ */ (0, F.jsx)(jue, {
host: e,
pressed: n.pressed,
menu: t.menu
}),
- n.crumb ? /* @__PURE__ */ (0, F.jsx)(wue, {
+ n.crumb ? /* @__PURE__ */ (0, F.jsx)(Mue, {
host: e,
label: n.crumb
}) : null,
@@ -35556,13 +35593,13 @@ function Sue({ host: e, props: t }) {
"data-compact": n.compact ? "" : void 0,
children: n.title
}),
- n.lede.kind === "none" ? null : /* @__PURE__ */ (0, F.jsx)(Tue, {
+ n.lede.kind === "none" ? null : /* @__PURE__ */ (0, F.jsx)(Nue, {
host: e,
lede: n.lede
})
] }) : null;
}
-function Cue({ host: e, pressed: t, menu: n }) {
+function jue({ host: e, pressed: t, menu: n }) {
let r = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
let e = r.current, t = e?.querySelector("button[aria-pressed=\"true\"]");
@@ -35572,7 +35609,7 @@ function Cue({ host: e, pressed: t, menu: n }) {
}, [t, n]), /* @__PURE__ */ (0, F.jsx)("nav", {
"data-manage-bar": "",
"aria-label": "管理",
- children: /* @__PURE__ */ (0, F.jsx)(uF, {
+ children: /* @__PURE__ */ (0, F.jsx)(_F, {
ref: r,
"data-manage-menu": "",
"data-pill-nav": "",
@@ -35586,13 +35623,13 @@ function Cue({ host: e, pressed: t, menu: n }) {
"data-pill-selected": a ? "" : void 0,
"data-pill-variant": "gray",
onClick: () => e.openManage(n),
- children: [/* @__PURE__ */ (0, F.jsx)(gP, { name: i }), /* @__PURE__ */ (0, F.jsx)("span", { children: r })]
+ children: [/* @__PURE__ */ (0, F.jsx)(CP, { name: i }), /* @__PURE__ */ (0, F.jsx)("span", { children: r })]
}, n);
})
})
});
}
-function wue({ host: e, label: t }) {
+function Mue({ host: e, label: t }) {
return /* @__PURE__ */ (0, F.jsx)("nav", {
"data-manage-crumb": "",
"aria-label": "当前位置",
@@ -35602,20 +35639,20 @@ function wue({ host: e, label: t }) {
t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || t.button || (t.preventDefault(), e.openDataCleanup());
},
children: "数据管理"
- }), /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-right" })] }), /* @__PURE__ */ (0, F.jsx)("li", {
+ }), /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-right" })] }), /* @__PURE__ */ (0, F.jsx)("li", {
"aria-current": "true",
children: /* @__PURE__ */ (0, F.jsx)("span", { children: t })
})] })
});
}
-function Tue({ host: e, lede: t }) {
+function Nue({ host: e, lede: t }) {
return /* @__PURE__ */ (0, F.jsx)("p", {
className: "mono",
"data-manage-lede": "",
children: t.kind === "skeleton" ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-trash-lede-skeletons": "",
- dangerouslySetInnerHTML: { __html: hP }
- }) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(Eue, { text: t.text }), t.total ? /* @__PURE__ */ (0, F.jsx)("button", {
+ dangerouslySetInnerHTML: { __html: SP }
+ }) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(Pue, { text: t.text }), t.total ? /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-empty-trash": "",
"data-danger": "",
@@ -35625,39 +35662,39 @@ function Tue({ host: e, lede: t }) {
}) : null] })
});
}
-function Eue({ text: e }) {
+function Pue({ text: e }) {
let t = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
- ks(t.current, e);
+ Ws(t.current, e);
}, [e]), /* @__PURE__ */ (0, F.jsx)("span", {
ref: t,
"data-lede-text": ""
});
}
// src/core/text-lang.ts
-var Due = /[぀-ヿㇰ-ㇿヲ-゚]/, Oue = /[㐀-鿿豈-﫿]/, kue = /[A-Za-z]/;
-function mF(e) {
+var Fue = /[぀-ヿㇰ-ㇿヲ-゚]/, Iue = /[㐀-鿿豈-﫿]/, Lue = /[A-Za-z]/;
+function xF(e) {
let t = String(e ?? "");
- if (Due.test(t)) return "ja";
- if (!Oue.test(t) && kue.test(t)) return "en";
+ if (Fue.test(t)) return "ja";
+ if (!Iue.test(t) && Lue.test(t)) return "en";
}
-var Aue = (e) => {
- let t = mF(e);
+var Rue = (e) => {
+ let t = xF(e);
return t ? ` lang="${t}"` : "";
-}, jue = /\.(?:mp4|mkv|avi|wmv|mov|m4v|webm|ts|m2ts|mts|mpg|mpeg|flv|rm|rmvb|iso)$/i, Mue = (e, t = e?.name) => {
+}, zue = /\.(?:mp4|mkv|avi|wmv|mov|m4v|webm|ts|m2ts|mts|mpg|mpeg|flv|rm|rmvb|iso)$/i, Bue = (e, t = e?.name) => {
let n = String(t || "").trim();
- return e?.is_jav ? n.replace(jue, "") : n;
-}, Nue = (e) => /[぀-ヿ㐀-鿿]/.test(String(e || "")), Pue = (e) => {
+ return e?.is_jav ? n.replace(zue, "") : n;
+}, Vue = (e) => /[぀-ヿ㐀-鿿]/.test(String(e || "")), Hue = (e) => {
let t = [e?.catalog_title, e?.original_title].map((e) => String(e || "").trim()).filter(Boolean);
- return t.find(Nue) || t[0] || "";
+ return t.find(Vue) || t[0] || "";
};
-function hF(e, t = e?.name) {
- let n = Mue(e, t), r = String(e?.code || "").trim().toUpperCase();
+function SF(e, t = e?.name) {
+ let n = Bue(e, t), r = String(e?.code || "").trim().toUpperCase();
if (!e?.is_jav || !r) return {
code: "",
title: n
};
- let i = String(e?.display_code || r).trim().toUpperCase(), a = n.toUpperCase(), o = a === r || a === i || a.startsWith(r) && /^[\s._\-[\]]/.test(n.slice(r.length)) || a.startsWith(i) && /^[\s._\-[\]]/.test(n.slice(i.length)), s = a.startsWith(i) ? i.length : r.length, c = (o ? n.slice(s) : n).replace(/^[\s._-]+/, "").trim(), l = Pue(e), u = Object.prototype.hasOwnProperty.call(e || {}, "display_title") ? String(e.display_title || "").trim() : c, d = l || u, f = Array.isArray(e?.edition_badges) ? e.edition_badges.filter((e) => [
+ let i = String(e?.display_code || r).trim().toUpperCase(), a = n.toUpperCase(), o = a === r || a === i || a.startsWith(r) && /^[\s._\-[\]]/.test(n.slice(r.length)) || a.startsWith(i) && /^[\s._\-[\]]/.test(n.slice(i.length)), s = a.startsWith(i) ? i.length : r.length, c = (o ? n.slice(s) : n).replace(/^[\s._-]+/, "").trim(), l = Hue(e), u = Object.prototype.hasOwnProperty.call(e || {}, "display_title") ? String(e.display_title || "").trim() : c, d = l || u, f = Array.isArray(e?.edition_badges) ? e.edition_badges.filter((e) => [
"中字",
"无码",
"无码破解"
@@ -35668,23 +35705,23 @@ function hF(e, t = e?.name) {
badges: f
};
}
-var gF = (e, t = e?.name) => {
- let { code: n, title: r, badges: i = [] } = hF(e, t);
+var CF = (e, t = e?.name) => {
+ let { code: n, title: r, badges: i = [] } = SF(e, t);
return n ? [
n,
...i,
r
].filter(Boolean).join(" ") : r;
};
-function _F(e, t = e?.name) {
- let { code: n, title: r, badges: i = [] } = hF(e, t);
+function wF(e, t = e?.name) {
+ let { code: n, title: r, badges: i = [] } = SF(e, t);
if (!n) return z(r);
let a = i.map((e) => `<small class="javedition ${e === "中字" ? "subtitle" : e === "无码" ? "uncensored" : e === "无码破解" ? "cracked" : "quality"}">${z(e)}</small>`).join("");
- return `<span class="ui-javidentity"><strong class="ui-javcode">${z(n)}</strong>${a}</span>${r ? ` <span class="ui-javtitle"${Aue(r)}>${z(r)}</span>` : ""}`;
+ return `<span class="ui-javidentity"><strong class="ui-javcode">${z(n)}</strong>${a}</span>${r ? ` <span class="ui-javtitle"${Rue(r)}>${z(r)}</span>` : ""}`;
}
// src/react/activity/tasks.ts
-var vF = "/api/tasks", yF = ["tasks"];
-function Fue(e, t) {
+var TF = "/api/tasks", EF = ["tasks"];
+function Uue(e, t) {
let n = 0, r = 0, i = 0;
for (let a of t) for (let [t, o] of Object.entries(e?.[String(a.id)] || {})) n += o, (t === "pending" || t === "running") && (r += o), (t === "failed" || t === "interrupted") && (i += o);
return {
@@ -35694,7 +35731,7 @@ function Fue(e, t) {
settled: n - r
};
}
-function Iue(e) {
+function Wue(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) {
let e = t.get(n.task_key);
@@ -35705,11 +35742,11 @@ function Iue(e) {
}
return [...t.values()];
}
-var Lue = (e, t) => B(`${vF}?${new URLSearchParams({
+var Gue = (e, t) => B(`${TF}?${new URLSearchParams({
before_finished_at: e.finished_at || "",
before_id: String(e.id)
})}`, t);
-function Rue(...e) {
+function Kue(...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) => {
@@ -35717,26 +35754,26 @@ function Rue(...e) {
return n === r ? t.id - e.id : n < r ? 1 : -1;
});
}
-var zue = 2e3, Bue = 1e4, bF = (e) => e?.running?.length ? zue : Bue, xF = (e) => B(vF, e);
-async function Vue(e) {
+var que = 2e3, Jue = 1e4, DF = (e) => e?.running?.length ? que : Jue, OF = (e) => B(TF, e);
+async function Yue(e) {
await H.fetchQuery({
- queryKey: yF,
- queryFn: () => xF(e)
+ queryKey: EF,
+ queryFn: () => OF(e)
});
}
-var Hue = {
+var Xue = {
manual: "手动",
scheduled: "定时",
startup: "启动",
cli: "命令行"
-}, SF = {
+}, Zue = {
pending: "排队中",
running: "进行中",
succeeded: "已完成",
failed: "失败",
cancelled: "已取消",
interrupted: "意外中断"
-}, CF = (e) => SF[e] || e, wF = {
+}, Que = (e) => Zue[e] || e, kF = {
checked: "已检查",
total: "总数",
scanned: "已扫描",
@@ -35813,7 +35850,7 @@ var Hue = {
without_code: "未识别番号",
incomplete: "资料或封面未取得",
result: "结果"
-}, TF = [
+}, AF = [
"gone_count",
"unclear_count",
"source_failed",
@@ -35835,14 +35872,14 @@ var Hue = {
"paused_count",
"miss",
"incomplete"
-], EF = ["face_match_unavailable"], DF = (e) => e.result_summary?.ok === !1 || !!e.result_summary?.error || EF.some((t) => e.result_summary?.[t] === !0) || TF.some((t) => Number(e.result_summary?.[t]) > 0);
-function OF(e) {
+], jF = ["face_match_unavailable"], MF = (e) => e.result_summary?.ok === !1 || !!e.result_summary?.error || jF.some((t) => e.result_summary?.[t] === !0) || AF.some((t) => Number(e.result_summary?.[t]) > 0);
+function NF(e) {
let t = e.result_summary?.issues;
return Array.isArray(t) ? t.filter((e) => !!e && typeof e == "object" && typeof e.error == "string" && typeof e.label == "string") : [];
}
-var kF = /* @__PURE__ */ new Set(["library-processing"]);
-function AF(e, t = !0) {
- if (!DF(e) && e.status !== "failed" || kF.has(e.task_key) && !t) return null;
+var PF = /* @__PURE__ */ new Set(["library-processing"]);
+function FF(e, t = !0) {
+ if (!MF(e) && e.status !== "failed" || PF.has(e.task_key) && !t) return null;
let n = {
"link-check": ["/data-cleanup#link-manager", "查看有问题的链接"],
"link-prune": ["/data-cleanup#link-manager", "查看有问题的链接"],
@@ -35860,12 +35897,12 @@ function AF(e, t = !0) {
label: n[1]
} : null;
}
-function jF(e) {
+function IF(e) {
let t = /* @__PURE__ */ new Map();
- for (let n of e) kF.has(n.task_key) && !n.followup_key && n.id > (t.get(n.task_key) ?? 0) && t.set(n.task_key, n.id);
+ for (let n of e) PF.has(n.task_key) && !n.followup_key && n.id > (t.get(n.task_key) ?? 0) && t.set(n.task_key, n.id);
return new Set(t.values());
}
-function MF(e) {
+function LF(e) {
let t = /* @__PURE__ */ new Map();
for (let n of e) {
if (!n.followup_key || n.parent_run_id == null) continue;
@@ -35874,7 +35911,7 @@ function MF(e) {
}
return t;
}
-function NF(e, t) {
+function RF(e, t) {
let n = [], r = /* @__PURE__ */ new Map();
for (let i of e) {
if (!t(i)) {
@@ -35896,12 +35933,12 @@ function NF(e, t) {
}
return n;
}
-var PF = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !DF(e) && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), FF = (e) => e.status === "pending" || e.status === "running";
-function IF(e) {
+var zF = (e) => e.trigger === "scheduled" && e.status === "succeeded" && !e.error && !MF(e) && !(Number(e.result_summary?.added) > 0) && !(Number(e.result_summary?.followups) > 0), BF = (e) => e.status === "pending" || e.status === "running";
+function VF(e) {
let t = `${e.task_label}:`, n = e.progress_label || "", r = String(e.result_summary?.name || "") || (n.startsWith(t) ? n.slice(t.length) : n === e.task_label ? "" : n), i = e.progress_total || 0, { name: a, ...o } = e.result_summary || {};
- return [r, BF(e.error) || YF(o) || (FF(e) && i > 0 ? `${RF(e.progress_current, i)} 项` : "")].filter(Boolean).join(" · ");
+ return [r, GF(e.error) || eI(o) || (BF(e) && i > 0 ? `${UF(e.progress_current, i)} 项` : "")].filter(Boolean).join(" · ");
}
-function LF(e) {
+function HF(e) {
if (typeof e != "number" || !Number.isFinite(e) || e < 0) return "";
let t = Math.floor(e);
if (t < 60) return `${t} 秒`;
@@ -35910,19 +35947,19 @@ function LF(e) {
let r = Math.floor(n / 60);
return r < 48 ? `${r} 小时 ${n % 60} 分` : `${Math.floor(r / 24).toLocaleString()} 天 ${r % 24} 小时`;
}
-function RF(e, t) {
+function UF(e, t) {
let n = Math.max(0, Number(t) || 0);
return `${Math.min(n, Math.max(0, Number(e) || 0)).toLocaleString()} / ${n.toLocaleString()}`;
}
-function zF(e) {
+function WF(e) {
let t = String(e || "").split(/\r?\n/).map((e) => e.trim()).filter(Boolean);
return t.length ? /^Traceback \(most recent call last\)/.test(t[0]) ? t[t.length - 1] : t[0] : "";
}
-function BF(e) {
- let t = zF(e), n = t.match(/^(?:[\w.]*Error|Exception):\s*(.*)$/);
- return n ? tn(n[1]) : t;
+function GF(e) {
+ let t = WF(e), n = t.match(/^(?:[\w.]*Error|Exception):\s*(.*)$/);
+ return n ? _n(n[1]) : t;
}
-var VF = {
+var KF = {
partial: "处理已结束,部分项目需处理",
complete: "处理完成",
interrupted: "处理已中断",
@@ -35939,11 +35976,11 @@ var VF = {
三站都没对上她: "三个来源均未找到与该人物相符的资料页",
已有身份: "已有创作者分类",
已变: "资料已被其他操作修改,本次未保存"
-}, HF = {
+}, qF = {
avwikidb: "AVWikiDB",
javdb: "JavDB",
"minnano-av": "みんなのAV"
-}, UF = {
+}, JF = {
like: "标记喜欢",
seen: "标记看过",
later: "加入稍后看",
@@ -35954,8 +35991,8 @@ var VF = {
"dismiss-junk": "确认不是垃圾",
"reconsider-junk": "重新判定垃圾",
region: "判定产地"
-}, WF = (e) => VF[e] || e.replace(/(avwikidb|javdb|minnano-av) (绑定|写入)/gi, (e, t, n) => n === "绑定" ? `已关联 ${HF[t.toLowerCase()]} 资料页` : `已保存来自 ${HF[t.toLowerCase()]} 的资料`);
-function GF(e) {
+}, YF = (e) => KF[e] || e.replace(/(avwikidb|javdb|minnano-av) (绑定|写入)/gi, (e, t, n) => n === "绑定" ? `已关联 ${qF[t.toLowerCase()]} 资料页` : `已保存来自 ${qF[t.toLowerCase()]} 的资料`);
+function XF(e) {
if (!e) return "";
let t = new Date(e);
return Number.isNaN(t.getTime()) ? "" : t.toLocaleString(void 0, {
@@ -35965,7 +36002,7 @@ function GF(e) {
minute: "2-digit"
});
}
-var KF = /* @__PURE__ */ new Set([
+var ZF = /* @__PURE__ */ new Set([
"blocked_by",
"status",
"run_id",
@@ -35974,14 +36011,20 @@ var KF = /* @__PURE__ */ new Set([
"completed_at",
"finished_at"
]);
-function qF(e) {
- let t = JF(e);
+function QF(e) {
+ let t = $F(e);
return e?.face_match_unavailable === !0 && !t.some((e) => /不可用|未生效/.test(e)) && t.push("人脸模型不可用,未做人脸核对"), t;
}
-function JF(e) {
- return Object.entries(e || {}).filter(([e, t]) => !KF.has(e) && (e in wF || e === "outcome" || e === "followups" || e === "error") && (typeof t == "number" || typeof t == "string") && String(t) !== "" && (t !== 0 || e === "checked" || e === "total")).map(([e, t]) => e === "followups" ? `已安排 ${Number(t).toLocaleString()} 项补充任务` : e === "error" ? BF(String(t)) : e === "outcome" || e === "result" ? WF(String(t)) : e === "cache_bytes" || e === "bytes_reclaimed" ? `${wF[e]} ${jn(Number(t))}` : e === "operation" ? `操作:${UF[String(t)] || "批量操作"}` : `${wF[e]} ${typeof t == "number" ? t.toLocaleString() : t}`);
+function $F(e) {
+ return Object.entries(e || {}).filter(([e, t]) => !ZF.has(e) && (e in kF || e === "outcome" || e === "followups" || e === "error") && (typeof t == "number" || typeof t == "string") && String(t) !== "" && (t !== 0 || e === "checked" || e === "total")).map(([e, t]) => e === "followups" ? `已安排 ${Number(t).toLocaleString()} 项补充任务` : e === "error" ? GF(String(t)) : e === "outcome" || e === "result" ? YF(String(t)) : e === "cache_bytes" || e === "bytes_reclaimed" ? `${kF[e]} ${Kn(Number(t))}` : e === "operation" ? `操作:${JF[String(t)] || "批量操作"}` : `${kF[e]} ${typeof t == "number" ? t.toLocaleString() : t}`);
+}
+var eI = (e) => QF(e).join(" · ");
+// src/react/use-entity-names.ts
+function tI() {
+ return (0, P.useSyncExternalStore)(Kt, Gt, Gt);
}
-var YF = (e) => qF(e).join(" · "), XF = cF({
+// src/react/boardui/components/base/buttons/icon-button.tsx
+var nI = hF({
base: "relative inline-flex shrink-0 items-center justify-center overflow-visible rounded-2lg bg-background-primary-default text-foreground-icon-primary border border-border-button-default shadow-xs select-none cursor-pointer transition-[background-color,border-color,box-shadow,color] duration-150 ease outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring hover:bg-background-primary-hover hover:border-border-button-hover active:bg-background-primary-active active:border-border-button-active disabled:cursor-not-allowed disabled:bg-background-primary-disabled disabled:border-border-button-default disabled:text-icon-button-disabled-foreground disabled:opacity-60 disabled:shadow-none",
size: {
medium: "size-9",
@@ -35992,20 +36035,20 @@ var YF = (e) => qF(e).join(" · "), XF = cF({
small: "size-4 shrink-0"
}
});
-function ZF({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
+function rI({ icon: e, size: t = "medium", className: n, type: r = "button", ref: i, ...a }) {
return /* @__PURE__ */ (0, F.jsx)("button", {
ref: i,
type: r,
- className: sF(XF.base, XF.size[t], n),
+ className: mF(nI.base, nI.size[t], n),
...a,
children: /* @__PURE__ */ (0, F.jsx)(e, {
- className: XF.icon[t],
+ className: nI.icon[t],
"aria-hidden": !0
})
});
}
// src/react/components/glass-drift.tsx
-function QF() {
+function iI() {
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-glass-drift": "",
"aria-hidden": "true",
@@ -36019,7 +36062,7 @@ function QF() {
});
}
// src/react/components/use-stuck.ts
-function $F(e) {
+function aI(e) {
(0, P.useEffect)(() => {
let t = e.current;
if (!t) return;
@@ -36036,31 +36079,31 @@ function $F(e) {
}, [e]);
}
// src/react/components/use-horizontal-scroller.ts
-function eI(e, t = !0) {
+function oI(e, t = !0) {
let [n, r] = (0, P.useState)(null), i = (0, P.useCallback)((t) => {
r(t), typeof e == "function" ? e(t) : e && (e.current = t);
}, [e]);
return (0, P.useLayoutEffect)(() => {
if (!n || !t) return;
n.dataset.horizontalScroll = "";
- let e = lc(n);
+ let e = wc(n);
return () => {
e.destroy(), delete n.dataset.horizontalScroll, delete n.dataset.overflowLeft, delete n.dataset.overflowRight;
};
}, [n, t]), i;
}
// src/react/components/filter-glass.tsx
-var tI = ({ className: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
+var sI = ({ className: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
className: e,
- dangerouslySetInnerHTML: { __html: xs("正在处理") }
+ dangerouslySetInnerHTML: { __html: Is("正在处理") }
});
-function nI({ label: e, icon: t, busy: n = !1, busyStyle: r = "spinner", onPress: i, ...a }) {
- return /* @__PURE__ */ (0, F.jsx)(ZF, {
+function cI({ label: e, icon: t, busy: n = !1, busyStyle: r = "spinner", onPress: i, ...a }) {
+ return /* @__PURE__ */ (0, F.jsx)(rI, {
...a,
"data-filter-action": "",
size: "small",
- icon: n && r === "spinner" ? tI : t,
+ icon: n && r === "spinner" ? sI : t,
"aria-label": e,
title: a.title || e,
"aria-busy": n || void 0,
@@ -36070,9 +36113,9 @@ function nI({ label: e, icon: t, busy: n = !1, busyStyle: r = "spinner", onPress
}
});
}
-function rI({ title: e, children: t }) {
+function lI({ title: e, children: t }) {
let n = (0, P.useRef)(null);
- return $F(n), /* @__PURE__ */ (0, F.jsxs)("div", {
+ return aI(n), /* @__PURE__ */ (0, F.jsxs)("div", {
ref: n,
role: "group",
"aria-label": e,
@@ -36085,20 +36128,20 @@ function rI({ title: e, children: t }) {
children: e
}),
t,
- /* @__PURE__ */ (0, F.jsx)(QF, {})
+ /* @__PURE__ */ (0, F.jsx)(iI, {})
]
});
}
-function iI({ 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, P.useRef)(null), f = eI(), p = eI(u);
- return $F(d), /* @__PURE__ */ (0, F.jsxs)("div", {
+function uI({ 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, P.useRef)(null), f = oI(), p = oI(u);
+ return aI(d), /* @__PURE__ */ (0, F.jsxs)("div", {
ref: d,
role: "group",
"aria-label": e,
"data-filter-glass": !0,
"data-glass-pane": "",
...c,
- className: sF("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
+ className: mF("sticky top-topbar z-10 mb-5.5 flex flex-col", i),
children: [
s,
n === null ? null : /* @__PURE__ */ (0, F.jsx)("div", {
@@ -36106,37 +36149,37 @@ function iI({ label: e, topLabel: t, top: n, bottom: r, className: i, topClassNa
role: "group",
"aria-label": t,
"data-filter-row": "top",
- className: sF("flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2", a),
+ className: mF("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, F.jsx)("div", {
ref: p,
"data-filter-row": "bottom",
"aria-busy": l || void 0,
- className: sF("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
+ className: mF("flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2", o),
children: r
}),
- /* @__PURE__ */ (0, F.jsx)(QF, {})
+ /* @__PURE__ */ (0, F.jsx)(iI, {})
]
});
}
-var aI = "flex h-8 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 oI({ children: e, pressed: t, onPress: n, className: r, ...i }) {
+var dI = "flex h-8 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 fI({ children: e, pressed: t, onPress: n, className: r, ...i }) {
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
...i,
"aria-pressed": t,
- className: sF(aI, r),
+ className: mF(dI, r),
onClick: n,
children: e
});
}
-var sI = "h-8 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
-function cI({ children: e, onPress: t, busy: n = !1 }) {
+var pI = "h-8 cursor-pointer rounded-full border border-(--glass-low) bg-transparent px-3 text-body-2-regular leading-none whitespace-nowrap text-inherit outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring aria-busy:cursor-wait aria-busy:opacity-55";
+function mI({ children: e, onPress: t, busy: n = !1 }) {
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-glass-pill": "",
- className: sI,
+ className: pI,
"aria-busy": n || void 0,
"aria-disabled": n || void 0,
onClick: () => {
@@ -36146,13 +36189,13 @@ function cI({ children: e, onPress: t, busy: n = !1 }) {
});
}
// src/react/components/use-view-glide.ts
-var lI = (e, t) => [
+var hI = (e, t) => [
"x",
"y",
"w",
"h"
].every((n) => e[n] === t[n]);
-function uI(e, t, n) {
+function gI(e, t, n) {
if (!t.contains(e)) return null;
let r = 0, i = 0;
for (let n = e; n && n !== t; n = n.offsetParent) r += n.offsetLeft, i += n.offsetTop;
@@ -36176,17 +36219,17 @@ function uI(e, t, n) {
h: e.offsetHeight
};
}
-function dI(e, t, n, r, { axis: i = "x" } = {}) {
+function _I(e, t, n, r, { axis: i = "x" } = {}) {
let a = (0, P.useRef)(null), o = (0, P.useCallback)((r, o) => {
let s = e.current, c = t.current, l = s?.parentElement;
if (!s) return;
- let u = c && c.offsetWidth ? r ?? c.querySelector(n) : null, d = u && l ? uI(u, l, i) : null;
+ let u = c && c.offsetWidth ? r ?? c.querySelector(n) : null, d = u && l ? gI(u, l, i) : null;
if (!d || !d.w || !d.h) {
- Tc(s), s.hidden = !0, a.current = null;
+ Bc(s), s.hidden = !0, a.current = null;
return;
}
let f = s.hidden ? null : a.current;
- s.hidden = !1, a.current = d, !(o && f && lI(f, d)) && Cc(s, o ? f : null, d, i);
+ s.hidden = !1, a.current = d, !(o && f && hI(f, d)) && Rc(s, o ? f : null, d, i);
}, [
e,
t,
@@ -36207,8 +36250,8 @@ function dI(e, t, n, r, { axis: i = "x" } = {}) {
passive: !0
}), addEventListener("resize", c, { passive: !0 });
let l = new ResizeObserver(() => {
- let e = t.current, o = e?.offsetWidth ? e.querySelector(n) : null, s = o && r ? uI(o, r, i) : null, l = a.current;
- s && l && lI(s, l) || c();
+ let e = t.current, o = e?.offsetWidth ? e.querySelector(n) : null, s = o && r ? gI(o, r, i) : null, l = a.current;
+ s && l && hI(s, l) || c();
}), u = t.current;
if (u && r) {
l.observe(u);
@@ -36234,12 +36277,12 @@ function dI(e, t, n, r, { axis: i = "x" } = {}) {
e.pointerType !== "touch" && o(null, !0);
}, [o]),
sync: (0, P.useCallback)(() => {
- Tc(e.current), o(null, !1);
+ Bc(e.current), o(null, !1);
}, [e, o])
};
}
// src/react/boardui/components/base/buttons/button.tsx
-var fI = cF({
+var vI = hF({
base: "inline-flex items-center justify-center gap-0.5 whitespace-nowrap overflow-hidden font-sans select-none cursor-pointer button-press-motion outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring disabled:cursor-not-allowed aria-disabled:cursor-not-allowed",
size: {
medium: "h-9 rounded-2lg p-2 text-body-medium",
@@ -36272,52 +36315,52 @@ function q({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadi
return /* @__PURE__ */ (0, F.jsxs)("button", {
ref: c,
type: s,
- className: sF(fI.base, fI.size[t], fI.variant[e], n && fI.iconOnlySize[t], o),
+ className: mF(vI.base, vI.size[t], vI.variant[e], n && vI.iconOnlySize[t], o),
...l,
children: [
r ? /* @__PURE__ */ (0, F.jsx)(r, {
- className: fI.icon[t],
+ className: vI.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, F.jsx)("span", {
- className: fI.label[t],
+ className: vI.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, F.jsx)(i, {
- className: fI.icon[t],
+ className: vI.icon[t],
"aria-hidden": !0
}) : null
]
});
}
-function pI({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
+function yI({ variant: e = "primary", size: t = "medium", iconOnly: n = !1, leadingIcon: r, trailingIcon: i, children: a, className: o, ref: s, ...c }) {
return /* @__PURE__ */ (0, F.jsxs)("a", {
ref: s,
- className: sF(fI.base, fI.size[t], fI.variant[e], n && fI.iconOnlySize[t], o),
+ className: mF(vI.base, vI.size[t], vI.variant[e], n && vI.iconOnlySize[t], o),
...c,
children: [
r ? /* @__PURE__ */ (0, F.jsx)(r, {
- className: fI.icon[t],
+ className: vI.icon[t],
"aria-hidden": !0
}) : null,
!n && a != null && /* @__PURE__ */ (0, F.jsx)("span", {
- className: fI.label[t],
+ className: vI.label[t],
children: a
}),
!n && i ? /* @__PURE__ */ (0, F.jsx)(i, {
- className: fI.icon[t],
+ className: vI.icon[t],
"aria-hidden": !0
}) : null
]
});
}
// node_modules/react-aria-components/dist/private/utils.mjs
-var mI = Symbol("default");
-function hI({ values: e, children: t }) {
+var bI = Symbol("default");
+function xI({ values: e, children: t }) {
for (let [n, r] of e) t = /*#__PURE__*/ P.createElement(n.Provider, { value: r }, t);
return t;
}
-function gI(e) {
+function SI(e) {
let { className: t, style: n, children: r, defaultClassName: i, defaultChildren: a, defaultStyle: o, values: s, render: c } = e;
return (0, P.useMemo)(() => {
let e, l, u;
@@ -36351,11 +36394,11 @@ function gI(e) {
c
]);
}
-function _I(e, t) {
+function CI(e, t) {
let n = (0, P.useContext)(e);
if (t === null) return null;
if (n && typeof n == "object" && "slots" in n && n.slots) {
- let e = t || mI;
+ let e = t || bI;
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}.`);
@@ -36364,8 +36407,8 @@ function _I(e, t) {
}
return n;
}
-function vI(e, t, n) {
- let { ref: r, ...i } = _I(n, e.slot) || {}, a = Zx((0, P.useMemo)(() => Hx(t, r), [t, r])), o = K(i, e);
+function wI(e, t, n) {
+ let { ref: r, ...i } = CI(n, e.slot) || {}, a = iS((0, P.useMemo)(() => Yx(t, r), [t, r])), o = K(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,
@@ -36383,42 +36426,42 @@ function vI(e, t, n) {
...e.style
}), [o, a];
}
-function yI(e = !0) {
+function TI(e = !0) {
let [t, n] = (0, P.useState)(e), r = (0, P.useRef)(!1), i = (0, P.useCallback)((e) => {
r.current = !0, n(!!e);
}, []);
- return Bb(() => {
+ return qb(() => {
r.current || n(!1);
}, []), [i, t];
}
-function bI(e) {
+function EI(e) {
let t = /^(data-.*)$/, n = {};
for (let r in e) t.test(r) || (n[r] = e[r]);
return n;
}
-function Uue(e, t, n) {
- let { render: r, ...i } = t, a = (0, P.useRef)(null), o = (0, P.useMemo)(() => Hx(n, a), [n, a]);
- Bb(() => {}, [e, r]);
+function $ue(e, t, n) {
+ let { render: r, ...i } = t, a = (0, P.useRef)(null), o = (0, P.useMemo)(() => Yx(n, a), [n, a]);
+ qb(() => {}, [e, r]);
let s = {
...i,
ref: o
};
return r ? r(s, void 0) : /*#__PURE__*/ P.createElement(e, s);
}
-var xI = {}, SI = new Proxy({}, { get(e, t) {
+var DI = {}, OI = new Proxy({}, { get(e, t) {
if (typeof t != "string") return;
- let n = xI[t];
- return n || (n = /*#__PURE__*/ (0, P.forwardRef)(Uue.bind(null, t)), xI[t] = n), n;
-} }), CI = /*#__PURE__*/ (0, P.createContext)(null), wI = /*#__PURE__*/ (0, P.createContext)(null), TI = /*#__PURE__*/ (0, P.createContext)(null), EI = {
+ let n = DI[t];
+ return n || (n = /*#__PURE__*/ (0, P.forwardRef)($ue.bind(null, t)), DI[t] = n), n;
+} }), kI = /*#__PURE__*/ (0, P.createContext)(null), AI = /*#__PURE__*/ (0, P.createContext)(null), jI = /*#__PURE__*/ (0, P.createContext)(null), MI = {
CollectionRoot({ collection: e, renderDropIndicator: t }) {
- return DI(e, null, t);
+ return NI(e, null, t);
},
CollectionBranch({ collection: e, parent: t, renderDropIndicator: n }) {
- return DI(e, t, n);
+ return NI(e, t, n);
}
};
-function DI(e, t, n) {
- return Sb({
+function NI(e, t, n) {
+ return kb({
items: t ? e.getChildren(t.key) : e,
dependencies: [n],
children(t) {
@@ -36428,11 +36471,11 @@ function DI(e, t, n) {
type: "item",
key: t.key,
dropPosition: "before"
- }), r, Wue(e, t, n));
+ }), r, ede(e, t, n));
}
});
}
-function Wue(e, t, n) {
+function ede(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);
@@ -36451,24 +36494,24 @@ function Wue(e, t, n) {
}
return s;
}
-var OI = /*#__PURE__*/ (0, P.createContext)(EI);
-function kI(e) {
+var PI = /*#__PURE__*/ (0, P.createContext)(MI);
+function FI(e) {
return (0, P.useMemo)(() => e == null ? null : /* @__PURE__ */ new Set([e]), [e]);
}
// node_modules/react-aria-components/dist/private/Label.mjs
-var AI = /*#__PURE__*/ (0, P.createContext)({}), jI = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, AI);
- let { elementType: n = "label", ...r } = e, i = SI[n];
+var II = /*#__PURE__*/ (0, P.createContext)({}), LI = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, II);
+ let { elementType: n = "label", ...r } = e, i = OI[n];
return /*#__PURE__*/ P.createElement(i, {
className: "react-aria-Label",
...r,
ref: t
});
-}), Gue = /*#__PURE__*/ (0, P.createContext)(null), MI = /*#__PURE__*/ (0, P.createContext)({}), NI = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, MI);
- let n = e, { isPending: r } = n, { buttonProps: i, isPressed: a } = pC(e, t);
- i = que(i, r);
- let { focusProps: o, isFocused: s, isFocusVisible: c } = BT(e), { hoverProps: l, isHovered: u } = WT({
+}), tde = /*#__PURE__*/ (0, P.createContext)(null), RI = /*#__PURE__*/ (0, P.createContext)({}), zI = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, RI);
+ let n = e, { isPending: r } = n, { buttonProps: i, isPressed: a } = bC(e, t);
+ i = rde(i, r);
+ let { focusProps: o, isFocused: s, isFocusVisible: c } = qT(e), { hoverProps: l, isHovered: u } = ZT({
...e,
isDisabled: e.isDisabled || r
}), d = {
@@ -36478,24 +36521,24 @@ var AI = /*#__PURE__*/ (0, P.createContext)({}), jI = /*#__PURE__*/ nS(function(
isFocusVisible: c,
isDisabled: e.isDisabled || !1,
isPending: r ?? !1
- }, f = gI({
+ }, f = SI({
...e,
values: d,
defaultClassName: "react-aria-Button"
- }), p = Bx(i.id), m = Bx(), h = i["aria-labelledby"];
+ }), p = qx(i.id), m = qx(), h = i["aria-labelledby"];
r && (h ? h = `${h} ${m}` : i["aria-label"] && (h = `${p} ${m}`));
let g = (0, P.useRef)(r);
(0, P.useEffect)(() => {
let e = { "aria-labelledby": h || p };
- (!g.current && s && r || g.current && s && !r) && VC(e, "assertive"), g.current = r;
+ (!g.current && s && r || g.current && s && !r) && JC(e, "assertive"), g.current = r;
}, [
r,
s,
h,
p
]);
- let _ = WS(e, { global: !0 });
- return delete _.onClick, /*#__PURE__*/ P.createElement(SI.button, {
+ let _ = ZS(e, { global: !0 });
+ return delete _.onClick, /*#__PURE__*/ P.createElement(OI.button, {
...K(_, f, i, o, l),
type: i.type === "submit" && r ? "button" : i.type,
id: p,
@@ -36509,61 +36552,61 @@ var AI = /*#__PURE__*/ (0, P.createContext)({}), jI = /*#__PURE__*/ nS(function(
"data-focused": s || void 0,
"data-pending": r || void 0,
"data-focus-visible": c || void 0
- }, /*#__PURE__*/ P.createElement(Gue.Provider, { value: { id: m } }, f.children));
-}), Kue = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
-function que(e, t) {
+ }, /*#__PURE__*/ P.createElement(tde.Provider, { value: { id: m } }, f.children));
+}), nde = /Focus|Blur|Hover|Pointer(Enter|Leave|Over|Out)|Mouse(Enter|Leave|Over|Out)/;
+function rde(e, t) {
if (t) {
- for (let t in e) t.startsWith("on") && !Kue.test(t) && (e[t] = void 0);
+ for (let t in e) t.startsWith("on") && !nde.test(t) && (e[t] = void 0);
e.href = void 0, e.target = void 0;
}
return e;
}
// node_modules/react-aria-components/dist/private/Heading.mjs
-var PI = /*#__PURE__*/ (0, P.createContext)({}), FI = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, PI);
- let { children: n, level: r = 3, className: i, ...a } = e, o = SI[`h${r}`];
+var BI = /*#__PURE__*/ (0, P.createContext)({}), VI = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, BI);
+ let { children: n, level: r = 3, className: i, ...a } = e, o = OI[`h${r}`];
return /*#__PURE__*/ P.createElement(o, {
...a,
ref: t,
className: i ?? "react-aria-Heading"
}, n);
-}), II = /*#__PURE__*/ (0, P.createContext)({}), Jue = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, II);
- let { elementType: n = "span", ...r } = e, i = SI[n];
+}), HI = /*#__PURE__*/ (0, P.createContext)({}), ide = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, HI);
+ let { elementType: n = "span", ...r } = e, i = OI[n];
return /*#__PURE__*/ P.createElement(i, {
className: "react-aria-Text",
...r,
ref: t
});
-}), LI = /*#__PURE__*/ (0, P.createContext)(null), RI = /*#__PURE__*/ (0, P.createContext)(null), zI = /*#__PURE__*/ (0, P.createContext)(null), BI = /*#__PURE__*/ (0, P.createContext)(null), Yue = /*#__PURE__*/ (0, P.createContext)(null), VI = /*#__PURE__*/ (0, P.createContext)(null);
-function Xue(e, t) {
- let { validationBehavior: n } = _I(RI) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, P.useContext)(Yue), a = Zx((0, P.useMemo)(() => Hx(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
- ...bI(e),
+}), UI = /*#__PURE__*/ (0, P.createContext)(null), WI = /*#__PURE__*/ (0, P.createContext)(null), GI = /*#__PURE__*/ (0, P.createContext)(null), KI = /*#__PURE__*/ (0, P.createContext)(null), ade = /*#__PURE__*/ (0, P.createContext)(null), qI = /*#__PURE__*/ (0, P.createContext)(null);
+function ode(e, t) {
+ let { validationBehavior: n } = CI(WI) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, P.useContext)(ade), a = iS((0, P.useMemo)(() => Yx(t, e.inputRef === void 0 ? null : e.inputRef), [t, e.inputRef])), o = {
+ ...EI(e),
children: typeof e.children == "function" || e.children,
value: e.value,
validationBehavior: r
};
- return [i ? iae(o, i, a) : cw(o, pw(e), a), a];
+ return [i ? fae(o, i, a) : hw(o, bw(e), a), a];
}
-var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+var sde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = vI(r, t, zI);
- let [i, a] = Xue(e, n);
- return /*#__PURE__*/ P.createElement(VI.Provider, { value: {
+ [e, t] = wI(r, t, GI);
+ let [i, a] = ode(e, n);
+ return /*#__PURE__*/ P.createElement(qI.Provider, { value: {
...i,
inputRef: a,
defaultClassName: "react-aria-Checkbox",
isIndeterminate: e.isIndeterminate,
isRequired: e.isRequired
- } }, /*#__PURE__*/ P.createElement(Que, {
+ } }, /*#__PURE__*/ P.createElement(cde, {
...e,
ref: t
}));
-}), Que = /*#__PURE__*/ (0, P.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, P.useContext)(VI), { isFocused: p, isFocusVisible: m, focusProps: h } = BT(), g = a || o, { hoverProps: _, isHovered: v } = WT({
+}), cde = /*#__PURE__*/ (0, P.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, P.useContext)(qI), { isFocused: p, isFocusVisible: m, focusProps: h } = qT(), g = a || o, { hoverProps: _, isHovered: v } = ZT({
...e,
isDisabled: g
- }), y = gI({
+ }), y = SI({
...e,
defaultClassName: u,
values: {
@@ -36578,8 +36621,8 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
isInvalid: c,
isRequired: f || !1
}
- }), b = WS(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ P.createElement(SI.label, {
+ }), b = ZS(e, { global: !0 });
+ return delete b.id, delete b.onClick, /*#__PURE__*/ P.createElement(OI.label, {
...K(b, n, _, y),
ref: t,
slot: e.slot || void 0,
@@ -36593,20 +36636,20 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
"data-readonly": o || void 0,
"data-invalid": c || void 0,
"data-required": f || void 0
- }, /*#__PURE__*/ P.createElement(Sw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
+ }, /*#__PURE__*/ P.createElement(kw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
...K(r, h),
ref: l
})), y.children);
-}), HI = /*#__PURE__*/ (0, P.createContext)({}), UI = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, HI);
+}), JI = /*#__PURE__*/ (0, P.createContext)({}), YI = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, JI);
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 } = WT({
+ let { hoverProps: l, isHovered: u } = ZT({
onHoverStart: a,
onHoverChange: o,
onHoverEnd: s,
isDisabled: n
- }), { isFocused: d, isFocusVisible: f, focusProps: p } = BT({ within: !0 }), m = gI({
+ }), { isFocused: d, isFocusVisible: f, focusProps: p } = qT({ within: !0 }), m = SI({
...e,
values: {
isHovered: u,
@@ -36617,7 +36660,7 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
},
defaultClassName: "react-aria-Group"
});
- return /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(OI.div, {
...K(c, p, l),
...m,
ref: t,
@@ -36630,18 +36673,18 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
"data-invalid": r || void 0,
"data-readonly": i || void 0
}, m.children);
-}), WI = /*#__PURE__*/ (0, P.createContext)({}), $ue = (e) => {
+}), XI = /*#__PURE__*/ (0, P.createContext)({}), lde = (e) => {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, ...i } = e;
return i;
-}, ede = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, WI);
- let { hoverProps: n, isHovered: r } = WT({
+}, ude = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, XI);
+ let { hoverProps: n, isHovered: r } = ZT({
...e,
isDisabled: e.disabled
- }), { isFocused: i, isFocusVisible: a, focusProps: o } = BT({
+ }), { isFocused: i, isFocusVisible: a, focusProps: o } = qT({
isTextInput: !0,
autoFocus: e.autoFocus
- }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = gI({
+ }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = SI({
...e,
values: {
isHovered: r,
@@ -36652,8 +36695,8 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
},
defaultClassName: "react-aria-Input"
});
- return /*#__PURE__*/ P.createElement(SI.input, {
- ...K($ue(e), o, n),
+ return /*#__PURE__*/ P.createElement(OI.input, {
+ ...K(lde(e), o, n),
...c,
ref: t,
"data-focused": i || void 0,
@@ -36662,24 +36705,24 @@ var Zue = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
"data-focus-visible": a || void 0,
"data-invalid": s || void 0
});
-}), tde = 0, nde = 100, rde = 1;
-function ide(e) {
- let { isDisabled: t = !1, minValue: n = tde, maxValue: r = nde, numberFormatter: i, step: a = rde, orientation: o = "horizontal" } = e, s = (0, P.useMemo)(() => {
+}), dde = 0, fde = 100, pde = 1;
+function mde(e) {
+ let { isDisabled: t = !1, minValue: n = dde, maxValue: r = fde, numberFormatter: i, step: a = pde, orientation: o = "horizontal" } = e, s = (0, P.useMemo)(() => {
let e = (r - n) / 10;
- return e = gw(e, 0, e + a, a), Math.max(e, a);
+ return e = Cw(e, 0, e + a, a), Math.max(e, a);
}, [
a,
r,
n
- ]), c = (0, P.useCallback)((e) => e?.map((t, i) => gw(t, i === 0 ? n : e[i - 1], i === e.length - 1 ? r : e[i + 1], a)), [
+ ]), c = (0, P.useCallback)((e) => e?.map((t, i) => Cw(t, i === 0 ? n : e[i - 1], i === e.length - 1 ? r : e[i + 1], a)), [
n,
r,
a
- ]), l = (0, P.useMemo)(() => c(KI(e.value)), [e.value, c]), u = (0, P.useMemo)(() => c(KI(e.defaultValue) ?? [n]), [
+ ]), l = (0, P.useMemo)(() => c(QI(e.value)), [e.value, c]), u = (0, P.useMemo)(() => c(QI(e.defaultValue) ?? [n]), [
e.defaultValue,
n,
c
- ]), d = qI(e.value, e.defaultValue, e.onChange), f = qI(e.value, e.defaultValue, e.onChangeEnd), [p, m] = fw(l, u, d), [h] = (0, P.useState)(p), [g, _] = (0, P.useState)(Array(p.length).fill(!1)), v = (0, P.useRef)(Array(p.length).fill(!0)), [y, b] = (0, P.useState)(void 0), x = (0, P.useRef)(p), S = (0, P.useRef)(g), C = (e) => {
+ ]), d = $I(e.value, e.defaultValue, e.onChange), f = $I(e.value, e.defaultValue, e.onChangeEnd), [p, m] = yw(l, u, d), [h] = (0, P.useState)(p), [g, _] = (0, P.useState)(Array(p.length).fill(!1)), v = (0, P.useRef)(Array(p.length).fill(!0)), [y, b] = (0, P.useState)(void 0), x = (0, P.useRef)(p), S = (0, P.useRef)(g), C = (e) => {
x.current = e, m(e);
}, w = (e) => {
S.current = e, _(e);
@@ -36702,15 +36745,15 @@ function ide(e) {
function A(e, n) {
if (t || !O(e)) return;
let r = E(e), i = D(e);
- n = gw(n, r, i, a);
- let o = GI(x.current, e, n);
+ n = Cw(n, r, i, a);
+ let o = ZI(x.current, e, n);
C(o);
}
function j(e, n) {
if (t || !O(e)) return;
n && (x.current = p);
let r = S.current[e];
- S.current = GI(S.current, e, n), w(S.current), f && r && !S.current.some(Boolean) && f(x.current);
+ S.current = ZI(S.current, e, n), w(S.current), f && r && !S.current.some(Boolean) && f(x.current);
}
let M = (0, P.useRef)(null);
function ee(e = p) {
@@ -36731,15 +36774,15 @@ function ide(e) {
return Math.round((e - n) / a) * a + n;
}
function N(e) {
- return mw(ne(e * (r - n) + n), n, r);
+ return xw(ne(e * (r - n) + n), n, r);
}
function re(e, t = 1) {
let i = Math.max(t, a);
- A(e, gw(p[e] + i, n, r, a));
+ A(e, Cw(p[e] + i, n, r, a));
}
function ie(e, t = 1) {
let i = Math.max(t, a);
- A(e, gw(p[e] - i, n, r, a));
+ A(e, Cw(p[e] - i, n, r, a));
}
return {
values: p,
@@ -36768,31 +36811,31 @@ function ide(e) {
isDisabled: t
};
}
-function GI(e, t, n) {
+function ZI(e, t, n) {
return e[t] === n ? e : [
...e.slice(0, t),
n,
...e.slice(t + 1)
];
}
-function KI(e) {
+function QI(e) {
if (e != null) return Array.isArray(e) ? e : [e];
}
-function qI(e, t, n) {
+function $I(e, t, n) {
return (r) => {
typeof e == "number" || typeof t == "number" ? n?.(r[0]) : n?.(r);
};
}
// node_modules/react-aria-components/dist/private/Slider.mjs
-var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.createContext)(null), YI = /*#__PURE__*/ (0, P.createContext)(null), ode = /*#__PURE__*/ (0, P.createContext)(null), sde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, ade);
- let n = (0, P.useRef)(null), r = lae(e.formatOptions), i = ide({
+var hde = /*#__PURE__*/ (0, P.createContext)(null), eL = /*#__PURE__*/ (0, P.createContext)(null), tL = /*#__PURE__*/ (0, P.createContext)(null), gde = /*#__PURE__*/ (0, P.createContext)(null), _de = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, hde);
+ let n = (0, P.useRef)(null), r = _ae(e.formatOptions), i = mde({
...e,
numberFormatter: r
- }), [a, o] = yI(!e["aria-label"] && !e["aria-labelledby"]), { groupProps: s, trackProps: c, labelProps: l, outputProps: u } = uae({
+ }), [a, o] = TI(!e["aria-label"] && !e["aria-labelledby"]), { groupProps: s, trackProps: c, labelProps: l, outputProps: u } = vae({
...e,
label: o
- }, i, n), d = gI({
+ }, i, n), d = SI({
...e,
values: {
orientation: i.orientation,
@@ -36800,32 +36843,32 @@ var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.cre
state: i
},
defaultClassName: "react-aria-Slider"
- }), f = WS(e, { global: !0 });
- return delete f.id, /*#__PURE__*/ P.createElement(hI, { values: [
- [JI, i],
- [YI, {
+ }), f = ZS(e, { global: !0 });
+ return delete f.id, /*#__PURE__*/ P.createElement(xI, { values: [
+ [eL, i],
+ [tL, {
...c,
ref: n
}],
- [ode, u],
- [AI, {
+ [gde, u],
+ [II, {
...l,
ref: a
}]
- ] }, /*#__PURE__*/ P.createElement(SI.div, {
+ ] }, /*#__PURE__*/ P.createElement(OI.div, {
...K(f, d, s),
ref: t,
slot: e.slot || void 0,
"data-orientation": i.orientation,
"data-disabled": i.isDisabled || void 0
}));
-}), cde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, YI);
- let n = (0, P.useContext)(JI), { onHoverStart: r, onHoverEnd: i, onHoverChange: a, ...o } = e, { hoverProps: s, isHovered: c } = WT({
+}), vde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, tL);
+ let n = (0, P.useContext)(eL), { onHoverStart: r, onHoverEnd: i, onHoverChange: a, ...o } = e, { hoverProps: s, isHovered: c } = ZT({
onHoverStart: r,
onHoverEnd: i,
onHoverChange: a
- }), l = gI({
+ }), l = SI({
...e,
defaultClassName: "react-aria-SliderTrack",
values: {
@@ -36835,7 +36878,7 @@ var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.cre
state: n
}
});
- return /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(OI.div, {
...K(o, s),
...l,
ref: t,
@@ -36843,14 +36886,14 @@ var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.cre
"data-orientation": n.orientation || void 0,
"data-disabled": n.isDisabled || void 0
});
-}), lde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { inputRef: n = null } = e, r = (0, P.useContext)(JI), { ref: i } = _I(YI), { index: a = 0 } = e, o = (0, P.useRef)(null), s = n || o, [c, l] = yI(!e["aria-label"] && !e["aria-labelledby"]), { thumbProps: u, inputProps: d, labelProps: f, isDragging: p, isFocused: m, isDisabled: h } = dae({
+}), yde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { inputRef: n = null } = e, r = (0, P.useContext)(eL), { ref: i } = CI(tL), { index: a = 0 } = e, o = (0, P.useRef)(null), s = n || o, [c, l] = TI(!e["aria-label"] && !e["aria-labelledby"]), { thumbProps: u, inputProps: d, labelProps: f, isDragging: p, isFocused: m, isDisabled: h } = yae({
...e,
index: a,
trackRef: i,
inputRef: s,
label: l
- }, r), { focusProps: g, isFocusVisible: _ } = BT(), { hoverProps: v, isHovered: y } = WT(e), b = gI({
+ }, r), { focusProps: g, isFocusVisible: _ } = qT(), { hoverProps: v, isHovered: y } = ZT(e), b = SI({
...e,
defaultClassName: "react-aria-SliderThumb",
values: {
@@ -36861,8 +36904,8 @@ var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.cre
isFocusVisible: _,
isDisabled: h
}
- }), x = WS(e, { global: !0 });
- return delete x.id, /*#__PURE__*/ P.createElement(SI.div, {
+ }), x = ZS(e, { global: !0 });
+ return delete x.id, /*#__PURE__*/ P.createElement(OI.div, {
...K(x, u, v),
...b,
ref: t,
@@ -36875,330 +36918,330 @@ var ade = /*#__PURE__*/ (0, P.createContext)(null), JI = /*#__PURE__*/ (0, P.cre
"data-focused": m || void 0,
"data-focus-visible": _ || void 0,
"data-disabled": h || void 0
- }, /*#__PURE__*/ P.createElement(Sw, null, /*#__PURE__*/ P.createElement("input", {
+ }, /*#__PURE__*/ P.createElement(kw, null, /*#__PURE__*/ P.createElement("input", {
ref: s,
...K(d, g)
- })), /*#__PURE__*/ P.createElement(hI, { values: [[AI, {
+ })), /*#__PURE__*/ P.createElement(xI, { values: [[II, {
...f,
ref: c
}]] }, b.children));
-}), XI = {};
-XI = {
+}), nL = {};
+nL = {
colorSwatchPicker: "تغييرات الألوان",
dropzoneLabel: "DropZone",
selectPlaceholder: "حدد عنصرًا",
tableResizer: "أداة تغيير الحجم"
};
// node_modules/react-aria-components/dist/private/intl/bg-BG.mjs
-var ZI = {};
-ZI = {
+var rL = {};
+rL = {
colorSwatchPicker: "Цветови мостри",
dropzoneLabel: "DropZone",
selectPlaceholder: "Изберете предмет",
tableResizer: "Преоразмерител"
};
// node_modules/react-aria-components/dist/private/intl/cs-CZ.mjs
-var QI = {};
-QI = {
+var iL = {};
+iL = {
colorSwatchPicker: "Vzorky barev",
dropzoneLabel: "Místo pro přetažení",
selectPlaceholder: "Vyberte položku",
tableResizer: "Změna velikosti"
};
// node_modules/react-aria-components/dist/private/intl/da-DK.mjs
-var $I = {};
-$I = {
+var aL = {};
+aL = {
colorSwatchPicker: "Farveprøver",
dropzoneLabel: "DropZone",
selectPlaceholder: "Vælg et element",
tableResizer: "Størrelsesændring"
};
// node_modules/react-aria-components/dist/private/intl/de-DE.mjs
-var eL = {};
-eL = {
+var oL = {};
+oL = {
colorSwatchPicker: "Farbfelder",
dropzoneLabel: "Ablegebereich",
selectPlaceholder: "Element wählen",
tableResizer: "Größenanpassung"
};
// node_modules/react-aria-components/dist/private/intl/el-GR.mjs
-var tL = {};
-tL = {
+var sL = {};
+sL = {
colorSwatchPicker: "Χρωματικά δείγματα",
dropzoneLabel: "DropZone",
selectPlaceholder: "Επιλέξτε ένα αντικείμενο",
tableResizer: "Αλλαγή μεγέθους"
};
// node_modules/react-aria-components/dist/private/intl/en-US.mjs
-var nL = {};
-nL = {
+var cL = {};
+cL = {
selectPlaceholder: "Select an item",
tableResizer: "Resizer",
dropzoneLabel: "DropZone",
colorSwatchPicker: "Color swatches"
};
// node_modules/react-aria-components/dist/private/intl/es-ES.mjs
-var rL = {};
-rL = {
+var lL = {};
+lL = {
colorSwatchPicker: "Muestras de colores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Seleccionar un artículo",
tableResizer: "Cambiador de tamaño"
};
// node_modules/react-aria-components/dist/private/intl/et-EE.mjs
-var iL = {};
-iL = {
+var uL = {};
+uL = {
colorSwatchPicker: "Värvinäidised",
dropzoneLabel: "DropZone",
selectPlaceholder: "Valige üksus",
tableResizer: "Suuruse muutja"
};
// node_modules/react-aria-components/dist/private/intl/fi-FI.mjs
-var aL = {};
-aL = {
+var dL = {};
+dL = {
colorSwatchPicker: "Värimallit",
dropzoneLabel: "DropZone",
selectPlaceholder: "Valitse kohde",
tableResizer: "Koon muuttaja"
};
// node_modules/react-aria-components/dist/private/intl/fr-FR.mjs
-var oL = {};
-oL = {
+var fL = {};
+fL = {
colorSwatchPicker: "Échantillons de couleurs",
dropzoneLabel: "DropZone",
selectPlaceholder: "Sélectionner un élément",
tableResizer: "Redimensionneur"
};
// node_modules/react-aria-components/dist/private/intl/he-IL.mjs
-var sL = {};
-sL = {
+var pL = {};
+pL = {
colorSwatchPicker: "דוגמיות צבע",
dropzoneLabel: "DropZone",
selectPlaceholder: "בחר פריט",
tableResizer: "שינוי גודל"
};
// node_modules/react-aria-components/dist/private/intl/hr-HR.mjs
-var cL = {};
-cL = {
+var mL = {};
+mL = {
colorSwatchPicker: "Uzorci boja",
dropzoneLabel: "Zona spuštanja",
selectPlaceholder: "Odaberite stavku",
tableResizer: "Promjena veličine"
};
// node_modules/react-aria-components/dist/private/intl/hu-HU.mjs
-var lL = {};
-lL = {
+var hL = {};
+hL = {
colorSwatchPicker: "Színtárak",
dropzoneLabel: "DropZone",
selectPlaceholder: "Válasszon ki egy elemet",
tableResizer: "Átméretező"
};
// node_modules/react-aria-components/dist/private/intl/it-IT.mjs
-var uL = {};
-uL = {
+var gL = {};
+gL = {
colorSwatchPicker: "Campioni di colore",
dropzoneLabel: "Zona di rilascio",
selectPlaceholder: "Seleziona un elemento",
tableResizer: "Ridimensionamento"
};
// node_modules/react-aria-components/dist/private/intl/ja-JP.mjs
-var dL = {};
-dL = {
+var _L = {};
+_L = {
colorSwatchPicker: "カラースウォッチ",
dropzoneLabel: "ドロップゾーン",
selectPlaceholder: "項目を選択",
tableResizer: "サイズ変更ツール"
};
// node_modules/react-aria-components/dist/private/intl/ko-KR.mjs
-var fL = {};
-fL = {
+var vL = {};
+vL = {
colorSwatchPicker: "색상 견본",
dropzoneLabel: "드롭 영역",
selectPlaceholder: "항목 선택",
tableResizer: "크기 조정기"
};
// node_modules/react-aria-components/dist/private/intl/lt-LT.mjs
-var pL = {};
-pL = {
+var yL = {};
+yL = {
colorSwatchPicker: "Spalvų pavyzdžiai",
dropzoneLabel: "„DropZone“",
selectPlaceholder: "Pasirinkite elementą",
tableResizer: "Dydžio keitiklis"
};
// node_modules/react-aria-components/dist/private/intl/lv-LV.mjs
-var mL = {};
-mL = {
+var bL = {};
+bL = {
colorSwatchPicker: "Krāsu paraugi",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izvēlēties vienumu",
tableResizer: "Izmēra mainītājs"
};
// node_modules/react-aria-components/dist/private/intl/nb-NO.mjs
-var hL = {};
-hL = {
+var xL = {};
+xL = {
colorSwatchPicker: "Fargekart",
dropzoneLabel: "Droppsone",
selectPlaceholder: "Velg et element",
tableResizer: "Størrelsesendrer"
};
// node_modules/react-aria-components/dist/private/intl/nl-NL.mjs
-var gL = {};
-gL = {
+var SL = {};
+SL = {
colorSwatchPicker: "kleurstalen",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecteer een item",
tableResizer: "Resizer"
};
// node_modules/react-aria-components/dist/private/intl/pl-PL.mjs
-var _L = {};
-_L = {
+var CL = {};
+CL = {
colorSwatchPicker: "Próbki kolorów",
dropzoneLabel: "Strefa upuszczania",
selectPlaceholder: "Wybierz element",
tableResizer: "Zmiana rozmiaru"
};
// node_modules/react-aria-components/dist/private/intl/pt-BR.mjs
-var vL = {};
-vL = {
+var wL = {};
+wL = {
colorSwatchPicker: "Amostras de cores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecione um item",
tableResizer: "Redimensionador"
};
// node_modules/react-aria-components/dist/private/intl/pt-PT.mjs
-var yL = {};
-yL = {
+var TL = {};
+TL = {
colorSwatchPicker: "Amostras de cores",
dropzoneLabel: "DropZone",
selectPlaceholder: "Selecione um item",
tableResizer: "Redimensionador"
};
// node_modules/react-aria-components/dist/private/intl/ro-RO.mjs
-var bL = {};
-bL = {
+var EL = {};
+EL = {
colorSwatchPicker: "Specimene de culoare",
dropzoneLabel: "Zonă de plasare",
selectPlaceholder: "Selectați un element",
tableResizer: "Instrument de redimensionare"
};
// node_modules/react-aria-components/dist/private/intl/ru-RU.mjs
-var xL = {};
-xL = {
+var DL = {};
+DL = {
colorSwatchPicker: "Цветовые образцы",
dropzoneLabel: "DropZone",
selectPlaceholder: "Выберите элемент",
tableResizer: "Средство изменения размера"
};
// node_modules/react-aria-components/dist/private/intl/sk-SK.mjs
-var SL = {};
-SL = {
+var OL = {};
+OL = {
colorSwatchPicker: "Vzorkovníky farieb",
dropzoneLabel: "DropZone",
selectPlaceholder: "Vyberte položku",
tableResizer: "Nástroj na zmenu veľkosti"
};
// node_modules/react-aria-components/dist/private/intl/sl-SI.mjs
-var CL = {};
-CL = {
+var kL = {};
+kL = {
colorSwatchPicker: "Barvne palete",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izberite element",
tableResizer: "Spreminjanje velikosti"
};
// node_modules/react-aria-components/dist/private/intl/sr-SP.mjs
-var wL = {};
-wL = {
+var AL = {};
+AL = {
colorSwatchPicker: "Uzorci boje",
dropzoneLabel: "DropZone",
selectPlaceholder: "Izaberite stavku",
tableResizer: "Promena veličine"
};
// node_modules/react-aria-components/dist/private/intl/sv-SE.mjs
-var TL = {};
-TL = {
+var jL = {};
+jL = {
colorSwatchPicker: "Färgrutor",
dropzoneLabel: "DropZone",
selectPlaceholder: "Välj en artikel",
tableResizer: "Storleksändrare"
};
// node_modules/react-aria-components/dist/private/intl/tr-TR.mjs
-var EL = {};
-EL = {
+var ML = {};
+ML = {
colorSwatchPicker: "Renk örnekleri",
dropzoneLabel: "Bırakma Bölgesi",
selectPlaceholder: "Bir öğe seçin",
tableResizer: "Yeniden boyutlandırıcı"
};
// node_modules/react-aria-components/dist/private/intl/uk-UA.mjs
-var DL = {};
-DL = {
+var NL = {};
+NL = {
colorSwatchPicker: "Зразки кольорів",
dropzoneLabel: "DropZone",
selectPlaceholder: "Виберіть елемент",
tableResizer: "Засіб змінення розміру"
};
// node_modules/react-aria-components/dist/private/intl/zh-CN.mjs
-var OL = {};
-OL = {
+var PL = {};
+PL = {
colorSwatchPicker: "颜色色板",
dropzoneLabel: "放置区域",
selectPlaceholder: "选择一个项目",
tableResizer: "尺寸调整器"
};
// node_modules/react-aria-components/dist/private/intl/zh-TW.mjs
-var kL = {};
-kL = {
+var FL = {};
+FL = {
colorSwatchPicker: "色票",
dropzoneLabel: "放置區",
selectPlaceholder: "選取項目",
tableResizer: "大小調整器"
};
// node_modules/react-aria-components/dist/private/intlStrings.mjs
-var AL = {};
-AL = {
- "ar-AE": XI,
- "bg-BG": ZI,
- "cs-CZ": QI,
- "da-DK": $I,
- "de-DE": eL,
- "el-GR": tL,
- "en-US": nL,
- "es-ES": rL,
- "et-EE": iL,
- "fi-FI": aL,
- "fr-FR": oL,
- "he-IL": sL,
- "hr-HR": cL,
- "hu-HU": lL,
- "it-IT": uL,
- "ja-JP": dL,
- "ko-KR": fL,
- "lt-LT": pL,
- "lv-LV": mL,
- "nb-NO": hL,
- "nl-NL": gL,
- "pl-PL": _L,
- "pt-BR": vL,
- "pt-PT": yL,
- "ro-RO": bL,
- "ru-RU": xL,
- "sk-SK": SL,
- "sl-SI": CL,
- "sr-SP": wL,
- "sv-SE": TL,
- "tr-TR": EL,
- "uk-UA": DL,
- "zh-CN": OL,
- "zh-TW": kL
+var IL = {};
+IL = {
+ "ar-AE": nL,
+ "bg-BG": rL,
+ "cs-CZ": iL,
+ "da-DK": aL,
+ "de-DE": oL,
+ "el-GR": sL,
+ "en-US": cL,
+ "es-ES": lL,
+ "et-EE": uL,
+ "fi-FI": dL,
+ "fr-FR": fL,
+ "he-IL": pL,
+ "hr-HR": mL,
+ "hu-HU": hL,
+ "it-IT": gL,
+ "ja-JP": _L,
+ "ko-KR": vL,
+ "lt-LT": yL,
+ "lv-LV": bL,
+ "nb-NO": xL,
+ "nl-NL": SL,
+ "pl-PL": CL,
+ "pt-BR": wL,
+ "pt-PT": TL,
+ "ro-RO": EL,
+ "ru-RU": DL,
+ "sk-SK": OL,
+ "sl-SI": kL,
+ "sr-SP": AL,
+ "sv-SE": jL,
+ "tr-TR": ML,
+ "uk-UA": NL,
+ "zh-CN": PL,
+ "zh-TW": FL
};
// node_modules/react-aria-components/dist/private/DragAndDrop.mjs
-var jL = /*#__PURE__*/ (0, P.createContext)({}), ML = /*#__PURE__*/ (0, P.createContext)(null), ude = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { render: n } = (0, P.useContext)(ML);
+var LL = /*#__PURE__*/ (0, P.createContext)({}), RL = /*#__PURE__*/ (0, P.createContext)(null), bde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { render: n } = (0, P.useContext)(RL);
return /*#__PURE__*/ P.createElement(P.Fragment, null, n(e, t));
});
-function NL(e, t) {
+function zL(e, t) {
let n = e?.renderDropIndicator, r = e?.isVirtualDragging?.(), i = (0, P.useCallback)((e) => {
- if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ P.createElement(ude, { target: e });
+ if (r || t?.isDropTarget(e)) return n ? n(e) : /*#__PURE__*/ P.createElement(bde, { target: e });
}, [
t?.target,
r,
@@ -37206,7 +37249,7 @@ function NL(e, t) {
]);
return e?.useDropIndicator ? i : void 0;
}
-function PL(e, t, n) {
+function BL(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;
@@ -37227,13 +37270,13 @@ function PL(e, t, n) {
return (0, P.useMemo)(() => new Set([r, i].filter((e) => e != null)), [r, i]);
}
// node_modules/react-aria-components/dist/private/Header.mjs
-var FL = /*#__PURE__*/ (0, P.createContext)({}), dde = /*#__PURE__*/ (0, P.createContext)(null);
-function IL(e) {
+var VL = /*#__PURE__*/ (0, P.createContext)({}), xde = /*#__PURE__*/ (0, P.createContext)(null);
+function HL(e) {
let t = (0, P.useRef)({});
- return /*#__PURE__*/ P.createElement(dde.Provider, { value: t }, e.children);
+ return /*#__PURE__*/ P.createElement(xde.Provider, { value: t }, e.children);
}
// node_modules/react-aria-components/dist/private/SelectionIndicator.mjs
-var LL = /*#__PURE__*/ (0, P.createContext)({ isSelected: !1 }), RL = /*#__PURE__*/ (0, P.createContext)({}), fde = /*#__PURE__*/ uS(class extends pb {
+var UL = /*#__PURE__*/ (0, P.createContext)({ isSelected: !1 }), WL = /*#__PURE__*/ (0, P.createContext)({}), Sde = /*#__PURE__*/ _S(class extends yb {
static {
this.type = "separator";
}
@@ -37246,14 +37289,14 @@ var LL = /*#__PURE__*/ (0, P.createContext)({ isSelected: !1 }), RL = /*#__PURE_
return null;
}
}, function(e, t) {
- [e, t] = vI(e, t, RL);
+ [e, t] = wI(e, t, WL);
let { elementType: n, orientation: r, style: i, className: a, slot: o, ...s } = e, c = n || "hr";
c === "hr" && r === "vertical" && (c = "div");
- let l = SI[c], { separatorProps: u } = voe({
+ let l = OI[c], { separatorProps: u } = Eoe({
...s,
elementType: n,
orientation: r
- }), d = WS(e, { global: !0 });
+ }), d = ZS(e, { global: !0 });
return /*#__PURE__*/ P.createElement(l, {
render: e.render,
...K(d, u),
@@ -37264,12 +37307,12 @@ var LL = /*#__PURE__*/ (0, P.createContext)({ isSelected: !1 }), RL = /*#__PURE_
});
});
// node_modules/react-aria/dist/private/utils/inertValue.mjs
-function zL(e) {
+function GL(e) {
let t = P.version.split(".");
return parseInt(t[0], 10) >= 19 ? e : e ? "true" : void 0;
}
// node_modules/react-stately/dist/private/list/ListCollection.mjs
-var BL = class {
+var KL = class {
constructor(e) {
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.iterable = e;
let t = (e) => {
@@ -37313,19 +37356,19 @@ var BL = class {
getChildren(e) {
return this.keyMap.get(e)?.childNodes || [];
}
-}, VL = class e extends Set {
+}, qL = 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);
}
};
// node_modules/react-stately/dist/private/selection/useMultipleSelectionState.mjs
-function pde(e, t) {
+function Cde(e, t) {
if (e.size !== t.size) return !1;
for (let n of e) if (!t.has(n)) return !1;
return !0;
}
-function HL(e) {
- let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, P.useRef)(!1), [, s] = (0, P.useState)(!1), c = (0, P.useRef)(null), l = (0, P.useRef)(null), [, u] = (0, P.useState)(null), [d, f] = fw((0, P.useMemo)(() => UL(e.selectedKeys), [e.selectedKeys]), (0, P.useMemo)(() => UL(e.defaultSelectedKeys, new VL()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, P.useState)(i);
+function JL(e) {
+ let { selectionMode: t = "none", disallowEmptySelection: n = !1, allowDuplicateSelectionEvents: r, selectionBehavior: i = "toggle", disabledBehavior: a = "all" } = e, o = (0, P.useRef)(!1), [, s] = (0, P.useState)(!1), c = (0, P.useRef)(null), l = (0, P.useRef)(null), [, u] = (0, P.useState)(null), [d, f] = yw((0, P.useMemo)(() => YL(e.selectedKeys), [e.selectedKeys]), (0, P.useMemo)(() => YL(e.defaultSelectedKeys, new qL()), [e.defaultSelectedKeys]), e.onSelectionChange), p = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), [m, h] = (0, P.useState)(i);
i === "replace" && m === "toggle" && typeof d == "object" && d.size === 0 && h("replace");
let g = (0, P.useRef)(i);
return (0, P.useEffect)(() => {
@@ -37352,17 +37395,17 @@ function HL(e) {
},
selectedKeys: d,
setSelectedKeys(e) {
- (r || !pde(e, d)) && f(e);
+ (r || !Cde(e, d)) && f(e);
},
disabledKeys: p,
disabledBehavior: a
};
}
-function UL(e, t) {
- return e ? e === "all" ? "all" : new VL(e) : t;
+function YL(e, t) {
+ return e ? e === "all" ? "all" : new qL(e) : t;
}
// node_modules/react-stately/dist/private/selection/SelectionManager.mjs
-var WL = class e {
+var XL = 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;
}
@@ -37418,7 +37461,7 @@ var WL = class e {
let e = null;
for (let t of this.state.selectedKeys) {
let n = this.collection.getItem(t);
- (!e || n && OT(this.collection, n, e) < 0) && (e = n);
+ (!e || n && FT(this.collection, n, e) < 0) && (e = n);
}
return e?.key ?? null;
}
@@ -37426,7 +37469,7 @@ var WL = class e {
let e = null;
for (let t of this.state.selectedKeys) {
let n = this.collection.getItem(t);
- (!e || n && OT(this.collection, n, e) > 0) && (e = n);
+ (!e || n && FT(this.collection, n, e) > 0) && (e = n);
}
return e?.key ?? null;
}
@@ -37445,10 +37488,10 @@ var WL = class e {
let t = this.getKey(e);
if (t == null) return;
let n;
- if (this.state.selectedKeys === "all") n = new VL([t], t, t);
+ if (this.state.selectedKeys === "all") n = new qL([t], t, t);
else {
let e = this.state.selectedKeys, r = e.anchorKey ?? t;
- n = new VL(e, r, t);
+ n = new qL(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);
}
@@ -37456,7 +37499,7 @@ var WL = class e {
}
getKeyRange(e, t) {
let n = this.collection.getItem(e), r = this.collection.getItem(t);
- return n && r ? OT(this.collection, n, r) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
+ return n && r ? FT(this.collection, n, r) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
}
getKeyRangeInternal(e, t) {
if (this.layoutDelegate?.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
@@ -37482,19 +37525,19 @@ var WL = class e {
}
let t = this.getKey(e);
if (t == null) return;
- let n = new VL(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
+ let n = new qL(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 VL([t], t, t) : new VL();
+ let n = this.canSelectItem(t) ? new qL([t], t, t) : new qL();
this.state.setSelectedKeys(n);
}
setSelectedKeys(e) {
if (this.selectionMode === "none") return;
- let t = new VL();
+ let t = new qL();
for (let n of e) {
let e = this.getKey(n);
if (e != null && (t.add(e), this.selectionMode === "single")) break;
@@ -37506,7 +37549,7 @@ var WL = class e {
for (; r != null;) {
if (this.canSelectItemIn(r, e)) {
let i = e.getItem(r);
- i?.type === "item" && t.push(r), i?.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && n(TT(wT(i, e))?.key ?? null);
+ i?.type === "item" && t.push(r), i?.hasChildNodes && (this.allowsCellSelection || i.type !== "item") && n(MT(jT(i, e))?.key ?? null);
}
r = e.getKeyAfter(r);
}
@@ -37517,7 +37560,7 @@ var WL = 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 VL());
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new qL());
}
toggleSelectAll() {
this.isSelectAll ? this.clearSelection() : this.selectAll();
@@ -37558,9 +37601,9 @@ var WL = class e {
fullCollection: this.fullCollection ?? this.collection
});
}
-}, mde = class {
+}, wde = class {
build(e, t) {
- return this.context = t, GL(() => this.iterateCollection(e));
+ return this.context = t, ZL(() => this.iterateCollection(e));
}
*iterateCollection(e) {
let { children: t, items: n } = e;
@@ -37642,10 +37685,10 @@ var WL = class e {
...a,
key: l,
index: s,
- wrapper: hde(e.wrapper, a.wrapper)
+ wrapper: Tde(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 <${KL(t.type)}> in <${KL(r?.type ?? "unknown parent type")}>. Only <${KL(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 <${QL(t.type)}> in <${QL(r?.type ?? "unknown parent type")}>. Only <${QL(e.type)}> is supported.`);
s++, yield t;
}
c = o.next(u);
@@ -37667,7 +37710,7 @@ var WL = class e {
wrapper: e.wrapper,
shouldInvalidate: e.shouldInvalidate,
hasChildNodes: e.hasChildNodes || !1,
- childNodes: GL(function* () {
+ childNodes: ZL(function* () {
if (!e.hasChildNodes || !e.childNodes) return;
let n = 0;
for (let r of e.childNodes()) {
@@ -37686,7 +37729,7 @@ var WL = class e {
this.cache = /* @__PURE__ */ new WeakMap();
}
};
-function GL(e) {
+function ZL(e) {
let t = [], n = null;
return { *[Symbol.iterator]() {
for (let e of t) yield e;
@@ -37694,17 +37737,17 @@ function GL(e) {
for (let e of n) t.push(e), yield e;
} };
}
-function hde(e, t) {
+function Tde(e, t) {
if (e && t) return (n) => e(t(n));
if (e) return e;
if (t) return t;
}
-function KL(e) {
+function QL(e) {
return e[0].toUpperCase() + e.slice(1);
}
// node_modules/react-stately/dist/private/collections/useCollection.mjs
-function qL(e, t, n) {
- let r = (0, P.useMemo)(() => new mde(), []), { children: i, items: a, collection: o } = e;
+function $L(e, t, n) {
+ let r = (0, P.useMemo)(() => new wde(), []), { children: i, items: a, collection: o } = e;
return (0, P.useMemo)(() => o || t(r.build({
children: i,
items: a
@@ -37718,27 +37761,27 @@ function qL(e, t, n) {
]);
}
// node_modules/react-stately/dist/private/list/useListState.mjs
-function JL(e) {
- let { filter: t, layoutDelegate: n } = e, r = HL(e), i = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = qL(e, (0, P.useCallback)((e) => t ? new BL(t(e)) : new BL(e), [t]), (0, P.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, P.useMemo)(() => new WL(a, r, { layoutDelegate: n }), [
+function eR(e) {
+ let { filter: t, layoutDelegate: n } = e, r = JL(e), i = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = $L(e, (0, P.useCallback)((e) => t ? new KL(t(e)) : new KL(e), [t]), (0, P.useMemo)(() => ({ suppressTextValueWarning: e.suppressTextValueWarning }), [e.suppressTextValueWarning])), o = (0, P.useMemo)(() => new XL(a, r, { layoutDelegate: n }), [
a,
r,
n
]);
- return YL(a, o), {
+ return tR(a, o), {
collection: a,
disabledKeys: i,
selectionManager: o
};
}
-function gde(e, t) {
+function Ede(e, t) {
let n = (0, P.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
- return YL(n, r), {
+ return tR(n, r), {
collection: n,
selectionManager: r,
disabledKeys: e.disabledKeys
};
}
-function YL(e, t) {
+function tR(e, t) {
let n = (0, P.useRef)(null);
(0, P.useEffect)(() => {
if (t.focusedKey != null && !e.getItem(t.focusedKey) && n.current) {
@@ -37765,15 +37808,15 @@ function YL(e, t) {
}, [e, t]);
}
// node_modules/react-aria/dist/private/utils/useLoadMoreSentinel.mjs
-function XL(e, t) {
- let { collection: n, onLoadMore: r, scrollOffset: i = 1, direction: a = "end" } = e, o = (0, P.useRef)(null), s = OS((e) => {
+function nR(e, t) {
+ let { collection: n, onLoadMore: r, scrollOffset: i = 1, direction: a = "end" } = e, o = (0, P.useRef)(null), s = FS((e) => {
for (let t of e) t.isIntersecting && r && r();
});
- Bb(() => {
+ qb(() => {
if (t.current) {
let e = 100 * i, n = a === "start" ? `${e}% 0px 0px 0px` : `0px ${e}% ${e}% ${e}%`;
o.current = new IntersectionObserver(s, {
- root: WC(t?.current),
+ root: ZC(t?.current),
rootMargin: n
}), o.current.observe(t.current);
}
@@ -37788,42 +37831,42 @@ function XL(e, t) {
]);
}
// node_modules/react-aria-components/dist/private/ListBox.mjs
-var ZL = /*#__PURE__*/ (0, P.createContext)(null), QL = /*#__PURE__*/ (0, P.createContext)(null), _de = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, ZL);
- let n = (0, P.useContext)(QL);
- return n ? /*#__PURE__*/ P.createElement($L, {
+var rR = /*#__PURE__*/ (0, P.createContext)(null), iR = /*#__PURE__*/ (0, P.createContext)(null), Dde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, rR);
+ let n = (0, P.useContext)(iR);
+ return n ? /*#__PURE__*/ P.createElement(aR, {
state: n,
props: e,
listBoxRef: t
- }) : /*#__PURE__*/ P.createElement(sS, { content: /*#__PURE__*/ P.createElement(mS, e) }, (n) => /*#__PURE__*/ P.createElement(vde, {
+ }) : /*#__PURE__*/ P.createElement(mS, { content: /*#__PURE__*/ P.createElement(xS, e) }, (n) => /*#__PURE__*/ P.createElement(Ode, {
props: e,
listBoxRef: t,
collection: n
}));
});
-function vde({ props: e, listBoxRef: t, collection: n }) {
+function Ode({ props: e, listBoxRef: t, collection: n }) {
e = {
...e,
collection: n,
children: null,
items: null
};
- let { layoutDelegate: r } = (0, P.useContext)(OI), i = JL({
+ let { layoutDelegate: r } = (0, P.useContext)(PI), i = eR({
...e,
layoutDelegate: r
});
- return /*#__PURE__*/ P.createElement($L, {
+ return /*#__PURE__*/ P.createElement(aR, {
state: i,
props: e,
listBoxRef: t
});
}
-function $L({ state: e, props: t, listBoxRef: n }) {
- [t, n] = vI(t, n, CI);
- let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = gde(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = IS(), { disabledBehavior: p, disabledKeys: m } = l, h = NT({
+function aR({ state: e, props: t, listBoxRef: n }) {
+ [t, n] = wI(t, n, kI);
+ let { dragAndDropHooks: r, layout: i = "stack", orientation: a = "vertical", filter: o } = t, s = Ede(e, o), { collection: c, selectionManager: l } = s, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: f } = US(), { disabledBehavior: p, disabledKeys: m } = l, h = BT({
usage: "search",
sensitivity: "base"
- }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, P.useContext)(OI), b = (0, P.useMemo)(() => t.keyboardDelegate || new Fw({
+ }), { isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v, CollectionRoot: y } = (0, P.useContext)(PI), b = (0, P.useMemo)(() => t.keyboardDelegate || new Hw({
collection: c,
collator: h,
ref: n,
@@ -37844,7 +37887,7 @@ function $L({ state: e, props: t, listBoxRef: n }) {
t.keyboardDelegate,
i,
_
- ]), { listBoxProps: x } = Rae({
+ ]), { listBoxProps: x } = Kae({
...t,
shouldSelectOnPressUp: u || t.shouldSelectOnPressUp,
keyboardDelegate: b,
@@ -37876,7 +37919,7 @@ function $L({ state: e, props: t, listBoxRef: n }) {
dropTargetDelegate: e
}, C, n), T = C.isDropTarget({ type: "root" });
}
- let { focusProps: O, isFocused: k, isFocusVisible: A } = BT(), j = s.collection.size === 0, M = {
+ let { focusProps: O, isFocused: k, isFocusVisible: A } = qT(), j = s.collection.size === 0, M = {
isDropTarget: T,
isEmpty: j,
isFocused: k,
@@ -37884,7 +37927,7 @@ function $L({ state: e, props: t, listBoxRef: n }) {
layout: t.layout || "stack",
orientation: a,
state: s
- }, ee = gI({
+ }, ee = SI({
...t,
children: void 0,
defaultClassName: "react-aria-ListBox",
@@ -37894,8 +37937,8 @@ function $L({ state: e, props: t, listBoxRef: n }) {
role: "option",
style: { display: "contents" }
}, t.renderEmptyState(M)));
- let ne = WS(t, { global: !0 });
- return /*#__PURE__*/ P.createElement(yC, null, /*#__PURE__*/ P.createElement(SI.div, {
+ let ne = ZS(t, { global: !0 });
+ return /*#__PURE__*/ P.createElement(EC, null, /*#__PURE__*/ P.createElement(OI.div, {
...K(ne, ee, x, O, w?.collectionProps),
ref: n,
slot: t.slot || void 0,
@@ -37906,60 +37949,60 @@ function $L({ state: e, props: t, listBoxRef: n }) {
"data-focus-visible": A || void 0,
"data-layout": t.layout || "stack",
"data-orientation": a
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [ZL, t],
- [QL, s],
- [jL, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [rR, t],
+ [iR, s],
+ [LL, {
dragAndDropHooks: r,
dragState: S,
dropState: C
}],
- [RL, { elementType: "div" }],
- [ML, { render: xde }],
- [TI, {
+ [WL, { elementType: "div" }],
+ [RL, { render: jde }],
+ [jI, {
name: "ListBoxSection",
- render: yde
+ render: kde
}]
- ] }, /*#__PURE__*/ P.createElement(IL, null, /*#__PURE__*/ P.createElement(y, {
+ ] }, /*#__PURE__*/ P.createElement(HL, null, /*#__PURE__*/ P.createElement(y, {
collection: c,
scrollRef: n,
- persistedKeys: PL(l, r, C),
- renderDropIndicator: NL(r, C)
+ persistedKeys: BL(l, r, C),
+ renderDropIndicator: zL(r, C)
}))), te, E));
}
-function yde(e, t, n, r = "react-aria-ListBoxSection") {
- let i = (0, P.useContext)(QL), { dragAndDropHooks: a, dropState: o } = (0, P.useContext)(jL), { CollectionBranch: s } = (0, P.useContext)(OI), [c, l] = yI(), { headingProps: u, groupProps: d } = zae({
+function kde(e, t, n, r = "react-aria-ListBoxSection") {
+ let i = (0, P.useContext)(iR), { dragAndDropHooks: a, dropState: o } = (0, P.useContext)(LL), { CollectionBranch: s } = (0, P.useContext)(PI), [c, l] = TI(), { headingProps: u, groupProps: d } = qae({
heading: l,
"aria-label": e["aria-label"] ?? void 0
- }), f = gI({
+ }), f = SI({
...e,
id: void 0,
children: void 0,
defaultClassName: r,
values: void 0
- }), p = WS(e, { global: !0 });
- return delete p.id, /*#__PURE__*/ P.createElement(SI.section, {
+ }), p = ZS(e, { global: !0 });
+ return delete p.id, /*#__PURE__*/ P.createElement(OI.section, {
...K(p, f, d),
ref: t
- }, /*#__PURE__*/ P.createElement(FL.Provider, { value: {
+ }, /*#__PURE__*/ P.createElement(VL.Provider, { value: {
...u,
ref: c
} }, /*#__PURE__*/ P.createElement(s, {
collection: i.collection,
parent: n,
- renderDropIndicator: NL(a, o)
+ renderDropIndicator: zL(a, o)
})));
}
-var bde = /*#__PURE__*/ uS(gb, function(e, t, n) {
- let r = Zx(t), i = (0, P.useContext)(QL), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, P.useContext)(jL), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = Bae({
+var Ade = /*#__PURE__*/ _S(Sb, function(e, t, n) {
+ let r = iS(t), i = (0, P.useContext)(iR), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, P.useContext)(LL), c = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { optionProps: l, labelProps: u, descriptionProps: d, ...f } = Jae({
key: n.key,
"aria-label": e?.["aria-label"]
- }, i, r), { hoverProps: p, isHovered: m } = WT({
+ }, i, r), { hoverProps: p, isHovered: m } = ZT({
isDisabled: !f.allowsSelection && !f.hasAction && !c,
onHoverStart: n.props.onHoverStart,
onHoverChange: n.props.onHoverChange,
onHoverEnd: n.props.onHoverEnd
- }), { keyboardProps: h } = Xx(e), { focusProps: g } = Kx(e), _ = null;
+ }), { keyboardProps: h } = rS(e), { focusProps: g } = $x(e), _ = null;
o && a && (_ = a.useDraggableItem({
key: n.key,
hasAction: f.hasAction
@@ -37970,7 +38013,7 @@ var bde = /*#__PURE__*/ uS(gb, function(e, t, n) {
key: n.key,
dropPosition: "on"
} }, s, r));
- let y = o && o.isDragging(n.key), b = gI({
+ let y = o && o.isDragging(n.key), b = SI({
...e,
id: void 0,
children: e.children,
@@ -37988,7 +38031,7 @@ var bde = /*#__PURE__*/ uS(gb, function(e, t, n) {
(0, P.useEffect)(() => {
n.textValue;
}, [n.textValue]);
- let x = e.href ? SI.a : SI.div, S = WS(e, { global: !0 });
+ let x = e.href ? OI.a : OI.div, S = ZS(e, { global: !0 });
return delete S.id, delete S.onClick, e.href && l.tabIndex == null && (l.tabIndex = -1), /*#__PURE__*/ P.createElement(x, {
...K(S, b, l, p, h, g, _?.dragProps, v?.dropProps),
ref: r,
@@ -38002,29 +38045,29 @@ var bde = /*#__PURE__*/ uS(gb, 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__*/ P.createElement(hI, { values: [[II, { slots: {
- [mI]: u,
+ }, /*#__PURE__*/ P.createElement(xI, { values: [[HI, { slots: {
+ [bI]: u,
label: u,
description: d
- } }], [LL, { isSelected: f.isSelected }]] }, b.children));
+ } }], [UL, { isSelected: f.isSelected }]] }, b.children));
});
-function xde(e, t) {
- t = Zx(t);
- let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(jL), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
- return a ? null : /*#__PURE__*/ P.createElement(Cde, {
+function jde(e, t) {
+ t = iS(t);
+ let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(LL), { dropIndicatorProps: i, isHidden: a, isDropTarget: o } = n.useDropIndicator(e, r, t);
+ return a ? null : /*#__PURE__*/ P.createElement(Nde, {
...e,
dropIndicatorProps: i,
isDropTarget: o,
ref: t
});
}
-function Sde(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = gI({
+function Mde(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, ...i } = e, a = SI({
...i,
defaultClassName: "react-aria-DropIndicator",
values: { isDropTarget: r }
});
- return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(OI.div, {
...n,
...a,
role: "option",
@@ -38032,10 +38075,10 @@ function Sde(e, t) {
"data-drop-target": r || void 0
}));
}
-var Cde = /*#__PURE__*/ (0, P.forwardRef)(Sde);
-uS(hb, function(e, t, n) {
- let r = (0, P.useContext)(QL), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, P.useRef)(null);
- XL((0, P.useMemo)(() => ({
+var Nde = /*#__PURE__*/ (0, P.forwardRef)(Mde);
+_S(xb, function(e, t, n) {
+ let r = (0, P.useContext)(iR), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, P.useRef)(null);
+ nR((0, P.useMemo)(() => ({
onLoadMore: a,
collection: r?.collection,
sentinelRef: c,
@@ -38045,7 +38088,7 @@ uS(hb, function(e, t, n) {
o,
r?.collection
]), c);
- let l = gI({
+ let l = SI({
...s,
id: void 0,
children: n.rendered,
@@ -38058,7 +38101,7 @@ uS(hb, function(e, t, n) {
width: 0,
height: 0
},
- inert: zL(!0)
+ inert: GL(!0)
}, /*#__PURE__*/ P.createElement("div", {
"data-testid": "loadMoreSentinel",
ref: c,
@@ -38067,18 +38110,18 @@ uS(hb, function(e, t, n) {
height: 1,
width: 1
}
- })), i && l.children && /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(SI.div, {
- ...K(WS(e, { global: !0 }), { tabIndex: -1 }),
+ })), i && l.children && /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(OI.div, {
+ ...K(ZS(e, { global: !0 }), { tabIndex: -1 }),
...l,
role: "option",
ref: t
}, l.children)));
});
// node_modules/react-aria-components/dist/private/OverlayArrow.mjs
-var wde = /*#__PURE__*/ (0, P.createContext)({ placement: "bottom" });
+var Pde = /*#__PURE__*/ (0, P.createContext)({ placement: "bottom" });
// node_modules/react-stately/dist/private/overlays/useOverlayTriggerState.mjs
-function eR(e) {
- let [t, n] = fw(e.isOpen, e.defaultOpen || !1, e.onOpenChange), [r, i] = (0, P.useState)(null);
+function oR(e) {
+ let [t, n] = yw(e.isOpen, e.defaultOpen || !1, e.onOpenChange), [r, i] = (0, P.useState)(null);
return {
isOpen: t,
setOpen: n,
@@ -38096,15 +38139,15 @@ function eR(e) {
};
}
// node_modules/react-aria/dist/private/utils/animation.mjs
-function tR(e, t = !0, n) {
+function sR(e, t = !0, n) {
let [r, i] = (0, P.useState)(!0), a = r && t;
- return Bb(() => {
- if (!t && e.current) return Ix(kb(e.current, "opacity", "0"), kb(e.current, "clip", "rect(0 0 0 0)"), kb(e.current, "clip-path", "inset(50%)"), kb(e.current, "mask-image", "linear-gradient(#0000, #0000)"));
- }, [e, t]), Bb(() => {
+ return qb(() => {
+ if (!t && e.current) return Ux(Ib(e.current, "opacity", "0"), Ib(e.current, "clip", "rect(0 0 0 0)"), Ib(e.current, "clip-path", "inset(50%)"), Ib(e.current, "mask-image", "linear-gradient(#0000, #0000)"));
+ }, [e, t]), qb(() => {
if (a && e.current && "getAnimations" in e.current) for (let t of e.current.getAnimations()) t instanceof CSSTransition && t.cancel();
- }, [e, a]), rR(e, a, n, (0, P.useCallback)(() => i(!1), [])), a;
+ }, [e, a]), lR(e, a, n, (0, P.useCallback)(() => i(!1), [])), a;
}
-function nR(e, t, n) {
+function cR(e, t, n) {
let [r, i] = (0, P.useState)(t ? "open" : "closed");
switch (r) {
case "open":
@@ -38114,13 +38157,13 @@ function nR(e, t, n) {
case "exiting": t && i("open");
}
let a = r === "exiting";
- return rR(e, a, n, (0, P.useCallback)(() => {
+ return lR(e, a, n, (0, P.useCallback)(() => {
i((e) => e === "exiting" ? "closed" : e);
}, [])), a;
}
-function rR(e, t, n, r) {
- let i = (0, P.useRef)(null), a = OS(n);
- Bb(() => {
+function lR(e, t, n, r) {
+ let i = (0, P.useRef)(null), a = FS(n);
+ qb(() => {
if (t && e.current && i.current !== t) {
if (i.current = t, !("getAnimations" in e.current)) {
r();
@@ -38145,9 +38188,9 @@ function rR(e, t, n, r) {
]);
}
// node_modules/react-aria-components/dist/private/Popover.mjs
-var iR = /*#__PURE__*/ (0, P.createContext)(null), aR = /*#__PURE__*/ (0, P.createContext)(null), oR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, iR);
- let n = (0, P.useContext)(vR), r = eR(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = nR(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = rS(), { direction: c } = IS();
+var uR = /*#__PURE__*/ (0, P.createContext)(null), dR = /*#__PURE__*/ (0, P.createContext)(null), fR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, uR);
+ let n = (0, P.useContext)(wR), r = oR(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = cR(t, i.isOpen), o = e.isExiting || !e.shouldSkipAnimation && a || !1, s = uS(), { direction: c } = US();
if (s) {
let t = e.children;
return typeof t == "function" && (t = t({
@@ -38158,7 +38201,7 @@ var iR = /*#__PURE__*/ (0, P.createContext)(null), aR = /*#__PURE__*/ (0, P.crea
defaultChildren: null
})), /*#__PURE__*/ P.createElement(P.Fragment, null, t);
}
- return i && !i.isOpen && !o ? null : /*#__PURE__*/ P.createElement(Tde, {
+ return i && !i.isOpen && !o ? null : /*#__PURE__*/ P.createElement(Fde, {
...e,
triggerRef: e.triggerRef,
state: i,
@@ -38167,13 +38210,13 @@ var iR = /*#__PURE__*/ (0, P.createContext)(null), aR = /*#__PURE__*/ (0, P.crea
dir: c
});
});
-function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
- let a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useContext)(aR), c = s && i.trigger === "SubmenuTrigger", [l, u] = (0, P.useState)(!1), { popoverProps: d, underlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = foe({
+function Fde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContexts: r, ...i }) {
+ let a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useContext)(dR), c = s && i.trigger === "SubmenuTrigger", [l, u] = (0, P.useState)(!1), { popoverProps: d, underlayProps: f, arrowProps: p, placement: m, triggerAnchorPoint: h } = boe({
...i,
offset: i.offset ?? 8,
arrowRef: a,
groupRef: c ? s : o
- }, e), g = i.popoverRef, _ = tR(g, !!m && l), v = i.isEntering || !i.shouldSkipAnimation && _ || !1, y = gI({
+ }, e), g = i.popoverRef, _ = sR(g, !!m && l), v = i.isEntering || !i.shouldSkipAnimation && _ || !1, y = SI({
...i,
defaultClassName: "react-aria-Popover",
values: {
@@ -38183,10 +38226,10 @@ function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
isExiting: t
}
}), b = !i.isNonModal || i.trigger === "SubmenuTrigger" || i.trigger === "PreviewTrigger", [x, S] = (0, P.useState)(i.trigger === "PreviewTrigger");
- Bb(() => {
+ qb(() => {
g.current && S(b && !g.current.querySelector("[role=dialog]"));
}, [g, b]), (0, P.useEffect)(() => {
- x && i.trigger !== "PreviewTrigger" && (i.trigger !== "SubmenuTrigger" || wx() !== "pointer") && g.current && !Pb(g.current) && Fx(g.current);
+ x && i.trigger !== "PreviewTrigger" && (i.trigger !== "SubmenuTrigger" || jx() !== "pointer") && g.current && !Vb(g.current) && Hx(g.current);
}, [
x,
g,
@@ -38194,12 +38237,12 @@ function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
]);
let C = (0, P.useMemo)(() => {
let e = y.children;
- for (let t of [iR, ...r ?? []]) e = /*#__PURE__*/ P.createElement(t.Provider, { value: null }, e);
+ for (let t of [uR, ...r ?? []]) e = /*#__PURE__*/ P.createElement(t.Provider, { value: null }, e);
return e;
}, [y.children, r]), [w, T] = (0, P.useState)(null), E = (0, P.useCallback)(() => {
i.triggerRef.current && T(i.triggerRef.current.getBoundingClientRect().width + "px");
}, [i.triggerRef]);
- Bb(E, [E]), HE({
+ qb(E, [E]), YE({
ref: y.style?.["--trigger-width"] ? void 0 : i.triggerRef,
onResize: E
});
@@ -38209,9 +38252,9 @@ function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
...y.style,
"--trigger-width": y.style?.["--trigger-width"] || w
};
- Bb(() => jD(() => u(!0)), []);
- let O = /*#__PURE__*/ P.createElement(SI.div, {
- ...K(WS(i, { global: !0 }), d),
+ qb(() => RD(() => u(!0)), []);
+ let O = /*#__PURE__*/ P.createElement(OI.div, {
+ ...K(ZS(i, { global: !0 }), d),
...y,
id: x ? i.id : void 0,
role: x ? "dialog" : void 0,
@@ -38226,17 +38269,17 @@ function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
"data-placement": m,
"data-entering": v || void 0,
"data-exiting": t || void 0
- }, !i.isNonModal && /*#__PURE__*/ P.createElement(wD, { onDismiss: e.close }), /*#__PURE__*/ P.createElement(wde.Provider, { value: {
+ }, !i.isNonModal && /*#__PURE__*/ P.createElement(jD, { onDismiss: e.close }), /*#__PURE__*/ P.createElement(Pde.Provider, { value: {
...p,
placement: m,
ref: a
- } }, C), /*#__PURE__*/ P.createElement(wD, { onDismiss: e.close }));
- return c ? /*#__PURE__*/ P.createElement(RT, {
+ } }, C), /*#__PURE__*/ P.createElement(jD, { onDismiss: e.close }));
+ return c ? /*#__PURE__*/ P.createElement(GT, {
...i,
shouldContainFocus: x && i.trigger !== "PreviewTrigger",
isExiting: t,
portalContainer: n ?? s?.current ?? void 0
- }, O) : /*#__PURE__*/ P.createElement(RT, {
+ }, O) : /*#__PURE__*/ P.createElement(GT, {
...i,
shouldContainFocus: x && i.trigger !== "PreviewTrigger",
isExiting: t,
@@ -38251,13 +38294,13 @@ function Tde({ state: e, isExiting: t, UNSTABLE_portalContainer: n, clearContext
}), /*#__PURE__*/ P.createElement("div", {
ref: o,
style: { display: "contents" }
- }, /*#__PURE__*/ P.createElement(aR.Provider, { value: o }, O)));
+ }, /*#__PURE__*/ P.createElement(dR.Provider, { value: o }, O)));
}
// node_modules/react-aria-components/dist/private/Keyboard.mjs
-var Ede = /*#__PURE__*/ (0, P.createContext)({});
+var Ide = /*#__PURE__*/ (0, P.createContext)({});
// node_modules/react-stately/dist/private/menu/useMenuTriggerState.mjs
-function sR(e) {
- let t = eR(e), [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)([]), o = () => {
+function pR(e) {
+ let t = oR(e), [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)([]), o = () => {
a([]), t.close();
}, s = (e, t) => {
a((n) => t > n.length ? n : [...n.slice(0, t), e]);
@@ -38282,7 +38325,7 @@ function sR(e) {
};
}
// node_modules/react-stately/dist/private/tree/TreeCollection.mjs
-var Dde = class {
+var Lde = 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) => {
@@ -38325,8 +38368,8 @@ var Dde = class {
}
};
// node_modules/react-stately/dist/private/tree/useTreeState.mjs
-function cR(e) {
- let { onExpandedChange: t } = e, [n, r] = fw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = HL(e), a = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = qL(e, (0, P.useCallback)((e) => new Dde(e, { expandedKeys: n }), [n]), null);
+function mR(e) {
+ let { onExpandedChange: t } = e, [n, r] = yw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), t), i = JL(e), a = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), o = $L(e, (0, P.useCallback)((e) => new Lde(e, { expandedKeys: n }), [n]), null);
return (0, P.useEffect)(() => {
i.focusedKey != null && !o.getItem(i.focusedKey) && i.setFocusedKey(null);
}, [o, i.focusedKey]), {
@@ -38334,31 +38377,31 @@ function cR(e) {
expandedKeys: n,
disabledKeys: a,
toggleKey: (e) => {
- r(Ode(n, e));
+ r(Rde(n, e));
},
setExpandedKeys: r,
- selectionManager: new WL(o, i)
+ selectionManager: new XL(o, i)
};
}
-function Ode(e, t) {
+function Rde(e, t) {
let n = new Set(e);
return n.has(t) ? n.delete(t) : n.add(t), n;
}
// node_modules/react-aria-components/dist/private/Menu.mjs
-var lR = /*#__PURE__*/ (0, P.createContext)(null), uR = /*#__PURE__*/ (0, P.createContext)(null), dR = /*#__PURE__*/ (0, P.createContext)(null), fR = /*#__PURE__*/ (0, P.createContext)(null);
-function kde(e) {
- let t = sR(e), n = (0, P.useRef)(null), { menuTriggerProps: r, menuProps: i } = yT({
+var hR = /*#__PURE__*/ (0, P.createContext)(null), gR = /*#__PURE__*/ (0, P.createContext)(null), _R = /*#__PURE__*/ (0, P.createContext)(null), vR = /*#__PURE__*/ (0, P.createContext)(null);
+function zde(e) {
+ let t = pR(e), n = (0, P.useRef)(null), { menuTriggerProps: r, menuProps: i } = ET({
...e,
type: "menu"
}, t, n), a = (0, P.useRef)(null);
- return rS() ? null : /*#__PURE__*/ P.createElement(hI, { values: [
- [lR, {
+ return uS() ? null : /*#__PURE__*/ P.createElement(xI, { values: [
+ [hR, {
...i,
ref: a
}],
- [vR, t],
- [dR, t],
- [iR, {
+ [wR, t],
+ [_R, t],
+ [uR, {
trigger: "MenuTrigger",
triggerRef: n,
scrollRef: a,
@@ -38366,14 +38409,14 @@ function kde(e) {
"aria-labelledby": i["aria-labelledby"],
offset: e.trigger === "contextMenu" ? 0 : void 0
}]
- ] }, /*#__PURE__*/ P.createElement(Cae, {
+ ] }, /*#__PURE__*/ P.createElement(jae, {
...r,
ref: n,
isPressed: t.isOpen
}, e.children));
}
-var Ade = /*#__PURE__*/ (0, P.createContext)(null);
-(class extends pb {
+var Bde = /*#__PURE__*/ (0, P.createContext)(null);
+(class extends yb {
static {
this.type = "submenutrigger";
}
@@ -38386,24 +38429,24 @@ var Ade = /*#__PURE__*/ (0, P.createContext)(null);
return null;
}
});
-var jde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- return [e, t] = vI(e, t, lR), /*#__PURE__*/ P.createElement(sS, { content: /*#__PURE__*/ P.createElement(mS, e) }, (n) => /*#__PURE__*/ P.createElement(Mde, {
+var Vde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ return [e, t] = wI(e, t, hR), /*#__PURE__*/ P.createElement(mS, { content: /*#__PURE__*/ P.createElement(xS, e) }, (n) => /*#__PURE__*/ P.createElement(Hde, {
props: e,
collection: n,
menuRef: t
}));
});
-function Mde({ props: e, collection: t, menuRef: n }) {
- [e, n] = vI(e, n, CI);
- let { filter: r, ...i } = e, a = (0, P.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = cR({
+function Hde({ props: e, collection: t, menuRef: n }) {
+ [e, n] = wI(e, n, kI);
+ let { filter: r, ...i } = e, a = (0, P.useMemo)(() => r ? t.filter(r) : t, [t, r]), o = mR({
...e,
collection: a,
children: void 0
- }), s = (0, P.useContext)(dR), { isVirtualized: c, CollectionRoot: l } = (0, P.useContext)(OI), { menuProps: u } = Vae({
+ }), s = (0, P.useContext)(_R), { isVirtualized: c, CollectionRoot: l } = (0, P.useContext)(PI), { menuProps: u } = Yae({
...e,
isVirtualized: c,
onClose: e.onClose || s?.close
- }, o, n), d = gI({
+ }, o, n), d = SI({
...e,
children: void 0,
defaultClassName: "react-aria-Menu",
@@ -38413,36 +38456,36 @@ function Mde({ props: e, collection: t, menuRef: n }) {
role: "menuitem",
style: { display: "contents" }
}, e.renderEmptyState()));
- let p = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(yC, null, /*#__PURE__*/ P.createElement(SI.div, {
+ let p = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(EC, null, /*#__PURE__*/ P.createElement(OI.div, {
...K(p, d, u),
ref: n,
slot: e.slot || void 0,
"data-empty": o.collection.size === 0 || void 0,
onScroll: e.onScroll
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [uR, o],
- [RL, { elementType: "div" }],
- [TI, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [gR, o],
+ [WL, { elementType: "div" }],
+ [jI, {
name: "MenuSection",
- render: pR
+ render: yR
}],
- [Ade, {
+ [Bde, {
parentMenuRef: n,
shouldUseVirtualFocus: i?.shouldUseVirtualFocus
}],
- [hR, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
- [CI, null],
- [wI, null],
- [fR, o.selectionManager],
- [dR, s ?? sR({})]
- ] }, /*#__PURE__*/ P.createElement(IL, null, /*#__PURE__*/ P.createElement(l, {
+ [xR, { shouldCloseOnSelect: e.shouldCloseOnSelect }],
+ [kI, null],
+ [AI, null],
+ [vR, o.selectionManager],
+ [_R, s ?? pR({})]
+ ] }, /*#__PURE__*/ P.createElement(HL, null, /*#__PURE__*/ P.createElement(l, {
collection: o.collection,
- persistedKeys: kI(o.selectionManager.focusedKey),
+ persistedKeys: FI(o.selectionManager.focusedKey),
scrollRef: n
}))), f));
}
-var Nde = class extends WL {
+var Ude = class extends XL {
constructor(e, t) {
super(e.collection, t), this.parent = e;
}
@@ -38462,11 +38505,11 @@ var Nde = class extends WL {
return this.parent.childFocusStrategy;
}
};
-function pR(e, t, n, r = "react-aria-MenuSection") {
- let i = (0, P.useContext)(uR), { CollectionBranch: a } = (0, P.useContext)(OI), [o, s] = yI(), { headingProps: c, groupProps: l } = Uae({
+function yR(e, t, n, r = "react-aria-MenuSection") {
+ let i = (0, P.useContext)(gR), { CollectionBranch: a } = (0, P.useContext)(PI), [o, s] = TI(), { headingProps: c, groupProps: l } = Zae({
heading: s,
"aria-label": n.props["aria-label"] ?? void 0
- }), u = gI({
+ }), u = SI({
...e,
id: void 0,
children: void 0,
@@ -38474,31 +38517,31 @@ function pR(e, t, n, r = "react-aria-MenuSection") {
className: n.props?.className,
style: n.props?.style,
values: void 0
- }), d = (0, P.useContext)(fR), f = HL(e), p = e.selectionMode == null ? d : new Nde(d, f), m = _I(hR)?.shouldCloseOnSelect, h = WS(e, { global: !0 });
- return delete h.id, /*#__PURE__*/ P.createElement(SI.section, {
+ }), d = (0, P.useContext)(vR), f = JL(e), p = e.selectionMode == null ? d : new Ude(d, f), m = CI(xR)?.shouldCloseOnSelect, h = ZS(e, { global: !0 });
+ return delete h.id, /*#__PURE__*/ P.createElement(OI.section, {
...K(h, u, l),
ref: t
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [FL, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [VL, {
...c,
ref: o
}],
- [fR, p],
- [hR, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
+ [vR, p],
+ [xR, { shouldCloseOnSelect: e.shouldCloseOnSelect ?? m }]
] }, /*#__PURE__*/ P.createElement(a, {
collection: i.collection,
parent: n
})));
}
-var mR = /*#__PURE__*/ dS(_b, pR), hR = /*#__PURE__*/ (0, P.createContext)(null), gR = /*#__PURE__*/ uS(gb, function(e, t, n) {
- [e, t] = vI(e, t, hR);
- let r = _I(hR)?.id, i = (0, P.useContext)(uR), a = Zx(t), o = (0, P.useContext)(fR), { isVirtualized: s } = (0, P.useContext)(OI), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = Hae({
+var bR = /*#__PURE__*/ vS(Cb, yR), xR = /*#__PURE__*/ (0, P.createContext)(null), SR = /*#__PURE__*/ _S(Sb, function(e, t, n) {
+ [e, t] = wI(e, t, xR);
+ let r = CI(xR)?.id, i = (0, P.useContext)(gR), a = iS(t), o = (0, P.useContext)(vR), { isVirtualized: s } = (0, P.useContext)(PI), { menuItemProps: c, labelProps: l, descriptionProps: u, keyboardShortcutProps: d, ...f } = Xae({
...e,
id: r,
key: n.key,
selectionManager: o,
isVirtualized: s
- }, i, a), { hoverProps: p, isHovered: m } = WT({ isDisabled: f.isDisabled }), h = gI({
+ }, i, a), { hoverProps: p, isHovered: m } = ZT({ isDisabled: f.isDisabled }), h = SI({
...e,
id: void 0,
children: n.rendered,
@@ -38512,7 +38555,7 @@ var mR = /*#__PURE__*/ dS(_b, pR), hR = /*#__PURE__*/ (0, P.createContext)(null)
hasSubmenu: !!e["aria-haspopup"],
isOpen: e["aria-expanded"] === "true"
}
- }), g = e.href ? SI.a : SI.div, _ = WS(e, { global: !0 });
+ }), g = e.href ? OI.a : OI.div, _ = ZS(e, { global: !0 });
return delete _.id, delete _.onClick, /*#__PURE__*/ P.createElement(g, {
...K(_, h, c, p),
ref: a,
@@ -38525,19 +38568,19 @@ var mR = /*#__PURE__*/ dS(_b, pR), hR = /*#__PURE__*/ (0, P.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__*/ P.createElement(hI, { values: [
- [II, { slots: {
- [mI]: l,
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [HI, { slots: {
+ [bI]: l,
label: l,
description: u
} }],
- [Ede, d],
- [LL, { isSelected: f.isSelected }]
+ [Ide, d],
+ [UL, { isSelected: f.isSelected }]
] }, h.children));
});
-uS(hb, function(e, t, n) {
- let r = (0, P.useContext)(uR), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, P.useRef)(null);
- XL((0, P.useMemo)(() => ({
+_S(xb, function(e, t, n) {
+ let r = (0, P.useContext)(gR), { isLoading: i, onLoadMore: a, scrollOffset: o, ...s } = e, c = (0, P.useRef)(null);
+ nR((0, P.useMemo)(() => ({
onLoadMore: a,
collection: r?.collection,
sentinelRef: c,
@@ -38547,7 +38590,7 @@ uS(hb, function(e, t, n) {
o,
r?.collection
]), c);
- let l = gI({
+ let l = SI({
...s,
id: void 0,
children: n.rendered,
@@ -38560,7 +38603,7 @@ uS(hb, function(e, t, n) {
width: 0,
height: 0
},
- inert: zL(!0)
+ inert: GL(!0)
}, /*#__PURE__*/ P.createElement("div", {
"data-testid": "loadMoreSentinel",
ref: c,
@@ -38569,89 +38612,89 @@ uS(hb, function(e, t, n) {
height: 1,
width: 1
}
- })), i && l.children && /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(SI.div, {
- ...K(WS(e, { global: !0 }), { tabIndex: -1 }),
+ })), i && l.children && /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(OI.div, {
+ ...K(ZS(e, { global: !0 }), { tabIndex: -1 }),
...l,
role: "menuitem",
ref: t
}, l.children)));
});
// node_modules/react-aria-components/dist/private/Dialog.mjs
-var _R = /*#__PURE__*/ (0, P.createContext)(null), vR = /*#__PURE__*/ (0, P.createContext)(null), yR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+var CR = /*#__PURE__*/ (0, P.createContext)(null), wR = /*#__PURE__*/ (0, P.createContext)(null), TR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
let n = e["aria-labelledby"];
- [e, t] = vI(e, t, _R);
- let { dialogProps: r, titleProps: i, contentProps: a } = Tae({
+ [e, t] = wI(e, t, CR);
+ let { dialogProps: r, titleProps: i, contentProps: a } = Nae({
...e,
"aria-labelledby": n
- }, t), o = (0, P.useContext)(vR);
+ }, t), o = (0, P.useContext)(wR);
!r["aria-label"] && !r["aria-labelledby"] && e["aria-labelledby"] && (r["aria-labelledby"] = e["aria-labelledby"]);
- let s = gI({
+ let s = SI({
defaultClassName: "react-aria-Dialog",
className: e.className,
style: e.style,
children: e.children,
values: { close: o?.close || (() => {}) }
- }), c = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(SI.section, {
+ }), c = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(OI.section, {
...K(c, s, r),
render: e.render,
ref: t,
slot: e.slot || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [PI, { slots: {
- [mI]: {},
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [BI, { slots: {
+ [bI]: {},
title: {
...i,
level: 2
}
} }],
- [II, { slots: {
- [mI]: {},
+ [HI, { slots: {
+ [bI]: {},
description: a
} }],
- [MI, { slots: {
- [mI]: {},
+ [RI, { slots: {
+ [bI]: {},
close: { onPress: () => o?.close() }
} }]
] }, s.children));
-}), bR = typeof document < "u" && window.visualViewport;
-function Pde() {
- let e = cx(), t = (0, P.useRef)(null), [n, r] = (0, P.useState)(() => e ? {
+}), ER = typeof document < "u" && window.visualViewport;
+function Wde() {
+ let e = hx(), t = (0, P.useRef)(null), [n, r] = (0, P.useState)(() => e ? {
width: 0,
height: 0
- } : xR());
+ } : DR());
return (0, P.useEffect)(() => {
let e = (e) => {
r((t) => e.width === t.width && e.height === t.height ? t : e);
}, n = () => {
- bR && bR.scale > 1 || e(xR());
+ ER && ER.scale > 1 || e(DR());
}, i = (n) => {
- bR && bR.scale > 1 || TS(G(n)) && (t.current = jD((t) => {
+ ER && ER.scale > 1 || MS(G(n)) && (t.current = RD((t) => {
t || e({
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight
});
}));
};
- return e(xR()), Xb() && Zb() && window.addEventListener("blur", i, !0), bR ? bR.addEventListener("resize", n) : window.addEventListener("resize", n), () => {
- t.current?.(), Xb() && Zb() && window.removeEventListener("blur", i, !0), bR ? bR.removeEventListener("resize", n) : window.removeEventListener("resize", n);
+ return e(DR()), rx() && ix() && window.addEventListener("blur", i, !0), ER ? ER.addEventListener("resize", n) : window.addEventListener("resize", n), () => {
+ t.current?.(), rx() && ix() && window.removeEventListener("blur", i, !0), ER ? ER.removeEventListener("resize", n) : window.removeEventListener("resize", n);
};
}, []), n;
}
-function xR() {
+function DR() {
return {
- width: bR ? Math.min(bR.width * bR.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
- height: bR ? bR.height * bR.scale : document.documentElement.clientHeight
+ width: ER ? Math.min(ER.width * ER.scale, document.documentElement.clientWidth) : document.documentElement.clientWidth,
+ height: ER ? ER.height * ER.scale : document.documentElement.clientHeight
};
}
// node_modules/react-aria-components/dist/private/Modal.mjs
-var Fde = /*#__PURE__*/ (0, P.createContext)(null), SR = /*#__PURE__*/ (0, P.createContext)(null), Ide = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- if ((0, P.useContext)(SR)) return /*#__PURE__*/ P.createElement(wR, {
+var Gde = /*#__PURE__*/ (0, P.createContext)(null), OR = /*#__PURE__*/ (0, P.createContext)(null), Kde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ if ((0, P.useContext)(OR)) return /*#__PURE__*/ P.createElement(AR, {
...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__*/ P.createElement(CR, {
+ return /*#__PURE__*/ P.createElement(kR, {
isDismissable: n,
isKeyboardDismissDisabled: r,
isOpen: i,
@@ -38661,15 +38704,15 @@ var Fde = /*#__PURE__*/ (0, P.createContext)(null), SR = /*#__PURE__*/ (0, P.cre
isExiting: l,
UNSTABLE_portalContainer: u,
shouldCloseOnInteractOutside: d
- }, /*#__PURE__*/ P.createElement(wR, {
+ }, /*#__PURE__*/ P.createElement(AR, {
...f,
modalRef: t
}, s));
});
-function Lde(e, t) {
- [e, t] = vI(e, t, Fde);
- let n = (0, P.useContext)(vR), r = eR(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = Zx(t), o = (0, P.useRef)(null), s = nR(a, i.isOpen, e.onExit), c = (0, P.useRef)(null), l = nR(o, i.isOpen, (e) => c.current?.(e)), u = s || l || e.isExiting || !1, d = cx();
- return !i.isOpen && !u || d ? null : /*#__PURE__*/ P.createElement(Rde, {
+function qde(e, t) {
+ [e, t] = wI(e, t, Gde);
+ let n = (0, P.useContext)(wR), r = oR(e), i = e.isOpen != null || e.defaultOpen != null || !n ? r : n, a = iS(t), o = (0, P.useRef)(null), s = cR(a, i.isOpen, e.onExit), c = (0, P.useRef)(null), l = cR(o, i.isOpen, (e) => c.current?.(e)), u = s || l || e.isExiting || !1, d = hx();
+ return !i.isOpen && !u || d ? null : /*#__PURE__*/ P.createElement(Jde, {
...e,
state: i,
isExiting: u,
@@ -38678,12 +38721,12 @@ function Lde(e, t) {
onExitRef: c
});
}
-var CR = /*#__PURE__*/ (0, P.forwardRef)(Lde);
-function Rde({ UNSTABLE_portalContainer: e, UNSTABLE_deferUntilEntered: t, ...n }) {
- let r = n.modalRef, { state: i } = n, [a, o] = (0, P.useState)(!1), s = tR(n.overlayRef, a, n.onEnter) || n.isEntering || !1, c = !!t && (!a || s), { modalProps: l, underlayProps: u } = eoe({
+var kR = /*#__PURE__*/ (0, P.forwardRef)(qde);
+function Jde({ UNSTABLE_portalContainer: e, UNSTABLE_deferUntilEntered: t, ...n }) {
+ let r = n.modalRef, { state: i } = n, [a, o] = (0, P.useState)(!1), s = sR(n.overlayRef, a, n.onEnter) || n.isEntering || !1, c = !!t && (!a || s), { modalProps: l, underlayProps: u } = coe({
...n,
isEntering: c
- }, i, r), d = (0, P.useContext)(_R), f = t ? zde(d, { isEntering: c }) : d, p = gI({
+ }, i, r), d = (0, P.useContext)(CR), f = t ? Yde(d, { isEntering: c }) : d, p = SI({
...n,
defaultClassName: "react-aria-ModalOverlay",
values: {
@@ -38691,9 +38734,9 @@ function Rde({ UNSTABLE_portalContainer: e, UNSTABLE_deferUntilEntered: t, ...n
isExiting: n.isExiting,
state: i
}
- }), m = Pde(), h, g;
+ }), m = Wde(), h, g;
if (typeof document < "u") {
- let e = UC(document.body) ? document.body : document.scrollingElement || document.documentElement, t = e.getBoundingClientRect().width % 1, n = e.getBoundingClientRect().height % 1;
+ let e = XC(document.body) ? document.body : document.scrollingElement || document.documentElement, t = e.getBoundingClientRect().width % 1, n = e.getBoundingClientRect().height % 1;
h = e.scrollWidth - t, g = e.scrollHeight - n;
}
let _ = {
@@ -38703,18 +38746,18 @@ function Rde({ UNSTABLE_portalContainer: e, UNSTABLE_deferUntilEntered: t, ...n
"--page-width": h === void 0 ? void 0 : h + "px",
"--page-height": g === void 0 ? void 0 : g + "px"
};
- return Bb(() => jD(() => o(!0)), []), /*#__PURE__*/ P.createElement(RT, {
+ return qb(() => RD(() => o(!0)), []), /*#__PURE__*/ P.createElement(GT, {
isExiting: n.isExiting,
portalContainer: e
- }, /*#__PURE__*/ P.createElement(SI.div, {
- ...K(WS(n, { global: !0 }), u),
+ }, /*#__PURE__*/ P.createElement(OI.div, {
+ ...K(ZS(n, { global: !0 }), u),
...p,
style: _,
ref: n.overlayRef,
"data-entering": s || void 0,
"data-exiting": n.isExiting || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [SR, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [OR, {
modalProps: l,
modalRef: r,
isExiting: n.isExiting,
@@ -38722,11 +38765,11 @@ function Rde({ UNSTABLE_portalContainer: e, UNSTABLE_deferUntilEntered: t, ...n
isOpen: a,
isDismissable: n.isDismissable
}],
- [vR, i],
- [_R, f]
+ [wR, i],
+ [CR, f]
] }, p.children)));
}
-function zde(e, t) {
+function Yde(e, t) {
if (e && "slots" in e && e.slots) {
let n = {};
for (let r in e.slots) n[r] = {
@@ -38743,8 +38786,8 @@ function zde(e, t) {
...t
};
}
-function wR(e) {
- let { modalProps: t, modalRef: n, isExiting: r, onExitRef: i, isDismissable: a, isOpen: o } = (0, P.useContext)(SR), s = (0, P.useContext)(vR), c = Zx((0, P.useMemo)(() => Hx(e.modalRef, n), [e.modalRef, n])), l = tR(c, o, e.onEnter), u = gI({
+function AR(e) {
+ let { modalProps: t, modalRef: n, isExiting: r, onExitRef: i, isDismissable: a, isOpen: o } = (0, P.useContext)(OR), s = (0, P.useContext)(wR), c = iS((0, P.useMemo)(() => Yx(e.modalRef, n), [e.modalRef, n])), l = sR(c, o, e.onEnter), u = SI({
...e,
defaultClassName: "react-aria-Modal",
values: {
@@ -38753,20 +38796,20 @@ function wR(e) {
state: s
}
});
- return Bb(() => {
+ return qb(() => {
i && (i.current = e.onExit);
- }), /*#__PURE__*/ P.createElement(SI.div, {
- ...K(WS(e, { global: !0 }), t),
+ }), /*#__PURE__*/ P.createElement(OI.div, {
+ ...K(ZS(e, { global: !0 }), t),
...u,
ref: c,
"data-entering": l || void 0,
"data-exiting": r || void 0
- }, a && /*#__PURE__*/ P.createElement(wD, { onDismiss: s.close }), u.children);
+ }, a && /*#__PURE__*/ P.createElement(jD, { onDismiss: s.close }), u.children);
}
// node_modules/react-stately/dist/private/radio/useRadioGroupState.mjs
-var Bde = Math.round(Math.random() * 1e10), Vde = 0;
-function Hde(e) {
- let t = (0, P.useMemo)(() => e.name || `radio-group-${Bde}-${++Vde}`, [e.name]), [n, r] = fw(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, P.useState)(n), [a, o] = (0, P.useState)(null), s = rw({
+var Xde = Math.round(Math.random() * 1e10), Zde = 0;
+function Qde(e) {
+ let t = (0, P.useMemo)(() => e.name || `radio-group-${Xde}-${++Zde}`, [e.name]), [n, r] = yw(e.value, e.defaultValue ?? null, e.onChange), [i] = (0, P.useState)(n), [a, o] = (0, P.useState)(null), s = uw({
...e,
value: n
}), c = (t) => {
@@ -38788,16 +38831,16 @@ function Hde(e) {
};
}
// node_modules/react-aria-components/dist/private/RadioGroup.mjs
-var Ude = /*#__PURE__*/ (0, P.createContext)(null), Wde = /*#__PURE__*/ (0, P.createContext)(null), TR = /*#__PURE__*/ (0, P.createContext)(null), ER = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, Ude);
- let { validationBehavior: n } = _I(RI) || {}, r = e.validationBehavior ?? n ?? "native", i = Hde({
+var $de = /*#__PURE__*/ (0, P.createContext)(null), efe = /*#__PURE__*/ (0, P.createContext)(null), jR = /*#__PURE__*/ (0, P.createContext)(null), MR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, $de);
+ let { validationBehavior: n } = CI(WI) || {}, r = e.validationBehavior ?? n ?? "native", i = Qde({
...e,
validationBehavior: r
- }), [a, o] = yI(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = moe({
+ }), [a, o] = TI(!e["aria-label"] && !e["aria-labelledby"]), { radioGroupProps: s, labelProps: c, descriptionProps: l, errorMessageProps: u, ...d } = Soe({
...e,
label: o,
validationBehavior: r
- }, i), f = gI({
+ }, i), f = SI({
...e,
values: {
orientation: e.orientation || "vertical",
@@ -38808,8 +38851,8 @@ var Ude = /*#__PURE__*/ (0, P.createContext)(null), Wde = /*#__PURE__*/ (0, P.cr
state: i
},
defaultClassName: "react-aria-RadioGroup"
- }), p = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(SI.div, {
+ }), p = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(OI.div, {
...K(p, f, s),
ref: t,
slot: e.slot || void 0,
@@ -38818,39 +38861,39 @@ var Ude = /*#__PURE__*/ (0, P.createContext)(null), Wde = /*#__PURE__*/ (0, P.cr
"data-disabled": i.isDisabled || void 0,
"data-readonly": i.isReadOnly || void 0,
"data-required": i.isRequired || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [TR, i],
- [AI, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [jR, i],
+ [II, {
...c,
ref: a,
elementType: "span"
}],
- [II, { slots: {
+ [HI, { slots: {
description: l,
errorMessage: u
} }],
- [LI, d]
- ] }, /*#__PURE__*/ P.createElement(IL, null, f.children)));
-}), DR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [UI, d]
+ ] }, /*#__PURE__*/ P.createElement(HL, null, f.children)));
+}), NR = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = vI(r, t, Wde);
- let i = P.useContext(TR), a = Zx((0, P.useMemo)(() => Hx(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = poe({
- ...bI(e),
+ [e, t] = wI(r, t, efe);
+ let i = P.useContext(jR), a = iS((0, P.useMemo)(() => Yx(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), o = xoe({
+ ...EI(e),
children: typeof e.children == "function" || e.children
}, i, a);
- return /*#__PURE__*/ P.createElement(OR.Provider, { value: {
+ return /*#__PURE__*/ P.createElement(PR.Provider, { value: {
...o,
inputRef: a,
defaultClassName: "react-aria-Radio"
- } }, /*#__PURE__*/ P.createElement(Gde, {
+ } }, /*#__PURE__*/ P.createElement(tfe, {
...e,
ref: t
}));
-}), OR = /*#__PURE__*/ (0, P.createContext)(null), Gde = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, P.useContext)(OR), l = P.useContext(TR), { isFocused: u, isFocusVisible: d, focusProps: f } = BT(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = WT({
+}), PR = /*#__PURE__*/ (0, P.createContext)(null), tfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { labelProps: n, inputProps: r, isSelected: i, isDisabled: a, isPressed: o, defaultClassName: s, inputRef: c } = (0, P.useContext)(PR), l = P.useContext(jR), { isFocused: u, isFocusVisible: d, focusProps: f } = qT(), p = a || l.isReadOnly, { hoverProps: m, isHovered: h } = ZT({
...e,
isDisabled: p
- }), g = gI({
+ }), g = SI({
...e,
defaultClassName: s,
values: {
@@ -38864,8 +38907,8 @@ var Ude = /*#__PURE__*/ (0, P.createContext)(null), Wde = /*#__PURE__*/ (0, P.cr
isInvalid: l.isInvalid,
isRequired: l.isRequired
}
- }), _ = WS(e, { global: !0 });
- return delete _.id, delete _.onClick, /*#__PURE__*/ P.createElement(SI.label, {
+ }), _ = ZS(e, { global: !0 });
+ return delete _.id, delete _.onClick, /*#__PURE__*/ P.createElement(OI.label, {
...K(_, n, m, g),
ref: t,
"data-selected": i || void 0,
@@ -38877,18 +38920,18 @@ var Ude = /*#__PURE__*/ (0, P.createContext)(null), Wde = /*#__PURE__*/ (0, P.cr
"data-readonly": l.isReadOnly || void 0,
"data-invalid": l.isInvalid || void 0,
"data-required": l.isRequired || void 0
- }, /*#__PURE__*/ P.createElement(Sw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
+ }, /*#__PURE__*/ P.createElement(kw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
...K(r, f),
ref: c
})), g.children);
});
// node_modules/react-stately/dist/private/select/useSelectState.mjs
-function Kde(e) {
- let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = eR(e), [i, a] = (0, P.useState)(null), o = (0, P.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
+function nfe(e) {
+ let { selectionMode: t = "single", shouldCloseOnSelect: n = t === "single" } = e, r = oR(e), [i, a] = (0, P.useState)(null), o = (0, P.useMemo)(() => e.defaultValue === void 0 ? t === "single" ? e.defaultSelectedKey ?? null : [] : e.defaultValue, [
e.defaultValue,
e.defaultSelectedKey,
t
- ]), [s, c] = fw((0, P.useMemo)(() => e.value === void 0 ? t === "single" ? e.selectedKey : void 0 : e.value, [
+ ]), [s, c] = yw((0, P.useMemo)(() => e.value === void 0 ? t === "single" ? e.selectedKey : void 0 : e.value, [
e.value,
e.selectedKey,
t
@@ -38900,12 +38943,12 @@ function Kde(e) {
let e = [];
Array.isArray(n) ? e = n : n != null && (e = [n]), c(e);
}
- }, d = JL({
+ }, d = eR({
...e,
selectionMode: t,
disallowEmptySelection: t === "single",
allowDuplicateSelectionEvents: !0,
- selectedKeys: (0, P.useMemo)(() => qde(l), [l]),
+ selectedKeys: (0, P.useMemo)(() => rfe(l), [l]),
onSelectionChange: (e) => {
if (e !== "all") {
if (t === "single") {
@@ -38915,7 +38958,7 @@ function Kde(e) {
n && r.close(), m.commitValidation();
}
}
- }), f = d.selectionManager.firstSelectedKey, p = (0, P.useMemo)(() => [...d.selectionManager.selectedKeys].map((e) => d.collection.getItem(e)).filter((e) => e != null), [d.selectionManager.selectedKeys, d.collection]), m = rw({
+ }), f = d.selectionManager.firstSelectedKey, p = (0, P.useMemo)(() => [...d.selectionManager.selectedKeys].map((e) => d.collection.getItem(e)).filter((e) => e != null), [d.selectionManager.selectedKeys, d.collection]), m = uw({
...e,
value: Array.isArray(l) && l.length === 0 ? null : l
}), [h, g] = (0, P.useState)(!1), [_] = (0, P.useState)(l);
@@ -38942,15 +38985,15 @@ function Kde(e) {
setFocused: g
};
}
-function qde(e) {
+function rfe(e) {
if (e !== void 0) return e === null ? [] : Array.isArray(e) ? e : [e];
}
// node_modules/react-aria-components/dist/private/Select.mjs
-function Jde(e) {
+function ife(e) {
return e && e.__esModule ? e.default : e;
}
-var kR = /*#__PURE__*/ (0, P.createContext)(null), AR = /*#__PURE__*/ (0, P.createContext)(null), Yde = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, kR);
+var FR = /*#__PURE__*/ (0, P.createContext)(null), IR = /*#__PURE__*/ (0, P.createContext)(null), afe = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, FR);
let { children: n, isDisabled: r = !1, isInvalid: i = !1, isRequired: a = !1 } = e, o = (0, P.useMemo)(() => typeof n == "function" ? n({
isOpen: !1,
isDisabled: r,
@@ -38965,24 +39008,24 @@ var kR = /*#__PURE__*/ (0, P.createContext)(null), AR = /*#__PURE__*/ (0, P.crea
i,
a
]);
- return /*#__PURE__*/ P.createElement(sS, { content: o }, (n) => /*#__PURE__*/ P.createElement(Zde, {
+ return /*#__PURE__*/ P.createElement(mS, { content: o }, (n) => /*#__PURE__*/ P.createElement(sfe, {
props: e,
collection: n,
selectRef: t
}));
-}), Xde = [
- AI,
- MI,
- II
+}), ofe = [
+ II,
+ RI,
+ HI
];
-function Zde({ props: e, selectRef: t, collection: n }) {
- let { validationBehavior: r } = _I(RI) || {}, i = e.validationBehavior ?? r ?? "native", a = Kde({
+function sfe({ props: e, selectRef: t, collection: n }) {
+ let { validationBehavior: r } = CI(WI) || {}, i = e.validationBehavior ?? r ?? "native", a = nfe({
...e,
collection: n,
children: void 0,
validationBehavior: i
- }), { isFocusVisible: o, focusProps: s } = BT({ within: !0 }), c = (0, P.useRef)(null), [l, u] = yI(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = hoe({
- ...bI(e),
+ }), { isFocusVisible: o, focusProps: s } = qT({ within: !0 }), c = (0, P.useRef)(null), [l, u] = TI(!e["aria-label"] && !e["aria-labelledby"]), { labelProps: d, triggerProps: f, valueProps: p, menuProps: m, descriptionProps: h, errorMessageProps: g, hiddenSelectProps: _, ...v } = Coe({
+ ...EI(e),
label: u,
validationBehavior: i
}, a, c), y = (0, P.useMemo)(() => ({
@@ -38999,48 +39042,48 @@ function Zde({ props: e, selectRef: t, collection: n }) {
e.isDisabled,
v.isInvalid,
e.isRequired
- ]), b = gI({
+ ]), b = SI({
...e,
values: y,
defaultClassName: "react-aria-Select"
- }), x = WS(e, { global: !0 });
+ }), x = ZS(e, { global: !0 });
delete x.id;
let S = (0, P.useRef)(null);
- return /*#__PURE__*/ P.createElement(hI, { values: [
- [kR, e],
- [AR, a],
- [jR, p],
- [AI, {
+ return /*#__PURE__*/ P.createElement(xI, { values: [
+ [FR, e],
+ [IR, a],
+ [LR, p],
+ [II, {
...d,
ref: l,
elementType: "span"
}],
- [MI, {
+ [RI, {
...f,
ref: c,
isPressed: a.isOpen,
autoFocus: e.autoFocus
}],
- [vR, a],
- [iR, {
+ [wR, a],
+ [uR, {
trigger: "Select",
triggerRef: c,
scrollRef: S,
placement: "bottom start",
"aria-labelledby": m["aria-labelledby"],
- clearContexts: Xde
+ clearContexts: ofe
}],
- [ZL, {
+ [rR, {
...m,
ref: S
}],
- [QL, a],
- [II, { slots: {
+ [iR, a],
+ [HI, { slots: {
description: h,
errorMessage: g
} }],
- [LI, v]
- ] }, /*#__PURE__*/ P.createElement(SI.div, {
+ [UI, v]
+ ] }, /*#__PURE__*/ P.createElement(OI.div, {
...K(x, b, s),
ref: t,
slot: e.slot || void 0,
@@ -39050,14 +39093,14 @@ function Zde({ 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__*/ P.createElement(_oe, {
+ }, b.children, /*#__PURE__*/ P.createElement(Toe, {
..._,
autoComplete: e.autoComplete
})));
}
-for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, jR);
- let n = (0, P.useContext)(AR), { placeholder: r } = _I(kR), i = n.selectedItems.map((e) => {
+for (var LR = /*#__PURE__*/ (0, P.createContext)(null), cfe = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, LR);
+ let n = (0, P.useContext)(IR), { placeholder: r } = CI(FR), i = n.selectedItems.map((e) => {
let t = e.props?.children;
return typeof t == "function" && (t = t({
isHovered: !1,
@@ -39069,7 +39112,7 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
selectionMode: "single",
selectionBehavior: "toggle"
})), t;
- }), a = Eae(), o = (0, P.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, P.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
+ }), a = Pae(), o = (0, P.useMemo)(() => n.selectedItems.map((e) => e?.textValue), [n.selectedItems]), s = n.selectionManager.selectionMode, c = (0, P.useMemo)(() => s === "single" ? o[0] ?? "" : a.format(o), [
s,
a,
o
@@ -39084,7 +39127,7 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
a,
o,
i
- ]), u = HS(Jde(AL), "react-aria-components"), d = gI({
+ ]), u = YS(ife(IL), "react-aria-components"), d = SI({
...e,
defaultChildren: l ?? r ?? u.format("selectPlaceholder"),
defaultClassName: "react-aria-SelectValue",
@@ -39095,33 +39138,33 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
isPlaceholder: n.selectedItems.length === 0,
state: n
}
- }), f = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(SI.span, {
+ }), f = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(OI.span, {
ref: t,
...f,
...d,
"data-placeholder": n.selectedItems.length === 0 || void 0
- }, /*#__PURE__*/ P.createElement(II.Provider, { value: void 0 }, d.children));
-}), $de = /*#__PURE__*/ (0, P.createContext)(null), MR = /*#__PURE__*/ (0, P.createContext)(null), efe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ }, /*#__PURE__*/ P.createElement(HI.Provider, { value: void 0 }, d.children));
+}), lfe = /*#__PURE__*/ (0, P.createContext)(null), RR = /*#__PURE__*/ (0, P.createContext)(null), ufe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
let { inputRef: n = null, ...r } = e;
- [e, t] = vI(r, t, $de);
- let i = Zx((0, P.useMemo)(() => Hx(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = pw(e), o = yoe({
- ...bI(e),
+ [e, t] = wI(r, t, lfe);
+ let i = iS((0, P.useMemo)(() => Yx(n, e.inputRef === void 0 ? null : e.inputRef), [n, e.inputRef])), a = bw(e), o = Doe({
+ ...EI(e),
children: typeof e.children == "function" || e.children
}, a, i);
- return /*#__PURE__*/ P.createElement(hI, { values: [[MR, a], [NR, {
+ return /*#__PURE__*/ P.createElement(xI, { values: [[RR, a], [zR, {
...o,
inputRef: i,
defaultClassName: "react-aria-Switch"
- }]] }, /*#__PURE__*/ P.createElement(tfe, {
+ }]] }, /*#__PURE__*/ P.createElement(dfe, {
...e,
ref: t
}));
-}), NR = /*#__PURE__*/ (0, P.createContext)(null), tfe = /*#__PURE__*/ (0, P.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, P.useContext)(NR), { isFocused: f, isFocusVisible: p, focusProps: m } = BT(), h = a || o, g = (0, P.useContext)(MR), { hoverProps: _, isHovered: v } = WT({
+}), zR = /*#__PURE__*/ (0, P.createContext)(null), dfe = /*#__PURE__*/ (0, P.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, P.useContext)(zR), { isFocused: f, isFocusVisible: p, focusProps: m } = qT(), h = a || o, g = (0, P.useContext)(RR), { hoverProps: _, isHovered: v } = ZT({
...e,
isDisabled: h
- }), y = gI({
+ }), y = SI({
...e,
defaultClassName: u,
values: {
@@ -39136,8 +39179,8 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
isRequired: d || !1,
state: g
}
- }), b = WS(e, { global: !0 });
- return delete b.id, delete b.onClick, /*#__PURE__*/ P.createElement(SI.label, {
+ }), b = ZS(e, { global: !0 });
+ return delete b.id, delete b.onClick, /*#__PURE__*/ P.createElement(OI.label, {
...K(b, n, _, y),
ref: t,
slot: e.slot || void 0,
@@ -39150,11 +39193,11 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
"data-readonly": o || void 0,
"data-invalid": c || void 0,
"data-required": d || void 0
- }, /*#__PURE__*/ P.createElement(Sw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
+ }, /*#__PURE__*/ P.createElement(kw, { elementType: "span" }, /*#__PURE__*/ P.createElement("input", {
...K(r, m),
ref: l
})), y.children);
-}), PR = 10, FR = 5, IR = class {
+}), BR = 10, VR = 5, HR = class {
setup(e, t, n) {
this.delegate = e, this.state = t, this.direction = n;
}
@@ -39164,7 +39207,7 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(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) > FR && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > PR && (c = o > 0 ? "right" : "left", i.xDirection = c, i.lastX = t), e.dropPosition === "before") {
+ if (Math.abs(a) > VR && (s = a > 0 ? "down" : "up", i.yDirection = s, i.lastY = n), Math.abs(o) > BR && (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);
@@ -39243,11 +39286,11 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
lastSwitchX: n
});
let c = o.boundaryContext, l = Math.abs(n - c.lastSwitchX);
- if (Math.abs(r - c.lastSwitchY) > FR && i) {
+ if (Math.abs(r - c.lastSwitchY) > VR && 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 > PR && a) {
+ if (l > BR && 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;
}
@@ -39262,7 +39305,7 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
boundaryContext: null
};
}
-}, nfe = class {
+}, ffe = class {
constructor(e) {
this.keyMap = /* @__PURE__ */ new Map(), this.keyMap = /* @__PURE__ */ new Map(), this.columnCount = e?.columnCount, this.rows = [];
let t = (r) => {
@@ -39332,8 +39375,8 @@ for (var jR = /*#__PURE__*/ (0, P.createContext)(null), Qde = /*#__PURE__*/ nS(f
getChildren(e) {
return this.keyMap.get(e)?.childNodes || [];
}
-}, LR = "row-header-column-" + Math.random().toString(36).slice(2), RR = "row-header-column-" + Math.random().toString(36).slice(2); LR === RR;) RR = "row-header-column-" + Math.random().toString(36).slice(2);
-function zR(e, t) {
+}, UR = "row-header-column-" + Math.random().toString(36).slice(2), WR = "row-header-column-" + Math.random().toString(36).slice(2); UR === WR;) WR = "row-header-column-" + Math.random().toString(36).slice(2);
+function GR(e, t) {
if (t.length === 0) return [];
let n = [], r = /* @__PURE__ */ new Map();
for (let i of t) {
@@ -39417,13 +39460,13 @@ function zR(e, t) {
textValue: ""
}));
}
-var rfe = class extends nfe {
+var pfe = class extends ffe {
constructor(e, t, n) {
let r = /* @__PURE__ */ new Set(), i = null, a = [];
if (n?.showSelectionCheckboxes) {
let e = {
type: "column",
- key: LR,
+ key: UR,
value: null,
textValue: "",
level: 0,
@@ -39438,7 +39481,7 @@ var rfe = class extends nfe {
if (n?.showDragButtons) {
let e = {
type: "column",
- key: RR,
+ key: WR,
value: null,
textValue: "",
level: 0,
@@ -39465,7 +39508,7 @@ var rfe = class extends nfe {
for (let t of e.childNodes) c(t);
};
for (let t of e) c(t);
- let l = zR(s, a);
+ let l = GR(s, a);
if (l.forEach((e, t) => o.splice(t, 0, e)), super({
columnCount: a.length,
items: o,
@@ -39491,10 +39534,10 @@ var rfe = class extends nfe {
return this.keyMap.get(e)?.nextKey ?? null;
}
getFirstKey() {
- return TT(this.body.childNodes)?.key ?? null;
+ return MT(this.body.childNodes)?.key ?? null;
}
getLastKey() {
- return DT(this.body.childNodes)?.key ?? null;
+ return PT(this.body.childNodes)?.key ?? null;
}
getItem(e) {
return e === this.body.key ? this.body : this.keyMap.get(e) ?? null;
@@ -39525,15 +39568,15 @@ var rfe = class extends nfe {
}
};
// node_modules/react-stately/dist/private/table/TableUtils.mjs
-function ife(e) {
+function mfe(e) {
return e != null && (!isNaN(e) || String(e).match(/^(\d+)(?=%$)/) !== null);
}
-function afe(e) {
+function hfe(e) {
if (!e || typeof e == "number") return 1;
let t = e.match(/^(.+)(?=fr$)/);
return t ? parseFloat(t[0]) : 1;
}
-function BR(e, t) {
+function KR(e, t) {
if (typeof e == "string") {
let n = e.match(/^(\d+)(?=%$)/);
if (!n) throw Error("Only percentages or numbers are supported for static column widths");
@@ -39541,19 +39584,19 @@ function BR(e, t) {
}
return e;
}
-function VR(e, t) {
- return e == null ? 2 ** 53 - 1 : BR(e, t);
+function qR(e, t) {
+ return e == null ? 2 ** 53 - 1 : KR(e, t);
}
-function HR(e, t) {
- return e == null ? 0 : BR(e, t);
+function JR(e, t) {
+ return e == null ? 0 : KR(e, t);
}
-function ofe(e, t, n, r, i) {
+function gfe(e, t, n, r, i) {
let a = e, o = Math.floor(e), s = e - o > 0;
e = o;
let c = !1, l = t.map((t, a) => {
let o = n.get(t.key) == null ? t.width ?? t.defaultWidth ?? r?.(a) ?? "1fr" : n.get(t.key) ?? "1fr", s = !1, l = 0, u = 0, d = 0;
- ife(o) ? (l = BR(o, e), s = !0) : (u = afe(o), u <= 0 && (s = !0));
- let f = HR(t.minWidth ?? i?.(a) ?? 0, e), p = VR(t.maxWidth, e), m = Math.max(f, Math.min(l, p));
+ mfe(o) ? (l = KR(o, e), s = !0) : (u = hfe(o), u <= 0 && (s = !0));
+ let f = JR(t.minWidth ?? i?.(a) ?? 0, e), p = qR(t.maxWidth, e), m = Math.max(f, Math.min(l, p));
return s ? d = m : l > m && (s = !0, d = m), s || (c = !0), {
frozen: s,
baseSize: l,
@@ -39587,14 +39630,14 @@ function ofe(e, t, n, r, i) {
i === 0 || Math.sign(i) === Math.sign(e.violation) ? e.frozen = !0 : e.frozen || (c = !0);
});
}
- let u = sfe(l);
+ let u = _fe(l);
if (s && u.length > 0) {
let e = a.toString().split(".")[1], t = u[u.length - 1].toString();
u[u.length - 1] = Number(t + "." + e);
}
return u;
}
-function sfe(e) {
+function _fe(e) {
let t = 0, n = 0, r = [];
return e.forEach(function(e) {
let i = e.targetMainSize, a = Math.round(i + t) - n;
@@ -39602,7 +39645,7 @@ function sfe(e) {
}), r;
}
// node_modules/react-stately/dist/private/table/TableColumnLayout.mjs
-var cfe = class {
+var vfe = class {
constructor(e) {
this.columnWidths = /* @__PURE__ */ new Map(), this.columnMinWidths = /* @__PURE__ */ new Map(), this.columnMaxWidths = /* @__PURE__ */ new Map(), this.getDefaultWidth = e?.getDefaultWidth ?? (() => "1fr"), this.getDefaultMinWidth = e?.getDefaultMinWidth ?? (() => 75);
}
@@ -39631,18 +39674,18 @@ var cfe = class {
}), o;
}
buildColumnWidths(e, t, n) {
- return this.columnWidths = /* @__PURE__ */ new Map(), this.columnMinWidths = /* @__PURE__ */ new Map(), this.columnMaxWidths = /* @__PURE__ */ new Map(), ofe(e, t.columns.map((e) => ({
+ return this.columnWidths = /* @__PURE__ */ new Map(), this.columnMinWidths = /* @__PURE__ */ new Map(), this.columnMaxWidths = /* @__PURE__ */ new Map(), gfe(e, t.columns.map((e) => ({
...e.props,
key: e.key
})), n, (e) => this.getDefaultWidth(t.columns[e]), (e) => this.getDefaultMinWidth(t.columns[e])).forEach((n, r) => {
let i = t.columns[r].key, a = t.columns[r];
- this.columnWidths.set(i, n), this.columnMinWidths.set(i, HR(a.props.minWidth ?? this.getDefaultMinWidth(a), e)), this.columnMaxWidths.set(i, VR(a.props.maxWidth, e));
+ this.columnWidths.set(i, n), this.columnMinWidths.set(i, JR(a.props.minWidth ?? this.getDefaultMinWidth(a), e)), this.columnMaxWidths.set(i, qR(a.props.maxWidth, e));
}), this.columnWidths;
}
};
// node_modules/react-stately/dist/private/table/useTableColumnResizeState.mjs
-function lfe(e, t) {
- let { getDefaultWidth: n, getDefaultMinWidth: r, tableWidth: i = 0 } = e, [a, o] = (0, P.useState)(null), s = (0, P.useMemo)(() => new cfe({
+function yfe(e, t) {
+ let { getDefaultWidth: n, getDefaultMinWidth: r, tableWidth: i = 0 } = e, [a, o] = (0, P.useState)(null), s = (0, P.useMemo)(() => new vfe({
getDefaultWidth: n,
getDefaultMinWidth: r
}), [n, r]), [c, l] = (0, P.useMemo)(() => s.splitColumnsIntoControlledAndUncontrolled(t.collection.columns), [t.collection.columns, s]), [u, d] = (0, P.useState)(() => s.getInitialUncontrolledWidths(l)), [f, p] = (0, P.useState)(t.collection.columns);
@@ -39693,19 +39736,19 @@ function lfe(e, t) {
]);
}
// node_modules/react-stately/dist/private/grid/useGridState.mjs
-function ufe(e) {
- let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || HL(e), i = (0, P.useMemo)(() => e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set(), [e.disabledKeys]), a = r.setFocusedKey;
+function bfe(e) {
+ let { collection: t, focusMode: n } = e, r = e.UNSAFE_selectionState || JL(e), i = (0, P.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);
if (n?.type === "item") {
- let i = wT(n, t);
- e = r === "last" ? DT(i)?.key ?? null : TT(i)?.key ?? null;
+ let i = jT(n, t);
+ e = r === "last" ? PT(i)?.key ?? null : MT(i)?.key ?? null;
}
}
a(e, r);
};
- let o = (0, P.useMemo)(() => new WL(t, r), [t, r]), s = (0, P.useRef)(null);
+ let o = (0, P.useMemo)(() => new XL(t, r), [t, r]), s = (0, P.useRef)(null);
return (0, P.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;
@@ -39725,7 +39768,7 @@ function ufe(e) {
}
}
if (u) {
- let i = u.hasChildNodes ? [...wT(u, t)] : [], a = u.hasChildNodes && n !== e && e && e.index < i.length ? i[e.index].key : u.key;
+ let i = u.hasChildNodes ? [...jT(u, t)] : [], a = u.hasChildNodes && n !== e && e && e.index < i.length ? i[e.index].key : u.key;
r.setFocusedKey(a);
} else r.setFocusedKey(null);
}
@@ -39743,11 +39786,11 @@ function ufe(e) {
};
}
// node_modules/react-stately/dist/private/table/useTableState.mjs
-var dfe = {
+var xfe = {
ascending: "descending",
descending: "ascending"
};
-function ffe(e) {
+function Sfe(e) {
let [t, n] = (0, P.useState)(!1), { selectionMode: r = "none", showSelectionCheckboxes: i, showDragButtons: a, treeColumn: o = null } = e, s = (0, P.useMemo)(() => ({
showSelectionCheckboxes: i && r !== "none",
showDragButtons: a,
@@ -39758,11 +39801,11 @@ function ffe(e) {
i,
r,
a
- ]), c = qL(e, (0, P.useCallback)((e) => new rfe(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = ufe({
+ ]), c = $L(e, (0, P.useCallback)((e) => new pfe(e, null, s), [s]), s), { disabledKeys: l, selectionManager: u } = bfe({
...e,
collection: c,
disabledBehavior: e.disabledBehavior || "selection"
- }), [d, f] = fw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
+ }), [d, f] = yw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
return {
collection: c,
disabledKeys: l,
@@ -39774,7 +39817,7 @@ function ffe(e) {
sort(t, n) {
e.onSortChange?.({
column: t,
- direction: n ?? (e.sortDescriptor?.column === t ? dfe[e.sortDescriptor.direction] : "ascending")
+ direction: n ?? (e.sortDescriptor?.column === t ? xfe[e.sortDescriptor.direction] : "ascending")
});
},
expandedKeys: d,
@@ -39787,7 +39830,7 @@ function ffe(e) {
treeColumn: o
};
}
-function pfe(e, t) {
+function Cfe(e, t) {
let n = (0, P.useMemo)(() => t ? e.collection.filter(t) : e.collection, [e.collection, t]), r = e.selectionManager.withCollection(n);
return {
...e,
@@ -39796,10 +39839,10 @@ function pfe(e, t) {
};
}
// node_modules/react-aria-components/dist/private/Table.mjs
-function mfe(e) {
+function wfe(e) {
return e && e.__esModule ? e.default : e;
}
-var hfe = class extends vb {
+var Tfe = class extends wb {
withExpandedKeys(e) {
let t = this.clone();
return t.expandedKeys = e, t.frozen = this.frozen, t.rows = Array.from(t.getRows()), t;
@@ -39814,7 +39857,7 @@ var hfe = class extends vb {
}
get body() {
for (let e of this) if (e.type === "tablebody") return e;
- return new ZR(-2);
+ return new rz(-2);
}
commit(e, t, n = !1) {
this.updateColumns(n), this.firstKey = e, this.lastKey = t, this.rows = [];
@@ -39840,7 +39883,7 @@ var hfe = class extends vb {
for (let t of this.getChildren(e.key)) n(t);
};
for (let e of this.getChildren(this.head.key)) n(e);
- if (this.headerRows = zR(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 = GR(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;
@@ -39921,28 +39964,28 @@ var hfe = class extends vb {
return r.join(" ");
}
constructor(...e) {
- super(...e), this.headerRows = [], this.columns = [], this.rows = [], this.rowHeaderColumnKeys = /* @__PURE__ */ new Set(), this.head = new qR(-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 $R(-1), this.columnsDirty = !0, this.expandedKeys = /* @__PURE__ */ new Set();
}
-}, UR = /*#__PURE__*/ (0, P.createContext)(null), gfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let n = Zx(t), r = (0, P.useRef)(null), i = (0, P.useRef)(null), [a, o] = (0, P.useState)(0);
- Bb(() => {
+}, YR = /*#__PURE__*/ (0, P.createContext)(null), Efe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let n = iS(t), r = (0, P.useRef)(null), i = (0, P.useRef)(null), [a, o] = (0, P.useState)(0);
+ qb(() => {
let e = r.current;
- for (; e && e !== n.current && !UC(e);) e = e.parentElement;
+ for (; e && e !== n.current && !XC(e);) e = e.parentElement;
i.current = e;
- }, [n]), HE({
+ }, [n]), YE({
ref: i,
box: "border-box",
onResize() {
o(i.current?.clientWidth ?? 0);
}
- }), Bb(() => {
+ }), qb(() => {
o(i.current?.clientWidth ?? 0);
}, []);
let s = (0, P.useMemo)(() => ({
tableRef: r,
scrollRef: i,
tableWidth: a,
- useTableColumnResizeState: lfe,
+ useTableColumnResizeState: yfe,
onResizeStart: e.onResizeStart,
onResize: e.onResize,
onResizeEnd: e.onResizeEnd
@@ -39953,17 +39996,17 @@ var hfe = class extends vb {
e.onResize,
e.onResizeEnd
]);
- return /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(OI.div, {
render: e.render,
- ...WS(e, { global: !0 }),
+ ...ZS(e, { global: !0 }),
ref: n,
className: e.className || "react-aria-ResizableTableContainer",
style: e.style,
onScroll: e.onScroll
- }, /*#__PURE__*/ P.createElement(UR.Provider, { value: s }, e.children));
-}), _fe = /*#__PURE__*/ (0, P.createContext)(null), WR = /*#__PURE__*/ (0, P.createContext)(null), GR = /*#__PURE__*/ (0, P.createContext)(null), vfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, _fe);
- let n = HL(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, P.useMemo)(() => ({
+ }, /*#__PURE__*/ P.createElement(YR.Provider, { value: s }, e.children));
+}), Dfe = /*#__PURE__*/ (0, P.createContext)(null), XR = /*#__PURE__*/ (0, P.createContext)(null), ZR = /*#__PURE__*/ (0, P.createContext)(null), Ofe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, Dfe);
+ let n = JL(e), { selectionBehavior: r, selectionMode: i, disallowEmptySelection: a } = n, o = !!e.dragAndDropHooks?.useDraggableCollectionState, s = (0, P.useMemo)(() => ({
selectionBehavior: i === "none" ? null : r,
selectionMode: i,
disallowEmptySelection: a,
@@ -39973,26 +40016,26 @@ var hfe = class extends vb {
i,
a,
o
- ]), c = /*#__PURE__*/ P.createElement(xfe.Provider, { value: s }, /*#__PURE__*/ P.createElement(mS, e));
- return /*#__PURE__*/ P.createElement(sS, {
+ ]), c = /*#__PURE__*/ P.createElement(jfe.Provider, { value: s }, /*#__PURE__*/ P.createElement(xS, e));
+ return /*#__PURE__*/ P.createElement(mS, {
content: c,
- createCollection: () => new hfe()
- }, (r) => /*#__PURE__*/ P.createElement(bfe, {
+ createCollection: () => new Tfe()
+ }, (r) => /*#__PURE__*/ P.createElement(Afe, {
props: e,
forwardedRef: t,
selectionState: n,
collection: r
}));
-}), yfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}), kfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.table, {
+ }) : /*#__PURE__*/ P.createElement(OI.table, {
...e,
ref: t
});
-}), KR = {
+}), QR = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -40002,26 +40045,26 @@ var hfe = class extends vb {
rtl: "ArrowRight"
}
};
-function bfe({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
- [e, t] = vI(e, t, CI);
- let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, P.useContext)(UR);
- t = Zx((0, P.useMemo)(() => Hx(t, c?.tableRef), [t, c?.tableRef]));
- let [l, u] = fw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
+function Afe({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
+ [e, t] = wI(e, t, kI);
+ let { shouldUseVirtualFocus: i, disallowTypeAhead: a, filter: o, ...s } = e, c = (0, P.useContext)(YR);
+ t = iS((0, P.useMemo)(() => Yx(t, c?.tableRef), [t, c?.tableRef]));
+ let [l, u] = yw(e.expandedKeys ? new Set(e.expandedKeys) : void 0, e.defaultExpandedKeys ? new Set(e.defaultExpandedKeys) : /* @__PURE__ */ new Set(), e.onExpandedChange);
r = (0, P.useMemo)(() => r.withExpandedKeys(l), [r, l]);
- let d = ffe({
+ let d = Sfe({
...s,
collection: r,
children: void 0,
UNSAFE_selectionState: n,
expandedKeys: l,
onExpandedChange: u
- }), f = pfe(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, P.useContext)(OI), { dragAndDropHooks: _ } = e, { gridProps: v } = woe({
+ }), f = Cfe(d, o), { isVirtualized: p, layoutDelegate: m, dropTargetDelegate: h, CollectionRoot: g } = (0, P.useContext)(PI), { dragAndDropHooks: _ } = e, { gridProps: v } = Moe({
...s,
layoutDelegate: m,
isVirtualized: p
}, f, t), y = f.selectionManager, b = !!_?.useDraggableCollectionState, x = !!_?.useDroppableCollectionState;
(0, P.useRef)(b), (0, P.useRef)(x), (0, P.useEffect)(() => {}, [b, x]);
- let S, C, w, T = !1, E = null, D = (0, P.useRef)(null), { direction: O } = IS(), [k] = (0, P.useState)(() => new IR());
+ let S, C, w, T = !1, E = null, D = (0, P.useRef)(null), { direction: O } = US(), [k] = (0, P.useState)(() => new HR());
if (b && _) {
S = _.useDraggableCollectionState({
collection: f.collection,
@@ -40036,7 +40079,7 @@ function bfe({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
collection: f.collection,
selectionManager: y
});
- let e = new Fw({
+ let e = new Hw({
collection: f.collection,
disabledKeys: y.disabledKeys,
disabledBehavior: y.disabledBehavior,
@@ -40056,12 +40099,12 @@ function bfe({ 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 === KR.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === KR.collapse[O] && n?.hasChildNodes && d.expandedKeys.has(t.key)) && d.toggleKey(t.key);
+ (e.key === QR.expand[O] && n?.hasChildNodes && !d.expandedKeys.has(t.key) || e.key === QR.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 } = BT(), ee = gI({
+ let { focusProps: A, isFocused: j, isFocusVisible: M } = qT(), ee = SI({
...e,
children: void 0,
defaultClassName: "react-aria-Table",
@@ -40077,19 +40120,19 @@ function bfe({ props: e, forwardedRef: t, selectionState: n, collection: r }) {
tableLayout: "fixed",
width: "min-content"
}));
- let re = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(hI, { values: [
- [WR, f],
- [GR, N],
- [jL, {
+ let re = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(xI, { values: [
+ [XR, f],
+ [ZR, N],
+ [LL, {
dragAndDropHooks: _,
dragState: S,
dropState: C
}],
- [ML, { render: jfe }],
- [CI, null],
- [wI, null]
- ] }, /*#__PURE__*/ P.createElement(yC, null, /*#__PURE__*/ P.createElement(yfe, {
+ [RL, { render: Vfe }],
+ [kI, null],
+ [AI, null]
+ ] }, /*#__PURE__*/ P.createElement(EC, null, /*#__PURE__*/ P.createElement(kfe, {
...K(re, ee, v, A, w?.collectionProps),
style: ne,
ref: t,
@@ -40099,55 +40142,55 @@ function bfe({ 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__*/ P.createElement(IL, null, /*#__PURE__*/ P.createElement(g, {
+ }, /*#__PURE__*/ P.createElement(HL, null, /*#__PURE__*/ P.createElement(g, {
collection: f.collection,
scrollRef: c?.scrollRef ?? t,
- persistedKeys: PL(y, _, C)
+ persistedKeys: BL(y, _, C)
})))), E);
}
-var xfe = /*#__PURE__*/ (0, P.createContext)(null), qR = class extends pb {
+var jfe = /*#__PURE__*/ (0, P.createContext)(null), $R = class extends yb {
static {
this.type = "tableheader";
}
-}, Sfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}, Mfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.thead, {
+ }) : /*#__PURE__*/ P.createElement(OI.thead, {
...e,
ref: t
});
-}), JR = /*#__PURE__*/ dS(qR, (e, t) => {
- let n = (0, P.useContext)(WR).collection, r = Sb({
+}), ez = /*#__PURE__*/ vS($R, (e, t) => {
+ let n = (0, P.useContext)(XR).collection, r = kb({
items: n.headerRows,
children: (0, P.useCallback)((e) => {
switch (e.type) {
- case "headerrow": return /*#__PURE__*/ P.createElement(wfe, { item: e });
+ case "headerrow": return /*#__PURE__*/ P.createElement(Pfe, { item: e });
default: throw Error("Unsupported node type in TableHeader: " + e.type);
}
}, [])
- }), { rowGroupProps: i } = qO(), { hoverProps: a, isHovered: o } = WT({
+ }), { rowGroupProps: i } = ek(), { hoverProps: a, isHovered: o } = ZT({
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), s = gI({
+ }), s = SI({
...e,
children: void 0,
defaultClassName: "react-aria-TableHeader",
values: { isHovered: o }
});
- return /*#__PURE__*/ P.createElement(Sfe, {
- ...K(WS(e, { global: !0 }), i, a),
+ return /*#__PURE__*/ P.createElement(Mfe, {
+ ...K(ZS(e, { global: !0 }), i, a),
...s,
ref: t,
"data-hovered": o || void 0
}, r);
-}, (e) => /*#__PURE__*/ P.createElement(mS, {
+}, (e) => /*#__PURE__*/ P.createElement(xS, {
dependencies: e.dependencies,
items: e.columns
-}, e.children)), Cfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
+}, e.children)), Nfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
return n ? /*#__PURE__*/ P.createElement("div", {
...e,
ref: t
@@ -40156,41 +40199,41 @@ var xfe = /*#__PURE__*/ (0, P.createContext)(null), qR = class extends pb {
ref: t
});
});
-function wfe({ item: e }) {
- let t = (0, P.useRef)(null), n = (0, P.useContext)(WR), { isVirtualized: r, CollectionBranch: i } = (0, P.useContext)(OI), { rowProps: a } = Aoe({
+function Pfe({ item: e }) {
+ let t = (0, P.useRef)(null), n = (0, P.useContext)(XR), { isVirtualized: r, CollectionBranch: i } = (0, P.useContext)(PI), { rowProps: a } = Roe({
node: e,
isVirtualized: r
- }, n, t), { checkboxProps: o } = Loe(n);
- return /*#__PURE__*/ P.createElement(Cfe, {
+ }, n, t), { checkboxProps: o } = Goe(n);
+ return /*#__PURE__*/ P.createElement(Nfe, {
...a,
ref: t
- }, /*#__PURE__*/ P.createElement(hI, { values: [[zI, { slots: { selection: o } }], [BI, { slots: { selection: o } }]] }, /*#__PURE__*/ P.createElement(i, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [[GI, { slots: { selection: o } }], [KI, { slots: { selection: o } }]] }, /*#__PURE__*/ P.createElement(i, {
collection: n.collection,
parent: e
})));
}
-var Tfe = class extends pb {
+var Ffe = class extends yb {
static {
this.type = "column";
}
-}, Efe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}, Ife = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.th, {
+ }) : /*#__PURE__*/ P.createElement(OI.th, {
...e,
ref: t
});
-}), YR = /*#__PURE__*/ uS(Tfe, (e, t, n) => {
- let r = Zx(t), i = (0, P.useContext)(WR), { isVirtualized: a } = (0, P.useContext)(OI), { columnHeaderProps: o, isPressed: s } = Doe({
+}), tz = /*#__PURE__*/ _S(Ffe, (e, t, n) => {
+ let r = iS(t), i = (0, P.useContext)(XR), { isVirtualized: a } = (0, P.useContext)(PI), { columnHeaderProps: o, isPressed: s } = Foe({
node: n,
isVirtualized: a,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = BT(), d = (0, P.useContext)(GR), f = !1;
+ }, i, r), { isFocused: c, isFocusVisible: l, focusProps: u } = qT(), d = (0, P.useContext)(ZR), f = !1;
d && (f = d.resizingColumn === n.key);
- let { hoverProps: p, isHovered: m } = WT({ isDisabled: !e.allowsSorting }), h = gI({
+ let { hoverProps: p, isHovered: m } = ZT({ isDisabled: !e.allowsSorting }), h = SI({
...e,
id: void 0,
children: n.rendered,
@@ -40216,8 +40259,8 @@ var Tfe = class extends pb {
...g,
width: d.getColumnWidth(n.key)
});
- let _ = WS(e, { global: !0 });
- return delete _.id, /*#__PURE__*/ P.createElement(Efe, {
+ let _ = ZS(e, { global: !0 });
+ return delete _.id, /*#__PURE__*/ P.createElement(Ife, {
...K(_, o, u, p),
...h,
style: g,
@@ -40229,29 +40272,29 @@ var Tfe = class extends pb {
"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__*/ P.createElement(hI, { values: [[XR, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [[nz, {
column: n,
triggerRef: r
- }], [OI, EI]] }, h.children));
-}), XR = /*#__PURE__*/ (0, P.createContext)(null), Dfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let n = (0, P.useContext)(GR);
+ }], [PI, MI]] }, h.children));
+}), nz = /*#__PURE__*/ (0, P.createContext)(null), Lfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let n = (0, P.useContext)(ZR);
if (!n) throw Error("Wrap your <Table> in a <ResizableTableContainer> to enable column resizing");
- let r = HS(mfe(AL), "react-aria-components"), { onResizeStart: i, onResize: a, onResizeEnd: o } = (0, P.useContext)(UR), { column: s, triggerRef: c } = (0, P.useContext)(XR), l = (0, P.useRef)(null), { resizerProps: u, inputProps: d, isResizing: f, isMouseResizing: p } = koe({
+ let r = YS(wfe(IL), "react-aria-components"), { onResizeStart: i, onResize: a, onResizeEnd: o } = (0, P.useContext)(YR), { column: s, triggerRef: c } = (0, P.useContext)(nz), l = (0, P.useRef)(null), { resizerProps: u, inputProps: d, isResizing: f, isMouseResizing: p } = Loe({
column: s,
"aria-label": e["aria-label"] || r.format("tableResizer"),
onResizeStart: i,
onResize: a,
onResizeEnd: o,
triggerRef: c
- }, n, l), { focusProps: m, isFocused: h, isFocusVisible: g } = BT(), { hoverProps: _, isHovered: v } = WT(e), y = n.getColumnMinWidth(s.key) >= n.getColumnWidth(s.key), b = n.getColumnMaxWidth(s.key) <= n.getColumnWidth(s.key), { direction: x } = IS(), S = "both";
+ }, n, l), { focusProps: m, isFocused: h, isFocusVisible: g } = qT(), { hoverProps: _, isHovered: v } = ZT(e), y = n.getColumnMinWidth(s.key) >= n.getColumnWidth(s.key), b = n.getColumnMaxWidth(s.key) <= n.getColumnWidth(s.key), { direction: x } = US(), S = "both";
S = y ? x === "rtl" ? "right" : "left" : b ? x === "rtl" ? "left" : "right" : "both";
- let C = Zx(t), [w, T] = (0, P.useState)("");
+ let C = iS(t), [w, T] = (0, P.useState)("");
(0, P.useEffect)(() => {
if (!C.current) return;
let e = window.getComputedStyle(C.current);
T(e.cursor);
}, [C, S]);
- let E = gI({
+ let E = SI({
...e,
defaultClassName: "react-aria-ColumnResizer",
values: {
@@ -40261,8 +40304,8 @@ var Tfe = class extends pb {
isHovered: v,
resizableDirection: S
}
- }), D = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(SI.div, {
+ }), D = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(OI.div, {
ref: C,
role: "presentation",
...K(D, E, u, _),
@@ -40285,24 +40328,24 @@ var Tfe = class extends pb {
},
"data-testid": "cursor-overlay"
}), document.body));
-}), ZR = class extends mb {
+}), rz = class extends bb {
static {
this.type = "tablebody";
}
-}, Ofe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}, Rfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.tbody, {
+ }) : /*#__PURE__*/ P.createElement(OI.tbody, {
...e,
ref: t
});
-}), QR = /*#__PURE__*/ dS(ZR, (e, t, n) => {
- let r = (0, P.useContext)(WR), { isVirtualized: i } = (0, P.useContext)(OI), a = r.collection, { CollectionBranch: o } = (0, P.useContext)(OI), { dragAndDropHooks: s, dropState: c } = (0, P.useContext)(jL), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
+}), iz = /*#__PURE__*/ vS(rz, (e, t, n) => {
+ let r = (0, P.useContext)(XR), { isVirtualized: i } = (0, P.useContext)(PI), a = r.collection, { CollectionBranch: o } = (0, P.useContext)(PI), { dragAndDropHooks: s, dropState: c } = (0, P.useContext)(LL), l = !!s?.useDroppableCollectionState && !c?.isDisabled, u = l && !!c && (c.isDropTarget({ type: "root" }) ?? !1), d = a.size === 0, f = {
isDropTarget: u,
isEmpty: d
- }, p = gI({
+ }, p = SI({
...e,
id: void 0,
children: void 0,
@@ -40311,33 +40354,33 @@ var Tfe = class extends pb {
}), 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__*/ P.createElement(ez, {
+ i ? (n["aria-colspan"] = h, r = { display: "contents" }) : n.colSpan = h, m = /*#__PURE__*/ P.createElement(oz, {
role: "row",
...t,
style: r
- }, /*#__PURE__*/ P.createElement(nz, {
+ }, /*#__PURE__*/ P.createElement(cz, {
role: "rowheader",
...n,
style: r
}, e.renderEmptyState(f)));
}
- let { rowGroupProps: g } = qO(), _ = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(Ofe, {
+ let { rowGroupProps: g } = ek(), _ = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(Rfe, {
...K(_, p, g),
ref: t,
"data-empty": d || void 0
- }, l && /*#__PURE__*/ P.createElement(Ife, null), /*#__PURE__*/ P.createElement(o, {
+ }, l && /*#__PURE__*/ P.createElement(Kfe, null), /*#__PURE__*/ P.createElement(o, {
collection: a,
parent: n,
- renderDropIndicator: NL(s, c)
+ renderDropIndicator: zL(s, c)
}), m);
});
-(class extends mb {
+(class extends bb {
static {
this.type = "tablefooter";
}
});
-var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kfe = class extends pb {
+var az = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), zfe = class extends yb {
static {
this.type = "item";
}
@@ -40349,31 +40392,31 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
}
return null;
}
-}, ez = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}, oz = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.tr, {
+ }) : /*#__PURE__*/ P.createElement(OI.tr, {
...e,
ref: t
});
-}), tz = /*#__PURE__*/ dS(kfe, (e, t, n) => {
- let r = Zx(t), i = (0, P.useContext)(WR), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, P.useContext)(jL), { isVirtualized: c, CollectionBranch: l } = (0, P.useContext)(OI), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = Noe({
+}), sz = /*#__PURE__*/ vS(zfe, (e, t, n) => {
+ let r = iS(t), i = (0, P.useContext)(XR), { dragAndDropHooks: a, dragState: o, dropState: s } = (0, P.useContext)(LL), { isVirtualized: c, CollectionBranch: l } = (0, P.useContext)(PI), u = o && !(o.isDisabled || o.selectionManager.isDisabled(n.key)), { rowProps: d, expandButtonProps: f, ...p } = Voe({
node: n,
shouldSelectOnPressUp: !!o,
isVirtualized: c
- }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = BT(), { isFocusVisible: _, focusProps: v } = BT({ within: !0 }), { hoverProps: y, isHovered: b } = WT({
+ }, i, r), { isFocused: m, isFocusVisible: h, focusProps: g } = qT(), { isFocusVisible: _, focusProps: v } = qT({ within: !0 }), { hoverProps: y, isHovered: b } = ZT({
isDisabled: !p.allowsSelection && !p.hasAction && !u,
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), { checkboxProps: x } = Ioe({ key: n.key }, i), S;
+ }), { checkboxProps: x } = Woe({ key: n.key }, i), S;
o && a && (S = a.useDraggableItem({
key: n.key,
hasDragButton: !0
}, o));
- let C, w = (0, P.useRef)(null), { visuallyHiddenProps: T } = xw();
+ let C, w = (0, P.useRef)(null), { visuallyHiddenProps: T } = Ow();
s && a && (C = a.useDropIndicator({ target: {
type: "item",
key: n.key,
@@ -40383,7 +40426,7 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
(0, P.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 = gI({
+ 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 = SI({
...k,
id: void 0,
defaultClassName: "react-aria-Row",
@@ -40404,11 +40447,11 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
isExpanded: j,
level: n.level + 1
}
- }), ee = WS(e, { global: !0 });
- return delete ee.id, delete ee.onClick, /*#__PURE__*/ P.createElement(P.Fragment, null, C && !C.isHidden && /*#__PURE__*/ P.createElement(ez, {
+ }), ee = ZS(e, { global: !0 });
+ return delete ee.id, delete ee.onClick, /*#__PURE__*/ P.createElement(P.Fragment, null, C && !C.isHidden && /*#__PURE__*/ P.createElement(oz, {
role: "row",
style: { height: 0 }
- }, /*#__PURE__*/ P.createElement(nz, {
+ }, /*#__PURE__*/ P.createElement(cz, {
role: "gridcell",
colSpan: i.collection.columnCount,
style: { padding: 0 }
@@ -40417,7 +40460,7 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
...T,
...C.dropIndicatorProps,
ref: w
- }))), /*#__PURE__*/ P.createElement(ez, {
+ }))), /*#__PURE__*/ P.createElement(oz, {
...K(ee, M, d, g, y, S?.dragProps, v),
ref: r,
"data-disabled": p.isDisabled || void 0,
@@ -40433,17 +40476,17 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
"data-expanded": j || void 0,
"data-has-child-items": A || void 0,
"data-level": n.level + 1
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [zI, { slots: {
- [mI]: {},
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [GI, { slots: {
+ [bI]: {},
selection: x
} }],
- [BI, { slots: {
- [mI]: {},
+ [KI, { slots: {
+ [bI]: {},
selection: x
} }],
- [MI, { slots: {
- [mI]: {},
+ [RI, { slots: {
+ [bI]: {},
chevron: f,
drag: {
...S?.dragButtonProps,
@@ -40451,8 +40494,8 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
style: { pointerEvents: "none" }
}
} }],
- [LL, { isSelected: p.isSelected }],
- [$R, { isFocusVisibleWithinRow: _ }]
+ [UL, { isSelected: p.isSelected }],
+ [az, { isFocusVisibleWithinRow: _ }]
] }, /*#__PURE__*/ P.createElement(l, {
collection: i.collection,
parent: n
@@ -40460,34 +40503,34 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
}, (e) => {
if (e.id == null && typeof e.children == "function") throw Error("No id detected for the Row element. The Row element requires a id to be provided to it when the cells are rendered dynamically.");
let t = [e.value].concat(e.dependencies);
- return /*#__PURE__*/ P.createElement(mS, {
+ return /*#__PURE__*/ P.createElement(xS, {
dependencies: t,
items: e.columns,
idScope: e.id
}, e.children);
-}), Afe = class extends pb {
+}), Bfe = class extends yb {
static {
this.type = "cell";
}
-}, nz = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}, cz = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.td, {
+ }) : /*#__PURE__*/ P.createElement(OI.td, {
...e,
ref: t
});
-}), rz = /*#__PURE__*/ uS(Afe, (e, t, n) => {
- let r = Zx(t), i = (0, P.useContext)(WR), { dragState: a } = (0, P.useContext)(jL), { isVirtualized: o } = (0, P.useContext)(OI);
+}), lz = /*#__PURE__*/ _S(Bfe, (e, t, n) => {
+ let r = iS(t), i = (0, P.useContext)(XR), { dragState: a } = (0, P.useContext)(LL), { isVirtualized: o } = (0, P.useContext)(PI);
n.column = i.collection.columns[n.index];
- let { gridCellProps: s, isPressed: c } = Toe({
+ let { gridCellProps: s, isPressed: c } = Noe({
node: n,
shouldSelectOnPressUp: !!a,
isVirtualized: o,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = BT(), { hoverProps: f, isHovered: p } = WT({}), { isFocusVisibleWithinRow: m } = (0, P.useContext)($R), 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 = gI({
+ }, i, r), { isFocused: l, isFocusVisible: u, focusProps: d } = qT(), { hoverProps: f, isHovered: p } = ZT({}), { isFocusVisibleWithinRow: m } = (0, P.useContext)(az), 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 = SI({
...e,
id: void 0,
defaultClassName: "react-aria-Cell",
@@ -40506,8 +40549,8 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
level: _.level + 1,
isTreeColumn: n.column.key === i.treeColumn
}
- }), S = WS(e, { global: !0 });
- return delete S.id, /*#__PURE__*/ P.createElement(nz, {
+ }), S = ZS(e, { global: !0 });
+ return delete S.id, /*#__PURE__*/ P.createElement(cz, {
...K(S, x, s, d, f),
ref: r,
"data-focused": l || void 0,
@@ -40521,14 +40564,14 @@ var $R = /*#__PURE__*/ (0, P.createContext)({ isFocusVisibleWithinRow: !1 }), kf
"data-level": _.level + 1,
"data-tree-column": n.column.key === i.treeColumn || void 0,
"data-disabled": b || void 0
- }, /*#__PURE__*/ P.createElement(OI.Provider, { value: EI }, x.children));
+ }, /*#__PURE__*/ P.createElement(PI.Provider, { value: MI }, x.children));
});
-function jfe(e, t) {
- t = Zx(t);
- let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(jL), i = (0, P.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
+function Vfe(e, t) {
+ t = iS(t);
+ let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(LL), i = (0, P.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__*/ P.createElement(Ffe, {
+ return /*#__PURE__*/ P.createElement(Gfe, {
...e,
dropIndicatorProps: a,
isDropTarget: s,
@@ -40537,40 +40580,40 @@ function jfe(e, t) {
ref: t
});
}
-var Mfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+var Hfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.tr, {
+ }) : /*#__PURE__*/ P.createElement(OI.tr, {
...e,
ref: t
});
-}), Nfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- let { isVirtualized: n } = (0, P.useContext)(OI);
- return n ? /*#__PURE__*/ P.createElement(SI.div, {
+}), Ufe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ let { isVirtualized: n } = (0, P.useContext)(PI);
+ return n ? /*#__PURE__*/ P.createElement(OI.div, {
...e,
ref: t
- }) : /*#__PURE__*/ P.createElement(SI.td, {
+ }) : /*#__PURE__*/ P.createElement(OI.td, {
...e,
ref: t
});
});
-function Pfe(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, P.useContext)(WR), { visuallyHiddenProps: c } = xw(), l = gI({
+function Wfe(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, s = (0, P.useContext)(XR), { visuallyHiddenProps: c } = Ow(), l = SI({
...o,
defaultClassName: "react-aria-DropIndicator",
defaultStyle: { "--table-row-level": a + 1 },
values: { isDropTarget: r }
});
- return /*#__PURE__*/ P.createElement(Mfe, {
- ...WS(e, { global: !0 }),
+ return /*#__PURE__*/ P.createElement(Hfe, {
+ ...ZS(e, { global: !0 }),
...l,
role: "row",
ref: t,
"data-drop-target": r || void 0,
"aria-level": a
- }, /*#__PURE__*/ P.createElement(Nfe, {
+ }, /*#__PURE__*/ P.createElement(Ufe, {
role: "gridcell",
colSpan: s.collection.columnCount,
style: { padding: 0 }
@@ -40581,14 +40624,14 @@ function Pfe(e, t) {
ref: i
}), l.children));
}
-var Ffe = /*#__PURE__*/ (0, P.forwardRef)(Pfe);
-function Ife() {
- let e = (0, P.useContext)(WR), { dragAndDropHooks: t, dropState: n } = (0, P.useContext)(jL), r = (0, P.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = xw();
- return !a && i["aria-hidden"] ? null : /*#__PURE__*/ P.createElement(ez, {
+var Gfe = /*#__PURE__*/ (0, P.forwardRef)(Wfe);
+function Kfe() {
+ let e = (0, P.useContext)(XR), { dragAndDropHooks: t, dropState: n } = (0, P.useContext)(LL), r = (0, P.useRef)(null), { dropIndicatorProps: i } = t.useDropIndicator({ target: { type: "root" } }, n, r), a = n.isDropTarget({ type: "root" }), { visuallyHiddenProps: o } = Ow();
+ return !a && i["aria-hidden"] ? null : /*#__PURE__*/ P.createElement(oz, {
role: "row",
"aria-hidden": i["aria-hidden"],
style: { height: 0 }
- }, /*#__PURE__*/ P.createElement(nz, {
+ }, /*#__PURE__*/ P.createElement(cz, {
role: "gridcell",
colSpan: e.collection.columnCount,
style: { padding: 0 }
@@ -40599,9 +40642,9 @@ function Ife() {
ref: r
})));
}
-uS(hb, function(e, t, n) {
- let r = (0, P.useContext)(WR), { isVirtualized: i } = (0, P.useContext)(OI), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, P.useRef)(null);
- XL((0, P.useMemo)(() => ({
+_S(xb, function(e, t, n) {
+ let r = (0, P.useContext)(XR), { isVirtualized: i } = (0, P.useContext)(PI), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = r.collection.columns.length, u = (0, P.useRef)(null);
+ nR((0, P.useMemo)(() => ({
onLoadMore: o,
collection: r?.collection,
sentinelRef: u,
@@ -40611,7 +40654,7 @@ uS(hb, function(e, t, n) {
s,
r?.collection
]), u);
- let d = gI({
+ let d = SI({
...c,
id: void 0,
children: n.rendered,
@@ -40619,10 +40662,10 @@ uS(hb, 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__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(ez, {
+ return i ? (p["aria-colspan"] = l, m = { display: "contents" }) : p.colSpan = l, /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(oz, {
style: { height: 0 },
- inert: zL(!0)
- }, /*#__PURE__*/ P.createElement(nz, { style: {
+ inert: GL(!0)
+ }, /*#__PURE__*/ P.createElement(cz, { style: {
padding: 0,
border: 0
} }, /*#__PURE__*/ P.createElement("div", {
@@ -40633,22 +40676,22 @@ uS(hb, function(e, t, n) {
height: 1,
width: 1
}
- }))), a && d.children && /*#__PURE__*/ P.createElement(ez, {
- ...K(WS(e, { global: !0 }), f),
+ }))), a && d.children && /*#__PURE__*/ P.createElement(oz, {
+ ...K(ZS(e, { global: !0 }), f),
...d,
role: "row",
ref: t,
"aria-level": n.level + 1,
"data-level": n.level + 1
- }, /*#__PURE__*/ P.createElement(nz, {
+ }, /*#__PURE__*/ P.createElement(cz, {
role: "rowheader",
...p,
style: m
}, d.children)));
});
// node_modules/react-stately/dist/private/list/useSingleSelectListState.mjs
-function Lfe(e) {
- let [t, n] = fw(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, P.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = JL({
+function qfe(e) {
+ let [t, n] = yw(e.selectedKey, e.defaultSelectedKey ?? null, e.onSelectionChange), r = (0, P.useMemo)(() => t == null ? [] : [t], [t]), { collection: i, disabledKeys: a, selectionManager: o } = eR({
...e,
selectionMode: "single",
disallowEmptySelection: !0,
@@ -40670,24 +40713,24 @@ function Lfe(e) {
};
}
// node_modules/react-stately/dist/private/tabs/useTabListState.mjs
-function Rfe(e) {
- let t = Lfe({
+function Jfe(e) {
+ let t = qfe({
...e,
onSelectionChange: e.onSelectionChange ? (t) => {
t != null && e.onSelectionChange?.(t);
} : void 0,
suppressTextValueWarning: !0,
- defaultSelectedKey: e.defaultSelectedKey ?? iz(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
+ defaultSelectedKey: e.defaultSelectedKey ?? uz(e.collection, e.disabledKeys ? new Set(e.disabledKeys) : /* @__PURE__ */ new Set()) ?? void 0
}), { selectionManager: n, collection: r, selectedKey: i } = t, a = (0, P.useRef)(i);
return (0, P.useEffect)(() => {
let o = i;
- e.selectedKey == null && (n.isEmpty || o == null || !r.getItem(o)) && (o = iz(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 = uz(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 iz(e, t) {
+function uz(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);
@@ -40696,24 +40739,24 @@ function iz(e, t) {
return n;
}
// node_modules/react-aria-components/dist/private/Tabs.mjs
-var az = /*#__PURE__*/ (0, P.createContext)(null), oz = /*#__PURE__*/ (0, P.createContext)(null), zfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, az);
+var dz = /*#__PURE__*/ (0, P.createContext)(null), fz = /*#__PURE__*/ (0, P.createContext)(null), Yfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, dz);
let { children: n, orientation: r = "horizontal" } = e;
return n = (0, P.useMemo)(() => typeof n == "function" ? n({
orientation: r,
defaultChildren: null
- }) : n, [n, r]), /*#__PURE__*/ P.createElement(sS, { content: n }, (n) => /*#__PURE__*/ P.createElement(Bfe, {
+ }) : n, [n, r]), /*#__PURE__*/ P.createElement(mS, { content: n }, (n) => /*#__PURE__*/ P.createElement(Xfe, {
props: e,
collection: n,
tabsRef: t
}));
});
-function Bfe({ props: e, tabsRef: t, collection: n }) {
- let { orientation: r = "horizontal" } = e, i = Rfe({
+function Xfe({ props: e, tabsRef: t, collection: n }) {
+ let { orientation: r = "horizontal" } = e, i = Jfe({
...e,
collection: n,
children: void 0
- }), { focusProps: a, isFocused: o, isFocusVisible: s } = BT({ within: !0 }), c = (0, P.useMemo)(() => ({
+ }), { focusProps: a, isFocused: o, isFocusVisible: s } = qT({ within: !0 }), c = (0, P.useMemo)(() => ({
orientation: r,
isFocusWithin: o,
isFocusVisible: s
@@ -40721,12 +40764,12 @@ function Bfe({ props: e, tabsRef: t, collection: n }) {
r,
o,
s
- ]), l = gI({
+ ]), l = SI({
...e,
defaultClassName: "react-aria-Tabs",
values: c
- }), u = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(SI.div, {
+ }), u = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(OI.div, {
...K(u, l, a),
ref: t,
slot: e.slot || void 0,
@@ -40734,20 +40777,20 @@ function Bfe({ props: e, tabsRef: t, collection: n }) {
"data-orientation": r,
"data-focus-visible": s || void 0,
"data-disabled": i.isDisabled || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [[az, e], [oz, i]] }, l.children));
+ }, /*#__PURE__*/ P.createElement(xI, { values: [[dz, e], [fz, i]] }, l.children));
}
-var sz = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- return (0, P.useContext)(oz) ? /*#__PURE__*/ P.createElement(Vfe, {
+var pz = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ return (0, P.useContext)(fz) ? /*#__PURE__*/ P.createElement(Zfe, {
props: e,
forwardedRef: t
- }) : /*#__PURE__*/ P.createElement(mS, e);
+ }) : /*#__PURE__*/ P.createElement(xS, e);
});
-function Vfe({ props: e, forwardedRef: t }) {
- let n = (0, P.useContext)(oz), { CollectionRoot: r } = (0, P.useContext)(OI), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = _I(az), o = Zx(t), { tabListProps: s } = Boe({
+function Zfe({ props: e, forwardedRef: t }) {
+ let n = (0, P.useContext)(fz), { CollectionRoot: r } = (0, P.useContext)(PI), { orientation: i = "horizontal", keyboardActivation: a = "automatic" } = CI(dz), o = iS(t), { tabListProps: s } = Joe({
...e,
orientation: i,
keyboardActivation: a
- }, n, o), c = gI({
+ }, n, o), c = SI({
...e,
children: null,
defaultClassName: "react-aria-TabList",
@@ -40755,30 +40798,30 @@ function Vfe({ props: e, forwardedRef: t }) {
orientation: i,
state: n
}
- }), l = WS(e, { global: !0 });
- return delete l.id, /*#__PURE__*/ P.createElement(SI.div, {
+ }), l = ZS(e, { global: !0 });
+ return delete l.id, /*#__PURE__*/ P.createElement(OI.div, {
...K(l, c, s),
ref: o,
"data-orientation": i || void 0
- }, /*#__PURE__*/ P.createElement(IL, null, /*#__PURE__*/ P.createElement(r, {
+ }, /*#__PURE__*/ P.createElement(HL, null, /*#__PURE__*/ P.createElement(r, {
collection: n.collection,
- persistedKeys: kI(n.selectionManager.focusedKey)
+ persistedKeys: FI(n.selectionManager.focusedKey)
})));
}
-var Hfe = /*#__PURE__*/ uS(class extends pb {
+var Qfe = /*#__PURE__*/ _S(class extends yb {
static {
this.type = "item";
}
}, (e, t, n) => {
- let r = (0, P.useContext)(oz), i = Zx(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = Roe({
+ let r = (0, P.useContext)(fz), i = iS(t), { tabProps: a, isSelected: o, isDisabled: s, isPressed: c } = Koe({
key: n.key,
...e
- }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = BT(), { hoverProps: f, isHovered: p } = WT({
+ }, r, i), { focusProps: l, isFocused: u, isFocusVisible: d } = qT(), { hoverProps: f, isHovered: p } = ZT({
isDisabled: s,
onHoverStart: e.onHoverStart,
onHoverEnd: e.onHoverEnd,
onHoverChange: e.onHoverChange
- }), m = gI({
+ }), m = SI({
...e,
id: void 0,
children: n.rendered,
@@ -40791,7 +40834,7 @@ var Hfe = /*#__PURE__*/ uS(class extends pb {
isPressed: c,
isHovered: p
}
- }), h = n.props.href ? SI.a : SI.div, g = WS(e, { global: !0 });
+ }), h = n.props.href ? OI.a : OI.div, g = ZS(e, { global: !0 });
return delete g.id, delete g.onClick, /*#__PURE__*/ P.createElement(h, {
...K(g, m, a, l, f),
ref: i,
@@ -40801,54 +40844,54 @@ var Hfe = /*#__PURE__*/ uS(class extends pb {
"data-focus-visible": d || void 0,
"data-pressed": c || void 0,
"data-hovered": p || void 0
- }, /*#__PURE__*/ P.createElement(LL.Provider, { value: { isSelected: o } }, m.children));
-}), Ufe = /*#__PURE__*/ nS(function(e, t) {
- let n = (0, P.useContext)(oz), r = Zx(t), i = n.selectedKey === e.id, [a, o] = (0, P.useState)(n.selectedKey == null ? null : i);
+ }, /*#__PURE__*/ P.createElement(UL.Provider, { value: { isSelected: o } }, m.children));
+}), $fe = /*#__PURE__*/ lS(function(e, t) {
+ let n = (0, P.useContext)(fz), r = iS(t), i = n.selectedKey === e.id, [a, o] = (0, P.useState)(n.selectedKey == null ? null : i);
a == null && n.selectedKey != null ? o(i) : !i && a && o(!1);
- let s = nR(r, i);
- return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ P.createElement(Wfe, {
+ let s = cR(r, i);
+ return !i && !e.shouldForceMount && !s ? null : /*#__PURE__*/ P.createElement(epe, {
...e,
tabPanelRef: r,
isInitiallySelected: a || !1,
isExiting: s
});
});
-function Wfe(e) {
- let t = (0, P.useContext)(oz), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = Voe(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = BT(), d = t.selectedKey === e.id, f = tR(r) && !i, p = gI({
+function epe(e) {
+ let t = (0, P.useContext)(fz), { id: n, tabPanelRef: r, isInitiallySelected: i, isExiting: a, ...o } = e, { tabPanelProps: s } = Yoe(e, t, r), { focusProps: c, isFocused: l, isFocusVisible: u } = qT(), d = t.selectedKey === e.id, f = sR(r) && !i, p = SI({
...e,
defaultClassName: "react-aria-TabPanel",
values: {
isFocused: l,
isFocusVisible: u,
- isInert: zL(!d),
+ isInert: GL(!d),
isEntering: f,
isExiting: a,
state: t
}
- }), m = WS(o, { global: !0 });
+ }), m = ZS(o, { global: !0 });
delete m.id;
let h = d ? K(m, s, c, p) : K(m, p);
- return /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(OI.div, {
...h,
ref: r,
"data-focused": l || void 0,
"data-focus-visible": u || void 0,
- inert: zL(!d || e.inert),
+ inert: GL(!d || e.inert),
"data-inert": d ? void 0 : "true",
"data-entering": f || void 0,
"data-exiting": a || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [[az, null], [oz, null]] }, /*#__PURE__*/ P.createElement(OI.Provider, { value: EI }, p.children)));
+ }, /*#__PURE__*/ P.createElement(xI, { values: [[dz, null], [fz, null]] }, /*#__PURE__*/ P.createElement(PI.Provider, { value: MI }, p.children)));
}
// node_modules/react-aria-components/dist/private/TextArea.mjs
-var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
+var mz = /*#__PURE__*/ (0, P.createContext)({}), tpe = (e) => {
let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, ...i } = e;
return i;
-}, Kfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- [e, t] = vI(e, t, cz);
- let { hoverProps: n, isHovered: r } = WT(e), { isFocused: i, isFocusVisible: a, focusProps: o } = BT({
+}, npe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ [e, t] = wI(e, t, mz);
+ let { hoverProps: n, isHovered: r } = ZT(e), { isFocused: i, isFocusVisible: a, focusProps: o } = qT({
isTextInput: !0,
autoFocus: e.autoFocus
- }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = gI({
+ }), s = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = SI({
...e,
values: {
isHovered: r,
@@ -40859,8 +40902,8 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
},
defaultClassName: "react-aria-TextArea"
});
- return /*#__PURE__*/ P.createElement(SI.textarea, {
- ...K(Gfe(e), o, n),
+ return /*#__PURE__*/ P.createElement(OI.textarea, {
+ ...K(tpe(e), o, n),
...c,
ref: t,
"data-focused": i || void 0,
@@ -40869,18 +40912,18 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
"data-focus-visible": a || void 0,
"data-invalid": s || void 0
});
-}), qfe = /*#__PURE__*/ (0, P.createContext)(null), Jfe = /*#__PURE__*/ nS(function(e, t) {
- [e, t] = vI(e, t, qfe);
- let { validationBehavior: n } = _I(RI) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, P.useRef)(null);
- [e, i] = vI(e, i, wI);
- let [a, o] = yI(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, P.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = cae({
- ...bI(e),
+}), rpe = /*#__PURE__*/ (0, P.createContext)(null), ipe = /*#__PURE__*/ lS(function(e, t) {
+ [e, t] = wI(e, t, rpe);
+ let { validationBehavior: n } = CI(WI) || {}, r = e.validationBehavior ?? n ?? "native", i = (0, P.useRef)(null);
+ [e, i] = wI(e, i, AI);
+ let [a, o] = TI(!e["aria-label"] && !e["aria-labelledby"]), [s, c] = (0, P.useState)("input"), { labelProps: l, inputProps: u, descriptionProps: d, errorMessageProps: f, ...p } = gae({
+ ...EI(e),
inputElementType: s,
label: o,
validationBehavior: r
}, i), m = (0, P.useCallback)((e) => {
i.current = e, e && c(e instanceof HTMLTextAreaElement ? "textarea" : "input");
- }, [i]), h = gI({
+ }, [i]), h = SI({
...e,
values: {
isDisabled: e.isDisabled || !1,
@@ -40889,8 +40932,8 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
isRequired: e.isRequired || !1
},
defaultClassName: "react-aria-TextField"
- }), g = WS(e, { global: !0 });
- return delete g.id, /*#__PURE__*/ P.createElement(SI.div, {
+ }), g = ZS(e, { global: !0 });
+ return delete g.id, /*#__PURE__*/ P.createElement(OI.div, {
...g,
...h,
ref: t,
@@ -40899,31 +40942,31 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
"data-invalid": p.isInvalid || void 0,
"data-readonly": e.isReadOnly || void 0,
"data-required": e.isRequired || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [AI, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [II, {
...l,
ref: a
}],
- [WI, {
+ [XI, {
...u,
ref: m
}],
- [cz, {
+ [mz, {
...u,
ref: m
}],
- [HI, {
+ [JI, {
role: "presentation",
isInvalid: p.isInvalid,
isDisabled: e.isDisabled || !1
}],
- [II, { slots: {
+ [HI, { slots: {
description: d,
errorMessage: f
} }],
- [LI, p]
+ [UI, p]
] }, h.children));
-}), Yfe = class e extends vb {
+}), ape = class e extends wb {
withExpandedKeys(t, n) {
let r = this.clone();
return r.expandedKeys = n, e.cloneAncestorSections(n, t, r), e.cloneAncestorSections(t, n, r), r.frozen = this.frozen, r;
@@ -40995,16 +41038,16 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
constructor(...e) {
super(...e), this.expandedKeys = /* @__PURE__ */ new Set();
}
-}, Xfe = /*#__PURE__*/ (0, P.createContext)(null), lz = /*#__PURE__*/ (0, P.createContext)(null), Zfe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
- return [e, t] = vI(e, t, Xfe), /*#__PURE__*/ P.createElement(sS, {
- content: /*#__PURE__*/ P.createElement(mS, e),
- createCollection: () => new Yfe()
- }, (n) => /*#__PURE__*/ P.createElement(Qfe, {
+}, ope = /*#__PURE__*/ (0, P.createContext)(null), hz = /*#__PURE__*/ (0, P.createContext)(null), spe = /*#__PURE__*/ (0, P.forwardRef)(function(e, t) {
+ return [e, t] = wI(e, t, ope), /*#__PURE__*/ P.createElement(mS, {
+ content: /*#__PURE__*/ P.createElement(xS, e),
+ createCollection: () => new ape()
+ }, (n) => /*#__PURE__*/ P.createElement(cpe, {
props: e,
collection: n,
treeRef: t
}));
-}), uz = {
+}), gz = {
expand: {
ltr: "ArrowRight",
rtl: "ArrowLeft"
@@ -41014,17 +41057,17 @@ var cz = /*#__PURE__*/ (0, P.createContext)({}), Gfe = (e) => {
rtl: "ArrowRight"
}
};
-function Qfe({ props: e, collection: t, treeRef: n }) {
- let { dragAndDropHooks: r } = e, { direction: i } = IS(), a = NT({
+function cpe({ props: e, collection: t, treeRef: n }) {
+ let { dragAndDropHooks: r } = e, { direction: i } = US(), a = BT({
usage: "search",
sensitivity: "base"
}), o = !!r?.useDraggableCollectionState, s = !!r?.useDroppableCollectionState, c = (0, P.useRef)(o), l = (0, P.useRef)(s);
(0, P.useEffect)(() => {
c.current !== o && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), l.current !== s && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
}, [o, s]);
- let { selectionMode: u = "none", expandedKeys: d, defaultExpandedKeys: f, onExpandedChange: p, disabledBehavior: m = "all" } = e, { CollectionRoot: h, isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v } = (0, P.useContext)(OI), [y, b] = fw(d ? new Set(d) : void 0, f ? new Set(f) : /* @__PURE__ */ new Set(), p), [x, S] = (0, P.useState)(t), [C, w] = (0, P.useState)(y), [T, E] = (0, P.useState)(() => t.withExpandedKeys(C, y));
- ape(C, y) && t === x || (E(t.withExpandedKeys(C, y)), S(t), w(y));
- let D = cR({
+ let { selectionMode: u = "none", expandedKeys: d, defaultExpandedKeys: f, onExpandedChange: p, disabledBehavior: m = "all" } = e, { CollectionRoot: h, isVirtualized: g, layoutDelegate: _, dropTargetDelegate: v } = (0, P.useContext)(PI), [y, b] = yw(d ? new Set(d) : void 0, f ? new Set(f) : /* @__PURE__ */ new Set(), p), [x, S] = (0, P.useState)(t), [C, w] = (0, P.useState)(y), [T, E] = (0, P.useState)(() => t.withExpandedKeys(C, y));
+ hpe(C, y) && t === x || (E(t.withExpandedKeys(C, y)), S(t), w(y));
+ let D = mR({
...e,
selectionMode: u,
expandedKeys: y,
@@ -41032,7 +41075,7 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
collection: T,
children: void 0,
disabledBehavior: m
- }), { gridProps: O } = Hoe({
+ }), { gridProps: O } = Xoe({
...e,
isVirtualized: g,
layoutDelegate: _
@@ -41046,7 +41089,7 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
let e = r.DragPreview;
ee = r.renderDragPreview ? /*#__PURE__*/ P.createElement(e, { ref: te }, r.renderDragPreview) : null;
}
- let [ne] = (0, P.useState)(() => new IR());
+ let [ne] = (0, P.useState)(() => new HR());
if (s && r) {
A = r.useDroppableCollectionState({
collection: D.collection,
@@ -41054,7 +41097,7 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
});
let e = r.dropTargetDelegate || v || new r.ListDropTargetDelegate(D.collection, n, { direction: i });
ne.setup(e, D, i);
- let t = new Fw({
+ let t = new Hw({
collection: D.collection,
collator: a,
ref: n,
@@ -41076,12 +41119,12 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
let t = A?.target;
if (t && t.type === "item" && t.dropPosition === "on") {
let n = D.collection.getItem(t.key);
- (e.key === uz.expand[i] && n?.hasChildNodes && !D.expandedKeys.has(t.key) || e.key === uz.collapse[i] && n?.hasChildNodes && D.expandedKeys.has(t.key)) && D.toggleKey(t.key);
+ (e.key === gz.expand[i] && n?.hasChildNodes && !D.expandedKeys.has(t.key) || e.key === gz.collapse[i] && n?.hasChildNodes && D.expandedKeys.has(t.key)) && D.toggleKey(t.key);
}
}
}, A, n), M = A.isDropTarget({ type: "root" });
}
- let N = !(!o || k?.isDisabled), { focusProps: re, isFocused: ie, isFocusVisible: F } = BT(), ae = {
+ let N = !(!o || k?.isDisabled), { focusProps: re, isFocused: ie, isFocusVisible: F } = qT(), ae = {
isEmpty: D.collection.size === 0,
isFocused: ie,
isFocusVisible: F,
@@ -41089,7 +41132,7 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
selectionMode: D.selectionManager.selectionMode,
allowsDragging: !!N,
state: D
- }, oe = gI({
+ }, oe = SI({
...e,
children: void 0,
defaultClassName: "react-aria-Tree",
@@ -41106,8 +41149,8 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
style: { display: "contents" }
}, r));
}
- let ce = WS(e, { global: !0 });
- return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(yC, null, /*#__PURE__*/ P.createElement(SI.div, {
+ let ce = ZS(e, { global: !0 });
+ return /*#__PURE__*/ P.createElement(P.Fragment, null, /*#__PURE__*/ P.createElement(EC, null, /*#__PURE__*/ P.createElement(OI.div, {
...K(ce, oe, O, re, j?.collectionProps),
ref: n,
slot: e.slot || void 0,
@@ -41117,54 +41160,54 @@ function Qfe({ props: e, collection: t, treeRef: n }) {
"data-focus-visible": F || void 0,
"data-selection-mode": D.selectionManager.selectionMode === "none" ? void 0 : D.selectionManager.selectionMode,
"data-allows-dragging": !!N || void 0
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [lz, D],
- [jL, {
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [hz, D],
+ [LL, {
dragAndDropHooks: r,
dragState: k,
dropState: A
}],
- [ML, { render: tpe }]
- ] }, s && /*#__PURE__*/ P.createElement(ipe, null), /*#__PURE__*/ P.createElement(IL, null, /*#__PURE__*/ P.createElement(h, {
+ [RL, { render: dpe }]
+ ] }, s && /*#__PURE__*/ P.createElement(mpe, null), /*#__PURE__*/ P.createElement(HL, null, /*#__PURE__*/ P.createElement(h, {
collection: D.collection,
- persistedKeys: PL(D.selectionManager, r, A),
+ persistedKeys: BL(D.selectionManager, r, A),
scrollRef: n,
- renderDropIndicator: NL(r, A)
+ renderDropIndicator: zL(r, A)
}))), se)), ee);
}
-var $fe = /*#__PURE__*/ uS(class extends pb {
+var lpe = /*#__PURE__*/ _S(class extends yb {
static {
this.type = "content";
}
}, function(e) {
- let t = (0, P.useContext)(dz), n = gI({
+ let t = (0, P.useContext)(_z), n = SI({
children: e.children,
values: t
});
- return /*#__PURE__*/ P.createElement(OI.Provider, { value: EI }, n.children);
-}), dz = /*#__PURE__*/ (0, P.createContext)(null), epe = /*#__PURE__*/ dS(class extends pb {
+ return /*#__PURE__*/ P.createElement(PI.Provider, { value: MI }, n.children);
+}), _z = /*#__PURE__*/ (0, P.createContext)(null), upe = /*#__PURE__*/ vS(class extends yb {
static {
this.type = "item";
}
}, (e, t, n) => {
- let r = (0, P.useContext)(lz);
- t = Zx(t);
- let { dragAndDropHooks: i, dragState: a, dropState: o } = (0, P.useContext)(jL), s = a && !(a.isDisabled || a.selectionManager.isDisabled(n.key)), { rowProps: c, gridCellProps: l, expandButtonProps: u, descriptionProps: d, ...f } = jk({
+ let r = (0, P.useContext)(hz);
+ t = iS(t);
+ let { dragAndDropHooks: i, dragState: a, dropState: o } = (0, P.useContext)(LL), s = a && !(a.isDisabled || a.selectionManager.isDisabled(n.key)), { rowProps: c, gridCellProps: l, expandButtonProps: u, descriptionProps: d, ...f } = Rk({
node: n,
shouldSelectOnPressUp: !!a,
focusMode: e.focusMode,
allowsArrowNavigation: e.allowsArrowNavigation
- }, r, t), p = c["aria-expanded"] === !0, m = e.hasChildItems || [...r.collection.getChildren(n.key)].length > 1, h = c["aria-level"] || 1, { hoverProps: g, isHovered: _ } = WT({
+ }, r, t), p = c["aria-expanded"] === !0, m = e.hasChildItems || [...r.collection.getChildren(n.key)].length > 1, h = c["aria-level"] || 1, { hoverProps: g, isHovered: _ } = ZT({
isDisabled: !f.allowsSelection && !f.hasAction && !s,
onHoverStart: e.onHoverStart,
onHoverChange: e.onHoverChange,
onHoverEnd: e.onHoverEnd
- }), { isFocusVisible: v, focusProps: y } = BT(), { isFocusVisible: b, focusProps: x } = BT({ within: !0 }), { checkboxProps: S } = Lae({ key: n.key }, r), C = null;
+ }), { isFocusVisible: v, focusProps: y } = qT(), { isFocusVisible: b, focusProps: x } = qT({ within: !0 }), { checkboxProps: S } = Gae({ key: n.key }, r), C = null;
a && i && (C = i.useDraggableItem({
key: n.key,
hasDragButton: !0
}, a));
- let w = null, T = (0, P.useRef)(null), E = (0, P.useRef)(null), D = (0, P.useRef)(null), { visuallyHiddenProps: O } = xw();
+ let w = null, T = (0, P.useRef)(null), E = (0, P.useRef)(null), D = (0, P.useRef)(null), { visuallyHiddenProps: O } = Ow();
o && i && (w = i.useDropIndicator({
target: {
type: "item",
@@ -41203,7 +41246,7 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
A,
M,
j
- ]), te = gI({
+ ]), te = SI({
...e,
id: void 0,
children: n.rendered,
@@ -41220,7 +41263,7 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
(0, P.useEffect)(() => {
a && ne.current;
}, []);
- let N = Sb({
+ let N = kb({
items: r.collection.getChildren(n.key),
children: (e) => {
switch (e.type) {
@@ -41230,7 +41273,7 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
default: throw Error("Unsupported element type in TreeRow: " + e.type);
}
}
- }), re = Bx(), ie = WS(e, { global: !0 });
+ }), re = qx(), ie = ZS(e, { global: !0 });
return delete ie.id, delete ie.onClick, /*#__PURE__*/ P.createElement(P.Fragment, null, w && !w.isHidden && /*#__PURE__*/ P.createElement("div", {
role: "row",
"aria-level": c["aria-level"],
@@ -41253,7 +41296,7 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
"aria-labelledby": `${re} ${c.id}`,
tabIndex: -1,
ref: D
- }))), /*#__PURE__*/ P.createElement(SI.div, {
+ }))), /*#__PURE__*/ P.createElement(OI.div, {
...K(ie, c, y, g, x, C?.dragProps),
...te,
ref: t,
@@ -41273,17 +41316,17 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
}, /*#__PURE__*/ P.createElement("div", {
...l,
style: { display: "contents" }
- }, /*#__PURE__*/ P.createElement(hI, { values: [
- [zI, { slots: {
- [mI]: {},
+ }, /*#__PURE__*/ P.createElement(xI, { values: [
+ [GI, { slots: {
+ [bI]: {},
selection: S
} }],
- [BI, { slots: {
- [mI]: {},
+ [KI, { slots: {
+ [bI]: {},
selection: S
} }],
- [MI, { slots: {
- [mI]: {},
+ [RI, { slots: {
+ [bI]: {},
chevron: {
...u,
ref: T
@@ -41294,13 +41337,13 @@ var $fe = /*#__PURE__*/ uS(class extends pb {
style: { pointerEvents: "none" }
}
} }],
- [dz, { ...ee }],
- [LL, { isSelected: f.isSelected }]
+ [_z, { ...ee }],
+ [UL, { isSelected: f.isSelected }]
] }, N))));
});
-uS(hb, function(e, t, n) {
- let { isVirtualized: r } = (0, P.useContext)(OI), i = (0, P.useContext)(lz), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = (0, P.useRef)(null);
- XL((0, P.useMemo)(() => ({
+_S(xb, function(e, t, n) {
+ let { isVirtualized: r } = (0, P.useContext)(PI), i = (0, P.useContext)(hz), { isLoading: a, onLoadMore: o, scrollOffset: s, ...c } = e, l = (0, P.useRef)(null);
+ nR((0, P.useMemo)(() => ({
onLoadMore: o,
collection: i?.collection,
sentinelRef: l,
@@ -41309,11 +41352,11 @@ uS(hb, function(e, t, n) {
o,
s,
i?.collection
- ]), l), t = Zx(t);
- let { rowProps: u, gridCellProps: d } = jk({ node: n }, i, t), f = u["aria-level"] || 1, p = {
+ ]), l), t = iS(t);
+ let { rowProps: u, gridCellProps: d } = Rk({ node: n }, i, t), f = u["aria-level"] || 1, p = {
role: "row",
"aria-level": u["aria-level"]
- }, m = gI({
+ }, m = SI({
...c,
id: void 0,
children: n.rendered,
@@ -41326,7 +41369,7 @@ uS(hb, function(e, t, n) {
width: 0,
height: 0
},
- inert: zL(!0)
+ inert: GL(!0)
}, /*#__PURE__*/ P.createElement("div", {
"data-testid": "loadMoreSentinel",
ref: l,
@@ -41335,9 +41378,9 @@ uS(hb, function(e, t, n) {
height: 1,
width: 1
}
- })), a && m.children && /*#__PURE__*/ P.createElement(SI.div, {
+ })), a && m.children && /*#__PURE__*/ P.createElement(OI.div, {
ref: t,
- ...K(WS(e), p),
+ ...K(ZS(e), p),
...m,
"data-level": f
}, /*#__PURE__*/ P.createElement("div", {
@@ -41345,12 +41388,12 @@ uS(hb, function(e, t, n) {
style: h
}, m.children)));
});
-function tpe(e, t) {
- t = Zx(t);
- let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(jL), i = (0, P.useRef)(null), { dropIndicatorProps: a, isHidden: o, isDropTarget: s } = n.useDropIndicator(e, r, i);
+function dpe(e, t) {
+ t = iS(t);
+ let { dragAndDropHooks: n, dropState: r } = (0, P.useContext)(LL), i = (0, P.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__*/ P.createElement(rpe, {
+ return /*#__PURE__*/ P.createElement(ppe, {
...e,
dropIndicatorProps: a,
isDropTarget: s,
@@ -41359,8 +41402,8 @@ function tpe(e, t) {
level: c
});
}
-function npe(e, t) {
- let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, { visuallyHiddenProps: s } = xw(), c = gI({
+function fpe(e, t) {
+ let { dropIndicatorProps: n, isDropTarget: r, buttonRef: i, level: a, ...o } = e, { visuallyHiddenProps: s } = Ow(), c = SI({
...o,
defaultClassName: "react-aria-DropIndicator",
defaultStyle: {
@@ -41369,7 +41412,7 @@ function npe(e, t) {
},
values: { isDropTarget: r }
});
- return /*#__PURE__*/ P.createElement(SI.div, {
+ return /*#__PURE__*/ P.createElement(OI.div, {
...c,
role: "row",
"aria-level": a,
@@ -41382,9 +41425,9 @@ function npe(e, t) {
ref: i
}), c.children));
}
-var rpe = /*#__PURE__*/ (0, P.forwardRef)(npe);
-function ipe() {
- let { dragAndDropHooks: e, dropState: t } = (0, P.useContext)(jL), n = (0, P.useRef)(null), { dropIndicatorProps: r } = e.useDropIndicator({ target: { type: "root" } }, t, n), i = t.isDropTarget({ type: "root" }), { visuallyHiddenProps: a } = xw();
+var ppe = /*#__PURE__*/ (0, P.forwardRef)(fpe);
+function mpe() {
+ let { dragAndDropHooks: e, dropState: t } = (0, P.useContext)(LL), n = (0, P.useRef)(null), { dropIndicatorProps: r } = e.useDropIndicator({ target: { type: "root" } }, t, n), i = t.isDropTarget({ type: "root" }), { visuallyHiddenProps: a } = Ow();
return !i && r["aria-hidden"] ? null : /*#__PURE__*/ P.createElement("div", {
role: "row",
"aria-hidden": r["aria-hidden"],
@@ -41396,13 +41439,13 @@ function ipe() {
ref: n
})));
}
-function ape(e, t) {
+function hpe(e, t) {
if (e.size !== t.size) return !1;
for (let n of e) if (!t.has(n)) return !1;
return !0;
}
// node_modules/@remixicon/react/index.mjs
-var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+var gpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41410,7 +41453,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), spe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z" })), _pe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41418,7 +41461,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), fz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), vz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41426,7 +41469,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), pz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), yz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41434,7 +41477,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), mz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), bz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41442,7 +41485,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), cpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), vpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41450,7 +41493,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), lpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), ype = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41458,7 +41501,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), upe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z" })), bpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41466,7 +41509,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M5 2H19C19.5523 2 20 2.44772 20 3V22.1433C20 22.4194 19.7761 22.6434 19.5 22.6434C19.4061 22.6434 19.314 22.6168 19.2344 22.5669L12 18.0313L4.76559 22.5669C4.53163 22.7136 4.22306 22.6429 4.07637 22.4089C4.02647 22.3293 4 22.2373 4 22.1433V3C4 2.44772 4.44772 2 5 2ZM18 4H6V19.4324L12 15.6707L18 19.4324V4Z" })), dpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M5 2H19C19.5523 2 20 2.44772 20 3V22.1433C20 22.4194 19.7761 22.6434 19.5 22.6434C19.4061 22.6434 19.314 22.6168 19.2344 22.5669L12 18.0313L4.76559 22.5669C4.53163 22.7136 4.22306 22.6429 4.07637 22.4089C4.02647 22.3293 4 22.2373 4 22.1433V3C4 2.44772 4.44772 2 5 2ZM18 4H6V19.4324L12 15.6707L18 19.4324V4Z" })), xpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41474,7 +41517,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M21 19H23V21H1V19H3V4C3 3.44772 3.44772 3 4 3H14C14.5523 3 15 3.44772 15 4V19H19V11H17V9H20C20.5523 9 21 9.44772 21 10V19ZM5 5V19H13V5H5ZM7 11H11V13H7V11ZM7 7H11V9H7V7Z" })), fpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M21 19H23V21H1V19H3V4C3 3.44772 3.44772 3 4 3H14C14.5523 3 15 3.44772 15 4V19H19V11H17V9H20C20.5523 9 21 9.44772 21 10V19ZM5 5V19H13V5H5ZM7 11H11V13H7V11ZM7 7H11V9H7V7Z" })), Spe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41482,7 +41525,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M9 1V3H15V1H17V3H21C21.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 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z" })), ppe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M9 1V3H15V1H17V3H21C21.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 3H7V1H9ZM20 11H4V19H20V11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z" })), Cpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41490,7 +41533,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711Z" })), mpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M7.29117 20.8242L2 22L3.17581 16.7088C2.42544 15.3056 2 13.7025 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C10.2975 22 8.6944 21.5746 7.29117 20.8242ZM7.58075 18.711L8.23428 19.0605C9.38248 19.6745 10.6655 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 13.3345 4.32549 14.6175 4.93949 15.7657L5.28896 16.4192L4.63416 19.3658L7.58075 18.711Z" })), wpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41498,7 +41541,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), hpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Tpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41506,7 +41549,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" })), gpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" })), Epe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41514,7 +41557,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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 20Z" })), _pe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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 20Z" })), Dpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41522,7 +41565,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), hz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), xz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41530,7 +41573,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), vpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41538,7 +41581,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 18.3137 20.3137 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 5.13401 8.13401 2 12 2ZM12 4C9.23858 4 7 6.23858 7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C19.2091 19 21 17.2091 21 15C21 12.79 19.21 11 17 11C15.233 11 13.7337 12.1457 13.2042 13.7347L11.3064 13.1021C12.1005 10.7185 14.35 9 17 9C17 6.23858 14.7614 4 12 4Z" })), ype = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M12 2C15.866 2 19 5.13401 19 9C19 9.11351 18.9973 9.22639 18.992 9.33857C21.3265 10.16 23 12.3846 23 15C23 18.3137 20.3137 21 17 21H7C3.68629 21 1 18.3137 1 15C1 12.3846 2.67346 10.16 5.00804 9.33857C5.0027 9.22639 5 9.11351 5 9C5 5.13401 8.13401 2 12 2ZM12 4C9.23858 4 7 6.23858 7 9C7 9.08147 7.00193 9.16263 7.00578 9.24344L7.07662 10.7309L5.67183 11.2252C4.0844 11.7837 3 13.2889 3 15C3 17.2091 4.79086 19 7 19H17C19.2091 19 21 17.2091 21 15C21 12.79 19.21 11 17 11C15.233 11 13.7337 12.1457 13.2042 13.7347L11.3064 13.1021C12.1005 10.7185 14.35 9 17 9C17 6.23858 14.7614 4 12 4Z" })), kpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41546,7 +41589,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), bpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Ape = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41554,7 +41597,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), xpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), jpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41562,7 +41605,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Spe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Mpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41570,7 +41613,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), gz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Sz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41578,7 +41621,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Cpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Npe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41586,7 +41629,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), wpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Ppe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41594,7 +41637,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" })), Tpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M6.9998 6V3C6.9998 2.44772 7.44752 2 7.9998 2H19.9998C20.5521 2 20.9998 2.44772 20.9998 3V17C20.9998 17.5523 20.5521 18 19.9998 18H16.9998V20.9991C16.9998 21.5519 16.5499 22 15.993 22H4.00666C3.45059 22 3 21.5554 3 20.9991L3.0026 7.00087C3.0027 6.44811 3.45264 6 4.00942 6H6.9998ZM5.00242 8L5.00019 20H14.9998V8H5.00242ZM8.9998 6H16.9998V16H18.9998V4H8.9998V6Z" })), Fpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41602,7 +41645,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z" })), Epe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M9 2.00318V2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8L9 2.00318ZM5.82918 8H9V4.83086L5.82918 8ZM11 4V9C11 9.55228 10.5523 10 10 10H5V20H19V4H11Z" })), Ipe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41610,7 +41653,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H13V17H8V15Z" })), Dpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H13V17H8V15Z" })), Lpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41618,7 +41661,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z" })), Ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 7H16V9H8V7ZM8 11H16V13H8V11ZM8 15H16V17H8V15Z" })), Rpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41626,7 +41669,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), _z = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z" })), Cz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41634,7 +41677,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 7V19H20V7H4Z" })), vz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 7V19H20V7H4Z" })), wz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41642,7 +41685,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M3 21C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H20C20.5523 5 21 5.44772 21 6V9H19V7H11.5858L9.58579 5H4V16.998L5.5 11H22.5L20.1894 20.2425C20.0781 20.6877 19.6781 21 19.2192 21H3ZM19.9384 13H7.06155L5.56155 19H18.4384L19.9384 13Z" })), kpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M3 21C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5H20C20.5523 5 21 5.44772 21 6V9H19V7H11.5858L9.58579 5H4V16.998L5.5 11H22.5L20.1894 20.2425C20.0781 20.6877 19.6781 21 19.2192 21H3ZM19.9384 13H7.06155L5.56155 19H18.4384L19.9384 13Z" })), zpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41650,7 +41693,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 5V19H20V7H11.5858L9.58579 5H4ZM8.59114 13.8089C8.52934 13.5486 8.49663 13.277 8.49663 12.9978C8.49663 12.7186 8.52933 12.4471 8.59112 12.1868L7.59998 11.6146L8.59949 9.88335L9.59133 10.456C9.98424 10.0843 10.4633 9.80275 10.9954 9.64438V8.5H12.9944V9.64438C13.5265 9.80274 14.0056 10.0843 14.3985 10.4559L15.3904 9.88325L16.39 11.6145L15.3987 12.1867C15.4605 12.447 15.4932 12.7186 15.4932 12.9978C15.4932 13.277 15.4605 13.5485 15.3987 13.8088L16.39 14.3811L15.3905 16.1123L14.3986 15.5396C14.0057 15.9113 13.5266 16.1928 12.9945 16.3512V17.4956H10.9955V16.3513C10.4634 16.1929 9.98434 15.9114 9.59141 15.5397L8.59954 16.1124L7.59998 14.3812L8.59114 13.8089ZM11.9949 14.4971C12.8229 14.4971 13.4942 13.8258 13.4942 12.9978C13.4942 12.1698 12.8229 11.4985 11.9949 11.4985C11.1669 11.4985 10.4957 12.1698 10.4957 12.9978C10.4957 13.8258 11.1669 14.4971 11.9949 14.4971Z" })), yz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M12.4142 5H21C21.5523 5 22 5.44772 22 6V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H10.4142L12.4142 5ZM4 5V19H20V7H11.5858L9.58579 5H4ZM8.59114 13.8089C8.52934 13.5486 8.49663 13.277 8.49663 12.9978C8.49663 12.7186 8.52933 12.4471 8.59112 12.1868L7.59998 11.6146L8.59949 9.88335L9.59133 10.456C9.98424 10.0843 10.4633 9.80275 10.9954 9.64438V8.5H12.9944V9.64438C13.5265 9.80274 14.0056 10.0843 14.3985 10.4559L15.3904 9.88325L16.39 11.6145L15.3987 12.1867C15.4605 12.447 15.4932 12.7186 15.4932 12.9978C15.4932 13.277 15.4605 13.5485 15.3987 13.8088L16.39 14.3811L15.3905 16.1123L14.3986 15.5396C14.0057 15.9113 13.5266 16.1928 12.9945 16.3512V17.4956H10.9955V16.3513C10.4634 16.1929 9.98434 15.9114 9.59141 15.5397L8.59954 16.1124L7.59998 14.3812L8.59114 13.8089ZM11.9949 14.4971C12.8229 14.4971 13.4942 13.8258 13.4942 12.9978C13.4942 12.1698 12.8229 11.4985 11.9949 11.4985C11.1669 11.4985 10.4957 12.1698 10.4957 12.9978C10.4957 13.8258 11.1669 14.4971 11.9949 14.4971Z" })), Tz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41658,7 +41701,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), bz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Ez = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41666,7 +41709,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Ape = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Bpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41674,7 +41717,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), jpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Vpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41682,7 +41725,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Mpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Hpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41690,7 +41733,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Npe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Upe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41698,7 +41741,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Ppe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Wpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41706,7 +41749,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), xz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Dz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41714,7 +41757,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Fpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Gpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41722,7 +41765,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z" })), Ipe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M18.3638 15.5355L16.9496 14.1213L18.3638 12.7071C20.3164 10.7545 20.3164 7.58866 18.3638 5.63604C16.4112 3.68341 13.2453 3.68341 11.2927 5.63604L9.87849 7.05025L8.46428 5.63604L9.87849 4.22182C12.6122 1.48815 17.0443 1.48815 19.778 4.22182C22.5117 6.95549 22.5117 11.3876 19.778 14.1213L18.3638 15.5355ZM15.5353 18.364L14.1211 19.7782C11.3875 22.5118 6.95531 22.5118 4.22164 19.7782C1.48797 17.0445 1.48797 12.6123 4.22164 9.87868L5.63585 8.46446L7.05007 9.87868L5.63585 11.2929C3.68323 13.2455 3.68323 16.4113 5.63585 18.364C7.58847 20.3166 10.7543 20.3166 12.7069 18.364L14.1211 16.9497L15.5353 18.364ZM14.8282 7.75736L16.2425 9.17157L9.17139 16.2426L7.75717 14.8284L14.8282 7.75736Z" })), Kpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41730,7 +41773,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" })), Sz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" })), Oz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41738,7 +41781,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })), Cz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M6 5H8V19H6V5ZM16 5H18V19H16V5Z" })), kz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41746,7 +41789,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), wz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Az = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41754,7 +41797,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Tz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), jz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41762,7 +41805,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Lpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), qpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41770,7 +41813,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Ez = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Mz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41778,7 +41821,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Rpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Jpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41786,7 +41829,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M3 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 3ZM8 5H4V19H8V5ZM10 5V19H20V5H10Z" })), zpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M3 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 3ZM8 5H4V19H8V5ZM10 5V19H20V5H10Z" })), Ype = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41794,7 +41837,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), Bpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M12.0006 18.26L4.94715 22.2082L6.52248 14.2799L0.587891 8.7918L8.61493 7.84006L12.0006 0.5L15.3862 7.84006L23.4132 8.7918L17.4787 14.2799L19.054 22.2082L12.0006 18.26ZM12.0006 15.968L16.2473 18.3451L15.2988 13.5717L18.8719 10.2674L14.039 9.69434L12.0006 5.27502L9.96214 9.69434L5.12921 10.2674L8.70231 13.5717L7.75383 18.3451L12.0006 15.968Z" })), Xpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41802,7 +41845,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Vpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Zpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41810,7 +41853,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Hpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Qpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41818,7 +41861,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Upe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), $pe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41826,7 +41869,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), Dz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.createElement("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" })), Nz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41834,7 +41877,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Oz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), Pz = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41842,7 +41885,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Wpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), eme = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41850,7 +41893,7 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
fill: e,
...r,
className: "remixicon " + (n || "")
-}, P.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" })), Gpe = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
+}, P.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" })), tme = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P.createElement("svg", {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg",
width: t,
@@ -41860,11 +41903,11 @@ var ope = ({ color: e = "currentColor", size: t = 24, className: n, ...r }) => P
className: "remixicon " + (n || "")
}, P.createElement("path", { d: "M4.50772 2.87597C4.57028 2.37554 4.99568 2 5.5 2H18.5C19.0043 2 19.4297 2.37554 19.4923 2.87597L20.9923 14.876C20.9974 14.9171 21 14.9585 21 15V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V15C3 14.9585 3.00258 14.9171 3.00772 14.876L4.50772 2.87597ZM6.38278 4L5.13278 14H18.8672L17.6172 4H6.38278ZM19 16H5V20H19V16ZM15 17H17V19H15V17ZM13 17H11V19H13V17Z" }));
// src/react/boardui/components/base/input/label.tsx
-function kz({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, F.jsxs)(jI, {
+function Fz({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, F.jsxs)(LI, {
"data-label": "true",
...a,
- className: sF("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
+ className: mF("flex cursor-default items-center gap-0.5", "text-body-medium text-text-primary", r),
children: [
i,
e && /* @__PURE__ */ (0, F.jsx)("span", {
@@ -41872,7 +41915,7 @@ function kz({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
className: "text-body-medium text-text-error-primary",
children: "*"
}),
- n && /* @__PURE__ */ (0, F.jsx)(Mpe, {
+ n && /* @__PURE__ */ (0, F.jsx)(Hpe, {
className: "size-4 shrink-0 text-foreground-icon-quaternary",
"aria-hidden": !0
})
@@ -41880,32 +41923,32 @@ function kz({ isRequired: e = !1, isInvalid: t, tooltip: n, className: r, childr
});
}
// src/react/boardui/components/base/input/hint-text.tsx
-function Az({ isInvalid: e = !1, className: t, ...n }) {
- return /* @__PURE__ */ (0, F.jsx)(Jue, {
+function Iz({ isInvalid: e = !1, className: t, ...n }) {
+ return /* @__PURE__ */ (0, F.jsx)(ide, {
slot: e ? "errorMessage" : "description",
...n,
- className: sF("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
+ className: mF("pt-px text-caption-1-medium text-text-secondary", e && "text-text-error-primary", t)
});
}
// src/react/boardui/components/base/input/input.tsx
-var jz = (0, P.createContext)({});
-function Mz({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
- return /* @__PURE__ */ (0, F.jsx)(jz.Provider, {
+var Lz = (0, P.createContext)({});
+function Rz({ size: e = "medium", fieldClassName: t, inputClassName: n, className: r, children: i, ...a }) {
+ return /* @__PURE__ */ (0, F.jsx)(Lz.Provider, {
value: {
size: e,
fieldClassName: t,
inputClassName: n
},
- children: /* @__PURE__ */ (0, F.jsx)(Jfe, {
+ children: /* @__PURE__ */ (0, F.jsx)(ipe, {
...a,
"data-input-size": e,
- className: sF("group flex h-max w-full flex-col items-start gap-1", r),
+ className: mF("group flex h-max w-full flex-col items-start gap-1", r),
children: i
})
});
}
-Mz.displayName = "TextField";
-var Nz = cF({
+Rz.displayName = "TextField";
+var zz = hF({
field: "relative flex w-full items-center rounded-2lg bg-background-tertiary-default text-foreground-icon-tertiary ring-2 ring-inset ring-transparent transition-[background-color,box-shadow,color] duration-[var(--input-transition-ms)] ease",
fieldSize: {
medium: "p-2",
@@ -41920,44 +41963,44 @@ var Nz = cF({
input: "min-w-0 flex-1 bg-transparent border-0 outline-none p-0 m-0 font-sans text-body-regular text-text-primary pl-1 placeholder:text-text-tertiary focus:placeholder:text-text-primary disabled:text-input-disabled-text disabled:placeholder:text-input-disabled-text disabled:cursor-not-allowed aria-invalid:placeholder:text-text-error-placeholder",
icon: "size-5 shrink-0"
});
-function Pz({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
- let l = (0, P.useContext)(jz), u = e ?? l.size ?? "medium", d = r != null;
- return /* @__PURE__ */ (0, F.jsx)(UI, {
+function Bz({ size: e, leadingIcon: t, trailingIcon: n, leadingAddon: r, fieldClassName: i, className: a, ref: o, groupRef: s, ...c }) {
+ let l = (0, P.useContext)(Lz), u = e ?? l.size ?? "medium", d = r != null;
+ return /* @__PURE__ */ (0, F.jsx)(YI, {
ref: s,
- className: ({ isFocusWithin: e, isHovered: t, isDisabled: n, isInvalid: r }) => sF(Nz.field, d ? Nz.fieldWithAddonSize[u] : Nz.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 }) => mF(zz.field, d ? zz.fieldWithAddonSize[u] : zz.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, F.jsxs)("div", {
- className: Nz.content,
+ className: zz.content,
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
- className: Nz.leftSection,
+ className: zz.leftSection,
children: [d ? r : t ? /* @__PURE__ */ (0, F.jsx)(t, {
- className: Nz.icon,
+ className: zz.icon,
"aria-hidden": !0
- }) : null, /* @__PURE__ */ (0, F.jsx)(ede, {
+ }) : null, /* @__PURE__ */ (0, F.jsx)(ude, {
ref: o,
...c,
- className: sF(Nz.input, l.inputClassName, a)
+ className: mF(zz.input, l.inputClassName, a)
})]
}), n ? /* @__PURE__ */ (0, F.jsx)(n, {
- className: Nz.icon,
+ className: zz.icon,
"aria-hidden": !0
}) : null]
})
});
}
-Pz.displayName = "InputBase";
-function Fz({ 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, F.jsx)(Mz, {
+Bz.displayName = "InputBase";
+function Vz({ 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, F.jsx)(Rz, {
...d,
className: u,
"aria-label": d["aria-label"] ?? (!e && typeof r == "string" ? r : void 0),
children: ({ isRequired: u, isInvalid: d }) => /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- e && /* @__PURE__ */ (0, F.jsx)(kz, {
+ e && /* @__PURE__ */ (0, F.jsx)(Fz, {
isRequired: u,
isInvalid: d,
tooltip: n,
children: e
}),
- /* @__PURE__ */ (0, F.jsx)(Pz, {
+ /* @__PURE__ */ (0, F.jsx)(Bz, {
ref: c,
groupRef: l,
placeholder: r,
@@ -41966,24 +42009,24 @@ function Fz({ label: e, hint: t, tooltip: n, placeholder: r, leadingIcon: i, tra
leadingAddon: o,
fieldClassName: s
}),
- t && /* @__PURE__ */ (0, F.jsx)(Az, {
+ t && /* @__PURE__ */ (0, F.jsx)(Iz, {
isInvalid: d,
children: t
})
] })
});
}
-Fz.displayName = "Input";
+Vz.displayName = "Input";
// src/react/components/modal-frame.tsx
-var Kpe = {
+var nme = {
"avatar-picker": "max-w-avatar-picker",
"cover-crop": "max-w-cover-crop",
form: "max-w-form-modal",
collections: "max-w-4xl"
};
-function Iz({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
- let { isFocusVisible: a } = Dx();
- return /* @__PURE__ */ (0, F.jsx)(CR, {
+function Hz({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
+ let { isFocusVisible: a } = Px();
+ return /* @__PURE__ */ (0, F.jsx)(kR, {
isOpen: e,
onOpenChange: t,
isDismissable: !0,
@@ -41991,11 +42034,11 @@ function Iz({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
"data-modal-kind": n,
"data-motion-instant": a || void 0,
className: "fixed inset-0 z-dialog flex items-center justify-center bg-scrim p-4",
- children: /* @__PURE__ */ (0, F.jsx)(Ide, {
+ children: /* @__PURE__ */ (0, F.jsx)(Kde, {
"data-modal-surface": "",
"data-modal-width": n,
- className: `flex max-h-full w-full ${Kpe[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
- children: /* @__PURE__ */ (0, F.jsx)(yR, {
+ className: `flex max-h-full w-full ${nme[n]} flex-col overflow-hidden rounded-2-5xl border border-separator-border bg-background-full shadow-dropdown`,
+ children: /* @__PURE__ */ (0, F.jsx)(TR, {
"aria-label": r,
className: "flex min-h-0 flex-col overflow-y-auto overscroll-contain outline-none",
children: i
@@ -42003,7 +42046,7 @@ function Iz({ isOpen: e, onOpenChange: t, width: n, label: r, children: i }) {
})
});
}
-function Lz({ children: e }) {
+function Uz({ children: e }) {
return /* @__PURE__ */ (0, F.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",
@@ -42011,12 +42054,12 @@ function Lz({ children: e }) {
});
}
// src/react/components/note.tsx
-function Rz({ tone: e, title: t, action: n, extra: r, children: i, actionLayout: a = "inline", className: o }) {
+function Wz({ tone: e, title: t, action: n, extra: r, children: i, actionLayout: a = "inline", className: o }) {
let s = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-note-layout": "",
- className: sF("flex gap-3", a === "inline" ? "flex-wrap items-center justify-between" : "flex-col items-start"),
+ className: mF("flex gap-3", a === "inline" ? "flex-wrap items-center justify-between" : "flex-col items-start"),
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
- className: sF("flex min-w-0 flex-auto flex-col justify-center gap-0.5", a === "below" && "w-full"),
+ className: mF("flex min-w-0 flex-auto flex-col justify-center gap-0.5", a === "below" && "w-full"),
children: [t ? /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-medium wrap-anywhere",
children: t
@@ -42033,37 +42076,37 @@ function Rz({ tone: e, title: t, action: n, extra: r, children: i, actionLayout:
switch (e) {
case "info": return /* @__PURE__ */ (0, F.jsx)("div", {
role: "status",
- className: sF("@container flex flex-col gap-2 rounded-2lg bg-notification-information-background px-3 py-2 text-notification-information-foreground", o),
+ className: mF("@container flex flex-col gap-2 rounded-2lg bg-notification-information-background px-3 py-2 text-notification-information-foreground", o),
children: s
});
case "success": return /* @__PURE__ */ (0, F.jsx)("div", {
role: "status",
- className: sF("@container flex flex-col gap-2 rounded-2lg bg-notification-success-background px-3 py-2 text-notification-success-foreground", o),
+ className: mF("@container flex flex-col gap-2 rounded-2lg bg-notification-success-background px-3 py-2 text-notification-success-foreground", o),
children: s
});
case "warning": return /* @__PURE__ */ (0, F.jsx)("div", {
role: "note",
- className: sF("@container flex flex-col gap-2 rounded-2lg bg-status-yellow-background px-3 py-2 text-status-yellow-text", o),
+ className: mF("@container flex flex-col gap-2 rounded-2lg bg-status-yellow-background px-3 py-2 text-status-yellow-text", o),
children: s
});
case "error": return /* @__PURE__ */ (0, F.jsx)("div", {
role: "alert",
- className: sF("@container flex flex-col gap-2 rounded-2lg bg-background-tertiary-error px-3 py-2 text-text-error-primary", o),
+ className: mF("@container flex flex-col gap-2 rounded-2lg bg-background-tertiary-error px-3 py-2 text-text-error-primary", o),
children: s
});
default: return /* @__PURE__ */ (0, F.jsx)("div", {
role: "note",
- className: sF("@container flex flex-col gap-2 rounded-2lg bg-background-tertiary-default px-3 py-2 text-text-secondary", o),
+ className: mF("@container flex flex-col gap-2 rounded-2lg bg-background-tertiary-default px-3 py-2 text-text-secondary", o),
children: s
});
}
}
// src/react/components/empty-state.tsx
-var qpe = {
+var rme = {
standard: "min-h-80 px-6 py-12",
compact: "min-h-60 px-4 py-6"
};
-function Jpe({ target: e, children: t }) {
+function ime({ target: e, children: t }) {
return /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
variant: "secondary",
@@ -42071,11 +42114,11 @@ function Jpe({ target: e, children: t }) {
children: t
});
}
-function zz({ icon: e, title: t, actions: n, children: r, size: i = "standard" }) {
+function Gz({ icon: e, title: t, actions: n, children: r, size: i = "standard" }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-empty-state": "",
"data-empty-size": i,
- className: `flex min-w-0 max-w-full flex-col items-center justify-center gap-2 rounded-floating border border-separator-border bg-background-secondary-default text-center ${qpe[i]}`,
+ className: `flex min-w-0 max-w-full flex-col items-center justify-center gap-2 rounded-floating border border-separator-border bg-background-secondary-default text-center ${rme[i]}`,
children: [
/* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
@@ -42101,11 +42144,11 @@ function zz({ icon: e, title: t, actions: n, children: r, size: i = "standard" }
});
}
// src/react/components/sprite-glyph.tsx
-var Bz = /* @__PURE__ */ new Map();
-function Vz(e) {
- let t = Bz.get(e);
+var Kz = /* @__PURE__ */ new Map();
+function qz(e) {
+ let t = Kz.get(e);
if (t) return t;
- let { wide: n, viewBox: r } = rn(e), i = n ? ({ className: t }) => /* @__PURE__ */ (0, F.jsx)("svg", {
+ let { wide: n, viewBox: r } = yn(e), i = n ? ({ className: t }) => /* @__PURE__ */ (0, F.jsx)("svg", {
"aria-hidden": !0,
viewBox: r,
className: `iconwide shrink-0 fill-current ${t ?? "h-4 w-auto"}`,
@@ -42119,10 +42162,10 @@ function Vz(e) {
className: `shrink-0 stroke-current stroke-2 ${t ?? "size-4"}`,
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
- return i.displayName = `SpriteGlyph(${e})`, Bz.set(e, i), i;
+ return i.displayName = `SpriteGlyph(${e})`, Kz.set(e, i), i;
}
// src/react/components/settings-dialog-close.tsx
-function Hz({ label: e, id: t, onPress: n }) {
+function Jz({ label: e, id: t, onPress: n }) {
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
id: t,
@@ -42137,60 +42180,60 @@ function Hz({ label: e, id: t, onPress: n }) {
});
}
// src/react/settings/busy-props.ts
-function Uz(e) {
+function Yz(e) {
return e ? {
"aria-busy": !0,
"aria-disabled": !0
} : {};
}
// src/react/library-shortcuts/library-shortcuts.ts
-var Wz = ["library-shortcuts"], Gz = "/api/library-shortcuts";
-function Kz(e = !0) {
+var Xz = ["library-shortcuts"], Zz = "/api/library-shortcuts";
+function Qz(e = !0) {
return Pt({
- queryKey: Wz,
- queryFn: ({ signal: e }) => B(Gz, e),
+ queryKey: Xz,
+ queryFn: ({ signal: e }) => B(Zz, e),
enabled: e,
refetchOnMount: e ? "always" : !1
});
}
-function qz() {
+function $z() {
return Ft({
- mutationKey: Wz,
- mutationFn: (e) => V(Gz, e),
+ mutationKey: Xz,
+ mutationFn: (e) => V(Zz, e),
onSuccess: (e, t) => {
- H.setQueryData(Wz, e), t.action === "favorite" && t.scope === "online" && (H.invalidateQueries({ queryKey: ["follow", "tags"] }), H.invalidateQueries({ queryKey: ["tag-management"] }));
+ H.setQueryData(Xz, e), t.action === "favorite" && t.scope === "online" && (H.invalidateQueries({ queryKey: ["follow", "tags"] }), H.invalidateQueries({ queryKey: ["tag-management"] }));
}
});
}
-function Jz(e, t) {
+function eB(e, t) {
return e.some((e) => t.scope === "online" ? e.scope === "online" && e.tag_id === t.tag_id : e.scope !== "online" && (t.entity_id ? e.entity_id === t.entity_id : e.kind === t.kind && e.name === t.name));
}
-function Ype(e) {
- return e.scope === "online" ? `/follow?${new URLSearchParams({ tag: e.name })}` : hn(e.kind, e.name, e.entity_id);
+function ame(e) {
+ return e.scope === "online" ? `/follow?${new URLSearchParams({ tag: e.name })}` : An(e.kind, e.name, e.entity_id);
}
// src/react/library-shortcuts/shortcut-controls.tsx
-var Yz = Vz("star"), Xpe = Vz("bookmark-plus"), Xz = Vz("chevron-right"), Zz = {
+var tB = qz("star"), ome = qz("bookmark-plus"), nB = qz("chevron-right"), rB = {
performer: "艺人",
creator: "创作者",
studio: "片商与厂牌",
series: "系列",
agency: "事务所",
tag: "标签"
-}, Qz = {
- all: Vz("star"),
- performer: Vz("user-round"),
- creator: Vz("user-round"),
- studio: Vz("clapperboard"),
- series: Vz("film"),
- agency: Vz("briefcase"),
- tag: Vz("tags"),
- filters: Vz("list-filter")
-}, $z = [
+}, iB = {
+ all: qz("star"),
+ performer: qz("user-round"),
+ creator: qz("user-round"),
+ studio: qz("clapperboard"),
+ series: qz("film"),
+ agency: qz("briefcase"),
+ tag: qz("tags"),
+ filters: qz("list-filter")
+}, aB = [
["all", "全部"],
- ...Object.entries(Zz),
+ ...Object.entries(rB),
["filters", "保存的筛选"]
];
-function eB({ label: e, children: t, ...n }) {
+function oB({ label: e, children: t, ...n }) {
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
...n,
@@ -42200,19 +42243,20 @@ function eB({ label: e, children: t, ...n }) {
children: t
});
}
-function tB({ item: e }) {
- return /* @__PURE__ */ (0, F.jsx)(Zpe, { item: e }, `${e.scope || "local"}:${e.kind}:${e.tag_id || e.entity_id}:${e.name}`);
+function sB({ item: e }) {
+ return /* @__PURE__ */ (0, F.jsx)(sme, { item: e }, `${e.scope || "local"}:${e.kind}:${e.tag_id || e.entity_id}:${e.name}`);
}
-function Zpe({ item: e }) {
- let t = Kz(!1), n = (0, P.useRef)(t.data), r = qz(), i = t.data && t.data !== n.current ? Jz(t.data.favorites || [], e) : e.favorite ?? (t.data ? Jz(t.data.favorites || [], e) : !1);
+function sme({ item: e }) {
+ tI();
+ let t = Qz(!1), n = (0, P.useRef)(t.data), r = $z(), i = t.data && t.data !== n.current ? eB(t.data.favorites || [], e) : e.favorite ?? (t.data ? eB(t.data.favorites || [], e) : !1);
return /* @__PURE__ */ (0, F.jsxs)("span", {
className: "inline-flex min-w-0 flex-col gap-1",
children: [
- /* @__PURE__ */ (0, F.jsx)(eB, {
+ /* @__PURE__ */ (0, F.jsx)(oB, {
"data-favorite": "",
"aria-pressed": !!i,
- label: `${i ? "取消收藏" : "收藏"}${e.name}`,
- ...Uz(r.isPending),
+ label: `${i ? "取消收藏" : "收藏"}${Qt(e.kind, e.name, e.entity_id)}`,
+ ...Yz(r.isPending),
onClick: () => {
r.isPending || r.mutate({
action: "favorite",
@@ -42222,12 +42266,12 @@ function Zpe({ item: e }) {
},
children: r.isPending ? /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
- dangerouslySetInnerHTML: { __html: xs("") }
- }) : /* @__PURE__ */ (0, F.jsx)(Yz, {})
+ dangerouslySetInnerHTML: { __html: Is("") }
+ }) : /* @__PURE__ */ (0, F.jsx)(tB, {})
}),
- r.isError ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ r.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(r.error)
+ children: ar(r.error)
}) : null,
t.isError ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -42239,50 +42283,51 @@ function Zpe({ item: e }) {
]
});
}
-function nB({ currentHref: e, kind: t }) {
+function cB({ currentHref: e, kind: t }) {
let [n, r] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
"data-shortcuts-entry": "",
- children: /* @__PURE__ */ (0, F.jsx)(nI, {
+ children: /* @__PURE__ */ (0, F.jsx)(cI, {
"data-shortcuts-trigger": "",
label: "我的收藏",
- icon: Yz,
+ icon: tB,
"aria-haspopup": "dialog",
"aria-expanded": n,
onPress: () => r(!0)
})
- }), /* @__PURE__ */ (0, F.jsx)(Iz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Hz, {
isOpen: n,
onOpenChange: r,
width: "collections",
label: "我的收藏",
- children: n ? /* @__PURE__ */ (0, F.jsx)(Qpe, {
+ children: n ? /* @__PURE__ */ (0, F.jsx)(cme, {
currentHref: e,
kind: t,
close: () => r(!1)
}) : null
})] });
}
-function Qpe({ currentHref: e, kind: t, close: n }) {
- let r = Kz(), i = qz(), [a, o] = (0, P.useState)(""), [s, c] = (0, P.useState)(t || "all"), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(""), p = (0, P.useId)(), [m, h] = (0, P.useState)(() => matchMedia("(max-width: 760px)").matches);
+function cme({ currentHref: e, kind: t, close: n }) {
+ tI();
+ let r = Qz(), i = $z(), [a, o] = (0, P.useState)(""), [s, c] = (0, P.useState)(t || "all"), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(""), p = (0, P.useId)(), [m, h] = (0, P.useState)(() => matchMedia("(max-width: 760px)").matches);
(0, P.useEffect)(() => {
let e = matchMedia("(max-width: 760px)"), t = () => h(e.matches);
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
}, []);
- let g = (0, P.useRef)(null), _ = (0, P.useRef)(null), v = (0, P.useRef)(s), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = (0, P.useRef)(null), S = dI(y, g, "[role=\"tab\"][aria-selected=\"true\"]", s, { axis: "y" });
+ let g = (0, P.useRef)(null), _ = (0, P.useRef)(null), v = (0, P.useRef)(s), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = (0, P.useRef)(null), S = _I(y, g, "[role=\"tab\"][aria-selected=\"true\"]", s, { axis: "y" });
(0, P.useLayoutEffect)(() => {
- b.current && (x.current = yo(b.current) || null);
+ b.current && (x.current = Po(b.current) || null);
}, []), (0, P.useLayoutEffect)(() => {
- let e = lc(g.current);
+ let e = wc(g.current);
return () => e?.destroy();
}, []), (0, P.useLayoutEffect)(() => {
b.current && (b.current.scrollTop = 0);
}, [s]), (0, P.useLayoutEffect)(() => {
- v.current !== s && Ps(_.current, "h2"), v.current = s;
+ v.current !== s && Ys(_.current, "h2"), v.current = s;
}, [s]), (0, P.useLayoutEffect)(() => {
x.current?.();
});
- let C = $z.find(([e]) => e === s)?.[1] || "全部", w = (e) => {
+ let C = aB.find(([e]) => e === s)?.[1] || "全部", w = (e) => {
let t = [...e.currentTarget.querySelectorAll("[role=\"tab\"]")], n = t.indexOf(e.target);
if (n < 0) return;
let r = e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : ["ArrowDown", "ArrowRight"].includes(e.key) ? (n + 1) % t.length : ["ArrowUp", "ArrowLeft"].includes(e.key) ? (n + t.length - 1) % t.length : -1;
@@ -42305,7 +42350,7 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
children: [/* @__PURE__ */ (0, F.jsx)("h2", {
className: "text-title-2-semibold text-text-primary",
children: C
- }), /* @__PURE__ */ (0, F.jsx)(Hz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Jz, {
label: "关闭我的收藏",
onPress: n
})]
@@ -42335,8 +42380,8 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
role: "presentation",
children: "我的收藏"
}),
- $z.map(([e, t]) => {
- let n = Qz[e] || Yz, r = e === "filters" ? E?.filters.length || 0 : (E?.favorites || []).filter((t) => e === "all" || t.kind === e).length;
+ aB.map(([e, t]) => {
+ let n = iB[e] || tB, r = e === "filters" ? E?.filters.length || 0 : (E?.favorites || []).filter((t) => e === "all" || t.kind === e).length;
return /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
role: "tab",
@@ -42368,17 +42413,17 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
href: "/flagged",
onClick: n,
children: [
- /* @__PURE__ */ (0, F.jsx)(Yz, { "aria-hidden": !0 }),
+ /* @__PURE__ */ (0, F.jsx)(tB, { "aria-hidden": !0 }),
"已标记",
- /* @__PURE__ */ (0, F.jsx)(Xz, { "aria-hidden": !0 })
+ /* @__PURE__ */ (0, F.jsx)(nB, { "aria-hidden": !0 })
]
}), /* @__PURE__ */ (0, F.jsxs)("a", {
href: "/watch-later",
onClick: n,
children: [
- /* @__PURE__ */ (0, F.jsx)(Xpe, { "aria-hidden": !0 }),
+ /* @__PURE__ */ (0, F.jsx)(ome, { "aria-hidden": !0 }),
"稍后看",
- /* @__PURE__ */ (0, F.jsx)(Xz, { "aria-hidden": !0 })
+ /* @__PURE__ */ (0, F.jsx)(nB, { "aria-hidden": !0 })
]
})]
})]
@@ -42397,25 +42442,25 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
"data-skeleton": "",
className: "h-12 animate-pulse rounded-lg bg-background-secondary-default"
}) : null,
- r.isError ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ r.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
onClick: () => void r.refetch(),
children: "立即重试"
}),
- children: Wn(r.error)
+ children: ar(r.error)
}) : null,
- i.isError ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ i.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(i.error)
+ children: ar(i.error)
}) : null,
E ? s === "filters" ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- E.filters.length ? null : /* @__PURE__ */ (0, F.jsx)(zz, {
+ E.filters.length ? null : /* @__PURE__ */ (0, F.jsx)(Gz, {
size: "compact",
- icon: Vz("list-filter"),
+ icon: qz("list-filter"),
title: "还没有保存的筛选",
- actions: /* @__PURE__ */ (0, F.jsx)(pI, {
+ actions: /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/",
onClick: n,
@@ -42434,7 +42479,7 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
variant: "secondary",
size: "small",
"aria-label": `删除筛选${e.name}`,
- ...Uz(i.isPending),
+ ...Yz(i.isPending),
onClick: () => {
i.isPending || i.mutate({
action: "delete_filter",
@@ -42449,7 +42494,7 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
className: "flex flex-col gap-3",
"aria-label": "保存当前筛选",
children: [
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "筛选名称",
value: a,
onChange: o,
@@ -42458,7 +42503,7 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
/* @__PURE__ */ (0, F.jsx)(q, {
type: "submit",
disabled: !a.trim(),
- ...Uz(i.isPending),
+ ...Yz(i.isPending),
children: "保存当前筛选"
}),
d ? /* @__PURE__ */ (0, F.jsx)("span", {
@@ -42469,16 +42514,16 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
]
}) : null
] }) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
"aria-label": "搜索收藏",
placeholder: "搜索收藏",
- leadingIcon: Vz("search"),
+ leadingIcon: qz("search"),
value: l,
onChange: u
}),
- D.length ? null : /* @__PURE__ */ (0, F.jsx)(zz, {
+ D.length ? null : /* @__PURE__ */ (0, F.jsx)(Gz, {
size: "compact",
- icon: Yz,
+ icon: tB,
title: l ? "没有匹配的收藏" : E.favorites.length ? "还没有此类收藏" : "还没有收藏",
actions: l ? /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
@@ -42488,7 +42533,7 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
size: "small",
onClick: () => c("all"),
children: "查看全部收藏"
- }) : /* @__PURE__ */ (0, F.jsx)(pI, {
+ }) : /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/",
onClick: n,
@@ -42502,25 +42547,25 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
"data-shortcuts-row": "",
className: "flex min-w-0 items-center justify-between gap-3",
children: [/* @__PURE__ */ (0, F.jsxs)("a", {
- href: Ype(e),
- "aria-label": e.name,
+ href: ame(e),
+ "aria-label": Qt(e.kind, e.name, e.entity_id),
onClick: n,
className: "flex min-w-0 flex-1 items-center gap-3 text-body-regular text-text-primary",
- children: [/* @__PURE__ */ (0, F.jsx)($pe, { item: e }, e.image_url), /* @__PURE__ */ (0, F.jsxs)("span", {
+ children: [/* @__PURE__ */ (0, F.jsx)(lme, { item: e }, e.image_url), /* @__PURE__ */ (0, F.jsxs)("span", {
className: "flex min-w-0 flex-col gap-1",
children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "truncate",
- children: e.name
+ children: Qt(e.kind, e.name, e.entity_id)
}), /* @__PURE__ */ (0, F.jsx)("span", {
className: "text-caption-1-regular text-text-secondary",
- children: e.scope === "online" ? "在线标签" : Zz[e.kind]
+ children: e.scope === "online" ? "在线标签" : rB[e.kind]
})]
})]
}), /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- "aria-label": `取消收藏${e.name}`,
- ...Uz(i.isPending),
+ "aria-label": `取消收藏${Qt(e.kind, e.name, e.entity_id)}`,
+ ...Yz(i.isPending),
onClick: () => {
i.isPending || i.mutate({
action: "favorite",
@@ -42538,8 +42583,8 @@ function Qpe({ currentHref: e, kind: t, close: n }) {
]
});
}
-function $pe({ item: e }) {
- let t = Qz[e.kind] || Yz;
+function lme({ item: e }) {
+ let t = iB[e.kind] || tB;
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-shortcuts-avatar": "",
title: e.image_label || e.name,
@@ -42557,19 +42602,19 @@ function $pe({ item: e }) {
});
}
// node_modules/react-router/dist/production/lib/router/url.js
-var eme = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, rB = /^[\\/]{2}/;
-function tme(e, t) {
+var ume = /^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i, lB = /^[\\/]{2}/;
+function dme(e, t) {
return t + e.replace(/\\/g, "/");
}
// node_modules/react-router/dist/production/lib/router/history.js
-var iB = "popstate";
-function aB(e) {
+var uB = "popstate";
+function dB(e) {
return typeof e == "object" && !!e && "pathname" in e && "search" in e && "hash" in e && "state" in e && "key" in e;
}
-function nme(e = {}) {
+function fme(e = {}) {
function t(e, t) {
let n = t.state?.masked, { pathname: r, search: i, hash: a } = n || e.location;
- return lB("", {
+ return hB("", {
pathname: r,
search: i,
hash: a
@@ -42580,14 +42625,14 @@ function nme(e = {}) {
} : void 0);
}
function n(e, t) {
- return typeof t == "string" ? t : uB(t);
+ return typeof t == "string" ? t : gB(t);
}
- return ime(t, n, null, e);
+ return mme(t, n, null, e);
}
-function oB(e, t) {
+function fB(e, t) {
if (e === !1 || e == null) throw Error(t);
}
-function sB(e, t) {
+function pB(e, t) {
if (!e) {
typeof console < "u" && console.warn(t);
try {
@@ -42595,10 +42640,10 @@ function sB(e, t) {
} catch {}
}
}
-function rme() {
+function pme() {
return Math.random().toString(36).substring(2, 10);
}
-function cB(e, t) {
+function mB(e, t) {
return {
usr: e.state,
key: e.key,
@@ -42610,21 +42655,21 @@ function cB(e, t) {
} : void 0
};
}
-function lB(e, t, n = null, r, i) {
+function hB(e, t, n = null, r, i) {
return {
pathname: typeof e == "string" ? e : e.pathname,
search: "",
hash: "",
- ...typeof t == "string" ? dB(t) : t,
+ ...typeof t == "string" ? _B(t) : t,
state: n,
- key: t && t.key || r || rme(),
+ key: t && t.key || r || pme(),
mask: i
};
}
-function uB({ pathname: e = "/", search: t = "", hash: n = "" }) {
+function gB({ pathname: e = "/", search: t = "", hash: n = "" }) {
return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
}
-function dB(e) {
+function _B(e) {
let t = {};
if (e) {
let n = e.indexOf("#");
@@ -42634,7 +42679,7 @@ function dB(e) {
}
return t;
}
-function ime(e, t, n, r = {}) {
+function mme(e, t, n, r = {}) {
let { window: i = document.defaultView, v5Compat: a = !1 } = r, o = i.history, s = "POP", c = null, l = u();
l ?? (l = 0, o.replaceState({
...o.state,
@@ -42654,9 +42699,9 @@ function ime(e, t, n, r = {}) {
}
function f(e, t) {
s = "PUSH";
- let r = aB(e) ? e : lB(h.location, e, t);
+ let r = dB(e) ? e : hB(h.location, e, t);
n && n(r, e), l = u() + 1;
- let d = cB(r, l), f = h.createHref(r.mask || r);
+ let d = mB(r, l), f = h.createHref(r.mask || r);
try {
o.pushState(d, "", f);
} catch (e) {
@@ -42671,9 +42716,9 @@ function ime(e, t, n, r = {}) {
}
function p(e, t) {
s = "REPLACE";
- let r = aB(e) ? e : lB(h.location, e, t);
+ let r = dB(e) ? e : hB(h.location, e, t);
n && n(r, e), l = u();
- let i = cB(r, l), d = h.createHref(r.mask || r);
+ let i = mB(r, l), d = h.createHref(r.mask || r);
o.replaceState(i, "", d), a && c && c({
action: s,
location: h.location,
@@ -42681,7 +42726,7 @@ function ime(e, t, n, r = {}) {
});
}
function m(e) {
- return ame(i, e);
+ return hme(i, e);
}
let h = {
get action() {
@@ -42692,8 +42737,8 @@ function ime(e, t, n, r = {}) {
},
listen(e) {
if (c) throw Error("A history only accepts one active listener");
- return i.addEventListener(iB, d), c = e, () => {
- i.removeEventListener(iB, d), c = null;
+ return i.addEventListener(uB, d), c = e, () => {
+ i.removeEventListener(uB, d), c = null;
};
},
createHref(e) {
@@ -42716,28 +42761,28 @@ function ime(e, t, n, r = {}) {
};
return h;
}
-function ame(e, t, n = !1) {
+function hme(e, t, n = !1) {
let r = "http://localhost";
- e && (r = e.location.origin === "null" ? e.location.href : e.location.origin), oB(r, "No window.location.(origin|href) available to create URL");
- let i = typeof t == "string" ? t : uB(t);
- return i = i.replace(/ $/, "%20"), !n && rB.test(i) && (i = r + i), new URL(i, r);
+ e && (r = e.location.origin === "null" ? e.location.href : e.location.origin), fB(r, "No window.location.(origin|href) available to create URL");
+ let i = typeof t == "string" ? t : gB(t);
+ return i = i.replace(/ $/, "%20"), !n && lB.test(i) && (i = r + i), new URL(i, r);
}
// node_modules/react-router/dist/production/lib/router/utils.js
-function ome(e, t, n = "/") {
- return sme(e, t, n, !1);
+function gme(e, t, n = "/") {
+ return _me(e, t, n, !1);
}
-function sme(e, t, n, r, i) {
- let a = vB((typeof t == "string" ? dB(t) : t).pathname || "/", n);
+function _me(e, t, n, r, i) {
+ let a = wB((typeof t == "string" ? _B(t) : t).pathname || "/", n);
if (a == null) return null;
- let o = i ?? cme(e), s = null, c = xme(a);
- for (let e = 0; s == null && e < o.length; ++e) s = bme(o[e], c, r);
+ let o = i ?? vme(e), s = null, c = jme(a);
+ for (let e = 0; s == null && e < o.length; ++e) s = Ame(o[e], c, r);
return s;
}
-function cme(e) {
- let t = fB(e);
- return lme(t), t;
+function vme(e) {
+ let t = vB(e);
+ return yme(t), t;
}
-function fB(e, t = [], n = [], r = "", i = !1) {
+function vB(e, t = [], n = [], r = "", i = !1) {
let a = (e, a, o = i, s) => {
let c = {
relativePath: s === void 0 ? e.path || "" : s,
@@ -42747,14 +42792,14 @@ function fB(e, t = [], n = [], r = "", i = !1) {
};
if (c.relativePath.startsWith("/")) {
if (!c.relativePath.startsWith(r) && o) return;
- oB(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
+ fB(c.relativePath.startsWith(r), `Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`), c.relativePath = c.relativePath.slice(r.length);
}
- let l = SB([r, c.relativePath]), u = n.concat(c);
- e.children && e.children.length > 0 && (oB(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), fB(e.children, t, u, l, o)), (e.path != null || e.index) && t.push({
+ let l = OB([r, c.relativePath]), u = n.concat(c);
+ e.children && e.children.length > 0 && (fB(e.index !== !0, `Index routes must not have child routes. Please remove all child routes from route path "${l}".`), vB(e.children, t, u, l, o)), (e.path != null || e.index) && t.push({
path: l,
- score: vme(l, e.index),
+ score: Ome(l, e.index),
routesMeta: u.map((e, t) => {
- let [n, r] = _B(e.relativePath, e.caseSensitive, t === u.length - 1);
+ let [n, r] = CB(e.relativePath, e.caseSensitive, t === u.length - 1);
return {
...e,
matcher: n,
@@ -42765,68 +42810,68 @@ function fB(e, t = [], n = [], r = "", i = !1) {
};
return e.forEach((e, t) => {
if (e.path === "" || !e.path?.includes("?")) a(e, t);
- else for (let n of pB(e.path)) a(e, t, !0, n);
+ else for (let n of yB(e.path)) a(e, t, !0, n);
}), t;
}
-function pB(e) {
+function yB(e) {
let t = e.split("/");
if (t.length === 0) return [];
let [n, ...r] = t, i = n.endsWith("?"), a = n.replace(/\?$/, "");
if (r.length === 0) return i ? [a, ""] : [a];
- let o = pB(r.join("/")), s = [];
+ let o = yB(r.join("/")), s = [];
return s.push(...o.map((e) => e === "" ? a : [a, e].join("/"))), i && s.push(...o), s.map((t) => e.startsWith("/") && t === "" ? "/" : t);
}
-function lme(e) {
- e.sort((e, t) => e.score === t.score ? yme(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
+function yme(e) {
+ e.sort((e, t) => e.score === t.score ? kme(e.routesMeta.map((e) => e.childrenIndex), t.routesMeta.map((e) => e.childrenIndex)) : t.score - e.score);
}
-var ume = /^:[\w-]+$/, dme = /^:[\w-]+/, fme = 3.5, pme = 3, mme = 2, hme = 1, gme = 10, _me = -2, mB = (e) => e === "*";
-function vme(e, t) {
+var bme = /^:[\w-]+$/, xme = /^:[\w-]+/, Sme = 3.5, Cme = 3, wme = 2, Tme = 1, Eme = 10, Dme = -2, bB = (e) => e === "*";
+function Ome(e, t) {
let n = e.split("/"), r = n.length;
- return n.some(mB) && (r += _me), t && (r += mme), n.filter((e) => !mB(e)).reduce((e, t) => e + (ume.test(t) ? pme : dme.test(t) ? fme : t === "" ? hme : gme), r);
+ return n.some(bB) && (r += Dme), t && (r += wme), n.filter((e) => !bB(e)).reduce((e, t) => e + (bme.test(t) ? Cme : xme.test(t) ? Sme : t === "" ? Tme : Eme), r);
}
-function yme(e, t) {
+function kme(e, t) {
return e.length === t.length && e.slice(0, -1).every((e, n) => e === t[n]) ? e[e.length - 1] - t[t.length - 1] : 0;
}
-function bme(e, t, n = !1) {
+function Ame(e, t, n = !1) {
let { routesMeta: r } = e, i = {}, a = "/", o = [];
for (let e = 0; e < r.length; ++e) {
let s = r[e], c = e === r.length - 1, l = a === "/" ? t : t.slice(a.length) || "/", u = {
path: s.relativePath,
caseSensitive: s.caseSensitive,
end: c
- }, d = s.matcher && s.compiledParams ? gB(u, l, s.matcher, s.compiledParams) : hB(u, l), f = s.route;
- if (!d && c && n && !r[r.length - 1].route.index && (d = hB({
+ }, d = s.matcher && s.compiledParams ? SB(u, l, s.matcher, s.compiledParams) : xB(u, l), f = s.route;
+ if (!d && c && n && !r[r.length - 1].route.index && (d = xB({
path: s.relativePath,
caseSensitive: s.caseSensitive,
end: !1
}, l)), !d) return null;
Object.assign(i, d.params), o.push({
params: i,
- pathname: SB([a, d.pathname]),
- pathnameBase: Eme(SB([a, d.pathnameBase])),
+ pathname: OB([a, d.pathname]),
+ pathnameBase: Ime(OB([a, d.pathnameBase])),
route: f
- }), d.pathnameBase !== "/" && (a = SB([a, d.pathnameBase]));
+ }), d.pathnameBase !== "/" && (a = OB([a, d.pathnameBase]));
}
return o;
}
-function hB(e, t) {
+function xB(e, t) {
typeof e == "string" && (e = {
path: e,
caseSensitive: !1,
end: !0
});
- let [n, r] = _B(e.path, e.caseSensitive, e.end);
- return gB(e, t, n, r);
+ let [n, r] = CB(e.path, e.caseSensitive, e.end);
+ return SB(e, t, n, r);
}
-function gB(e, t, n, r) {
+function SB(e, t, n, r) {
let i = t.match(n);
if (!i) return null;
- let a = i[0], o = CB(a, 1), s = i.slice(1);
+ let a = i[0], o = kB(a, 1), s = i.slice(1);
return {
params: r.reduce((e, { paramName: t, isOptional: n }, r) => {
if (t === "*") {
let e = s[r] || "";
- o = CB(a.slice(0, a.length - e.length), 1);
+ o = kB(a.slice(0, a.length - e.length), 1);
}
let i = s[r];
return e[t] = n && !i ? void 0 : (i || "").replace(/%2F/g, "/"), e;
@@ -42836,8 +42881,8 @@ function gB(e, t, n, r) {
pattern: e
};
}
-function _B(e, t = !1, n = !0) {
- sB(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
+function CB(e, t = !1, n = !0) {
+ pB(e === "*" || !e.endsWith("*") || e.endsWith("/*"), `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`);
let r = [], i = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (e, t, n, i, a) => {
if (r.push({
paramName: t,
@@ -42850,46 +42895,46 @@ function _B(e, t = !1, n = !0) {
}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g, "(?:/$1)?");
return e.endsWith("*") ? (r.push({ paramName: "*" }), i += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? i += "\\/*$" : e !== "" && e !== "/" && (i += "(?:(?=\\/|$))"), [new RegExp(i, t ? void 0 : "i"), r];
}
-function xme(e) {
+function jme(e) {
try {
return e.split("/").map((e) => decodeURIComponent(e).replace(/\//g, "%2F")).join("/");
} catch (t) {
- return sB(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
+ return pB(!1, `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`), e;
}
}
-function vB(e, t) {
+function wB(e, t) {
if (t === "/") return e;
if (!e.toLowerCase().startsWith(t.toLowerCase())) return null;
let n = t.endsWith("/") ? t.length - 1 : t.length, r = e.charAt(n);
return r && r !== "/" ? null : e.slice(n) || "/";
}
-function Sme(e, t = "/") {
- let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? dB(e) : e, a;
- return n ? (n = xB(n), a = n.startsWith("/") || n.startsWith("\\") ? yB(n.substring(1), "/") : yB(n, t)) : a = t, {
+function Mme(e, t = "/") {
+ let { pathname: n, search: r = "", hash: i = "" } = typeof e == "string" ? _B(e) : e, a;
+ return n ? (n = DB(n), a = n.startsWith("/") || n.startsWith("\\") ? TB(n.substring(1), "/") : TB(n, t)) : a = t, {
pathname: a,
- search: Dme(r),
- hash: Ome(i)
+ search: Lme(r),
+ hash: Rme(i)
};
}
-function yB(e, t) {
- let n = CB(t).split("/");
+function TB(e, t) {
+ let n = kB(t).split("/");
return e.split("/").forEach((e) => {
e === ".." ? n.length > 1 && n.pop() : e !== "." && n.push(e);
}), n.length > 1 ? n.join("/") : "/";
}
-function bB(e, t, n, r) {
+function EB(e, t, n, r) {
return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
}
-function Cme(e) {
+function Nme(e) {
return e.filter((e, t) => t === 0 || e.route.path && e.route.path.length > 0);
}
-function wme(e) {
- let t = Cme(e);
+function Pme(e) {
+ let t = Nme(e);
return t.map((e, n) => n === t.length - 1 ? e.pathname : e.pathnameBase);
}
-function Tme(e, t, n, r = !1) {
+function Fme(e, t, n, r = !1) {
let i;
- typeof e == "string" ? i = dB(e) : (i = { ...e }, oB(!i.pathname || !i.pathname.includes("?"), bB("?", "pathname", "search", i)), oB(!i.pathname || !i.pathname.includes("#"), bB("#", "pathname", "hash", i)), oB(!i.search || !i.search.includes("#"), bB("#", "search", "hash", i)));
+ typeof e == "string" ? i = _B(e) : (i = { ...e }, fB(!i.pathname || !i.pathname.includes("?"), EB("?", "pathname", "search", i)), fB(!i.pathname || !i.pathname.includes("#"), EB("#", "pathname", "hash", i)), fB(!i.search || !i.search.includes("#"), EB("#", "search", "hash", i)));
let a = e === "" || i.pathname === "", o = a ? "/" : i.pathname, s;
if (o == null) s = n;
else {
@@ -42901,16 +42946,16 @@ function Tme(e, t, n, r = !1) {
}
s = e >= 0 ? t[e] : "/";
}
- let c = Sme(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
+ let c = Mme(i, s), l = o && o !== "/" && o.endsWith("/"), u = (a || o === ".") && n.endsWith("/");
return !c.pathname.endsWith("/") && (l || u) && (c.pathname += "/"), c;
}
-var xB = (e) => e.replace(/[\\/]{2,}/g, "/"), SB = (e) => xB(e.join("/"));
-function CB(e, t = 0) {
+var DB = (e) => e.replace(/[\\/]{2,}/g, "/"), OB = (e) => DB(e.join("/"));
+function kB(e, t = 0) {
let n = e.length;
for (; n > t && e.charCodeAt(n - 1) === 47;) n--;
return n === e.length ? e : e.slice(0, n);
}
-var Eme = (e) => CB(e).replace(/^\/*/, "/"), Dme = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Ome = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, kme = class {
+var Ime = (e) => kB(e).replace(/^\/*/, "/"), Lme = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, Rme = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, zme = class {
status;
statusText;
data;
@@ -42920,26 +42965,26 @@ var Eme = (e) => CB(e).replace(/^\/*/, "/"), Dme = (e) => !e || e === "?" ? "" :
this.status = e, this.statusText = t || "", this.internal = r, n instanceof Error ? (this.data = n.toString(), this.error = n) : this.data = n;
}
};
-function Ame(e) {
+function Bme(e) {
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
}
-function jme(e) {
- return SB(e.map((e) => e.route.path).filter(Boolean)) || "/";
+function Vme(e) {
+ return OB(e.map((e) => e.route.path).filter(Boolean)) || "/";
}
-var wB = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
-function Mme(e, t) {
+var AB = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0;
+function Hme(e, t) {
let n = e;
- if (typeof n != "string" || !eme.test(n)) return {
+ if (typeof n != "string" || !ume.test(n)) return {
absoluteURL: void 0,
isExternal: !1,
to: n
};
let r = n, i = !1;
- if (wB) try {
- let e = new URL(window.location.href), r = rB.test(n) ? new URL(tme(n, e.protocol)) : new URL(n), a = vB(r.pathname, t);
+ if (AB) try {
+ let e = new URL(window.location.href), r = lB.test(n) ? new URL(dme(n, e.protocol)) : new URL(n), a = wB(r.pathname, t);
r.origin === e.origin && a != null ? n = a + r.search + r.hash : i = !0;
} catch {
- sB(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
+ pB(!1, `<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`);
}
return {
absoluteURL: r,
@@ -42948,44 +42993,44 @@ function Mme(e, t) {
};
}
// node_modules/react-router/dist/production/lib/router/navigation.js
-var TB = new URL("http://localhost");
-function EB(e) {
+var jB = new URL("http://localhost");
+function MB(e) {
if (e.createURL) return e.createURL("/");
try {
- return new URL(e.createHref("/"), TB);
+ return new URL(e.createHref("/"), jB);
} catch {
- return TB;
+ return jB;
}
}
-function DB(e, t) {
+function NB(e, t) {
return e.origin === t.origin && (e.origin !== "null" || e.protocol === t.protocol && e.host === t.host);
}
-function Nme(e, t) {
+function Ume(e, t) {
if (e.startsWith("//")) return !0;
let n = t.protocol.toLowerCase();
return e.toLowerCase().startsWith(n) ? t.host === "" || e.slice(n.length).startsWith("//") : !1;
}
-function OB(e, t, n, r) {
+function PB(e, t, n, r) {
let i = null;
try {
i = e == null ? null : new URL(e, n);
} catch {}
- let a = new URL(t, n), o = i != null && !DB(i, n), s = !DB(a, n);
+ let a = new URL(t, n), o = i != null && !NB(i, n), s = !NB(a, n);
if (r === "reject") {
if (o || s) throw Error("External navigation is not allowed");
- } else if (s && (i == null || !Nme(e, i) || !DB(i, a))) throw Error("External navigation is not allowed");
+ } else if (s && (i == null || !Ume(e, i) || !NB(i, a))) throw Error("External navigation is not allowed");
}
// node_modules/react-router/dist/production/lib/router/router.js
-var kB = [
+var FB = [
"POST",
"PUT",
"PATCH",
"DELETE"
];
-new Set(kB);
-var Pme = ["GET", ...kB];
-new Set(Pme);
-var Fme = [
+new Set(FB);
+var Wme = ["GET", ...FB];
+new Set(Wme);
+var Gme = [
"about:",
"blob:",
"chrome:",
@@ -42997,82 +43042,82 @@ var Fme = [
"filesystem:",
"javascript:"
];
-function Ime(e) {
+function Kme(e) {
try {
- return Fme.includes(new URL(e).protocol);
+ return Gme.includes(new URL(e).protocol);
} catch {
return !1;
}
}
// node_modules/react-router/dist/production/lib/context.js
-var AB = P.createContext(null);
-AB.displayName = "DataRouter";
-var Lme = P.createContext(null);
-Lme.displayName = "DataRouterState";
-var jB = P.createContext(null);
-jB.displayName = "DataRouterData";
-var Rme = P.createContext(null);
-Rme.displayName = "DataRouterNavigation";
-var zme = P.createContext(!1), Bme = P.createContext({ isTransitioning: !1 });
-Bme.displayName = "ViewTransition";
-var Vme = P.createContext(null);
-Vme.displayName = "Fetchers";
-var Hme = P.createContext(null);
-Hme.displayName = "Await";
-var MB = P.createContext(null);
-MB.displayName = "Navigation";
-var NB = P.createContext(null);
-NB.displayName = "Location";
-var PB = P.createContext({
+var IB = P.createContext(null);
+IB.displayName = "DataRouter";
+var qme = P.createContext(null);
+qme.displayName = "DataRouterState";
+var LB = P.createContext(null);
+LB.displayName = "DataRouterData";
+var Jme = P.createContext(null);
+Jme.displayName = "DataRouterNavigation";
+var Yme = P.createContext(!1), Xme = P.createContext({ isTransitioning: !1 });
+Xme.displayName = "ViewTransition";
+var Zme = P.createContext(null);
+Zme.displayName = "Fetchers";
+var Qme = P.createContext(null);
+Qme.displayName = "Await";
+var RB = P.createContext(null);
+RB.displayName = "Navigation";
+var zB = P.createContext(null);
+zB.displayName = "Location";
+var BB = P.createContext({
outlet: null,
matches: [],
isDataRoute: !1
});
-PB.displayName = "Route";
-var FB = P.createContext(!1);
-FB.displayName = "IsDataRoute";
-var IB = P.createContext(void 0);
-IB.displayName = "RouteId";
-var LB = P.createContext(null);
-LB.displayName = "RouteError";
+BB.displayName = "Route";
+var VB = P.createContext(!1);
+VB.displayName = "IsDataRoute";
+var HB = P.createContext(void 0);
+HB.displayName = "RouteId";
+var UB = P.createContext(null);
+UB.displayName = "RouteError";
// node_modules/react-router/dist/production/lib/errors.js
-var RB = "REACT_ROUTER_ERROR", Ume = "REDIRECT", Wme = "ROUTE_ERROR_RESPONSE";
-function Gme(e) {
- if (e.startsWith(`${RB}:${Ume}:{`)) try {
+var WB = "REACT_ROUTER_ERROR", $me = "REDIRECT", ehe = "ROUTE_ERROR_RESPONSE";
+function the(e) {
+ if (e.startsWith(`${WB}:${$me}:{`)) try {
let t = JSON.parse(e.slice(28));
if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string" && typeof t.location == "string" && typeof t.reloadDocument == "boolean" && typeof t.replace == "boolean") return t;
} catch {}
}
-function Kme(e) {
- if (e.startsWith(`${RB}:${Wme}:{`)) try {
+function nhe(e) {
+ if (e.startsWith(`${WB}:${ehe}:{`)) try {
let t = JSON.parse(e.slice(40));
- if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new kme(t.status, t.statusText, t.data);
+ if (typeof t == "object" && t && typeof t.status == "number" && typeof t.statusText == "string") return new zme(t.status, t.statusText, t.data);
} catch {}
}
// node_modules/react-router/dist/production/lib/hooks.js
-function zB() {
- return P.useContext(NB) != null;
+function GB() {
+ return P.useContext(zB) != null;
}
-function BB() {
- return oB(zB(), "useLocation() may be used only in the context of a <Router> component."), P.useContext(NB).location;
+function KB() {
+ return fB(GB(), "useLocation() may be used only in the context of a <Router> component."), P.useContext(zB).location;
}
-var VB = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
-function qme() {
- return P.useContext(FB) ? ahe() : Jme();
+var qB = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
+function rhe() {
+ return P.useContext(VB) ? hhe() : ihe();
}
-function Jme() {
- oB(zB(), "useNavigate() may be used only in the context of a <Router> component.");
- let e = P.useContext(AB), { basename: t, navigator: n } = P.useContext(MB), { matches: r } = P.useContext(PB), { pathname: i } = BB(), a = JSON.stringify(wme(r)), o = P.useRef(!1);
+function ihe() {
+ fB(GB(), "useNavigate() may be used only in the context of a <Router> component.");
+ let e = P.useContext(IB), { basename: t, navigator: n } = P.useContext(RB), { matches: r } = P.useContext(BB), { pathname: i } = KB(), a = JSON.stringify(Pme(r)), o = P.useRef(!1);
return P.useLayoutEffect(() => {
o.current = !0;
}), P.useCallback((r, s = {}) => {
- if (sB(o.current, VB), !o.current) return;
+ if (pB(o.current, qB), !o.current) return;
if (typeof r == "number") {
n.go(r);
return;
}
- let c = Tme(r, JSON.parse(a), i, s.relative === "path");
- e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : SB([t, c.pathname])), OB(typeof r == "string" ? r : uB(r), n.createHref(c), EB(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
+ let c = Fme(r, JSON.parse(a), i, s.relative === "path");
+ e == null && t !== "/" && (c.pathname = c.pathname === "/" ? t : OB([t, c.pathname])), PB(typeof r == "string" ? r : gB(r), n.createHref(c), MB(n), "reject"), (s.replace ? n.replace : n.push)(c, s.state, s);
}, [
t,
n,
@@ -43082,19 +43127,19 @@ function Jme() {
]);
}
P.createContext(null);
-function Yme(e, t) {
- return HB(e, t);
+function ahe(e, t) {
+ return JB(e, t);
}
-function HB(e, t, n) {
- oB(zB(), "useRoutes() may be used only in the context of a <Router> component.");
- let { navigator: r } = P.useContext(MB), { matches: i } = P.useContext(PB), a = i[i.length - 1], o = a ? a.params : {};
+function JB(e, t, n) {
+ fB(GB(), "useRoutes() may be used only in the context of a <Router> component.");
+ let { navigator: r } = P.useContext(RB), { matches: i } = P.useContext(BB), a = i[i.length - 1], o = a ? a.params : {};
a && a.pathname;
let s = a ? a.pathnameBase : "/";
a && a.route;
- let c = BB(), l;
+ let c = KB(), l;
if (t) {
- let e = typeof t == "string" ? dB(t) : t;
- oB(s === "/" || e.pathname?.startsWith(s), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`), l = e;
+ let e = typeof t == "string" ? _B(t) : t;
+ fB(s === "/" || e.pathname?.startsWith(s), `When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`), l = e;
} else l = c;
let u = l.pathname || "/", d = u;
if (s !== "/") {
@@ -43102,13 +43147,13 @@ function HB(e, t, n) {
d = "/" + u.replace(/^\//, "").split("/").slice(e.length).join("/");
}
let f;
- f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : ome(e, { pathname: d });
- let p = the(f && f.map((e) => Object.assign({}, e, {
+ f = n ? n.state.matches.length ? n.state.matches.map((e) => Object.assign(e, { route: n.manifest[e.route.id] || e.route })) : n.router.match(n.state.location) : gme(e, { pathname: d });
+ let p = dhe(f && f.map((e) => Object.assign({}, e, {
params: Object.assign({}, o, e.params),
- pathname: SB([s, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
- pathnameBase: e.pathnameBase === "/" ? s : SB([s, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
+ pathname: OB([s, r.encodeLocation ? r.encodeLocation(e.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathname]),
+ pathnameBase: e.pathnameBase === "/" ? s : OB([s, r.encodeLocation ? r.encodeLocation(e.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : e.pathnameBase])
})), i, n);
- return t && p ? /* @__PURE__ */ P.createElement(NB.Provider, { value: {
+ return t && p ? /* @__PURE__ */ P.createElement(zB.Provider, { value: {
location: {
pathname: "/",
search: "",
@@ -43121,14 +43166,14 @@ function HB(e, t, n) {
navigationType: "POP"
} }, p) : p;
}
-function Xme() {
- let e = ihe(), t = Ame(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
+function ohe() {
+ let e = mhe(), t = Bme(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null;
return /* @__PURE__ */ P.createElement(P.Fragment, null, /* @__PURE__ */ P.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ P.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ P.createElement("pre", { style: {
padding: "0.5rem",
backgroundColor: "rgba(200,200,200, 0.5)"
} }, n) : null, null);
}
-var Zme = /* @__PURE__ */ P.createElement(Xme, null), Qme = class extends P.Component {
+var she = /* @__PURE__ */ P.createElement(ohe, null), che = class extends P.Component {
constructor(e) {
super(e), this.state = {
location: e.location,
@@ -43136,7 +43181,7 @@ var Zme = /* @__PURE__ */ P.createElement(Xme, null), Qme = class extends P.Comp
error: e.error
};
}
- static contextType = zme;
+ static contextType = Yme;
static getDerivedStateFromError(e) {
return { error: e };
}
@@ -43157,30 +43202,30 @@ var Zme = /* @__PURE__ */ P.createElement(Xme, null), Qme = class extends P.Comp
render() {
let e = this.state.error;
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
- let t = Kme(e.digest);
+ let t = nhe(e.digest);
t && (e = t);
}
- let t = e === void 0 ? this.props.children : /* @__PURE__ */ P.createElement(PB.Provider, { value: this.props.routeContext }, /* @__PURE__ */ P.createElement(FB.Provider, { value: this.props.routeContext.isDataRoute }, /* @__PURE__ */ P.createElement(IB.Provider, { value: this.props.routeContext.matches[this.props.routeContext.matches.length - 1]?.route.id }, /* @__PURE__ */ P.createElement(LB.Provider, {
+ let t = e === void 0 ? this.props.children : /* @__PURE__ */ P.createElement(BB.Provider, { value: this.props.routeContext }, /* @__PURE__ */ P.createElement(VB.Provider, { value: this.props.routeContext.isDataRoute }, /* @__PURE__ */ P.createElement(HB.Provider, { value: this.props.routeContext.matches[this.props.routeContext.matches.length - 1]?.route.id }, /* @__PURE__ */ P.createElement(UB.Provider, {
value: e,
children: this.props.component
}))));
- return this.context ? /* @__PURE__ */ P.createElement($me, { error: e }, t) : t;
+ return this.context ? /* @__PURE__ */ P.createElement(lhe, { error: e }, t) : t;
}
-}, UB = /* @__PURE__ */ new WeakMap();
-function $me({ children: e, error: t }) {
- let { basename: n, navigator: r } = P.useContext(MB);
+}, YB = /* @__PURE__ */ new WeakMap();
+function lhe({ children: e, error: t }) {
+ let { basename: n, navigator: r } = P.useContext(RB);
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
- let e = Gme(t.digest);
+ let e = the(t.digest);
if (e) {
- let i = UB.get(t);
+ let i = YB.get(t);
if (i) throw i;
- let a = Mme(e.location, n), o = a.absoluteURL || a.to;
- if (OB(e.location, o, EB(r), "allow-explicit"), Ime(o)) throw Error("Invalid redirect location");
- if (wB && !UB.get(t)) {
+ let a = Hme(e.location, n), o = a.absoluteURL || a.to;
+ if (PB(e.location, o, MB(r), "allow-explicit"), Kme(o)) throw Error("Invalid redirect location");
+ if (AB && !YB.get(t)) {
if (a.isExternal || e.reloadDocument) window.location.href = o;
else {
let n = Promise.resolve().then(() => window.__reactRouterDataRouter.navigate(a.to, { replace: e.replace }));
- throw UB.set(t, n), n;
+ throw YB.set(t, n), n;
}
}
return /* @__PURE__ */ P.createElement("meta", {
@@ -43191,11 +43236,11 @@ function $me({ children: e, error: t }) {
}
return e;
}
-function ehe({ routeContext: e, match: t, children: n }) {
- let r = P.useContext(AB);
- return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ P.createElement(PB.Provider, { value: e }, /* @__PURE__ */ P.createElement(FB.Provider, { value: e.isDataRoute }, /* @__PURE__ */ P.createElement(IB.Provider, { value: t.route.id }, n)));
+function uhe({ routeContext: e, match: t, children: n }) {
+ let r = P.useContext(IB);
+ return r && r.static && r.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (r.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ P.createElement(BB.Provider, { value: e }, /* @__PURE__ */ P.createElement(VB.Provider, { value: e.isDataRoute }, /* @__PURE__ */ P.createElement(HB.Provider, { value: t.route.id }, n)));
}
-function the(e, t = [], n) {
+function dhe(e, t = [], n) {
let r = n?.state;
if (e == null) {
if (!r) return null;
@@ -43206,7 +43251,7 @@ function the(e, t = [], n) {
let i = e, a = r?.errors;
if (a != null) {
let e = i.findIndex((e) => e.route.id && a?.[e.route.id] !== void 0);
- oB(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`), i = i.slice(0, Math.min(i.length, e + 1));
+ fB(e >= 0, `Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`), i = i.slice(0, Math.min(i.length, e + 1));
}
let o = !1, s = -1;
if (n && r) {
@@ -43226,16 +43271,16 @@ function the(e, t = [], n) {
c(e, {
location: r.location,
params: r.matches?.[0]?.params ?? {},
- pattern: jme(r.matches),
+ pattern: Vme(r.matches),
errorInfo: t
});
} : void 0;
return i.reduceRight((e, n, c) => {
let u, d = !1, f = null, p = null;
- r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || Zme, o && (s < 0 && c === 0 ? (ohe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
+ r && (u = a && n.route.id ? a[n.route.id] : void 0, f = n.route.errorElement || she, o && (s < 0 && c === 0 ? (ghe("route-fallback", !1, "No `HydrateFallback` element provided to render during initial hydration"), d = !0, p = null) : s === c && (d = !0, p = n.route.hydrateFallbackElement || null)));
let m = t.concat(i.slice(0, c + 1)), h = () => {
let t;
- return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ P.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ P.createElement(ehe, {
+ return t = u ? f : d ? p : n.route.Component ? /* @__PURE__ */ P.createElement(n.route.Component, null) : n.route.element ? n.route.element : e, /* @__PURE__ */ P.createElement(uhe, {
match: n,
routeContext: {
outlet: e,
@@ -43245,7 +43290,7 @@ function the(e, t = [], n) {
children: t
});
};
- return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ P.createElement(Qme, {
+ return r && (n.route.ErrorBoundary || n.route.errorElement || c === 0) ? /* @__PURE__ */ P.createElement(che, {
location: r.location,
revalidation: r.revalidation,
component: f,
@@ -43260,50 +43305,50 @@ function the(e, t = [], n) {
}) : h();
}, null);
}
-function WB(e) {
+function XB(e) {
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
}
-function nhe(e) {
- let t = P.useContext(AB);
- return oB(t, WB(e)), t;
+function fhe(e) {
+ let t = P.useContext(IB);
+ return fB(t, XB(e)), t;
}
-function rhe(e) {
- let t = P.useContext(jB);
- return oB(t, WB(e)), t;
+function phe(e) {
+ let t = P.useContext(LB);
+ return fB(t, XB(e)), t;
}
-function GB(e) {
- let t = P.useContext(IB);
- return oB(t, `${e} can only be used on routes that contain a unique "id"`), t;
+function ZB(e) {
+ let t = P.useContext(HB);
+ return fB(t, `${e} can only be used on routes that contain a unique "id"`), t;
}
-function ihe() {
- let e = P.useContext(LB), t = rhe("useRouteError"), n = GB("useRouteError");
+function mhe() {
+ let e = P.useContext(UB), t = phe("useRouteError"), n = ZB("useRouteError");
return e === void 0 ? t.errors?.[n] : e;
}
-function ahe() {
- let { router: e } = nhe("useNavigate"), t = GB("useNavigate"), n = P.useRef(!1);
+function hhe() {
+ let { router: e } = fhe("useNavigate"), t = ZB("useNavigate"), n = P.useRef(!1);
return P.useLayoutEffect(() => {
n.current = !0;
}), P.useCallback(async (r, i = {}) => {
- sB(n.current, VB), n.current && (typeof r == "number" ? await e.navigate(r) : await e.navigate(r, {
+ pB(n.current, qB), n.current && (typeof r == "number" ? await e.navigate(r) : await e.navigate(r, {
fromRouteId: t,
...i
}));
}, [e, t]);
}
-var KB = {};
-function ohe(e, t, n) {
- !t && !KB[e] && (KB[e] = !0, sB(!1, n));
+var QB = {};
+function ghe(e, t, n) {
+ !t && !QB[e] && (QB[e] = !0, pB(!1, n));
}
// node_modules/react-router/dist/production/lib/dom/ssr/components.js
-var qB = P.createContext(void 0);
-qB.displayName = "FrameworkContext", P.memo(she);
-function she({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
- let a = P.useContext(AB);
- oB(a, "You must render this element inside a <DataRouterContext.Provider> element");
- let o = P.useContext(qB)?.routeDiscoveryRuntime;
+var $B = P.createContext(void 0);
+$B.displayName = "FrameworkContext", P.memo(_he);
+function _he({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
+ let a = P.useContext(IB);
+ fB(a, "You must render this element inside a <DataRouterContext.Provider> element");
+ let o = P.useContext($B)?.routeDiscoveryRuntime;
return P.useEffect(() => {
n.initialized && o?.markReady();
- }, [n.initialized, o]), HB(e, void 0, {
+ }, [n.initialized, o]), JB(e, void 0, {
router: a.router,
manifest: t,
state: n,
@@ -43311,11 +43356,11 @@ function she({ routes: e, manifest: t, state: n, isStatic: r, onError: i }) {
onError: i
});
}
-function JB(e) {
- oB(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.");
+function eV(e) {
+ fB(!1, "A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.");
}
-function che({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
- oB(!zB(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
+function vhe({ basename: e = "/", children: t = null, location: n, navigationType: r = "POP", navigator: i, static: a = !1, useTransitions: o }) {
+ fB(!GB(), "You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");
let s = e.replace(/^\/*/, "/"), c = P.useMemo(() => ({
basename: s,
navigator: i,
@@ -43328,9 +43373,9 @@ function che({ basename: e = "/", children: t = null, location: n, navigationTyp
a,
o
]);
- typeof n == "string" && (n = dB(n));
+ typeof n == "string" && (n = _B(n));
let { pathname: l = "/", search: u = "", hash: d = "", state: f = null, key: p = "default", mask: m } = n, h = P.useMemo(() => {
- let e = vB(l, s);
+ let e = wB(l, s);
return e == null ? null : {
location: {
pathname: e,
@@ -43352,27 +43397,27 @@ function che({ basename: e = "/", children: t = null, location: n, navigationTyp
r,
m
]);
- return sB(h != null, `<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`), h == null ? null : /* @__PURE__ */ P.createElement(MB.Provider, { value: c }, /* @__PURE__ */ P.createElement(NB.Provider, {
+ return pB(h != null, `<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`), h == null ? null : /* @__PURE__ */ P.createElement(RB.Provider, { value: c }, /* @__PURE__ */ P.createElement(zB.Provider, {
children: t,
value: h
}));
}
-function YB({ children: e, location: t }) {
- return Yme(XB(e), t);
+function tV({ children: e, location: t }) {
+ return ahe(nV(e), t);
}
P.Component;
-function XB(e, t = []) {
+function nV(e, t = []) {
let n = [];
return P.Children.forEach(e, (e, r) => {
if (!P.isValidElement(e)) return;
let i = [...t, r];
if (e.type === P.Fragment) {
- n.push.apply(n, XB(e.props.children, i));
+ n.push.apply(n, nV(e.props.children, i));
return;
}
- oB(e.type === JB, `[${typeof e.type == "string" ? e.type : e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);
+ fB(e.type === eV, `[${typeof e.type == "string" ? e.type : e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);
let a = e.props;
- oB(!a.index || !a.children, "An index route cannot have child routes.");
+ fB(!a.index || !a.children, "An index route cannot have child routes.");
let o = {
id: a.id || i.join("-"),
caseSensitive: a.caseSensitive,
@@ -43391,15 +43436,15 @@ function XB(e, t = []) {
handle: a.handle,
lazy: a.lazy
};
- a.children && (o.children = XB(a.children, i)), n.push(o);
+ a.children && (o.children = nV(a.children, i)), n.push(o);
}), n;
}
// src/react/components/board-navigation-link.tsx
-function lhe(e) {
+function yhe(e) {
return /* @__PURE__ */ (0, F.jsx)("a", { ...e });
}
// src/react/boardui/components/foundations/icons/chevrons.tsx
-function uhe(e) {
+function bhe(e) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 16 16",
fill: "none",
@@ -43413,7 +43458,7 @@ function uhe(e) {
})
});
}
-function dhe(e) {
+function xhe(e) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 12 12",
fill: "none",
@@ -43427,7 +43472,7 @@ function dhe(e) {
})
});
}
-function ZB(e) {
+function rV(e) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
fill: "none",
@@ -43440,55 +43485,55 @@ function ZB(e) {
});
}
// src/react/boardui/components/base/breadcrumb/breadcrumb.tsx
-function fhe({ children: e, "aria-label": t = "Breadcrumb", className: n, ref: r }) {
+function She({ children: e, "aria-label": t = "Breadcrumb", className: n, ref: r }) {
let i = P.Children.toArray(e).filter(P.isValidElement);
return /* @__PURE__ */ (0, F.jsx)("nav", {
ref: r,
"aria-label": t,
- className: sF("flex w-full items-center overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", n),
+ className: mF("flex w-full items-center overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", n),
children: /* @__PURE__ */ (0, F.jsx)("ol", {
className: "flex items-center gap-2.5 px-1",
- children: i.map((e, t) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, F.jsx)(dhe, {
+ children: i.map((e, t) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, F.jsx)(xhe, {
className: "size-3 shrink-0 text-text-tertiary",
"aria-hidden": !0
}), e] }, e.key ?? t))
})
});
}
-function QB({ children: e, icon: t, href: n, onClick: r, current: i = !1, className: a }) {
+function iV({ children: e, icon: t, href: n, onClick: r, current: i = !1, className: a }) {
let o = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [t && /* @__PURE__ */ (0, F.jsx)(t, {
className: "size-4 shrink-0",
"aria-hidden": !0
}), e] });
if (i) return /* @__PURE__ */ (0, F.jsx)("li", {
"aria-current": "page",
- className: sF("flex items-center gap-1.5 text-caption-1-medium whitespace-nowrap text-text-secondary", a),
+ className: mF("flex items-center gap-1.5 text-caption-1-medium whitespace-nowrap text-text-secondary", a),
children: o
});
- let s = sF("-mx-1 flex items-center gap-1.5 rounded-md px-1 py-0.5 text-caption-1-medium whitespace-nowrap text-text-tertiary", "transition-colors duration-150 ease outline-none", "hover:bg-background-primary-hover hover:text-text-secondary", "focus-visible:ring-2 focus-visible:ring-border-focus-ring", a);
+ let s = mF("-mx-1 flex items-center gap-1.5 rounded-md px-1 py-0.5 text-caption-1-medium whitespace-nowrap text-text-tertiary", "transition-colors duration-150 ease outline-none", "hover:bg-background-primary-hover hover:text-text-secondary", "focus-visible:ring-2 focus-visible:ring-border-focus-ring", a);
return /* @__PURE__ */ (0, F.jsx)("li", {
className: "flex items-center",
- children: n ? /* @__PURE__ */ (0, F.jsx)(lhe, {
+ children: n ? /* @__PURE__ */ (0, F.jsx)(yhe, {
href: n,
className: s,
children: o
}) : /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
onClick: r,
- className: sF("cursor-pointer", s),
+ className: mF("cursor-pointer", s),
children: o
})
});
}
// src/react/boardui/components/foundations/direction/direction.tsx
-function $B() {
- return IS().direction;
+function aV() {
+ return US().direction;
}
// src/react/boardui/components/base/dropdown/menu-styles.ts
-var eV = "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 data-[entering]:opacity-0 data-[entering]:scale-95 data-[entering]:blur-[2px] 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", phe = "w-[266px]", mhe = "flex w-full flex-col gap-1 outline-none", tV = "flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left text-text-primary outline-none transition-colors", nV = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
+var oV = "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 data-[entering]:opacity-0 data-[entering]:scale-95 data-[entering]:blur-[2px] 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", Che = "w-[266px]", whe = "flex w-full flex-col gap-1 outline-none", sV = "flex w-full cursor-pointer items-center gap-2 rounded-2lg p-2 text-left text-text-primary outline-none transition-colors", cV = "hover:bg-dropdown-item-hover-background focus-visible:bg-dropdown-item-hover-background";
// src/react/boardui/components/base/tree-view/tree-view.tsx
-function hhe({ size: e = "md", showGuides: t = !0, selectionMode: n = "single", renderEmptyState: r = () => "No items.", className: i, onKeyDownCapture: a, ref: o, ...s }) {
- let c = $B(), l = (0, P.useContext)(OI), u = l === EI && !s.dragAndDropHooks ? iV : l;
+function The({ size: e = "md", showGuides: t = !0, selectionMode: n = "single", renderEmptyState: r = () => "No items.", className: i, onKeyDownCapture: a, ref: o, ...s }) {
+ let c = aV(), l = (0, P.useContext)(PI), u = l === MI && !s.dragAndDropHooks ? uV : l;
return /* @__PURE__ */ (0, F.jsx)("div", {
className: "contents",
onKeyDownCapture: (e) => {
@@ -43505,23 +43550,23 @@ function hhe({ size: e = "md", showGuides: t = !0, selectionMode: n = "single",
}
}
},
- children: /* @__PURE__ */ (0, F.jsx)(OI.Provider, {
+ children: /* @__PURE__ */ (0, F.jsx)(PI.Provider, {
value: u,
- children: /* @__PURE__ */ (0, F.jsx)(Zfe, {
+ children: /* @__PURE__ */ (0, F.jsx)(spe, {
...s,
ref: o,
selectionMode: n,
"data-size": e,
"data-show-guides": t,
renderEmptyState: r,
- className: (e) => sF("group/tree-view flex w-full min-w-0 flex-col rounded-3xl border border-border-button-default bg-background-primary-default p-2 outline-none", u === iV ? "gap-0" : "gap-0.5", "data-[empty]:px-4 data-[empty]:py-8 data-[empty]:text-center data-[empty]:text-body-regular data-[empty]:text-text-tertiary", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-border-focus-ring", typeof i == "function" ? i(e) : i)
+ className: (e) => mF("group/tree-view flex w-full min-w-0 flex-col rounded-3xl border border-border-button-default bg-background-primary-default p-2 outline-none", u === uV ? "gap-0" : "gap-0.5", "data-[empty]:px-4 data-[empty]:py-8 data-[empty]:text-center data-[empty]:text-body-regular data-[empty]:text-text-tertiary", "data-[focus-visible]:ring-2 data-[focus-visible]:ring-border-focus-ring", typeof i == "function" ? i(e) : i)
})
})
});
}
-function rV({ label: e, textValue: t = e, icon: n, expandedIcon: r, iconClassName: i, trailingContent: a, children: o, className: s, style: c, ref: l, ...u }) {
- let d = $B();
- return /* @__PURE__ */ (0, F.jsxs)(epe, {
+function lV({ label: e, textValue: t = e, icon: n, expandedIcon: r, iconClassName: i, trailingContent: a, children: o, className: s, style: c, ref: l, ...u }) {
+ let d = aV();
+ return /* @__PURE__ */ (0, F.jsxs)(upe, {
...u,
ref: l,
textValue: t,
@@ -43529,11 +43574,11 @@ function rV({ label: e, textValue: t = e, icon: n, expandedIcon: r, iconClassNam
paddingInlineStart: `calc(0.5rem + ${e.level - 1} * 1.25rem)`,
...typeof c == "function" ? c(e) : c
}),
- className: (e) => sF("relative flex min-h-9 min-w-0 cursor-pointer items-center gap-2 rounded-xl pe-2 text-body-regular text-text-primary outline-none", "transition-[background-color,color,box-shadow] duration-150 motion-reduce:transition-none", "group-data-[size=sm]/tree-view:min-h-8 group-data-[size=sm]/tree-view:text-body-2-regular", (e.isHovered || e.isPressed || e.isFocusVisible) && !e.isDisabled && "bg-dropdown-item-hover-background", e.isSelected && "bg-dropdown-item-hover-background", e.isFocusVisible && "ring-2 ring-inset ring-border-focus-ring", e.isDisabled && "cursor-default text-text-placeholder", typeof s == "function" ? s(e) : s),
- children: [/* @__PURE__ */ (0, F.jsx)($fe, { children: ({ hasChildItems: t, isExpanded: o, isDisabled: s, level: c, state: l, id: u }) => {
- let f = n === null ? null : o && r ? r : n ?? (t ? o ? vz : _z : Tpe);
+ className: (e) => mF("relative flex min-h-9 min-w-0 cursor-pointer items-center gap-2 rounded-xl pe-2 text-body-regular text-text-primary outline-none", "transition-[background-color,color,box-shadow] duration-150 motion-reduce:transition-none", "group-data-[size=sm]/tree-view:min-h-8 group-data-[size=sm]/tree-view:text-body-2-regular", (e.isHovered || e.isPressed || e.isFocusVisible) && !e.isDisabled && "bg-dropdown-item-hover-background", e.isSelected && "bg-dropdown-item-hover-background", e.isFocusVisible && "ring-2 ring-inset ring-border-focus-ring", e.isDisabled && "cursor-default text-text-placeholder", typeof s == "function" ? s(e) : s),
+ children: [/* @__PURE__ */ (0, F.jsx)(lpe, { children: ({ hasChildItems: t, isExpanded: o, isDisabled: s, level: c, state: l, id: u }) => {
+ let f = n === null ? null : o && r ? r : n ?? (t ? o ? wz : Cz : Fpe);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(_he, {
+ /* @__PURE__ */ (0, F.jsx)(Dhe, {
state: l,
id: u,
level: c,
@@ -43543,20 +43588,20 @@ function rV({ label: e, textValue: t = e, icon: n, expandedIcon: r, iconClassNam
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
className: "flex shrink-0 items-center gap-1",
- children: [t ? /* @__PURE__ */ (0, F.jsx)(NI, {
+ children: [t ? /* @__PURE__ */ (0, F.jsx)(zI, {
slot: "chevron",
isDisabled: s,
className: "flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-foreground-icon-tertiary outline-none transition-colors hover:text-foreground-icon-primary data-[focus-visible]:ring-2 data-[focus-visible]:ring-border-focus-ring",
- children: /* @__PURE__ */ (0, F.jsx)(mz, {
+ children: /* @__PURE__ */ (0, F.jsx)(bz, {
"aria-hidden": !0,
- className: sF("size-4 opacity-50 transition-transform duration-150 motion-reduce:transition-none", o ? "rotate-90" : d === "rtl" && "rotate-180")
+ className: mF("size-4 opacity-50 transition-transform duration-150 motion-reduce:transition-none", o ? "rotate-90" : d === "rtl" && "rotate-180")
})
}) : /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
- className: sF("h-5 shrink-0", c > 1 ? "w-2" : "w-5")
+ className: mF("h-5 shrink-0", c > 1 ? "w-2" : "w-5")
}), f && /* @__PURE__ */ (0, F.jsx)(f, {
"aria-hidden": !0,
- className: sF("size-4 shrink-0 opacity-50", t ? "text-foreground-icon-primary" : "text-foreground-icon-secondary", i)
+ className: mF("size-4 shrink-0 opacity-50", t ? "text-foreground-icon-primary" : "text-foreground-icon-secondary", i)
})]
}),
/* @__PURE__ */ (0, F.jsx)("span", {
@@ -43571,24 +43616,24 @@ function rV({ label: e, textValue: t = e, icon: n, expandedIcon: r, iconClassNam
} }), o]
});
}
-var iV = {
- ...EI,
- CollectionRoot: ghe
+var uV = {
+ ...MI,
+ CollectionRoot: Ehe
};
-function ghe({ collection: e, ...t }) {
- let n = (0, P.useContext)(lz);
- return n ? /* @__PURE__ */ (0, F.jsx)(wy, {
+function Ehe({ collection: e, ...t }) {
+ let n = (0, P.useContext)(hz);
+ return n ? /* @__PURE__ */ (0, F.jsx)(Oy, {
initial: !1,
- children: Array.from(e).filter((e) => e.type !== "content").map((e) => /* @__PURE__ */ (0, F.jsx)(vhe, {
+ children: Array.from(e).filter((e) => e.type !== "content").map((e) => /* @__PURE__ */ (0, F.jsx)(Ohe, {
state: n,
children: e.render?.(e)
}, e.key))
- }) : /* @__PURE__ */ (0, F.jsx)(EI.CollectionRoot, {
+ }) : /* @__PURE__ */ (0, F.jsx)(MI.CollectionRoot, {
collection: e,
...t
});
}
-function _he({ state: e, id: t, level: n, expanded: r, branchWidth: i, direction: a }) {
+function Dhe({ state: e, id: t, level: n, expanded: r, branchWidth: i, direction: a }) {
let o = e.collection.getItem(t);
if (!o) return null;
let s = [], c = o.parentKey == null ? null : e.collection.getItem(o.parentKey), l = n - 1;
@@ -43621,7 +43666,7 @@ function _he({ state: e, id: t, level: n, expanded: r, branchWidth: i, direction
height: "7",
viewBox: `0 0 ${i} 7`,
fill: "none",
- className: sF("absolute start-0", a === "rtl" && "-scale-x-100"),
+ className: mF("absolute start-0", a === "rtl" && "-scale-x-100"),
style: { top: "calc(50% - 6px)" },
children: /* @__PURE__ */ (0, F.jsx)("path", {
d: `M0.5 0 Q0.5 6 6.5 6 H${i - .5}`,
@@ -43647,9 +43692,9 @@ function _he({ state: e, id: t, level: n, expanded: r, branchWidth: i, direction
]
});
}
-function vhe({ state: e, children: t }) {
- let n = by(), r = Xy(), [i, a] = (0, P.useState)(e);
- return n && i !== e && a(e), /* @__PURE__ */ (0, F.jsx)(fb.div, {
+function Ohe({ state: e, children: t }) {
+ let n = Ty(), r = nb(), [i, a] = (0, P.useState)(e);
+ return n && i !== e && a(e), /* @__PURE__ */ (0, F.jsx)(vb.div, {
role: "presentation",
className: "relative min-w-0 shrink-0 overflow-hidden",
"data-tree-view-exiting": !n || void 0,
@@ -43688,14 +43733,14 @@ function vhe({ state: e, children: t }) {
1
]
},
- children: /* @__PURE__ */ (0, F.jsx)(lz.Provider, {
+ children: /* @__PURE__ */ (0, F.jsx)(hz.Provider, {
value: n ? e : i,
children: t
})
});
}
// src/react/boardui/components/base/checkbox/checkbox-glyph.tsx
-var aV = {
+var dV = {
md: {
box: "size-4",
glyph: "size-4",
@@ -43709,11 +43754,11 @@ var aV = {
gap: "gap-1.5"
}
};
-function oV({ state: e, size: t = "md" }) {
- let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = aV[t], c = n || r, l = o && !a;
+function fV({ state: e, size: t = "md" }) {
+ let { isSelected: n, isIndeterminate: r, isFocusVisible: i, isDisabled: a, isHovered: o } = e, s = dV[t], c = n || r, l = o && !a;
return /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
- className: sF("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? sF("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : sF("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: mF("flex shrink-0 items-center justify-center rounded-sm", "transition-[background-color,border-color,box-shadow] duration-150 ease", s.box, c ? mF("bg-linear-to-b shadow-checkbox-selected", l ? "from-accent-400 to-accent-500" : "from-accent-500 to-accent-600") : mF("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, F.jsx)("svg", {
viewBox: "0 0 16 16",
fill: "none",
@@ -43736,41 +43781,41 @@ function oV({ state: e, size: t = "md" }) {
});
}
// src/react/boardui/components/base/checkbox/checkbox.tsx
-function sV({ className: e, children: t, size: n = "md", ref: r, ...i }) {
- let a = aV[n];
- return /* @__PURE__ */ (0, F.jsx)(Zue, {
+function pV({ className: e, children: t, size: n = "md", ref: r, ...i }) {
+ let a = dV[n];
+ return /* @__PURE__ */ (0, F.jsx)(sde, {
ref: r,
...i,
- className: (t) => sF("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, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(oV, {
+ className: (t) => mF("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, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(fV, {
state: e,
size: n
}), t != null && /* @__PURE__ */ (0, F.jsx)("span", {
- className: sF(a.label, "text-text-primary"),
+ className: mF(a.label, "text-text-primary"),
children: t
})] })
});
}
// src/react/components/overlay-scrollbar.ts
-function cV() {
+function mV() {
let e = (0, P.useRef)(null), t = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
t.current?.node !== e.current && (t.current?.control?.destroy(), t.current = e.current ? {
node: e.current,
- control: yo(e.current)
+ control: Po(e.current)
} : null);
}), (0, P.useEffect)(() => () => {
t.current?.control?.destroy(), t.current = null;
}, []), e;
}
// src/history/settings-route.ts
-var lV = {
+var hV = {
appearance: "外观与导航",
playback: "浏览与播放",
jav: "JAV 与新作",
search: "搜索与推荐",
content: "内容显示"
-}, uV = {
+}, gV = {
library: "媒体库与入库",
subscriptions: "来源与订阅",
downloads: "下载渠道",
@@ -43778,37 +43823,37 @@ var lV = {
maintenance: "应用与维护",
diagnostics: "系统诊断"
};
-function dV(e) {
- return uV[e.split("/")[2]] || uV.library;
+function _V(e) {
+ return gV[e.split("/")[2]] || gV.library;
}
-var fV = ["/settings", ...Object.keys(lV).map((e) => `/settings/${e}`)], pV = (e) => fV.includes(e);
-function mV(e) {
- return lV[e.split("/")[2]] || lV.appearance;
+var vV = ["/settings", ...Object.keys(hV).map((e) => `/settings/${e}`)], yV = (e) => vV.includes(e);
+function bV(e) {
+ return hV[e.split("/")[2]] || hV.appearance;
}
-function hV(e) {
+function xV(e) {
return `/settings/${Object.entries({
- ...lV,
- ...uV
+ ...hV,
+ ...gV
}).find(([, t]) => t === e)?.[0] || "appearance"}`;
}
-var gV = (e) => {
+var SV = (e) => {
let t = e?.settingsBackground;
return t && typeof t.pathname == "string" ? t : null;
-}, _V = [
+}, CV = [
"/assets/:id",
"/posts/:id",
"/works/:code"
-], yhe = [
+], khe = [
"mix",
"parts",
"editions",
"playlist"
];
-function vV(e, t = "") {
+function wV(e, t = "") {
let n = new URL(e, "https://peach.invalid");
e = n.pathname, t ||= n.search;
- for (let n of _V) {
- let r = hB(n, e);
+ for (let n of CV) {
+ let r = xB(n, e);
if (!r) continue;
if (n === "/works/:code") {
let e = r.params.code || "";
@@ -43825,7 +43870,7 @@ function vV(e, t = "") {
let a = Number(i[0]);
if (!Number.isSafeInteger(a) || a <= 0) return null;
if (n === "/assets/:id") {
- let e = new URLSearchParams(t), r = yhe.filter((t) => e.has(t));
+ let e = new URLSearchParams(t), r = khe.filter((t) => e.has(t));
if (r.length === 1) {
let t = r[0], i = e.get(t), o = Number(i);
if (/^[1-9]\d*$/.test(i) && Number.isSafeInteger(o)) return {
@@ -43849,8 +43894,8 @@ function vV(e, t = "") {
}
return null;
}
-var yV = (e, t = "") => vV(e, t)?.target ?? null, bV = (e) => pV(e.split(/[?#]/)[0]) || _V.some((t) => hB(t, e.split(/[?#]/)[0]) !== null);
-function xV(e) {
+var TV = (e, t = "") => wV(e, t)?.target ?? null, EV = (e) => yV(e.split(/[?#]/)[0]) || CV.some((t) => xB(t, e.split(/[?#]/)[0]) !== null);
+function DV(e) {
let t = e?.backgroundLocation;
return typeof t?.pathname == "string" ? {
pathname: t.pathname,
@@ -43858,34 +43903,34 @@ function xV(e) {
...typeof t.hash == "string" && t.hash ? { hash: t.hash } : {}
} : null;
}
-var SV = null, CV = null;
-function wV() {
+var OV = null, kV = null;
+function AV() {
let { pathname: e, search: t, hash: n } = window.location;
- bV(e) || (SV = {
+ EV(e) || (OV = {
pathname: e,
search: t,
...n ? { hash: n } : {}
});
}
-function TV() {
- SV = null, CV = null;
+function jV() {
+ OV = null, kV = null;
}
-function bhe(e) {
- let t = xV(e);
- t && (SV = t, CV = t.pathname + t.search + (t.hash || ""));
+function Ahe(e) {
+ let t = DV(e);
+ t && (OV = t, kV = t.pathname + t.search + (t.hash || ""));
}
-function EV() {
- let e = CV;
- return CV = null, e;
+function MV() {
+ let e = kV;
+ return kV = null, e;
}
-function DV(e) {
- return SV ? {
- backgroundLocation: { ...SV },
+function NV(e) {
+ return OV ? {
+ backgroundLocation: { ...OV },
overlay: e
} : void 0;
}
// src/history/canonical-path.ts
-function OV(e) {
+function PV(e) {
let t = new URL(e, "https://peach.invalid");
for (let [e, n] of [
[/^\/item\/(\d+)$/, "/assets/"],
@@ -43908,16 +43953,16 @@ function OV(e) {
}[t.pathname] || t.pathname, t.pathname + t.search + t.hash;
}
// src/history/route-meta.ts
-var kV = {
+var FV = {
"/settings": {
title: "设置",
refresh: "skip"
},
- ...Object.fromEntries(Object.entries(lV).map(([e, t]) => [`/settings/${e}`, {
+ ...Object.fromEntries(Object.entries(hV).map(([e, t]) => [`/settings/${e}`, {
title: t,
refresh: "skip"
}])),
- ...Object.fromEntries(Object.entries(uV).map(([e, t]) => [`/settings/${e}`, {
+ ...Object.fromEntries(Object.entries(gV).map(([e, t]) => [`/settings/${e}`, {
title: t,
section: "configuration",
refresh: "reopen"
@@ -44053,139 +44098,139 @@ var kV = {
title: "播放墙"
}
};
-function AV(e) {
- if (Object.hasOwn(kV, e)) return kV[e];
- let t = vV(e);
- if (t) return kV[t.path];
+function IV(e) {
+ if (Object.hasOwn(FV, e)) return FV[e];
+ let t = wV(e);
+ if (t) return FV[t.path];
let [n, ...r] = e.split("/").filter(Boolean);
if (!n) return null;
- if (!r.length) return Object.hasOwn(kV, `/${n}`) ? kV[`/${n}`] : null;
- let i = `/${n}/*`, a = /^\d+$/.test(r.join("/")) ? Wt({
+ if (!r.length) return Object.hasOwn(FV, `/${n}`) ? FV[`/${n}`] : null;
+ let i = `/${n}/*`, a = {
performers: "performer",
studios: "studio",
creators: "creator",
agencies: "agency",
series: "series",
tags: "tag"
- }[n] || "", Number(r[0])) : r.join("/");
- return Object.hasOwn(kV, i) ? {
- ...kV[i],
- title: a || "资料"
+ }, o = /^\d+$/.test(r.join("/")) ? on(a[n] || "", Number(r[0])) : r.join("/");
+ return Object.hasOwn(FV, i) ? {
+ ...FV[i],
+ title: o ? Qt(a[n] || "", o) : "资料"
} : null;
}
// src/history/managed.ts
-var jV = () => {}, MV = new Promise((e) => {
- jV = e;
+var LV = () => {}, RV = new Promise((e) => {
+ LV = e;
});
-MV.catch(() => {});
-var NV = null, PV = /* @__PURE__ */ new Map(), FV = /* @__PURE__ */ new Map(), IV = 0, LV = /* @__PURE__ */ new Set();
-function xhe(e) {
- jV(e);
+RV.catch(() => {});
+var zV = null, BV = /* @__PURE__ */ new Map(), VV = /* @__PURE__ */ new Map(), HV = 0, UV = /* @__PURE__ */ new Set();
+function jhe(e) {
+ LV(e);
}
-function RV(e) {
- return PV.get(e) ?? null;
+function WV(e) {
+ return BV.get(e) ?? null;
}
-function zV(e) {
- return !!e && (PV.has(e) || FV.has(e));
+function GV(e) {
+ return !!e && (BV.has(e) || VV.has(e));
}
-var BV = () => [...PV.values()];
-function She(e) {
- return LV.add(e), () => {
- LV.delete(e);
+var KV = () => [...BV.values()];
+function Mhe(e) {
+ return UV.add(e), () => {
+ UV.delete(e);
};
}
-function VV(e) {
- let t = BV();
- for (let n of [...LV]) n(t, e);
+function qV(e) {
+ let t = KV();
+ for (let n of [...UV]) n(t, e);
}
-async function HV(e, t, n) {
+async function JV(e, t, n) {
let { container: r } = n;
- if (WV(r), !n.isCurrent()) return !1;
- IV += 1;
+ if (XV(r), !n.isCurrent()) return !1;
+ HV += 1;
let i = {
- revision: IV,
+ revision: HV,
controller: new AbortController()
};
- FV.set(r, i);
- let a = NV;
- NV = null, a?.();
- let o = await MV;
- if (FV.get(r) !== i) return !1;
+ VV.set(r, i);
+ let a = zV;
+ zV = null, a?.();
+ let o = await RV;
+ if (VV.get(r) !== i) return !1;
try {
await o(e, t, i.controller.signal);
} catch {
if (i.controller.signal.aborted) return !1;
}
- if (FV.get(r) !== i || (FV.delete(r), !n.isCurrent())) return !1;
- let s = n.place ? n.place(r) : Che(r);
- return PV.set(r, {
+ if (VV.get(r) !== i || (VV.delete(r), !n.isCurrent())) return !1;
+ let s = n.place ? n.place(r) : Nhe(r);
+ return BV.set(r, {
path: e,
props: t,
revision: i.revision,
container: r,
host: s,
resident: !!n.resident
- }), VV(!0), !0;
+ }), qV(!0), !0;
}
-function Che(e) {
+function Nhe(e) {
let t = e.ownerDocument.createElement("div");
return t.className = "peach-react", e.textContent = "", e.append(t), t;
}
-function UV(e, t) {
- let n = e ? PV.get(e) : void 0;
- n && (PV.set(n.container, {
+function YV(e, t) {
+ let n = e ? BV.get(e) : void 0;
+ n && (BV.set(n.container, {
...n,
props: {
...n.props,
...t
}
- }), VV(!1));
+ }), qV(!1));
}
-function WV(e, ...t) {
+function XV(e, ...t) {
let n = [];
for (let r of /* @__PURE__ */ new Set([e, ...t])) {
- let e = FV.get(r);
- e && (e.controller.abort(), FV.delete(r));
- let t = PV.get(r);
- t && (PV.delete(r), n.push(t));
+ let e = VV.get(r);
+ e && (e.controller.abort(), VV.delete(r));
+ let t = BV.get(r);
+ t && (BV.delete(r), n.push(t));
}
if (n.length) {
- VV(!0);
+ qV(!0);
for (let e of n) e.resident || e.host.remove();
}
}
-function whe() {
- let [e, ...t] = /* @__PURE__ */ new Set([...PV.keys(), ...FV.keys()]);
- e && WV(e, ...t);
+function Phe() {
+ let [e, ...t] = /* @__PURE__ */ new Set([...BV.keys(), ...VV.keys()]);
+ e && XV(e, ...t);
}
-function The(e, t) {
- let n = PV.get(e);
- n?.revision === t && (PV.delete(e), n.resident || n.host.remove(), queueMicrotask(() => {
- VV(!1);
+function Fhe(e, t) {
+ let n = BV.get(e);
+ n?.revision === t && (BV.delete(e), n.resident || n.host.remove(), queueMicrotask(() => {
+ qV(!1);
}));
}
// src/history/index.ts
-var GV = nme({ v5Compat: !0 }), KV = 0, qV = 0, JV = {
- action: GV.action,
- location: GV.location,
- seq: KV,
- openEpoch: qV,
+var ZV = fme({ v5Compat: !0 }), QV = 0, $V = 0, eH = {
+ action: ZV.action,
+ location: ZV.location,
+ seq: QV,
+ openEpoch: $V,
claimed: !0
-}, YV = /* @__PURE__ */ new Set(), XV = !1, ZV = !0;
-GV.listen(({ action: e, location: t }) => {
- let n = t.pathname + t.search + t.hash, r = OV(n);
- r !== n && (window.history.replaceState(window.history.state, "", r), t = GV.location), KV += 1, XV || (qV += 1), e !== "REPLACE" && (ZV = !1), JV = {
+}, tH = /* @__PURE__ */ new Set(), nH = !1, rH = !0;
+ZV.listen(({ action: e, location: t }) => {
+ let n = t.pathname + t.search + t.hash, r = PV(n);
+ r !== n && (window.history.replaceState(window.history.state, "", r), t = ZV.location), QV += 1, nH || ($V += 1), e !== "REPLACE" && (rH = !1), eH = {
action: e,
location: t,
- seq: KV,
- openEpoch: qV,
- claimed: XV
+ seq: QV,
+ openEpoch: $V,
+ claimed: nH
};
- for (let e of [...YV]) e(JV);
+ for (let e of [...tH]) e(eH);
});
-function QV(e) {
- if (typeof e == "string") return OV(new URL(e, window.location.href).href);
- let t = new URL(`${e.pathname ?? window.location.pathname}${e.search || ""}${e.hash || ""}`, window.location.href), n = OV(t.href);
+function iH(e) {
+ if (typeof e == "string") return PV(new URL(e, window.location.href).href);
+ let t = new URL(`${e.pathname ?? window.location.pathname}${e.search || ""}${e.hash || ""}`, window.location.href), n = PV(t.href);
if (n === t.pathname + t.search + t.hash) return e;
let r = new URL(n, window.location.origin);
return {
@@ -44195,77 +44240,77 @@ function QV(e) {
hash: r.hash
};
}
-var $V = {
+var aH = {
get navigation() {
- return JV;
+ return eH;
},
listen(e) {
- return YV.add(e), () => {
- YV.delete(e);
+ return tH.add(e), () => {
+ tH.delete(e);
};
},
- createHref: (e) => GV.createHref(e),
- createURL: (e) => GV.createURL(e),
- encodeLocation: (e) => GV.encodeLocation(e),
- go: (e) => GV.go(e),
- push: (e, t) => GV.push(QV(e), t),
- replace: (e, t) => GV.replace(QV(e), t)
+ createHref: (e) => ZV.createHref(e),
+ createURL: (e) => ZV.createURL(e),
+ encodeLocation: (e) => ZV.encodeLocation(e),
+ go: (e) => ZV.go(e),
+ push: (e, t) => ZV.push(iH(e), t),
+ replace: (e, t) => ZV.replace(iH(e), t)
};
-function eH(e, { replace: t = !1, state: n } = {}) {
- let r = new URL(e, window.location.href), i = OV(`${r.pathname}${r.search}${r.hash}`);
- XV = !0;
+function oH(e, { replace: t = !1, state: n } = {}) {
+ let r = new URL(e, window.location.href), i = PV(`${r.pathname}${r.search}${r.hash}`);
+ nH = !0;
try {
- t ? GV.replace(i, n) : GV.push(i, n);
+ t ? ZV.replace(i, n) : ZV.push(i, n);
} finally {
- XV = !1;
+ nH = !1;
}
}
-var tH = () => ZV;
-function nH() {
- if (pV(JV.location.pathname)) {
- let e = ZV ? null : gV(JV.location.state);
- return e ? xV(e.state) || e : null;
+var sH = () => rH;
+function cH() {
+ if (yV(eH.location.pathname)) {
+ let e = rH ? null : SV(eH.location.state);
+ return e ? DV(e.state) || e : null;
}
- return ZV ? null : xV(JV.location.state);
+ return rH ? null : DV(eH.location.state);
}
// src/react/providers.tsx
-var rH = null;
-function Ehe() {
- return rH?.isConnected || (rH = document.createElement("div"), rH.className = "peach-react", rH.dataset.reactOverlays = "", document.body.append(rH)), rH;
+var lH = null;
+function Ihe() {
+ return lH?.isConnected || (lH = document.createElement("div"), lH.className = "peach-react", lH.dataset.reactOverlays = "", document.body.append(lH)), lH;
}
-function iH({ children: e }) {
+function uH({ children: e }) {
return /* @__PURE__ */ (0, F.jsx)(se, {
client: H,
- children: /* @__PURE__ */ (0, F.jsx)(one, {
+ children: /* @__PURE__ */ (0, F.jsx)(Fy, {
reducedMotion: "user",
- children: /* @__PURE__ */ (0, F.jsx)(FT, {
- getContainer: Ehe,
+ children: /* @__PURE__ */ (0, F.jsx)(HT, {
+ getContainer: Ihe,
children: e
})
})
});
}
// node_modules/sonner/dist/index.mjs
-function Dhe(e) {
+function Lhe(e) {
if (!e || typeof document > "u") return;
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
}
-var Ohe = (e) => {
+var Rhe = (e) => {
switch (e) {
- case "success": return jhe;
- case "info": return Nhe;
- case "warning": return Mhe;
- case "error": return Phe;
+ case "success": return Vhe;
+ case "info": return Uhe;
+ case "warning": return Hhe;
+ case "error": return Whe;
default: return null;
}
-}, khe = Array(12).fill(0), Ahe = ({ visible: e, className: t }) => /*#__PURE__*/ P.createElement("div", {
+}, zhe = Array(12).fill(0), Bhe = ({ visible: e, className: t }) => /*#__PURE__*/ P.createElement("div", {
className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "),
"data-visible": e
-}, /*#__PURE__*/ P.createElement("div", { className: "sonner-spinner" }, khe.map((e, t) => /*#__PURE__*/ P.createElement("div", {
+}, /*#__PURE__*/ P.createElement("div", { className: "sonner-spinner" }, zhe.map((e, t) => /*#__PURE__*/ P.createElement("div", {
className: "sonner-loading-bar",
key: `spinner-bar-${t}`
-})))), jhe = /*#__PURE__*/ P.createElement("svg", {
+})))), Vhe = /*#__PURE__*/ P.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -44276,7 +44321,7 @@ var Ohe = (e) => {
fillRule: "evenodd",
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
clipRule: "evenodd"
-})), Mhe = /*#__PURE__*/ P.createElement("svg", {
+})), Hhe = /*#__PURE__*/ P.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
fill: "currentColor",
@@ -44287,7 +44332,7 @@ var Ohe = (e) => {
fillRule: "evenodd",
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
clipRule: "evenodd"
-})), Nhe = /*#__PURE__*/ P.createElement("svg", {
+})), Uhe = /*#__PURE__*/ P.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -44298,7 +44343,7 @@ var Ohe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
clipRule: "evenodd"
-})), Phe = /*#__PURE__*/ P.createElement("svg", {
+})), Whe = /*#__PURE__*/ P.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 20 20",
fill: "currentColor",
@@ -44309,7 +44354,7 @@ var Ohe = (e) => {
fillRule: "evenodd",
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
clipRule: "evenodd"
-})), Fhe = /*#__PURE__*/ P.createElement("svg", {
+})), Ghe = /*#__PURE__*/ P.createElement("svg", {
xmlns: "http://www.w3.org/2000/svg",
width: "12",
height: "12",
@@ -44330,7 +44375,7 @@ var Ohe = (e) => {
y1: "6",
x2: "18",
y2: "18"
-})), Ihe = () => {
+})), Khe = () => {
let [e, t] = P.useState(document.hidden);
return P.useEffect(() => {
let e = () => {
@@ -44338,7 +44383,7 @@ var Ohe = (e) => {
};
return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
}, []), e;
-}, Lhe = 1, Rhe = 100, aH = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : Lhe++, oH = new class {
+}, qhe = 1, Jhe = 100, dH = (e) => typeof e?.id == "number" || e?.id?.length > 0 ? e.id : qhe++, fH = new class {
constructor() {
this.subscribe = (e) => (this.subscribers.push(e), this.getActiveToasts().forEach((t) => e(t)), () => {
let t = this.subscribers.indexOf(e);
@@ -44348,10 +44393,10 @@ var Ohe = (e) => {
}, this.addToast = (e) => {
this.publish(e), this.toasts = [...this.toasts, e], this.trimHistory();
}, this.trimHistory = () => {
- let e = this.toasts.length - Rhe;
+ let e = this.toasts.length - Jhe;
e <= 0 || (this.toasts = this.toasts.filter((t) => e > 0 && this.dismissedToasts.has(t.id) ? (this.dismissedToasts.delete(t.id), e--, !1) : !0));
}, this.create = (e) => {
- let { message: t, ...n } = e, r = aH(e), i = this.pendingDismissals.get(r);
+ let { message: t, ...n } = e, r = dH(e), i = this.pendingDismissals.get(r);
i !== void 0 && (cancelAnimationFrame(i), this.pendingDismissals.delete(r), this.dismissedToasts.delete(r));
let a = this.dismissedToasts.has(r), o = e.dismissible === void 0 || e.dismissible;
return a && (this.dismissedToasts.delete(r), this.toasts = this.toasts.filter((e) => e.id !== r)), !a && this.toasts.find((e) => e.id === r) ? this.toasts = this.toasts.map((n) => n.id === r ? (this.publish({
@@ -44426,7 +44471,7 @@ var Ohe = (e) => {
type: "default",
message: e
});
- else if (Bhe(e) && !e.ok) {
+ else if (Xhe(e) && !e.ok) {
i = !1;
let r = typeof t.error == "function" ? await t.error(`HTTP error! status: ${e.status}`) : t.error, a = typeof t.description == "function" ? await t.description(`HTTP error! status: ${e.status}`) : t.description, o = typeof r == "object" && !P.isValidElement(r) ? r : { message: r };
this.create({
@@ -44470,7 +44515,7 @@ var Ohe = (e) => {
}), s = () => new Promise((e, t) => o.then(() => a[0] === "reject" ? t(a[1]) : e(a[1])).catch(t));
return typeof n != "string" && typeof n != "number" ? { unwrap: s } : Object.assign(n, { unwrap: s });
}, this.custom = (e, t) => {
- let n = aH(t);
+ let n = dH(t);
return this.create({
...t,
jsx: e(n),
@@ -44479,34 +44524,34 @@ var Ohe = (e) => {
}), n;
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set(), this.pendingDismissals = /* @__PURE__ */ new Map();
}
-}(), zhe = (e, t) => oH.message(e, t), Bhe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", sH = Object.assign(zhe, {
- success: oH.success,
- info: oH.info,
- warning: oH.warning,
- error: oH.error,
- custom: oH.custom,
- message: oH.message,
- promise: oH.promise,
- dismiss: oH.dismiss,
- loading: oH.loading
+}(), Yhe = (e, t) => fH.message(e, t), Xhe = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", pH = Object.assign(Yhe, {
+ success: fH.success,
+ info: fH.info,
+ warning: fH.warning,
+ error: fH.error,
+ custom: fH.custom,
+ message: fH.message,
+ promise: fH.promise,
+ dismiss: fH.dismiss,
+ loading: fH.loading
}, {
- getHistory: () => oH.toasts,
- getToasts: () => oH.getActiveToasts()
+ getHistory: () => fH.toasts,
+ getToasts: () => fH.getActiveToasts()
});
-Dhe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
-function cH(e) {
+Lhe("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
+function mH(e) {
return e.label !== void 0;
}
-var Vhe = 3, Hhe = "24px", Uhe = "16px", lH = 4e3, Whe = 356, Ghe = 14, Khe = 45, qhe = 200;
-function uH(...e) {
+var Zhe = 3, Qhe = "24px", $he = "16px", hH = 4e3, ege = 356, tge = 14, nge = 45, rge = 200;
+function gH(...e) {
return e.filter(Boolean).join(" ");
}
-function Jhe(e) {
+function ige(e) {
let [t, n] = e.split("-"), r = [];
return t && r.push(t), n && r.push(n), r;
}
-var Yhe = (e) => {
- let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = P.useState(null), [O, k] = P.useState(null), [A, j] = P.useState(!1), [M, ee] = P.useState(!1), [te, ne] = P.useState(!1), [N, re] = P.useState(!1), [ie, F] = P.useState(!1), [ae, oe] = P.useState(0), [se, ce] = P.useState(0), le = P.useRef(n.duration || y || lH), ue = P.useRef(null), de = P.useRef(null), fe = c === 0, pe = c + 1 <= o, me = n.type, he = me ?? "default", I = n.dismissible !== !1, ge = n.className || "", _e = n.descriptionClassName || "", ve = P.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ye = P.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), be = P.useMemo(() => n.duration || y || lH, [n.duration, y]), xe = P.useRef(0), Se = P.useRef(0), Ce = P.useRef(0), we = P.useRef(null), [Te, Ee] = b.split("-"), De = P.useMemo(() => s.reduce((e, t, n) => n >= ve ? e : e + t.height, 0), [s, ve]), Oe = Ihe(), ke = P.useMemo(() => e.swipeDirections ?? Jhe(b), [e.swipeDirections, b]), Ae = n.invert || t, je = me === "loading";
+var age = (e) => {
+ let { invert: t, toast: n, unstyled: r, interacting: i, setHeights: a, visibleToasts: o, heights: s, index: c, toasts: l, expanded: u, removeToast: d, defaultRichColors: f, closeButton: p, style: m, cancelButtonStyle: h, actionButtonStyle: g, className: _ = "", descriptionClassName: v = "", duration: y, position: b, gap: x, expandByDefault: S, classNames: C, icons: w, closeButtonAriaLabel: T = "Close toast" } = e, [E, D] = P.useState(null), [O, k] = P.useState(null), [A, j] = P.useState(!1), [M, ee] = P.useState(!1), [te, ne] = P.useState(!1), [N, re] = P.useState(!1), [ie, F] = P.useState(!1), [ae, oe] = P.useState(0), [se, ce] = P.useState(0), le = P.useRef(n.duration || y || hH), ue = P.useRef(null), de = P.useRef(null), fe = c === 0, pe = c + 1 <= o, me = n.type, he = me ?? "default", I = n.dismissible !== !1, ge = n.className || "", _e = n.descriptionClassName || "", ve = P.useMemo(() => s.findIndex((e) => e.toastId === n.id) || 0, [s, n.id]), ye = P.useMemo(() => n.closeButton ?? p, [n.closeButton, p]), be = P.useMemo(() => n.duration || y || hH, [n.duration, y]), xe = P.useRef(0), Se = P.useRef(0), Ce = P.useRef(0), we = P.useRef(null), [Te, Ee] = b.split("-"), De = P.useMemo(() => s.reduce((e, t, n) => n >= ve ? e : e + t.height, 0), [s, ve]), Oe = Khe(), ke = P.useMemo(() => e.swipeDirections ?? ige(b), [e.swipeDirections, b]), Ae = n.invert || t, je = me === "loading";
Se.current = P.useMemo(() => ve * x + De, [ve, De]), P.useEffect(() => {
le.current = be;
}, [be]), P.useEffect(() => {
@@ -44547,7 +44592,7 @@ var Yhe = (e) => {
let Me = P.useCallback(() => {
ee(!0), oe(Se.current), a((e) => e.filter((e) => e.toastId !== n.id)), setTimeout(() => {
d(n);
- }, qhe);
+ }, rge);
}, [
n,
d,
@@ -44578,18 +44623,18 @@ var Yhe = (e) => {
}, [Me, n.delete]);
function Ne() {
return w?.loading ? /*#__PURE__*/ P.createElement("div", {
- className: uH(C?.loader, n?.classNames?.loader, "sonner-loader"),
+ className: gH(C?.loader, n?.classNames?.loader, "sonner-loader"),
"data-visible": me === "loading"
- }, w.loading) : /*#__PURE__*/ P.createElement(Ahe, {
- className: uH(C?.loader, n?.classNames?.loader),
+ }, w.loading) : /*#__PURE__*/ P.createElement(Bhe, {
+ className: gH(C?.loader, n?.classNames?.loader),
visible: me === "loading"
});
}
- let Pe = n.icon || w?.[me] || Ohe(me);
+ let Pe = n.icon || w?.[me] || Rhe(me);
return /*#__PURE__*/ P.createElement("li", {
tabIndex: 0,
ref: de,
- className: uH(_, ge, C?.toast, n?.classNames?.toast, C?.[he], n?.classNames?.[he]),
+ className: gH(_, ge, C?.toast, n?.classNames?.toast, C?.[he], n?.classNames?.[he]),
"data-sonner-toast": "",
"data-rich-colors": n.richColors ?? f,
"data-styled": !(n.jsx || n.unstyled || r),
@@ -44632,7 +44677,7 @@ var Yhe = (e) => {
if (N || !I) return;
we.current = null;
let e = Number(de.current?.style.getPropertyValue("--swipe-amount-x").replace("px", "") || 0), t = Number(de.current?.style.getPropertyValue("--swipe-amount-y").replace("px", "") || 0), r = (/* @__PURE__ */ new Date()).getTime() - ue.current?.getTime(), i = E === "x" ? e : t, a = Math.abs(i) / r;
- if ((E === "x" ? ke.includes(e > 0 ? "right" : "left") : ke.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= Khe || a > .11)) oe(Se.current), n.onDismiss == null || n.onDismiss.call(n, n), k(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), Me(), re(!0);
+ if ((E === "x" ? ke.includes(e > 0 ? "right" : "left") : ke.includes(t > 0 ? "bottom" : "top")) && (Math.abs(i) >= nge || a > .11)) oe(Se.current), n.onDismiss == null || n.onDismiss.call(n, n), k(E === "x" ? e > 0 ? "right" : "left" : t > 0 ? "down" : "up"), Me(), re(!0);
else {
var o, s;
(o = de.current) == null || o.style.setProperty("--swipe-amount-x", "0px"), (s = de.current) == null || s.style.setProperty("--swipe-amount-y", "0px"), F(!1), ne(!1), D(null);
@@ -44671,46 +44716,46 @@ var Yhe = (e) => {
onClick: je || !I ? () => {} : () => {
Me(), n.onDismiss == null || n.onDismiss.call(n, n);
},
- className: uH(C?.closeButton, n?.classNames?.closeButton)
- }, w?.close ?? Fhe) : null, (me || n.icon || n.promise) && n.icon !== null && (w?.[me] !== null || n.icon) ? /*#__PURE__*/ P.createElement("div", {
+ className: gH(C?.closeButton, n?.classNames?.closeButton)
+ }, w?.close ?? Ghe) : null, (me || n.icon || n.promise) && n.icon !== null && (w?.[me] !== null || n.icon) ? /*#__PURE__*/ P.createElement("div", {
"data-icon": "",
- className: uH(C?.icon, n?.classNames?.icon)
+ className: gH(C?.icon, n?.classNames?.icon)
}, me === "loading" ? n.icon || Ne() : n.promise ? Ne() : null, me === "loading" ? null : Pe) : null, /*#__PURE__*/ P.createElement("div", {
"data-content": "",
- className: uH(C?.content, n?.classNames?.content)
+ className: gH(C?.content, n?.classNames?.content)
}, /*#__PURE__*/ P.createElement("div", {
"data-title": "",
- className: uH(C?.title, n?.classNames?.title)
+ className: gH(C?.title, n?.classNames?.title)
}, n.jsx ? n.jsx : typeof n.title == "function" ? n.title() : n.title), n.description ? /*#__PURE__*/ P.createElement("div", {
"data-description": "",
- className: uH(v, _e, C?.description, n?.classNames?.description)
- }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ P.isValidElement(n.cancel) ? n.cancel : n.cancel && cH(n.cancel) ? /*#__PURE__*/ P.createElement("button", {
+ className: gH(v, _e, C?.description, n?.classNames?.description)
+ }, typeof n.description == "function" ? n.description() : n.description) : null), /*#__PURE__*/ P.isValidElement(n.cancel) ? n.cancel : n.cancel && mH(n.cancel) ? /*#__PURE__*/ P.createElement("button", {
"data-button": !0,
"data-cancel": !0,
style: n.cancelButtonStyle || h,
onClick: (e) => {
- cH(n.cancel) && I && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), Me());
+ mH(n.cancel) && I && (n.cancel.onClick == null || n.cancel.onClick.call(n.cancel, e), Me());
},
- className: uH(C?.cancelButton, n?.classNames?.cancelButton)
- }, n.cancel.label) : null, /*#__PURE__*/ P.isValidElement(n.action) ? n.action : n.action && cH(n.action) ? /*#__PURE__*/ P.createElement("button", {
+ className: gH(C?.cancelButton, n?.classNames?.cancelButton)
+ }, n.cancel.label) : null, /*#__PURE__*/ P.isValidElement(n.action) ? n.action : n.action && mH(n.action) ? /*#__PURE__*/ P.createElement("button", {
"data-button": !0,
"data-action": !0,
style: n.actionButtonStyle || g,
onClick: (e) => {
- cH(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && Me());
+ mH(n.action) && (n.action.onClick == null || n.action.onClick.call(n.action, e), !e.defaultPrevented && Me());
},
- className: uH(C?.actionButton, n?.classNames?.actionButton)
+ className: gH(C?.actionButton, n?.classNames?.actionButton)
}, n.action.label) : null);
};
-function dH() {
+function _H() {
if (typeof window > "u" || typeof document > "u") return "ltr";
let e = document.documentElement.getAttribute("dir");
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
}
-function Xhe(e, t) {
+function oge(e, t) {
let n = {};
return [e, t].forEach((e, t) => {
- let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? Uhe : Hhe;
+ let r = t === 1, i = r ? "--mobile-offset" : "--offset", a = r ? $he : Qhe;
function o(e) {
[
"top",
@@ -44731,11 +44776,11 @@ function Xhe(e, t) {
}) : o(a);
}), n;
}
-var fH = /*#__PURE__*/ P.forwardRef(function(e, t) {
- let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = Vhe, toastOptions: g, dir: _ = dH(), gap: v = Ghe, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = P.useState([]), w = P.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = P.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = P.useState([]), [O, k] = P.useState(!1), [A, j] = P.useState(!1), [M, ee] = P.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), te = P.useRef(null), ne = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), N = P.useRef(null), re = P.useRef(!1), ie = P.useCallback((e) => {
- C((t) => (t.find((t) => t.id === e.id)?.delete || oH.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
+var vH = /*#__PURE__*/ P.forwardRef(function(e, t) {
+ let { id: n, invert: r, position: i = "bottom-right", hotkey: a = ["altKey", "KeyT"], expand: o, closeButton: s, className: c, offset: l, mobileOffset: u, theme: d = "light", richColors: f, duration: p, style: m, visibleToasts: h = Zhe, toastOptions: g, dir: _ = _H(), gap: v = tge, icons: y, customAriaLabel: b, containerAriaLabel: x = "Notifications" } = e, [S, C] = P.useState([]), w = P.useMemo(() => n ? S.filter((e) => e.toasterId === n) : S.filter((e) => !e.toasterId), [S, n]), T = P.useMemo(() => Array.from(new Set([i].concat(w.filter((e) => e.position).map((e) => e.position)))), [w, i]), [E, D] = P.useState([]), [O, k] = P.useState(!1), [A, j] = P.useState(!1), [M, ee] = P.useState(d === "system" ? typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : d), te = P.useRef(null), ne = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), N = P.useRef(null), re = P.useRef(!1), ie = P.useCallback((e) => {
+ C((t) => (t.find((t) => t.id === e.id)?.delete || fH.dismiss(e.id), t.filter(({ id: t }) => t !== e.id)));
}, []);
- return P.useEffect(() => oH.subscribe((e) => {
+ return P.useEffect(() => fH.subscribe((e) => {
e.dismiss ? requestAnimationFrame(() => {
C((t) => t.map((t) => t.id === e.id ? {
...t,
@@ -44804,7 +44849,7 @@ var fH = /*#__PURE__*/ P.forwardRef(function(e, t) {
let [i, a] = t.split("-");
return w.length ? /*#__PURE__*/ P.createElement("ol", {
key: t,
- dir: _ === "auto" ? dH() : _,
+ dir: _ === "auto" ? _H() : _,
tabIndex: -1,
ref: te,
className: c,
@@ -44814,10 +44859,10 @@ var fH = /*#__PURE__*/ P.forwardRef(function(e, t) {
"data-x-position": a,
style: {
"--front-toast-height": `${E[0]?.height || 0}px`,
- "--width": `${Whe}px`,
+ "--width": `${ege}px`,
"--gap": `${v}px`,
...m,
- ...Xhe(l, u)
+ ...oge(l, u)
},
onBlur: (e) => {
re.current && !e.currentTarget.contains(e.relatedTarget) && (re.current = !1, N.current &&= (N.current.focus({ preventScroll: !0 }), null));
@@ -44835,7 +44880,7 @@ var fH = /*#__PURE__*/ P.forwardRef(function(e, t) {
e.target instanceof HTMLElement && e.target.dataset.dismissible === "false" || j(!0);
},
onPointerUp: () => j(!1)
- }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ P.createElement(Yhe, {
+ }, w.filter((e) => !e.position && n === 0 || e.position === t).map((n, i) => /*#__PURE__*/ P.createElement(age, {
key: n.id,
icons: y,
index: i,
@@ -44865,35 +44910,35 @@ var fH = /*#__PURE__*/ P.forwardRef(function(e, t) {
swipeDirections: e.swipeDirections
}))) : null;
}));
-}), pH = "/api/library-processing", mH = ["library-processing"], Zhe = (e, t, n) => {
+}), yH = "/api/library-processing", bH = ["library-processing"], sge = (e, t, n) => {
let r = new URLSearchParams({
estimate: "1",
stage: e.stage || "all"
});
- return e.asset_ids && r.set("asset_ids", JSON.stringify(e.asset_ids)), e.scope && r.set("scope", e.scope), e.incremental && r.set("incremental", "1"), n && r.set("inventory", n), B(`${pH}?${r}`, t);
-}, Qhe = {
+ return e.asset_ids && r.set("asset_ids", JSON.stringify(e.asset_ids)), e.scope && r.set("scope", e.scope), e.incremental && r.set("incremental", "1"), n && r.set("inventory", n), B(`${yH}?${r}`, t);
+}, cge = {
fetching_cover: "封面",
querying_metadata: "资料"
};
-function hH(e) {
+function xH(e) {
if (e?.status !== "running" || e.current_asset_id == null) return null;
- let t = Qhe[e.current_action || ""];
+ let t = cge[e.current_action || ""];
return !t || (e.waited_seconds || 0) < 120 ? null : {
what: t,
source: e.current_source
};
}
-function gH({ what: e, source: t }) {
+function SH({ what: e, source: t }) {
return `${`${t?.label ? `${t.label} ` : "外部来源"}迟迟没有返回${e}`}。可以先跳过这部,任务结束后再重试。`;
}
-var _H = (e) => !!e && [
+var CH = (e) => !!e && [
"running",
"pausing",
"paused",
"stopping"
-].includes(e.status), vH = (e) => e?.status === "failed" && e.outcome === "partial", yH = "已入库的视频可在全部内容中浏览,未完成项可单独重试。", bH = "/?loc=&thumb=0";
-function xH(e) {
- if (!_H(e)) return "";
+].includes(e.status), wH = (e) => e?.status === "failed" && e.outcome === "partial", TH = "已入库的视频可在全部内容中浏览,未完成项可单独重试。", EH = "/?loc=&thumb=0";
+function DH(e) {
+ if (!CH(e)) return "";
if (e.status === "stopping") return "正在停止,等待当前步骤退出;已取得的结果会保留";
if (e.status === "paused") return "已暂停,继续后更新预估";
if (e.status === "pausing") return "正在暂停,当前步骤结束后暂停";
@@ -44904,18 +44949,18 @@ function xH(e) {
let r = n >= 86400 ? 86400 : n >= 3600 ? 3600 : 60, i = r === 86400 ? "天" : r === 3600 ? "小时" : "分钟", a = r === 60 ? 1 : 10, o = Math.max(1 / a, Math.floor(t / r * a) / a), s = Math.max(o, Math.ceil(n / r * a) / a);
return `预计剩余约 ${o === s ? `${s}` : `${o}–${s}`} ${i}${e.eta_initial || e.eta_kind !== "measured" ? "(粗估)" : ""}${e.eta_scope ? ` · ${e.eta_scope}` : ""}`;
}
-var SH = (e) => B(pH, e);
-async function CH(e) {
+var OH = (e) => B(yH, e);
+async function kH(e) {
await H.fetchQuery({
- queryKey: mH,
- queryFn: () => SH(e)
+ queryKey: bH,
+ queryFn: () => OH(e)
});
}
-var $he = 2e3, ege = 1e4, wH = "连接中断,正在重新读取处理进度";
-function TH(e, t) {
- return _H(e) ? $he : t ? ege : !1;
+var lge = 2e3, uge = 1e4, AH = "连接中断,正在重新读取处理进度";
+function jH(e, t) {
+ return CH(e) ? lge : t ? uge : !1;
}
-var tge = {
+var dge = {
scanning_files: "扫描文件",
reading_local: "检查配套文件",
reading_local_cover: "读取配套图片",
@@ -44924,25 +44969,25 @@ var tge = {
skipped: "已跳过",
generating_preview: "生成视频预览",
writing_candidates: "保存待确认资料"
-}, EH = {
+}, MH = {
querying_metadata: "没有资料",
fetching_cover: "没有封面"
};
-function nge(e) {
- let t = Object.entries(e).filter(([e, t]) => EH[e] && t > 0).map(([e, t]) => `${EH[e]} ${t.toLocaleString()} 部`);
+function fge(e) {
+ let t = Object.entries(e).filter(([e, t]) => MH[e] && t > 0).map(([e, t]) => `${MH[e]} ${t.toLocaleString()} 部`);
return t.length ? `外部来源${t.join("、")},7 天内不再问。` : "";
}
-function rge(e) {
+function pge(e) {
if (e.status === "paused") return "已暂停";
if (e.status === "pausing") return "正在暂停";
- let t = tge[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${LF(e.waited_seconds)}` : "";
+ let t = dge[e.current_action || ""] || e.stage || "正在处理", n = e.waited_seconds ? ` · 已等待 ${HF(e.waited_seconds)}` : "";
return e.current_asset_name ? `当前:${e.current_asset_name} · ${t}${n}` : t + n;
}
-function ige(e) {
- let t = e.total ? `${RF(e.checked, e.total)} 项` : e.current_action === "scanning_files" || e.stage === "扫描文件" ? `已发现 ${(e.scanned || 0).toLocaleString()} 个文件` : "";
- return rge(e) + (t ? ` · ${t}` : "");
+function mge(e) {
+ let t = e.total ? `${UF(e.checked, e.total)} 项` : e.current_action === "scanning_files" || e.stage === "扫描文件" ? `已发现 ${(e.scanned || 0).toLocaleString()} 个文件` : "";
+ return pge(e) + (t ? ` · ${t}` : "");
}
-function age(e) {
+function hge(e) {
let t = e.issue_preview || [];
return t.length ? {
label: e.issues_truncated ? `问题清单:共 ${e.issue_count || 0} 项,展开查看前 ${t.length} 项` : `问题清单:共 ${e.issue_count || 0} 项`,
@@ -44956,22 +45001,22 @@ function age(e) {
log: e.issues_log || ""
} : null;
}
-var DH = "peach.library-processing.announced", oge = 120;
-function OH(e) {
+var NH = "peach.library-processing.announced", gge = 120;
+function PH(e) {
let t = e.completed_at == null ? Infinity : Date.now() / 1e3 - e.completed_at;
- return !!e.job_id && t >= 0 && t < oge;
+ return !!e.job_id && t >= 0 && t < gge;
}
-function sge(e, t, n) {
- if (e.status === "complete" && (n || OH(e))) {
+function _ge(e, t, n) {
+ if (e.status === "complete" && (n || PH(e))) {
try {
- if (e.job_id && localStorage.getItem(DH) === e.job_id) return;
- e.job_id && localStorage.setItem(DH, e.job_id);
+ if (e.job_id && localStorage.getItem(NH) === e.job_id) return;
+ e.job_id && localStorage.setItem(NH, e.job_id);
} catch {}
e.requested_stage === "previews" ? t(`视频预览已生成:${e.previews || 0} 部`) : t(`扫描与资料采集已完成:识别 ${e.identified || 0} 个番号,取得 ${e.candidates || 0} 组作品资料,自动保存 ${e.auto_applied || 0} 条` + (e.previews ? `,生成 ${e.previews} 部视频预览` : ""));
}
}
// src/react/boardui/components/base/buttons/link-button.tsx
-var kH = cF({
+var FH = hF({
base: "inline-flex items-center justify-center gap-1 whitespace-nowrap font-sans select-none cursor-pointer rounded-sm underline-offset-3 hover:underline transition-colors duration-150 ease outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-focus-ring disabled:cursor-not-allowed disabled:no-underline aria-disabled:cursor-not-allowed aria-disabled:no-underline",
size: {
medium: "text-body-medium",
@@ -44988,15 +45033,15 @@ var kH = cF({
secondary: "text-text-secondary active:text-text-primary disabled:text-text-tertiary aria-disabled:text-text-tertiary"
}
});
-function AH({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
- let c = sF(kH.base, kH.size[t], kH.variant[e], a), l = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
+function IH({ variant: e = "primary", size: t = "medium", leadingIcon: n, trailingIcon: r, children: i, className: a, disabled: o = !1, ...s }) {
+ let c = mF(FH.base, FH.size[t], FH.variant[e], a), l = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
n ? /* @__PURE__ */ (0, F.jsx)(n, {
- className: kH.icon[t],
+ className: FH.icon[t],
"aria-hidden": !0
}) : null,
i != null && /* @__PURE__ */ (0, F.jsx)("span", { children: i }),
r ? /* @__PURE__ */ (0, F.jsx)(r, {
- className: kH.icon[t],
+ className: FH.icon[t],
"aria-hidden": !0
}) : null
] });
@@ -45022,7 +45067,7 @@ function AH({ variant: e = "primary", size: t = "medium", leadingIcon: n, traili
});
}
// src/react/settings/use-action.ts
-function jH(e = "") {
+function LH(e = "") {
let t = (0, P.useRef)(null), [n, r] = (0, P.useState)(""), [i, a] = (0, P.useState)(e);
(0, P.useEffect)(() => () => t.current?.abort(), []);
async function o(e, n, i, o) {
@@ -45034,7 +45079,7 @@ function jH(e = "") {
s.signal.aborted || i(e);
} catch (e) {
if (s.signal.aborted) return;
- o ? o(e) : a(Wn(e));
+ o ? o(e) : a(ar(e));
} finally {
t.current === s && (t.current = null), s.signal.aborted || r("");
}
@@ -45047,10 +45092,10 @@ function jH(e = "") {
};
}
// src/react/library-processing/slow-item.tsx
-function MH({ state: e }) {
- let t = jH(), n = (e) => {
- t.busy || t.run(e.action, (t) => V(pH, e, "POST", t), (e) => {
- H.setQueryData(mH, e), H.invalidateQueries({ queryKey: mH });
+function RH({ state: e }) {
+ let t = LH(), n = (e) => {
+ t.busy || t.run(e.action, (t) => V(yH, e, "POST", t), (e) => {
+ H.setQueryData(bH, e), H.invalidateQueries({ queryKey: bH });
});
};
return /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -45062,7 +45107,7 @@ function MH({ state: e }) {
size: "small",
variant: "secondary",
disabled: e.skip_requested,
- ...Uz(t.busy === "skip_current"),
+ ...Yz(t.busy === "skip_current"),
onClick: () => {
e.job_id && e.current_asset_id != null && n({
action: "skip_current",
@@ -45086,37 +45131,37 @@ function MH({ state: e }) {
]
});
}
-function cge({ state: e, slow: t }) {
- return /* @__PURE__ */ (0, F.jsx)(Rz, {
+function vge({ state: e, slow: t }) {
+ return /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "warning",
- action: /* @__PURE__ */ (0, F.jsx)(MH, { state: e }),
- children: gH(t)
+ action: /* @__PURE__ */ (0, F.jsx)(RH, { state: e }),
+ children: SH(t)
});
}
-function lge({ state: e, slow: t }) {
+function yge({ state: e, slow: t }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-processing-slow": "",
className: "flex min-w-0 flex-wrap items-center justify-between gap-3",
children: [/* @__PURE__ */ (0, F.jsx)("p", {
className: "min-w-0 flex-auto text-body-2-regular wrap-anywhere",
- children: gH(t)
- }), /* @__PURE__ */ (0, F.jsx)(MH, { state: e })]
+ children: SH(t)
+ }), /* @__PURE__ */ (0, F.jsx)(RH, { state: e })]
});
}
// src/react/components/use-moving-surface.ts
-var uge = {
+var bge = {
selection: {
- type: cp,
+ type: Cp,
duration: .16,
bounce: 0
},
hover: {
- type: cp,
+ type: Cp,
duration: .08,
bounce: 0
}
};
-function NH(e) {
+function zH(e) {
let [t, n] = (0, P.useState)(null);
return (0, P.useLayoutEffect)(() => {
if (!t) return;
@@ -45137,7 +45182,7 @@ function NH(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 = db(n, { transform: [r, E] }, uge[e]);
+ l = _b(n, { transform: [r, E] }, bge[e]);
} else n.style.transform = E;
s = h, c = w, t.dataset.surfaceReady = "";
}, m = (t) => {
@@ -45173,24 +45218,24 @@ function NH(e) {
}, [t, e]), n;
}
// src/react/components/menu-dialog.tsx
-function PH(e) {
- let t = NH("hover");
- return /* @__PURE__ */ (0, F.jsx)(yR, {
+function BH(e) {
+ let t = zH("hover");
+ return /* @__PURE__ */ (0, F.jsx)(TR, {
...e,
ref: t
});
}
// src/react/library-processing/processing-effort.tsx
-var FH = [
+var VH = [
"low",
"standard",
"high"
-], IH = [
+], HH = [
"低占用",
"标准",
"全速"
-], LH = Vz("snail"), RH = Vz("zap");
-function zH({ className: e }) {
+], UH = qz("snail"), WH = qz("zap");
+function GH({ className: e }) {
return /* @__PURE__ */ (0, F.jsxs)("svg", {
className: `processing-effort-double ${e ?? ""}`,
"aria-hidden": "true",
@@ -45221,12 +45266,12 @@ function zH({ className: e }) {
]
});
}
-var dge = [
- LH,
- RH,
- zH
+var xge = [
+ UH,
+ WH,
+ GH
];
-function fge({ animate: e }) {
+function Sge({ animate: e }) {
let [t, n] = (0, P.useState)(document.hidden);
return (0, P.useEffect)(() => {
let e = () => n(document.hidden);
@@ -45258,8 +45303,8 @@ function fge({ animate: e }) {
} }, t))]
});
}
-function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
- let i = Math.max(0, FH.indexOf(e)), [a, o] = (0, P.useState)(i);
+function KH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
+ let i = Math.max(0, VH.indexOf(e)), [a, o] = (0, P.useState)(i);
return (0, P.useEffect)(() => {
t || o(i);
}, [i, t]), /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -45270,7 +45315,7 @@ function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "text-text-tertiary",
children: "处理强度 "
- }), IH[a]]
+ }), HH[a]]
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "processing-effort-scale text-caption-1-regular text-text-tertiary",
@@ -45278,19 +45323,19 @@ function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
children: [
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-selected": a === 0 || void 0,
- children: [/* @__PURE__ */ (0, F.jsx)(LH, {}), "最慢"]
+ children: [/* @__PURE__ */ (0, F.jsx)(UH, {}), "最慢"]
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-selected": a === 1 || void 0,
- children: [/* @__PURE__ */ (0, F.jsx)(RH, {}), "标准"]
+ children: [/* @__PURE__ */ (0, F.jsx)(WH, {}), "标准"]
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-selected": a === 2 || void 0,
- children: [/* @__PURE__ */ (0, F.jsx)(zH, {}), "最快"]
+ children: [/* @__PURE__ */ (0, F.jsx)(GH, {}), "最快"]
})
]
}),
- /* @__PURE__ */ (0, F.jsxs)(sde, {
+ /* @__PURE__ */ (0, F.jsxs)(_de, {
"aria-label": "处理速度",
minValue: 0,
maxValue: 2,
@@ -45299,10 +45344,10 @@ function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
isDisabled: t,
onChange: o,
onChangeEnd: (e) => {
- e !== i && n(FH[e]);
+ e !== i && n(VH[e]);
},
className: "processing-effort-slider",
- children: [/* @__PURE__ */ (0, F.jsx)(jI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(LI, {
className: "processing-effort-label",
children: "处理速度"
}), /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -45322,11 +45367,11 @@ function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
/* @__PURE__ */ (0, F.jsx)("i", {})
]
}),
- a === 2 ? /* @__PURE__ */ (0, F.jsx)(fge, { animate: r }) : null,
- /* @__PURE__ */ (0, F.jsx)(cde, {
+ a === 2 ? /* @__PURE__ */ (0, F.jsx)(Sge, { animate: r }) : null,
+ /* @__PURE__ */ (0, F.jsx)(vde, {
className: "processing-effort-hit",
- children: /* @__PURE__ */ (0, F.jsx)(lde, {
- "aria-label": IH[a],
+ children: /* @__PURE__ */ (0, F.jsx)(yde, {
+ "aria-label": HH[a],
className: "processing-effort-thumb"
})
})
@@ -45340,8 +45385,8 @@ function BH({ value: e, busy: t, onChange: n, animate: r = !0 }) {
]
});
}
-function pge({ value: e, busy: t, onChange: n, animate: r = !0 }) {
- let i = (0, P.useRef)(null), [a, o] = (0, P.useState)(!1), s = Math.max(0, FH.indexOf(e));
+function Cge({ value: e, busy: t, onChange: n, animate: r = !0 }) {
+ let i = (0, P.useRef)(null), [a, o] = (0, P.useState)(!1), s = Math.max(0, VH.indexOf(e));
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "processing-effort-trigger",
"data-speed": e,
@@ -45349,28 +45394,28 @@ function pge({ value: e, busy: t, onChange: n, animate: r = !0 }) {
ref: i,
size: "small",
variant: "secondary",
- "aria-label": `处理速度:${IH[s]}`,
+ "aria-label": `处理速度:${HH[s]}`,
"aria-haspopup": "dialog",
"aria-expanded": a,
"aria-disabled": t,
- leadingIcon: dge[s],
- trailingIcon: fz,
+ leadingIcon: xge[s],
+ trailingIcon: vz,
onClick: () => {
t || o(!a);
},
- children: IH[s]
+ children: HH[s]
})
- }), /* @__PURE__ */ (0, F.jsx)(oR, {
+ }), /* @__PURE__ */ (0, F.jsx)(fR, {
triggerRef: i,
isOpen: a,
onOpenChange: o,
placement: "top start",
offset: 8,
- className: eV,
- children: /* @__PURE__ */ (0, F.jsx)(PH, {
+ className: oV,
+ children: /* @__PURE__ */ (0, F.jsx)(BH, {
"aria-label": "处理速度",
className: "outline-none",
- children: /* @__PURE__ */ (0, F.jsx)(BH, {
+ children: /* @__PURE__ */ (0, F.jsx)(KH, {
value: e,
busy: t,
onChange: n,
@@ -45380,10 +45425,10 @@ function pge({ value: e, busy: t, onChange: n, animate: r = !0 }) {
})] });
}
// src/react/library-processing/processing-controls.tsx
-function VH({ state: e, disabled: t = !1 }) {
- let n = jH(), r = _H(e), i = e.status === "stopping", a = e.status === "paused" ? "继续" : e.status === "pausing" ? "正在暂停" : "暂停", o = (e) => {
- t || n.busy || n.run(e.action, (t) => V(pH, e, "POST", t), (e) => {
- H.setQueryData(mH, e), H.invalidateQueries({ queryKey: mH });
+function qH({ state: e, disabled: t = !1 }) {
+ let n = LH(), r = CH(e), i = e.status === "stopping", a = e.status === "paused" ? "继续" : e.status === "pausing" ? "正在暂停" : "暂停", o = (e) => {
+ t || n.busy || n.run(e.action, (t) => V(yH, e, "POST", t), (e) => {
+ H.setQueryData(bH, e), H.invalidateQueries({ queryKey: bH });
});
};
return /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -45392,7 +45437,7 @@ function VH({ state: e, disabled: t = !1 }) {
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [
- /* @__PURE__ */ (0, F.jsx)(pge, {
+ /* @__PURE__ */ (0, F.jsx)(Cge, {
value: e.speed_mode || "standard",
busy: t || !!n.busy || i,
animate: e.status !== "paused" && e.status !== "pausing",
@@ -45406,11 +45451,11 @@ function VH({ state: e, disabled: t = !1 }) {
size: "small",
variant: "secondary",
iconOnly: !0,
- leadingIcon: e.status === "paused" ? Cz : Sz,
+ leadingIcon: e.status === "paused" ? kz : Oz,
"aria-label": a,
title: a,
disabled: t || !e.job_id || e.status === "pausing" || i,
- ...Uz(n.busy === "pause" || n.busy === "resume"),
+ ...Yz(n.busy === "pause" || n.busy === "resume"),
onClick: () => {
e.job_id && o({
action: e.status === "paused" ? "resume" : "pause",
@@ -45422,7 +45467,7 @@ function VH({ state: e, disabled: t = !1 }) {
size: "small",
variant: "secondary",
disabled: t || !e.job_id || i,
- ...Uz(n.busy === "cancel"),
+ ...Yz(n.busy === "cancel"),
onClick: () => {
e.job_id && o({
action: "cancel",
@@ -45440,11 +45485,11 @@ function VH({ state: e, disabled: t = !1 }) {
});
}
// src/react/library-processing/use-library-processing.ts
-function HH({ toast: e, mode: t, monitor: n }) {
+function JH({ toast: e, mode: t, monitor: n }) {
let r = t === "notice" || !!n, i = Pt({
- queryKey: mH,
- queryFn: ({ signal: e }) => SH(e),
- refetchInterval: (e) => TH(e.state.data, r)
+ queryKey: bH,
+ queryFn: ({ signal: e }) => OH(e),
+ refetchInterval: (e) => jH(e.state.data, r)
}), [a, o] = (0, P.useState)(null), s = (0, P.useRef)(void 0), c = i.data;
return (0, P.useEffect)(() => {
if (!c) return;
@@ -45455,8 +45500,8 @@ function HH({ toast: e, mode: t, monitor: n }) {
"pausing",
"paused",
"stopping"
- ].includes(n) && !_H(c);
- r && o(c), (r || t === "notice") && sge(c, e, r);
+ ].includes(n) && !CH(c);
+ r && o(c), (r || t === "notice") && _ge(c, e, r);
}, [
c,
t,
@@ -45468,37 +45513,37 @@ function HH({ toast: e, mode: t, monitor: n }) {
};
}
// src/react/components/card.tsx
-var mge = "min-w-0", hge = {
+var wge = "min-w-0", Tge = {
filled: "bg-background-secondary-default",
outlined: "border border-separator-border bg-background-primary-default",
raised: "bg-background-primary-default"
-}, gge = {
+}, Ege = {
default: "rounded-2xl shadow-card",
chart: "rounded-2-5xl",
surface: "rounded-surface",
plain: "rounded-2xl"
-}, _ge = {
+}, Dge = {
line: "border border-border-button-default",
soft: "border border-separator-border"
-}, vge = {
+}, Oge = {
none: "",
default: "p-5"
-}, yge = "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", bge = "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 UH(e = {}) {
+}, kge = "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", Age = "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 YH(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 [
- mge,
- hge[t],
- gge[s],
- vge[n],
- a ? _ge[a] : "",
- r ? yge : "",
- i ? bge : "",
+ wge,
+ Tge[t],
+ Ege[s],
+ Oge[n],
+ a ? Dge[a] : "",
+ r ? kge : "",
+ i ? Age : "",
o ?? ""
].filter(Boolean).join(" ");
}
// src/react/components/loading-dots.tsx
-function WH({ label: e }) {
+function XH({ label: e }) {
return /* @__PURE__ */ (0, F.jsxs)("p", {
role: "status",
className: "flex min-w-0 items-center gap-2 text-caption-1-regular text-text-secondary",
@@ -45517,21 +45562,21 @@ function WH({ label: e }) {
});
}
// src/react/components/progress.tsx
-var GH = 100, xge = .4;
-function KH({ label: e, value: t, max: n = 100, stops: r = [] }) {
- let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(Number.isFinite(e) ? e : 0, 0), i), o = (e) => a(e) / i * GH;
+var ZH = 100, jge = .4;
+function QH({ label: e, value: t, max: n = 100, stops: r = [] }) {
+ let i = n > 0 ? n : 1, a = (e) => Math.min(Math.max(Number.isFinite(e) ? e : 0, 0), i), o = (e) => a(e) / i * ZH;
return /* @__PURE__ */ (0, F.jsxs)("svg", {
role: "progressbar",
"aria-label": e,
"aria-valuemin": 0,
"aria-valuemax": i,
"aria-valuenow": a(t),
- viewBox: `0 0 ${GH} 1`,
+ viewBox: `0 0 ${ZH} 1`,
preserveAspectRatio: "none",
className: "h-1.5 w-full overflow-hidden rounded-full",
children: [
/* @__PURE__ */ (0, F.jsx)("rect", {
- width: GH,
+ width: ZH,
height: 1,
className: "fill-background-tertiary-default"
}),
@@ -45542,7 +45587,7 @@ function KH({ label: e, value: t, max: n = 100, stops: r = [] }) {
}),
r.map((e) => /* @__PURE__ */ (0, F.jsx)("rect", {
x: o(e),
- width: xge,
+ width: jge,
height: 1,
className: "fill-background-secondary-default"
}, e))
@@ -45550,26 +45595,26 @@ function KH({ label: e, value: t, max: n = 100, stops: r = [] }) {
});
}
// src/react/components/task-progress.tsx
-function qH({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
+function $H({ label: e, value: t = 0, total: n, embedded: r = !1 }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-task-progress": !0,
- className: r ? "flex flex-col gap-1.5" : UH({
+ className: r ? "flex flex-col gap-1.5" : YH({
variant: "outlined",
padding: "none",
className: "flex flex-col gap-1.5 px-4 py-3.5"
}),
- children: n && n > 0 ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(KH, {
+ children: n && n > 0 ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(QH, {
label: e,
value: t,
max: n
}), /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-caption-1-regular text-text-secondary wrap-anywhere",
children: e
- })] }) : /* @__PURE__ */ (0, F.jsx)(WH, { label: e })
+ })] }) : /* @__PURE__ */ (0, F.jsx)(XH, { label: e })
});
}
// src/react/library-processing/processing-line.tsx
-function JH(e) {
+function eU(e) {
let [t, n] = (0, P.useState)({
snapshot: e,
seconds: 0
@@ -45585,17 +45630,17 @@ function JH(e) {
return () => window.clearInterval(r);
}, [e, i]);
let a = i && t.snapshot === e ? t.seconds : 0;
- return ige(a ? {
+ return mge(a ? {
...e,
waited_seconds: r + a
} : e);
}
-function Sge({ state: e }) {
- return JH(e);
+function Mge({ state: e }) {
+ return eU(e);
}
-function Cge({ state: e }) {
- let t = JH(e);
- return /* @__PURE__ */ (0, F.jsx)(qH, {
+function Nge({ state: e }) {
+ let t = eU(e);
+ return /* @__PURE__ */ (0, F.jsx)($H, {
embedded: !0,
label: t,
value: Math.min(e.checked || 0, e.total || 0),
@@ -45603,18 +45648,18 @@ function Cge({ state: e }) {
});
}
// src/react/components/collapse-region.tsx
-function YH({ open: e, children: t, ...n }) {
+function tU({ open: e, children: t, ...n }) {
let r = (0, P.useRef)(null), i = (0, P.useRef)(!1);
return (0, P.useLayoutEffect)(() => {
let t = r.current;
- t && (i.current ? So(t, e) : (i.current = !0, t.hidden = !e, t.inert = !e, t.classList.add("ui-fcollapse"), t.classList.toggle("ui-fcollapse-settled", e)));
+ t && (i.current ? Lo(t, e) : (i.current = !0, t.hidden = !e, t.inert = !e, t.classList.add("ui-fcollapse"), t.classList.toggle("ui-fcollapse-settled", e)));
}, [e]), /* @__PURE__ */ (0, F.jsx)("div", {
...n,
ref: r,
children: t
});
}
-function XH(e) {
+function nU(e) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
...e,
"aria-hidden": !0,
@@ -45629,21 +45674,21 @@ function XH(e) {
});
}
// src/react/boardui/components/application/settings/settings-rows.tsx
-function ZH({ className: e, children: t }) {
+function rU({ className: e, children: t }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
- className: sF("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
+ className: mF("flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3", e),
children: t
});
}
-function QH({ className: e, children: t }) {
+function iU({ className: e, children: t }) {
return /* @__PURE__ */ (0, F.jsx)("p", {
- className: sF("w-full px-3 text-body-2-medium text-text-secondary", e),
+ className: mF("w-full px-3 text-body-2-medium text-text-secondary", e),
children: t
});
}
-function wge({ label: e, description: t, children: n }) {
+function Pge({ label: e, description: t, children: n }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
- className: sF("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: mF("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, F.jsxs)("div", {
className: "flex min-w-0 flex-col",
children: [/* @__PURE__ */ (0, F.jsx)("p", {
@@ -45657,7 +45702,7 @@ function wge({ label: e, description: t, children: n }) {
});
}
// src/react/settings/section.tsx
-function Tge({ title: e, icon: t, id: n, aside: r, onSubmit: i, children: a }) {
+function Fge({ title: e, icon: t, id: n, aside: r, onSubmit: i, children: a }) {
let o = t ? /* @__PURE__ */ (0, F.jsxs)("span", {
className: "inline-flex items-center gap-1.5",
children: [t, e]
@@ -45665,12 +45710,12 @@ function Tge({ title: e, icon: t, id: n, aside: r, onSubmit: i, children: a }) {
className: "flex w-full flex-wrap items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, F.jsx)("div", {
className: "min-w-40 flex-1",
- children: /* @__PURE__ */ (0, F.jsx)(QH, { children: o })
+ children: /* @__PURE__ */ (0, F.jsx)(iU, { children: o })
}), /* @__PURE__ */ (0, F.jsx)("div", {
className: "flex min-w-0 max-w-full",
children: r
})]
- }) : /* @__PURE__ */ (0, F.jsx)(QH, { children: o }), /* @__PURE__ */ (0, F.jsx)(ZH, { children: a })] });
+ }) : /* @__PURE__ */ (0, F.jsx)(iU, { children: o }), /* @__PURE__ */ (0, F.jsx)(rU, { children: a })] });
return i ? /* @__PURE__ */ (0, F.jsx)("form", {
id: n,
"aria-label": e,
@@ -45685,13 +45730,13 @@ function Tge({ title: e, icon: t, id: n, aside: r, onSubmit: i, children: a }) {
children: s
});
}
-function Ege({ children: e }) {
+function Ige({ children: e }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
className: "ui-settings-rows flex flex-col empty:hidden",
children: e
});
}
-function Dge({ divided: e = !1, children: t }) {
+function Lge({ divided: e = !1, children: t }) {
return e ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "flex flex-col gap-4 border-t border-separator-border py-4 pr-3 empty:hidden",
children: t
@@ -45700,7 +45745,7 @@ function Dge({ divided: e = !1, children: t }) {
children: t
});
}
-function Oge({ label: e, html: t }) {
+function Rge({ label: e, html: t }) {
let [n] = (0, P.useState)(t);
return /* @__PURE__ */ (0, F.jsx)("div", {
className: "contents",
@@ -45710,7 +45755,7 @@ function Oge({ label: e, html: t }) {
dangerouslySetInnerHTML: { __html: n }
});
}
-function kge({ status: e, children: t }) {
+function zge({ status: e, children: t }) {
return /* @__PURE__ */ (0, F.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 empty:hidden",
children: [e ? /* @__PURE__ */ (0, F.jsx)("div", {
@@ -45719,34 +45764,34 @@ function kge({ status: e, children: t }) {
}) : null, t]
});
}
-function $H({ role: e, children: t }) {
+function aU({ role: e, children: t }) {
return /* @__PURE__ */ (0, F.jsx)("p", {
role: e,
className: "text-body-2-regular text-text-secondary",
children: t
});
}
-function eU({ children: e }) {
+function oU({ children: e }) {
return /* @__PURE__ */ (0, F.jsx)("p", {
role: "alert",
className: "text-body-2-regular text-text-error-primary",
children: e
});
}
-function tU({ children: e }) {
+function sU({ children: e }) {
return /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-medium text-text-primary",
children: e
});
}
-function Age({ href: e, children: t, leadingIcon: n }) {
- return /* @__PURE__ */ (0, F.jsx)(AH, {
+function Bge({ href: e, children: t, leadingIcon: n }) {
+ return /* @__PURE__ */ (0, F.jsx)(IH, {
href: e,
target: "_blank",
rel: "noopener noreferrer",
size: "small",
leadingIcon: n,
- trailingIcon: gz,
+ trailingIcon: Sz,
className: "min-w-0 max-w-full",
children: /* @__PURE__ */ (0, F.jsx)("span", {
className: "min-w-0 whitespace-normal break-all",
@@ -45754,22 +45799,22 @@ function Age({ href: e, children: t, leadingIcon: n }) {
})
});
}
-function jge() {
- return /* @__PURE__ */ (0, F.jsx)(AH, {
+function Vge() {
+ return /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/tasks",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
className: "self-start",
children: "在任务中心查看进度"
});
}
-function Mge({ children: e }) {
+function Hge({ children: e }) {
return /* @__PURE__ */ (0, F.jsx)("dl", {
className: "ui-settings-facts flex flex-col empty:hidden",
children: e
});
}
-function Nge({ term: e, children: t }) {
+function Uge({ term: e, children: t }) {
return /* @__PURE__ */ (0, F.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, F.jsx)("dt", {
@@ -45781,10 +45826,10 @@ function Nge({ term: e, children: t }) {
})]
});
}
-function nU({ summary: e, defaultOpen: t = !1, isOpen: n, children: r, trailing: i = !1, onOpenChange: a, contentClassName: o }) {
+function cU({ summary: e, defaultOpen: t = !1, isOpen: n, children: r, trailing: i = !1, onOpenChange: a, contentClassName: o }) {
let s = (0, P.useId)(), c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = (0, P.useRef)(!1), [d, f] = (0, P.useState)(n ?? t);
return (0, P.useLayoutEffect)(() => {
- n !== void 0 && n !== d && c.current && l.current && (xo(c.current, l.current, n), f(n));
+ n !== void 0 && n !== d && c.current && l.current && (Io(c.current, l.current, n), f(n));
}, [n, d]), /* @__PURE__ */ (0, F.jsxs)("details", {
ref: (e) => {
c.current = e, e && (n ?? t) && !u.current && (u.current = !0, e.open = !0);
@@ -45793,16 +45838,16 @@ function nU({ summary: e, defaultOpen: t = !1, isOpen: n, children: r, trailing:
"aria-expanded": d,
"aria-controls": s,
onClick: (e) => {
- e.preventDefault(), c.current && l.current && (xo(c.current, l.current, !d), f(!d), a?.(!d));
+ e.preventDefault(), c.current && l.current && (Io(c.current, l.current, !d), f(!d), a?.(!d));
},
className: `${i ? "w-full" : "w-fit"} flex 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: [
- i ? null : /* @__PURE__ */ (0, F.jsx)(mz, {
+ i ? null : /* @__PURE__ */ (0, F.jsx)(bz, {
"aria-hidden": !0,
className: d ? "size-(--icon-inline) shrink-0 rotate-90 transition-transform" : "size-(--icon-inline) shrink-0 transition-transform"
}),
e,
- i ? /* @__PURE__ */ (0, F.jsx)(mz, {
+ i ? /* @__PURE__ */ (0, F.jsx)(bz, {
"aria-hidden": !0,
className: d ? "ml-auto size-(--icon-inline) shrink-0 -rotate-90 transition-transform" : "ml-auto size-(--icon-inline) shrink-0 rotate-90 transition-transform"
}) : null
@@ -45812,13 +45857,13 @@ function nU({ summary: e, defaultOpen: t = !1, isOpen: n, children: r, trailing:
id: s,
inert: !d,
children: /* @__PURE__ */ (0, F.jsx)("div", {
- className: sF("flex flex-col gap-2 pt-3", o),
+ className: mF("flex flex-col gap-2 pt-3", o),
children: r
})
})]
});
}
-function Pge({ name: e }) {
+function Wge({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
"aria-hidden": !0,
"data-source-mark": e,
@@ -45828,34 +45873,34 @@ function Pge({ name: e }) {
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
}
-function rU({ mark: e }) {
+function lU({ mark: e }) {
return e.startsWith("data:image/png;base64,") ? /* @__PURE__ */ (0, F.jsx)("img", {
src: e,
alt: "",
width: 16,
height: 16,
className: "size-(--icon-inline) shrink-0"
- }) : /* @__PURE__ */ (0, F.jsx)(Pge, { name: e });
+ }) : /* @__PURE__ */ (0, F.jsx)(Wge, { name: e });
}
// src/react/components/source-label.tsx
-var iU = (e) => e.startsWith("clouddrive:") ? e.split(":")[1] : e, Fge = Object.fromEntries(Object.entries(Qo).map(([e, t]) => [e, function({ className: e }) {
+var uU = (e) => e.startsWith("clouddrive:") ? e.split(":")[1] : e, Gge = Object.fromEntries(Object.entries(ps).map(([e, t]) => [e, function({ className: e }) {
return /* @__PURE__ */ (0, F.jsx)("span", {
className: e,
- children: /* @__PURE__ */ (0, F.jsx)(rU, { mark: t })
+ children: /* @__PURE__ */ (0, F.jsx)(lU, { mark: t })
});
}]));
-function Ige({ className: e }) {
+function Kge({ className: e }) {
return /* @__PURE__ */ (0, F.jsx)("span", {
className: e,
- children: /* @__PURE__ */ (0, F.jsx)(rU, { mark: "database" })
+ children: /* @__PURE__ */ (0, F.jsx)(lU, { mark: "database" })
});
}
-var aU = (e) => Fge[iU(e)] ?? Ige;
-function Lge({ site: e, label: t }) {
+var dU = (e) => Gge[uU(e)] ?? Kge;
+function qge({ site: e, label: t }) {
let [n, r] = (0, P.useState)(!1), i = e === "javdb" ? "/site-mark?source=javdb" : e === "missav" ? "/site-mark?domain=missav.com" : null;
return /* @__PURE__ */ (0, F.jsxs)("span", {
className: "inline-flex min-w-0 items-center gap-1.5",
- children: [n || !i ? /* @__PURE__ */ (0, F.jsx)(rU, { mark: "globe" }) : /* @__PURE__ */ (0, F.jsx)("img", {
+ children: [n || !i ? /* @__PURE__ */ (0, F.jsx)(lU, { mark: "globe" }) : /* @__PURE__ */ (0, F.jsx)("img", {
src: i,
alt: "",
className: "size-(--icon-inline) shrink-0 object-contain",
@@ -45863,24 +45908,24 @@ function Lge({ site: e, label: t }) {
}), /* @__PURE__ */ (0, F.jsx)("span", { children: t })]
});
}
-function oU({ source: e, label: t }) {
- let n = iU(e);
+function fU({ source: e, label: t }) {
+ let n = uU(e);
return /* @__PURE__ */ (0, F.jsxs)("span", {
className: "inline-flex min-w-0 items-center gap-1.5",
- children: [/* @__PURE__ */ (0, F.jsx)(rU, { mark: Qo[n] || (n === "local" ? "hard-drive" : "database") }), /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [/* @__PURE__ */ (0, F.jsx)(lU, { mark: ps[n] || (n === "local" ? "hard-drive" : "database") }), /* @__PURE__ */ (0, F.jsx)("span", {
className: "min-w-0 truncate",
children: t
})]
});
}
// src/react/library-processing/processing-traffic.tsx
-var sU = (e) => jn(e).replace(/\s/g, ""), cU = (e) => e >= 1024 ** 2 && e < 1024 ** 3 ? `${Number((e / 1024 ** 2).toFixed(1))}MB` : sU(e), Rge = (e, t) => {
- if (e === t) return sU(t);
- let [n, r] = jn(e).split(" "), [i, a] = jn(t).split(" ");
- return r === a ? `${n}-${i}${a}` : `${sU(e)}-${sU(t)}`;
-}, lU = (e, t, n) => e === void 0 ? Rge(t, n) : `${e > 0 ? "约 " : ""}${sU(e)}`;
-function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r }) {
- let i = cV(), [a, o] = (0, P.useState)(!1), s = (0, P.useId)(), c = n ?? a;
+var pU = (e) => Kn(e).replace(/\s/g, ""), mU = (e) => e >= 1024 ** 2 && e < 1024 ** 3 ? `${Number((e / 1024 ** 2).toFixed(1))}MB` : pU(e), Jge = (e, t) => {
+ if (e === t) return pU(t);
+ let [n, r] = Kn(e).split(" "), [i, a] = Kn(t).split(" ");
+ return r === a ? `${n}-${i}${a}` : `${pU(e)}-${pU(t)}`;
+}, hU = (e, t, n) => e === void 0 ? Jge(t, n) : `${e > 0 ? "约 " : ""}${pU(e)}`;
+function gU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r }) {
+ let i = mV(), [a, o] = (0, P.useState)(!1), s = (0, P.useId)(), c = n ?? a;
if (!e) return null;
let l = (e) => e.toLocaleString("zh-CN");
return /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -45922,25 +45967,25 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
children: [
/* @__PURE__ */ (0, F.jsxs)("p", {
className: "inline-flex items-center gap-1.5",
- children: [/* @__PURE__ */ (0, F.jsx)(yz, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Tz, {
"aria-hidden": !0,
className: "size-(--icon-inline) shrink-0"
}), e.inventory && !e.inventory.complete ? "已识别流量" : "预计流量"]
}),
/* @__PURE__ */ (0, F.jsx)("p", {
className: "text-title-3-semibold text-text-primary",
- children: lU(e.estimated_bytes, e.estimated_min_bytes, e.estimated_max_bytes)
+ children: hU(e.estimated_bytes, e.estimated_min_bytes, e.estimated_max_bytes)
}),
/* @__PURE__ */ (0, F.jsxs)("p", { children: [
e.unknown_route_estimated_bytes ? "已确认代理" : "代理",
" ",
- lU(e.metered_estimated_bytes, e.metered_estimated_min_bytes, e.metered_estimated_max_bytes)
+ hU(e.metered_estimated_bytes, e.metered_estimated_min_bytes, e.metered_estimated_max_bytes)
] }),
t ? null : /* @__PURE__ */ (0, F.jsxs)("p", { children: [
"已用 ",
- /* @__PURE__ */ (0, F.jsxs)("span", { children: [e.partial ? "约 " : "", sU(e.used_bytes)] }),
+ /* @__PURE__ */ (0, F.jsxs)("span", { children: [e.partial ? "约 " : "", pU(e.used_bytes)] }),
" · 代理 ",
- sU(e.metered_used_bytes)
+ pU(e.metered_used_bytes)
] })
]
}), e.disk ? /* @__PURE__ */ (0, F.jsxs)("section", {
@@ -45949,25 +45994,25 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
children: [
/* @__PURE__ */ (0, F.jsxs)("p", {
className: "inline-flex items-center gap-1.5",
- children: [/* @__PURE__ */ (0, F.jsx)(Gpe, {
+ children: [/* @__PURE__ */ (0, F.jsx)(tme, {
"aria-hidden": !0,
className: "size-(--icon-inline) shrink-0"
}), e.inventory && !e.inventory.complete ? "已识别占用" : "预计占用"]
}),
/* @__PURE__ */ (0, F.jsxs)("p", {
className: "text-title-3-semibold text-text-primary",
- children: ["约 ", sU(e.disk.estimated_bytes)]
+ children: ["约 ", pU(e.disk.estimated_bytes)]
}),
- e.disk.temporary_bytes > 0 ? /* @__PURE__ */ (0, F.jsxs)("p", { children: ["抽帧临时文件约 ", cU(e.disk.temporary_bytes)] }) : null,
+ e.disk.temporary_bytes > 0 ? /* @__PURE__ */ (0, F.jsxs)("p", { children: ["抽帧临时文件约 ", mU(e.disk.temporary_bytes)] }) : null,
e.disk.volumes.map((e) => /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-col gap-1",
children: [/* @__PURE__ */ (0, F.jsxs)("p", { children: [
e.path,
" 剩余 ",
- e.free_bytes == null ? "未取得" : sU(e.free_bytes)
+ e.free_bytes == null ? "未取得" : pU(e.free_bytes)
] }), e.can_fit === !1 ? /* @__PURE__ */ (0, F.jsxs)("p", {
role: "status",
- children: ["空间不足,还差 ", sU(e.shortfall_bytes || 0)]
+ children: ["空间不足,还差 ", pU(e.shortfall_bytes || 0)]
}) : null]
}, e.path)),
e.disk.cache_unknown ? /* @__PURE__ */ (0, F.jsx)("p", {
@@ -45983,7 +46028,7 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
className: "self-start",
"aria-expanded": c,
"aria-controls": s,
- trailingIcon: c ? lpe : fz,
+ trailingIcon: c ? ype : vz,
onClick: () => {
o(!c), r?.(!c);
},
@@ -46002,12 +46047,12 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 items-start justify-between gap-2",
- children: [e.root ? /* @__PURE__ */ (0, F.jsx)(oU, {
+ children: [e.root ? /* @__PURE__ */ (0, F.jsx)(fU, {
source: e.location,
label: e.label
}) : /* @__PURE__ */ (0, F.jsxs)("span", {
className: "inline-flex min-w-0 items-center gap-1.5",
- children: [/* @__PURE__ */ (0, F.jsx)(rU, { mark: "globe" }), e.label]
+ children: [/* @__PURE__ */ (0, F.jsx)(lU, { mark: "globe" }), e.label]
}), /* @__PURE__ */ (0, F.jsx)("span", {
className: "shrink-0",
children: e.connection === "system" ? "跟随系统" : e.connection === "unknown" ? "连接待确认" : e.metered ? "代理" : "直连"
@@ -46029,7 +46074,7 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
"待补资料 ",
l(e.workload.pending_jav_titles),
" 部 · 平均约 ",
- cU(e.workload.metadata_average_bytes || 0),
+ mU(e.workload.metadata_average_bytes || 0),
"/部"
]
}) : null,
@@ -46039,8 +46084,8 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
"已用",
e.unobserved.length ? "约" : "",
" ",
- sU(e.used_bytes)
- ] }), /* @__PURE__ */ (0, F.jsxs)("span", { children: ["预计 ", lU(e.estimated_bytes, e.estimated_min_bytes, e.estimated_max_bytes)] })]
+ pU(e.used_bytes)
+ ] }), /* @__PURE__ */ (0, F.jsxs)("span", { children: ["预计 ", hU(e.estimated_bytes, e.estimated_min_bytes, e.estimated_max_bytes)] })]
})
]
}, e.key))
@@ -46051,15 +46096,15 @@ function uU({ traffic: e, initial: t = !1, detailsOpen: n, onDetailsChange: r })
});
}
// src/react/library-processing/library-processing-notice.tsx
-var dU = "peach.library-processing.collapsed";
-function fU(e) {
+var _U = "peach.library-processing.collapsed";
+function vU(e) {
try {
- return !e || sessionStorage.getItem(dU) !== e;
+ return !e || sessionStorage.getItem(_U) !== e;
} catch {
return !0;
}
}
-function zge({ value: e, max: t }) {
+function Yge({ value: e, max: t }) {
let n = Math.max(0, Math.min(100, e / t * 100));
return /* @__PURE__ */ (0, F.jsxs)("svg", {
role: "progressbar",
@@ -46089,14 +46134,14 @@ function zge({ value: e, max: t }) {
})]
});
}
-function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
- let [i, a] = (0, P.useState)(() => fU(e?.job_id)), o = (0, P.useId)(), [s, c] = (0, P.useState)(!1), l = (0, P.useRef)(null), u = !t && vH(e), d = e?.status === "failed" && !u, f = _H(e);
+function yU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
+ let [i, a] = (0, P.useState)(() => vU(e?.job_id)), o = (0, P.useId)(), [s, c] = (0, P.useState)(!1), l = (0, P.useRef)(null), u = !t && wH(e), d = e?.status === "failed" && !u, f = CH(e);
(0, P.useEffect)(() => {
- a(fU(e?.job_id)), c(!1);
+ a(vU(e?.job_id)), c(!1);
}, [e?.job_id]);
let p = () => {
try {
- i && e?.job_id ? sessionStorage.setItem(dU, e.job_id) : sessionStorage.removeItem(dU);
+ i && e?.job_id ? sessionStorage.setItem(_U, e.job_id) : sessionStorage.removeItem(_U);
} catch {}
i && c(!1), a(!i);
};
@@ -46111,14 +46156,14 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
t = !0, i.disconnect(), document.documentElement.style.removeProperty("--processing-toast-space");
};
}, [n]), e?.archived && !t || !t && !f && !d && !u) return null;
- let m = t ? null : hH(e), h = !!t || !!e?.stalled || u || !!m, g = u ? "处理已结束,部分项目需处理" : d ? "扫描与采集已中断" : e?.status === "paused" ? "扫描与采集已暂停" : "扫描与采集";
+ let m = t ? null : xH(e), h = !!t || !!e?.stalled || u || !!m, g = u ? "处理已结束,部分项目需处理" : d ? "扫描与采集已中断" : e?.status === "paused" ? "扫描与采集已暂停" : "扫描与采集";
return /* @__PURE__ */ (0, F.jsxs)("aside", {
ref: l,
"data-processing-dock": "",
"data-processing-tone": d ? "error" : h ? "warning" : "neutral",
"aria-label": "扫描任务",
role: d ? "alert" : "status",
- className: sF("flex min-w-0 flex-col border bg-background-primary-default p-4", d ? "border-current/35 text-text-error-primary" : h ? "border-current/35 text-status-yellow-text" : "border-border-button-default text-text-primary"),
+ className: mF("flex min-w-0 flex-col border bg-background-primary-default p-4", d ? "border-current/35 text-text-error-primary" : h ? "border-current/35 text-status-yellow-text" : "border-border-button-default text-text-primary"),
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-col gap-3",
@@ -46126,13 +46171,13 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 items-center gap-3",
children: [
- f && e?.total ? /* @__PURE__ */ (0, F.jsx)(zge, {
+ f && e?.total ? /* @__PURE__ */ (0, F.jsx)(Yge, {
value: e.checked || 0,
max: e.total
- }) : d || h ? /* @__PURE__ */ (0, F.jsx)(Spe, {
+ }) : d || h ? /* @__PURE__ */ (0, F.jsx)(Mpe, {
"aria-hidden": !0,
className: "size-5 shrink-0"
- }) : /* @__PURE__ */ (0, F.jsx)(Npe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(Upe, {
"aria-hidden": !0,
className: "size-5 shrink-0"
}),
@@ -46144,14 +46189,14 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
}), f ? /* @__PURE__ */ (0, F.jsx)("p", {
"data-processing-eta": "",
className: "text-caption-1-regular text-text-secondary tabular-nums wrap-anywhere",
- children: xH(e)
+ children: DH(e)
}) : null]
}),
/* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
variant: "secondary",
iconOnly: !0,
- leadingIcon: XH,
+ leadingIcon: nU,
"data-processing-toggle": "",
"data-collapse-upward": "",
"aria-label": i ? "收起任务详情" : "展开任务详情",
@@ -46163,31 +46208,31 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
size: "small",
variant: "secondary",
iconOnly: !0,
- leadingIcon: hz,
+ leadingIcon: xz,
"aria-label": "隐藏任务提示",
onClick: r
}) : null
]
}),
- /* @__PURE__ */ (0, F.jsx)(uU, {
+ /* @__PURE__ */ (0, F.jsx)(gU, {
traffic: e?.traffic,
detailsOpen: s,
onDetailsChange: c
}),
- m ? /* @__PURE__ */ (0, F.jsx)(lge, {
+ m ? /* @__PURE__ */ (0, F.jsx)(yge, {
state: e,
slow: m
}) : null
]
}),
- /* @__PURE__ */ (0, F.jsx)(YH, {
+ /* @__PURE__ */ (0, F.jsx)(tU, {
id: o,
open: i,
"data-processing-body": "",
children: /* @__PURE__ */ (0, F.jsx)("div", {
className: "pt-3",
children: /* @__PURE__ */ (0, F.jsxs)("div", {
- className: sF("flex min-w-0 flex-col gap-2 border-t pt-3", d ? "border-border-error-default/20" : h ? "border-current/20" : "border-separator-border"),
+ className: mF("flex min-w-0 flex-col gap-2 border-t pt-3", d ? "border-border-error-default/20" : h ? "border-current/20" : "border-separator-border"),
children: [
e?.steps?.length ? /* @__PURE__ */ (0, F.jsx)("ol", {
"aria-label": "处理步骤",
@@ -46195,16 +46240,16 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
children: e.steps.map((e) => /* @__PURE__ */ (0, F.jsxs)("li", {
"data-processing-step": e.status,
"aria-current": e.status === "current" ? "step" : void 0,
- className: sF("flex min-h-8 items-center gap-2 text-body-2-regular", e.status === "current" ? "text-text-primary" : "text-text-tertiary"),
+ className: mF("flex min-h-8 items-center gap-2 text-body-2-regular", e.status === "current" ? "text-text-primary" : "text-text-tertiary"),
children: [
- e.status === "complete" ? /* @__PURE__ */ (0, F.jsx)(hpe, {
+ e.status === "complete" ? /* @__PURE__ */ (0, F.jsx)(Tpe, {
"aria-hidden": !0,
className: "size-(--icon-inline) shrink-0"
- }) : /* @__PURE__ */ (0, F.jsx)(gpe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(Epe, {
"aria-hidden": !0,
- className: sF("size-(--icon-inline) shrink-0", e.status === "current" && "text-border-focus-ring")
+ className: mF("size-(--icon-inline) shrink-0", e.status === "current" && "text-border-focus-ring")
}),
- /* @__PURE__ */ (0, F.jsx)(Sw, { children: e.status === "complete" ? "已完成:" : e.status === "current" ? "当前:" : "待处理:" }),
+ /* @__PURE__ */ (0, F.jsx)(kw, { children: e.status === "complete" ? "已完成:" : e.status === "current" ? "当前:" : "待处理:" }),
e.status === "complete" ? /* @__PURE__ */ (0, F.jsx)("s", {
className: "wrap-anywhere",
children: e.label
@@ -46217,11 +46262,11 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
}) : null,
/* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-2-regular wrap-anywhere",
- children: t || (d || u ? e?.error || "请查看并处理未完成项" : /* @__PURE__ */ (0, F.jsx)(Sge, { state: e }))
+ children: t || (d || u ? e?.error || "请查看并处理未完成项" : /* @__PURE__ */ (0, F.jsx)(Mge, { state: e }))
}),
u ? /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-2-regular wrap-anywhere",
- children: yH
+ children: TH
}) : null,
f && e?.stage && !e.steps?.length ? /* @__PURE__ */ (0, F.jsxs)("p", {
className: "text-caption-1-regular text-text-tertiary",
@@ -46238,20 +46283,20 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center justify-between gap-2 pt-3",
children: [
- /* @__PURE__ */ (0, F.jsx)(AH, {
+ /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/data-cleanup#libraryProcessing",
variant: "secondary",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: t || d || u ? "打开扫描与采集" : "任务详情"
}),
- u ? /* @__PURE__ */ (0, F.jsx)(AH, {
- href: bH,
+ u ? /* @__PURE__ */ (0, F.jsx)(IH, {
+ href: EH,
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: "查看全部内容"
}) : null,
- f ? /* @__PURE__ */ (0, F.jsx)(VH, {
+ f ? /* @__PURE__ */ (0, F.jsx)(qH, {
state: e,
disabled: !!t
}) : null
@@ -46260,67 +46305,67 @@ function pU({ state: e, problem: t = "", measure: n = !1, onHide: r }) {
]
});
}
-function Bge(e) {
- let { job: t } = HH(e);
- return /* @__PURE__ */ (0, F.jsx)(pU, {
+function Xge(e) {
+ let { job: t } = JH(e);
+ return /* @__PURE__ */ (0, F.jsx)(yU, {
state: t.data,
- problem: t.isError ? t.data ? wH : Wn(t.error) : ""
+ problem: t.isError ? t.data ? AH : ar(t.error) : ""
});
}
// src/react/library-processing/processing-notice-visibility.ts
-var mU = "peach.library-processing.visibility", hU = /* @__PURE__ */ new Set(), gU = "";
-function Vge() {
+var bU = "peach.library-processing.visibility", xU = /* @__PURE__ */ new Set(), SU = "";
+function Zge() {
try {
- return sessionStorage.getItem(mU) || "";
+ return sessionStorage.getItem(bU) || "";
} catch {
- return gU;
+ return SU;
}
}
-function Hge(e) {
- return hU.add(e), () => {
- hU.delete(e);
+function Qge(e) {
+ return xU.add(e), () => {
+ xU.delete(e);
};
}
-function _U(e, t) {
- gU = `${t ? "shown" : "hidden"}:${e}`;
+function CU(e, t) {
+ SU = `${t ? "shown" : "hidden"}:${e}`;
try {
- sessionStorage.setItem(mU, gU);
+ sessionStorage.setItem(bU, SU);
} catch {}
- hU.forEach((e) => e());
+ xU.forEach((e) => e());
}
-function vU(e) {
- let t = (0, P.useSyncExternalStore)(Hge, Vge, () => "");
+function wU(e) {
+ let t = (0, P.useSyncExternalStore)(Qge, Zge, () => "");
return {
hidden: t === `hidden:${e}`,
requested: t === `shown:${e}`
};
}
// src/react/library-processing/library-processing-dock.tsx
-var yU = "peach-library-processing";
-function Uge({ toast: e }) {
- let { job: t, settled: n } = HH({
+var TU = "peach-library-processing";
+function $ge({ toast: e }) {
+ let { job: t, settled: n } = JH({
toast: e,
mode: "notice"
- }), r = (0, P.useRef)(!1), i = t.data, a = i?.job_id || "unavailable", { hidden: o, requested: s } = vU(a), c = t.isError ? i ? wH : Wn(t.error) : "";
+ }), r = (0, P.useRef)(!1), i = t.data, a = i?.job_id || "unavailable", { hidden: o, requested: s } = wU(a), c = t.isError ? i ? AH : ar(t.error) : "";
return (0, P.useEffect)(() => {
- let e = _H(i), t = i?.status === "failed" && (n?.job_id === i.job_id || OH(i));
- o || i?.archived && !c || !e && !c && !t && !(s && i?.status === "failed") ? (r.current && sH.dismiss(yU), r.current = !1) : (sH.custom(() => /* @__PURE__ */ (0, F.jsx)("div", {
+ let e = CH(i), t = i?.status === "failed" && (n?.job_id === i.job_id || PH(i));
+ o || i?.archived && !c || !e && !c && !t && !(s && i?.status === "failed") ? (r.current && pH.dismiss(TU), r.current = !1) : (pH.custom(() => /* @__PURE__ */ (0, F.jsx)("div", {
className: "peach-react",
- children: /* @__PURE__ */ (0, F.jsx)(pU, {
+ children: /* @__PURE__ */ (0, F.jsx)(yU, {
state: i,
problem: c,
measure: !0,
- onHide: () => _U(a, !1)
+ onHide: () => CU(a, !1)
})
}), {
- id: yU,
+ id: TU,
toasterId: "processing",
duration: Infinity,
dismissible: !1,
closeButton: !1,
className: "processing-task-toast",
onDismiss: () => {
- _U(a, !1), r.current = !1;
+ CU(a, !1), r.current = !1;
}
}), r.current = !0);
}, [
@@ -46331,19 +46376,19 @@ function Uge({ toast: e }) {
o,
s
]), (0, P.useEffect)(() => () => {
- r.current && sH.dismiss(yU), r.current = !1;
+ r.current && pH.dismiss(TU), r.current = !1;
}, []), null;
}
// src/react/network-banner.tsx
-var Wge = ["network-status"], Gge = "Peach 连不上外网,资料采集、关注更新和在线来源暂不可用;本机媒体照常浏览和播放。";
-function Kge(e) {
+var e_e = ["network-status"], t_e = "Peach 连不上外网,资料采集、关注更新和在线来源暂不可用;本机媒体照常浏览和播放。";
+function n_e(e) {
return e?.state === "online" ? 12e4 : 3e4;
}
-function qge() {
+function r_e() {
let e = Pt({
- queryKey: Wge,
+ queryKey: e_e,
queryFn: ({ signal: e }) => B("/api/network-status", e),
- refetchInterval: (e) => Kge(e.state.data),
+ refetchInterval: (e) => n_e(e.state.data),
retry: !1
}), t = document.querySelector("[data-network-banner]");
return e.data?.state !== "offline" || !t ? null : (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsxs)("aside", {
@@ -46354,22 +46399,22 @@ function qge() {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: "#i-alert" })
- }), /* @__PURE__ */ (0, F.jsx)("p", { children: Gge })] }), /* @__PURE__ */ (0, F.jsx)("a", {
+ }), /* @__PURE__ */ (0, F.jsx)("p", { children: t_e })] }), /* @__PURE__ */ (0, F.jsx)("a", {
href: "/settings/network#peachProxy",
children: "检查 Peach 代理"
})]
}), t);
}
// src/react/client-updates.tsx
-var Jge = 12e4, Yge = 15e3, bU = () => document.visibilityState !== "hidden", xU = /* @__PURE__ */ new Set([
+var i_e = 12e4, a_e = 15e3, EU = () => document.visibilityState !== "hidden", DU = /* @__PURE__ */ new Set([
"downloading",
"verifying",
"extracting",
"preparing",
"restarting",
"installing"
-]), SU = "/settings/maintenance#releaseUpdates";
-function Xge() {
+]), OU = "/settings/maintenance#releaseUpdates";
+function o_e() {
try {
let e = JSON.parse(document.getElementById("peach-client-runtime")?.textContent || "null");
return typeof e?.version == "string" && typeof e?.build_id == "string" ? {
@@ -46380,23 +46425,23 @@ function Xge() {
return null;
}
}
-function CU() {
- let e = (0, P.useRef)(Xge()), [t, n] = (0, P.useState)(null);
+function kU() {
+ let e = (0, P.useRef)(o_e()), [t, n] = (0, P.useState)(null);
return (0, P.useEffect)(() => {
let t = !1, r, i, a = async () => {
- if (t || !bU()) return;
+ if (t || !EU()) return;
let o = new AbortController();
i = o;
- let s = setTimeout(() => o.abort(), Yge);
+ let s = setTimeout(() => o.abort(), a_e);
o.signal.addEventListener("abort", () => clearTimeout(s), { once: !0 });
try {
let r = await B("/api/client-updates", o.signal);
!t && !o.signal.aborted && typeof r?.runtime?.version == "string" && typeof r.runtime.build_id == "string" && (e.current ??= { ...r.runtime }, n(r));
} catch {} finally {
- clearTimeout(s), i === o && (i = void 0, !t && bU() && (r = setTimeout(a, Jge)));
+ clearTimeout(s), i === o && (i = void 0, !t && EU() && (r = setTimeout(a, i_e)));
}
}, o = () => {
- clearTimeout(r), i?.abort(), i = void 0, bU() && a();
+ clearTimeout(r), i?.abort(), i = void 0, EU() && a();
};
return document.addEventListener("visibilitychange", o), document.addEventListener("peach:client-updates", o), a(), () => {
t = !0, clearTimeout(r), i?.abort(), document.removeEventListener("visibilitychange", o), document.removeEventListener("peach:client-updates", o);
@@ -46406,12 +46451,12 @@ function CU() {
refresh: !!t && !!e.current && (t.runtime.version !== e.current.version || t.runtime.build_id !== e.current.build_id)
};
}
-function Zge({ navigate: e }) {
- let { snapshot: t, refresh: n } = CU(), [r, i] = (0, P.useState)(""), a = document.querySelector("[data-network-banner]");
+function s_e({ navigate: e }) {
+ let { snapshot: t, refresh: n } = kU(), [r, i] = (0, P.useState)(""), a = document.querySelector("[data-network-banner]");
if (!t || !a) return null;
- let { release: o, update_job: s, runtime: c } = t, l = n ? "refresh" : s.state === "ready" ? "ready" : xU.has(s.state) ? "preparing" : o.state === "available" && o.latest_version ? "available" : null;
+ let { release: o, update_job: s, runtime: c } = t, l = n ? "refresh" : s.state === "ready" ? "ready" : DU.has(s.state) ? "preparing" : o.state === "available" && o.latest_version ? "available" : null;
if (!l) return null;
- let u = (s.state === "ready" || xU.has(s.state)) && s.version || o.latest_version, d = JSON.stringify(l === "refresh" ? [
+ let u = (s.state === "ready" || DU.has(s.state)) && s.version || o.latest_version, d = JSON.stringify(l === "refresh" ? [
l,
c.version,
c.build_id
@@ -46434,22 +46479,22 @@ function Zge({ navigate: e }) {
children: [" Peach ", u]
}) : null] })] }), /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex-wrap",
- children: [l === "refresh" ? /* @__PURE__ */ (0, F.jsx)(AH, {
+ children: [l === "refresh" ? /* @__PURE__ */ (0, F.jsx)(IH, {
variant: "secondary",
size: "small",
onClick: () => window.location.reload(),
"data-copy-key": "clientUpdates.refresh.action",
children: "刷新页面"
- }) : /* @__PURE__ */ (0, F.jsx)(AH, {
+ }) : /* @__PURE__ */ (0, F.jsx)(IH, {
variant: "secondary",
size: "small",
- href: SU,
+ href: OU,
onClick: (t) => {
- t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || (t.preventDefault(), e(SU));
+ t.button !== 0 || t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || (t.preventDefault(), e(OU));
},
"data-copy-key": `clientUpdates.${l}.action`,
children: l === "preparing" ? "查看进度" : "查看更新"
- }), /* @__PURE__ */ (0, F.jsx)(AH, {
+ }), /* @__PURE__ */ (0, F.jsx)(IH, {
variant: "secondary",
size: "small",
onClick: () => i(d),
@@ -46460,20 +46505,20 @@ function Zge({ navigate: e }) {
}, d), a);
}
// src/react/router/pages/settings.tsx
-function Qge() {
- let e = (0, P.useContext)(OU), { pathname: t } = BB();
+function c_e() {
+ let e = (0, P.useContext)(PU), { pathname: t } = KB();
return (0, P.useEffect)(() => {
- e?.openSettings?.(mV(t));
+ e?.openSettings?.(bV(t));
}, [e, t]), (0, P.useEffect)(() => () => {
queueMicrotask(() => {
- pV($V.navigation.location.pathname) || e?.closeSettings?.();
+ yV(aH.navigation.location.pathname) || e?.closeSettings?.();
});
}, [e]), null;
}
// src/react/router/pages/overlay.tsx
-var wU = () => lu, $ge = () => uu;
-function e_e() {
- let e = (0, P.useContext)(OU), t = (0, P.useSyncExternalStore)(bu, $ge), n = (0, P.useSyncExternalStore)(bu, wU);
+var AU = () => wu, l_e = () => Tu;
+function u_e() {
+ let e = (0, P.useContext)(PU), t = (0, P.useSyncExternalStore)(Pu, l_e), n = (0, P.useSyncExternalStore)(Pu, AU);
return (0, P.useEffect)(() => {
if (!t || !n) return;
let r = !0;
@@ -46488,11 +46533,11 @@ function e_e() {
e
]), null;
}
-function TU(e, t = !1) {
- let n = (0, P.useSyncExternalStore)(bu, wU), r = (0, P.useRef)(void 0);
+function jU(e, t = !1) {
+ let n = (0, P.useSyncExternalStore)(Pu, AU), r = (0, P.useRef)(void 0);
if (r.current === void 0) {
- let { claimed: e } = $V.navigation;
- r.current = lu === 0 || tH() ? "boot" : e && !t ? null : "history";
+ let { claimed: e } = aH.navigation;
+ r.current = wu === 0 || sH() ? "boot" : e && !t ? null : "history";
}
let i = (0, P.useRef)(e);
(0, P.useEffect)(() => {
@@ -46508,22 +46553,22 @@ function TU(e, t = !1) {
}));
}, [n]);
}
-function t_e() {
- let e = (0, P.useContext)(OU), t = (0, P.useRef)(e);
+function d_e() {
+ let e = (0, P.useContext)(PU), t = (0, P.useRef)(e);
return (0, P.useLayoutEffect)(() => {
t.current = e;
- }, [e]), TU((t) => {
- let n = $V.navigation.location, { pathname: r, search: i } = pV(n.pathname) && gV(n.state) || n, a = yV(r, i);
- e && a && (TV(), t || bhe($V.navigation.location.state), e.openOverlay(a));
+ }, [e]), jU((t) => {
+ let n = aH.navigation.location, { pathname: r, search: i } = yV(n.pathname) && SV(n.state) || n, a = TV(r, i);
+ e && a && (jV(), t || Ahe(aH.navigation.location.state), e.openOverlay(a));
}, !0), (0, P.useEffect)(() => () => {
queueMicrotask(() => {
- bV($V.navigation.location.pathname) || t.current?.closeStage();
+ EV(aH.navigation.location.pathname) || t.current?.closeStage();
});
}, []), null;
}
-function n_e({ path: e }) {
- DU();
- let { location: t, seq: n, action: r } = $V.navigation, i = pV(t.pathname) ? gV(t.state) : null, a = (i || t).pathname + (i || t).search, o = (0, P.useRef)({
+function f_e({ path: e }) {
+ NU();
+ let { location: t, seq: n, action: r } = aH.navigation, i = yV(t.pathname) ? SV(t.state) : null, a = (i || t).pathname + (i || t).search, o = (0, P.useRef)({
identity: a,
seq: i?.seq ?? n,
navigationSeq: n,
@@ -46534,161 +46579,161 @@ function n_e({ path: e }) {
seq: n,
navigationSeq: n,
settings: !1
- }), /* @__PURE__ */ (0, F.jsx)(t_e, {}, `${e} ${o.current.seq}`);
+ }), /* @__PURE__ */ (0, F.jsx)(d_e, {}, `${e} ${o.current.seq}`);
}
-function r_e() {
- let e = (0, P.useContext)(OU);
- return TU(() => {
+function p_e() {
+ let e = (0, P.useContext)(PU);
+ return jU(() => {
e?.follow?.ground();
}), null;
}
-function i_e() {
- return /* @__PURE__ */ (0, F.jsx)(r_e, {}, DU());
+function m_e() {
+ return /* @__PURE__ */ (0, F.jsx)(p_e, {}, NU());
}
// src/react/router/router.tsx
-var EU = (0, P.createContext)(0), DU = () => (0, P.useContext)(EU), OU = (0, P.createContext)(null);
-function a_e({ children: e }) {
- let [t, n] = (0, P.useState)(() => $V.navigation);
- return (0, P.useLayoutEffect)(() => (n($V.navigation), $V.listen((e) => {
+var MU = (0, P.createContext)(0), NU = () => (0, P.useContext)(MU), PU = (0, P.createContext)(null);
+function h_e({ children: e }) {
+ let [t, n] = (0, P.useState)(() => aH.navigation);
+ return (0, P.useLayoutEffect)(() => (n(aH.navigation), aH.listen((e) => {
(0, Lt.flushSync)(() => n(e));
- })), []), /* @__PURE__ */ (0, F.jsx)(EU.Provider, {
+ })), []), /* @__PURE__ */ (0, F.jsx)(MU.Provider, {
value: t.openEpoch,
- children: /* @__PURE__ */ (0, F.jsx)(che, {
+ children: /* @__PURE__ */ (0, F.jsx)(vhe, {
location: t.location,
navigationType: t.action,
- navigator: $V,
+ navigator: aH,
children: e
})
});
}
-function o_e({ target: e }) {
- let t = qme();
+function g_e({ target: e }) {
+ let t = rhe();
return (0, P.useLayoutEffect)(() => {
e.current = t;
}), null;
}
-function s_e(e, t, n) {
+function __e(e, t, n) {
let r = new URL(e, window.location.href);
P6(r.pathname) ? n(`${r.pathname}${r.search}${r.hash}`) : t.navigate(e);
}
-function c_e() {
- let e = (0, P.useContext)(OU), [t, n] = (0, P.useState)(BV), r = (0, P.useRef)(null);
- (0, P.useLayoutEffect)(() => (n(BV()), She((e, t) => {
+function v_e() {
+ let e = (0, P.useContext)(PU), [t, n] = (0, P.useState)(KV), r = (0, P.useRef)(null);
+ (0, P.useLayoutEffect)(() => (n(KV()), Mhe((e, t) => {
t ? (0, Lt.flushSync)(() => n(e)) : n(e);
})), []);
let i = (0, P.useMemo)(() => (t) => {
- e && r.current && s_e(t, e, r.current);
+ e && r.current && __e(t, e, r.current);
}, [e]);
- return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(o_e, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, F.jsx)(l_e, {
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(g_e, { target: r }), e ? t.map((t) => /* @__PURE__ */ (0, F.jsx)(y_e, {
entry: t,
- children: /* @__PURE__ */ (0, F.jsx)(u_e, {
+ children: /* @__PURE__ */ (0, F.jsx)(b_e, {
entry: t,
actions: e,
go: i
})
}, t.revision)) : null] });
}
-var l_e = class extends P.Component {
+var y_e = class extends P.Component {
state = { failed: !1 };
static getDerivedStateFromError() {
return { failed: !0 };
}
componentDidCatch() {
- The(this.props.entry.container, this.props.entry.revision);
+ Fhe(this.props.entry.container, this.props.entry.revision);
}
render() {
return this.state.failed ? null : this.props.children;
}
-}, u_e = (0, P.memo)(function({ entry: e, actions: t, go: n }) {
- return J6(e.path) ? (0, Lt.createPortal)(jMe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
+}, b_e = (0, P.memo)(function({ entry: e, actions: t, go: n }) {
+ return J6(e.path) ? (0, Lt.createPortal)(JMe(e.path, e.props, t, n), e.host, String(e.revision)) : null;
});
-function d_e({ children: e }) {
- let t = BB();
- DU();
- let n = nH(), r = pV(t.pathname) && !tH() ? gV(t.state) : null;
+function x_e({ children: e }) {
+ let t = KB();
+ NU();
+ let n = cH(), r = yV(t.pathname) && !sH() ? SV(t.state) : null;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsxs)(YB, {
+ /* @__PURE__ */ (0, F.jsxs)(tV, {
location: n ?? t,
children: [
- Object.entries(N6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(N6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- Object.entries(DMe).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(WMe).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- Object.entries(F6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(F6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- Object.entries(R6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(R6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- Object.entries(B6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(B6).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- q6.map((e) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ q6.map((e) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: V6["/"].element
}, e)),
- Object.entries(OMe).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ Object.entries(GMe).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: t.element
}, e)),
- _V.map((e) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ CV.map((e) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
- element: e === "/works/:code" ? null : e === "/posts/:id" ? /* @__PURE__ */ (0, F.jsx)(i_e, {}) : V6["/"].element
+ element: e === "/works/:code" ? null : e === "/posts/:id" ? /* @__PURE__ */ (0, F.jsx)(m_e, {}) : V6["/"].element
}, e)),
- fV.map((e) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ vV.map((e) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
element: null
}, e)),
- /* @__PURE__ */ (0, F.jsx)(JB, {
+ /* @__PURE__ */ (0, F.jsx)(eV, {
path: "*",
element: e
})
]
}),
- /* @__PURE__ */ (0, F.jsxs)(YB, {
+ /* @__PURE__ */ (0, F.jsxs)(tV, {
location: r ?? t,
- children: [_V.map((e) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ children: [CV.map((e) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
- element: /* @__PURE__ */ (0, F.jsx)(n_e, { path: e })
- }, e)), /* @__PURE__ */ (0, F.jsx)(JB, {
+ element: /* @__PURE__ */ (0, F.jsx)(f_e, { path: e })
+ }, e)), /* @__PURE__ */ (0, F.jsx)(eV, {
path: "*",
element: null
})]
}),
- /* @__PURE__ */ (0, F.jsxs)(YB, { children: [fV.map((e) => /* @__PURE__ */ (0, F.jsx)(JB, {
+ /* @__PURE__ */ (0, F.jsxs)(tV, { children: [vV.map((e) => /* @__PURE__ */ (0, F.jsx)(eV, {
path: e,
- element: /* @__PURE__ */ (0, F.jsx)(Qge, {})
- }, e)), /* @__PURE__ */ (0, F.jsx)(JB, {
+ element: /* @__PURE__ */ (0, F.jsx)(c_e, {})
+ }, e)), /* @__PURE__ */ (0, F.jsx)(eV, {
path: "*",
element: null
})] })
] });
}
-function f_e({ children: e, actions: t = null, background: n, processing: r = !1 }) {
- return /* @__PURE__ */ (0, F.jsxs)(iH, { children: [n, /* @__PURE__ */ (0, F.jsx)(OU.Provider, {
+function S_e({ children: e, actions: t = null, background: n, processing: r = !1 }) {
+ return /* @__PURE__ */ (0, F.jsxs)(uH, { children: [n, /* @__PURE__ */ (0, F.jsx)(PU.Provider, {
value: t,
- children: /* @__PURE__ */ (0, F.jsxs)(a_e, { children: [
- /* @__PURE__ */ (0, F.jsx)(c_e, {}),
- /* @__PURE__ */ (0, F.jsx)(e_e, {}),
- r && t ? /* @__PURE__ */ (0, F.jsx)(Uge, { toast: t.toast }) : null,
- r && t ? /* @__PURE__ */ (0, F.jsx)(qge, {}) : null,
- r && t ? /* @__PURE__ */ (0, F.jsx)(Zge, { navigate: t.navigate }) : null,
- /* @__PURE__ */ (0, F.jsx)(d_e, { children: e })
+ children: /* @__PURE__ */ (0, F.jsxs)(h_e, { children: [
+ /* @__PURE__ */ (0, F.jsx)(v_e, {}),
+ /* @__PURE__ */ (0, F.jsx)(u_e, {}),
+ r && t ? /* @__PURE__ */ (0, F.jsx)($ge, { toast: t.toast }) : null,
+ r && t ? /* @__PURE__ */ (0, F.jsx)(r_e, {}) : null,
+ r && t ? /* @__PURE__ */ (0, F.jsx)(s_e, { navigate: t.navigate }) : null,
+ /* @__PURE__ */ (0, F.jsx)(x_e, { children: e })
] })
})] });
}
-var p_e = { onCaughtError: (e) => {
+var C_e = { onCaughtError: (e) => {
globalThis.reportError?.(e);
} };
// src/react/boardui/utils/use-dismiss-on-outside-press.ts
-function m_e(e, t, n) {
+function w_e(e, t, n) {
(0, P.useEffect)(() => {
if (!e) return;
let r = (e) => {
@@ -46702,7 +46747,7 @@ function m_e(e, t, n) {
n
]);
}
-function h_e(e, t) {
+function T_e(e, t) {
let n = (0, P.useRef)(!1);
return (0, P.useEffect)(() => {
if (!e) return;
@@ -46715,33 +46760,33 @@ function h_e(e, t) {
}, [e, t]), (e) => e && n.current ? (n.current = !1, !1) : !0;
}
// src/react/boardui/components/base/select/select.tsx
-var kU = (0, P.createContext)("md");
-function AU({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
+var FU = (0, P.createContext)("md");
+function IU({ className: e, triggerClassName: t, popoverClassName: n, size: r = "md", children: i, items: a, renderValue: o, ref: s, ...c }) {
let l = (0, P.useRef)(null), u = (0, P.useRef)(null), [d, f] = (0, P.useState)(!1);
- m_e(d, () => f(!1), [l, u]);
- let p = h_e(d, l);
- return /* @__PURE__ */ (0, F.jsx)(Yde, {
+ w_e(d, () => f(!1), [l, u]);
+ let p = T_e(d, l);
+ return /* @__PURE__ */ (0, F.jsx)(afe, {
ref: s,
...c,
isOpen: d,
onOpenChange: (e) => p(e) && f(e),
- className: sF("group flex flex-col", e),
- children: ({ isOpen: e }) => /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)(NI, {
+ className: mF("group flex flex-col", e),
+ children: ({ isOpen: e }) => /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)(zI, {
ref: l,
- className: sF("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, F.jsx)(Qde, {
- className: sF("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
+ className: mF("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, F.jsx)(cfe, {
+ className: mF("flex min-w-0 items-center truncate", r === "sm" ? "gap-1" : "gap-[5px]"),
children: o
- }), /* @__PURE__ */ (0, F.jsx)(uhe, { className: sF("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
- }), /* @__PURE__ */ (0, F.jsx)(oR, {
+ }), /* @__PURE__ */ (0, F.jsx)(bhe, { className: mF("shrink-0 text-text-secondary transition-transform duration-200 ease", r === "sm" ? "size-3.5" : "size-4", e && "rotate-180") })]
+ }), /* @__PURE__ */ (0, F.jsx)(fR, {
ref: u,
isNonModal: !0,
offset: 4,
- className: sF(phe, eV, "p-2", n),
- children: /* @__PURE__ */ (0, F.jsx)(_de, {
+ className: mF(Che, oV, "p-2", n),
+ children: /* @__PURE__ */ (0, F.jsx)(Dde, {
items: a,
- className: sF(mhe, "max-h-[240px] overflow-auto"),
- children: /* @__PURE__ */ (0, F.jsx)(kU.Provider, {
+ className: mF(whe, "max-h-[240px] overflow-auto"),
+ children: /* @__PURE__ */ (0, F.jsx)(FU.Provider, {
value: r,
children: i
})
@@ -46749,23 +46794,23 @@ function AU({ className: e, triggerClassName: t, popoverClassName: n, size: r =
})] })
});
}
-function jU({ className: e, children: t, ...n }) {
- let r = (0, P.useContext)(kU);
- return /* @__PURE__ */ (0, F.jsx)(bde, {
+function LU({ className: e, children: t, ...n }) {
+ let r = (0, P.useContext)(FU);
+ return /* @__PURE__ */ (0, F.jsx)(Ade, {
...n,
- className: (t) => sF(tV, 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) => mF(sV, 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
});
}
// src/react/catalog-folders/catalog-folders.ts
-var MU = {
+var RU = {
category: "个人分类",
creator: "创作者/账号",
performer: "人物",
seller: "卖家",
studio: "厂牌"
};
-function NU(e, t = "", n = "") {
+function zU(e, t = "", n = "") {
let r = new URLSearchParams({
...e,
folder: t,
@@ -46777,14 +46822,14 @@ function NU(e, t = "", n = "") {
queryFn: ({ signal: e }) => B(`/api/folders?${r}`, e)
};
}
-function PU(e, t) {
+function BU(e, t) {
let n = new URLSearchParams(e.search);
for (let [e, r] of Object.entries(t)) r ? n.set(e, r) : n.delete(e);
return e.pathname + (n.size ? `?${n}` : "");
}
// src/react/catalog-folders/folder-rule-dialog.tsx
-function g_e({ folder: e, rule: t, revision: n, close: r }) {
- let i = (0, P.useContext)(OU), a = jH(), [o, s] = (0, P.useState)(t?.purpose || "category"), [c, l] = (0, P.useState)(t?.name || ""), [u, d] = (0, P.useState)(t?.recursive ?? !0), [f, p] = (0, P.useState)(t?.future ?? !1), [m, h] = (0, P.useState)(null), [g, _] = (0, P.useState)(!1), v = {
+function E_e({ folder: e, rule: t, revision: n, close: r }) {
+ let i = (0, P.useContext)(PU), a = LH(), [o, s] = (0, P.useState)(t?.purpose || "category"), [c, l] = (0, P.useState)(t?.name || ""), [u, d] = (0, P.useState)(t?.recursive ?? !0), [f, p] = (0, P.useState)(t?.future ?? !1), [m, h] = (0, P.useState)(null), [g, _] = (0, P.useState)(!1), v = {
folder: e.id,
purpose: o,
name: c,
@@ -46793,7 +46838,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
}, y = () => {
h(null), a.setError("");
}, b = (e) => {
- H.invalidateQueries({ queryKey: ["catalog-folders"] }), i?.receipt(e), r(), vu({ pageOpens: lu + 1 });
+ H.invalidateQueries({ queryKey: ["catalog-folders"] }), i?.receipt(e), r(), W({ pageOpens: wu + 1 });
}, x = () => a.run("preview", (e) => V("/api/folders/preview", v, "POST", e), h), S = () => {
m && a.run("save", (e) => V("/api/folders/rule", {
...v,
@@ -46802,7 +46847,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
expected_revision: n
}, "POST", e), (e) => b(`已保存目录用途${e.applied ? `,关联 ${e.applied} 项` : ""}`));
}, C = async () => {
- (0, Lt.flushSync)(() => _(!0)), (await Hc({
+ (0, Lt.flushSync)(() => _(!0)), (await rl({
title: "移除目录规则",
body: `「${e.name}」的目录规则将被移除,并撤回这条规则建立的关联。`,
confirmLabel: "移除目录规则",
@@ -46812,8 +46857,8 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
expected_revision: n
})
})).confirmed ? b("已移除目录规则") : _(!1);
- }, w = !!a.busy, T = (e, t) => a.busy === e ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs(t) } }), t] }) : null;
- return g ? null : /* @__PURE__ */ (0, F.jsx)(Iz, {
+ }, w = !!a.busy, T = (e, t) => a.busy === e ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is(t) } }), t] }) : null;
+ return g ? null : /* @__PURE__ */ (0, F.jsx)(Hz, {
isOpen: !0,
onOpenChange: (e) => {
!e && !w && r();
@@ -46827,7 +46872,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
className: "flex items-start justify-between gap-4 border-b border-separator-border p-5",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "min-w-0",
- children: [/* @__PURE__ */ (0, F.jsx)(FI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(VI, {
slot: "title",
className: "text-title-2-medium",
children: "设置目录用途"
@@ -46835,7 +46880,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
className: "mt-1 text-body-2-regular text-text-secondary wrap-anywhere",
children: e.path
})]
- }), /* @__PURE__ */ (0, F.jsx)(Hz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Jz, {
label: "关闭目录用途",
onPress: () => {
w || r();
@@ -46847,20 +46892,20 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, F.jsx)(kz, { children: "这个文件夹用于" }), /* @__PURE__ */ (0, F.jsx)(AU, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Fz, { children: "这个文件夹用于" }), /* @__PURE__ */ (0, F.jsx)(IU, {
"aria-label": "这个文件夹用于",
selectedKey: o,
isDisabled: w,
onSelectionChange: (e) => {
s(e), y();
},
- children: Object.entries(MU).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(jU, {
+ children: Object.entries(RU).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(LU, {
id: e,
children: t
}, e))
})]
}),
- o === "category" ? null : /* @__PURE__ */ (0, F.jsx)(Fz, {
+ o === "category" ? null : /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "关联名称",
value: c,
onChange: (e) => {
@@ -46871,7 +46916,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
isDisabled: w,
isRequired: !0
}),
- /* @__PURE__ */ (0, F.jsx)(sV, {
+ /* @__PURE__ */ (0, F.jsx)(pV, {
isSelected: u,
isDisabled: w,
onChange: (e) => {
@@ -46879,7 +46924,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
},
children: "应用到子文件夹"
}),
- /* @__PURE__ */ (0, F.jsx)(sV, {
+ /* @__PURE__ */ (0, F.jsx)(pV, {
isSelected: f,
isDisabled: w,
onChange: (e) => {
@@ -46916,9 +46961,9 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
children: e.name
}, e.id))
}) : null,
- m.conflicts.length ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ m.conflicts.length ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "warning",
- extra: /* @__PURE__ */ (0, F.jsx)(nU, {
+ extra: /* @__PURE__ */ (0, F.jsx)(cU, {
summary: "查看归属冲突",
children: /* @__PURE__ */ (0, F.jsx)("ul", {
className: "mt-2 flex flex-col gap-2",
@@ -46936,7 +46981,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
}) : null
]
}) : null,
- a.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ a.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: a.error
}) : null
@@ -46951,7 +46996,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
onClick: () => {
w || C();
},
- ...Uz(a.busy === "remove"),
+ ...Yz(a.busy === "remove"),
children: "移除规则"
}) : null,
/* @__PURE__ */ (0, F.jsx)(q, {
@@ -46963,13 +47008,13 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
}),
m ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "primary",
- ...Uz(a.busy === "save"),
+ ...Yz(a.busy === "save"),
onClick: S,
children: T("save", "正在保存") || "保存目录用途"
}) : /* @__PURE__ */ (0, F.jsx)(q, {
variant: "primary",
disabled: o !== "category" && !c.trim(),
- ...Uz(a.busy === "preview"),
+ ...Yz(a.busy === "preview"),
onClick: () => {
x();
},
@@ -46982,7 +47027,7 @@ function g_e({ folder: e, rule: t, revision: n, close: r }) {
});
}
// src/react/catalog-folders/use-folder-sticky-offset.ts
-function __e(e, t) {
+function D_e(e, t) {
(0, P.useLayoutEffect)(() => {
if (!e) return;
let n = t ? document.getElementById("index") : document.getElementById("catalogFilter"), r = null, i = 0, a = new ResizeObserver(() => s()), o = () => {
@@ -47005,35 +47050,35 @@ function __e(e, t) {
}, [e, t]);
}
// src/react/catalog-folders/catalog-folders-page.tsx
-function FU() {
- return zB() ? /* @__PURE__ */ (0, F.jsx)(v_e, {}) : null;
+function VU() {
+ return GB() ? /* @__PURE__ */ (0, F.jsx)(O_e, {}) : null;
}
-function v_e() {
- let e = BB(), t = (0, P.useContext)(OU);
- if (!fn(e.pathname) && !/^\/(performers|creators|studios|series|agencies|tags)\/[^/]+$/.test(e.pathname)) return null;
+function O_e() {
+ let e = KB(), t = (0, P.useContext)(PU);
+ if (!Dn(e.pathname) && !/^\/(performers|creators|studios|series|agencies|tags)\/[^/]+$/.test(e.pathname)) return null;
let n = new URLSearchParams(e.search), r = n.get("browse") === "folders" || !!n.get("folder");
- return /* @__PURE__ */ (0, F.jsx)(ZF, {
+ return /* @__PURE__ */ (0, F.jsx)(rI, {
size: "small",
"data-folder-mode-toggle": "",
"aria-label": "文件夹模式",
title: "文件夹模式",
"aria-pressed": r,
- icon: _z,
- onClick: () => t?.navigate(PU(e, r ? {
+ icon: Cz,
+ onClick: () => t?.navigate(BU(e, r ? {
browse: null,
folder: null,
folder_recursive: null
} : { browse: "folders" }))
});
}
-function y_e({ children: e, enabled: t }) {
- return zB() ? /* @__PURE__ */ (0, F.jsx)(b_e, {
+function k_e({ children: e, enabled: t }) {
+ return GB() ? /* @__PURE__ */ (0, F.jsx)(A_e, {
enabled: t,
children: e
}) : /* @__PURE__ */ (0, F.jsx)(F.Fragment, { children: e });
}
-function b_e({ children: e, enabled: t }) {
- let [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)(null), o = BB(), s = new URLSearchParams(o.search), c = t && (s.get("browse") === "folders" || !!s.get("folder"));
+function A_e({ children: e, enabled: t }) {
+ let [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)(null), o = KB(), s = new URLSearchParams(o.search), c = t && (s.get("browse") === "folders" || !!s.get("folder"));
return /* @__PURE__ */ (0, F.jsxs)("div", {
className: "entity-folder-workspace",
"data-folder-workspace": "",
@@ -47052,7 +47097,7 @@ function b_e({ children: e, enabled: t }) {
hidden: !c
}), e]
}),
- n && i ? /* @__PURE__ */ (0, F.jsx)(IU, {
+ n && i ? /* @__PURE__ */ (0, F.jsx)(HU, {
treeTarget: n,
headerTarget: i,
enabled: t
@@ -47060,14 +47105,14 @@ function b_e({ children: e, enabled: t }) {
]
});
}
-function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
- let r = BB(), i = (0, P.useContext)(OU), a = new URLSearchParams(r.search), o = n && (a.get("browse") === "folders" || !!a.get("folder")), s = {
+function HU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
+ let r = KB(), i = (0, P.useContext)(PU), a = new URLSearchParams(r.search), o = n && (a.get("browse") === "folders" || !!a.get("folder")), s = {
loc: a.get("loc") ?? "",
library: a.get("library") ?? ""
};
- __e(o, e);
+ D_e(o, e);
let c = a.get("folder") || "", l = Pt({
- ...NU(s, c),
+ ...zU(s, c),
enabled: o
}), [u, d] = (0, P.useState)(!1), [f, p] = (0, P.useState)(!1), m = e ?? document.getElementById("catalogFoldersTree"), h = t ?? document.getElementById("catalogFolderHeader");
if ((0, P.useLayoutEffect)(() => (m && (m.hidden = !o), h && (h.hidden = !o), e || document.body.toggleAttribute("data-folder-browse", o), () => {
@@ -47081,11 +47126,11 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
d(!1), p(!1);
}, [c, o]), !o || !m || !h || !i) return null;
let g = (e) => {
- d(!1), i.navigate(PU(r, {
+ d(!1), i.navigate(BU(r, {
browse: "folders",
folder: e
}));
- }, _ = l.data, v = /* @__PURE__ */ (0, F.jsx)(S_e, {
+ }, _ = l.data, v = /* @__PURE__ */ (0, F.jsx)(M_e, {
scope: s,
selected: c,
current: _,
@@ -47102,21 +47147,21 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
children: [
/* @__PURE__ */ (0, F.jsx)("span", {
className: "folder-drawer-trigger",
- children: /* @__PURE__ */ (0, F.jsx)(ZF, {
+ children: /* @__PURE__ */ (0, F.jsx)(rI, {
"aria-label": "打开文件夹目录",
- icon: Rpe,
+ icon: Jpe,
size: "small",
onClick: () => d(!0)
})
}),
- /* @__PURE__ */ (0, F.jsxs)(fhe, {
+ /* @__PURE__ */ (0, F.jsxs)(She, {
"aria-label": "文件夹路径",
- children: [/* @__PURE__ */ (0, F.jsx)(QB, {
+ children: [/* @__PURE__ */ (0, F.jsx)(iV, {
current: !c,
onClick: () => g(""),
- icon: _z,
+ icon: Cz,
children: "全部文件夹"
- }), _?.ancestors.map((e, t) => /* @__PURE__ */ (0, F.jsx)(QB, {
+ }), _?.ancestors.map((e, t) => /* @__PURE__ */ (0, F.jsx)(iV, {
current: t === _.ancestors.length - 1,
onClick: () => g(e.id),
children: /* @__PURE__ */ (0, F.jsx)("span", {
@@ -47126,15 +47171,15 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
})
}, e.id))]
}),
- _?.selected ? /* @__PURE__ */ (0, F.jsx)(ZF, {
+ _?.selected ? /* @__PURE__ */ (0, F.jsx)(rI, {
"aria-label": "设置目录用途",
- icon: kpe,
+ icon: zpe,
size: "small",
onClick: () => p(!0)
}) : null
]
}),
- l.error && !u ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ l.error && !u ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -47144,9 +47189,9 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
},
children: "立即重试"
}),
- children: Wn(l.error)
+ children: ar(l.error)
}) : null,
- _?.conflicts?.length ? /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ _?.conflicts?.length ? /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: "warning",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -47158,14 +47203,14 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
}) : null,
_?.selected ? /* @__PURE__ */ (0, F.jsxs)("div", {
className: "folder-scope-row",
- children: [/* @__PURE__ */ (0, F.jsx)(sV, {
+ children: [/* @__PURE__ */ (0, F.jsx)(pV, {
size: "sm",
isSelected: a.get("folder_recursive") !== "0",
- onChange: (e) => i.navigate(PU(r, { folder_recursive: e ? null : "0" })),
+ onChange: (e) => i.navigate(BU(r, { folder_recursive: e ? null : "0" })),
children: "包含子文件夹"
}), /* @__PURE__ */ (0, F.jsx)("span", {
className: "text-caption-1-regular text-text-tertiary",
- children: _.rule ? `${MU[_.rule.purpose]}${_.rule.name ? ` · ${_.rule.name}` : ""}` : "个人分类"
+ children: _.rule ? `${RU[_.rule.purpose]}${_.rule.name ? ` · ${_.rule.name}` : ""}` : "个人分类"
})]
}) : null,
l.isPending ? /* @__PURE__ */ (0, F.jsx)("div", {
@@ -47175,13 +47220,13 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
className: "folder-children",
children: Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ (0, F.jsx)("span", { className: "skeleton-sheen h-8 w-28 rounded-lg" }, t))
}) : null,
- _?.children.length ? /* @__PURE__ */ (0, F.jsx)(x_e, {
+ _?.children.length ? /* @__PURE__ */ (0, F.jsx)(j_e, {
nodes: _.children,
go: g
}, c) : null
]
}), h),
- /* @__PURE__ */ (0, F.jsxs)(Iz, {
+ /* @__PURE__ */ (0, F.jsxs)(Hz, {
isOpen: u,
onOpenChange: d,
width: "form",
@@ -47191,7 +47236,7 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
children: [/* @__PURE__ */ (0, F.jsx)("h2", {
className: "text-title-2-medium",
children: "文件夹"
- }), /* @__PURE__ */ (0, F.jsx)(Hz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Jz, {
label: "关闭文件夹目录",
onPress: () => d(!1)
})]
@@ -47200,7 +47245,7 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
children: u ? v : null
})]
}),
- f && _?.selected ? /* @__PURE__ */ (0, F.jsx)(g_e, {
+ f && _?.selected ? /* @__PURE__ */ (0, F.jsx)(E_e, {
folder: _.selected,
rule: _.rule,
revision: _.rules_revision,
@@ -47208,7 +47253,7 @@ function IU({ treeTarget: e, headerTarget: t, enabled: n = !0 } = {}) {
}, _.selected.id) : null
] });
}
-function x_e({ nodes: e, go: t }) {
+function j_e({ nodes: e, go: t }) {
let [n, r] = (0, P.useState)(!1), i = (0, P.useId)(), a = n ? e : e.slice(0, 12);
return /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-col items-start gap-2",
@@ -47219,7 +47264,7 @@ function x_e({ nodes: e, go: t }) {
children: a.map((e) => /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- leadingIcon: _z,
+ leadingIcon: Cz,
onClick: () => t(e.id),
children: /* @__PURE__ */ (0, F.jsx)("span", {
className: "truncate",
@@ -47236,28 +47281,28 @@ function x_e({ nodes: e, go: t }) {
}) : null]
});
}
-function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
- let a = Pt(NU(e)), [o, s] = (0, P.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, P.useState)(""), u = (0, P.useDeferredValue)(c), d = Pt({
- ...NU(e, "", u),
+function M_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
+ let a = Pt(zU(e)), [o, s] = (0, P.useState)(/* @__PURE__ */ new Set()), [c, l] = (0, P.useState)(""), u = (0, P.useDeferredValue)(c), d = Pt({
+ ...zU(e, "", u),
enabled: !!u.trim()
- }), f = cV();
+ }), f = mV();
(0, P.useEffect)(() => {
n?.ancestors.length && s((e) => /* @__PURE__ */ new Set([...e, ...n.ancestors.filter((e) => e.has_children).map((e) => e.id)]));
}, [n?.ancestors]);
- let p = [...o].map(String), m = Mt({ queries: p.map((t) => NU(e, t)) }), h = /* @__PURE__ */ new Map();
+ let p = [...o].map(String), m = Mt({ queries: p.map((t) => zU(e, t)) }), h = /* @__PURE__ */ new Map();
m.forEach((e, t) => {
e.data && h.set(p[t], e.data.children);
}), n?.selected && h.set(n.selected.id, n.children);
let g = (e) => {
let t = h.get(e.id);
- return /* @__PURE__ */ (0, F.jsx)(rV, {
+ return /* @__PURE__ */ (0, F.jsx)(lV, {
id: e.id,
label: e.name,
- icon: _z,
- expandedIcon: vz,
+ icon: Cz,
+ expandedIcon: wz,
iconClassName: "size-(--icon-inline)",
trailingContent: e.parent ? void 0 : e.location === "local" ? "本地" : e.location,
- children: e.has_children ? t ? t.map(g) : /* @__PURE__ */ (0, F.jsx)(rV, {
+ children: e.has_children ? t ? t.map(g) : /* @__PURE__ */ (0, F.jsx)(lV, {
id: `${e.id}:loading`,
label: "正在读取文件夹",
isDisabled: !0
@@ -47273,15 +47318,15 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
"aria-label": "文件夹导航",
className: "catalog-folder-navigation flex min-h-0 min-w-0 flex-col gap-3",
children: [
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
"aria-label": "查找文件夹",
placeholder: "查找文件夹",
- leadingIcon: Ez,
+ leadingIcon: Mz,
value: c,
onChange: l,
size: "small"
}),
- v ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ v ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -47293,7 +47338,7 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
},
children: "立即重试"
}),
- children: Wn(v)
+ children: ar(v)
}) : null,
/* @__PURE__ */ (0, F.jsx)("div", {
className: "folder-tree-frame relative flex min-h-0 flex-col overflow-hidden rounded-3xl",
@@ -47316,20 +47361,20 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
"aria-busy": "true",
className: "h-8 skeleton-sheen",
"aria-label": "正在查找文件夹"
- }) : d.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) : d.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(d.error)
+ children: ar(d.error)
}) : d.data?.matches.length ? d.data.matches.map((e) => /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- leadingIcon: _z,
+ leadingIcon: Cz,
onClick: () => {
l(""), r(e.id);
},
children: e.name
- }, e.id)) : /* @__PURE__ */ (0, F.jsx)(zz, {
+ }, e.id)) : /* @__PURE__ */ (0, F.jsx)(Gz, {
size: "compact",
- icon: Ez,
+ icon: Mz,
title: "没有匹配的文件夹",
actions: /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
@@ -47338,7 +47383,7 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
}),
children: "换个目录名称试试。"
})
- }) : a.data?.roots.length ? /* @__PURE__ */ (0, F.jsx)(hhe, {
+ }) : a.data?.roots.length ? /* @__PURE__ */ (0, F.jsx)(The, {
"aria-label": "媒体目录",
size: "sm",
expandedKeys: o,
@@ -47346,11 +47391,11 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
selectedKeys: new Set(t ? [t] : []),
onSelectionChange: _,
children: a.data?.roots.map(g)
- }) : /* @__PURE__ */ (0, F.jsx)(zz, {
+ }) : /* @__PURE__ */ (0, F.jsx)(Gz, {
size: "compact",
- icon: _z,
+ icon: Cz,
title: "尚未添加媒体目录",
- actions: /* @__PURE__ */ (0, F.jsx)(pI, {
+ actions: /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/settings/library",
children: "添加媒体"
@@ -47363,53 +47408,53 @@ function S_e({ scope: e, selected: t, current: n, go: r, reportedError: i }) {
});
}
// src/react/components/segmented.tsx
-function C_e(e) {
- let t = eI(NH("selection"));
- return /* @__PURE__ */ (0, F.jsx)(sz, {
+function N_e(e) {
+ let t = oI(zH("selection"));
+ return /* @__PURE__ */ (0, F.jsx)(pz, {
...e,
ref: t
});
}
-function LU(e) {
- let t = eI(NH("selection"));
- return /* @__PURE__ */ (0, F.jsx)(ER, {
+function UU(e) {
+ let t = oI(zH("selection"));
+ return /* @__PURE__ */ (0, F.jsx)(MR, {
...e,
ref: t
});
}
-var RU = "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", zU = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 max-sm:px-2 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", w_e = "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", BU = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", VU = "relative flex size-8 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 WU = "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", GU = "flex min-h-7 flex-none cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 max-sm:px-2 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", P_e = "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", KU = "inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg", qU = "relative flex size-8 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)";
// src/react/catalog-grid/catalog-view-toggle.tsx
-function HU() {
- let e = FM();
- return /* @__PURE__ */ (0, F.jsxs)(ER, {
+function JU() {
+ let e = HM();
+ return /* @__PURE__ */ (0, F.jsxs)(MR, {
"aria-label": "馆藏显示方式",
orientation: "horizontal",
value: e,
- onChange: sce,
+ onChange: hce,
"data-entity-layout": "",
- className: BU,
- children: [/* @__PURE__ */ (0, F.jsx)(DR, {
+ className: KU,
+ children: [/* @__PURE__ */ (0, F.jsx)(NR, {
value: "cards",
"aria-label": "卡片",
- className: VU,
+ className: qU,
"data-glass-segment": "",
children: /* @__PURE__ */ (0, F.jsx)("span", {
title: "卡片",
className: "pointer-events-none contents",
- children: /* @__PURE__ */ (0, F.jsx)(xz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Dz, {
"aria-hidden": "true",
className: "size-4"
})
})
- }), /* @__PURE__ */ (0, F.jsx)(DR, {
+ }), /* @__PURE__ */ (0, F.jsx)(NR, {
value: "list",
"aria-label": "列表",
- className: VU,
+ className: qU,
"data-glass-segment": "",
children: /* @__PURE__ */ (0, F.jsx)("span", {
title: "列表",
className: "pointer-events-none contents",
- children: /* @__PURE__ */ (0, F.jsx)(Ipe, {
+ children: /* @__PURE__ */ (0, F.jsx)(Kpe, {
"aria-hidden": "true",
className: "size-4"
})
@@ -47418,8 +47463,8 @@ function HU() {
});
}
// src/react/components/icon-swap.tsx
-function UU({ a: e, b: t, state: n, className: r }) {
- let { isFocusVisible: i } = Dx();
+function YU({ a: e, b: t, state: n, className: r }) {
+ let { isFocusVisible: i } = Px();
return /* @__PURE__ */ (0, F.jsxs)("span", {
"aria-hidden": !0,
className: `iconswap ${r || ""}`,
@@ -47435,114 +47480,114 @@ function UU({ a: e, b: t, state: n, className: r }) {
})]
});
}
-function WU({ className: e }) {
- return /* @__PURE__ */ (0, F.jsx)(UU, {
- a: cpe,
- b: spe,
+function XU({ className: e }) {
+ return /* @__PURE__ */ (0, F.jsx)(YU, {
+ a: vpe,
+ b: _pe,
className: e
});
}
// src/react/follow-feed/follow-marks.ts
-var GU = (e) => typeof e == "string" ? e : "", KU = (e) => e.aliases;
-function qU(e, t = "") {
- let n = ki(e);
+var ZU = (e) => typeof e == "string" ? e : "", QU = (e) => e.aliases;
+function $U(e, t = "") {
+ let n = Wi(e);
return n ? `<img data-follow-site-icon="" src="${n}" alt="${z(t)}"${t ? ` title="${z(t)}"` : ""} loading="lazy" data-drop="self">` : "";
}
-function JU(e, t = "") {
- let n = z(Hr(t || e)), r = ki(e);
+function eW(e, t = "") {
+ let n = z(ri(t || e)), r = Wi(e);
return r ? `<img data-follow-site-icon="" src="${r}" alt="" loading="lazy" data-drop="initial" data-initial="${n}" data-drop-class="follow-site-initial">` : `<span class="follow-site-initial" aria-hidden="true">${n}</span>`;
}
-var YU = (e) => GU(e.title).trim() || "未命名内容", XU = (e, t) => Vr(e, KU(t));
-function ZU(e) {
+var tW = (e) => ZU(e.title).trim() || "未命名内容", nW = (e, t) => ni(e, QU(t));
+function rW(e) {
let t = e.filter((e) => e.entity_id && e.entity_name);
if (new Set(t.map((e) => e.entity_id)).size !== 1) return "";
- let n = t[0], r = GU(n.entity_name);
- return Ut("creator", r, n.entity_id), r;
+ let n = t[0], r = ZU(n.entity_name);
+ return an("creator", r, n.entity_id), r;
}
-function QU(e, t) {
- let { src: n, fallback: r } = Ur(e), i = Hr(t);
+function iW(e, t) {
+ let { src: n, fallback: r } = ii(e), i = ri(t);
if (!n) return `<span class="favatar none" title="没有可用头像">${z(i)}</span>`;
let a = r ? ` data-fallbacks="${z(r)}"` : "";
return `<img class="favatar" src="${z(n)}" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="initial"${a} data-initial="${z(i)}" data-drop-class="favatar none">`;
}
-function $U(e, t, n) {
- let r = KU(n), i = e.credit, a = i?.poster;
+function aW(e, t, n) {
+ let r = QU(n), i = e.credit, a = i?.poster;
if (!a) {
- let n = Vr(t, r);
+ let n = ni(t, r);
return {
- author: n || GU(e.author) || GU(e.source_label) || "创作者未取得",
- avatar: QU(t, n),
+ author: n || ZU(e.author) || ZU(e.source_label) || "创作者未取得",
+ avatar: iW(t, n),
credited: "",
- entityName: ZU(t)
+ entityName: rW(t)
};
}
- let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && Vr(c, r) || a;
+ let o = (e) => String(e || "").toLowerCase().replace(/[^a-z0-9]/g, ""), s = n.sources.find((e) => o(e.ref) === o(a)), c = s?.author_key ? n.sources.filter((e) => e.author_key === s.author_key) : s ? [s] : [], l = c.length && ni(c, r) || a;
return {
author: l,
- avatar: QU(c, l),
+ avatar: iW(c, l),
credited: i.credited || "",
- entityName: ZU(c)
+ entityName: rW(c)
};
}
-function eW(e, t = e.primary) {
+function oW(e, t = e.primary) {
let n = [], r = (e, t) => `<small class="javedition" data-follow-edition="${e}">${t}</small>`;
e.primary.variant_kind === "wip" ? n.push(r("wip", "WIP")) : e.has_wip && n.push(r("has-wip", "含 WIP"));
- let i = GU(e.primary.version);
+ let i = ZU(e.primary.version);
i && n.push(r("version", z(i)));
- let a = GU(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
+ let a = ZU(t.audio), o = a === "voiced" ? "配音版" : a === "silent" ? "无声版" : "";
return o && n.push(r(a, o)), n.join("");
}
-function tW(e, t = e.primary) {
+function sW(e, t = e.primary) {
let n = new Map([
e.primary,
...e.variants,
...e.duplicates
].filter((e) => e.provider !== t.provider).map((e) => [e.provider, e.provider_label || e.provider]));
if (!n.size) return "";
- let r = [...n].map(([e, t]) => qU(e, t) || `<span>${z(t)}</span>`).join("");
+ let r = [...n].map(([e, t]) => $U(e, t) || `<span>${z(t)}</span>`).join("");
return `<span data-follow-seealso="" title="另见 ${z([...n.values()].join("、"))}"><span data-follow-seealso-label="">另见</span> ${r}</span>`;
}
-function nW(e, t) {
- let n = GU(e.media_error);
+function cW(e, t) {
+ let n = ZU(e.media_error);
return n ? `媒体未取得:${n}` : e.media_needs_credential && !t.credentials.has(e.provider) ? e.playable ? "部分媒体未取得:需要 F95 登录会话解析" : "媒体未取得:需要 F95 登录会话解析" : "";
}
-var T_e = 864e5, E_e = (e, t) => {
+var F_e = 864e5, I_e = (e, t) => {
let n = new Date(/[Zz]|[+-]\d\d:?\d\d$/.test(e) ? e : `${e}Z`).getTime();
- return Number.isFinite(n) && n - t > T_e;
+ return Number.isFinite(n) && n - t > F_e;
};
-function rW(e, t) {
- let n = GU(e.published_at);
+function lW(e, t) {
+ let n = ZU(e.published_at);
if (!n) return null;
- let r = e.published_precision === "approximate", i = ir(n);
+ let r = e.published_precision === "approximate", i = yr(n);
return {
prefix: r ? "约 " : "",
full: r ? i.slice(0, 10) : i,
- suffix: E_e(n, t) ? " · 晚于现在" : ""
+ suffix: I_e(n, t) ? " · 晚于现在" : ""
};
}
-function iW(e, t = Date.now()) {
- let n = rW(e, t);
+function uW(e, t = Date.now()) {
+ let n = lW(e, t);
return n ? `${n.prefix}${n.full}${n.suffix}` : "时间未取得";
}
-function D_e(e, t = Date.now()) {
- let n = rW(e, t);
+function dW(e, t = Date.now()) {
+ let n = lW(e, t);
if (!n) return "时间未取得";
if (!/^\d{4}-/.test(n.full)) return `${n.prefix}${n.full}${n.suffix}`;
let r = n.full.startsWith(String(new Date(t).getFullYear())) ? n.full.slice(5, 10) : n.full.slice(0, 10);
return `${n.prefix}${r}${n.suffix}`;
}
-var aW = /* @__PURE__ */ new Set(), oW = [], sW = null;
-function cW() {
- if (sW = null, !oW.length) return;
- let e = oW.splice(0, 200);
- on("/api/follow/image-dims", {
+var fW = /* @__PURE__ */ new Set(), pW = [], mW = null;
+function hW() {
+ if (mW = null, !pW.length) return;
+ let e = pW.splice(0, 200);
+ xn("/api/follow/image-dims", {
method: "POST",
body: JSON.stringify({ entries: e })
- }).catch(() => {}), oW.length && (sW = setTimeout(cW, 800));
+ }).catch(() => {}), pW.length && (mW = setTimeout(hW, 800));
}
-function O_e(e, t, n, r) {
+function gW(e, t, n, r) {
let i = `${e}:${t ?? ""}`;
- aW.has(i) || (aW.add(i), oW.push(t === null ? {
+ fW.has(i) || (fW.add(i), pW.push(t === null ? {
item: e,
width: n,
height: r
@@ -47551,25 +47596,25 @@ function O_e(e, t, n, r) {
width: n,
height: r,
media: t
- }), sW ||= setTimeout(cW, 800));
+ }), mW ||= setTimeout(hW, 800));
}
// src/react/entity-filter/entity-filter.ts
-var k_e = (e) => e === "videos", lW = () => /* @__PURE__ */ (0, F.jsx)("span", {
+var _W = (e) => e === "videos", vW = () => /* @__PURE__ */ (0, F.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
-}), uW = Vz("shuffle"), dW = Vz("arrow-up"), fW = Vz("arrow-down");
-function pW(e) {
- let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = k_e(t), u = t === "online" ? e.online : null, d = l || !!u, f = u ? u.status : r, p = u ? u.statuses.map(([e, t]) => ({
+}), yW = qz("shuffle"), bW = qz("arrow-up"), xW = qz("arrow-down");
+function SW(e) {
+ let { view: t, views: n, state: r, states: i, tags: a, combo: o, actions: s, helpers: c } = e, l = _W(t), u = t === "online" ? e.online : null, d = l || !!u, f = u ? u.status : r, p = u ? u.statuses.map(([e, t]) => ({
k: e,
label: t
- })) : i, m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = (0, P.useRef)(null), _ = (0, P.useRef)(null), v = (0, P.useRef)(null), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = dI(m, g, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${f}`), S = dI(h, _, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`), C = (0, P.useRef)(null), w = (0, P.useRef)(null), T = u?.mediaCounts ? u : null, E = dI(C, w, "[data-media-view][aria-pressed=\"true\"]", `${t}:${u?.media}:${!!T}`);
+ })) : i, m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = (0, P.useRef)(null), _ = (0, P.useRef)(null), v = (0, P.useRef)(null), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = _I(m, g, "[data-entity-state][aria-pressed=\"true\"]", `${t}:${f}`), S = _I(h, _, "[data-media-view][aria-pressed=\"true\"]", `${t}:${!!n}`), C = (0, P.useRef)(null), w = (0, P.useRef)(null), T = u?.mediaCounts ? u : null, E = _I(C, w, "[data-media-view][aria-pressed=\"true\"]", `${t}:${u?.media}:${!!T}`);
return (0, P.useEffect)(() => {
c.wireDrag(y.current), c.wireScroller(v.current), c.wireDrag(b.current);
- }, [c]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(vW, {
+ }, [c]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(DW, {
items: o,
hidden: !l,
actions: s
- }), /* @__PURE__ */ (0, F.jsx)(iI, {
+ }), /* @__PURE__ */ (0, F.jsx)(uI, {
label: "筛选与排序",
topLabel: "媒体与标签",
attrs: {
@@ -47598,19 +47643,19 @@ function pW(e) {
})
] }),
top: !n && !d ? null : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- n ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(_W, {
+ n ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(EW, {
keys: n,
view: t,
row: _,
glide: S,
onView: s.setView
- }), d ? /* @__PURE__ */ (0, F.jsx)(lW, {}) : null] }) : null,
- T ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(hW, {
+ }), d ? /* @__PURE__ */ (0, F.jsx)(vW, {}) : null] }) : null,
+ T ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(wW, {
head: T,
row: w,
glide: E,
onMedia: s.onlineMedia
- }), /* @__PURE__ */ (0, F.jsx)(lW, {})] }) : null,
+ }), /* @__PURE__ */ (0, F.jsx)(vW, {})] }) : null,
/* @__PURE__ */ (0, F.jsxs)("div", {
ref: v,
"data-entity-scroll": "",
@@ -47631,11 +47676,11 @@ function pW(e) {
f !== e.k && (u ? s.onlineStatus(e.k) : s.setState(e.k));
},
children: e.label
- }, e.k)), !u || u.providers.length || u.tags.length ? /* @__PURE__ */ (0, F.jsx)(lW, {}) : null]
+ }, e.k)), !u || u.providers.length || u.tags.length ? /* @__PURE__ */ (0, F.jsx)(vW, {}) : null]
}), /* @__PURE__ */ (0, F.jsx)("div", {
ref: y,
"data-entity-tags": "",
- children: l ? a.map((e) => /* @__PURE__ */ (0, F.jsxs)(oI, {
+ children: l ? a.map((e) => /* @__PURE__ */ (0, F.jsxs)(fI, {
"data-entity-tag": e.k,
"data-entity-press": "",
pressed: e.selected,
@@ -47644,17 +47689,17 @@ function pW(e) {
"data-count-badge": e.k,
children: e.n.toLocaleString()
})]
- }, e.k)) : u ? /* @__PURE__ */ (0, F.jsx)(gW, {
+ }, e.k)) : u ? /* @__PURE__ */ (0, F.jsx)(TW, {
head: u,
actions: s
}) : null
})]
})
] }),
- bottom: /* @__PURE__ */ (0, F.jsx)(yW, { ...e })
+ bottom: /* @__PURE__ */ (0, F.jsx)(OW, { ...e })
})] });
}
-var mW = [[
+var CW = [[
"videos",
"视频",
"play",
@@ -47665,7 +47710,7 @@ var mW = [[
"pics",
"image"
]];
-function hW({ head: e, row: t, glide: n, onMedia: r }) {
+function wW({ head: e, row: t, glide: n, onMedia: r }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
ref: t,
role: "group",
@@ -47673,7 +47718,7 @@ function hW({ head: e, row: t, glide: n, onMedia: r }) {
"data-entity-media": "",
"data-online-media": "",
onPointerLeave: n.leave,
- children: mW.map(([t, i, a, o]) => {
+ children: CW.map(([t, i, a, o]) => {
let s = `${i} ${Math.max(0, e.mediaCounts?.[t] || 0).toLocaleString()}`;
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -47691,7 +47736,7 @@ function hW({ head: e, row: t, glide: n, onMedia: r }) {
})
});
}
-function gW({ head: e, actions: t }) {
+function TW({ head: e, actions: t }) {
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
e.providers.map(([n, r]) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -47701,10 +47746,10 @@ function gW({ head: e, actions: t }) {
title: r,
"aria-label": `来源:${r}`,
onClick: () => t.onlineProvider(n),
- dangerouslySetInnerHTML: { __html: qU(n) }
+ dangerouslySetInnerHTML: { __html: $U(n) }
}, n)),
- e.providers.length && e.tags.length ? /* @__PURE__ */ (0, F.jsx)(lW, {}) : null,
- e.tags.map((e) => /* @__PURE__ */ (0, F.jsxs)(oI, {
+ e.providers.length && e.tags.length ? /* @__PURE__ */ (0, F.jsx)(vW, {}) : null,
+ e.tags.map((e) => /* @__PURE__ */ (0, F.jsxs)(fI, {
"data-follow-tag": e.k,
"data-entity-press": "",
"data-tag-cat": `r34-${e.cat}`,
@@ -47717,7 +47762,7 @@ function gW({ head: e, actions: t }) {
}, e.k))
] });
}
-function _W({ keys: e, view: t, row: n, glide: r, onView: i }) {
+function EW({ keys: e, view: t, row: n, glide: r, onView: i }) {
let a = [];
return e.people && a.push({
value: "people",
@@ -47765,7 +47810,7 @@ function _W({ keys: e, view: t, row: n, glide: r, onView: i }) {
})
});
}
-function vW({ items: e, hidden: t, actions: n }) {
+function DW({ items: e, hidden: t, actions: n }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-entity-combo": "",
hidden: t,
@@ -47785,7 +47830,7 @@ function vW({ items: e, hidden: t, actions: n }) {
})] }) : null
});
}
-function yW(e) {
+function OW(e) {
let { view: t, readout: n, busy: r, video: i, photo: a, actions: o, helpers: s } = e;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
t === "photos" && a?.back ? /* @__PURE__ */ (0, F.jsxs)("button", {
@@ -47797,27 +47842,27 @@ function yW(e) {
dangerouslySetInnerHTML: { __html: R("chevron-left") }
}), /* @__PURE__ */ (0, F.jsx)("span", { children: "全部照片" })]
}) : null,
- /* @__PURE__ */ (0, F.jsx)(bW, {
+ /* @__PURE__ */ (0, F.jsx)(kW, {
text: n,
busy: r
}),
- /* @__PURE__ */ (0, F.jsx)(nB, { currentHref: () => location.pathname + location.search }),
- t === "videos" && i ? /* @__PURE__ */ (0, F.jsx)(CW, {
+ /* @__PURE__ */ (0, F.jsx)(cB, { currentHref: () => location.pathname + location.search }),
+ t === "videos" && i ? /* @__PURE__ */ (0, F.jsx)(MW, {
head: i,
actions: o
}) : null,
- t === "photos" && a ? /* @__PURE__ */ (0, F.jsx)(EW, {
+ t === "photos" && a ? /* @__PURE__ */ (0, F.jsx)(FW, {
head: a,
actions: o,
helpers: s
}) : null,
- t === "online" && e.online ? /* @__PURE__ */ (0, F.jsx)(TW, {
+ t === "online" && e.online ? /* @__PURE__ */ (0, F.jsx)(PW, {
head: e.online,
actions: o
}) : null
] });
}
-function bW({ text: e, busy: t }) {
+function kW({ text: e, busy: t }) {
return /* @__PURE__ */ (0, F.jsx)("h3", {
"data-entity-readout": "",
children: t ? /* @__PURE__ */ (0, F.jsx)("span", {
@@ -47827,22 +47872,22 @@ function bW({ text: e, busy: t }) {
}) : e
});
}
-function xW({ name: e, label: t, value: n, options: r, onChange: i }) {
- return /* @__PURE__ */ (0, F.jsx)(ER, {
+function AW({ name: e, label: t, value: n, options: r, onChange: i }) {
+ return /* @__PURE__ */ (0, F.jsx)(MR, {
name: e,
"aria-label": t,
orientation: "horizontal",
value: n,
onChange: i,
"data-entity-layout": "",
- className: BU,
+ className: KU,
children: r.map(([e, t, n]) => {
- let r = Vz(n);
- return /* @__PURE__ */ (0, F.jsx)(DR, {
+ let r = qz(n);
+ return /* @__PURE__ */ (0, F.jsx)(NR, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: VU,
+ className: qU,
children: /* @__PURE__ */ (0, F.jsx)("span", {
title: t,
className: "contents",
@@ -47852,38 +47897,38 @@ function xW({ name: e, label: t, value: n, options: r, onChange: i }) {
})
});
}
-function SW({ onPress: e, busy: t = !1 }) {
- return /* @__PURE__ */ (0, F.jsx)(nI, {
+function jW({ onPress: e, busy: t = !1 }) {
+ return /* @__PURE__ */ (0, F.jsx)(cI, {
"data-entity-batch": "",
label: "换一批",
busy: t,
busyStyle: "strand",
- icon: uW,
+ icon: yW,
onPress: e
});
}
-function CW({ head: e, actions: t }) {
- let n = FM();
+function MW({ head: e, actions: t }) {
+ let n = HM();
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(SW, { onPress: () => void t.reshuffle() }),
- e.jav && n === "cards" ? /* @__PURE__ */ (0, F.jsx)(xW, {
+ /* @__PURE__ */ (0, F.jsx)(jW, { onPress: () => void t.reshuffle() }),
+ e.jav && n === "cards" ? /* @__PURE__ */ (0, F.jsx)(AW, {
label: "JAV 卡片版式",
value: e.jav.layout,
options: e.jav.options,
onChange: t.setJavLayout
}) : null,
- /* @__PURE__ */ (0, F.jsx)(HU, {}),
- /* @__PURE__ */ (0, F.jsx)(FU, {}),
- /* @__PURE__ */ (0, F.jsx)(wW, {
+ /* @__PURE__ */ (0, F.jsx)(JU, {}),
+ /* @__PURE__ */ (0, F.jsx)(VU, {}),
+ /* @__PURE__ */ (0, F.jsx)(NW, {
sorts: e.sorts,
onSort: t.setSort
})
]
});
}
-function wW({ sorts: e, onSort: t }) {
+function NW({ sorts: e, onSort: t }) {
return /* @__PURE__ */ (0, F.jsx)(F.Fragment, { children: e.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-entity-sort": e.key,
@@ -47891,20 +47936,20 @@ function wW({ sorts: e, onSort: t }) {
"aria-pressed": e.pressed,
"aria-label": e.ariaLabel || void 0,
onClick: () => t(e.key),
- children: [e.label, e.pressed && e.dir ? /* @__PURE__ */ (0, F.jsx)(UU, {
- a: dW,
- b: fW,
+ children: [e.label, e.pressed && e.dir ? /* @__PURE__ */ (0, F.jsx)(YU, {
+ a: bW,
+ b: xW,
state: e.dir === "asc" ? "a" : "b",
className: "size-(--icon-inline)"
}) : null]
}, e.key)) });
}
-function TW({ head: e, actions: t }) {
+function PW({ head: e, actions: t }) {
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(SW, { onPress: t.onlineShuffle }),
- e.media === "images" ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(xW, {
+ /* @__PURE__ */ (0, F.jsx)(jW, { onPress: t.onlineShuffle }),
+ e.media === "images" ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(AW, {
label: "图片布局",
value: e.photoLayout,
options: e.photoLayouts,
@@ -47924,27 +47969,27 @@ function TW({ head: e, actions: t }) {
dangerouslySetInnerHTML: { __html: R("captions-off") }
})]
})] }) : null,
- /* @__PURE__ */ (0, F.jsx)(wW, {
+ /* @__PURE__ */ (0, F.jsx)(NW, {
sorts: e.sorts,
onSort: t.onlineSort
})
]
});
}
-function EW({ head: e, actions: t, helpers: n }) {
+function FW({ head: e, actions: t, helpers: n }) {
let [r, i] = (0, P.useState)(!1), a = (0, P.useRef)(null), o = e.back ? n.sourceToolsHtml(e.setId) : "";
return (0, P.useEffect)(() => {
a.current && o && n.wireSourceTools(a.current);
}, [n, o]), /* @__PURE__ */ (0, F.jsxs)("span", {
"data-entity-sorts": "",
children: [
- e.shuffle ? /* @__PURE__ */ (0, F.jsx)(SW, {
+ e.shuffle ? /* @__PURE__ */ (0, F.jsx)(jW, {
onPress: () => {
i(!0), t.reshuffle().finally(() => i(!1));
},
busy: r
}) : null,
- /* @__PURE__ */ (0, F.jsx)(xW, {
+ /* @__PURE__ */ (0, F.jsx)(AW, {
label: "图片布局",
value: e.layout,
options: e.layouts,
@@ -47959,8 +48004,8 @@ function EW({ head: e, actions: t, helpers: n }) {
});
}
// src/react/catalog-filter/catalog-filter.ts
-var DW = "peach.catalog.tiers.v1";
-function OW() {
+var IW = "peach.catalog.tiers.v1";
+function LW() {
try {
let e = JSON.parse(localStorage.getItem("peach.catalog.tiers.v1") || "{}");
return {
@@ -47974,41 +48019,41 @@ function OW() {
};
}
}
-function kW(e) {
+function RW(e) {
try {
let t = JSON.stringify({
performers: e.performers,
studios: e.studios
});
- localStorage.getItem("peach.catalog.tiers.v1") !== t && localStorage.setItem(DW, t);
+ localStorage.getItem("peach.catalog.tiers.v1") !== t && localStorage.setItem(IW, t);
} catch {}
}
// src/react/catalog-filter/catalog-filter-page.tsx
-var AW = "";
-function jW(e) {
- let t = !e.tiers, n = zW(e.comboHost);
+var zW = "";
+function BW(e) {
+ let t = !e.tiers, n = JW(e.comboHost);
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-catalog-root": "",
"data-loading": t || void 0,
"data-refreshing": e.refreshing || void 0,
className: "contents",
children: [
- n ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(vW, {
+ n ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(DW, {
items: e.combo,
hidden: e.comboHidden,
actions: e.actions
}), n) : null,
- /* @__PURE__ */ (0, F.jsx)(PW, { ...e }),
- e.offscreen ? null : /* @__PURE__ */ (0, F.jsx)(MW, { ...e })
+ /* @__PURE__ */ (0, F.jsx)(UW, { ...e }),
+ e.offscreen ? null : /* @__PURE__ */ (0, F.jsx)(VW, { ...e })
]
});
}
-function MW(e) {
- let { actions: t, helpers: n } = e, r = (0, P.useRef)(null), i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), [c, l] = (0, P.useState)(!1), u = dI(r, i, "[data-catalog-view][aria-pressed=\"true\"]", e.state);
+function VW(e) {
+ let { actions: t, helpers: n } = e, r = (0, P.useRef)(null), i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), [c, l] = (0, P.useState)(!1), u = _I(r, i, "[data-catalog-view][aria-pressed=\"true\"]", e.state);
(0, P.useEffect)(() => {
n.wireDrag(o.current), n.wireScroller(a.current), n.wireDrag(s.current);
}, [n]);
- let d = !e.tiers, f = BW(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
+ let d = !e.tiers, f = YW(o, e.tags, e.tiers?.key ?? "", e.tagFirst);
return (0, P.useLayoutEffect)(() => {
let e = a.current?.closest("[data-catalog-frame]");
if (!e) return;
@@ -48024,8 +48069,8 @@ function MW(e) {
e.layout,
e.sorts
]), (0, P.useLayoutEffect)(() => {
- Ns(o.current, "tagbar");
- }, [f]), /* @__PURE__ */ (0, F.jsx)(iI, {
+ Js(o.current, "tagbar");
+ }, [f]), /* @__PURE__ */ (0, F.jsx)(uI, {
label: "筛选与排序",
topLabel: "视图与标签",
attrs: {
@@ -48069,17 +48114,17 @@ function MW(e) {
}), /* @__PURE__ */ (0, F.jsxs)("div", {
ref: o,
"data-catalog-tags": "",
- children: [e.empty || d ? /* @__PURE__ */ (0, F.jsx)(IW, { kind: "tag" }) : null, f.map((e) => /* @__PURE__ */ (0, F.jsx)(NW, {
+ children: [e.empty || d ? /* @__PURE__ */ (0, F.jsx)(GW, { kind: "tag" }) : null, f.map((e) => /* @__PURE__ */ (0, F.jsx)(HW, {
tag: e,
onPress: t.toggleTag
}, e.k))]
})]
}),
- bottom: e.trash ? null : /* @__PURE__ */ (0, F.jsx)(LW, { ...e })
+ bottom: e.trash ? null : /* @__PURE__ */ (0, F.jsx)(KW, { ...e })
});
}
-function NW({ tag: e, onPress: t }) {
- return /* @__PURE__ */ (0, F.jsxs)(oI, {
+function HW({ tag: e, onPress: t }) {
+ return /* @__PURE__ */ (0, F.jsxs)(fI, {
"data-catalog-tag": e.k,
"data-entity-press": "",
pressed: e.selected,
@@ -48090,14 +48135,15 @@ function NW({ tag: e, onPress: t }) {
})]
});
}
-function PW(e) {
+function UW(e) {
+ tI();
let { actions: t, helpers: n } = e, r = e.tiers ?? {
key: "",
performers: [],
studios: []
- }, i = !e.tiers, a = e.empty || i, o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useCallback)((e) => () => t.moreTops(e), [t]), l = BW(o, r.performers, r.key, 24, a ? void 0 : c("performers")), u = BW(s, r.studios, r.key, 24, a ? void 0 : c("studios")), d = (0, P.useMemo)(() => i ? OW() : null, [i]), f = d ? d.performers : e.empty || r.performers.length > 0, p = d ? d.studios : e.empty || r.studios.length > 0;
+ }, i = !e.tiers, a = e.empty || i, o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useCallback)((e) => () => t.moreTops(e), [t]), l = YW(o, r.performers, r.key, 24, a ? void 0 : c("performers")), u = YW(s, r.studios, r.key, 24, a ? void 0 : c("studios")), d = (0, P.useMemo)(() => i ? LW() : null, [i]), f = d ? d.performers : e.empty || r.performers.length > 0, p = d ? d.studios : e.empty || r.studios.length > 0;
return (0, P.useEffect)(() => {
- i || kW({
+ i || RW({
performers: f,
studios: p
});
@@ -48118,7 +48164,7 @@ function PW(e) {
children: [f ? /* @__PURE__ */ (0, F.jsx)("div", {
ref: o,
"data-catalog-tier": "performers",
- children: a ? /* @__PURE__ */ (0, F.jsx)(IW, { kind: "performer" }) : l.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
+ children: a ? /* @__PURE__ */ (0, F.jsx)(GW, { kind: "performer" }) : l.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-tier-performer": "",
"data-entity-kind": "performer",
@@ -48129,24 +48175,24 @@ function PW(e) {
dangerouslySetInnerHTML: { __html: e.ringHtml }
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-tier-name": "",
- children: e.name
+ children: Qt("performer", e.name)
})]
}, e.name))
}) : null, p ? /* @__PURE__ */ (0, F.jsx)("div", {
ref: s,
"data-catalog-tier": "studios",
- children: a ? /* @__PURE__ */ (0, F.jsx)(IW, { kind: "studio" }) : u.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
+ children: a ? /* @__PURE__ */ (0, F.jsx)(GW, { kind: "studio" }) : u.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-tier-studio": "",
"data-entity-kind": "studio",
"data-entity-name": e.name,
onClick: () => t.openEntity("studio", e.name),
- children: [/* @__PURE__ */ (0, F.jsx)(FW, { studio: e }), e.name]
+ children: [/* @__PURE__ */ (0, F.jsx)(WW, { studio: e }), e.name]
}, e.name))
}) : null]
});
}
-function FW({ studio: e }) {
+function WW({ studio: e }) {
let [t, n] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsx)("span", {
"data-tier-mark": "",
@@ -48164,7 +48210,7 @@ function FW({ studio: e }) {
}) : e.fallback
});
}
-function IW({ kind: e }) {
+function GW({ kind: e }) {
let t = Array.from({ length: 64 }, (e, t) => t);
return e === "tag" ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-catalog-placeholder": "tag",
@@ -48180,46 +48226,46 @@ function IW({ kind: e }) {
children: [/* @__PURE__ */ (0, F.jsx)("span", {}), /* @__PURE__ */ (0, F.jsx)("span", { children: "\xA0" })]
}, t)) });
}
-function LW({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
- let a = FM(), [o, s] = (0, P.useState)(!1);
+function KW({ count: e, refreshing: t, layout: n, sorts: r, actions: i }) {
+ let a = HM(), [o, s] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("span", {
"data-catalog-summary": "",
- children: [/* @__PURE__ */ (0, F.jsx)(RW, { count: e }), /* @__PURE__ */ (0, F.jsx)(nB, { currentHref: i.currentHref })]
+ children: [/* @__PURE__ */ (0, F.jsx)(qW, { count: e }), /* @__PURE__ */ (0, F.jsx)(cB, { currentHref: i.currentHref })]
}), /* @__PURE__ */ (0, F.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(SW, {
+ /* @__PURE__ */ (0, F.jsx)(jW, {
onPress: () => {
s(!0), i.reshuffle().finally(() => s(!1));
},
busy: o || t
}),
- n && a === "cards" ? /* @__PURE__ */ (0, F.jsx)(xW, {
+ n && a === "cards" ? /* @__PURE__ */ (0, F.jsx)(AW, {
name: n.name,
label: n.label,
value: n.value,
options: n.options,
onChange: i.setLayout
}, n.name) : null,
- /* @__PURE__ */ (0, F.jsx)(HU, {}),
- /* @__PURE__ */ (0, F.jsx)(FU, {}),
- /* @__PURE__ */ (0, F.jsx)(wW, {
+ /* @__PURE__ */ (0, F.jsx)(JU, {}),
+ /* @__PURE__ */ (0, F.jsx)(VU, {}),
+ /* @__PURE__ */ (0, F.jsx)(NW, {
sorts: r,
onSort: i.setSort
})
]
})] });
}
-function RW({ count: e }) {
+function qW({ count: e }) {
let t = (0, P.useRef)(null), n = (0, P.useRef)(null), r = e ? `${e.total.toLocaleString()} 个符合 · 显示 ${e.shown.toLocaleString()}` : "";
return (0, P.useLayoutEffect)(() => {
if (e === !1) return;
if (!e) {
- Ks(n.current);
+ sc(n.current);
return;
}
let i = t.current;
- i && (AW && i.dataset.popCount === void 0 && (i.dataset.popCount = AW), AW = r, As(i, r));
+ i && (zW && i.dataset.popCount === void 0 && (i.dataset.popCount = zW), zW = r, Gs(i, r));
}, [e, r]), e === !1 ? /* @__PURE__ */ (0, F.jsx)("span", { "data-catalog-readout": "" }, "failed") : e ? /* @__PURE__ */ (0, F.jsx)("span", {
ref: t,
"data-catalog-readout": "",
@@ -48235,7 +48281,7 @@ function RW({ count: e }) {
})
}, "skeleton");
}
-function zW(e) {
+function JW(e) {
let [t, n] = (0, P.useState)(null);
return (0, P.useLayoutEffect)(() => {
if (!e) return;
@@ -48245,7 +48291,7 @@ function zW(e) {
};
}, [e]), t;
}
-function BW(e, t, n, r, i) {
+function YW(e, t, n, r, i) {
let a = () => ({
key: n,
limit: r,
@@ -48288,11 +48334,11 @@ function BW(e, t, n, r, i) {
}), l.slice(0, c.limit);
}
// src/react/components/grid-reveal.tsx
-var VW = "100% 0px";
-function HW(e, t) {
+var XW = "100% 0px";
+function ZW(e, t) {
let [n, r] = (0, P.useState)(e ? "skeleton" : "none"), [i] = (0, P.useState)(() => e ? t() : ""), a = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
- a.current && Ks(a.current);
+ a.current && sc(a.current);
}, []), (0, P.useLayoutEffect)(() => {
if (e || n !== "skeleton") return;
let t = !!a.current && !a.current.querySelector(".skeleton-awaiting");
@@ -48315,20 +48361,20 @@ function HW(e, t) {
fading: n === "fade"
};
}
-function UW({ message: e, onRetry: t }) {
+function QW({ message: e, onRetry: t }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-media-error": "",
onClick: (e) => {
e.target.closest("[data-note-action]") && t();
},
- dangerouslySetInnerHTML: { __html: bs(e, {
+ dangerouslySetInnerHTML: { __html: Fs(e, {
variant: "error",
actionLabel: "立即重试"
}) }
});
}
// src/react/components/art-slot.tsx
-function WW({ artwork: e, identity: t = e.html, relayout: n }) {
+function $W({ artwork: e, identity: t = e.html, relayout: n }) {
let [r, i] = (0, P.useState)({
identity: t,
artwork: e
@@ -48347,63 +48393,63 @@ function WW({ artwork: e, identity: t = e.html, relayout: n }) {
});
}
// src/library-catalog.ts
-var GW = "peach.library-colors.v1", KW = null, qW = /* @__PURE__ */ new Set();
-function JW() {
+var eG = "peach.library-colors.v1", tG = null, nG = /* @__PURE__ */ new Set();
+function rG() {
try {
- let e = JSON.parse(localStorage.getItem(GW) || "{}");
+ let e = JSON.parse(localStorage.getItem(eG) || "{}");
return e && typeof e == "object" ? e : {};
} catch {
return {};
}
}
-function YW(e) {
- KW = e;
+function iG(e) {
+ tG = e;
try {
- localStorage.setItem(GW, JSON.stringify(Object.fromEntries(e.filter((e) => e.color).map((e) => [e.id, e.color]))));
+ localStorage.setItem(eG, JSON.stringify(Object.fromEntries(e.filter((e) => e.color).map((e) => [e.id, e.color]))));
} catch {}
- qW.forEach((t) => t(e));
+ nG.forEach((t) => t(e));
}
-function XW() {
- return KW;
+function aG() {
+ return tG;
}
-function ZW(e) {
- return qW.add(e), () => {
- qW.delete(e);
+function oG(e) {
+ return nG.add(e), () => {
+ nG.delete(e);
};
}
// src/react/components/library-tint.ts
-var QW = /* @__PURE__ */ new Map(), $W = !1, eG = /* @__PURE__ */ new Set();
-function tG(e) {
+var sG = /* @__PURE__ */ new Map(), cG = !1, lG = /* @__PURE__ */ new Set();
+function uG(e) {
let t = document.createElement("span");
t.setAttribute("data-accent-ball", e), t.hidden = !0, document.body.append(t);
let n = getComputedStyle(t).getPropertyValue("--color-accent-500").trim();
return t.remove(), n;
}
-function nG(e) {
- QW = e;
+function dG(e) {
+ sG = e;
let t = document.getElementById("peach-library-tints");
- t || (t = document.createElement("style"), t.id = "peach-library-tints", document.head.append(t)), t.textContent = [...QW.values()].filter((e) => e.color).map((e) => `[data-library="${CSS.escape(e.id)}"]{--library-color:${tG(e.color)}}`).join("\n");
+ t || (t = document.createElement("style"), t.id = "peach-library-tints", document.head.append(t)), t.textContent = [...sG.values()].filter((e) => e.color).map((e) => `[data-library="${CSS.escape(e.id)}"]{--library-color:${uG(e.color)}}`).join("\n");
}
-function rG(e) {
- nG(e), eG.forEach((e) => e());
+function fG(e) {
+ dG(e), lG.forEach((e) => e());
}
-var iG = (e) => new Map(e.map((e) => [e.id, {
+var pG = (e) => new Map(e.map((e) => [e.id, {
id: e.id,
name: e.name,
- icon: Qo[e.icon || ""] || e.icon || "database",
+ icon: ps[e.icon || ""] || e.icon || "database",
location: e.roots?.[0]?.location || "",
color: e.color || ""
-}])), aG = !1;
-function oG() {
- if (aG) return;
- aG = !0, ZW((e) => rG(iG(e)));
- let e = XW();
+}])), mG = !1;
+function hG() {
+ if (mG) return;
+ mG = !0, oG((e) => fG(pG(e)));
+ let e = aG();
if (e) {
- nG(iG(e));
+ dG(pG(e));
return;
}
- let t = Object.entries(JW()).filter(([, e]) => e);
- t.length && nG(new Map(t.map(([e, t]) => [e, {
+ let t = Object.entries(rG()).filter(([, e]) => e);
+ t.length && dG(new Map(t.map(([e, t]) => [e, {
id: e,
name: "",
icon: "database",
@@ -48411,73 +48457,73 @@ function oG() {
color: t
}])));
}
-function sG() {
- $W || XW() || ($W = !0, B("/api/libraries").then((e) => YW(e.libraries || [])).catch(() => {
- $W = !1;
+function gG() {
+ cG || aG() || (cG = !0, B("/api/libraries").then((e) => iG(e.libraries || [])).catch(() => {
+ cG = !1;
}));
}
-function cG(e, t) {
- let n = QW.get(e) ?? {
+function _G(e, t) {
+ let n = sG.get(e) ?? {
id: e,
name: "",
icon: "database",
location: "",
color: ""
};
- rG(new Map([...QW, [e, {
+ fG(new Map([...sG, [e, {
...n,
color: t
}]]));
}
-function lG(e) {
- return eG.add(e), () => {
- eG.delete(e);
+function vG(e) {
+ return lG.add(e), () => {
+ lG.delete(e);
};
}
-function uG({ names: e = !1 } = {}) {
- return oG(), e && sG(), (0, P.useSyncExternalStore)(lG, () => QW, () => QW);
+function yG({ names: e = !1 } = {}) {
+ return hG(), e && gG(), (0, P.useSyncExternalStore)(vG, () => sG, () => sG);
}
// src/react/components/row-click.ts
-var dG = "a,button,input,select,textarea,label,[role=\"checkbox\"],[role=\"switch\"],[role=\"button\"],[role=\"link\"],[role=\"menu\"]";
-function fG(e, t) {
+var bG = "a,button,input,select,textarea,label,[role=\"checkbox\"],[role=\"switch\"],[role=\"button\"],[role=\"link\"],[role=\"menu\"]";
+function xG(e, t) {
let n = e.target;
if (!(n instanceof Element) || !t.contains(n)) return !1;
- let r = n.closest(dG);
+ let r = n.closest(bG);
return !r || !t.contains(r) || r === t;
}
-function pG(e) {
+function SG(e) {
e.shiftKey && e.preventDefault();
}
// src/react/components/media-card.tsx
-var mG = 9 / 16, hG = "未命名视频";
-function gG({ name: e }) {
+var CG = 9 / 16, wG = "未命名视频";
+function TG({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
}
-var _G = {
+var EG = {
image: "图片",
audio: "音频",
archive: "压缩包",
other: "其它文件"
-}, vG = {
+}, DG = {
manual: "手动",
junk: "垃圾",
duplicate: "重复",
missing: "文件缺失"
};
-function yG({ item: e }) {
+function OG({ item: e }) {
if (e.disposal !== "trash") return null;
- let t = e.disposal_reason && vG[e.disposal_reason] || "原因未记录";
+ let t = e.disposal_reason && DG[e.disposal_reason] || "原因未记录";
return /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-disposal-reason": "",
title: `归入原因:${t}`,
children: t
});
}
-function bG({ item: e, actions: t }) {
+function kG({ item: e, actions: t }) {
let [n, r] = (0, P.useState)(!1), [i, a] = (0, P.useState)(""), o = e.disposal === "trash" ? "restore" : "dispose", s = o === "restore" ? "还原" : "移入回收站";
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -48489,18 +48535,18 @@ function bG({ item: e, actions: t }) {
},
"aria-busy": n || void 0,
"aria-disabled": n || void 0,
- children: n ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs(`正在${s}`) } }), /* @__PURE__ */ (0, F.jsx)("span", { children: `正在${s}` })] }) : /* @__PURE__ */ (0, F.jsx)("span", { children: s })
+ children: n ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is(`正在${s}`) } }), /* @__PURE__ */ (0, F.jsx)("span", { children: `正在${s}` })] }) : /* @__PURE__ */ (0, F.jsx)("span", { children: s })
}), i ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-operation-error": "",
role: "alert",
children: i
}) : null] });
}
-function xG(e, t, n) {
- return t === "short" ? mG : LA(n);
+function AG(e, t, n) {
+ return t === "short" ? CG : UA(n);
}
-function SG(e) {
- let { kind: t, name: n, coStarred: r, performers: i, refs: a, total: o } = uo(e), s = i[0] || "", c = Ya(e);
+function jG(e) {
+ let { kind: t, name: n, coStarred: r, performers: i, refs: a, total: o } = Eo(e), s = i[0] || "", c = uo(e);
return {
avatar: r ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-media-avatars": "",
@@ -48512,7 +48558,7 @@ function SG(e) {
"data-entity-name": e,
title: `打开${c}页:${e}`,
style: { "--media-avatar-index": t },
- dangerouslySetInnerHTML: { __html: Qa(e, a[t] ?? null, "performer") }
+ dangerouslySetInnerHTML: { __html: mo(e, a[t] ?? null, "performer") }
}, `${e}:${t}`))
}) : t ? /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -48520,18 +48566,18 @@ function SG(e) {
"data-entity-kind": t,
"data-entity-name": n,
title: `打开${t === "performer" ? c : "资料"}页`,
- dangerouslySetInnerHTML: { __html: Qa(n, t === "performer" ? a[0] ?? null : e.creator_entity ?? null, t) }
+ dangerouslySetInnerHTML: { __html: mo(n, t === "performer" ? a[0] ?? null : e.creator_entity ?? null, t) }
}) : /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-avatar": "",
- dangerouslySetInnerHTML: { __html: Qa(n, null, "") }
+ dangerouslySetInnerHTML: { __html: mo(n, null, "") }
}),
who: r ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-media-who": "",
"data-entity-kind": "performer",
"data-entity-name": s,
- title: s,
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: s })]
+ title: Qt("performer", s),
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: Qt("performer", s) })]
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-who-more": "",
children: `等 ${o} 人`
@@ -48540,17 +48586,17 @@ function SG(e) {
"data-media-who": "",
"data-entity-kind": t,
"data-entity-name": n,
- title: n,
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
+ title: Qt(t, n),
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: Qt(t, n) })]
}) : /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-media-who": "",
"data-open-unowned": "",
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
})
};
}
-function CG() {
+function MG() {
return /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-media-preview": "",
@@ -48569,7 +48615,7 @@ function CG() {
})]
});
}
-function wG({ item: e, actions: t, on: n, onChange: r }) {
+function NG({ item: e, actions: t, on: n, onChange: r }) {
let [i, a] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-media-later": "",
@@ -48584,11 +48630,11 @@ function wG({ item: e, actions: t, on: n, onChange: r }) {
},
"aria-busy": i || void 0,
"aria-disabled": i || void 0,
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: n ? "check" : "bookmark-plus" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: n ? "check" : "bookmark-plus" })
})
});
}
-function TG({ reason: e }) {
+function PG({ reason: e }) {
let t = (0, P.useRef)(null), [n, r] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("button", {
ref: t,
@@ -48602,15 +48648,15 @@ function TG({ reason: e }) {
e.stopPropagation(), r(!0);
},
children: e
- }), /* @__PURE__ */ (0, F.jsx)(oR, {
+ }), /* @__PURE__ */ (0, F.jsx)(fR, {
triggerRef: t,
isOpen: n,
onOpenChange: r,
placement: "top",
offset: 8,
containerPadding: 12,
- className: eV,
- children: /* @__PURE__ */ (0, F.jsx)(yR, {
+ className: oV,
+ children: /* @__PURE__ */ (0, F.jsx)(TR, {
"data-media-reason-dialog": "",
"aria-label": "推荐理由",
className: "w-64 max-w-full p-2 text-body-regular whitespace-normal break-words text-text-primary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
@@ -48618,17 +48664,18 @@ function TG({ reason: e }) {
})
})] });
}
-function EG(e, t) {
+function FG(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 DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c, grouped: l = !0 }) {
- let u = (0, P.useRef)(null), [d, f] = (0, P.useState)(null), p = d?.id === e.id ? d.on : !!e.watch_later, m = uG(), h = e.library_id && m.get(e.library_id)?.color ? e.library_id : void 0, g = [Number(e.liked) > 0 ? "喜欢" : "", Number(e.o_count) > 0 ? "有高潮记录" : ""].filter(Boolean), _ = (0, P.useRef)(e);
+function IG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSeconds: a, helpers: o, actions: s, onOpen: c, grouped: l = !0 }) {
+ tI();
+ let u = (0, P.useRef)(null), [d, f] = (0, P.useState)(null), p = d?.id === e.id ? d.on : !!e.watch_later, m = yG(), h = e.library_id && m.get(e.library_id)?.color ? e.library_id : void 0, g = [Number(e.liked) > 0 ? "喜欢" : "", Number(e.o_count) > 0 ? "有高潮记录" : ""].filter(Boolean), _ = (0, P.useRef)(e);
_.current = e;
let v = (0, P.useCallback)((e) => {
let t = _.current;
- u.current && u.current !== e && Al(u.current), u.current = e, e && (!t.medium || t.medium === "video") && Ml(e, t);
- }, []), y = l && Number(e.part_group?.count) > 1 && e.part_group || null, b = l && Number(e.edition_group?.count) > 1 && e.edition_group || null, x = !!(y || b), S = n.active && !!e.is_jav, C = xG(e, t, n), w = S ? n.size : "small", T = C === mG && !!e.is_jav, E = T ? so(e, !1) : ao(e, w, !1, n.javImage), D = T || w === "small" ? E.html : ao(e, "small", !1, n.javImage).html, O = y?.title || e.name || "", k = o.displayName(e, O).trim() || hG, A = o.titleHtml(e, O).trim() || z(hG), j = y?.total_size ?? e.size, M = y?.total_duration ?? e.duration, ee = !y && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: te, who: ne } = SG(e), N = (e.follow_tags || e.tags || []).slice(0, 3), re = (t) => {
+ u.current && u.current !== e && Gl(u.current), u.current = e, e && (!t.medium || t.medium === "video") && ql(e, t);
+ }, []), y = l && Number(e.part_group?.count) > 1 && e.part_group || null, b = l && Number(e.edition_group?.count) > 1 && e.edition_group || null, x = !!(y || b), S = n.active && !!e.is_jav, C = AG(e, t, n), w = S ? n.size : "small", T = C === CG && !!e.is_jav, E = T ? Co(e, !1) : xo(e, w, !1, n.javImage), D = T || w === "small" ? E.html : xo(e, "small", !1, n.javImage).html, O = y?.title || e.name || "", k = o.displayName(e, O).trim() || wG, A = o.titleHtml(e, O).trim() || z(wG), j = y?.total_size ?? e.size, M = y?.total_duration ?? e.duration, ee = !y && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, { avatar: te, who: ne } = jG(e), N = (e.follow_tags || e.tags || []).slice(0, 3), re = (t) => {
let n = t.target;
if (n.closest("[data-media-reason-dialog]")) return;
let r = u.current;
@@ -48655,13 +48702,13 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
l && r.contains(l) ? s.toggleTag(l.dataset.tag || "") : c(e, r);
}, ie = /* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-pic": "",
- "data-pic-portrait": C === mG ? "" : void 0,
+ "data-pic-portrait": C === CG ? "" : void 0,
style: { "--card-ratio": String(C) },
children: [
- E.html ? /* @__PURE__ */ (0, F.jsx)(WW, {
+ E.html ? /* @__PURE__ */ (0, F.jsx)($W, {
artwork: E,
identity: D,
- relayout: (e) => Sl(e, w)
+ relayout: (e) => Ll(e, w)
}) : /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-nopic": "",
children: "无预览"
@@ -48672,11 +48719,11 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
}),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "check" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "check" })
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("b", { children: "回收站" })]
}),
y && !b ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-group": "",
@@ -48689,9 +48736,9 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
}) : null,
/* @__PURE__ */ (0, F.jsx)("span", {
"data-media-duration": "",
- children: kn(M)
+ children: Wn(M)
}),
- !i && e.disposal === "trash" ? /* @__PURE__ */ (0, F.jsx)(bG, {
+ !i && e.disposal === "trash" ? /* @__PURE__ */ (0, F.jsx)(kG, {
item: e,
actions: s
}) : null,
@@ -48707,22 +48754,22 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
"data-media-scrub": "",
children: /* @__PURE__ */ (0, F.jsx)("i", { style: { "--media-fill": `${Math.round(e.leave_ratio * 100)}%` } })
}),
- /* @__PURE__ */ (0, F.jsx)(CG, {}),
+ /* @__PURE__ */ (0, F.jsx)(MG, {}),
p || g.length ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-status": "",
children: [p ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-status": "later",
title: "稍后看",
"aria-label": "稍后看",
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "bookmark" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "bookmark" })
}) : null, g.length ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-status": "flagged",
title: `已标记:${g.join("、")}`,
"aria-label": `已标记:${g.join("、")}`,
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "heart" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "heart" })
}) : null]
}) : null,
- i ? null : /* @__PURE__ */ (0, F.jsx)(wG, {
+ i ? null : /* @__PURE__ */ (0, F.jsx)(NG, {
item: e,
actions: s,
on: p,
@@ -48737,27 +48784,27 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), EG(u.current, -a);
+ e.stopPropagation(), FG(u.current, -a);
},
title: `后退 ${a} 秒`,
"aria-label": `后退 ${a} 秒`,
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "rotate-ccw" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "rotate-ccw" })
}),
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
onClick: (e) => {
- e.stopPropagation(), EG(u.current, a);
+ e.stopPropagation(), FG(u.current, a);
},
title: `前进 ${a} 秒`,
"aria-label": `前进 ${a} 秒`,
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "rotate-cw" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "rotate-cw" })
}),
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-open": "",
title: "打开详情",
"aria-label": "打开详情",
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "expand" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "expand" })
})
]
})
@@ -48776,7 +48823,7 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
"data-pending-delete": e.disposal === "trash" ? "" : void 0,
"data-selected": r ? "" : void 0,
onClick: re,
- onMouseDown: pG,
+ onMouseDown: SG,
children: [
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -48818,15 +48865,15 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
"data-media-release": "",
dateTime: e.release_date,
title: e.release_date,
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "calendar" }), e.release_date]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "calendar" }), e.release_date]
}) : null, /* @__PURE__ */ (0, F.jsxs)("span", {
"data-media-size": "",
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "hard-drive" }), Number(j) > 0 ? jn(Number(j)) : "大小未知"]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "hard-drive" }), Number(j) > 0 ? Kn(Number(j)) : "大小未知"]
})]
})
]
}),
- t === "next" ? e.why ? /* @__PURE__ */ (0, F.jsx)(TG, { reason: e.why }) : null : N.length || e.disposal === "trash" ? /* @__PURE__ */ (0, F.jsx)("div", {
+ t === "next" ? e.why ? /* @__PURE__ */ (0, F.jsx)(PG, { reason: e.why }) : null : N.length || e.disposal === "trash" ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-media-tags": "",
children: N.map((t) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -48836,15 +48883,15 @@ function DG({ item: e, variant: t, layout: n, selected: r, selectMode: i, seekSe
children: o.tagLabel(t)
}, t))
}) : null,
- /* @__PURE__ */ (0, F.jsx)(yG, { item: e })
+ /* @__PURE__ */ (0, F.jsx)(OG, { item: e })
]
})]
})
]
});
}
-function OG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
- let o = (0, P.useRef)(null), s = e.medium === "image" && e.location !== "online", c = String(e.name || ""), l = c.toLowerCase().endsWith(".url") ? "网址快捷方式" : _G[e.medium || ""] || "其它文件", u = s ? "pics" : l === "网址快捷方式" ? "globe" : "hard-drive";
+function LG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpen: a }) {
+ let o = (0, P.useRef)(null), s = e.medium === "image" && e.location !== "online", c = String(e.name || ""), l = c.toLowerCase().endsWith(".url") ? "网址快捷方式" : EG[e.medium || ""] || "其它文件", u = s ? "pics" : l === "网址快捷方式" ? "globe" : "hard-drive";
return /* @__PURE__ */ (0, F.jsxs)("article", {
ref: o,
"data-media-card": "",
@@ -48856,14 +48903,14 @@ function OG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpe
onClick: (t) => {
o.current && (n || t.shiftKey || t.ctrlKey || t.metaKey ? (t.preventDefault(), i.toggleSelection(e.id, t.shiftKey)) : a(e, o.current));
},
- onMouseDown: pG,
+ onMouseDown: SG,
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-pic": "",
style: { "--card-ratio": "1.7777777777777777" },
children: [
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: u }), /* @__PURE__ */ (0, F.jsx)("b", { children: l })]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: u }), /* @__PURE__ */ (0, F.jsx)("b", { children: l })]
}),
s ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-art": "thumb",
@@ -48875,13 +48922,13 @@ function OG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpe
}),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: "check" })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: "check" })
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-media-trash-mark": "",
- children: [/* @__PURE__ */ (0, F.jsx)(gG, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("b", { children: "回收站" })]
+ children: [/* @__PURE__ */ (0, F.jsx)(TG, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("b", { children: "回收站" })]
}),
- n ? null : /* @__PURE__ */ (0, F.jsx)(bG, {
+ n ? null : /* @__PURE__ */ (0, F.jsx)(kG, {
item: e,
actions: i
})
@@ -48892,7 +48939,7 @@ function OG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpe
"data-media-avatar": "",
"data-media-kind-glyph": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, F.jsx)(gG, { name: u })
+ children: /* @__PURE__ */ (0, F.jsx)(TG, { name: u })
}), /* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-text": "",
children: [
@@ -48915,34 +48962,34 @@ function OG({ item: e, selected: t, selectMode: n, helpers: r, actions: i, onOpe
}) : null,
/* @__PURE__ */ (0, F.jsx)("span", {
"data-media-size": "",
- children: Number(e.size) > 0 ? jn(Number(e.size)) : "大小未知"
+ children: Number(e.size) > 0 ? Kn(Number(e.size)) : "大小未知"
})
]
}),
e.disposal === "trash" ? /* @__PURE__ */ (0, F.jsx)("div", { "data-media-tags": "" }) : null,
- /* @__PURE__ */ (0, F.jsx)(yG, { item: e })
+ /* @__PURE__ */ (0, F.jsx)(OG, { item: e })
]
})]
})]
});
}
-function kG(e) {
- return e.variant === "resource" ? /* @__PURE__ */ (0, F.jsx)(OG, { ...e }) : /* @__PURE__ */ (0, F.jsx)(DG, { ...e });
+function RG(e) {
+ return e.variant === "resource" ? /* @__PURE__ */ (0, F.jsx)(LG, { ...e }) : /* @__PURE__ */ (0, F.jsx)(IG, { ...e });
}
-var AG = (0, P.memo)(kG), jG = 1100, MG = 340, NG = 5e3;
-function PG(e, t, n) {
+var zG = (0, P.memo)(RG), BG = 1100, VG = 340, HG = 5e3;
+function UG(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, NG);
+ }, s = () => o(!1), c = setTimeout(s, HG);
t.cancels.add(s), i.onerror = s, i.onload = () => {
i.naturalWidth ? typeof i.decode == "function" ? i.decode().then(() => o(!0), s) : o(!0) : o(!1);
}, i.src = e;
});
}
-function FG({ load: e, canFlip: t, referrerPolicy: n }) {
+function WG({ load: e, canFlip: t, referrerPolicy: n }) {
let [r, i] = (0, P.useState)([]), [a, o] = (0, P.useState)(0), [s, c] = (0, P.useState)(null), l = (0, P.useRef)({
live: !1,
generation: 0,
@@ -48984,11 +49031,11 @@ function FG({ load: e, canFlip: t, referrerPolicy: n }) {
return;
}
if (!r() || !u.current.canFlip() || a.length < 2) return;
- let s = await Promise.all(a.map((t) => PG(t, e, n)));
+ let s = await Promise.all(a.map((t) => UG(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, jG);
+ p(), e.cycle = setInterval(p, BG);
}));
};
return (0, P.useEffect)(() => d, [d]), {
@@ -48997,7 +49044,7 @@ function FG({ 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(MG, () => {
+ e.armed !== null && (clearTimeout(e.armed), e.timers.delete(e.armed)), e.armed = f(VG, () => {
e.armed = null, m();
});
},
@@ -49007,8 +49054,8 @@ function FG({ load: e, canFlip: t, referrerPolicy: n }) {
};
}
// src/react/components/mix-card.tsx
-var IG = Vz("play");
-function LG({ src: e }) {
+var GG = qz("play");
+function KG({ src: e }) {
let [t, n] = (0, P.useState)(!1);
return t ? null : /* @__PURE__ */ (0, F.jsx)("img", {
"data-mix-poster": "",
@@ -49021,8 +49068,8 @@ function LG({ src: e }) {
className: "absolute inset-0 block size-full object-contain"
});
}
-var RG = "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 zG({ faces: e, fallback: t, onOpenEntity: n }) {
+var qG = "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 JG({ faces: e, fallback: t, onOpenEntity: n }) {
return e.length ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-mix-avatars": "",
children: e.slice(0, 5).map((e) => /* @__PURE__ */ (0, F.jsx)("button", {
@@ -49030,18 +49077,18 @@ function zG({ faces: e, fallback: t, onOpenEntity: n }) {
title: `打开资料页:${e.name}`,
"aria-label": `打开资料页:${e.name}`,
onClick: () => n(e.kind, e.name),
- className: `${RG} cursor-pointer outline-none`,
- dangerouslySetInnerHTML: { __html: Za(e.name, e, Ma(e.name), e.kind) }
+ className: `${qG} cursor-pointer outline-none`,
+ dangerouslySetInnerHTML: { __html: po(e.name, e, qa(e.name), e.kind) }
}, `${e.kind}:${e.id}`))
}) : /* @__PURE__ */ (0, F.jsx)("span", {
"data-mix-initial": "",
"aria-hidden": !0,
- className: `${RG} mt-0.5`,
+ className: `${qG} mt-0.5`,
children: t
});
}
-function BG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
- let b = FG({
+function YG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip: a, faces: o, onOpenEntity: s, onOpen: c, openLabel: l, menu: u, ratio: d, artwork: f, artworkIdentity: p, relayoutArt: m, faceHtml: h, badge: g, glyph: _, wholeCard: v, ...y }) {
+ let b = WG({
load: i,
canFlip: a
}), x = (0, P.useRef)(b.onPointerLeave);
@@ -49068,11 +49115,11 @@ function BG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
style: d === void 0 ? void 0 : { "--card-ratio": String(d) },
className: "relative z-1 flex aspect-video items-center justify-center overflow-hidden",
children: [
- f?.html ? /* @__PURE__ */ (0, F.jsx)(WW, {
+ f?.html ? /* @__PURE__ */ (0, F.jsx)($W, {
artwork: f,
identity: p,
relayout: m
- }) : r ? /* @__PURE__ */ (0, F.jsx)(LG, { src: r }, r) : /* @__PURE__ */ (0, F.jsx)("span", {
+ }) : r ? /* @__PURE__ */ (0, F.jsx)(KG, { src: r }, r) : /* @__PURE__ */ (0, F.jsx)("span", {
className: "text-caption-1-regular tracking-caps text-text-secondary uppercase",
children: "无预览"
}),
@@ -49102,7 +49149,7 @@ function BG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
/* @__PURE__ */ (0, F.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, F.jsx)(IG, {
+ children: [/* @__PURE__ */ (0, F.jsx)(GG, {
"aria-hidden": !0,
className: "size-(--icon-inline)"
}), g ?? `${n.toLocaleString()} 个视频`]
@@ -49115,10 +49162,10 @@ function BG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
_ ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-mix-glyph": "",
"aria-hidden": !0,
- children: /* @__PURE__ */ (0, F.jsx)(IG, {})
- }) : /* @__PURE__ */ (0, F.jsx)(zG, {
+ children: /* @__PURE__ */ (0, F.jsx)(GG, {})
+ }) : /* @__PURE__ */ (0, F.jsx)(JG, {
faces: o,
- fallback: Fn(e),
+ fallback: Xn(e),
onOpenEntity: s
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -49139,7 +49186,7 @@ function BG({ name: e, caption: t, count: n, poster: r, flipImages: i, canFlip:
});
}
// src/react/video-wall/folia/blockReflows.ts
-var VG = [
+var XG = [
[
[
{
@@ -52700,7 +52747,7 @@ var VG = [
}
]
]
-], HG = [
+], ZG = [
[
{
x: 0,
@@ -52997,89 +53044,89 @@ var VG = [
rows: 2
}
]
-], UG = (e) => e.map((e) => ({
+], QG = (e) => e.map((e) => ({
...e,
x: 12 - e.x - e.cols
-})), WG = (e) => e.map((e) => ({
+})), $G = (e) => e.map((e) => ({
...e,
y: 8 - e.y - e.rows
-})), GG = [
+})), eK = [
(e) => e,
- UG,
- WG,
- (e) => UG(WG(e))
-], KG = HG.flatMap((e) => GG.map((t) => t(e))), qG = VG.flatMap((e) => GG.map((t) => e.map(t)));
-KG.length;
-var JG = (e, t) => {
+ QG,
+ $G,
+ (e) => QG($G(e))
+], tK = ZG.flatMap((e) => eK.map((t) => t(e))), nK = XG.flatMap((e) => eK.map((t) => e.map(t)));
+tK.length;
+var rK = (e, t) => {
let n = Math.imul(e, 2654435761) ^ Math.imul(t, 2246822507);
return n = Math.imul(n ^ n >>> 15, 739982445), n ^= n >>> 12, n >>> 0;
-}, YG = (e, t) => {
- let n = HG.length;
- return ((e + t * 2) % n + n) % n * GG.length + JG(e, t) % GG.length;
-}, XG = (e, t) => KG[YG(e, t)], ZG = (e, t, n) => n < 0 || n >= 12 ? null : qG[YG(e, t)][n], QG = 103.36, $G = 6.08, eK = 12 * QG, tK = 8 * QG, nK = 12, rK = (e, t) => (e % t + t) % t, iK = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
-function aK(e, t) {
- let n = Math.max(1, Math.ceil(e / nK)), r = t ? 3 : Math.min(3, n);
+}, iK = (e, t) => {
+ let n = ZG.length;
+ return ((e + t * 2) % n + n) % n * eK.length + rK(e, t) % eK.length;
+}, aK = (e, t) => tK[iK(e, t)], oK = (e, t, n) => n < 0 || n >= 12 ? null : nK[iK(e, t)][n], sK = 103.36, cK = 6.08, lK = 12 * sK, uK = 8 * sK, dK = 12, fK = (e, t) => (e % t + t) % t, pK = (e, t) => e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
+function mK(e, t) {
+ let n = Math.max(1, Math.ceil(e / dK)), r = t ? 3 : Math.min(3, n);
return {
columns: r,
- width: r * eK,
- height: Math.ceil(n / r) * tK
+ width: r * lK,
+ height: Math.ceil(n / r) * uK
};
}
-function oK(e, t, n) {
- let { x: r, y: i, cols: a, rows: o } = XG(e, t)[n];
+function hK(e, t, n) {
+ let { x: r, y: i, cols: a, rows: o } = aK(e, t)[n];
return {
- x: e * eK + r * QG,
- y: t * tK + i * QG,
- width: a * QG - $G,
- height: o * QG - $G
+ x: e * lK + r * sK,
+ y: t * uK + i * sK,
+ width: a * sK - cK,
+ height: o * sK - cK
};
}
-function sK(e) {
+function gK(e) {
return (!e.medium || e.medium === "video") && !!e.has_cover && !!(e.cover_key || e.code);
}
-function cK(e, t, n) {
+function _K(e, t, n) {
if (!e) return null;
let [r, i, a] = n.split(":").map(Number);
if (![
r,
i,
a
- ].every(Number.isInteger) || a < 0 || a >= nK) return null;
- let o = aK(e, t), s = o.height / tK;
+ ].every(Number.isInteger) || a < 0 || a >= dK) return null;
+ let o = mK(e, t), s = o.height / uK;
if (t && (r < 0 || r >= o.columns || i < 0 || i >= s)) return null;
- let c = t ? r : rK(r, o.columns), l = ((t ? i : rK(i, s)) * o.columns + c) * nK + a;
+ let c = t ? r : fK(r, o.columns), l = ((t ? i : fK(i, s)) * o.columns + c) * dK + a;
return t && l >= e ? null : {
- ...oK(r, i, a),
+ ...hK(r, i, a),
index: l % e,
key: n
};
}
-function lK(e, t) {
+function vK(e, t) {
if (t < 0 || t >= e) return null;
- let n = Math.floor(t / nK);
- return cK(e, !0, `${n % 3}:${Math.floor(n / 3)}:${t % nK}`);
+ let n = Math.floor(t / dK);
+ return _K(e, !0, `${n % 3}:${Math.floor(n / 3)}:${t % dK}`);
}
-function uK(e, t, n) {
- let [r, i, a] = n.key.split(":").map(Number), o = ZG(r, i, a);
+function yK(e, t, n) {
+ let [r, i, a] = n.key.split(":").map(Number), o = oK(r, i, a);
return new Map((o || []).map((e, t) => [`${r}:${i}:${t}`, {
- x: r * eK + e.x * QG,
- y: i * tK + e.y * QG,
- width: e.cols * QG - $G,
- height: e.rows * QG - $G
+ x: r * lK + e.x * sK,
+ y: i * uK + e.y * sK,
+ width: e.cols * sK - cK,
+ height: e.rows * sK - cK
}]));
}
-function dK(e) {
+function bK(e) {
let t = 0, n = 0;
for (let r = Math.max(0, e - 36); r < e; r += 1) {
- let e = Math.floor(r / nK), i = oK(e % 3, Math.floor(e / 3), r % nK);
+ let e = Math.floor(r / dK), i = hK(e % 3, Math.floor(e / 3), r % dK);
t = Math.max(t, i.x + i.width), n = Math.max(n, i.y + i.height);
}
return {
- width: e >= 36 ? 3 * eK - $G : t,
+ width: e >= 36 ? 3 * lK - cK : t,
height: n
};
}
-function fK(e, t, n, r) {
+function xK(e, t, n, r) {
if (!r) return e;
let i = (t, n, r) => Math.min(16, Math.max(Math.min(16, r - n * e.scale - 16), t));
return {
@@ -53088,22 +53135,22 @@ function fK(e, t, n, r) {
y: i(e.y, n.height, t.height)
};
}
-function pK(e, t, n, r) {
+function SK(e, t, n, r) {
if (!e || !r.width || !r.height) return [];
let i = 180 / n.scale, a = {
x: -n.x / n.scale - i,
y: -n.y / n.scale - i,
width: r.width / n.scale + i * 2,
height: r.height / n.scale + i * 2
- }, o = aK(e, t), s = o.height / tK, c = [];
- for (let n = Math.floor(a.y / tK); n <= Math.floor((a.y + a.height) / tK); n += 1) for (let r = Math.floor(a.x / eK); r <= Math.floor((a.x + a.width) / eK); r += 1) {
+ }, o = mK(e, t), s = o.height / uK, c = [];
+ for (let n = Math.floor(a.y / uK); n <= Math.floor((a.y + a.height) / uK); n += 1) for (let r = Math.floor(a.x / lK); r <= Math.floor((a.x + a.width) / lK); r += 1) {
if (t && (r < 0 || r >= o.columns || n < 0 || n >= s)) continue;
- let i = t ? r : rK(r, o.columns), l = t ? n : rK(n, s);
- for (let s = 0; s < nK; s += 1) {
- let u = (l * o.columns + i) * nK + s;
+ let i = t ? r : fK(r, o.columns), l = t ? n : fK(n, s);
+ for (let s = 0; s < dK; s += 1) {
+ let u = (l * o.columns + i) * dK + s;
if (t && u >= e) continue;
- let d = oK(r, n, s);
- iK(d, a) && c.push({
+ let d = hK(r, n, s);
+ pK(d, a) && c.push({
...d,
index: u % e,
key: `${r}:${n}:${s}`
@@ -53112,7 +53159,7 @@ function pK(e, t, n, r) {
}
return c;
}
-var mK = class {
+var CK = class {
positions = /* @__PURE__ */ new Map();
used = /* @__PURE__ */ new Set();
cursor = 0;
@@ -53124,7 +53171,7 @@ var mK = class {
this.cursor = e;
}
tile(e, t) {
- let n = this.positions.get(e), r = n === void 0 ? null : cK(t, !1, e);
+ let n = this.positions.get(e), r = n === void 0 ? null : _K(t, !1, e);
return r ? {
...r,
index: n
@@ -53154,7 +53201,7 @@ var mK = class {
let e = 0;
for (let t of this.positions.keys()) e = Math.max(e, Number(t.split(":")[0]));
return {
- x: (e + 2) * eK,
+ x: (e + 2) * lK,
y: 0
};
}
@@ -53167,10 +53214,10 @@ var mK = class {
c < i && (r = s, i = c);
}
if (r) return r;
- let a = this.fresh(), o = `${Math.round(a.x / eK)}:0:0`;
+ let a = this.fresh(), o = `${Math.round(a.x / lK)}:0:0`;
return this.positions.set(o, t), this.used.add(t), this.tile(o, e);
}
-}, hK = [
+}, wK = [
"q",
"performer",
"series",
@@ -53185,16 +53232,16 @@ var mK = class {
"dur_max",
"region"
];
-function gK(e = {}) {
- return hK.some((t) => !!e[t]);
+function L_e(e = {}) {
+ return wK.some((t) => !!e[t]);
}
// src/react/video-wall/use-wall-camera.ts
-var _K = {
+var TK = {
x: 16,
y: 16,
scale: 1
};
-function vK(e, t, n = _K, r = !1) {
+function R_e(e, t, n = TK, r = !1) {
let i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)({
width: 0,
height: 0
@@ -53214,7 +53261,7 @@ function vK(e, t, n = _K, r = !1) {
let f = (0, P.useRef)(null), p = (0, P.useRef)(null), m = (0, P.useRef)(!1), h = (0, P.useRef)(null), g = (0, P.useCallback)(() => {
p.current?.stop(), p.current = null, f.current !== null && cancelAnimationFrame(f.current), f.current = null;
}, []), _ = (0, P.useCallback)((e, t = !1, n = !1) => {
- let { count: r, finite: c, focused: f } = d.current, p = fK(e, o.current, dK(r), c && !f && !n);
+ let { count: r, finite: c, focused: f } = d.current, p = xK(e, o.current, bK(r), c && !f && !n);
s.current = p;
let m = window.devicePixelRatio || 1;
a.current && (a.current.style.transform = `translate3d(${Math.round(p.x * m) / m}px, ${Math.round(p.y * m) / m}px, 0) scale(${p.scale})`), i.current && (i.current.dataset.cameraX = String(p.x), i.current.dataset.cameraY = String(p.y));
@@ -53285,7 +53332,7 @@ function vK(e, t, n = _K, r = !1) {
x: o.current.width / 2 - (e.x + e.width / 2) * i,
y: o.current.height / 2 - (e.y + e.height / 2) * i
};
- !t || v() ? _(a, !0, n) : p.current = lb(0, 1, {
+ !t || v() ? _(a, !0, n) : p.current = hb(0, 1, {
duration: .42,
ease: [
.22,
@@ -53314,7 +53361,7 @@ function vK(e, t, n = _K, r = !1) {
},
snapshot: () => ({ ...s.current }),
reset: () => {
- g(), _({ ..._K }, !0);
+ g(), _({ ...TK }, !0);
},
pan: (e, t) => {
g(), _({
@@ -53375,16 +53422,16 @@ function vK(e, t, n = _K, r = !1) {
};
}
// src/react/video-wall/wall-motion.ts
-var yK = {
+var z_e = {
type: "spring",
stiffness: 300,
damping: 34
-}, bK = {
+}, B_e = {
delay: .14,
duration: .24
};
// src/react/video-wall/use-wall-playback.ts
-function xK(e, t, n) {
+function V_e(e, t, n) {
let [r, i] = (0, P.useState)({
paused: !0,
time: 0,
@@ -53425,15 +53472,15 @@ function xK(e, t, n) {
};
}
// src/react/video-wall/wall-controls.tsx
-function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, grouped: a, queueOpen: o, queueReady: s, hasPrevious: c, hasNext: l, later: u, laterBusy: d, play: f, previous: p, next: m, queue: h, watchLater: g, details: _, ended: v, error: y }) {
- let b = Xy(), x = xK(t, n, v), S = x.duration || Number(e.duration) || 0, C = r || i, w = !t || x.paused, T = async () => {
+function H_e({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, grouped: a, queueOpen: o, queueReady: s, hasPrevious: c, hasNext: l, later: u, laterBusy: d, play: f, previous: p, next: m, queue: h, watchLater: g, details: _, ended: v, error: y }) {
+ let b = nb(), x = V_e(t, n, v), S = x.duration || Number(e.duration) || 0, C = r || i, w = !t || x.paused, T = async () => {
if (!(C || a && !s)) try {
t === e.id ? await x.toggle() : await f();
} catch (e) {
- y(tn(e));
+ y(_n(e));
}
};
- return /* @__PURE__ */ (0, F.jsxs)(fb.div, {
+ return /* @__PURE__ */ (0, F.jsxs)(vb.div, {
"data-wall-focus-actions": "",
initial: !b && {
opacity: 0,
@@ -53443,7 +53490,7 @@ function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, group
opacity: 1,
transform: "translateY(0px)"
},
- transition: b ? { duration: 0 } : bK,
+ transition: b ? { duration: 0 } : B_e,
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-wall-control-row": "",
children: [
@@ -53451,11 +53498,11 @@ function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, group
type: "button",
"data-wall-play": "",
"data-wall-pause": w ? void 0 : "",
- ...Uz(C),
+ ...Yz(C),
"aria-label": r ? "正在打开" : i ? "正在读取版本" : w ? "播放" : "暂停",
title: w ? "播放" : "暂停",
onClick: () => void T(),
- children: C ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs() } }) : /* @__PURE__ */ (0, F.jsx)("svg", {
+ children: C ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is() } }) : /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: w ? "#i-play" : "#i-player-pause" })
@@ -53501,12 +53548,12 @@ function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, group
}),
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
- ...Uz(d),
+ ...Yz(d),
"aria-label": u ? "移出稍后看" : "稍后看",
title: "稍后看",
"aria-pressed": u,
onClick: g,
- children: d ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs() } }) : /* @__PURE__ */ (0, F.jsx)("svg", {
+ children: d ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is() } }) : /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: "#i-bookmark" })
@@ -53515,9 +53562,9 @@ function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, group
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-wall-time": "",
children: [
- x.time > 0 ? kn(x.time) : "00:00",
+ x.time > 0 ? Wn(x.time) : "00:00",
" / ",
- S > 0 ? kn(S) : "00:00"
+ S > 0 ? Wn(S) : "00:00"
]
}),
/* @__PURE__ */ (0, F.jsx)("button", {
@@ -53547,7 +53594,7 @@ function SK({ item: e, playing: t, frame: n, starting: r, pendingGroup: i, group
});
}
// src/react/components/mix-queue.tsx
-function CK({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...s }) {
+function EK({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a, children: o, ...s }) {
let c = (0, P.useRef)(null), l = (0, P.useCallback)((e) => {
c.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
}, [a]);
@@ -53583,7 +53630,7 @@ function CK({ kind: e, title: t, summary: n, onClose: r, actions: i, listRef: a,
})]
});
}
-function wK({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }) {
+function DK({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }) {
let s = /* @__PURE__ */ (0, F.jsx)("span", {
"data-mix-item-text": "",
children: a
@@ -53606,7 +53653,7 @@ function wK({ current: e, pic: t, lead: n, after: r, row: i, children: a, ...o }
}), r]
});
}
-var TK = ({ label: e, count: t }) => /* @__PURE__ */ (0, F.jsxs)("h3", {
+var U_e = ({ label: e, count: t }) => /* @__PURE__ */ (0, F.jsxs)("h3", {
"data-mix-group-label": "",
children: [
e,
@@ -53615,106 +53662,106 @@ var TK = ({ label: e, count: t }) => /* @__PURE__ */ (0, F.jsxs)("h3", {
]
});
// src/react/video-wall/wall-queue.tsx
-function EK({ items: e, activeId: t, kind: n, label: r, choose: i, close: a }) {
+function W_e({ items: e, activeId: t, kind: n, label: r, choose: i, close: a }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-wall-queue": "",
id: "wall-queue",
- children: /* @__PURE__ */ (0, F.jsx)(CK, {
+ children: /* @__PURE__ */ (0, F.jsx)(EK, {
kind: n,
title: n === "parts" ? "分卷" : n === "editions" ? "版本" : "作品",
summary: `${e.length} 个视频`,
onClose: a,
- children: e.map((e) => /* @__PURE__ */ (0, F.jsxs)(wK, {
+ children: e.map((e) => /* @__PURE__ */ (0, F.jsxs)(DK, {
current: e.id === t,
"data-wall-source": e.id,
"aria-label": [
e.edition_label,
- e.part_label ? pN(e.part_label) : "",
+ e.part_label ? bN(e.part_label) : "",
r(e)
].filter(Boolean).join(" · "),
onClick: () => i(e),
- pic: /* @__PURE__ */ (0, F.jsx)(WW, { artwork: ao(e, "small", !0, "cover") }),
+ pic: /* @__PURE__ */ (0, F.jsx)($W, { artwork: xo(e, "small", !0, "cover") }),
children: [/* @__PURE__ */ (0, F.jsx)("b", { children: r(e) }), /* @__PURE__ */ (0, F.jsx)("span", { children: [
e.edition_label,
- e.part_label ? pN(e.part_label) : "",
- kn(e.duration)
+ e.part_label ? bN(e.part_label) : "",
+ Wn(e.duration)
].filter(Boolean).join(" · ") })]
}, e.id))
})
});
}
// src/react/video-wall/wall-route.ts
-function DK(e = `${location.pathname}${location.search}`, t = {}) {
+function G_e(e = `${location.pathname}${location.search}`, t = {}) {
let n = new URL(e, location.origin), [r, ...i] = n.pathname.split("/").filter(Boolean), a = {
performers: "performer",
creators: "creator",
studios: "studio",
series: "series",
tags: "tag"
- }[r || ""], o = fn(n.pathname) && n.pathname !== "/junk-files" || n.pathname === "/jav" || !!(a && i.length), s = new URLSearchParams(o ? n.search : "");
+ }[r || ""], o = Dn(n.pathname) && n.pathname !== "/junk-files" || n.pathname === "/jav" || !!(a && i.length), s = new URLSearchParams(o ? n.search : "");
for (let [e, n] of Object.entries(t)) n && (o || ["jav", "loc"].includes(e)) && s.set(e, n);
- if (o && un[n.pathname] && s.set("state", un[n.pathname]), a && i.length) {
- let e = decodeURIComponent(i.join("/")), t = /^[0-9]+$/.test(e) ? Wt(a, Number(e)) : e;
+ if (o && Tn[n.pathname] && s.set("state", Tn[n.pathname]), a && i.length) {
+ let e = decodeURIComponent(i.join("/")), t = /^[0-9]+$/.test(e) ? on(a, Number(e)) : e;
t && a === "tag" ? (s.set("tag", [.../* @__PURE__ */ new Set([t, ...(s.get("tag") || "").split(",").filter(Boolean)])].join(",")), s.set("tag_match", "all")) : t && !s.has(a) && s.set(a, t);
}
return s.set("returnTo", `${n.pathname}${n.search}`), `/wall?${s}`;
}
function OK(e = `${location.pathname}${location.search}`) {
let t = new URL(e, location.origin).searchParams;
- for (let e of hK) t.delete(e);
+ for (let e of wK) t.delete(e);
return t.delete("tag_match"), `/wall${t.size ? `?${t}` : ""}`;
}
function kK() {
- let e = new URLSearchParams($V.navigation.location.search).get("returnTo") || "/";
- $V.replace(e.startsWith("/") && !e.startsWith("//") && !e.startsWith("/wall") ? e : "/");
+ let e = new URLSearchParams(aH.navigation.location.search).get("returnTo") || "/";
+ aH.replace(e.startsWith("/") && !e.startsWith("//") && !e.startsWith("/wall") ? e : "/");
}
// src/react/video-wall/video-wall.tsx
var AK = /* @__PURE__ */ new Map(), jK = (0, P.memo)(function({ item: e, image: t, big: n = !1, ratio: r = 1 }) {
- let i = ao(!e.is_jav && t === "thumbnail" && e.has_thumb ? {
+ let i = xo(!e.is_jav && t === "thumbnail" && e.has_thumb ? {
...e,
has_cover: !1
} : e, n || r >= 1 ? "small" : "big", !0, t), a = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
a.current?.querySelectorAll("img.cover").forEach((e) => {
- e.complete && e.naturalWidth && cl(e, r);
+ e.complete && e.naturalWidth && Cl(e, r);
});
}, [r, i.html]), /* @__PURE__ */ (0, F.jsx)("span", {
ref: a,
"data-media-pic": "",
style: { "--card-ratio": String(r) },
- children: /* @__PURE__ */ (0, F.jsx)(WW, {
+ children: /* @__PURE__ */ (0, F.jsx)($W, {
artwork: i,
relayout: (e) => e.querySelectorAll("img.cover").forEach((e) => {
- e.complete && e.naturalWidth && cl(e, r);
+ e.complete && e.naturalWidth && Cl(e, r);
})
})
});
});
-function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error: a = "", retry: o, emptyHtml: s = "", loadMore: c, actions: l, helpers: u, javImage: d, sessionKey: f }) {
+function K_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error: a = "", retry: o, emptyHtml: s = "", loadMore: c, actions: l, helpers: u, javImage: d, sessionKey: f }) {
let p = String(e[0]?.id), [m] = (0, P.useState)(() => {
let e = AK.get(f);
return e && (i || t || e.pool === p) ? e : void 0;
- }), [h] = (0, P.useState)(() => m?.exploration || new mK()), g = (0, P.useRef)(!1), [_, v] = (0, P.useState)(null), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = (0, P.useRef)(null), S = (0, P.useRef)(null), C = (0, P.useRef)(null), [w, T] = (0, P.useState)(() => e.find((e) => e.id === m?.selectedId) || null), [E, D] = (0, P.useState)(m?.selectedKey || ""), [O, k] = (0, P.useState)(m?.sourceId || null), [A, j] = (0, P.useState)(!1), M = w?.edition_group ? {
+ }), [h] = (0, P.useState)(() => m?.exploration || new CK()), g = (0, P.useRef)(!1), [_, v] = (0, P.useState)(null), y = (0, P.useRef)(null), b = (0, P.useRef)(null), x = (0, P.useRef)(null), S = (0, P.useRef)(null), C = (0, P.useRef)(null), [w, T] = (0, P.useState)(() => e.find((e) => e.id === m?.selectedId) || null), [E, D] = (0, P.useState)(m?.selectedKey || ""), [O, k] = (0, P.useState)(m?.sourceId || null), [A, j] = (0, P.useState)(!1), M = w?.edition_group ? {
kind: "editions",
seedId: w.edition_group.seed_id
} : w?.part_group ? {
kind: "parts",
seedId: w.part_group.seed_id
} : null, ee = Pt({
- queryKey: KM(M || {
+ queryKey: $M(M || {
kind: "parts",
seedId: 0
}),
enabled: !!M,
- queryFn: ({ signal: e }) => tN(M, {
+ queryFn: ({ signal: e }) => cN(M, {
tagLabel: u.tagLabel,
mixRelated: async () => []
}, e)
- }), te = M ? ee.data : void 0, ne = te?.items.find((e) => e.id === iN(te, O || w?.id || null)) || w, N = vK(e.length, t && !!e.length, m?.camera || {
+ }), te = M ? ee.data : void 0, ne = te?.items.find((e) => e.id === dN(te, O || w?.id || null)) || w, N = R_e(e.length, t && !!e.length, m?.camera || {
x: 0,
y: 0,
scale: innerWidth < 640 ? .68 : 1
- }, !!w), re = Xy(), [ie, ae] = (0, P.useState)(!!m);
+ }, !!w), re = nb(), [ie, ae] = (0, P.useState)(!!m);
(0, P.useEffect)(() => {
if (!e.length || ie || re) return;
let t = setTimeout(() => ae(!0), 1100);
@@ -53731,7 +53778,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
(0, P.useLayoutEffect)(() => {
document.body.append(Se), N.viewport.current?.focus({ preventScroll: !0 });
}, [Se]), (0, P.useEffect)(() => () => Se.remove(), [Se]);
- let [Ce, we] = (0, P.useState)(() => bV($V.navigation.location.pathname)), [Te, Ee] = (0, P.useState)(m?.image || d), De = (0, P.useRef)(null), Oe = (0, P.useRef)(p), ke = (0, P.useRef)(!!e.length);
+ let [Ce, we] = (0, P.useState)(() => EV(aH.navigation.location.pathname)), [Te, Ee] = (0, P.useState)(m?.image || d), De = (0, P.useRef)(null), Oe = (0, P.useRef)(p), ke = (0, P.useRef)(!!e.length);
ke.current = !!e.length;
let Ae = (0, P.useRef)({
selectedId: w?.id || null,
@@ -53755,10 +53802,10 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}), AK.size > 8 && AK.delete(AK.keys().next().value));
};
(0, P.useLayoutEffect)(je);
- let Me = pK(i ? 12 : t ? e.length : e.length || n ? 12 : 0, t && !i, N.view.camera, N.view.size), Ne = i ? Me.map((e) => ({
+ let Me = SK(i ? 12 : t ? e.length : e.length || n ? 12 : 0, t && !i, N.view.camera, N.view.size), Ne = i ? Me.map((e) => ({
...e,
index: -1
- })) : t ? Me : h.assign(Me, e.length, n), Pe = w && (t ? cK(e.length, !0, E) : h.tile(E, e.length)), Fe = Pe ? uK(e.length, t, Pe) : /* @__PURE__ */ new Map();
+ })) : t ? Me : h.assign(Me, e.length, n), Pe = w && (t ? _K(e.length, !0, E) : h.tile(E, e.length)), Fe = Pe ? yK(e.length, t, Pe) : /* @__PURE__ */ new Map();
Pe && !Ne.some((e) => e.key === Pe.key) && Ne.push(Pe);
let Ie = (e = !1) => {
C.current?.abort(), C.current = null, S.current?.(e), S.current = null, ce(null), fe(!1);
@@ -53775,8 +53822,8 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
t,
p,
i
- ]), (0, P.useEffect)(() => $V.listen((e) => {
- let t = bV(e.location.pathname);
+ ]), (0, P.useEffect)(() => aH.listen((e) => {
+ let t = EV(e.location.pathname);
t && (C.current?.abort(), S.current?.(!0), S.current = null, ce(null), fe(!1)), we(t);
}), []), (0, P.useEffect)(() => () => {
C.current?.abort(), S.current?.(!0), je();
@@ -53797,7 +53844,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
w?.id !== n.id && Ie(!1), De.current = {
key: r.key,
id: n.id
- }, me(""), ue(null), T(n), D(r.key), k(null), j(!1), xe(!1), N.reveal(uK(e.length, t, r).get(r.key) || r, i, !0), i || requestAnimationFrame(() => y.current?.querySelector("[data-wall-play]")?.focus({ preventScroll: !0 }));
+ }, me(""), ue(null), T(n), D(r.key), k(null), j(!1), xe(!1), N.reveal(yK(e.length, t, r).get(r.key) || r, i, !0), i || requestAnimationFrame(() => y.current?.querySelector("[data-wall-play]")?.focus({ preventScroll: !0 }));
}, ze = () => {
ne && y.current && (je(), Ie(!0), l.wallDetails?.(ne, y.current.querySelector("[data-wall-focus]") || y.current));
}, Be = async (e = ne) => {
@@ -53814,12 +53861,12 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}
S.current = r, ce(n);
} catch (e) {
- t.signal.aborted || me(tn(e));
+ t.signal.aborted || me(_n(e));
} finally {
C.current === t && fe(!1);
}
}, Ve = () => {
- let e = aN(te || null, se || 0);
+ let e = fN(te || null, se || 0);
e && (k(e.id), Be(e));
};
(0, P.useEffect)(() => {
@@ -53831,7 +53878,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
]);
let He = te?.items || e, Ue = He.findIndex((e) => e.id === ne?.id), We = (n) => {
if (j(!1), n.id === ne?.id) {
- se ? b.current?.querySelector("video")?.play().catch((e) => me(tn(e))) : Be(n);
+ se ? b.current?.querySelector("video")?.play().catch((e) => me(_n(e))) : Be(n);
return;
}
if (te) {
@@ -53841,7 +53888,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
let r = N.snapshot(), i = e.findIndex((e) => e.id === n.id), a = {
x: (N.view.size.width / 2 - r.x) / r.scale,
y: (N.view.size.height / 2 - r.y) / r.scale
- }, o = t ? lK(e.length, i) : h.nearest(e.length, i, a);
+ }, o = t ? vK(e.length, i) : h.nearest(e.length, i, a);
o && (Re(n, o), ue(n.id));
}, Ge = async () => {
if (!(r || g.current)) {
@@ -53849,7 +53896,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
try {
await c();
} catch (e) {
- I(tn(e)), v(null);
+ I(_n(e)), v(null);
} finally {
g.current = !1;
}
@@ -53970,7 +54017,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}),
Xe.code ? /* @__PURE__ */ (0, F.jsx)("strong", { children: Ye(Xe).startsWith(Xe.code) ? Ye(Xe).slice(Xe.code.length).trim() : Ye(Xe) }) : null,
/* @__PURE__ */ (0, F.jsx)("span", { children: Xe.performers?.join(" · ") || Xe.creator || "未归属" }),
- te ? /* @__PURE__ */ (0, F.jsx)("small", { children: [Xe.edition_label, Xe.part_label ? pN(Xe.part_label) : ""].filter(Boolean).join(" · ") }) : null
+ te ? /* @__PURE__ */ (0, F.jsx)("small", { children: [Xe.edition_label, Xe.part_label ? bN(Xe.part_label) : ""].filter(Boolean).join(" · ") }) : null
]
}),
/* @__PURE__ */ (0, F.jsx)("button", {
@@ -53987,9 +54034,9 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}),
pe || M && ee.error && !te ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-wall-play-error": "",
- children: [/* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: pe || tn(ee.error)
+ children: pe || _n(ee.error)
}), ee.error && !te ? /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
variant: "ghost",
@@ -53997,7 +54044,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
children: "立即重试"
}) : null]
}) : null,
- /* @__PURE__ */ (0, F.jsx)(SK, {
+ /* @__PURE__ */ (0, F.jsx)(H_e, {
item: Xe,
playing: se,
frame: b,
@@ -54019,7 +54066,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
ended: Ve,
error: me
}),
- A ? /* @__PURE__ */ (0, F.jsx)(EK, {
+ A ? /* @__PURE__ */ (0, F.jsx)(W_e, {
items: He,
activeId: Xe.id,
kind: te?.kind || "wall",
@@ -54061,7 +54108,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}), /* @__PURE__ */ (0, F.jsx)("p", { children: "当前仅显示筛选结果" })] }), /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
variant: "ghost",
- onClick: () => $V.push(OK()),
+ onClick: () => aH.push(OK()),
children: "清除筛选"
})]
}) : null,
@@ -54073,7 +54120,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
onSubmit: (e) => {
e.preventDefault();
let t = new URLSearchParams(location.search), n = String(new FormData(e.currentTarget).get("q") || "").trim();
- n ? t.set("q", n) : t.delete("q"), je(), $V.push(`/wall?${t}`), xe(!1);
+ n ? t.set("q", n) : t.delete("q"), je(), aH.push(`/wall?${t}`), xe(!1);
},
children: [/* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
@@ -54087,18 +54134,18 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
defaultValue: new URLSearchParams(location.search).get("q") || ""
})]
}),
- /* @__PURE__ */ (0, F.jsxs)(LU, {
+ /* @__PURE__ */ (0, F.jsxs)(UU, {
"aria-label": "播放墙图片",
value: Te,
onChange: Ee,
- className: RU,
- children: [/* @__PURE__ */ (0, F.jsx)(DR, {
+ className: WU,
+ children: [/* @__PURE__ */ (0, F.jsx)(NR, {
value: "cover",
- className: zU,
+ className: GU,
children: "封面"
- }), /* @__PURE__ */ (0, F.jsx)(DR, {
+ }), /* @__PURE__ */ (0, F.jsx)(NR, {
value: "thumbnail",
- className: zU,
+ className: GU,
children: "缩略图"
})]
}),
@@ -54170,7 +54217,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}
}, t.key);
let n = e[t.index], r = !!w && t.key === E, i = Fe.get(t.key) || t, a = !ie && !r, o = a ? Math.min(.34, (Math.max(0, t.x + N.view.camera.x / N.view.camera.scale) + Math.max(0, t.y + N.view.camera.y / N.view.camera.scale)) / 103.36 * .03) : 0;
- return /* @__PURE__ */ (0, F.jsx)(fb.article, {
+ return /* @__PURE__ */ (0, F.jsx)(vb.article, {
layout: !0,
layoutDependency: `${i.x}:${i.y}:${i.width}:${i.height}`,
"data-wall-tile": t.key,
@@ -54191,7 +54238,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
},
whileHover: oe && !re && !r && ie ? { transform: `translateY(0px) scale(${(i.width + 12.16) / i.width},${(i.height + 12.16) / i.height})` } : void 0,
transition: re ? { duration: 0 } : {
- layout: yK,
+ layout: z_e,
transform: a ? {
type: "spring",
stiffness: 360,
@@ -54243,14 +54290,14 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}),
n.duration ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-wall-duration": "",
- children: kn(n.duration)
+ children: Wn(n.duration)
}) : null,
Number(n.leave_ratio) > 0 ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-wall-progress": "",
style: { "--wall-progress": `${Math.min(100, Number(n.leave_ratio) * 100)}%` },
"aria-label": "观看进度"
}) : null,
- /* @__PURE__ */ (0, F.jsx)(fb.span, {
+ /* @__PURE__ */ (0, F.jsx)(vb.span, {
"data-wall-dim": "",
animate: { opacity: w ? .65 : 0 },
transition: { duration: re ? 0 : .24 }
@@ -54262,7 +54309,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}),
!i && a ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-wall-error": "",
- children: [/* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: a
}), /* @__PURE__ */ (0, F.jsx)(q, {
@@ -54277,11 +54324,11 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
onClick: async (e) => {
let t = e.target.closest("[data-wall-load-more]");
if (!(!t || r || g.current)) {
- kc(t);
+ Wc(t);
try {
await Ge();
} finally {
- kc(t, !1);
+ Wc(t, !1);
}
}
},
@@ -54289,7 +54336,7 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
}) : null,
!t && (n || e.length > 0) ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-wall-refresh": "",
- children: /* @__PURE__ */ (0, F.jsx)(SW, {
+ children: /* @__PURE__ */ (0, F.jsx)(jW, {
busy: r,
onPress: () => void qe()
})
@@ -54299,20 +54346,20 @@ function A_e({ items: e, finite: t, hasMore: n, busy: r, loading: i = !1, error:
children: /* @__PURE__ */ (0, F.jsxs)(q, {
size: "small",
variant: "secondary",
- ...Uz(r),
+ ...Yz(r),
onClick: () => void Ge(),
- children: [r ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs() } }) : null, "载入更多"]
+ children: [r ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is() } }) : null, "载入更多"]
})
}) : null,
he ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-wall-error": "",
- children: [/* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: he
}), /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
variant: "ghost",
- ...Uz(r),
+ ...Yz(r),
onClick: () => void Ge(),
children: "立即重试"
})]
@@ -54354,7 +54401,7 @@ var MK = [
"jav",
"thumb"
];
-function j_e(e = typeof location > "u" ? "/" : location.href) {
+function q_e(e = typeof location > "u" ? "/" : location.href) {
let t = new URL(e, "http://localhost");
for (let e of [
...MK,
@@ -54364,7 +54411,7 @@ function j_e(e = typeof location > "u" ? "/" : location.href) {
]) t.searchParams.delete(e);
return t.searchParams.set("thumb", "0"), t.pathname + (t.search ? t.search : "") + t.hash;
}
-async function M_e(e, t) {
+async function J_e(e, t) {
let n = new URLSearchParams();
for (let t of MK) e[t] && n.set(t, e[t]);
let [r, i] = await Promise.all([t("/api/facets?" + n), t("/api/items?" + n + "&limit=5")]), a = [...new Set([
@@ -54379,7 +54426,7 @@ async function M_e(e, t) {
}
function NK({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {
let a = "<a class=\"geist-button primary\" href=\"/settings/library\">添加媒体</a>", o = "<a class=\"geist-button" + (i ? " primary" : "") + "\" href=\"/subscriptions?tab=add\">添加关注</a>";
- if (t || n) return Ts("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: n ? "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a><a class=\"geist-button\" href=\"/data-cleanup#libraryProcessing\">补全影片资料</a>" : `<a class="geist-button primary" href="${t ? z(j_e()) : "/?loc=&thumb=0"}">${t ? "清除筛选" : "查看全部内容"}</a>` });
+ if (t || n) return Bs("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: n ? "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a><a class=\"geist-button\" href=\"/data-cleanup#libraryProcessing\">补全影片资料</a>" : `<a class="geist-button primary" href="${t ? z(q_e()) : "/?loc=&thumb=0"}">${t ? "清除筛选" : "查看全部内容"}</a>` });
if (e !== "catalog") {
let t = (i ? {
tags: "标签",
@@ -54392,23 +54439,23 @@ function NK({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:
agencies: "事务所",
series: "系列"
}[e] || "资料";
- return Ts(e === "tags" ? "tags" : "user-round", "还没有" + t, i ? "添加关注来源并获取内容后,这里会显示来源上的" + t + "。" : "添加内容并补充资料后,这里会显示对应信息。", { actions: i ? o : a + o });
+ return Bs(e === "tags" ? "tags" : "user-round", "还没有" + t, i ? "添加关注来源并获取内容后,这里会显示来源上的" + t + "。" : "添加内容并补充资料后,这里会显示对应信息。", { actions: i ? o : a + o });
}
- return Ts("play", "还没有视频", "添加媒体目录或关注来源,开始建立你的馆藏。", { actions: a + o });
+ return Bs("play", "还没有视频", "添加媒体目录或关注来源,开始建立你的馆藏。", { actions: a + o });
}
// src/react/video-wall/wall-empty.ts
-function N_e({ libraryEmpty: e, matches: t, hasMore: n, catalogEmpty: r }) {
- return e ? r || NK() : t ? Ts("image", "这些视频还没有封面", n ? "载入更多作品后继续浏览。" : "为作品补充封面后,可在播放墙中查看。", { actions: "<a class=\"geist-button primary\" href=\"/data-cleanup\">补全封面</a>" + (n ? "<button type=\"button\" class=\"geist-button\" data-wall-load-more>加载更多</button>" : "") }) : Ts("search", "没有符合筛选条件的视频", "清除筛选条件后查看全部视频。", { actions: `<a class="geist-button primary" href="${OK()}">清除筛选</a>` });
+function Y_e({ libraryEmpty: e, matches: t, hasMore: n, catalogEmpty: r }) {
+ return e ? r || NK() : t ? Bs("image", "这些视频还没有封面", n ? "载入更多作品后继续浏览。" : "为作品补充封面后,可在播放墙中查看。", { actions: "<a class=\"geist-button primary\" href=\"/data-cleanup\">补全封面</a>" + (n ? "<button type=\"button\" class=\"geist-button\" data-wall-load-more>加载更多</button>" : "") }) : Bs("search", "没有符合筛选条件的视频", "清除筛选条件后查看全部视频。", { actions: `<a class="geist-button primary" href="${OK()}">清除筛选</a>` });
}
// src/react/library-processing/processing-actions.tsx
function PK({ label: e, maintenance: t = !1, children: n }) {
- let r = NH("hover");
+ let r = zH("hover");
return /* @__PURE__ */ (0, F.jsx)("div", {
ref: r,
role: "group",
"aria-label": e,
"data-processing-maintenance": t || void 0,
- className: sF("flex flex-col gap-1", t && "mt-2 rounded-lg bg-background-secondary-default p-1 pt-3"),
+ className: mF("flex flex-col gap-1", t && "mt-2 rounded-lg bg-background-secondary-default p-1 pt-3"),
children: n
});
}
@@ -54418,7 +54465,7 @@ function FK({ option: e, metadataOnly: t, onRun: n }) {
type: "button",
disabled: i,
title: r ? "请先在媒体库设置中开启视频预览生成" : void 0,
- className: sF(tV, i ? "cursor-not-allowed opacity-50" : nV, "text-body-2-medium"),
+ className: mF(sV, i ? "cursor-not-allowed opacity-50" : cV, "text-body-2-medium"),
onClick: () => n(e.command),
children: /* @__PURE__ */ (0, F.jsxs)("span", {
className: "flex min-w-0 flex-col gap-1",
@@ -54429,19 +54476,19 @@ function FK({ option: e, metadataOnly: t, onRun: n }) {
})
});
}
-function P_e({ command: e, speed: t, dialog: n, onSpeed: r, busy: i }) {
+function X_e({ command: e, speed: t, dialog: n, onSpeed: r, busy: i }) {
let [a, o] = (0, P.useState)(t), [s, c] = (0, P.useState)(), [l, u] = (0, P.useState)("");
(0, P.useEffect)(() => {
let t = new AbortController(), r, i = async (a) => {
try {
- let o = await Zhe(e, t.signal, a);
+ let o = await sge(e, t.signal, a);
if (!o.traffic) throw Error("服务端未提供流量预估");
if (t.signal.aborted) return;
c(o.traffic), n.confirmButton.disabled = !1, o.traffic.inventory?.token && (r = setTimeout(() => {
i(o.traffic.inventory?.token);
}, 250));
} catch (e) {
- t.signal.aborted || (u(Wn(e)), n.confirmButton.disabled = !1);
+ t.signal.aborted || (u(ar(e)), n.confirmButton.disabled = !1);
}
};
return i(), () => {
@@ -54459,7 +54506,7 @@ function P_e({ command: e, speed: t, dialog: n, onSpeed: r, busy: i }) {
}),
/* @__PURE__ */ (0, F.jsx)("div", {
className: "flex justify-center",
- children: /* @__PURE__ */ (0, F.jsx)(BH, {
+ children: /* @__PURE__ */ (0, F.jsx)(KH, {
value: a,
busy: i,
onChange: (e) => {
@@ -54467,7 +54514,7 @@ function P_e({ command: e, speed: t, dialog: n, onSpeed: r, busy: i }) {
}
})
}),
- s ? /* @__PURE__ */ (0, F.jsx)(uU, {
+ s ? /* @__PURE__ */ (0, F.jsx)(gU, {
traffic: s,
initial: !0
}) : null,
@@ -54535,7 +54582,7 @@ function IK({ busy: e, scan: t = !1, metadataOnly: n = !1, speedMode: r = "stand
}
if (s.current) return;
u.current = r;
- let o = i.stage === "previews", c = i.scope === "new" ? "补全待处理影片" : i.incremental ? i.stage === "scan" ? "发现新增文件" : "同步新增文件" : o ? "仅补全预览图" : i.stage === "scan" ? "扫描全部文件" : i.stage === "metadata" ? "仅补全影片资料" : i.stage === "collect" ? "补全已入库影片" : "同步整个媒体库", d = Bc({
+ let o = i.stage === "previews", c = i.scope === "new" ? "补全待处理影片" : i.incremental ? i.stage === "scan" ? "发现新增文件" : "同步新增文件" : o ? "仅补全预览图" : i.stage === "scan" ? "扫描全部文件" : i.stage === "metadata" ? "仅补全影片资料" : i.stage === "collect" ? "补全已入库影片" : "同步整个媒体库", d = tl({
title: c,
description: `${i.scope === "new" ? "为这组已登记的影片补全资料和视频属性,并按设置生成预览" : i.incremental ? i.stage === "scan" ? "发现并登记未入库的新文件,保留已有影片资料" : `发现新文件,仅补全新增及未完成影片的资料和视频属性${n ? "" : ",并生成本地预览图"}` : o ? "为本地视频补全九宫格预览图,会读取视频并占用处理器" : i.stage === "scan" ? "扫描目录并登记文件,按目录设置读取视频时长和分辨率" : i.stage === "metadata" ? "读取配套资料,补全影片资料、封面和人物资料" : `${i.stage === "collect" ? "为已入库影片补全资料和视频属性" : "扫描目录发现文件,再补全资料和视频属性"}${n ? "" : ",并生成本地预览图"}`},可能让电脑变慢。需要同时使用电脑时,可选择低占用模式。`,
body: "<div class=\"peach-react\" data-processing-prompt></div>",
@@ -54558,7 +54605,7 @@ function IK({ busy: e, scan: t = !1, metadataOnly: n = !1, speedMode: r = "stand
});
};
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- c ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(P_e, {
+ c ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(X_e, {
command: c.command,
dialog: c.dialog,
speed: r,
@@ -54567,11 +54614,11 @@ function IK({ busy: e, scan: t = !1, metadataOnly: n = !1, speedMode: r = "stand
u.current = e;
}
}), c.host) : null,
- c ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(AH, {
+ c ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(IH, {
href: "/settings/library",
size: "small",
variant: "primary",
- trailingIcon: pz,
+ trailingIcon: yz,
disabled: e,
onClick: (e) => {
c.dialog.confirmButton.getAttribute("aria-busy") === "true" ? e.preventDefault() : c.dialog.close();
@@ -54583,30 +54630,30 @@ function IK({ busy: e, scan: t = !1, metadataOnly: n = !1, speedMode: r = "stand
"data-split-button": !0,
"data-variant": "primary",
children: [/* @__PURE__ */ (0, F.jsx)(q, {
- ...Uz(e),
+ ...Yz(e),
onClick: () => g(p.command),
children: p.label
}), /* @__PURE__ */ (0, F.jsx)(q, {
ref: o,
iconOnly: !0,
- leadingIcon: fz,
+ leadingIcon: vz,
"aria-label": "更多同步方式",
"aria-haspopup": "dialog",
"aria-expanded": d,
- ...Uz(e),
+ ...Yz(e),
onClick: () => {
e || f(!d);
}
})]
}),
- /* @__PURE__ */ (0, F.jsx)(oR, {
+ /* @__PURE__ */ (0, F.jsx)(fR, {
triggerRef: o,
isOpen: d,
onOpenChange: f,
placement: "bottom end",
offset: 4,
- className: eV,
- children: /* @__PURE__ */ (0, F.jsxs)(yR, {
+ className: oV,
+ children: /* @__PURE__ */ (0, F.jsxs)(TR, {
"aria-label": "同步方式",
className: "flex w-80 flex-col gap-1 outline-none",
children: [t ? /* @__PURE__ */ (0, F.jsxs)(PK, {
@@ -54643,43 +54690,43 @@ function IK({ busy: e, scan: t = !1, metadataOnly: n = !1, speedMode: r = "stand
}
// src/react/library-processing/library-completion.tsx
function LK(e, t) {
- return [...new Set(e.filter((e) => (!e.medium || e.medium === "video") && (!/\.(strm|iso)$/i.test(e.name || "") || !!e.code) && !e.disposal && e.location !== "online" && (e.location === "local" || !!e.code) && !ao(e, "small", !1, t).html).map((e) => e.id))];
+ return [...new Set(e.filter((e) => (!e.medium || e.medium === "video") && (!/\.(strm|iso)$/i.test(e.name || "") || !!e.code) && !e.disposal && e.location !== "online" && (e.location === "local" || !!e.code) && !xo(e, "small", !1, t).html).map((e) => e.id))];
}
function RK({ assetIds: e, onComplete: t, className: n = "mb-4" }) {
- return e.length ? /* @__PURE__ */ (0, F.jsx)(F_e, {
+ return e.length ? /* @__PURE__ */ (0, F.jsx)(Z_e, {
assetIds: e,
onComplete: t,
className: n
}) : null;
}
-function F_e({ assetIds: e, onComplete: t, className: n }) {
+function Z_e({ assetIds: e, onComplete: t, className: n }) {
let r = Pt({
- queryKey: mH,
- queryFn: ({ signal: e }) => SH(e),
- refetchInterval: (e) => TH(e.state.data, !0)
+ queryKey: bH,
+ queryFn: ({ signal: e }) => OH(e),
+ refetchInterval: (e) => jH(e.state.data, !0)
}), [i, a] = (0, P.useState)(null), [o, s] = (0, P.useState)(""), c = (0, P.useRef)(null), l = Ft({
- mutationFn: (t) => V(pH, {
+ mutationFn: (t) => V(yH, {
...t,
asset_ids: e
}),
onSuccess: (e) => {
- a(e.job_id || null), H.setQueryData(mH, e), H.invalidateQueries({ queryKey: mH });
+ a(e.job_id || null), H.setQueryData(bH, e), H.invalidateQueries({ queryKey: bH });
}
}), u = r.data;
(0, P.useEffect)(() => {
- u && i && u.job_id === i && !_H(u) && c.current !== i && (c.current = i, u.status === "complete" && s(`补全完成:取得 ${u.covers || 0} 张封面,生成 ${u.previews || 0} 部视频预览。`), H.invalidateQueries({ queryKey: ["catalog-grid"] }), t?.());
+ u && i && u.job_id === i && !CH(u) && c.current !== i && (c.current = i, u.status === "complete" && s(`补全完成:取得 ${u.covers || 0} 张封面,生成 ${u.previews || 0} 部视频预览。`), H.invalidateQueries({ queryKey: ["catalog-grid"] }), t?.());
}, [
u,
i,
t
]);
- let d = l.isPending || _H(u), f = l.error ? Wn(l.error) : r.error ? wH : i && u?.job_id === i && u.status === "failed" ? u.error || "补全未完成" : "", p = f || (l.isPending ? "正在启动补全…" : o || `这批影片中有 ${e.length.toLocaleString()} 部暂无预览,${_H(u) ? "当前任务结束后可单独补全。" : "可补全资料与图片。"}`);
+ let d = l.isPending || CH(u), f = l.error ? ar(l.error) : r.error ? AH : i && u?.job_id === i && u.status === "failed" ? u.error || "补全未完成" : "", p = f || (l.isPending ? "正在启动补全…" : o || `这批影片中有 ${e.length.toLocaleString()} 部暂无预览,${CH(u) ? "当前任务结束后可单独补全。" : "可补全资料与图片。"}`);
return /* @__PURE__ */ (0, F.jsx)("section", {
"aria-label": "补全预览",
"aria-live": "polite",
"data-library-completion": "",
- className: sF("@container", n),
- children: /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ className: mF("@container", n),
+ children: /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: f ? "warning" : "neutral",
action: /* @__PURE__ */ (0, F.jsx)("div", {
className: "flex flex-wrap items-center gap-2",
@@ -54694,10 +54741,10 @@ function F_e({ assetIds: e, onComplete: t, className: n }) {
children: [
p,
" ",
- /* @__PURE__ */ (0, F.jsx)(AH, {
+ /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/data-cleanup#libraryProcessing",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: f ? "打开扫描与采集" : "查看处理详情"
})
]
@@ -54705,22 +54752,22 @@ function F_e({ assetIds: e, onComplete: t, className: n }) {
});
}
// node_modules/@tanstack/react-table/dist/FlexRender.js
-function I_e(e) {
- return L_e(e) || typeof e == "function" || R_e(e);
+function Q_e(e) {
+ return $_e(e) || typeof e == "function" || eve(e);
}
-function L_e(e) {
+function $_e(e) {
return typeof e == "function" && (() => {
let t = Object.getPrototypeOf(e);
return t.prototype && t.prototype.isReactComponent;
})();
}
-function R_e(e) {
+function eve(e) {
return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
}
function zK(e, t) {
- return e == null ? null : I_e(e) ? /* @__PURE__ */ P.createElement(e, t) : e;
+ return e == null ? null : Q_e(e) ? /* @__PURE__ */ P.createElement(e, t) : e;
}
-function z_e(e) {
+function tve(e) {
if ("cell" in e && e.cell) {
let t = e.cell, n = t.column.columnDef, r = t, i = n;
return r.getIsAggregated?.() ? zK(i.aggregatedCell ?? n.cell, t.getContext()) : r.getIsPlaceholder?.() ? null : zK(n.cell, t.getContext());
@@ -54729,7 +54776,7 @@ function z_e(e) {
}
// node_modules/@tanstack/store/dist/alien.js
/* @__NO_SIDE_EFFECTS__ */
-function B_e({ update: e, notify: t, unwatched: n }) {
+function nve({ update: e, notify: t, unwatched: n }) {
return {
link: r,
unlink: i,
@@ -54846,7 +54893,7 @@ function B_e({ update: e, notify: t, unwatched: n }) {
}
}
// node_modules/@tanstack/store/dist/atom.js
-function V_e(e, t, n) {
+function rve(e, t, n) {
let r = typeof e == "object", i = r ? e : void 0;
return {
next: (r ? e.next : e)?.bind(i),
@@ -54854,7 +54901,7 @@ function V_e(e, t, n) {
complete: (r ? e.complete : n)?.bind(i)
};
}
-var BK = [], VK = 0, { link: HK, unlink: H_e, propagate: U_e, checkDirty: UK, shallowPropagate: WK } = /* @__PURE__ */ B_e({
+var BK = [], VK = 0, { link: HK, unlink: ive, propagate: ave, checkDirty: UK, shallowPropagate: WK } = /* @__PURE__ */ nve({
update(e) {
return e._update();
},
@@ -54865,7 +54912,7 @@ var BK = [], VK = 0, { link: HK, unlink: H_e, propagate: U_e, checkDirty: UK, sh
e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = 17, YK(e));
}
}), GK = 0, KK = 0, qK, JK = 0;
-function W_e(e) {
+function ove(e) {
try {
++JK, e();
} finally {
@@ -54874,7 +54921,7 @@ function W_e(e) {
}
function YK(e) {
let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
- for (; n !== void 0;) n = H_e(n, e);
+ for (; n !== void 0;) n = ive(n, e);
}
function XK() {
if (!(JK > 0)) {
@@ -54885,7 +54932,7 @@ function XK() {
GK = 0, KK = 0;
}
}
-function G_e(e, t) {
+function sve(e, t) {
let n = typeof e == "function", r = e, i = {
_snapshot: n ? void 0 : e,
subs: void 0,
@@ -54897,7 +54944,7 @@ function G_e(e, t) {
return qK !== void 0 && HK(i, qK, VK), i._snapshot;
},
subscribe(e) {
- let t = V_e(e), n = { current: !1 }, r = K_e(() => {
+ let t = rve(e), n = { current: !1 }, r = cve(() => {
i.get(), n.current ? (qK = void 0, t.next?.(i._snapshot)) : n.current = !0;
});
return { unsubscribe: () => {
@@ -54929,11 +54976,11 @@ function G_e(e, t) {
}) : i.set = function(e) {
if (i._update(e)) {
let e = i.subs;
- e !== void 0 && (U_e(e), WK(e), XK());
+ e !== void 0 && (ave(e), WK(e), XK());
}
}, i;
}
-function K_e(e) {
+function cve(e) {
let t = () => {
let t = qK;
qK = n, ++VK, n.depsTail = void 0, n.flags = 6;
@@ -54982,8 +55029,8 @@ function QK(e) {
return Object.keys(e).concat(Object.getOwnPropertySymbols(e));
}
// node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
-var q_e = /* @__PURE__ */ o(((e) => {
- var t = A(), n = iS();
+var lve = /* @__PURE__ */ o(((e) => {
+ var t = A(), n = dS();
function r(e, t) {
return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
}
@@ -55028,32 +55075,32 @@ var q_e = /* @__PURE__ */ o(((e) => {
}, [p]), l(p), p;
};
})), $K = /* @__PURE__ */ o(((e, t) => {
- t.exports = q_e();
-})), J_e = $K();
-function Y_e(e, t) {
+ t.exports = lve();
+})), uve = $K();
+function dve(e, t) {
return e === t;
}
function eq(e, t = (e) => e, n) {
- let r = n?.compare ?? Y_e, i = (0, P.useCallback)((t) => {
+ let r = n?.compare ?? dve, i = (0, P.useCallback)((t) => {
let { unsubscribe: n } = e.subscribe(t);
return n;
}, [e]), a = (0, P.useCallback)(() => e.get(), [e]);
- return (0, J_e.useSyncExternalStoreWithSelector)(i, a, a, t, r);
+ return (0, uve.useSyncExternalStoreWithSelector)(i, a, a, t, r);
}
// node_modules/@tanstack/react-table/dist/Subscribe.js
-function X_e(e) {
+function fve(e) {
let t = eq(e.source, e.selector, { compare: ZK });
return typeof e.children == "function" ? e.children(t) : e.children;
}
// node_modules/@tanstack/table-core/dist/core/reactivity/coreReactivityFeature.utils.js
-function Z_e(e) {
+function pve(e) {
let t = e;
return Object.defineProperty(e, "state", { get() {
return e.get();
} }), "set" in e && (t.setState = e.set.bind(e)), t;
}
// node_modules/@tanstack/table-core/dist/core/reactivity/renderPhaseReactivity.js
-function Q_e(e) {
+function mve(e) {
let { createAtom: t, batch: n } = e, r = t(0);
return {
createOptionsStore: !1,
@@ -55083,7 +55130,7 @@ function Q_e(e) {
}
};
}
-function $_e(e, t = Object.is) {
+function hve(e, t = Object.is) {
let n = !1, r;
return {
get: e.get,
@@ -55096,10 +55143,10 @@ function $_e(e, t = Object.is) {
};
}
// node_modules/@tanstack/react-table/dist/reactivity.js
-function eve() {
- return Q_e({
- createAtom: G_e,
- batch: W_e
+function gve() {
+ return mve({
+ createAtom: sve,
+ batch: ove
});
}
// node_modules/@tanstack/table-core/dist/utils.js
@@ -55153,9 +55200,9 @@ function sq(e) {
function cq(e) {
return Reflect.ownKeys(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
}
-var tve = 3;
-function nve(e, t) {
- return lq(e, t, tve);
+var _ve = 3;
+function vve(e, t) {
+ return lq(e, t, _ve);
}
function lq(e, t, n) {
if (Object.is(e, t)) return !0;
@@ -55169,17 +55216,17 @@ function lq(e, t, n) {
}
return !0;
}
-function uq(e, t, n, r = nve) {
+function uq(e, t, n, r = vve) {
let i = `on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`, a = e.options[i];
a && a((e) => {
let t = tq(n, e);
return r(e, t) ? e : t;
});
}
-function rve(e) {
+function yve(e) {
return e instanceof Function;
}
-function ive(e, t) {
+function bve(e, t) {
let n = [], r = (e) => {
e.forEach((e) => {
n.push(e);
@@ -55189,7 +55236,7 @@ function ive(e, t) {
};
return r(e), n;
}
-var ave = ({ fn: e, memoDeps: t, onAfterCompare: n, onAfterUpdate: r, onBeforeCompare: i, onBeforeUpdate: a }) => {
+var xve = ({ fn: e, memoDeps: t, onAfterCompare: n, onAfterUpdate: r, onBeforeCompare: i, onBeforeUpdate: a }) => {
let o = [], s;
return (c) => {
i?.();
@@ -55214,7 +55261,7 @@ function fq({ feature: e, fnName: t, objectId: n, onAfterUpdate: r, table: i, ..
let { schedule: e, untrack: t } = i._reactivity;
e(() => t(() => r()));
} : void 0 };
- return ave({
+ return xve({
...a,
...o
});
@@ -55267,13 +55314,13 @@ function gq(e, t, n, ...r) {
return e[t]?.(...r) ?? n(e, ...r);
}
// node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.utils.js
-function ove(e) {
+function Sve(e) {
return e.row.getValue(e.column.id);
}
-function sve(e) {
+function Cve(e) {
return e.getValue() ?? e.table.options.renderFallbackValue;
}
-function cve(e) {
+function wve(e) {
return {
table: e.table,
column: e.column,
@@ -55284,18 +55331,18 @@ function cve(e) {
};
}
// node_modules/@tanstack/table-core/dist/core/cells/coreCellsFeature.js
-var lve = { assignCellPrototype: (e, t) => {
+var Tve = { assignCellPrototype: (e, t) => {
hq("coreCellsFeature", e, t, {
- cell_getValue: { fn: (e) => ove(e) },
- cell_renderValue: { fn: (e) => sve(e) },
+ cell_getValue: { fn: (e) => Sve(e) },
+ cell_renderValue: { fn: (e) => Cve(e) },
cell_getContext: {
- fn: (e) => cve(e),
+ fn: (e) => wve(e),
memoDeps: (e) => [e]
}
});
} };
// node_modules/@tanstack/table-core/dist/core/columns/constructColumn.js
-function uve(e) {
+function Eve(e) {
if (!e._columnPrototype) {
e._columnPrototype = { table: e };
let t = Object.values(e._features);
@@ -55303,7 +55350,7 @@ function uve(e) {
}
return e._columnPrototype;
}
-function dve(e, t, n, r) {
+function Dve(e, t, n, r) {
let i = {
...e.getDefaultColumnDef(),
...t
@@ -55323,7 +55370,7 @@ function dve(e, t, n, r) {
} else c = (e) => e[i.accessorKey];
}
if (!s) throw Error();
- let l = uve(e), u = Object.create(l);
+ let l = Eve(e), u = Object.create(l);
u.accessorFn = c, u.columnDef = i, u.columns = [], u.depth = n, u.id = `${String(s)}`, u.parent = r;
let d = e._columnInstanceInitFns;
for (let e = 0; e < d.length; e++) d[e](u);
@@ -55333,7 +55380,7 @@ function dve(e, t, n, r) {
function _q(e) {
return e.getIsVisible?.() ?? !0;
}
-function fve(e) {
+function Ove(e) {
return e.getVisibleLeafColumns?.() ?? e.getAllLeafColumns();
}
function vq(e, t) {
@@ -55346,30 +55393,30 @@ function yq(e, t, n, r) {
function bq(e, t) {
return e._expandRows?.(t) ?? t;
}
-function pve(e) {
+function kve(e) {
e.autoResetExpanded?.();
}
function xq(e) {
e.autoResetPageIndex?.();
}
-function mve(e) {
+function Ave(e) {
e.autoResetSorting?.();
}
-function hve(e) {
+function jve(e) {
e.autoResetCellSelection?.();
}
// node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.utils.js
-function gve(e) {
+function Mve(e) {
return [e, ...e.columns.flatMap((e) => e.getFlatColumns())];
}
-function _ve(e) {
+function Nve(e) {
if (e.columns.length) {
let t = e.columns.flatMap((e) => e.getLeafColumns());
return vq(e.table, t);
}
return [e];
}
-function vve(e) {
+function Pve(e) {
return {
header: (e) => {
let t = e.header.column.columnDef;
@@ -55384,18 +55431,18 @@ function Sq(e, t, n, r = 0) {
let i = Array(t.length);
for (let a = 0; a < t.length; a++) {
if (!(a in t)) continue;
- let o = t[a], s = dve(e, o, r, n), c = o;
+ let o = t[a], s = Dve(e, o, r, n), c = o;
s.columns = c.columns ? Sq(e, c.columns, s, r + 1) : [], i[a] = s;
}
return i;
}
-function yve(e) {
+function Fve(e) {
return Sq(e, e.options.columns);
}
-function bve(e) {
+function Ive(e) {
return e.getAllColumns().flatMap((e) => e.getFlatColumns());
}
-function xve(e) {
+function Lve(e) {
let t = iq(), n = e.getAllFlatColumns();
for (let e = 0; e < n.length; e++) {
let r = n[e];
@@ -55403,10 +55450,10 @@ function xve(e) {
}
return t;
}
-function Sve(e) {
+function Rve(e) {
return vq(e, e.getAllColumns().flatMap((e) => e.getLeafColumns()));
}
-function Cve(e) {
+function zve(e) {
let t = iq(), n = e.getAllLeafColumns();
for (let e = 0; e < n.length; e++) {
let r = n[e];
@@ -55414,19 +55461,19 @@ function Cve(e) {
}
return t;
}
-function wve(e, t) {
+function Bve(e, t) {
return e.getAllFlatColumnsById()[t];
}
// node_modules/@tanstack/table-core/dist/core/columns/coreColumnsFeature.js
-var Tve = {
+var Vve = {
assignColumnPrototype: (e, t) => {
hq("coreColumnsFeature", e, t, {
column_getFlatColumns: {
- fn: (e) => gve(e),
+ fn: (e) => Mve(e),
memoDeps: (e) => [e.table.options.columns]
},
column_getLeafColumns: {
- fn: (e) => _ve(e),
+ fn: (e) => Nve(e),
memoDeps: (e) => [
e.table.atoms.columnOrder?.get(),
e.table.atoms.grouping?.get(),
@@ -55439,23 +55486,23 @@ var Tve = {
constructTableAPIs: (e) => {
mq("coreColumnsFeature", e, {
table_getDefaultColumnDef: {
- fn: () => vve(e),
+ fn: () => Pve(e),
memoDeps: () => [e.options.defaultColumn]
},
table_getAllColumns: {
- fn: () => yve(e),
+ fn: () => Fve(e),
memoDeps: () => [e.options.columns]
},
table_getAllFlatColumns: {
- fn: () => bve(e),
+ fn: () => Ive(e),
memoDeps: () => [e.options.columns]
},
table_getAllFlatColumnsById: {
- fn: () => xve(e),
+ fn: () => Lve(e),
memoDeps: () => [e.options.columns]
},
table_getAllLeafColumns: {
- fn: () => Sve(e),
+ fn: () => Rve(e),
memoDeps: () => [
e.atoms.columnOrder?.get(),
e.atoms.grouping?.get(),
@@ -55464,15 +55511,15 @@ var Tve = {
]
},
table_getAllLeafColumnsById: {
- fn: () => Cve(e),
+ fn: () => zve(e),
memoDeps: () => [e.getAllLeafColumns()]
},
- table_getColumn: { fn: (t) => wve(e, t) }
+ table_getColumn: { fn: (t) => Bve(e, t) }
});
}
};
// node_modules/@tanstack/table-core/dist/core/headers/constructHeader.js
-function Eve(e) {
+function Hve(e) {
if (!e._headerPrototype) {
e._headerPrototype = { table: e };
let t = Object.values(e._features);
@@ -55481,7 +55528,7 @@ function Eve(e) {
return e._headerPrototype;
}
function Cq(e, t, n) {
- let r = Eve(e), i = Object.create(r);
+ let r = Hve(e), i = Object.create(r);
i.colSpan = 0, i.column = t, i.depth = n.depth, i.headerGroup = null, i.id = n.id ?? t.id, i.index = n.index, i.isPlaceholder = !!n.isPlaceholder, i.placeholderId = n.placeholderId, i.rowSpan = 0, i.subHeaders = [];
let a = e._headerInstanceInitFns;
for (let e = 0; e < a.length; e++) a[e](i);
@@ -55496,14 +55543,14 @@ function wq(e, t = 1) {
}
return n;
}
-function Dve(e, t) {
+function Uve(e, t) {
return e ? `${e}_${t}` : String(t);
}
-function Ove(e, t, n, r) {
+function Wve(e, t, n, r) {
let i = e ?? "";
return t && (i = i ? `${i}_${t}` : String(t)), n && (i = i ? `${i}_${n}` : n), r && (i = i ? `${i}_${r}` : r), i;
}
-function kve(e, t) {
+function Gve(e, t) {
let n = 0;
for (let r = 0; r < e.length; r++) e[r].column === t && n++;
return n;
@@ -55511,7 +55558,7 @@ function kve(e, t) {
function Tq(e, t, n, r, i, a) {
let o = {
depth: t,
- id: Dve(r, t),
+ id: Uve(r, t),
headers: []
}, s = [];
for (let i = 0; i < e.length; i++) {
@@ -55520,9 +55567,9 @@ function Tq(e, t, n, r, i, a) {
if (l && a.column.parent ? u = a.column.parent : (u = a.column, d = !0), c && c.column === u) c.subHeaders.push(a);
else {
let e = Cq(n, u, {
- id: Ove(r, t, u.id, a.id),
+ id: Wve(r, t, u.id, a.id),
isPlaceholder: d,
- placeholderId: d ? String(kve(s, u)) : void 0,
+ placeholderId: d ? String(Gve(s, u)) : void 0,
depth: t,
index: s.length
});
@@ -55552,7 +55599,7 @@ function Eq(e) {
} else n.rowSpan = 1;
}
}
-function Ave(e, t, n, r) {
+function Kve(e, t, n, r) {
let i = wq(e), a = [], o = n._headerGroupInstanceInitFns, s = Array(t.length);
for (let e = 0; e < t.length; e++) e in t && (s[e] = Cq(n, t[e], {
depth: i,
@@ -55565,24 +55612,24 @@ function Dq(e, t) {
for (let n = 0; n < e.subHeaders.length; n++) Dq(e.subHeaders[n], t);
t.push(e);
}
-function jve(e) {
+function qve(e) {
let t = [];
return Dq(e, t), t;
}
-function Mve(e) {
+function Jve(e) {
return {
column: e.column,
header: e,
table: e.column.table
};
}
-function Nve(e) {
- return Ave(e.getAllColumns(), yq(e, fve(e), (e) => e.id), e);
+function Yve(e) {
+ return Kve(e.getAllColumns(), yq(e, Ove(e), (e) => e.id), e);
}
-function Pve(e) {
+function Xve(e) {
return [...e.getHeaderGroups()].reverse();
}
-function Fve(e) {
+function Zve(e) {
let t = e.getHeaderGroups(), n = [];
for (let e = 0; e < t.length; e++) {
let r = t[e].headers;
@@ -55590,7 +55637,7 @@ function Fve(e) {
}
return n;
}
-function Ive(e) {
+function Qve(e) {
let t = e.getHeaderGroups()[0]?.headers ?? [], n = [];
for (let e = 0; e < t.length; e++) {
let r = t[e].getLeafHeaders();
@@ -55599,15 +55646,15 @@ function Ive(e) {
return n;
}
// node_modules/@tanstack/table-core/dist/core/headers/coreHeadersFeature.js
-var Lve = {
+var $ve = {
assignHeaderPrototype: (e, t) => {
hq("coreHeadersFeature", e, t, {
header_getLeafHeaders: {
- fn: (e) => jve(e),
+ fn: (e) => qve(e),
memoDeps: (e) => [e.column.table.options.columns]
},
header_getContext: {
- fn: (e) => Mve(e),
+ fn: (e) => Jve(e),
memoDeps: (e) => [e.column.table.options.columns]
}
});
@@ -55615,7 +55662,7 @@ var Lve = {
constructTableAPIs: (e) => {
mq("coreHeadersFeature", e, {
table_getHeaderGroups: {
- fn: () => Nve(e),
+ fn: () => Yve(e),
memoDeps: () => [
e.options.columns,
e.atoms.columnOrder?.get(),
@@ -55626,22 +55673,22 @@ var Lve = {
]
},
table_getFooterGroups: {
- fn: () => Pve(e),
+ fn: () => Xve(e),
memoDeps: () => [e.getHeaderGroups()]
},
table_getFlatHeaders: {
- fn: () => Fve(e),
+ fn: () => Zve(e),
memoDeps: () => [e.getHeaderGroups()]
},
table_getLeafHeaders: {
- fn: () => Ive(e),
+ fn: () => Qve(e),
memoDeps: () => [e.getHeaderGroups()]
}
});
}
};
// node_modules/@tanstack/table-core/dist/core/rows/constructRow.js
-function Rve(e) {
+function eye(e) {
if (!e._rowPrototype) {
e._rowPrototype = { table: e };
let t = Object.values(e._features);
@@ -55649,35 +55696,35 @@ function Rve(e) {
}
return e._rowPrototype;
}
-var zve = (e, t, n, r, i, a, o) => {
- let s = Rve(e), c = Object.create(s);
+var tye = (e, t, n, r, i, a, o) => {
+ let s = eye(e), c = Object.create(s);
c._displayIndexCache = -1, c._uniqueValuesCache = iq(), c._valuesCache = iq(), c.depth = i, c.id = t, c.index = r, c.original = n, c.parentId = o, c.subRows = a ?? [];
let l = e._rowInstanceInitFns;
for (let e = 0; e < l.length; e++) l[e](c);
return c;
};
// node_modules/@tanstack/table-core/dist/core/row-models/createCoreRowModel.js
-function Bve() {
+function nye() {
return (e) => fq({
feature: "coreRowModelsFeature",
table: e,
fnName: "table.getCoreRowModel",
memoDeps: () => [e.options.data],
- fn: () => Vve(e, e.options.data),
+ fn: () => rye(e, e.options.data),
onAfterUpdate: dq(() => {
- pve(e), xq(e), mve(e), hve(e);
+ kve(e), xq(e), Ave(e), jve(e);
})
});
}
function Oq(e, t, n, r = 0, i) {
let a = [];
for (let o = 0; o < n.length; o++) {
- let s = n[o], c = zve(e, e.getRowId(s, o, i), s, o, r, void 0, i?.id);
+ let s = n[o], c = tye(e, e.getRowId(s, o, i), s, o, r, void 0, i?.id);
t.flatRows.push(c), t.rowsById[c.id] = c, a.push(c), e.options.getSubRows && (c.originalSubRows = e.options.getSubRows(s, o), c.originalSubRows?.length && (c.subRows = Oq(e, t, c.originalSubRows, r + 1, c)));
}
return a;
}
-function Vve(e, t) {
+function rye(e, t) {
let n = {
rows: [],
flatRows: [],
@@ -55686,61 +55733,61 @@ function Vve(e, t) {
return n.rows = Oq(e, n, t), n;
}
// node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.utils.js
-function Hve(e) {
- return e._rowModels.coreRowModel || (e._rowModels.coreRowModel = e.options.features.coreRowModel?.(e) ?? Bve()(e)), e._rowModels.coreRowModel();
+function iye(e) {
+ return e._rowModels.coreRowModel || (e._rowModels.coreRowModel = e.options.features.coreRowModel?.(e) ?? nye()(e)), e._rowModels.coreRowModel();
}
-function Uve(e) {
+function aye(e) {
return e.getCoreRowModel();
}
-function Wve(e) {
+function oye(e) {
return e._rowModels.filteredRowModel || (e._rowModels.filteredRowModel = e.options.features.filteredRowModel?.(e)), e.options.manualFiltering || !e._rowModels.filteredRowModel ? e.getPreFilteredRowModel() : e._rowModels.filteredRowModel();
}
-function Gve(e) {
+function sye(e) {
return e.getFilteredRowModel();
}
-function Kve(e) {
+function cye(e) {
return e._rowModels.groupedRowModel || (e._rowModels.groupedRowModel = e.options.features.groupedRowModel?.(e)), e.options.manualGrouping || !e._rowModels.groupedRowModel ? e.getPreGroupedRowModel() : e._rowModels.groupedRowModel();
}
-function qve(e) {
+function lye(e) {
return e.getGroupedRowModel();
}
-function Jve(e) {
+function uye(e) {
return e._rowModels.sortedRowModel || (e._rowModels.sortedRowModel = e.options.features.sortedRowModel?.(e)), e.options.manualSorting || !e._rowModels.sortedRowModel ? e.getPreSortedRowModel() : e._rowModels.sortedRowModel();
}
-function Yve(e) {
+function dye(e) {
return e.getSortedRowModel();
}
-function Xve(e) {
+function fye(e) {
return e._rowModels.expandedRowModel || (e._rowModels.expandedRowModel = e.options.features.expandedRowModel?.(e)), e.options.manualExpanding || !e._rowModels.expandedRowModel ? e.getPreExpandedRowModel() : e._rowModels.expandedRowModel();
}
-function Zve(e) {
+function pye(e) {
return e.getExpandedRowModel();
}
-function Qve(e) {
+function mye(e) {
return e._rowModels.paginatedRowModel || (e._rowModels.paginatedRowModel = e.options.features.paginatedRowModel?.(e)), e.options.manualPagination || !e._rowModels.paginatedRowModel ? e.getPrePaginatedRowModel() : e._rowModels.paginatedRowModel();
}
-function $ve(e) {
+function hye(e) {
return e.getPaginatedRowModel();
}
// node_modules/@tanstack/table-core/dist/core/row-models/coreRowModelsFeature.js
-var eye = { constructTableAPIs: (e) => {
+var gye = { constructTableAPIs: (e) => {
mq("coreRowModelsFeature", e, {
- table_getCoreRowModel: { fn: () => Hve(e) },
- table_getPreFilteredRowModel: { fn: () => Uve(e) },
- table_getFilteredRowModel: { fn: () => Wve(e) },
- table_getPreGroupedRowModel: { fn: () => Gve(e) },
- table_getGroupedRowModel: { fn: () => Kve(e) },
- table_getPreSortedRowModel: { fn: () => qve(e) },
- table_getSortedRowModel: { fn: () => Jve(e) },
- table_getPreExpandedRowModel: { fn: () => Yve(e) },
- table_getExpandedRowModel: { fn: () => Xve(e) },
- table_getPrePaginatedRowModel: { fn: () => Zve(e) },
- table_getPaginatedRowModel: { fn: () => Qve(e) },
- table_getRowModel: { fn: () => $ve(e) }
+ table_getCoreRowModel: { fn: () => iye(e) },
+ table_getPreFilteredRowModel: { fn: () => aye(e) },
+ table_getFilteredRowModel: { fn: () => oye(e) },
+ table_getPreGroupedRowModel: { fn: () => sye(e) },
+ table_getGroupedRowModel: { fn: () => cye(e) },
+ table_getPreSortedRowModel: { fn: () => lye(e) },
+ table_getSortedRowModel: { fn: () => uye(e) },
+ table_getPreExpandedRowModel: { fn: () => dye(e) },
+ table_getExpandedRowModel: { fn: () => fye(e) },
+ table_getPrePaginatedRowModel: { fn: () => pye(e) },
+ table_getPaginatedRowModel: { fn: () => mye(e) },
+ table_getRowModel: { fn: () => hye(e) }
});
} };
// node_modules/@tanstack/table-core/dist/core/cells/constructCell.js
-function tye(e) {
+function _ye(e) {
if (!e._cellPrototype) {
e._cellPrototype = { table: e };
let t = Object.values(e._features);
@@ -55748,48 +55795,48 @@ function tye(e) {
}
return e._cellPrototype;
}
-function nye(e, t, n) {
- let r = tye(n), i = Object.create(r);
+function vye(e, t, n) {
+ let r = _ye(n), i = Object.create(r);
i.column = e, i.id = `${t.id}_${e.id}`, i.row = t;
let a = n._cellInstanceInitFns;
for (let e = 0; e < a.length; e++) a[e](i);
return i;
}
// node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.utils.js
-function rye(e) {
+function yye(e) {
let t = e.table.getRowsInDisplayOrder(), n = e._displayIndexCache;
return t[n] === e ? n : -1;
}
-function iye(e) {
+function bye(e) {
let t = e.getPrePaginatedRowModel(), n = e.options.paginateExpandedRows === !1 ? bq(e, t).rows : t.rows;
for (let e = 0; e < n.length; e++) n[e]._displayIndexCache = e;
return n;
}
-function aye(e, t) {
+function xye(e, t) {
if (aq(e._valuesCache, t)) return e._valuesCache[t];
let n = e.table.getColumn(t);
if (n?.accessorFn) return e._valuesCache[t] = n.accessorFn(e.original, e.index), e._valuesCache[t];
}
-function oye(e, t) {
+function Sye(e, t) {
if (aq(e._uniqueValuesCache, t)) return e._uniqueValuesCache[t];
let n = e.table.getColumn(t);
if (n?.accessorFn) return n.columnDef.getUniqueValues ? (e._uniqueValuesCache[t] = n.columnDef.getUniqueValues(e.original, e.index), e._uniqueValuesCache[t]) : (e._uniqueValuesCache[t] = [e.getValue(t)], e._uniqueValuesCache[t]);
}
-function sye(e, t) {
+function Cye(e, t) {
return e.getValue(t) ?? e.table.options.renderFallbackValue;
}
-function cye(e) {
- return ive(e.subRows, (e) => e.subRows);
+function wye(e) {
+ return bve(e.subRows, (e) => e.subRows);
}
-function lye(e) {
+function Tye(e) {
let t = e.getCoreRowModel().flatRows, n = 0;
for (let e = 0; e < t.length; e++) n = Math.max(n, t[e].depth);
return n;
}
-function uye(e) {
+function Eye(e) {
if (e.parentId) return e.table.getCoreRowModel().rowsById[e.parentId] ?? e.table.getRow(e.parentId, !0);
}
-function dye(e) {
+function Dye(e) {
let t = [], n = e;
for (;;) {
let e = n.getParentRow();
@@ -55798,17 +55845,17 @@ function dye(e) {
}
return t.reverse();
}
-function fye(e) {
+function Oye(e) {
let t = e.table.getAllLeafColumns(), n = e._cellsCache;
n ||= e._cellsCache = /* @__PURE__ */ new WeakMap();
let r = Array(t.length);
for (let i = 0; i < t.length; i++) {
let a = t[i], o = n.get(a);
- o || (o = nye(a, e, e.table), n.set(a, o)), r[i] = o;
+ o || (o = vye(a, e, e.table), n.set(a, o)), r[i] = o;
}
return r;
}
-function pye(e) {
+function kye(e) {
let t = iq(), n = e.getAllCells();
for (let e = 0; e < n.length; e++) {
let r = n[e];
@@ -55816,52 +55863,52 @@ function pye(e) {
}
return t;
}
-function mye(e, t, n, r) {
+function Aye(e, t, n, r) {
return t.options.getRowId?.(e, n, r) ?? (r ? `${r.id}.${n}` : String(n));
}
-function hye(e, t, n) {
+function jye(e, t, n) {
let r = (n ? e.getPrePaginatedRowModel() : e.getRowModel()).rowsById[t];
if (!r && (r = e.getCoreRowModel().rowsById[t], !r)) throw Error();
return r;
}
// node_modules/@tanstack/table-core/dist/core/rows/coreRowsFeature.js
-var gye = {
+var Mye = {
assignRowPrototype: (e, t) => {
hq("coreRowsFeature", e, t, {
- row_getDisplayIndex: { fn: (e) => rye(e) },
+ row_getDisplayIndex: { fn: (e) => yye(e) },
row_getAllCellsByColumnId: {
- fn: (e) => pye(e),
+ fn: (e) => kye(e),
memoDeps: (e) => [e.getAllCells()]
},
row_getAllCells: {
- fn: (e) => fye(e),
+ fn: (e) => Oye(e),
memoDeps: (e) => [e.table.getAllLeafColumns()]
},
row_getLeafRows: {
- fn: (e) => cye(e),
+ fn: (e) => wye(e),
memoDeps: (e) => [e.subRows]
},
- row_getParentRow: { fn: (e) => uye(e) },
- row_getParentRows: { fn: (e) => dye(e) },
- row_getUniqueValues: { fn: (e, t) => oye(e, t) },
- row_getValue: { fn: (e, t) => aye(e, t) },
- row_renderValue: { fn: (e, t) => sye(e, t) }
+ row_getParentRow: { fn: (e) => Eye(e) },
+ row_getParentRows: { fn: (e) => Dye(e) },
+ row_getUniqueValues: { fn: (e, t) => Sye(e, t) },
+ row_getValue: { fn: (e, t) => xye(e, t) },
+ row_renderValue: { fn: (e, t) => Cye(e, t) }
});
},
constructTableAPIs: (e) => {
mq("coreRowsFeature", e, {
table_getRowsInDisplayOrder: {
- fn: () => iye(e),
+ fn: () => bye(e),
memoDeps: () => [
e.getPrePaginatedRowModel().rows,
e.options.paginateExpandedRows,
e.options.paginateExpandedRows === !1 ? e.atoms.expanded?.get() : void 0
]
},
- table_getRowId: { fn: (t, n, r) => mye(t, e, n, r) },
- table_getRow: { fn: (t, n) => hye(e, t, n) },
+ table_getRowId: { fn: (t, n, r) => Aye(t, e, n, r) },
+ table_getRow: { fn: (t, n) => jye(e, t, n) },
table_getMaxSubRowDepth: {
- fn: () => lye(e),
+ fn: () => Tye(e),
memoDeps: () => [e.getCoreRowModel()]
}
});
@@ -55884,7 +55931,7 @@ function Aq(e, t, n = (e, t) => e === t) {
kq(e, t, n), e._reactivity.commit?.();
});
}
-function _ye(e) {
+function Nye(e) {
let t = nq(e.initialState);
e._reactivity.batch(() => {
let n = Object.keys(t);
@@ -55896,7 +55943,7 @@ function _ye(e) {
let n = Object.values(e._features);
for (let t = 0; t < n.length; t++) n[t].resetTableInstanceData?.(e);
}
-function vye(e, t) {
+function Pye(e, t) {
let { features: n, atoms: r, initialState: i } = e.options;
if (!e.options.mergeOptions) return {
...e.options,
@@ -55929,19 +55976,19 @@ function vye(e, t) {
});
}
function jq(e, t, n) {
- let r = vye(e, tq(t, e.options));
+ let r = Pye(e, tq(t, e.options));
e.optionsStore ? e.optionsStore.set(() => r) : e.options = r, n?.syncExternalState !== !1 && Aq(e, r.state ?? null);
}
// node_modules/@tanstack/table-core/dist/core/coreFeatures.js
-var yye = {
- coreCellsFeature: lve,
- coreColumnsFeature: Tve,
- coreHeadersFeature: Lve,
- coreRowModelsFeature: eye,
- coreRowsFeature: gye,
+var Fye = {
+ coreCellsFeature: Tve,
+ coreColumnsFeature: Vve,
+ coreHeadersFeature: $ve,
+ coreRowModelsFeature: gye,
+ coreRowsFeature: Mye,
coreTablesFeature: { constructTableAPIs: (e) => {
mq("coreTablesFeature", e, {
- table_reset: { fn: () => _ye(e) },
+ table_reset: { fn: () => Nye(e) },
table_setOptions: { fn: (t) => jq(e, t) }
});
} }
@@ -55966,17 +56013,17 @@ function Nq(e) {
return e;
}
// node_modules/@tanstack/table-core/dist/core/table/constructTable.js
-function bye(e, t = {}) {
+function Iye(e, t = {}) {
return Object.values(e).forEach((e) => {
t = e.getInitialState?.(t) ?? t;
}), nq(t);
}
-function xye(e) {
+function Lye(e) {
let t = e.features.coreReactivityFeature, { aggregationFns: n, columnMeta: r, coreRowModel: i, expandedRowModel: a, facetedMinMaxValues: o, facetedRowModel: s, facetedUniqueValues: c, filterFns: l, filterMeta: u, filteredRowModel: d, groupedRowModel: f, paginatedRowModel: p, sortFns: m, sortedRowModel: h, tableMeta: g, ..._ } = e.features, v = {
_cellInstanceInitFns: [],
_columnInstanceInitFns: [],
_features: {
- ...yye,
+ ...Fye,
..._
},
_headerGroupInstanceInitFns: [],
@@ -56014,7 +56061,7 @@ function xye(e) {
set(e) {
v.optionsStore.set(() => e);
}
- })) : v.options = b, v.initialState = bye(v._features, v.options.initialState);
+ })) : v.options = b, v.initialState = Iye(v._features, v.options.initialState);
let x = Object.keys(v.initialState);
for (let e = 0; e < x.length; e++) {
let n = x[e];
@@ -56029,7 +56076,7 @@ function xye(e) {
return r;
}, { debugName: `table/atoms/${n}` });
}
- kq(v), v.store = Z_e(t.createReadonlyAtom(() => {
+ kq(v), v.store = pve(t.createReadonlyAtom(() => {
let e = {};
for (let t = 0; t < x.length; t++) {
let n = x[t];
@@ -56047,7 +56094,7 @@ function xye(e) {
return v;
}
// node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.utils.js
-function Sye() {
+function Rye() {
return iq();
}
function Pq(e, t) {
@@ -56069,12 +56116,12 @@ function Fq(e) {
function Iq(e) {
return (e.columnDef.enableHiding ?? !0) && (e.table.options.enableHiding ?? !0);
}
-function Cye(e) {
+function zye(e) {
return (t) => {
Pq(e, t.target.checked);
};
}
-function wye(e) {
+function Bye(e) {
let t = e.getAllCells(), n = [];
for (let e = 0; e < t.length; e++) {
let r = t[e];
@@ -56090,16 +56137,16 @@ function Lq(e) {
}
return t;
}
-function Tye(e) {
+function Vye(e) {
return e.getAllFlatColumns().filter((e) => gq(e, "getIsVisible", Fq));
}
-function Eye(e) {
+function Hye(e) {
return e.getAllLeafColumns().filter((e) => gq(e, "getIsVisible", Fq));
}
function Rq(e, t) {
uq(e, "columnVisibility", t);
}
-function Dye(e, t) {
+function Uye(e, t) {
Rq(e, t ? iq() : Object.assign(iq(), nq(e.initialState.columnVisibility ?? {})));
}
function zq(e, t) {
@@ -56114,10 +56161,10 @@ function zq(e, t) {
function Bq(e) {
return !e.getAllLeafColumns().some((e) => !gq(e, "getIsVisible", Fq));
}
-function Oye(e) {
+function Wye(e) {
return e.getAllLeafColumns().some((e) => gq(e, "getIsVisible", Fq));
}
-function kye(e) {
+function Gye(e) {
return (t) => {
zq(e, t.target.checked);
};
@@ -56125,7 +56172,7 @@ function kye(e) {
// node_modules/@tanstack/table-core/dist/features/column-visibility/columnVisibilityFeature.js
var Vq = {
getInitialState: (e) => ({
- columnVisibility: Sye(),
+ columnVisibility: Rye(),
...e
}),
getDefaultTableOptions: (e) => ({ onColumnVisibilityChange: oq("columnVisibility", e) }),
@@ -56140,14 +56187,14 @@ var Vq = {
]
},
column_getCanHide: { fn: (e) => Iq(e) },
- column_getToggleVisibilityHandler: { fn: (e) => Cye(e) },
+ column_getToggleVisibilityHandler: { fn: (e) => zye(e) },
column_toggleVisibility: { fn: (e, t) => Pq(e, t) }
});
},
assignRowPrototype: (e, t) => {
hq("columnVisibilityFeature", e, t, {
row_getVisibleCells: {
- fn: (e) => wye(e),
+ fn: (e) => Bye(e),
memoDeps: (e) => [
e.getAllCells(),
t.atoms.columnPinning?.get(),
@@ -56163,7 +56210,7 @@ var Vq = {
constructTableAPIs: (e) => {
mq("columnVisibilityFeature", e, {
table_getVisibleFlatColumns: {
- fn: () => Tye(e),
+ fn: () => Vye(e),
memoDeps: () => [
e.atoms.columnVisibility?.get(),
e.atoms.columnOrder?.get(),
@@ -56173,7 +56220,7 @@ var Vq = {
]
},
table_getVisibleLeafColumns: {
- fn: () => Eye(e),
+ fn: () => Hye(e),
memoDeps: () => [
e.atoms.columnVisibility?.get(),
e.atoms.columnOrder?.get(),
@@ -56183,11 +56230,11 @@ var Vq = {
]
},
table_setColumnVisibility: { fn: (t) => Rq(e, t) },
- table_resetColumnVisibility: { fn: (t) => Dye(e, t) },
+ table_resetColumnVisibility: { fn: (t) => Uye(e, t) },
table_toggleAllColumnsVisible: { fn: (t) => zq(e, t) },
table_getIsAllColumnsVisible: { fn: () => Bq(e) },
- table_getIsSomeColumnsVisible: { fn: () => Oye(e) },
- table_getToggleAllColumnsVisibilityHandler: { fn: () => kye(e) }
+ table_getIsSomeColumnsVisible: { fn: () => Wye(e) },
+ table_getToggleAllColumnsVisibilityHandler: { fn: () => Gye(e) }
});
}
}, Hq = 0, Uq = 10;
@@ -56197,7 +56244,7 @@ function Wq() {
pageSize: Uq
};
}
-function Aye(e) {
+function Kye(e) {
if (e.options.autoResetAll ?? e.options.autoResetPageIndex ?? !e.options.manualPagination) {
if ((e.atoms.pagination?.get()?.pageIndex ?? Hq) === Hq) return;
qq(e, !0);
@@ -56206,7 +56253,7 @@ function Aye(e) {
function Gq(e, t) {
uq(e, "pagination", t);
}
-function jye(e, t) {
+function qye(e, t) {
Gq(e, t ? Wq() : nq(e.initialState.pagination ?? Wq()));
}
function Kq(e, t) {
@@ -56221,7 +56268,7 @@ function Kq(e, t) {
function qq(e, t) {
Kq(e, t ? Hq : e.initialState.pagination?.pageIndex ?? Hq);
}
-function Mye(e, t) {
+function Jye(e, t) {
Jq(e, t ? Uq : e.initialState.pagination?.pageSize ?? Uq);
}
function Jq(e, t) {
@@ -56234,31 +56281,31 @@ function Jq(e, t) {
};
});
}
-function Nye(e) {
+function Yye(e) {
let t = Yq(e), n = [];
return t && t > 0 && (n = [...Array(t)].fill(null).map((e, t) => t)), n;
}
-function Pye(e) {
+function Xye(e) {
return (e.atoms.pagination?.get()?.pageIndex ?? 0) > 0;
}
-function Fye(e) {
+function Zye(e) {
let t = e.atoms.pagination?.get()?.pageIndex ?? Hq, n = Yq(e);
return n === -1 || n !== 0 && t < n - 1;
}
-function Iye(e) {
+function Qye(e) {
let t = e.atoms.pagination?.get()?.pageIndex ?? Hq, n = Yq(e);
return Number.isFinite(n) && n > 0 && t < n - 1;
}
-function Lye(e) {
+function $ye(e) {
return Kq(e, (e) => e - 1);
}
-function Rye(e) {
+function ebe(e) {
return Kq(e, (e) => e + 1);
}
-function zye(e) {
+function tbe(e) {
return Kq(e, 0);
}
-function Bye(e) {
+function nbe(e) {
let t = Yq(e);
if (!(!Number.isFinite(t) || t <= 0)) return Kq(e, t - 1);
}
@@ -56283,34 +56330,34 @@ var Zq = {
getDefaultTableOptions: (e) => ({ onPaginationChange: oq("pagination", e) }),
constructTableAPIs: (e) => {
mq("rowPaginationFeature", e, {
- table_autoResetPageIndex: { fn: () => Aye(e) },
+ table_autoResetPageIndex: { fn: () => Kye(e) },
table_setPagination: { fn: (t) => Gq(e, t) },
- table_resetPagination: { fn: (t) => jye(e, t) },
+ table_resetPagination: { fn: (t) => qye(e, t) },
table_setPageIndex: { fn: (t) => Kq(e, t) },
table_resetPageIndex: { fn: (t) => qq(e, t) },
table_setPageSize: { fn: (t) => Jq(e, t) },
table_getPageCount: { fn: () => Yq(e) },
- table_resetPageSize: { fn: (t) => Mye(e, t) },
- table_getPageOptions: { fn: () => Nye(e) },
- table_getCanPreviousPage: { fn: () => Pye(e) },
- table_getCanNextPage: { fn: () => Fye(e) },
- table_getCanLastPage: { fn: () => Iye(e) },
- table_previousPage: { fn: () => Lye(e) },
- table_nextPage: { fn: () => Rye(e) },
- table_firstPage: { fn: () => zye(e) },
- table_lastPage: { fn: () => Bye(e) },
+ table_resetPageSize: { fn: (t) => Jye(e, t) },
+ table_getPageOptions: { fn: () => Yye(e) },
+ table_getCanPreviousPage: { fn: () => Xye(e) },
+ table_getCanNextPage: { fn: () => Zye(e) },
+ table_getCanLastPage: { fn: () => Qye(e) },
+ table_previousPage: { fn: () => $ye(e) },
+ table_nextPage: { fn: () => ebe(e) },
+ table_firstPage: { fn: () => tbe(e) },
+ table_lastPage: { fn: () => nbe(e) },
table_getRowCount: { fn: () => Xq(e) }
});
}
};
// node_modules/@tanstack/table-core/dist/features/row-selection/rowSelectionFeature.utils.js
-function Vye() {
+function rbe() {
return iq();
}
function Qq(e, t) {
e.options.onRowSelectionChange?.(t);
}
-function Hye(e, t) {
+function ibe(e, t) {
e._lastSelectedRowId = null, Qq(e, t ? iq() : Object.assign(iq(), nq(e.initialState.rowSelection ?? {})));
}
function $q(e, t, n) {
@@ -56338,10 +56385,10 @@ function eJ(e, t, n) {
}), a;
});
}
-function Uye(e) {
+function abe(e) {
return e.getCoreRowModel();
}
-function Wye(e) {
+function obe(e) {
let t = e.getCoreRowModel();
return gq(e, "getIsSomeRowsSelected", iJ) ? hJ(t, e) : {
rows: [],
@@ -56349,7 +56396,7 @@ function Wye(e) {
rowsById: iq()
};
}
-function Gye(e) {
+function sbe(e) {
let t = e.getFilteredRowModel();
return gq(e, "getIsSomeRowsSelected", iJ) ? hJ(t, e) : {
rows: [],
@@ -56357,7 +56404,7 @@ function Gye(e) {
rowsById: iq()
};
}
-function Kye(e) {
+function cbe(e) {
let t = e.getSortedRowModel();
return gq(e, "getIsSomeRowsSelected", iJ) ? hJ(t, e) : {
rows: [],
@@ -56388,15 +56435,15 @@ function rJ(e) {
function iJ(e) {
return gq(e, "getSelectedRowIds", tJ).length > 0;
}
-function qye(e) {
+function lbe(e) {
return e.getPaginatedRowModel().flatRows.filter((e) => cJ(e)).some((e) => oJ(e) || gq(e, "getIsSomeSelected", sJ));
}
-function Jye(e) {
+function ube(e) {
return (t) => {
$q(e, t.target.checked);
};
}
-function Yye(e) {
+function dbe(e) {
return (t) => {
eJ(e, t.target.checked);
};
@@ -56415,7 +56462,7 @@ function oJ(e) {
function sJ(e) {
return _J(e) === "some";
}
-function Xye(e) {
+function fbe(e) {
return _J(e) === "all";
}
function cJ(e) {
@@ -56430,15 +56477,15 @@ function uJ(e) {
let t = e.table.options;
return typeof t.enableMultiRowSelection == "function" ? t.enableMultiRowSelection(e) : t.enableMultiRowSelection ?? !0;
}
-function Zye(e, t) {
+function pbe(e, t) {
let n = cJ(e);
return (r) => {
if (!n) return;
let i = r, a = e.table, o = i.target.checked, s = a._lastSelectedRowId;
- a.options.enableRowRangeSelection !== !1 && s !== null && uJ(e) && (a.options.isRowRangeSelectionEvent?.(r) ?? !1) && Qye(e, s, o, t) || aJ(e, o, t), a._lastSelectedRowId = e.id;
+ a.options.enableRowRangeSelection !== !1 && s !== null && uJ(e) && (a.options.isRowRangeSelectionEvent?.(r) ?? !1) && mbe(e, s, o, t) || aJ(e, o, t), a._lastSelectedRowId = e.id;
};
}
-function Qye(e, t, n, r) {
+function mbe(e, t, n, r) {
let i = r?.selectChildren ?? !0, a = e.table, o = a.getRowsInDisplayOrder(), s = a.getPrePaginatedRowModel().rowsById[t] ?? a.getCoreRowModel().rowsById[t];
if (!s) return !1;
let c = s.getDisplayIndex(), l = e.getDisplayIndex(), u = o[c], d = o[l];
@@ -56533,7 +56580,7 @@ var vJ = {
e._lastSelectedRowId = null;
},
getInitialState: (e) => ({
- rowSelection: Vye(),
+ rowSelection: rbe(),
...e
}),
getDefaultTableOptions: (e) => ({
@@ -56560,7 +56607,7 @@ var vJ = {
]
},
row_getIsAllSubRowsSelected: {
- fn: (e) => Xye(e),
+ fn: (e) => fbe(e),
memoDeps: (e) => [
e.subRows,
e.table.atoms.rowSelection?.get(),
@@ -56570,26 +56617,26 @@ var vJ = {
row_getCanSelect: { fn: (e) => cJ(e) },
row_getCanSelectSubRows: { fn: (e) => lJ(e) },
row_getCanMultiSelect: { fn: (e) => uJ(e) },
- row_getToggleSelectedHandler: { fn: (e, t) => Zye(e, t) }
+ row_getToggleSelectedHandler: { fn: (e, t) => pbe(e, t) }
});
},
constructTableAPIs: (e) => {
mq("rowSelectionFeature", e, {
table_setRowSelection: { fn: (t) => Qq(e, t) },
- table_resetRowSelection: { fn: (t) => Hye(e, t) },
+ table_resetRowSelection: { fn: (t) => ibe(e, t) },
table_toggleAllRowsSelected: { fn: (t, n) => $q(e, t, n) },
table_toggleAllPageRowsSelected: { fn: (t, n) => eJ(e, t, n) },
- table_getPreSelectedRowModel: { fn: () => Uye(e) },
+ table_getPreSelectedRowModel: { fn: () => abe(e) },
table_getSelectedRowModel: {
- fn: () => Wye(e),
+ fn: () => obe(e),
memoDeps: () => [e.atoms.rowSelection?.get(), e.getCoreRowModel()]
},
table_getFilteredSelectedRowModel: {
- fn: () => Gye(e),
+ fn: () => sbe(e),
memoDeps: () => [e.atoms.rowSelection?.get(), e.getFilteredRowModel()]
},
table_getGroupedSelectedRowModel: {
- fn: () => Kye(e),
+ fn: () => cbe(e),
memoDeps: () => [e.atoms.rowSelection?.get(), e.getSortedRowModel()]
},
table_getSelectedRowIds: {
@@ -56619,32 +56666,32 @@ var vJ = {
memoDeps: () => [e.atoms.rowSelection?.get()]
},
table_getIsSomePageRowsSelected: {
- fn: () => qye(e),
+ fn: () => lbe(e),
memoDeps: () => [
e.atoms.rowSelection?.get(),
e.getPaginatedRowModel(),
e.options.enableRowSelection
]
},
- table_getToggleAllRowsSelectedHandler: { fn: () => Jye(e) },
- table_getToggleAllPageRowsSelectedHandler: { fn: () => Yye(e) }
+ table_getToggleAllRowsSelectedHandler: { fn: () => ube(e) },
+ table_getToggleAllPageRowsSelectedHandler: { fn: () => dbe(e) }
});
}
-}, $ye = /([0-9]+)/gm;
+}, hbe = /([0-9]+)/gm;
/* @__NO_SIDE_EFFECTS__ */
-function ebe(e) {
+function gbe(e) {
let t = Object.assign((e, n, r) => {
let i = e.getValue(r), a = n.getValue(r), o = t.resolveDataValue;
return o && (i = o(i), a = o(a)), t.sort(i, a, e, n, r);
}, e);
return t;
}
-var yJ = /* @__PURE__ */ ebe({ sort: (e, t) => tbe(e, t) });
-function tbe(e, t) {
+var yJ = /* @__PURE__ */ gbe({ sort: (e, t) => _be(e, t) });
+function _be(e, t) {
return e === t ? 0 : e > t ? 1 : -1;
}
// node_modules/@tanstack/table-core/dist/features/row-sorting/rowSortingFeature.utils.js
-function nbe() {
+function vbe() {
return [];
}
function bJ(e, t) {
@@ -56653,7 +56700,7 @@ function bJ(e, t) {
function xJ(e, t) {
bJ(e, t ? [] : nq(e.initialState.sorting ?? []));
}
-function rbe(e) {
+function ybe(e) {
e.atoms.sorting && (e.options.autoResetAll ?? e.options.autoResetSorting ?? !1) && xJ(e);
}
function SJ(e) {
@@ -56664,7 +56711,7 @@ function SJ(e) {
r = "datetime";
break;
}
- if (typeof a == "string" && (i = !0, a.split($ye).length > 1)) {
+ if (typeof a == "string" && (i = !0, a.split(hbe).length > 1)) {
r = "alphanumeric";
break;
}
@@ -56685,7 +56732,7 @@ function CJ(e) {
}
function wJ(e) {
let t = e.table._rowModelFns.sortFns;
- return rve(e.columnDef.sortFn) ? e.columnDef.sortFn : e.columnDef.sortFn === "auto" ? SJ(e) : t?.[e.columnDef.sortFn] ?? yJ;
+ return yve(e.columnDef.sortFn) ? e.columnDef.sortFn : e.columnDef.sortFn === "auto" ? SJ(e) : t?.[e.columnDef.sortFn] ?? yJ;
}
function TJ(e, t, n) {
let r = DJ(e, n && kJ(e)), i = t !== void 0;
@@ -56723,13 +56770,13 @@ function AJ(e) {
let t = e.table.atoms.sorting?.get()?.find((t) => t.id === e.id);
return t ? t.desc ? "desc" : "asc" : !1;
}
-function ibe(e) {
+function bbe(e) {
return e.table.atoms.sorting?.get()?.findIndex((t) => t.id === e.id) ?? -1;
}
-function abe(e) {
+function xbe(e) {
bJ(e.table, (t) => t.length ? t.filter((t) => t.id !== e.id) : []);
}
-function obe(e) {
+function Sbe(e) {
let t = OJ(e);
return (n) => {
t && TJ(e, void 0, kJ(e) ? e.table.options.isMultiSortEvent?.(n) : !1);
@@ -56739,7 +56786,7 @@ function obe(e) {
var jJ = {
getInitialState(e) {
return {
- sorting: nbe(),
+ sorting: vbe(),
...e
};
},
@@ -56767,34 +56814,34 @@ var jJ = {
column_getCanSort: { fn: (e) => OJ(e) },
column_getCanMultiSort: { fn: (e) => kJ(e) },
column_getIsSorted: { fn: (e) => AJ(e) },
- column_getSortIndex: { fn: (e) => ibe(e) },
- column_clearSorting: { fn: (e) => abe(e) },
- column_getToggleSortingHandler: { fn: (e) => obe(e) }
+ column_getSortIndex: { fn: (e) => bbe(e) },
+ column_clearSorting: { fn: (e) => xbe(e) },
+ column_getToggleSortingHandler: { fn: (e) => Sbe(e) }
});
},
constructTableAPIs(e) {
mq("rowSortingFeature", e, {
- table_autoResetSorting: { fn: () => rbe(e) },
+ table_autoResetSorting: { fn: () => ybe(e) },
table_setSorting: { fn: (t) => bJ(e, t) },
table_resetSorting: { fn: (t) => xJ(e, t) }
});
}
-}, sbe = typeof window > "u" ? P.useEffect : P.useLayoutEffect;
+}, Cbe = typeof window > "u" ? P.useEffect : P.useLayoutEffect;
function MJ(e, t) {
let [{ table: n, rootSource: r }] = (0, P.useState)(() => {
- let t = xye({
+ let t = Lye({
...e,
features: {
- coreReactivityFeature: eve(),
+ coreReactivityFeature: gve(),
...e.features
}
});
- return t.Subscribe = ((e) => X_e({
+ return t.Subscribe = ((e) => fve({
...e,
source: e.source ?? t.store
- })), t.FlexRender = z_e, {
+ })), t.FlexRender = tve, {
table: t,
- rootSource: $_e(t.store, ZK)
+ rootSource: hve(t.store, ZK)
};
}), i = n;
jq(i, (t) => ({
@@ -56802,7 +56849,7 @@ function MJ(e, t) {
...e
}), { syncExternalState: !1 });
let a = i.options.state, o = r.get(), s = eq(r, t, { compare: ZK });
- return sbe(() => {
+ return Cbe(() => {
r.markCommitted(o), Aq(i, a ?? null, ZK);
}), (0, P.useMemo)(() => ({
...n,
@@ -56817,16 +56864,16 @@ function MJ(e, t) {
// src/react/boardui/components/base/table/table.tsx
function NJ({ size: e = "md", className: t, containerClassName: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
- className: sF("w-full overflow-x-auto", n),
- children: /* @__PURE__ */ (0, F.jsx)(vfe, {
+ className: mF("w-full overflow-x-auto", n),
+ children: /* @__PURE__ */ (0, F.jsx)(Ofe, {
ref: r,
...i,
- className: sF("bui-table", e === "sm" && "bui-table-sm", t)
+ className: mF("bui-table", e === "sm" && "bui-table-sm", t)
})
});
}
// src/react/catalog-grid/catalog-table-columns.ts
-var PJ = "peach.catalog-column-widths.v1", FJ = "peach.catalog-column-visibility.v1", cbe = {
+var PJ = "peach.catalog-column-widths.v1", FJ = "peach.catalog-column-visibility.v1", wbe = {
select: {
width: 48,
min: 48,
@@ -56892,13 +56939,13 @@ var PJ = "peach.catalog-column-widths.v1", FJ = "peach.catalog-column-visibility
min: 144,
max: 560
}
-}, lbe = {
+}, Tbe = {
code: !1,
o: !1,
new: !1,
played: !1,
release: !1
-}, ube = {
+}, Ebe = {
select: "选择",
name: "作品",
dur: "时长",
@@ -56928,11 +56975,11 @@ var PJ = "peach.catalog-column-widths.v1", FJ = "peach.catalog-column-visibility
"release"
].map((e) => ({
id: e,
- label: ube[e],
- ...cbe[e],
+ label: Ebe[e],
+ ...wbe[e],
flex: e === "name",
required: e === "select" || e === "name",
- visible: lbe[e] !== !1
+ visible: Tbe[e] !== !1
}));
function LJ(e) {
try {
@@ -56942,7 +56989,7 @@ function LJ(e) {
return {};
}
}
-function dbe() {
+function Dbe() {
let e = LJ(PJ), t = LJ(FJ);
return IJ.filter((e) => e.id !== "select" && (e.required || (typeof t[e.id] == "boolean" ? t[e.id] === !0 : e.visible))).map((t) => {
let n = e[t.id], r = typeof n == "number" && Number.isFinite(n) && !(t.flex && n === t.width);
@@ -56963,22 +57010,22 @@ function zJ() {
return !1;
}
}
-function fbe(e) {
+function Obe(e) {
try {
e ? localStorage.setItem(RJ, "1") : localStorage.removeItem(RJ);
} catch {}
}
-var pbe = "<i data-completion-skeleton class=\"skeleton-sheen\"></i>";
+var kbe = "<i data-completion-skeleton class=\"skeleton-sheen\"></i>";
// src/catalog-content-skeleton.ts
function BJ(e) {
return e === "name" ? "<span data-list-skeleton-name><i class=\"skeleton-sheen\"></i><b class=\"skeleton-sheen\"></b><span><i class=\"skeleton-sheen\"></i><i class=\"skeleton-sheen\"></i></span></span>" : "<i data-list-skeleton-bar class=\"skeleton-sheen\"></i>";
}
-function mbe(e) {
- let t = dbe(), n = t.some((e) => e.width === null), r = t.reduce((e, t) => e + (t.width ?? t.min), 0), i = t.map((e) => e.width === null ? "<col>" : `<col style="width:${e.width}px">`).join("") + (n ? "" : "<col>"), a = t.map((e) => `<th>${z(e.label)}</th>`).join("") + (n ? "" : "<th></th>"), o = `<tr>${t.map((e) => `<td>${BJ(e.id)}</td>`).join("")}${n ? "" : "<td></td>"}</tr>`;
- return `<div class="peach-react catalog-skeleton" data-skeleton="catalog/list" role="status" aria-busy="true" aria-label="${z(e)}"><div data-list-skeleton aria-hidden="true"><div data-list-skeleton-tools><i class="skeleton-sheen"></i></div>` + (zJ() ? pbe : "") + `<div data-board-data-table><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm" style="table-layout:fixed;min-width:${r}px"><colgroup>${i}</colgroup><thead><tr>${a}</tr></thead><tbody>${o.repeat(6)}</tbody></table></div></div></div></div>`;
+function Abe(e) {
+ let t = Dbe(), n = t.some((e) => e.width === null), r = t.reduce((e, t) => e + (t.width ?? t.min), 0), i = t.map((e) => e.width === null ? "<col>" : `<col style="width:${e.width}px">`).join("") + (n ? "" : "<col>"), a = t.map((e) => `<th>${z(e.label)}</th>`).join("") + (n ? "" : "<th></th>"), o = `<tr>${t.map((e) => `<td>${BJ(e.id)}</td>`).join("")}${n ? "" : "<td></td>"}</tr>`;
+ return `<div class="peach-react catalog-skeleton" data-skeleton="catalog/list" role="status" aria-busy="true" aria-label="${z(e)}"><div data-list-skeleton aria-hidden="true"><div data-list-skeleton-tools><i class="skeleton-sheen"></i></div>` + (zJ() ? kbe : "") + `<div data-board-data-table><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm" style="table-layout:fixed;min-width:${r}px"><colgroup>${i}</colgroup><thead><tr>${a}</tr></thead><tbody>${o.repeat(6)}</tbody></table></div></div></div></div>`;
}
function VJ(e, t) {
- return PM() === "list" ? mbe(e) : Rs(e, {
+ return VM() === "list" ? Abe(e) : $s(e, {
variant: "cards",
className: "catalog-skeleton postercard-skeleton",
cardRatio: t
@@ -56989,7 +57036,7 @@ function HJ({ children: e, follow: t = !1, onRowClick: n, preferences: r }) {
let i = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
let e = i.current?.querySelector(".overflow-x-auto") ?? null;
- yo(e), uc(e);
+ Po(e), Tc(e);
}), /* @__PURE__ */ (0, F.jsx)("div", {
ref: i,
"data-board-data-table": !0,
@@ -56999,9 +57046,9 @@ function HJ({ children: e, follow: t = !1, onRowClick: n, preferences: r }) {
let t = e.target;
if (!(t instanceof Element)) return;
let r = t.closest("[role=\"row\"][data-key]");
- r && fG(e, r) && n(r.dataset.key);
+ r && xG(e, r) && n(r.dataset.key);
} : void 0,
- children: r ? /* @__PURE__ */ (0, F.jsx)(gfe, {
+ children: r ? /* @__PURE__ */ (0, F.jsx)(Efe, {
className: "relative min-w-0",
onResize: r.resize,
onResizeEnd: r.save,
@@ -57011,7 +57058,7 @@ function HJ({ children: e, follow: t = !1, onRowClick: n, preferences: r }) {
}
// src/react/components/select.tsx
function UJ({ prefix: e, renderValue: t, size: n, ...r }) {
- if (e == null) return /* @__PURE__ */ (0, F.jsx)(AU, {
+ if (e == null) return /* @__PURE__ */ (0, F.jsx)(IU, {
...r,
size: n,
renderValue: t
@@ -57021,7 +57068,7 @@ function UJ({ prefix: e, renderValue: t, size: n, ...r }) {
className: `shrink-0 text-text-tertiary ${i}`,
children: e
}), typeof t == "function" ? t(n) : t ?? n.defaultChildren] });
- return /* @__PURE__ */ (0, F.jsx)(AU, {
+ return /* @__PURE__ */ (0, F.jsx)(IU, {
...r,
size: n,
renderValue: a
@@ -57043,7 +57090,7 @@ function WJ({ page: e, pages: t, onPage: n, label: r = "关注列表分页" }) {
}),
/* @__PURE__ */ (0, F.jsx)("ul", {
className: "flex min-w-0 flex-wrap items-center justify-center gap-1",
- children: Xn(e, t).map((t, r) => /* @__PURE__ */ (0, F.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, F.jsx)("span", {
+ children: dr(e, t).map((t, r) => /* @__PURE__ */ (0, F.jsx)("li", { children: t === "…" ? /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
className: "px-1 text-body-2-regular text-text-tertiary",
children: "…"
@@ -57081,10 +57128,10 @@ function GJ({ label: e, options: t, sorting: n, onChange: r }) {
desc: i?.desc ?? !1
}]);
},
- children: [/* @__PURE__ */ (0, F.jsx)(jU, {
+ children: [/* @__PURE__ */ (0, F.jsx)(LU, {
id: "default",
children: "默认顺序"
- }), t.map((e) => /* @__PURE__ */ (0, F.jsx)(jU, {
+ }), t.map((e) => /* @__PURE__ */ (0, F.jsx)(LU, {
id: e.id,
children: e.label
}, e.id))]
@@ -57092,7 +57139,7 @@ function GJ({ label: e, options: t, sorting: n, onChange: r }) {
variant: "secondary",
iconOnly: !0,
disabled: !i,
- leadingIcon: WU,
+ leadingIcon: XU,
"data-icon-state": i?.desc ? "b" : "a",
"aria-label": `${e}改为${i?.desc ? "升序" : "降序"}`,
onClick: () => {
@@ -57129,7 +57176,7 @@ function KJ({ label: e, total: t, pagination: n, onChange: r, unit: i = "条记
pageSize: Number(e)
});
},
- children: o.map((e) => /* @__PURE__ */ (0, F.jsx)(jU, {
+ children: o.map((e) => /* @__PURE__ */ (0, F.jsx)(LU, {
id: String(e),
children: `每页 ${e} ${a}`
}, e))
@@ -57159,7 +57206,7 @@ function JJ(e, t) {
localStorage.setItem(e, JSON.stringify(t));
} catch {}
}
-function hbe(e, t) {
+function jbe(e, t) {
let n = (e) => Object.fromEntries(Object.entries(t).map(([t, n]) => {
let r = e[t];
return [t, typeof r == "number" && Number.isFinite(r) ? Math.max(n.min, Math.min(n.max, r)) : n.flex ? "1fr" : n.width];
@@ -57191,7 +57238,7 @@ function hbe(e, t) {
}
};
}
-function gbe(e, t, n, r = {}) {
+function Mbe(e, t, n, r = {}) {
let i = (e) => ({
...r,
...Object.fromEntries(t.filter((t) => !n.includes(t) && typeof e[t] == "boolean").map((t) => [t, e[t] === !0]))
@@ -57210,7 +57257,7 @@ function YJ(e, t, n) {
min: e.min ?? 96,
max: e.max ?? (e.flex ? 2e3 : 800),
flex: e.flex
- }])), [t]), i = hbe(n?.widths ?? `peach.table.${e}.widths.v1`, r), a = gbe(n?.visibility ?? `peach.table.${e}.visibility.v1`, t.map((e) => e.id), t.filter((e) => e.required).map((e) => e.id), Object.fromEntries(t.filter((e) => e.visible === !1).map((e) => [e.id, !1]))), o = t.some((e) => e.flex && a.visibility[e.id] !== !1 && i.widths[e.id] === "1fr");
+ }])), [t]), i = jbe(n?.widths ?? `peach.table.${e}.widths.v1`, r), a = Mbe(n?.visibility ?? `peach.table.${e}.visibility.v1`, t.map((e) => e.id), t.filter((e) => e.required).map((e) => e.id), Object.fromEntries(t.filter((e) => e.visible === !1).map((e) => [e.id, !1]))), o = t.some((e) => e.flex && a.visibility[e.id] !== !1 && i.widths[e.id] === "1fr");
return {
...i,
...a,
@@ -57229,14 +57276,14 @@ function YJ(e, t, n) {
};
}
// src/react/catalog-grid/catalog-column-widths.ts
-function _be() {
+function Nbe() {
return YJ("catalog", IJ, {
widths: PJ,
visibility: FJ
});
}
// src/react/components/rating-stars.tsx
-var XJ = Vz("star");
+var XJ = qz("star");
function ZJ({ value: e, onRate: t, busyStar: n, busyAttrs: r }) {
let i = Math.max(0, Math.min(5, e)), a = Math.round(i);
return /* @__PURE__ */ (0, F.jsx)("span", {
@@ -57260,7 +57307,7 @@ function ZJ({ value: e, onRate: t, busyStar: n, busyAttrs: r }) {
onClick: () => {
n || t(e);
},
- children: n === e ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: xs("正在保存评分") } }) : /* @__PURE__ */ (0, F.jsx)(XJ, {})
+ children: n === e ? /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: Is("正在保存评分") } }) : /* @__PURE__ */ (0, F.jsx)(XJ, {})
}, e) : /* @__PURE__ */ (0, F.jsx)("span", {
"data-rate": e,
"data-on": String(i >= e),
@@ -57276,9 +57323,9 @@ function ZJ({ value: e, onRate: t, busyStar: n, busyAttrs: r }) {
});
}
// src/react/catalog-grid/catalog-table-controls.tsx
-function vbe({ item: e, actions: t }) {
- let { rating: n } = e, r = jH(), i = (0, P.useRef)(0), a = UM(n), o = n == null ? "未评分" : `评分 ${a} / 5`, s = (t) => {
- BM(e.id, { rating: t }), H.setQueryData(["item", e.id], (e) => e && {
+function Pbe({ item: e, actions: t }) {
+ let { rating: n } = e, r = LH(), i = (0, P.useRef)(0), a = XM(n), o = n == null ? "未评分" : `评分 ${a} / 5`, s = (t) => {
+ qM(e.id, { rating: t }), H.setQueryData(["item", e.id], (e) => e && {
...e,
rating: t
});
@@ -57294,7 +57341,7 @@ function vbe({ item: e, actions: t }) {
value: a,
onRate: c,
busyStar: r.busy ? Number(r.busy) : void 0
- }), r.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }), r.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -57326,7 +57373,7 @@ function $J({ actions: e, layout: t = "inline", prefix: n, onNavigate: r }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-selection-actions": "",
"data-action-layout": t,
- className: sF("flex gap-2", t === "inline" ? "flex-nowrap items-center" : "flex-col"),
+ className: mF("flex gap-2", t === "inline" ? "flex-nowrap items-center" : "flex-col"),
children: [n, e.map((e) => e.href === void 0 ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "ghost",
size: "small",
@@ -57334,10 +57381,10 @@ function $J({ actions: e, layout: t = "inline", prefix: n, onNavigate: r }) {
className: t === "inline" ? "shrink-0" : "w-full",
onClick: e.onPress,
children: e.label
- }, e.label) : /* @__PURE__ */ (0, F.jsx)(AH, {
+ }, e.label) : /* @__PURE__ */ (0, F.jsx)(IH, {
size: "small",
href: e.href,
- trailingIcon: pz,
+ trailingIcon: yz,
className: t === "inline" ? "shrink-0" : "w-full",
disabled: e.disabled,
onClick: r,
@@ -57354,7 +57401,7 @@ function eY({ label: e, triggerLabel: t, leadingIcon: n, items: r, onChange: i,
}, "actions"), f = /* @__PURE__ */ (0, F.jsx)("div", {
"data-selection-options": "",
className: "flex min-w-0 flex-col gap-1",
- children: r.length ? r.map((e) => /* @__PURE__ */ (0, F.jsx)(sV, {
+ children: r.length ? r.map((e) => /* @__PURE__ */ (0, F.jsx)(pV, {
isSelected: e.selected,
className: "min-w-0 [&>span:last-child]:min-w-0 [&>span:last-child]:wrap-anywhere",
isDisabled: e.disabled,
@@ -57374,14 +57421,14 @@ function eY({ label: e, triggerLabel: t, leadingIcon: n, items: r, onChange: i,
"aria-label": t,
onClick: () => u(!0),
children: t
- }), /* @__PURE__ */ (0, F.jsx)(oR, {
+ }), /* @__PURE__ */ (0, F.jsx)(fR, {
triggerRef: c,
isOpen: l,
onOpenChange: u,
placement: "bottom end",
offset: 4,
- className: sF(eV, "w-max overscroll-contain"),
- children: ({ placement: t }) => /* @__PURE__ */ (0, F.jsx)(PH, {
+ className: mF(oV, "w-max overscroll-contain"),
+ children: ({ placement: t }) => /* @__PURE__ */ (0, F.jsx)(BH, {
"aria-label": e,
"data-selection-placement": t ?? "bottom",
className: "flex w-max max-w-full flex-col gap-2 outline-none",
@@ -57426,7 +57473,7 @@ function tY({ preferences: e, label: t = "表格" }) {
}
function nY({ preferences: e, id: t }) {
let n = e.columns.find((e) => e.id === t);
- return e.canResize(t) ? /* @__PURE__ */ (0, F.jsx)(Dfe, { "aria-label": `调整${n.label}列宽` }) : null;
+ return e.canResize(t) ? /* @__PURE__ */ (0, F.jsx)(Lfe, { "aria-label": `调整${n.label}列宽` }) : null;
}
// src/react/components/table-selection-header.tsx
function rY(e, t) {
@@ -57438,7 +57485,7 @@ function rY(e, t) {
}
function iY({ table: e, label: t, page: n = !1, disabled: r = !1 }) {
let { all: i, some: a } = rY(e, n);
- return /* @__PURE__ */ (0, F.jsx)(sV, {
+ return /* @__PURE__ */ (0, F.jsx)(pV, {
slot: null,
"aria-label": t,
isDisabled: r,
@@ -57451,12 +57498,12 @@ function iY({ table: e, label: t, page: n = !1, disabled: r = !1 }) {
});
}
// src/react/catalog-grid/catalog-list-page.tsx
-var ybe = Nq({
+var Fbe = Nq({
rowSortingFeature: jJ,
rowSelectionFeature: vJ,
rowPaginationFeature: Zq,
columnVisibilityFeature: Vq
-}), bbe = [
+}), Ibe = [
{
id: "name",
label: "名称"
@@ -57494,8 +57541,8 @@ var ybe = Nq({
label: "观看时间"
}
], aY = /* @__PURE__ */ new Map();
-function xbe(e) {
- let t = _be(), n = uG(), r = IM(e.filters || {}, !1), [i] = (0, P.useState)(() => {
+function Lbe(e) {
+ let t = Nbe(), n = yG(), r = UM(e.filters || {}, !1), [i] = (0, P.useState)(() => {
let t = new URLSearchParams(r);
return new URLSearchParams(location.search).has("seed") || t.delete("seed"), `${e.mode}:${e.listScope || e.entityKey || ""}:${t}`;
}), [a, o] = (0, P.useState)(() => aY.get(i) || {
@@ -57534,7 +57581,7 @@ function xbe(e) {
}
}), f = d.data?.items || [], p = Number(d.data?.total || 0), m = e.filters?.state === "trash" ? [] : LK(f, e.layout.javImage), [h] = (0, P.useState)(zJ);
(0, P.useEffect)(() => {
- d.data && !d.isPlaceholderData && fbe(m.length > 0);
+ d.data && !d.isPlaceholderData && Obe(m.length > 0);
}, [
d.data,
d.isPlaceholderData,
@@ -57567,7 +57614,7 @@ function xbe(e) {
c.pageIndex
]);
let g = e.selectMode ? Object.fromEntries([...e.selected].map((e) => [String(e), !0])) : {}, _ = MJ({
- features: ybe,
+ features: Fbe,
columns: (0, P.useMemo)(() => {
let t = Mq();
return t.columns([
@@ -57578,7 +57625,7 @@ function xbe(e) {
label: "全选本页作品",
disabled: d.isPlaceholderData
}),
- cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(sV, {
+ cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(pV, {
slot: null,
"aria-label": `选择 ${e.helpers.displayName(t.original, t.original.name || "")}`,
isDisabled: d.isPlaceholderData,
@@ -57590,7 +57637,7 @@ function xbe(e) {
id: "name",
header: "作品",
enableSorting: !0,
- cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(Sbe, {
+ cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(Rbe, {
item: t.original,
props: e,
disabled: d.isPlaceholderData
@@ -57627,7 +57674,7 @@ function xbe(e) {
id: "dur",
header: "时长",
enableSorting: !0,
- cell: ({ row: e }) => kn(e.original.duration) || "—"
+ cell: ({ row: e }) => Wn(e.original.duration) || "—"
}),
t.display({
id: "resolution",
@@ -57641,13 +57688,13 @@ function xbe(e) {
id: "size",
header: "体积",
enableSorting: !0,
- cell: ({ row: e }) => e.original.size == null ? "—" : jn(e.original.size)
+ cell: ({ row: e }) => e.original.size == null ? "—" : Kn(e.original.size)
}),
t.accessor((e) => e.rating, {
id: "rating",
header: "评分",
enableSorting: !0,
- cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(vbe, {
+ cell: ({ row: t }) => /* @__PURE__ */ (0, F.jsx)(Pbe, {
item: t.original,
actions: e.actions
})
@@ -57736,7 +57783,7 @@ function xbe(e) {
"data-toolbar-actions": "",
children: [/* @__PURE__ */ (0, F.jsx)(tY, { preferences: t }), /* @__PURE__ */ (0, F.jsx)(GJ, {
label: "作品列表",
- options: bbe,
+ options: Ibe,
sorting: s,
onChange: (e) => _.setSorting(e)
})]
@@ -57750,8 +57797,8 @@ function xbe(e) {
className: "",
assetIds: m
}),
- d.isError ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(d.error),
+ d.isError ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(d.error),
onRetry: () => void d.refetch()
}) : null,
/* @__PURE__ */ (0, F.jsx)(HJ, {
@@ -57771,7 +57818,7 @@ function xbe(e) {
id: String(e.column),
desc: e.direction === "descending"
}]),
- children: [/* @__PURE__ */ (0, F.jsxs)(JR, { children: [_.getHeaderGroups()[0].headers.map((e) => /* @__PURE__ */ (0, F.jsx)(YR, {
+ children: [/* @__PURE__ */ (0, F.jsxs)(ez, { children: [_.getHeaderGroups()[0].headers.map((e) => /* @__PURE__ */ (0, F.jsx)(tz, {
id: e.id,
isRowHeader: e.id === "name",
allowsSorting: e.column.getCanSort(),
@@ -57781,32 +57828,32 @@ function xbe(e) {
children: [zK(e.column.columnDef.header, e.getContext()), e.column.getCanSort() ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-sort-indicator": !0,
"data-direction": n || void 0,
- children: /* @__PURE__ */ (0, F.jsx)(ZB, {})
+ children: /* @__PURE__ */ (0, F.jsx)(rV, {})
}) : null]
}), /* @__PURE__ */ (0, F.jsx)(nY, {
preferences: t,
id: e.id
})] })
- }, e.id)), /* @__PURE__ */ (0, F.jsx)(YR, {
+ }, e.id)), /* @__PURE__ */ (0, F.jsx)(tz, {
id: "remaining-space",
"aria-label": "行空白区域",
"data-table-space": "",
width: t.spaceWidth,
minWidth: 0
- })] }), /* @__PURE__ */ (0, F.jsx)(QR, {
+ })] }), /* @__PURE__ */ (0, F.jsx)(iz, {
renderEmptyState: () => d.isError ? "作品列表未取得" : "没有符合的作品",
- children: d.isPending ? Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ (0, F.jsxs)(tz, {
+ children: d.isPending ? Array.from({ length: 6 }, (e, t) => /* @__PURE__ */ (0, F.jsxs)(sz, {
id: `skeleton-${t}`,
"data-list-skeleton-row": "",
"aria-hidden": "true",
- children: [_.getHeaderGroups()[0].headers.map((e) => /* @__PURE__ */ (0, F.jsx)(rz, { children: /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: BJ(e.id) } }) }, e.id)), /* @__PURE__ */ (0, F.jsx)(rz, { "data-table-space": "" })]
- }, `skeleton-${t}`)) : _.getRowModel().rows.map((e) => /* @__PURE__ */ (0, F.jsxs)(tz, {
+ children: [_.getHeaderGroups()[0].headers.map((e) => /* @__PURE__ */ (0, F.jsx)(lz, { children: /* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: BJ(e.id) } }) }, e.id)), /* @__PURE__ */ (0, F.jsx)(lz, { "data-table-space": "" })]
+ }, `skeleton-${t}`)) : _.getRowModel().rows.map((e) => /* @__PURE__ */ (0, F.jsxs)(sz, {
id: e.id,
"data-catalog-row": "",
"data-id": e.original.id,
"data-library": n.get(e.original.library_id || "")?.color ? e.original.library_id : void 0,
"data-board-selected": e.getIsSelected() || void 0,
- children: [e.getVisibleCells().map((e) => /* @__PURE__ */ (0, F.jsx)(rz, { children: zK(e.column.columnDef.cell, e.getContext()) }, e.id)), /* @__PURE__ */ (0, F.jsx)(rz, { "data-table-space": "" })]
+ children: [e.getVisibleCells().map((e) => /* @__PURE__ */ (0, F.jsx)(lz, { children: zK(e.column.columnDef.cell, e.getContext()) }, e.id)), /* @__PURE__ */ (0, F.jsx)(lz, { "data-table-space": "" })]
}, e.id))
})]
})
@@ -57822,8 +57869,10 @@ function xbe(e) {
]
});
}
-function Sbe({ item: e, props: t, disabled: n }) {
- let r = ao(e, "small", !1, t.layout.javImage), i = Number(e.part_group?.count) > 1 && e.part_group || null, a = Number(e.edition_group?.count) > 1 && e.edition_group || null, o = i?.title || e.name || "", s = t.helpers.displayName(e, o).trim() || "未命名作品", c = t.helpers.titleHtml(e, o).trim() || "未命名作品", { avatar: l, who: u } = SG(e), d = !i && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, f = uG({ names: !0 }), p = e.library_id ? f.get(e.library_id) : void 0, m = [Number(e.liked) > 0 ? "喜欢" : "", Number(e.o_count) > 0 ? "有高潮记录" : ""].filter(Boolean), h = (e) => /* @__PURE__ */ (0, F.jsx)("svg", {
+function Rbe({ item: e, props: t, disabled: n }) {
+ let r = xo(e, "small", !1, t.layout.javImage), i = Number(e.part_group?.count) > 1 && e.part_group || null, a = Number(e.edition_group?.count) > 1 && e.edition_group || null, o = i?.title || e.name || "", s = t.helpers.displayName(e, o).trim() || "未命名作品", c = t.helpers.titleHtml(e, o).trim() || "未命名作品";
+ tI();
+ let { avatar: l, who: u } = jG(e), d = !i && Number(e.play_seconds) > 0 && Number(e.duration) > 0 ? Math.min(Number(e.play_seconds) / Number(e.duration), 1) : 0, f = yG({ names: !0 }), p = e.library_id ? f.get(e.library_id) : void 0, m = [Number(e.liked) > 0 ? "喜欢" : "", Number(e.o_count) > 0 ? "有高潮记录" : ""].filter(Boolean), h = (e) => /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
@@ -57848,9 +57897,9 @@ function Sbe({ item: e, props: t, disabled: n }) {
children: /* @__PURE__ */ (0, F.jsxs)("span", {
"data-list-picture": "",
children: [
- r.html ? /* @__PURE__ */ (0, F.jsx)(WW, {
+ r.html ? /* @__PURE__ */ (0, F.jsx)($W, {
artwork: r,
- relayout: (e) => Sl(e, "small")
+ relayout: (e) => Ll(e, "small")
}) : /* @__PURE__ */ (0, F.jsx)("span", { children: "无预览" }),
i && !a ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-group": "",
@@ -57903,7 +57952,7 @@ function Sbe({ item: e, props: t, disabled: n }) {
children: [p?.name ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-list-library": "",
title: `媒体库:${p.name}`,
- children: [/* @__PURE__ */ (0, F.jsx)(rU, { mark: p.icon }), p.name]
+ children: [/* @__PURE__ */ (0, F.jsx)(lU, { mark: p.icon }), p.name]
}) : null, u]
})]
})
@@ -57912,12 +57961,12 @@ function Sbe({ item: e, props: t, disabled: n }) {
}
// src/react/catalog-grid/catalog-grid-page.tsx
function oY(e) {
- let t = FM();
- if (e.mode === "items") return /* @__PURE__ */ (0, F.jsx)(wbe, { ...e });
- let n = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${IM(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
- return t === "list" && !e.wall ? /* @__PURE__ */ (0, F.jsx)(xbe, { ...e }, n) : /* @__PURE__ */ (0, F.jsx)(Tbe, { ...e }, n);
+ let t = HM();
+ if (e.mode === "items") return /* @__PURE__ */ (0, F.jsx)(Bbe, { ...e });
+ let n = e.mode === "entity" ? `entity:${e.entityKey || ""}:${e.revision}` : `catalog:${UM(e.filters || {}, !!e.excludeVertical)}:${e.batchSize || 60}:${e.revision}`;
+ return t === "list" && !e.wall ? /* @__PURE__ */ (0, F.jsx)(Lbe, { ...e }, n) : /* @__PURE__ */ (0, F.jsx)(Vbe, { ...e }, n);
}
-function Cbe({ name: e }) {
+function zbe({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
@@ -57940,8 +57989,8 @@ function sY({ children: e, selectMode: t }) {
children: e
});
}
-function wbe(e) {
- let { actions: t } = e, n = (0, P.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, F.jsx)(AG, {
+function Bbe(e) {
+ let { actions: t } = e, n = (0, P.useCallback)((e, n) => t.open(e, n), [t]), r = e.variant === "next" ? "next" : "grid", i = (e.items || []).map((i) => /* @__PURE__ */ (0, F.jsx)(zG, {
item: i,
variant: r,
layout: e.layout,
@@ -57960,8 +58009,8 @@ function wbe(e) {
children: i
});
}
-function Tbe(e) {
- let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? mce(e) : LM(e), [s] = (0, P.useState)(() => e.wall ? gce(o.queryKey) : void 0), c = s || (i && e.initial ? {
+function Vbe(e) {
+ let { helpers: t, actions: n, layout: r } = e, i = e.mode === "entity", a = !i && e.filters?.state === "trash", o = i ? Sce(e) : WM(e), [s] = (0, P.useState)(() => e.wall ? wce(o.queryKey) : void 0), c = s || (i && e.initial ? {
pages: [{
...e.initial,
items: e.initial.items || [],
@@ -57982,7 +58031,7 @@ function Tbe(e) {
(0, P.useEffect)(() => {
l.isPending || u.current || (u.current = !0, e.settled?.(e.revision));
}, [l.isPending]);
- let { tiles: d, pageStarts: f } = (0, P.useMemo)(() => vce(l.data?.pages || [], {
+ let { tiles: d, pageStarts: f } = (0, P.useMemo)(() => Ece(l.data?.pages || [], {
collapse: e.groupCollapse !== !1,
mix: !!e.mix && !a,
javImage: r.javImage
@@ -57992,7 +58041,7 @@ function Tbe(e) {
e.mix,
a,
r.javImage
- ]), p = d.reduce((e, t) => e + +(t.kind === "card"), 0), m = Number(l.data?.pages[0]?.total || 0), h = i || gK(e.filters), g = !a && !e.selectMode && !!n.wallPlayer && !!n.wallDetails, _ = d.flatMap((e) => e.kind === "card" && sK(e.item) ? [e.item] : []), v = a ? [] : LK(d.flatMap((e) => e.kind === "card" ? [e.item] : []), r.javImage), y = HW(l.isPending, e.skeletonHtml), b = (0, P.useRef)(null), x = Ebe(e, l.data, d, f, b);
+ ]), p = d.reduce((e, t) => e + +(t.kind === "card"), 0), m = Number(l.data?.pages[0]?.total || 0), h = i || L_e(e.filters), g = !a && !e.selectMode && !!n.wallPlayer && !!n.wallDetails, _ = d.flatMap((e) => e.kind === "card" && gK(e.item) ? [e.item] : []), v = a ? [] : LK(d.flatMap((e) => e.kind === "card" ? [e.item] : []), r.javImage), y = ZW(l.isPending, e.skeletonHtml), b = (0, P.useRef)(null), x = Hbe(e, l.data, d, f, b);
(0, P.useLayoutEffect)(() => {
if (!l.data) return;
let t = !0;
@@ -58019,12 +58068,12 @@ function Tbe(e) {
let C = (0, P.useCallback)((e, t) => n.open(e, t), [n]), w = (0, P.useCallback)((e, t) => n.openResource(e, t), [n]), T = (0, P.useCallback)((e) => n.openShort(e), [n]), E = (0, P.useCallback)(async () => {
let e = await l.fetchNextPage();
if (e.isFetchNextPageError) throw e.error;
- }, [l.fetchNextPage]), D = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, F.jsx)(Obe, {
+ }, [l.fetchNextPage]), D = (i) => i.kind === "mix" ? /* @__PURE__ */ (0, F.jsx)(Wbe, {
seed: i.seed,
layout: r,
helpers: t,
actions: n
- }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, F.jsx)(AG, {
+ }, `mix:${i.seed.id}`) : /* @__PURE__ */ (0, F.jsx)(zG, {
item: i.item,
grouped: e.groupCollapse !== !1,
variant: a && i.item.medium && i.item.medium !== "video" ? "resource" : "grid",
@@ -58044,16 +58093,16 @@ function Tbe(e) {
!e.wall && y.layer,
/* @__PURE__ */ (0, F.jsx)(RK, { assetIds: v }),
(() => {
- if (g && e.wall) return /* @__PURE__ */ (0, F.jsx)(A_e, {
- sessionKey: i ? `entity:${e.entityKey || ""}` : `catalog:${IM(e.filters || {}, !!e.excludeVertical)}`,
+ if (g && e.wall) return /* @__PURE__ */ (0, F.jsx)(K_e, {
+ sessionKey: i ? `entity:${e.entityKey || ""}` : `catalog:${UM(e.filters || {}, !!e.excludeVertical)}`,
items: _,
finite: h,
hasMore: !!l.hasNextPage,
busy: l.isFetchingNextPage,
loading: l.isPending || !l.data && l.isFetching,
- error: !l.data && !l.isPending ? tn(l.error) : "",
+ error: !l.data && !l.isPending ? _n(l.error) : "",
retry: () => void l.refetch(),
- emptyHtml: l.data && !_.length ? N_e({
+ emptyHtml: l.data && !_.length ? Y_e({
libraryEmpty: !!l.data.pages[0]?.libraryEmpty,
matches: m,
hasMore: !!l.hasNextPage,
@@ -58068,8 +58117,8 @@ function Tbe(e) {
javImage: r.javImage
}, h ? "finite" : "explore");
if (l.isPending) return null;
- if (!l.data) return /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(l.error),
+ if (!l.data) return /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(l.error),
onRetry: () => void l.refetch()
});
if (!d.length) {
@@ -58085,7 +58134,7 @@ function Tbe(e) {
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("div", {
"data-media-sections": "",
"data-select-mode": e.selectMode ? "" : void 0,
- children: xce(d, x).map((t) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(sY, { children: t.tiles.map(D) }), t.strip ? /* @__PURE__ */ (0, F.jsx)(Dbe, {
+ children: kce(d, x).map((t) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(sY, { children: t.tiles.map(D) }), t.strip ? /* @__PURE__ */ (0, F.jsx)(Ube, {
cut: t.strip,
props: e,
onOpen: T
@@ -58126,7 +58175,7 @@ function cY({ entity: e, load: t, enabled: n, children: r }) {
} catch (e) {
s.current = !0, i.current && l({
busy: !1,
- error: tn(e)
+ error: _n(e)
});
} finally {
o.current = !1;
@@ -58141,7 +58190,7 @@ function cY({ entity: e, load: t, enabled: n, children: r }) {
if (!e) return;
let t = new IntersectionObserver((e) => {
e.some((e) => e.isIntersecting) && d(!1);
- }, { rootMargin: VW });
+ }, { rootMargin: XW });
return a.current = t, t.observe(e), () => {
t.disconnect(), a.current = null;
};
@@ -58163,13 +58212,13 @@ function cY({ entity: e, load: t, enabled: n, children: r }) {
...p,
hidden: !!c.error,
onClick: () => void d(!0),
- dangerouslySetInnerHTML: { __html: Cs(Ss) }
- }), c.error ? /* @__PURE__ */ (0, F.jsx)(UW, {
+ dangerouslySetInnerHTML: { __html: Rs(Ls) }
+ }), c.error ? /* @__PURE__ */ (0, F.jsx)(QW, {
message: c.error,
onRetry: () => void d(!0)
}) : null] });
}
-function Ebe(e, t, n, r, i) {
+function Hbe(e, t, n, r, i) {
let [a, o] = (0, P.useState)([]), [s, c] = (0, P.useState)(null), l = (0, P.useRef)(0), u = (0, P.useRef)(0), d = (0, P.useRef)({
parts: /* @__PURE__ */ new Set(),
editions: /* @__PURE__ */ new Set()
@@ -58181,7 +58230,7 @@ function Ebe(e, t, n, r, i) {
let r = new AbortController();
f.current.push(r);
let i = n - 1;
- B(`/api/items?${bce(e.filters || {}, l.current)}`, r.signal).then((e) => {
+ B(`/api/items?${Oce(e.filters || {}, l.current)}`, r.signal).then((e) => {
let t = e.items || [];
t.length ? c({
page: i,
@@ -58193,9 +58242,9 @@ function Ebe(e, t, n, r, i) {
}, [t]), (0, P.useLayoutEffect)(() => {
if (!s) return;
c(null);
- let t = a.reduce((e, t) => Math.max(e, t.at), 0), u = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), f = u?.[u.length - 1], p = f ? Math.max(1, getComputedStyle(f).gridTemplateColumns.split(" ").length) : 1, m = Math.max(0, (r[s.page] ?? 0) - t), h = yce(n.length - t, m, p);
+ let t = a.reduce((e, t) => Math.max(e, t.at), 0), u = i.current?.querySelectorAll("[data-media-sections] > [data-media-grid]"), f = u?.[u.length - 1], p = f ? Math.max(1, getComputedStyle(f).gridTemplateColumns.split(" ").length) : 1, m = Math.max(0, (r[s.page] ?? 0) - t), h = Dce(n.length - t, m, p);
if (!h.length) return;
- let g = RM(s.items, d.current, e.groupCollapse !== !1);
+ let g = GM(s.items, d.current, e.groupCollapse !== !1);
if (l.current = s.more ? l.current + 18 : 0, !g.length) return;
let _ = t + (h[Math.floor(Math.random() * h.length)] ?? 0);
o((e) => [...e, {
@@ -58205,7 +58254,7 @@ function Ebe(e, t, n, r, i) {
}]);
}, [s]), a;
}
-function Dbe({ cut: e, props: t, onOpen: n }) {
+function Ube({ cut: e, props: t, onOpen: n }) {
let r = (0, P.useRef)(null), { wireDrag: i } = t;
return (0, P.useEffect)(() => {
r.current && i(r.current);
@@ -58221,12 +58270,12 @@ function Dbe({ cut: e, props: t, onOpen: n }) {
type: "button",
"data-shorts-enter": "",
onClick: () => t.actions.openShorts(),
- children: [/* @__PURE__ */ (0, F.jsx)(Cbe, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "进入沉浸模式" })]
+ children: [/* @__PURE__ */ (0, F.jsx)(zbe, { name: "gallery-vertical-end" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "进入沉浸模式" })]
})
] }), /* @__PURE__ */ (0, F.jsx)("div", {
ref: r,
"data-shorts-row": "",
- children: e.items.map((e) => /* @__PURE__ */ (0, F.jsx)(AG, {
+ children: e.items.map((e) => /* @__PURE__ */ (0, F.jsx)(zG, {
item: e,
variant: "short",
layout: t.layout,
@@ -58242,16 +58291,16 @@ function Dbe({ cut: e, props: t, onOpen: n }) {
});
}
function lY(e, t, n) {
- return oo(e, t.active && e.is_jav ? t.size : "small", n, t.javImage);
+ return So(e, t.active && e.is_jav ? t.size : "small", n, t.javImage);
}
-function Obe({ seed: e, layout: t, helpers: n, actions: r }) {
+function Wbe({ seed: e, layout: t, helpers: n, actions: r }) {
let i = (0, P.useRef)(/* @__PURE__ */ new Map()), a = (0, P.useRef)(t);
a.current = t;
- let o = po(e, n.tagLabel), s = (0, P.useCallback)(async () => {
- let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => zM(e, t.javImage)).slice(0, 9);
+ let o = Oo(e, n.tagLabel), s = (0, P.useCallback)(async () => {
+ let t = a.current, n = [e, ...await r.mixRelated(e.id)].filter((e) => KM(e, t.javImage)).slice(0, 9);
return i.current = new Map(n.map((e) => [String(e.id), lY(e, t, !0).html])), n.map((e) => String(e.id));
}, [e, r]), c = t.active && e.is_jav ? t.size : "small", l = lY(e, t, !1);
- return /* @__PURE__ */ (0, F.jsx)(BG, {
+ return /* @__PURE__ */ (0, F.jsx)(YG, {
"data-mix-seed": String(e.id),
name: `Mix · ${o}`,
caption: `${n.displayName(e, e.name || "")}及相似作品`,
@@ -58265,8 +58314,8 @@ function Obe({ seed: e, layout: t, helpers: n, actions: r }) {
...t,
size: "small"
}, !1).html,
- relayoutArt: (e) => Sl(e, c),
- ratio: xG(e, "grid", t),
+ relayoutArt: (e) => Ll(e, c),
+ ratio: AG(e, "grid", t),
flipImages: s,
faceHtml: (e) => i.current.get(e) || "",
canFlip: r.canFlip,
@@ -58279,35 +58328,35 @@ function Obe({ seed: e, layout: t, helpers: n, actions: r }) {
// src/react/media-sources.ts
async function uY(e) {
await H.fetchQuery({
- queryKey: er,
- queryFn: () => tr(e)
+ queryKey: hr,
+ queryFn: () => gr(e)
});
}
-var kbe = (e) => (e?.sources ?? []).filter((e) => Qt.includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), Abe = "/api/duplicates?limit=120", dY = ["duplicates"], fY = "/api/batch", pY = (e) => B(Abe, e), jbe = /[\s\-_.()[\]【】/\\]/;
-function Mbe(e) {
+var Gbe = (e) => (e?.sources ?? []).filter((e) => mn.includes(e.location) && (e.roots === void 0 || e.roots.length > 0)).map((e) => e.location), Kbe = "/api/duplicates?limit=120", dY = ["duplicates"], fY = "/api/batch", pY = (e) => B(Kbe, e), qbe = /[\s\-_.()[\]【】/\\]/;
+function Jbe(e) {
if (e.length < 2) return "";
let t = 0, n = e[0];
for (; t < n.length && e.every((e) => e[t] === n[t]);) t += 1;
e.some((e) => e.length <= t) && (t = Math.max(0, t - 1));
let r = t;
- for (; r > 0 && !jbe.test(n[r - 1]);) --r;
+ for (; r > 0 && !qbe.test(n[r - 1]);) --r;
return r >= 8 ? n.slice(0, r) : "";
}
-var Nbe = (e, t) => t && e.startsWith(t) && e.length > t.length ? `…${e.slice(t.length)}` : e;
-async function Pbe(e) {
+var Ybe = (e, t) => t && e.startsWith(t) && e.length > t.length ? `…${e.slice(t.length)}` : e;
+async function Xbe(e) {
await Promise.all([H.fetchQuery({
queryKey: dY,
queryFn: () => pY(e)
}), uY(e)]);
}
-var Fbe = {
+var Zbe = {
largest: "最大的一个",
longest: "最长的一个",
115: "115(没有则留最大)",
pikpak: "PikPak(没有则留最大)",
all: "零个文件"
-}, Ibe = (e, t) => t.filter((t) => e.some((e) => e.location === t)), mY = (e, t) => Ibe(e, t).filter((t) => e.some((e) => e.location !== t)), Lbe = (e, t) => t.filter((t) => e.some((e) => mY(e.files, [t]).length));
-function Rbe(e, t) {
+}, Qbe = (e, t) => t.filter((t) => e.some((e) => e.location === t)), mY = (e, t) => Qbe(e, t).filter((t) => e.some((e) => e.location !== t)), $be = (e, t) => t.filter((t) => e.some((e) => mY(e.files, [t]).length));
+function exe(e, t) {
let n = [];
for (let r of e) {
if (t === "all") {
@@ -58326,11 +58375,11 @@ function Rbe(e, t) {
}
return n;
}
-function zbe(e, t) {
+function txe(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 Bbe(e, t) {
+async function nxe(e, t) {
for (let n = 0; n < e.length; n += 200) await V(fY, {
ids: e.slice(n, n + 200),
operation: t,
@@ -58338,7 +58387,7 @@ async function Bbe(e, t) {
});
}
// src/react/media-repair/media-repair.ts
-var hY = "/api/media-repair", gY = ["media-repair"], _Y = ["media-repair", "libraries"], Vbe = {
+var hY = "/api/media-repair", gY = ["media-repair"], _Y = ["media-repair", "libraries"], rxe = {
status: "idle",
library: "",
stage: "",
@@ -58351,7 +58400,7 @@ var hY = "/api/media-repair", gY = ["media-repair"], _Y = ["media-repair", "libr
skipped: 0,
message: ""
}, vY = (e) => B(hY, e), yY = async (e) => (await B("/api/libraries", e)).libraries || [];
-async function Hbe(e) {
+async function ixe(e) {
await Promise.all([H.fetchQuery({
queryKey: gY,
queryFn: () => vY(e)
@@ -58361,28 +58410,28 @@ async function Hbe(e) {
})]);
}
var bY = (e) => Number(e).toLocaleString();
-function Ube(e) {
+function axe(e) {
if (e.status === "running") {
let t = e.total ? `${bY(Math.min(e.checked || 0, e.total))} / ${bY(e.total)}` : "准备中";
return e.stage === "修复" && e.message ? `修复 ${t} · ${e.message}` : `${e.stage || "扫描"} ${t}`;
}
return e.status === "complete" && (e.repaired || e.failed) ? e.failed ? `修好 ${bY(e.repaired)} 部,${bY(e.failed)} 部修不了` : `修好 ${bY(e.repaired)} 部` : "";
}
-var Wbe = (e) => `${bY(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, Gbe = "/api/quality-goals?limit=200", xY = ["quality-goals"], SY = (e) => B(Gbe, e);
-async function Kbe(e) {
+var oxe = (e) => `${bY(e.missing_tool)} 部缺索引的片子要装上 untrunc 才修得了,下载入口在配置页的「运行信息」里。`, sxe = "/api/quality-goals?limit=200", xY = ["quality-goals"], SY = (e) => B(sxe, e);
+async function cxe(e) {
await H.fetchQuery({
queryKey: xY,
queryFn: () => SY(e)
});
}
-var qbe = (e) => e.has_cover ? Wa(e) : `/poster?id=${e.id}&c=4`;
+var lxe = (e) => e.has_cover ? ao(e) : `/poster?id=${e.id}&c=4`;
// src/selection.ts
function CY(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;
}
// src/react/review/review.ts
-var Jbe = "/api/review", Ybe = "/api/review/decision", Xbe = "/api/review/genre", wY = ["review"], TY = {
+var uxe = "/api/review", dxe = "/api/review/decision", fxe = "/api/review/genre", wY = ["review"], TY = {
metadata_fields: "元数据字段",
creator_tags: "创作者标签",
studio_logos: "厂牌 Logo",
@@ -58392,7 +58441,7 @@ var Jbe = "/api/review", Ybe = "/api/review/decision", Xbe = "/api/review/genre"
fc2_markings: "FC2 评论标记",
fc2_similarity: "FC2 跨号相似",
video_endcards: "片尾/出处证据"
-}, Zbe = Object.keys(TY), Qbe = "metadata_fields", EY = (e) => typeof e == "string" && Object.hasOwn(TY, e), $be = {
+}, pxe = Object.keys(TY), mxe = "metadata_fields", EY = (e) => typeof e == "string" && Object.hasOwn(TY, e), hxe = {
creator_tags: "creator",
western_identity: "creator"
}, DY = [
@@ -58403,7 +58452,7 @@ var Jbe = "/api/review", Ybe = "/api/review/decision", Xbe = "/api/review/genre"
pending: "待处理",
later: "稍后处理",
ignored: "已忽略"
-}, exe = {
+}, gxe = {
approved: "已通过",
rejected: "已忽略",
skipped: "稍后处理"
@@ -58411,7 +58460,7 @@ var Jbe = "/api/review", Ybe = "/api/review/decision", Xbe = "/api/review/genre"
sections: e.sections,
counts: e.counts
} : e.queues[t];
-function txe(e, t) {
+function _xe(e, t) {
return {
...e,
...t(AY(e, "pending")),
@@ -58421,7 +58470,7 @@ function txe(e, t) {
}
};
}
-function nxe(e, t) {
+function vxe(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;
}
@@ -58442,43 +58491,43 @@ function jY(e, t) {
}
return [...n.values()];
}
-function rxe(e, t, n) {
+function yxe(e, t, n) {
return n && jY(e, t).find((e) => e.key === n)?.rows || e;
}
-function ixe(e, t) {
- let n = Zn(e.length, 20), r = Qn(t, n);
+function bxe(e, t) {
+ let n = fr(e.length, 20), r = pr(t, n);
return {
page: r,
pages: n,
rows: e.slice((r - 1) * 20, r * 20)
};
}
-function axe(e) {
+function xxe(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 oxe(e, t, n, r, i, a) {
+function Sxe(e, t, n, r, i, a) {
return CY(e, t, n, r, i, a);
}
-function sxe(e, t) {
+function Cxe(e, t) {
return e === "metadata_fields" ? (t.candidates?.length || 0) > 0 : e !== "creator_tags" || String(t.status || "").trim() === "candidate";
}
function MY(e, t) {
return String(e === "metadata_fields" ? t.query || t.code || "" : t.creator || t.studio || t.current_name || t.name || t.item_key);
}
var NY = (e, t) => e === "metadata_fields" ? String(t.field_label || t.field || "").trim() : "";
-function cxe(e, t) {
+function wxe(e, t) {
let n = MY(e, t), r = NY(e, t);
return r ? `${n} · ${r}` : n;
}
-var lxe = (e) => e.reason || e.evidence || e.note || e.decision_note || "", uxe = (e) => String(e.tags || "").split("|").filter(Boolean), dxe = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
-function fxe(e) {
+var Txe = (e) => e.reason || e.evidence || e.note || e.decision_note || "", Exe = (e) => String(e.tags || "").split("|").filter(Boolean), Dxe = (e) => [...new Set((e.candidates || []).flatMap((e) => e.unmapped_genres || []))];
+function Oxe(e) {
let t = e.candidates || [];
return {
candidateKey: t.length === 1 ? t[0].candidate_key : "",
assets: (e.preview_assets || []).map((e) => e.id)
};
}
-function pxe(e, t, n, r) {
+function kxe(e, t, n, r) {
let i = !!t.asset_path && t.asset_mutation_revision != null;
return {
category: e,
@@ -58494,22 +58543,22 @@ function pxe(e, t, n, r) {
...i ? { expected_revision: t.asset_mutation_revision } : {}
};
}
-var mxe = (e) => ({
+var Axe = (e) => ({
approved: "已通过资料",
rejected: "已忽略资料",
skipped: "已移至稍后处理",
restore: "已恢复待处理"
})[e];
async function PY(e) {
- let t = await B(Jbe, e);
+ let t = await B(uxe, e);
for (let e of ["later", "ignored"]) if (!t.queues?.[e]?.sections || !t.queues[e].counts) throw Error(`${OY[e]}状态未取得,请刷新或更新写入端`);
return t;
}
-async function hxe(e) {
- let t = await V(Ybe, e);
+async function jxe(e) {
+ let t = await V(dxe, e);
if (t.ok && t.asset_revisions) {
let e = t.asset_revisions;
- H.setQueryData(wY, (t) => t && txe(t, (t) => ({
+ H.setQueryData(wY, (t) => t && _xe(t, (t) => ({
...t,
sections: {
...t.sections,
@@ -58525,21 +58574,21 @@ async function hxe(e) {
}
return t;
}
-function gxe(e, t) {
+function Mxe(e, t) {
let n = H.getQueryData(wY);
return n && DY.flatMap((t) => AY(n, t).sections[e] || []).find((e) => e.item_key === t.item_key) || t;
}
-var _xe = (e, t) => V(Xbe, {
+var Nxe = (e, t) => V(fxe, {
genre: e,
tag: t
});
-async function vxe(e) {
+async function Pxe(e) {
await H.fetchQuery({
queryKey: wY,
queryFn: () => PY(e)
});
}
-function yxe(e, t, n) {
+function Fxe(e, t, n) {
let r = new Set(t);
r.size && H.setQueryData(wY, (t) => {
if (!t) return t;
@@ -58578,15 +58627,15 @@ function yxe(e, t, n) {
};
});
}
-var bxe = () => H.invalidateQueries({
+var Ixe = () => H.invalidateQueries({
queryKey: wY,
exact: !0
});
-function xxe(e, t) {
- return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${ir(e.fetched_at)} 的缓存` : e?.error || t;
+function Lxe(e, t) {
+ return e?.state === "live" ? "正在显示写入端的实时复核队列" : e?.state === "cached" ? `写入端暂时不可达,显示 ${yr(e.fetched_at)} 的缓存` : e?.error || t;
}
// src/react/data-cleanup/links.ts
-var Sxe = "/api/links", FY = "/api/links/check", IY = "/api/links/prune", LY = ["links"], RY = ["links", "check"], zY = ["links", "prune"], Cxe = {
+var Rxe = "/api/links", FY = "/api/links/check", IY = "/api/links/prune", LY = ["links"], RY = ["links", "check"], zY = ["links", "prune"], zxe = {
official: "官网/事务所",
social: "社交账号",
catalog: "作品资料站",
@@ -58597,22 +58646,22 @@ async function BY(e) {
if (t.ok === !1) throw Error(t.error || "操作未完成,请重试");
return t;
}
-var VY = (e) => B(Sxe, e), HY = (e) => V(FY, { status_only: !0 }, "POST", e), wxe = ({ retry: e, checkId: t }) => BY(V(FY, e ? {
+var VY = (e) => B(Rxe, e), HY = (e) => V(FY, { status_only: !0 }, "POST", e), Bxe = ({ retry: e, checkId: t }) => BY(V(FY, e ? {
retry: e,
check_id: t
-} : { restart: !0 })), UY = (e) => B(IY, e), Txe = ({ checkId: e, ids: t }) => BY(V(IY, {
+} : { restart: !0 })), UY = (e) => B(IY, e), Vxe = ({ checkId: e, ids: t }) => BY(V(IY, {
confirm: !0,
check_id: e,
background: !0,
...t ? { ids: t } : {}
-})), WY = (e) => Number(e || 0).toLocaleString(), Exe = (e) => `已删除 ${WY(e.removed)} 条;${e.marked ? `已隐退女优的 ${WY(e.marked)} 条留作不可点的记录;` : ""}保留 ${WY(e.recovered)} 条未确认失效的链接。`;
-function Dxe(e) {
+})), WY = (e) => Number(e || 0).toLocaleString(), Hxe = (e) => `已删除 ${WY(e.removed)} 条;${e.marked ? `已隐退女优的 ${WY(e.marked)} 条留作不可点的记录;` : ""}保留 ${WY(e.recovered)} 条未确认失效的链接。`;
+function Uxe(e) {
let t = e.scope === "retry";
return e.total ? `${t ? "已重验" : "已检查"} ${WY(e.checked)} / ${WY(e.total)} 条链接` : t ? "正在重验链接" : "正在检查链接";
}
// src/configuration-endpoints.ts
-var GY = "/api/configuration", KY = "/api/pick-folder", qY = "/api/settings", JY = "/api/follow/schedule", YY = "/api/feeds/schedule", XY = "/api/thumbnail-jobs", ZY = ["settings"], QY = ["follow-schedule"], $Y = ["feed-schedule"], eX = ["thumbnail-jobs"], tX = "/api/media-processing", Oxe = ["media-processing"], kxe = (e) => B(tX, e), nX = (e) => B(qY, e), Axe = (e) => B(JY, e), jxe = (e) => B(YY, e), Mxe = (e) => B(XY, e);
-function Nxe(e = H) {
+var GY = "/api/configuration", KY = "/api/pick-folder", qY = "/api/settings", JY = "/api/follow/schedule", YY = "/api/feeds/schedule", XY = "/api/thumbnail-jobs", ZY = ["settings"], QY = ["follow-schedule"], $Y = ["feed-schedule"], eX = ["thumbnail-jobs"], tX = "/api/media-processing", Wxe = ["media-processing"], Gxe = (e) => B(tX, e), nX = (e) => B(qY, e), Kxe = (e) => B(JY, e), qxe = (e) => B(YY, e), Jxe = (e) => B(XY, e);
+function Yxe(e = H) {
return e.fetchQuery({
queryKey: ZY,
queryFn: ({ signal: e }) => nX(e),
@@ -58625,7 +58674,7 @@ function rX() {
onSuccess: (e) => H.setQueryData(ZY, e)
});
}
-function Pxe() {
+function Xxe() {
return Ft({
mutationFn: (e) => V(JY, {
enabled: e > 0,
@@ -58634,7 +58683,7 @@ function Pxe() {
onSuccess: (e) => H.setQueryData(QY, e)
});
}
-var Fxe = {
+var Zxe = {
follow: {
url: `${JY}/run`,
key: QY
@@ -58644,36 +58693,36 @@ var Fxe = {
key: $Y
}
};
-function Ixe(e) {
- let { url: t, key: n } = Fxe[e];
+function Qxe(e) {
+ let { url: t, key: n } = Zxe[e];
return Ft({
mutationFn: () => V(t, {}),
onSuccess: (e) => H.setQueryData(n, e)
});
}
-var Lxe = (e) => e?.running ? 3e3 : !1;
-function Rxe() {
+var $xe = (e) => e?.running ? 3e3 : !1;
+function eSe() {
return Ft({
mutationFn: (e) => V(XY, { mode: e }),
onSuccess: (e) => H.setQueryData(eX, e)
});
}
// src/react/data-cleanup/organize.ts
-var zxe = "/api/organize", Bxe = "/api/organize/preview", Vxe = "/api/organize/apply", Hxe = "/api/organize/rollback", iX = ["organize"], Uxe = "/api/organize/example", Wxe = (e, t, n) => B(`${Uxe}?${new URLSearchParams({
+var tSe = "/api/organize", nSe = "/api/organize/preview", rSe = "/api/organize/apply", iSe = "/api/organize/rollback", iX = ["organize"], aSe = "/api/organize/example", oSe = (e, t, n) => B(`${aSe}?${new URLSearchParams({
file_template: e,
dir_template: t
-})}`, n), aX = (e) => B(zxe, e);
-async function Gxe(e) {
+})}`, n), aX = (e) => B(tSe, e);
+async function sSe(e) {
await H.fetchQuery({
queryKey: iX,
queryFn: () => aX(e)
});
}
-var Kxe = (e) => V(Bxe, e), qxe = (e) => V(KY, { initial: e }), Jxe = (e) => e.kind === "apply" ? V(Vxe, {
+var cSe = (e) => V(nSe, e), lSe = (e) => V(KY, { initial: e }), uSe = (e) => e.kind === "apply" ? V(rSe, {
...e.request,
confirm: !0
-}) : V(Hxe, { confirm: !0 });
-async function Yxe(e) {
+}) : V(iSe, { confirm: !0 });
+async function dSe(e) {
H.setQueryData(iX, (t) => t && {
...t,
templates: e
@@ -58682,20 +58731,20 @@ async function Yxe(e) {
await V(qY, { organizeTemplates: e });
} catch {}
}
-var Xxe = (e, t) => e && {
+var fSe = (e, t) => e && {
...e,
...t
-}, Zxe = /目录模板|分隔符|盘符|`\.`/;
-function Qxe(e) {
+}, pSe = /目录模板|分隔符|盘符|`\.`/;
+function mSe(e) {
let t = String(e || "");
return t.slice(Math.max(t.lastIndexOf("\\"), t.lastIndexOf("/")) + 1);
}
var oX = (e) => Number(e || 0).toLocaleString();
-function $xe(e) {
+function hSe(e) {
let t = Object.entries(e.reasons || {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => `${e} ${oX(t)}`).join(" · ");
return Number(e.counts?.change || 0) ? `${oX(e.counts.change)} 个文件会改名或移动,${oX(e.counts.unchanged)} 个已经就是目标名字${t ? `;跳过 ${t}` : ""}。` : `没有要改的文件。${t ? `跳过:${t}。` : ""}`;
}
-function eSe(e) {
+function gSe(e) {
let t = e.restored !== void 0, n = Number(e.failed || 0), r = Number(t ? e.restored : e.moved || 0);
return {
text: t ? `已退回 ${oX(r)} 个文件${n ? `,${oX(n)} 行未能退回` : ""}。` : `已整理 ${oX(r)} 个文件${n ? `,${oX(n)} 行未能处理` : ""}。`,
@@ -58704,37 +58753,37 @@ function eSe(e) {
};
}
// src/react/data-cleanup/orphan-records.ts
-var tSe = "/api/orphan-records", nSe = "/api/orphan-records/attach", sX = ["orphan-records"], rSe = [
+var _Se = "/api/orphan-records", vSe = "/api/orphan-records/attach", sX = ["orphan-records"], ySe = [
["asset_preference", "喜欢与理由"],
["watch_queue", "稍后看"],
["playlist_item", "播放列表"],
["asset_quality_goal", "寻找更好版本"],
["activity_event", "观看历史"],
["asset_tag_preference", "隐藏标签"]
-], cX = (e) => B(tSe, e), iSe = (e, t) => V(nSe, {
+], cX = (e) => B(_Se, e), bSe = (e, t) => V(vSe, {
id: e,
target: t
-}), aSe = (e) => V(fY, {
+}), xSe = (e) => V(fY, {
ids: Array.isArray(e) ? e : [e],
operation: "delete"
-}), oSe = (e) => [
+}), SSe = (e) => [
e.rating ? `评分 ${e.rating}` : "",
e.play_count ? `播放 ${Number(e.play_count).toLocaleString()} 次` : e.last_played ? "播放过" : "",
e.o_count ? `高潮 ${Number(e.o_count).toLocaleString()} 次` : ""
-], sSe = (e) => [...rSe.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...oSe(e)].filter(Boolean).join(" · "), cSe = (e) => e ? `${Math.round(e / 60)} 分钟` : "", lSe = (e) => [e.name, cSe(e.duration)].filter(Boolean).join(" · "), lX = "/api/resource-sync/scan", uX = "/api/resource-sync/apply", dX = ["resource-sync", "scan"], fX = ["resource-sync", "apply"], pX = (e) => V(lX, {
+], CSe = (e) => [...ySe.filter(([t]) => e[t]).map(([t, n]) => `${n} ${Number(e[t]).toLocaleString()}`), ...SSe(e)].filter(Boolean).join(" · "), wSe = (e) => e ? `${Math.round(e / 60)} 分钟` : "", TSe = (e) => [e.name, wSe(e.duration)].filter(Boolean).join(" · "), lX = "/api/resource-sync/scan", uX = "/api/resource-sync/apply", dX = ["resource-sync", "scan"], fX = ["resource-sync", "apply"], pX = (e) => V(lX, {
background: !0,
status_only: !0
-}, "POST", e), uSe = () => V(lX, {
+}, "POST", e), ESe = () => V(lX, {
background: !0,
restart: !0
-}), mX = (e) => B(uX, e), dSe = (e) => V(uX, {
+}), mX = (e) => B(uX, e), DSe = (e) => V(uX, {
confirm: !0,
clean_cache: !0,
scan_id: e,
background: !0
-}), hX = (e) => (e?.sources ?? []).some((e) => Zt.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
-async function fSe(e) {
- hX(H.getQueryData(er)) && await Promise.all([H.fetchQuery({
+}), hX = (e) => (e?.sources ?? []).some((e) => pn.includes(e.location) && Array.isArray(e.roots) && e.roots.length > 0);
+async function OSe(e) {
+ hX(H.getQueryData(hr)) && await Promise.all([H.fetchQuery({
queryKey: dX,
queryFn: () => pX(e)
}), H.fetchQuery({
@@ -58742,12 +58791,12 @@ async function fSe(e) {
queryFn: () => mX(e)
})]);
}
-var pSe = (e) => !!(e?.missing || e?.empty || e?.cache?.files), gX = (e) => Number(e || 0).toLocaleString(), mSe = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", _X = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), vX = (e) => e.vanish ? `${gX(e.vanish)} 条作品记录的文件已丢失,个人记录保留,可在「文件已丢失的记录」中转移个人记录或删除记录。` : "", yX = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", hSe = (e) => `将永久删除文件已不在盘上的 ${gX(_X(e))} 条记录和 ${gX(e.empty)} 个空文件夹,并清理 ${gX(e.cache?.files)} 个闲置缓存。${yX(e)}${vX(e)}`, gSe = (e) => `将永久删除文件已不在盘上的 ${gX(_X(e))} 条记录(含回收站里的)、${gX(e.empty)} 个空文件夹,并清理 ${gX(e.cache?.files)} 个闲置缓存。来源根目录保留。${yX(e)}${vX(e)}`, _Se = (e) => e.online ? [
+var kSe = (e) => !!(e?.missing || e?.empty || e?.cache?.files), gX = (e) => Number(e || 0).toLocaleString(), _X = (e) => e.total_sources ? `已扫描 ${e.completed_sources || 0}/${e.total_sources} 个来源` : "正在扫描来源", vX = (e) => e.purge ?? Number(e.missing || 0) - Number(e.vanish || 0), yX = (e) => e.vanish ? `${gX(e.vanish)} 条作品记录的文件已丢失,个人记录保留,可在「文件已丢失的记录」中转移个人记录或删除记录。` : "", bX = (e) => e.vanish ? "这几样不可撤销。" : "这一步不可撤销。", ASe = (e) => `将永久删除文件已不在盘上的 ${gX(vX(e))} 条记录和 ${gX(e.empty)} 个空文件夹,并清理 ${gX(e.cache?.files)} 个闲置缓存。${bX(e)}${yX(e)}`, jSe = (e) => `将永久删除文件已不在盘上的 ${gX(vX(e))} 条记录(含回收站里的)、${gX(e.empty)} 个空文件夹,并清理 ${gX(e.cache?.files)} 个闲置缓存。来源根目录保留。${bX(e)}${yX(e)}`, MSe = (e) => e.online ? [
`找不到文件 · 共 ${gX(e.total)} 项`,
e.vanish ? `${gX(e.vanish)} 项带个人记录` : "",
e.empty ? `空文件夹 ${gX(e.empty)} 个` : ""
].filter(Boolean).join(" · ") : `馆藏中有 ${gX(e.total)} 项`;
-function bX(e) {
+function xX(e) {
let t = e.blocked ?? [], n = Number(e.dir_errors || 0), r = e.cache_blocked ?? [], i = Number(e.purged || 0) + Number(e.vanished || 0) + Number(e.reattached || 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,
@@ -58759,43 +58808,43 @@ function bX(e) {
].filter(Boolean).join(",")
};
}
-var vSe = (e, t) => {
- let { rest: n } = bX(e), r = `已永久删除 ${gX(e.purged)} 条失效记录和 ${gX(e.dirs_removed)} 个空文件夹,清理 ${gX(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${gX(e.vanished)} 条作品记录已标为文件丢失,可在「文件已丢失的记录」中处理。` : "") + (e.reattached ? `${gX(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
+var NSe = (e, t) => {
+ let { rest: n } = xX(e), r = `已永久删除 ${gX(e.purged)} 条失效记录和 ${gX(e.dirs_removed)} 个空文件夹,清理 ${gX(e.cache_removed)} 个缓存,释放 ${t(e.bytes_reclaimed || 0)}。` + (e.vanished ? `${gX(e.vanished)} 条作品记录已标为文件丢失,可在「文件已丢失的记录」中处理。` : "") + (e.reattached ? `${gX(e.reattached)} 条的记录已接到库里的另一个版本。` : "");
return n ? `${r}${n},重新检查后可再试。` : r;
-}, ySe = "/api/review?counts=1", xX = ["review", "counts"], bSe = "/api/ads?limit=1", SX = ["junk-summary"], CX = "/api/items?state=trash&limit=1", wX = ["trash-summary"], xSe = [
+}, PSe = "/api/review?counts=1", SX = ["review", "counts"], FSe = "/api/ads?limit=1", CX = ["junk-summary"], wX = "/api/items?state=trash&limit=1", TX = ["trash-summary"], ISe = [
["video", "视频"],
["image", "图片"],
["archive", "压缩包"],
["audio", "音频"],
["url", "网址"],
["other", "其它"]
-], TX = (e) => B(ySe, e), EX = (e) => B(bSe, e), DX = (e) => {
+], EX = (e) => B(PSe, e), DX = (e) => B(FSe, e), OX = (e) => {
let t = sessionStorage.getItem("peach.library");
- return B(t ? `${CX}&library=${encodeURIComponent(t)}` : CX, e);
-}, OX = (e) => Number(e || 0).toLocaleString();
-function SSe(e) {
+ return B(t ? `${wX}&library=${encodeURIComponent(t)}` : wX, e);
+}, kX = (e) => Number(e || 0).toLocaleString();
+function LSe(e) {
let t = TY, 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 CSe(e) {
+function RSe(e) {
if (!e) return "";
- let t = xSe.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${OX(e.counts[t])}`);
- return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${OX(e.dismissed_total)}`), t.join(" · ");
+ let t = ISe.filter(([t]) => Number(e.counts?.[t]) > 0).map(([t, n]) => `${n} ${kX(e.counts[t])}`);
+ return Number(e.dismissed_total) > 0 && t.push(`已忽略 ${kX(e.dismissed_total)}`), t.join(" · ");
}
-var wSe = [
- [xX, ({ signal: e }) => TX(e)],
+var zSe = [
+ [SX, ({ signal: e }) => EX(e)],
[xY, ({ signal: e }) => SY(e)],
- [wX, ({ signal: e }) => DX(e)],
+ [TX, ({ signal: e }) => OX(e)],
[LY, ({ signal: e }) => VY(e)],
[RY, ({ signal: e }) => HY(e)],
[zY, ({ signal: e }) => UY(e)],
[sX, ({ signal: e }) => cX(e)]
];
-async function TSe(e) {
- let t = !!location.hash, n = wSe.map(([n, r]) => {
+async function BSe(e) {
+ let t = !!location.hash, n = zSe.map(([n, r]) => {
if (t) return H.fetchQuery({
queryKey: n,
queryFn: () => r({ signal: e })
@@ -58808,22 +58857,22 @@ async function TSe(e) {
await Promise.all([
...n,
H.fetchQuery({
- queryKey: SX,
- queryFn: () => EX(e)
+ queryKey: CX,
+ queryFn: () => DX(e)
}),
H.fetchQuery({
queryKey: dY,
queryFn: () => pY(e)
}),
- uY(e).then(() => fSe(e)),
- CH(e),
- Hbe(e),
- Gxe(e)
+ uY(e).then(() => OSe(e)),
+ kH(e),
+ ixe(e),
+ sSe(e)
]);
}
// src/react/feed-new/feed-new.ts
-var kX = (e) => ["feed-new", e ?? "home"], ESe = 8, DSe = 1500;
-function OSe(e, t, n) {
+var AX = (e) => ["feed-new", e ?? "home"], VSe = 8, HSe = 1500;
+function USe(e, t, n) {
let r = document.createElement("template");
r.innerHTML = e;
let i = [...r.content.querySelectorAll("img[src]")].slice(0, t).map((e) => {
@@ -58834,33 +58883,33 @@ function OSe(e, t, n) {
setTimeout(e, n);
})]);
}
-async function kSe(e, t, n) {
- let r = new URLSearchParams({ limit: String(vA().value.feedLimit) });
+async function WSe(e, t, n) {
+ let r = new URLSearchParams({ limit: String(CA().value.feedLimit) });
e && r.set("entity", String(e));
- let i = await on(`/api/feeds/discoveries?${r}`).catch(() => null), a = i && !i.error ? i : null, o = a?.items || [], s = t(a);
- return n && o.length && await OSe(s, ESe, DSe), {
+ let i = await xn(`/api/feeds/discoveries?${r}`).catch(() => null), a = i && !i.error ? i : null, o = a?.items || [], s = t(a);
+ return n && o.length && await USe(s, VSe, HSe), {
items: o,
html: s,
fetching: o.some((e) => e.cover_fetching && !e.has_cover)
};
}
-var AX = (e, t, n = !1) => ({
- queryKey: kX(e),
- queryFn: () => kSe(e, t, n),
+var jX = (e, t, n = !1) => ({
+ queryKey: AX(e),
+ queryFn: () => WSe(e, t, n),
staleTime: Infinity,
refetchInterval: (e) => e.state.data?.fetching ? 2e3 : !1
-}), jX = (e, t) => on("/api/feeds/discovery", {
+}), MX = (e, t) => xn("/api/feeds/discovery", {
method: "POST",
body: JSON.stringify({
action: t,
ids: [e]
})
}).then(() => void 0, () => void 0);
-async function ASe(e) {
- H.removeQueries({ queryKey: kX(null) }), await H.fetchQuery(AX(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
+async function GSe(e) {
+ H.removeQueries({ queryKey: AX(null) }), await H.fetchQuery(jX(null, e.helpers.feedRowHtml, e.host.getAttribute("aria-busy") === "true"));
}
// src/react/entity-page/entity-page.ts
-var MX = [
+var NX = [
"loc",
"creator",
"tag",
@@ -58874,52 +58923,52 @@ var MX = [
"browse",
"folder",
"folder_recursive"
-], NX = {
+], PX = {
media: "videos",
set: 0
-}, PX = (e, t) => [
+}, FX = (e, t) => [
"entity",
e,
t
-], jSe = (e, t, n, r) => [
+], KSe = (e, t, n, r) => [
"entity-items",
e,
t,
n,
r
-], FX = (e, t, n, r) => [
+], IX = (e, t, n, r) => [
"entity-photos",
e,
t,
n,
r
-], IX = (e) => String(e || "").split(",").filter(Boolean), MSe = (e, t) => IX(e).includes(t);
-function LX(e, t, n, r, i = 0) {
+], LX = (e) => String(e || "").split(",").filter(Boolean), qSe = (e, t) => LX(e).includes(t);
+function RX(e, t, n, r, i = 0) {
let a = new URLSearchParams();
- a.set(e, t), e === "tag" && (a.set("tag", [.../* @__PURE__ */ new Set([t, ...IX(n.tag)])].join(",")), a.set("tag_match", "all")), a.set("limit", "48"), a.set("offset", String(i)), a.set("sort", n.sort || "new"), n.dir && a.set("dir", n.dir), n.sort === "seed" && a.set("seed", r.seed), i && a.set("count", "0");
- for (let t of MX) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
+ a.set(e, t), e === "tag" && (a.set("tag", [.../* @__PURE__ */ new Set([t, ...LX(n.tag)])].join(",")), a.set("tag_match", "all")), a.set("limit", "48"), a.set("offset", String(i)), a.set("sort", n.sort || "new"), n.dir && a.set("dir", n.dir), n.sort === "seed" && a.set("seed", r.seed), i && a.set("count", "0");
+ for (let t of NX) n[t] && t !== e && t !== "sort" && a.set(t, n[t]);
return r.jav && a.set("jav", "1"), a;
}
-async function RX(e, t, n, r, i, a, o) {
- let s = LX(e, t, n, r, i);
- return o && (s.set("limit", String(o.limit)), s.delete("count"), o.sort && s.set("sort", o.sort), o.dir && s.set("dir", o.dir)), await on(`/api/items?${s}`, a ? { signal: a } : {});
+async function zX(e, t, n, r, i, a, o) {
+ let s = RX(e, t, n, r, i);
+ return o && (s.set("limit", String(o.limit)), s.delete("count"), o.sort && s.set("sort", o.sort), o.dir && s.set("dir", o.dir)), await xn(`/api/items?${s}`, a ? { signal: a } : {});
}
-var zX = (e) => {
+var BX = (e) => {
let t = {
jav: e.jav,
seed: e.seed
- }, n = LX(e.kind, e.name, e.filters, t).toString();
+ }, n = RX(e.kind, e.name, e.filters, t).toString();
return {
- queryKey: jSe(e.kind, e.name, n, e.revision),
- queryFn: ({ signal: n }) => RX(e.kind, e.name, e.filters, t, 0, n),
+ queryKey: KSe(e.kind, e.name, n, e.revision),
+ queryFn: ({ signal: n }) => zX(e.kind, e.name, e.filters, t, 0, n),
staleTime: Infinity
};
-}, BX = (e, t) => ({
- queryKey: PX(e, t),
- queryFn: ({ signal: n }) => on(`/api/entity?kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`, { signal: n }),
+}, VX = (e, t) => ({
+ queryKey: FX(e, t),
+ queryFn: ({ signal: n }) => xn(`/api/entity?kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`, { signal: n }),
staleTime: Infinity
});
-function NSe(e, t, n, r, i, a) {
+function JSe(e, t, n, r, i, a) {
let o = `kind=${encodeURIComponent(e)}&name=${encodeURIComponent(t)}`;
if (i) {
let e = `&limit=120&offset=${i}${a ? `&seed=${encodeURIComponent(a)}` : ""}`;
@@ -58928,10 +58977,10 @@ function NSe(e, t, n, r, i, a) {
let s = r ? `&seed=${encodeURIComponent(r)}` : "";
return n ? `/api/photo-set?id=${n}&limit=120${s}` : r ? `/api/photos?${o}&limit=120${s}` : `/api/photos?${o}`;
}
-var VX = (e, t, n, r) => ({
- queryKey: FX(e, t, n, r),
+var HX = (e, t, n, r) => ({
+ queryKey: IX(e, t, n, r),
queryFn: async ({ pageParam: i }) => {
- let a = await on(NSe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
+ let a = await xn(JSe(e, t, n, r, i?.offset || 0, i?.seed || "")).catch((e) => {
if (i) throw e;
return { error: String(e) };
});
@@ -58944,8 +58993,8 @@ var VX = (e, t, n, r) => ({
seed: t[0]?.seed || ""
} : void 0,
staleTime: Infinity
-}), HX = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
-async function PSe(e) {
+}), UX = (e) => e && !e.error ? (e.sets || []).filter((e) => e.kind === "code") : [];
+async function YSe(e) {
let { kind: t, name: n } = e;
for (let e of [
"entity",
@@ -58956,25 +59005,25 @@ async function PSe(e) {
t,
n
] });
- e.resolvedEntity?.id && H.setQueryData(PX(t, n), e.resolvedEntity), await Promise.all([
- H.fetchQuery(BX(t, n)).then((t) => !t || t.error || !t.id ? null : (H.removeQueries({ queryKey: kX(Number(t.id)) }), H.fetchQuery(AX(Number(t.id), e.helpers.feedRowHtml, !0)))),
- H.fetchQuery(zX(e)),
- H.fetchInfiniteQuery(VX(t, n, 0, "")),
- e.media.media === "photos" && e.media.set ? H.fetchInfiniteQuery(VX(t, n, e.media.set, "")) : null
+ e.resolvedEntity?.id && H.setQueryData(FX(t, n), e.resolvedEntity), await Promise.all([
+ H.fetchQuery(VX(t, n)).then((t) => !t || t.error || !t.id ? null : (H.removeQueries({ queryKey: AX(Number(t.id)) }), H.fetchQuery(jX(Number(t.id), e.helpers.feedRowHtml, !0)))),
+ H.fetchQuery(BX(e)),
+ H.fetchInfiniteQuery(HX(t, n, 0, "")),
+ e.media.media === "photos" && e.media.set ? H.fetchInfiniteQuery(HX(t, n, e.media.set, "")) : null
]);
}
// src/identity-filter.ts
-var UX = [
+var WX = [
["all", "全部"],
["japanese_av", "女优"],
["amateur", "素人"],
["western", "西方"],
["blogger", "网黄博主"],
["animation", "动画作者"]
-], WX = "mb-4 flex flex-wrap gap-2";
-function FSe(e) {
- let t = UX.some(([t]) => t === e) ? e : "all";
- return `<div class="peach-react"><div aria-label="身份分类" class="${WX}">${UX.map(([e, n]) => ls({
+], GX = "mb-4 flex flex-wrap gap-2";
+function XSe(e) {
+ let t = WX.some(([t]) => t === e) ? e : "all";
+ return `<div class="peach-react"><div aria-label="身份分类" class="${GX}">${WX.map(([e, n]) => ws({
variant: e === t ? "primary" : "secondary",
size: "small",
label: n,
@@ -58982,45 +59031,45 @@ function FSe(e) {
})).join("")}</div></div>`;
}
// src/react/follow/online-vocab.ts
-var ISe = "/api/follow/authors", LSe = "/api/follow/tags", RSe = (e) => [
+var ZSe = "/api/follow/authors", QSe = "/api/follow/tags", $Se = (e) => [
"follow",
"authors",
e
-], zSe = (e, t) => [
+], eCe = (e, t) => [
"follow",
"tags",
e,
t
];
-function BSe(e, t, n) {
+function tCe(e, t, n) {
let r = new URLSearchParams({
limit: String(t),
offset: String(n)
});
- return e && r.set("q", e), `${ISe}?${r}`;
+ return e && r.set("q", e), `${ZSe}?${r}`;
}
-function VSe(e, t, n, r) {
+function nCe(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), `${LSe}?${i}`;
+ return t && t !== "all" && i.set("type", t), e && i.set("q", e), `${QSe}?${i}`;
}
-var HSe = (e, t, n, r) => B(BSe(e, t, n), r), USe = (e, t, n, r, i) => B(VSe(e, t, n, r), i), WSe = "/api/index", GX = {
+var rCe = (e, t, n, r) => B(tCe(e, t, n), r), iCe = (e, t, n, r, i) => B(nCe(e, t, n, r), i), aCe = "/api/index", KX = {
performers: "艺人",
creators: "卖家",
studios: "厂牌",
agencies: "事务所",
series: "系列",
tags: "标签"
-}, GSe = {
+}, oCe = {
performers: "performer",
creators: "creator",
studios: "studio",
agencies: "agency",
series: "series"
-}, KX = [
+}, qX = [
["all", "全部"],
["meta", "影片属性"],
["relationship", "人物关系"],
@@ -59030,31 +59079,31 @@ var HSe = (e, t, n, r) => B(BSe(e, t, n), r), USe = (e, t, n, r, i) => B(VSe(e,
["story", "故事剧情"],
["position", "性交体位"],
["general", "其他内容"]
-], qX = [
+], JX = [
["all", "全部"],
["general", "通用"],
["artist", "创作者"],
["character", "角色"],
["copyright", "作品"],
["metadata", "元数据"]
-], JX = {
+], YX = {
people: 120,
tags: 100
-}, YX = (e) => e !== "tags", XX = (e) => e === "studios" || e === "agencies";
-function ZX(e) {
- if (e.kind === "creators" && e.category === "animation") return ZX({
+}, XX = (e) => e !== "tags", ZX = (e) => e === "studios" || e === "agencies";
+function QX(e) {
+ if (e.kind === "creators" && e.category === "animation") return QX({
...e,
kind: "performers",
scope: "local"
});
- let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (e.kind === "tags" ? t === "online" ? qX : KX : e.kind === "performers" && t === "local" ? UX : []).some(([t]) => t === e.category);
+ let t = e.kind === "tags" || e.kind === "performers" ? e.scope : "local", n = (e.kind === "tags" ? t === "online" ? JX : qX : e.kind === "performers" && t === "local" ? WX : []).some(([t]) => t === e.category);
return {
...e,
scope: t,
category: n ? e.category : "all"
};
}
-function QX(e) {
+function $X(e) {
let { kind: t, q: n, scope: r, category: i } = e;
return t === "tags" ? r === "online" ? {
what: "online-tags",
@@ -59074,50 +59123,50 @@ function QX(e) {
...i && i !== "all" ? { category: i } : {}
};
}
-var $X = (e, t, n = "all") => [
+var eZ = (e, t, n = "all") => [
"index",
e,
t,
...e === "tags" || n !== "all" ? [n] : []
];
-function eZ(e, t, n, r, i) {
+function tZ(e, t, n, r, i) {
let a = new URLSearchParams({
kind: e,
limit: String(r),
offset: String(i)
});
- return t && a.set("q", t), n !== "all" && a.set("category", n), `${WSe}?${a}`;
+ return t && a.set("q", t), n !== "all" && a.set("category", n), `${aCe}?${a}`;
}
-function tZ(e, t = JX.tags) {
- let n = e.what === "people" || e.what === "online-authors" ? JX.people : t, r = {
+function nZ(e, t = YX.tags) {
+ let n = e.what === "people" || e.what === "online-authors" ? YX.people : t, r = {
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 {
...r,
- queryKey: $X(e.kind, e.q, e.category || "all"),
- queryFn: ({ pageParam: t, signal: r }) => B(eZ(e.kind, e.q, e.category || "all", n, t), r)
+ queryKey: eZ(e.kind, e.q, e.category || "all"),
+ queryFn: ({ pageParam: t, signal: r }) => B(tZ(e.kind, e.q, e.category || "all", n, t), r)
};
case "tags": return {
...r,
- queryKey: $X("tags", e.q, e.category),
- queryFn: ({ pageParam: t, signal: r }) => B(eZ("tags", e.q, e.category, n, t), r)
+ queryKey: eZ("tags", e.q, e.category),
+ queryFn: ({ pageParam: t, signal: r }) => B(tZ("tags", e.q, e.category, n, t), r)
};
case "online-authors": return {
...r,
- queryKey: RSe(e.q),
- queryFn: ({ pageParam: t, signal: r }) => HSe(e.q, n, t, r)
+ queryKey: $Se(e.q),
+ queryFn: ({ pageParam: t, signal: r }) => rCe(e.q, n, t, r)
};
case "online-tags": return {
...r,
- queryKey: zSe(e.q, e.category),
- queryFn: ({ pageParam: t, signal: r }) => USe(e.q, e.category, n, t, r)
+ queryKey: eCe(e.q, e.category),
+ queryFn: ({ pageParam: t, signal: r }) => iCe(e.q, e.category, n, t, r)
};
}
}
-async function KSe(e, t) {
- let n = tZ(QX(ZX(e)));
+async function sCe(e, t) {
+ let n = nZ($X(QX(e)));
H.removeQueries({
queryKey: n.queryKey,
exact: !0
@@ -59131,20 +59180,20 @@ async function KSe(e, t) {
getNextPageParam: n.getNextPageParam
});
}
-var qSe = (e) => e ? e.pages.flatMap((e) => e.items) : [], JSe = (e, t) => `${e.toLocaleString()}${t ? "+" : ""} 项`, nZ = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", YSe = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : `${(t.n || 0).toLocaleString()} 个视频`, XSe = {
+var cCe = (e) => e ? e.pages.flatMap((e) => e.items) : [], lCe = (e, t) => `${e.toLocaleString()}${t ? "+" : ""} 项`, rZ = (e, t) => e ? `r34-${t || "unknown"}` : t || "general", uCe = (e, t) => e === "agencies" ? `${(t.members || 0).toLocaleString()} 人` : `${(t.n || 0).toLocaleString()} 个视频`, dCe = {
numeric: !0,
sensitivity: "base"
};
-function rZ(e, t) {
+function iZ(e, t) {
let n = /* @__PURE__ */ new Map();
- for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", XSe))) {
- let e = Fn(t(r.k).normalize("NFKC"), "").toUpperCase(), i = /[A-Z]/.test(e) ? e : /[0-9]/.test(e) ? "#" : /[㐀-鿿]/.test(e) ? "中文" : "其他", a = n.get(i);
+ for (let r of [...e].sort((e, t) => e.k.localeCompare(t.k, "zh-CN", dCe))) {
+ let e = Xn(t(r.k).normalize("NFKC"), "").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]);
}
return [...n].sort(([e], [t]) => e.localeCompare(t, "zh-CN"));
}
// src/react/boardui/components/base/badges/chip.tsx
-var iZ = cF({
+var aZ = hF({
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",
@@ -59163,15 +59212,15 @@ var iZ = cF({
soft: "bg-background-secondary-default text-text-secondary"
}
});
-function aZ({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
+function oZ({ variant: e = "bold", color: t = "neutral", className: n, ref: r, ...i }) {
return /* @__PURE__ */ (0, F.jsx)("span", {
ref: r,
- className: sF(iZ.base, iZ.variant[e], iZ.color[t], n),
+ className: mF(aZ.base, aZ.variant[e], aZ.color[t], n),
...i
});
}
// src/react/index/index-people.tsx
-function oZ({ html: e, face: t, company: n, big: r }) {
+function sZ({ html: e, face: t, company: n, big: r }) {
let i = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
t ? i.current?.style.setProperty("--face", t) : i.current?.style.removeProperty("--face");
@@ -59183,18 +59232,18 @@ function oZ({ html: e, face: t, company: n, big: r }) {
dangerouslySetInnerHTML: { __html: e }
});
}
-var ZSe = "relative flex cursor-pointer flex-col gap-2 p-3 text-inherit", QSe = Vz("rss");
-function sZ({ name: e, readout: t, big: n, children: r, following: i, onPress: a, ...o }) {
+var fCe = "relative flex cursor-pointer flex-col gap-2 p-3 text-inherit", pCe = qz("rss");
+function cZ({ name: e, readout: t, big: n, children: r, following: i, onPress: a, ...o }) {
return /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
...o,
"data-index-cell": "",
onClick: a,
- className: UH({
+ className: YH({
radius: "plain",
padding: "none",
interactive: !0,
- className: `${ZSe} ${n ? "items-stretch text-left" : "items-center text-center"}`
+ className: `${fCe} ${n ? "items-stretch text-left" : "items-center text-center"}`
}),
children: [
r,
@@ -59203,10 +59252,10 @@ function sZ({ name: e, readout: t, big: n, children: r, following: i, onPress: a
role: "img",
"aria-label": "已订阅新作",
className: "index-feed-mark absolute top-4 right-4 z-2 inline-flex",
- children: /* @__PURE__ */ (0, F.jsx)(aZ, {
+ children: /* @__PURE__ */ (0, F.jsx)(oZ, {
variant: "caption",
color: "soft",
- children: /* @__PURE__ */ (0, F.jsx)(QSe, {})
+ children: /* @__PURE__ */ (0, F.jsx)(pCe, {})
})
}) : null,
/* @__PURE__ */ (0, F.jsx)("span", {
@@ -59222,24 +59271,26 @@ function sZ({ name: e, readout: t, big: n, children: r, following: i, onPress: a
]
});
}
-function cZ({ kind: e, items: t, layout: n, props: r }) {
- let i = XX(e) || e === "series", a = n === "big";
+function lZ({ kind: e, items: t, layout: n, props: r }) {
+ let i = ZX(e) || e === "series";
+ tI();
+ let a = n === "big";
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-index-grid": "",
"data-layout": n,
"data-cells": i ? "company" : "people",
className: `${i ? "index-grid-company" : "index-grid-person"} gap-3`,
children: t.map((t) => {
- let n = t.entity_kind || GSe[e], o = r.personAvatar(t, n, a);
- return /* @__PURE__ */ (0, F.jsx)(sZ, {
+ let n = t.entity_kind || oCe[e], o = r.personAvatar(t, n, a);
+ return /* @__PURE__ */ (0, F.jsx)(cZ, {
"data-k": t.k,
"data-kind": n,
- name: t.k,
- readout: `${YSe(e, t)}${t.identity_labels?.length ? " · " + t.identity_labels.join(" / ") : ""}`,
+ name: Qt(n, t.k, t.entity_id),
+ readout: `${uCe(e, t)}${t.identity_labels?.length ? " · " + t.identity_labels.join(" / ") : ""}`,
big: a,
following: t.following,
onPress: () => r.openEntity(n, t.k),
- children: /* @__PURE__ */ (0, F.jsx)(oZ, {
+ children: /* @__PURE__ */ (0, F.jsx)(sZ, {
html: o.html,
face: o.face,
company: i,
@@ -59249,14 +59300,14 @@ function cZ({ kind: e, items: t, layout: n, props: r }) {
})
});
}
-function $Se({ items: e, layout: t, props: n }) {
+function mCe({ items: e, layout: t, props: n }) {
let r = t === "big";
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-index-grid": "",
"data-layout": t,
"data-cells": "people",
className: "index-grid-person gap-3",
- children: e.map((e) => /* @__PURE__ */ (0, F.jsx)(sZ, {
+ children: e.map((e) => /* @__PURE__ */ (0, F.jsx)(cZ, {
"data-follow-author": e.key,
"data-kind": "performer",
name: e.k,
@@ -59265,7 +59316,7 @@ function $Se({ items: e, layout: t, props: n }) {
onPress: () => {
e.entity_id ? n.openEntity("creator", e.k) : e.held_by ? n.openEntity("creator", e.held_by) : n.openFollowAuthor(e.key);
},
- children: /* @__PURE__ */ (0, F.jsx)(oZ, {
+ children: /* @__PURE__ */ (0, F.jsx)(sZ, {
html: n.authorAvatar(e),
company: !1,
big: r
@@ -59274,8 +59325,8 @@ function $Se({ items: e, layout: t, props: n }) {
});
}
// src/board-tooltip.ts
-var lZ = (e) => e.replace(/\s+/g, " ").trim();
-function uZ(e) {
+var uZ = (e) => e.replace(/\s+/g, " ").trim();
+function dZ(e) {
let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), n = "", r;
for (; r = t.nextNode();) {
let e = r.parentElement;
@@ -59283,12 +59334,12 @@ function uZ(e) {
let t = document.createRange();
t.selectNodeContents(r), [...t.getClientRects()].some((e) => e.width > 0 && e.height > 0) && getComputedStyle(e).visibility === "visible" && (n += r.textContent);
}
- return lZ(n);
+ return uZ(n);
}
-function dZ(e) {
+function fZ(e) {
let t = e.getBoundingClientRect();
if (t.width && t.height) {
- if (e.matches("a") && uZ(e) && !fZ(e)) {
+ if (e.matches("a") && dZ(e) && !pZ(e)) {
let t = document.createRange();
t.selectNodeContents(e);
let n = t.getBoundingClientRect();
@@ -59301,7 +59352,7 @@ function dZ(e) {
let r = Math.min(...n.map((e) => e.left)), i = Math.min(...n.map((e) => e.top));
return new DOMRect(r, i, Math.max(...n.map((e) => e.right)) - r, Math.max(...n.map((e) => e.bottom)) - i);
}
-function fZ(e) {
+function pZ(e) {
if (e.matches(".middle-truncated") || e.querySelector(".middle-truncated") || [e, ...e.querySelectorAll("*")].some((e) => e.clientWidth > 0 && (e.scrollWidth > e.clientWidth + 1 || e.scrollHeight > e.clientHeight + 1))) return !0;
let t = document.createRange();
t.selectNodeContents(e);
@@ -59312,19 +59363,19 @@ function fZ(e) {
}
return !1;
}
-function eCe() {
+function hCe() {
let e = document.createElement("div");
e.className = "ui-board-tooltip", e.id = "board-control-tooltip", e.role = "tooltip", e.popover = "manual", e.hidden = !0, document.body.append(e);
let t = null, n = "", r = null, i, a = (t) => {
- let n = dZ(t), r = e.getBoundingClientRect();
+ let n = fZ(t), r = e.getBoundingClientRect();
n && (e.style.left = `${Math.max(8, Math.min(innerWidth - r.width - 8, n.left + (n.width - r.width) / 2))}px`, e.style.top = `${n.top >= r.height + 16 ? n.top - r.height - 8 : Math.min(innerHeight - r.height - 8, n.bottom + 8)}px`);
}, o = () => {
clearTimeout(i), e.matches(":popover-open") && e.hidePopover(), e.hidden = !0, t && (t.hasAttribute("title") || (t.title = n), r === null ? t.removeAttribute("aria-describedby") : t.setAttribute("aria-describedby", r)), t = null;
}, s = (s, c) => {
if (!(s instanceof Element)) return;
let l = s.closest("[title]");
- (!t?.contains(s) || l && !l.contains(t)) && l && !l.closest(".vjs-control") && l.title.trim() && (o(), t = l, n = l.title, r = l.getAttribute("aria-describedby"), l.removeAttribute("title"), (uZ(l) !== lZ(n) || fZ(l)) && (i = setTimeout(() => {
- t === l && l.isConnected && dZ(l) && ((l.closest("dialog[open]") ?? document.body).append(e), e.textContent = n, e.hidden = !1, e.showPopover(), a(l), l.setAttribute("aria-describedby", [r, e.id].filter(Boolean).join(" ")));
+ (!t?.contains(s) || l && !l.contains(t)) && l && !l.closest(".vjs-control") && l.title.trim() && (o(), t = l, n = l.title, r = l.getAttribute("aria-describedby"), l.removeAttribute("title"), (dZ(l) !== uZ(n) || pZ(l)) && (i = setTimeout(() => {
+ t === l && l.isConnected && fZ(l) && ((l.closest("dialog[open]") ?? document.body).append(e), e.textContent = n, e.hidden = !1, e.showPopover(), a(l), l.setAttribute("aria-describedby", [r, e.id].filter(Boolean).join(" ")));
}, c)));
};
document.addEventListener("pointerover", (e) => s(e.target, 400)), document.addEventListener("pointerout", (e) => {
@@ -59332,33 +59383,33 @@ function eCe() {
}), document.addEventListener("focusin", (e) => s(e.target, 0)), document.addEventListener("focusout", o), document.addEventListener("keydown", (e) => {
e.key === "Escape" && o();
}), document.addEventListener("scroll", (n) => {
- if (!t || !Ko(n, t)) return;
- let r = dZ(t);
+ if (!t || !ss(n, t)) return;
+ let r = fZ(t);
t.matches(":focus-visible") && r && r.bottom > 0 && r.top < innerHeight ? e.matches(":popover-open") && a(t) : o();
}, !0), window.addEventListener("resize", o);
}
// src/board-controls.ts
-function pZ(e) {
+function mZ(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}%`);
}
-var mZ = /* @__PURE__ */ new WeakSet();
-function tCe() {
- if (mZ.has(document)) return;
- mZ.add(document);
+var hZ = /* @__PURE__ */ new WeakSet();
+function gCe() {
+ if (hZ.has(document)) return;
+ hZ.add(document);
let e = (e) => {
- e.querySelectorAll("input[type=range]").forEach(pZ), rCe(e), nCe(e);
+ e.querySelectorAll("input[type=range]").forEach(mZ), vCe(e), _Ce(e);
};
e(document), new MutationObserver((t) => {
- for (let n of t) for (let t of n.addedNodes) t instanceof Element && (t.matches("input[type=range]") && pZ(t), e(t));
+ for (let n of t) for (let t of n.addedNodes) t instanceof Element && (t.matches("input[type=range]") && mZ(t), e(t));
}).observe(document.body, {
subtree: !0,
childList: !0
}), document.addEventListener("input", (e) => {
- e.target instanceof HTMLInputElement && e.target.type === "range" && pZ(e.target);
- }), eCe();
+ e.target instanceof HTMLInputElement && e.target.type === "range" && mZ(e.target);
+ }), hCe();
}
-function nCe(e) {
+function _Ce(e) {
let t = ".ui-board-local-nav:not([data-section-nav])", n = [...e.querySelectorAll(t)];
e instanceof HTMLElement && e.matches(t) && n.push(e), n.forEach((e) => {
if (e.hasAttribute("data-board-tabs")) return;
@@ -59382,15 +59433,15 @@ function nCe(e) {
r.observe(e);
});
}
-var hZ = /* @__PURE__ */ new Map();
-function rCe(e) {
+var gZ = /* @__PURE__ */ new Map();
+function vCe(e) {
let t = ".iconswitch,.insightswitch,.follow-workspace-switch", n = [...e.querySelectorAll(t)];
e instanceof HTMLElement && e.matches(t) && n.push(e), n.forEach((e) => {
if (e.hasAttribute("data-board-segments") || e.closest("[data-skeleton]")) return;
e.dataset.boardSegments = "true";
let t = document.createElement("span");
t.className = "board-segment-thumb", t.setAttribute("aria-hidden", "true"), e.prepend(t);
- let n = e.className + (e.getAttribute("aria-label") ?? ""), r = hZ.get(n) ?? null, i = () => {
+ let n = e.className + (e.getAttribute("aria-label") ?? ""), r = gZ.get(n) ?? null, i = () => {
let i = e.querySelector("label:has(input:checked),button[aria-selected=true]");
if (!i || !i.offsetWidth) return;
let a = {
@@ -59399,7 +59450,7 @@ function rCe(e) {
w: i.offsetWidth,
h: i.offsetHeight
};
- Cc(t, r, a, "x"), r = a, hZ.set(n, a);
+ Rc(t, r, a, "x"), r = a, gZ.set(n, a);
};
e.addEventListener("change", i);
let a = new MutationObserver(i);
@@ -59415,8 +59466,8 @@ function rCe(e) {
});
}
// src/react/photo-lightbox/photo-lightbox.ts
-var gZ = "/vendor/swiper/14.3.0/", _Z = null, iCe = () => _Z ??= Promise.all([new Promise((e, t) => {
- let n = `${gZ}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
+var _Z = "/vendor/swiper/14.3.0/", vZ = null, yCe = () => vZ ??= Promise.all([new Promise((e, t) => {
+ let n = `${_Z}swiper-bundle.min.css`, r = document.querySelector(`link[href="${n}"]`);
if (r?.sheet) {
e();
return;
@@ -59430,11 +59481,11 @@ var gZ = "/vendor/swiper/14.3.0/", _Z = null, iCe = () => _Z ??= Promise.all([ne
return;
}
let r = document.createElement("script");
- r.src = `${gZ}swiper-bundle.min.js`, r.onload = () => e(window.Swiper), r.onerror = () => t(/* @__PURE__ */ Error("swiper unavailable")), document.head.append(r);
+ r.src = `${_Z}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 _Z = null, e;
+ throw vZ = null, e;
});
-function aCe(e, t, n) {
+function bCe(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);
@@ -59455,46 +59506,46 @@ function aCe(e, t, n) {
}
};
}
-var vZ = (e) => {
+var yZ = (e) => {
let t = Number(e) || 0;
- return t ? (t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : jn(t)).replace(" ", "\xA0") : "大小未知";
-}, oCe = (e) => e.asset?.name || e.name || "未命名图片";
-function sCe(e, t) {
+ return t ? (t < 1048576 ? `${Math.max(1, Math.round(t / 1024))} KB` : Kn(t)).replace(" ", "\xA0") : "大小未知";
+}, xCe = (e) => e.asset?.name || e.name || "未命名图片";
+function SCe(e, t) {
let n = e.asset;
- if (n) return [Ln[n.location ?? ""] || n.location || "来源未知", vZ(n.size)].join(" · ");
+ if (n) return [Qn[n.location ?? ""] || n.location || "来源未知", yZ(n.size)].join(" · ");
let r = t?.[0] && t[1] ? `${t[0]} × ${t[1]}` : "";
return [
e.source || "在线图片",
r,
- e.size ? vZ(e.size) : ""
+ e.size ? yZ(e.size) : ""
].filter(Boolean).join(" · ");
}
// src/react/photo-lightbox/photo-lightbox-dialog.tsx
-var yZ = null, bZ = null, cCe = 0;
-function lCe() {
- return bZ && yZ?.isConnected || (bZ?.unmount(), yZ = document.createElement("div"), yZ.className = "peach-react", yZ.dataset.photoLightboxHost = "", document.body.append(yZ), bZ = (0, Rt.createRoot)(yZ)), bZ;
+var bZ = null, xZ = null, CCe = 0;
+function wCe() {
+ return xZ && bZ?.isConnected || (xZ?.unmount(), bZ = document.createElement("div"), bZ.className = "peach-react", bZ.dataset.photoLightboxHost = "", document.body.append(bZ), xZ = (0, Rt.createRoot)(bZ)), xZ;
}
-async function xZ(e, t, n) {
+async function SZ(e, t, n) {
if (!t.length || e < 0 || e >= t.length) return;
let r;
try {
- r = await iCe();
+ r = await yCe();
} catch {
window.open(t[e].src, "_blank", "noopener");
return;
}
- let i = lCe();
- (0, Lt.flushSync)(() => i.render(/* @__PURE__ */ (0, F.jsx)(uCe, {
+ let i = wCe();
+ (0, Lt.flushSync)(() => i.render(/* @__PURE__ */ (0, F.jsx)(TCe, {
slides: t,
index: e,
Swiper: r,
host: n ?? null
- }, ++cCe)));
+ }, ++CCe)));
}
-function SZ() {
- bZ && (0, Lt.flushSync)(() => bZ.render(null));
+function CZ() {
+ xZ && (0, Lt.flushSync)(() => xZ.render(null));
}
-function uCe({ slides: e, index: t, Swiper: n, host: r }) {
+function TCe({ slides: e, index: t, Swiper: n, host: r }) {
let i = e.length > 1, a = (0, P.useId)(), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = (0, P.useRef)(null), d = (0, P.useRef)(null), f = (0, P.useRef)(null), p = (0, P.useRef)(null), m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = (0, P.useRef)(null), [_, v] = (0, P.useState)(t), [y, b] = (0, P.useState)(100), [x, S] = (0, P.useState)({}), [C, w] = (0, P.useState)(() => /* @__PURE__ */ new Set()), [T, E] = (0, P.useState)(() => /* @__PURE__ */ new Set()), [D, O] = (0, P.useState)(!1), [k, A] = (0, P.useState)({
at: t,
text: ""
@@ -59537,8 +59588,8 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
v(this.activeIndex), i(this.activeIndex);
} }
});
- i(t, 0), h.current = aCe(e, a, b);
- let m = Lc(e, f.current, p.current), _ = (e = !1) => {
+ i(t, 0), h.current = bCe(e, a, b);
+ let m = Qc(e, f.current, p.current), _ = (e = !1) => {
m.hide(), f.current?.setAttribute("aria-expanded", "false"), e && f.current && document.contains(f.current) && f.current.focus();
};
g.current = {
@@ -59554,18 +59605,18 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
});
y.observe(e);
let x = (e) => {
- e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : SZ());
+ e.key === "Escape" && (e.preventDefault(), e.stopImmediatePropagation(), g.current?.isOpen() ? g.current.dismiss(!0) : CZ());
};
return document.addEventListener("keydown", x, !0), () => {
document.removeEventListener("keydown", x, !0), _(), y.disconnect(), a.destroy(!0, !0), r.destroy(!0, !0), h.current = null, g.current = null, e.close(), document.body.classList.remove("photolight-open");
};
}, []), (0, P.useLayoutEffect)(() => {
- m.current && pZ(m.current);
+ m.current && mZ(m.current);
}, [y]);
let j = e[_], M = j.asset ?? null, ee = async (e) => {
if (!M || !r || e.getAttribute("aria-busy") === "true") return;
let t = _;
- kc(e), O(!0), A({
+ Wc(e), O(!0), A({
at: t,
text: ""
});
@@ -59575,7 +59626,7 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
text: await r.revealSource(M.id)
});
} finally {
- kc(e, !1), O(!1);
+ Wc(e, !1), O(!1);
}
}, te = (e, t) => {
t.naturalWidth && t.naturalHeight && !x[e] && S((n) => ({
@@ -59591,18 +59642,18 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
"data-photo-lightbox": "",
"data-has-strip": i ? "" : void 0,
onCancel: (e) => {
- e.preventDefault(), SZ();
+ e.preventDefault(), CZ();
},
onClick: (e) => {
let t = e.target;
- g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && SZ();
+ g.current?.dismissOutside(t) || (t === o.current || t.classList.contains("swiper-zoom-container")) && CZ();
},
children: [
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-photo-close": "",
"aria-label": "关闭",
- onClick: SZ,
+ onClick: CZ,
dangerouslySetInnerHTML: { __html: R("x") }
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -59738,10 +59789,10 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
id: `${a}-title`,
"data-middle-truncate": "",
tabIndex: -1,
- children: oCe(j)
+ children: xCe(j)
}, _), /* @__PURE__ */ (0, F.jsx)("span", {
"data-photo-detail-meta": "",
- children: sCe(j, x[_])
+ children: SCe(j, x[_])
})]
}),
/* @__PURE__ */ (0, F.jsx)("button", {
@@ -59749,7 +59800,7 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
"data-photo-reveal": "",
hidden: !M || !r,
onClick: (e) => void ee(e.currentTarget),
- dangerouslySetInnerHTML: { __html: (D ? xs("正在定位") : R("folder-open")) + "<span>在资源管理器中显示</span>" }
+ dangerouslySetInnerHTML: { __html: (D ? Is("正在定位") : R("folder-open")) + "<span>在资源管理器中显示</span>" }
}),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-photo-status": "",
@@ -59779,24 +59830,24 @@ function uCe({ slides: e, index: t, Swiper: n, host: r }) {
});
}
// src/react/entity-body/entity-body-page.tsx
-function dCe(e) {
- return e.view === "people" && e.roster ? /* @__PURE__ */ (0, F.jsx)(fCe, {
+function ECe(e) {
+ return e.view === "people" && e.roster ? /* @__PURE__ */ (0, F.jsx)(DCe, {
roster: e.roster,
props: e
- }) : e.view === "videos" ? /* @__PURE__ */ (0, F.jsx)(pCe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, F.jsx)(gCe, {
+ }) : e.view === "videos" ? /* @__PURE__ */ (0, F.jsx)(OCe, { ...e }, e.revision) : e.view === "photos" && e.photos ? /* @__PURE__ */ (0, F.jsx)(jCe, {
photos: e.photos,
props: e
}, e.photos.revision) : null;
}
-var CZ = JX.people;
-function fCe({ roster: e, props: t }) {
+var wZ = YX.people;
+function DCe({ roster: e, props: t }) {
let { helpers: n, actions: r } = t, i = (0, P.useMemo)(() => ({
personAvatar: n.personAvatar,
openEntity: r.openEntity
- }), [n, r]), [a, o] = (0, P.useState)(CZ), s = (0, P.useMemo)(() => e.people.slice(0, a), [e.people, a]), c = (0, P.useCallback)(async () => {
- o((e) => e + CZ);
+ }), [n, r]), [a, o] = (0, P.useState)(wZ), s = (0, P.useMemo)(() => e.people.slice(0, a), [e.people, a]), c = (0, P.useCallback)(async () => {
+ o((e) => e + wZ);
}, []);
- return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(cZ, {
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(lZ, {
kind: e.kind,
items: s,
layout: e.layout,
@@ -59807,8 +59858,8 @@ function fCe({ roster: e, props: t }) {
enabled: () => !0
}, a) : null] });
}
-function pCe(e) {
- let t = HW(!e.items, e.skeletonHtml);
+function OCe(e) {
+ let t = ZW(!e.items, e.skeletonHtml);
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-entity-grid": "",
"data-grid-reveal": t.fading ? "" : void 0,
@@ -59832,33 +59883,33 @@ function pCe(e) {
}) : null]
});
}
-var mCe = (e) => Array.from({ length: e.n }, (t, n) => ({
+var kCe = (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 || "官方样张"
-})), wZ = (e) => e.sample === !0, TZ = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, EZ = (e) => wZ(e) ? `/sample-thumb?${TZ(e)}` : `/photo-thumb?id=${e.id}`, hCe = (e) => wZ(e) ? {
- src: `/sample-image?${TZ(e)}`,
- thumb: EZ(e),
+})), TZ = (e) => e.sample === !0, EZ = (e) => `code=${encodeURIComponent(e.code)}&n=${e.position}`, DZ = (e) => TZ(e) ? `/sample-thumb?${EZ(e)}` : `/photo-thumb?id=${e.id}`, ACe = (e) => TZ(e) ? {
+ src: `/sample-image?${EZ(e)}`,
+ thumb: DZ(e),
name: e.name,
asset: null,
source: e.source
} : {
src: `/photo?id=${e.id}`,
- thumb: EZ(e),
+ thumb: DZ(e),
name: e.name || "",
asset: e
};
-function gCe({ photos: e, props: t }) {
- let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, P.useMemo)(() => [...e.codeSets.flatMap(mCe), ...e.items], [e]), [s, c] = (0, P.useState)(() => /* @__PURE__ */ new Set()), l = (0, P.useCallback)((e) => c((t) => {
+function jCe({ photos: e, props: t }) {
+ let { photoSize: n, photoLayout: r, actions: i, canLoadMore: a } = t, o = (0, P.useMemo)(() => [...e.codeSets.flatMap(kCe), ...e.items], [e]), [s, c] = (0, P.useState)(() => /* @__PURE__ */ new Set()), l = (0, P.useCallback)((e) => c((t) => {
if (t.has(e)) return t;
let n = new Set(t);
return n.add(e), n;
}), []), u = (0, P.useCallback)((e) => {
- xZ(e, o.map(hCe), { revealSource: i.revealSource });
- }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, F.jsx)(_Ce, {
+ SZ(e, o.map(ACe), { revealSource: i.revealSource });
+ }, [i, o]), d = (e, t) => /* @__PURE__ */ (0, F.jsx)(MCe, {
item: e,
index: t,
lost: s.has(t),
@@ -59876,7 +59927,7 @@ function gCe({ photos: e, props: t }) {
};
}), h = p;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(DZ, {
+ m.map(({ set: e, from: t }) => /* @__PURE__ */ (0, F.jsxs)(P.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(OZ, {
label: e.code,
title: e.name,
meta: [
@@ -59888,7 +59939,7 @@ function gCe({ 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, F.jsx)(DZ, {
+ m.length && e.total ? /* @__PURE__ */ (0, F.jsx)(OZ, {
label: "本地图片",
meta: `${e.total.toLocaleString()} 张`
}) : null,
@@ -59904,7 +59955,7 @@ function gCe({ photos: e, props: t }) {
}, e.items.length) : null
] });
}
-function DZ({ label: e, title: t, meta: n }) {
+function OZ({ label: e, title: t, meta: n }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-photo-group": "",
children: [
@@ -59921,7 +59972,7 @@ function DZ({ label: e, title: t, meta: n }) {
]
});
}
-function _Ce({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
+function MCe({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
let a = e.name ?? "";
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -59930,7 +59981,7 @@ function _Ce({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
title: a,
onClick: () => i(t),
children: n ? null : /* @__PURE__ */ (0, F.jsx)("img", {
- src: EZ(e),
+ src: DZ(e),
alt: a,
loading: "lazy",
decoding: "async",
@@ -59940,9 +59991,9 @@ function _Ce({ item: e, index: t, lost: n, onLose: r, onOpen: i }) {
});
}
// src/react/background-job.ts
-var vCe = 2e3, yCe = (e) => e, bCe = (e, t) => t;
-function OZ(e) {
- let { queryKey: t, jobOf: n = yCe, withJob: r = bCe, idlePollMs: i } = e, [a, o] = (0, P.useState)(!1), [s, c] = (0, P.useState)(null), l = (0, P.useRef)(e);
+var NCe = 2e3, PCe = (e) => e, FCe = (e, t) => t;
+function kZ(e) {
+ let { queryKey: t, jobOf: n = PCe, withJob: r = FCe, idlePollMs: i } = e, [a, o] = (0, P.useState)(!1), [s, c] = (0, P.useState)(null), l = (0, P.useRef)(e);
(0, P.useEffect)(() => {
l.current = e;
});
@@ -59951,7 +60002,7 @@ function OZ(e) {
queryFn: ({ signal: e }) => l.current.queryFn({ signal: e }),
refetchInterval: (e) => {
let t = e.state.data;
- return t !== void 0 && n(t)?.status === "running" ? vCe : i ?? !1;
+ return t !== void 0 && n(t)?.status === "running" ? NCe : i ?? !1;
}
}), d = Ft({
mutationFn: (e) => l.current.start(e),
@@ -59975,19 +60026,19 @@ function OZ(e) {
};
}
// src/react/follow-feed/follow-check.ts
-var kZ = (e) => [...new Set(e)].filter((e) => Number.isSafeInteger(e) && e > 0);
-function xCe(e, t) {
- return t ? kZ(e.filter((e) => e.author_key === t || t.startsWith("entity:") && String(e.entity_id) === t.slice(7)).map((e) => e.id)) : [];
+var AZ = (e) => [...new Set(e)].filter((e) => Number.isSafeInteger(e) && e > 0);
+function ICe(e, t) {
+ return t ? AZ(e.filter((e) => e.author_key === t || t.startsWith("entity:") && String(e.entity_id) === t.slice(7)).map((e) => e.id)) : [];
}
// src/react/follow-feed/follow-check-button.tsx
-function SCe({ sources: e, report: t }) {
- let n = kZ(e), [r, i] = (0, P.useState)(""), { running: a, start: o } = OZ({
- queryKey: br,
- queryFn: ({ signal: e }) => $r(e),
- start: (e) => ni(e),
- onError: (e) => i(Wn(e)),
+function LCe({ sources: e, report: t }) {
+ let n = AZ(e), [r, i] = (0, P.useState)(""), { running: a, start: o } = kZ({
+ queryKey: Fr,
+ queryFn: ({ signal: e }) => mi(e),
+ start: (e) => _i(e),
+ onError: (e) => i(ar(e)),
onFinish: (e) => {
- e.status === "failed" && i(e.error || "检查失败"), Si(), H.invalidateQueries({ queryKey: ["follow-feed"] }), t(e);
+ e.status === "failed" && i(e.error || "检查失败"), Li(), H.invalidateQueries({ queryKey: ["follow-feed"] }), t(e);
}
}), s = a || o.isPending;
return /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -59995,38 +60046,38 @@ function SCe({ sources: e, report: t }) {
children: [/* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
disabled: !n.length,
- ...Uz(s),
+ ...Yz(s),
onClick: () => {
n.length && !s && (i(""), o.mutate(n));
},
children: "检查更新"
- }), r ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }), r ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: r
}) : null]
});
}
// src/react/follow-feed/follow-card.tsx
-var CCe = (e) => Number(e) > 0;
-function AZ({ name: e, actions: t, children: n, ...r }) {
+var RCe = (e) => Number(e) > 0;
+function jZ({ name: e, actions: t, children: n, ...r }) {
return /* @__PURE__ */ (0, F.jsx)("a", {
...r,
- href: hn("creator", e),
+ href: An("creator", e),
onClick: (n) => {
n.stopPropagation(), !(n.button || n.ctrlKey || n.metaKey || n.shiftKey || n.altKey) && (n.preventDefault(), t.openAuthor(e));
},
children: n
});
}
-var jZ = ({ provider: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
+var MZ = ({ provider: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-nothumb": "",
- dangerouslySetInnerHTML: { __html: JU(e) }
+ dangerouslySetInnerHTML: { __html: eW(e) }
});
-function wCe({ src: e, fallback: t, width: n, height: r, provider: i, onLearn: a, retryKey: o }) {
+function zCe({ src: e, fallback: t, width: n, height: r, provider: i, onLearn: a, retryKey: o }) {
let [s, c] = (0, P.useState)(!1), [l, u] = (0, P.useState)(!1), [d, f] = (0, P.useState)(null);
return (0, P.useEffect)(() => {
c(!1);
- }, [o]), s ? /* @__PURE__ */ (0, F.jsx)(jZ, { provider: i }) : /* @__PURE__ */ (0, F.jsx)("img", {
+ }, [o]), s ? /* @__PURE__ */ (0, F.jsx)(MZ, { provider: i }) : /* @__PURE__ */ (0, F.jsx)("img", {
src: l ? t : e,
alt: "",
loading: "lazy",
@@ -60045,8 +60096,8 @@ function wCe({ src: e, fallback: t, width: n, height: r, provider: i, onLearn: a
} : void 0
});
}
-function TCe(e) {
- let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = Zi(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = d && u.playable ? `/follow-stream?id=${u.id}${f ? `&media=${f.index}` : ""}` : void 0, h = f && f.thumb_url === p ? f : null, g = !h || p === u.thumb_url, _ = d ? [h, g ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, v = d && !_ && p ? (e, t) => O_e(u.id, h ? h.index : null, e, t) : void 0, y = r === "videos" ? $i(t) : [], b = (u.media_items || []).length > 1 ? u.id : y[0]?.id || u.id, x = ta({
+function BCe(e) {
+ let { group: t, authorSources: n, media: r, context: i, selected: a, selectMode: o, busy: s, failure: c, actions: l } = e, u = fa(t, r), d = r === "images", f = d ? (u.media_items || []).find((e) => e.media_kind === "image") : void 0, p = f?.thumb_url || u.thumb_url || "", m = d && u.playable ? `/follow-stream?id=${u.id}${f ? `&media=${f.index}` : ""}` : void 0, h = f && f.thumb_url === p ? f : null, g = !h || p === u.thumb_url, _ = d ? [h, g ? u : null].find((e) => Number(e?.width) > 0 && Number(e?.height) > 0) : null, v = d && !_ && p ? (e, t) => gW(u.id, h ? h.index : null, e, t) : void 0, y = r === "videos" ? ma(t) : [], b = (u.media_items || []).length > 1 ? u.id : y[0]?.id || u.id, x = ga({
cover: p,
coverFace: (f?.thumb_url ? f : u).face,
stack: t.stack,
@@ -60054,7 +60105,7 @@ function TCe(e) {
limit: 9
}), S = (0, P.useRef)(x.faces);
S.current = x.faces;
- let C = FG({
+ let C = WG({
load: async () => S.current,
canFlip: () => S.current.length > 1 && l.canFlip(),
referrerPolicy: "no-referrer"
@@ -60062,7 +60113,7 @@ function TCe(e) {
w.current = C.onPointerLeave;
let T = (0, P.useCallback)((e) => {
e && (e._stopHover = () => w.current());
- }, []), E = $U(u, n, i), D = YU(u), O = u.resource_provider || u.provider, k = (u.tags || []).slice(0, 3), A = nW(u, i), j = tW(t, u), M = u.status === "saved", ee = (e) => {
+ }, []), E = aW(u, n, i), D = tW(u), O = u.resource_provider || u.provider, k = (u.tags || []).slice(0, 3), A = cW(u, i), j = sW(t, u), M = u.status === "saved", ee = (e) => {
e.target.closest("[data-media-tag]") || (l.toggleSelection && (o || e.shiftKey || e.ctrlKey || e.metaKey) ? (e.preventDefault(), l.toggleSelection(u.id, e.shiftKey)) : l.openDetail(u.id));
}, te = (e, t) => {
e.stopPropagation(), t();
@@ -60077,7 +60128,7 @@ function TCe(e) {
"data-collection": x.isMix ? "" : void 0,
"data-selected": a ? "" : void 0,
onClick: ee,
- onMouseDown: pG,
+ onMouseDown: SG,
onMouseEnter: C.onPointerEnter,
onMouseLeave: C.onPointerLeave,
children: [
@@ -60091,7 +60142,7 @@ function TCe(e) {
}), /* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-pic": "",
children: [
- p ? /* @__PURE__ */ (0, F.jsx)(wCe, {
+ p ? /* @__PURE__ */ (0, F.jsx)(zCe, {
src: p,
fallback: m,
width: _?.width,
@@ -60099,7 +60150,7 @@ function TCe(e) {
provider: O,
onLearn: v,
retryKey: e.retryKey
- }, p) : /* @__PURE__ */ (0, F.jsx)(jZ, { provider: O }),
+ }, p) : /* @__PURE__ */ (0, F.jsx)(MZ, { provider: O }),
x.faces.length > 1 ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-mix-faces": "",
hidden: !C.faces.length,
@@ -60119,7 +60170,7 @@ function TCe(e) {
"data-media-badge": "",
title: u.provider_label || u.provider,
"aria-label": `来源:${u.provider_label || u.provider}`,
- dangerouslySetInnerHTML: { __html: JU(u.provider, u.provider_label) }
+ dangerouslySetInnerHTML: { __html: eW(u.provider, u.provider_label) }
}), j ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-badges": "",
dangerouslySetInnerHTML: { __html: j }
@@ -60132,9 +60183,9 @@ function TCe(e) {
},
dangerouslySetInnerHTML: { __html: R("check") }
}) : null,
- CCe(u.duration) ? /* @__PURE__ */ (0, F.jsx)("span", {
+ RCe(u.duration) ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-duration": "",
- children: kn(u.duration)
+ children: Wn(u.duration)
}) : null,
o ? null : /* @__PURE__ */ (0, F.jsxs)("div", {
"data-follow-corner": "",
@@ -60204,7 +60255,7 @@ function TCe(e) {
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-meta": "",
children: [
- E.entityName ? /* @__PURE__ */ (0, F.jsx)(AZ, {
+ E.entityName ? /* @__PURE__ */ (0, F.jsx)(jZ, {
name: E.entityName,
actions: l,
"data-media-avatar": "",
@@ -60223,12 +60274,12 @@ function TCe(e) {
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-media-title": "",
- dangerouslySetInnerHTML: { __html: eW(t, u) + z(D) }
+ dangerouslySetInnerHTML: { __html: oW(t, u) + z(D) }
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-follow-byline": "",
children: [
- E.entityName ? /* @__PURE__ */ (0, F.jsx)(AZ, {
+ E.entityName ? /* @__PURE__ */ (0, F.jsx)(jZ, {
name: E.entityName,
actions: l,
"data-follow-author": "",
@@ -60241,8 +60292,8 @@ function TCe(e) {
}),
/* @__PURE__ */ (0, F.jsx)("time", {
dateTime: u.published_at || "",
- title: iW(u),
- children: D_e(u)
+ title: uW(u),
+ children: dW(u)
}),
E.credited ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-credit": "",
@@ -60264,7 +60315,7 @@ function TCe(e) {
"data-media-tag": "",
"data-tag-cat": `r34-${u.tag_types?.[e] || "unknown"}`,
"data-follow-tag": e,
- children: Nl(e)
+ children: Jl(e)
}, e))
})
]
@@ -60277,9 +60328,9 @@ function TCe(e) {
]
});
}
-var MZ = (0, P.memo)(TCe);
+var NZ = (0, P.memo)(BCe);
// src/react/components/use-masonry-grid.ts
-function ECe(e, t) {
+function VCe(e, t) {
let n = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => {
let t = n.current;
@@ -60314,37 +60365,37 @@ function ECe(e, t) {
}, [e, t]), n;
}
// src/react/follow-manage/manage-route.ts
-var NZ = [
+var PZ = [
["list", "关注列表"],
["add", "添加关注"],
["tags", "标签管理"]
-], PZ = NZ.map(([e]) => e);
-function FZ(e) {
+], FZ = PZ.map(([e]) => e);
+function IZ(e) {
let t = new URLSearchParams(e), n = t.get("tab");
return {
- tab: PZ.find((e) => e === n) || "list",
+ tab: FZ.find((e) => e === n) || "list",
page: Math.max(1, Math.floor(Number(t.get("page"))) || 1),
sort: t.get("sort") || "",
dir: t.get("dir") || ""
};
}
-function IZ(e) {
+function LZ(e) {
let t = new URLSearchParams();
return e.tab !== "list" && t.set("tab", e.tab), e.page > 1 && t.set("page", String(e.page)), e.sort && t.set("sort", e.sort), e.dir && t.set("dir", e.dir), "/subscriptions" + (t.size ? `?${t}` : "");
}
-function LZ(e, t) {
- return !t && new URLSearchParams(e).get("tab") === "wants" ? "/jav?tab=wants" : !t && new URLSearchParams(e).get("tab") === "source" ? "/settings/library?section=%E6%9D%A5%E6%BA%90%E4%B8%8E%E8%AE%A2%E9%98%85" : IZ({
- tab: t || FZ(e).tab,
+function RZ(e, t) {
+ return !t && new URLSearchParams(e).get("tab") === "wants" ? "/jav?tab=wants" : !t && new URLSearchParams(e).get("tab") === "source" ? "/settings/library?section=%E6%9D%A5%E6%BA%90%E4%B8%8E%E8%AE%A2%E9%98%85" : LZ({
+ tab: t || IZ(e).tab,
page: 1,
sort: "",
dir: ""
});
}
// src/react/follow-feed/follow-feed-page.tsx
-var RZ = () => /* @__PURE__ */ (0, F.jsx)("span", {
+var zZ = () => /* @__PURE__ */ (0, F.jsx)("span", {
"data-entity-sep": "",
"aria-hidden": "true"
-}), DCe = Vz("settings"), zZ = Vz("chevron-down"), OCe = Vz("history"), kCe = Vz("arrow-up"), ACe = Vz("arrow-down"), jCe = [[
+}), HCe = qz("settings"), BZ = qz("chevron-down"), UCe = qz("history"), WCe = qz("arrow-up"), GCe = qz("arrow-down"), KCe = [[
"fixed",
"固定比例",
"layout-grid"
@@ -60353,19 +60404,19 @@ var RZ = () => /* @__PURE__ */ (0, F.jsx)("span", {
"瀑布流",
"columns-2"
]];
-function MCe(e, t, n) {
+function qCe(e, t, n) {
return (0, P.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 = Ui([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = Ui(o.works || [], (e) => e[0], n).slice(0, 24);
+ let f = ia([...d.keys()].filter((e) => s.has(e)), (e) => e, n), p = ia(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 = Ui([...u], (e) => e[0], n).slice(0, 20);
+ let m = Object.values(i).reduce((e, t) => e + (Number(t) || 0), 0), h = ia([...u], (e) => e[0], n).slice(0, 20);
t.tags.forEach((e) => {
h.some(([t]) => t === e) || h.push([e, u.get(e) || m]);
});
@@ -60373,7 +60424,7 @@ function MCe(e, t, n) {
videos: 0,
images: 0
};
- r.forEach((e) => Xi(e).forEach((e) => {
+ r.forEach((e) => da(e).forEach((e) => {
g[e === "image" ? "images" : "videos"] += 1;
}));
let _ = t.media === "images" ? "image" : "video";
@@ -60388,7 +60439,7 @@ function MCe(e, t, n) {
workRows: p,
allCount: m,
mediaCounts: g,
- visible: r.filter((e) => Xi(e).has(_)),
+ visible: r.filter((e) => da(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]])),
@@ -60401,20 +60452,20 @@ function MCe(e, t, n) {
n
]);
}
-function NCe(e) {
- let { view: t, seed: n, revision: r, actions: i } = e, a = Ri(t, r), o = It(a), s = Pt({
- queryKey: zi,
- queryFn: ({ signal: e }) => Bi(e)
- }), c = (0, P.useMemo)(() => Hi(o.data), [o.data]), l = (0, P.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, P.useMemo)(() => ({
+function JCe(e) {
+ let { view: t, seed: n, revision: r, actions: i } = e, a = $i(t, r), o = It(a), s = Pt({
+ queryKey: ea,
+ queryFn: ({ signal: e }) => ta(e)
+ }), c = (0, P.useMemo)(() => ra(o.data), [o.data]), l = (0, P.useMemo)(() => new Set((s.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [s.data]), u = (0, P.useMemo)(() => ({
sources: c?.sources || [],
aliases: c?.author_aliases || [],
credentials: l
- }), [c, l]), d = MCe(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, P.useMemo)(() => ({
- tags: Hl(d.visible.flatMap(Wi).map((e) => ({ tags: e.tags || [] }))),
+ }), [c, l]), d = qCe(c, t, n), f = o.isPending || o.isPlaceholderData, p = !f && !!c, m = (0, P.useMemo)(() => ({
+ tags: ru(d.visible.flatMap(aa).map((e) => ({ tags: e.tags || [] }))),
providers: [...d.providers].map(([e, t]) => [
e,
t,
- ki(e)
+ Wi(e)
]),
duration: !!c?.facets?.duration
}), [
@@ -60435,23 +60486,23 @@ function NCe(e) {
m,
i
]);
- let h = FCe(e, !!c);
+ let h = XCe(e, !!c);
if (!c) return o.isError ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-follow-feed": "",
- children: [/* @__PURE__ */ (0, F.jsx)(BZ, {}), /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(o.error),
+ children: [/* @__PURE__ */ (0, F.jsx)(VZ, {}), /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(o.error),
onRetry: () => void o.refetch()
})]
}) : null;
let g = (e) => i.route({
...t,
...e
- }), _ = oa({
+ }), _ = xa({
...t,
author: d.author,
provider: d.provider
}, {
- authors: new Map([...d.authorSources].map(([e, t]) => [e, XU(t, u)])),
+ authors: new Map([...d.authorSources].map(([e, t]) => [e, nW(t, u)])),
providers: d.providers,
works: d.workNames
}), v = t.status ? d.counts[t.status] || 0 : d.allCount, y = d.sources.some((e) => e.can_backfill);
@@ -60460,7 +60511,7 @@ function NCe(e) {
ref: h.host,
"data-follow-progress": ""
}, h.generation),
- !h.busy && h.report ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ !h.busy && h.report ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
title: "检查结果",
children: h.report
@@ -60469,7 +60520,7 @@ function NCe(e) {
"data-follow-feed": "",
"data-select-mode": e.selectMode ? "" : void 0,
children: [
- /* @__PURE__ */ (0, F.jsx)(BZ, { children: d.sources.length ? /* @__PURE__ */ (0, F.jsx)(q, {
+ /* @__PURE__ */ (0, F.jsx)(VZ, { children: d.sources.length ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "primary",
"data-follow-recheck": "",
"aria-label": "检查每个来源的更新",
@@ -60477,23 +60528,23 @@ function NCe(e) {
onClick: () => void h.start(!1),
children: h.starting === "check" ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: xs("检查中") }
+ dangerouslySetInnerHTML: { __html: Is("检查中") }
}) : "检查更新"
}) : null }),
- /* @__PURE__ */ (0, F.jsx)(ICe, {
+ /* @__PURE__ */ (0, F.jsx)(ZCe, {
facets: d,
pressed: d.author,
context: u,
props: e,
onPick: (e) => g({ author: d.author === e ? "" : e })
}),
- /* @__PURE__ */ (0, F.jsx)(LCe, {
+ /* @__PURE__ */ (0, F.jsx)(QCe, {
rows: d.workRows,
pressed: t.work,
props: e,
onPick: (e) => g({ work: t.work === e ? "" : e })
}),
- /* @__PURE__ */ (0, F.jsx)(RCe, {
+ /* @__PURE__ */ (0, F.jsx)($Ce, {
facets: d,
view: t,
total: v,
@@ -60501,9 +60552,9 @@ function NCe(e) {
props: e,
route: g
}),
- /* @__PURE__ */ (0, F.jsx)(zCe, {
+ /* @__PURE__ */ (0, F.jsx)(ewe, {
conditions: _,
- onDrop: (e) => i.route(sa(t, e)),
+ onDrop: (e) => i.route(Sa(t, e)),
onClear: () => g({
author: "",
provider: "",
@@ -60513,8 +60564,8 @@ function NCe(e) {
durMax: 0
})
}),
- d.broken.length ? /* @__PURE__ */ (0, F.jsx)(BCe, { count: d.broken.length }) : null,
- /* @__PURE__ */ (0, F.jsx)(VCe, {
+ d.broken.length ? /* @__PURE__ */ (0, F.jsx)(twe, { count: d.broken.length }) : null,
+ /* @__PURE__ */ (0, F.jsx)(nwe, {
retryKey: o.dataUpdatedAt,
pending: f,
facets: d,
@@ -60543,10 +60594,10 @@ function NCe(e) {
load: async () => {
await o.fetchNextPage({ throwOnError: !0 });
},
- children: [/* @__PURE__ */ (0, F.jsx)(zZ, { className: "size-(--icon-inline)" }), "加载更多"]
- }, o.data?.pages.length) : /* @__PURE__ */ (0, F.jsx)(PCe, {
+ children: [/* @__PURE__ */ (0, F.jsx)(BZ, { className: "size-(--icon-inline)" }), "加载更多"]
+ }, o.data?.pages.length) : /* @__PURE__ */ (0, F.jsx)(YCe, {
busy: o.isFetchingNextPage,
- error: o.isFetchNextPageError ? tn(o.error) : "",
+ error: o.isFetchNextPageError ? _n(o.error) : "",
load: () => {
!h.busyRef.current && !o.isFetchingNextPage && o.fetchNextPage();
}
@@ -60555,17 +60606,17 @@ function NCe(e) {
"data-follow-page-action": "",
children: [/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- leadingIcon: h.olderBusy ? void 0 : OCe,
+ leadingIcon: h.olderBusy ? void 0 : UCe,
"data-follow-older": "",
"aria-busy": h.busy || void 0,
onClick: () => void h.start(!0),
children: h.olderBusy ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: xs("抓取中") }
+ dangerouslySetInnerHTML: { __html: Is("抓取中") }
}), /* @__PURE__ */ (0, F.jsx)("span", { children: "抓取中" })] }) : "抓更早的一页"
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-backfill": "",
- children: na(d.sources)
+ children: _a(d.sources)
})]
}) : null]
}) : null
@@ -60573,7 +60624,7 @@ function NCe(e) {
})
] });
}
-function BZ({ children: e }) {
+function VZ({ children: e }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-follow-head": "",
children: [/* @__PURE__ */ (0, F.jsx)("h2", {
@@ -60581,30 +60632,30 @@ function BZ({ children: e }) {
children: "关注"
}), /* @__PURE__ */ (0, F.jsxs)("span", {
"data-follow-head-actions": "",
- children: [/* @__PURE__ */ (0, F.jsx)(pI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(yI, {
variant: "secondary",
- leadingIcon: DCe,
+ leadingIcon: HCe,
"data-follow-manage": "",
- href: VZ(),
+ href: HZ(),
children: "管理关注"
}), e]
})]
});
}
-function PCe({ busy: e, error: t, load: n }) {
+function YCe({ busy: e, error: t, load: n }) {
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-entity-more": "",
"aria-busy": e || void 0,
"aria-disabled": e || void 0,
onClick: n,
- children: [/* @__PURE__ */ (0, F.jsx)(zZ, { className: "size-(--icon-inline)" }), "加载更多"]
- }), t ? /* @__PURE__ */ (0, F.jsx)(UW, {
+ children: [/* @__PURE__ */ (0, F.jsx)(BZ, { className: "size-(--icon-inline)" }), "加载更多"]
+ }), t ? /* @__PURE__ */ (0, F.jsx)(QW, {
message: t,
onRetry: n
}) : null] });
}
-function FCe(e, t) {
+function XCe(e, t) {
let { helpers: n, actions: r } = e, [i, a] = (0, P.useState)(0), [o, s] = (0, P.useState)(!1), [c, l] = (0, P.useState)(""), [u, d] = (0, P.useState)(""), [f, p] = (0, P.useState)(!1), m = (0, P.useRef)(!1), h = (0, P.useRef)(null), g = (0, P.useRef)({
helpers: n,
actions: r
@@ -60619,7 +60670,7 @@ function FCe(e, t) {
return g.current.helpers.jobProgress({
host: e,
active: () => t,
- read: (e) => B(sr, e),
+ read: (e) => B(Sr, e),
busy: (e) => {
t && (m.current = e, s(e));
},
@@ -60629,7 +60680,7 @@ function FCe(e, t) {
ok: !1,
error: e.error
}] } : e;
- g.current.actions.checkReport(n), d(wi({
+ g.current.actions.checkReport(n), d(zi({
...n,
status: e.status || "done"
})), m.current = !1, s(!1), p(!1), H.invalidateQueries({ queryKey: ["follow-feed"] }), a((e) => e + 1);
@@ -60647,7 +60698,7 @@ function FCe(e, t) {
m.current = !0, l(e ? "older" : "check"), d("");
let t = !1;
try {
- let n = await V(sr, e ? {
+ let n = await V(Sr, e ? {
older: !0,
background: !0
} : { background: !0 });
@@ -60655,7 +60706,7 @@ function FCe(e, t) {
} catch (t) {
g.current.actions.checkReport({ results: [{
ok: !1,
- error: tn(t)
+ error: _n(t)
}] }), e && H.invalidateQueries({ queryKey: ["follow-feed"] });
} finally {
m.current = t, l("");
@@ -60666,12 +60717,12 @@ function FCe(e, t) {
olderBusy: c === "older" || f && o
};
}
-function ICe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
+function ZCe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
let a = (0, P.useRef)(null);
(0, P.useEffect)(() => {
r.helpers.wireDrag(a.current);
}, [r.helpers]);
- let o = (t) => XU(e.authorSources.get(t) || [], n);
+ let o = (t) => nW(e.authorSources.get(t) || [], n);
return e.authorOrder.length ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-authors-bar": "",
children: /* @__PURE__ */ (0, F.jsx)("div", {
@@ -60679,14 +60730,14 @@ function ICe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
"data-follow-authors": "",
"aria-label": "创作者",
children: e.authorOrder.map((n) => {
- let a = e.authorSources.get(n) || [], s = ZU(a), c = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
+ let a = e.authorSources.get(n) || [], s = rW(a), c = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-ring": "",
- dangerouslySetInnerHTML: { __html: QU(a, o(n)) }
+ dangerouslySetInnerHTML: { __html: iW(a, o(n)) }
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-name": "",
children: o(n)
})] });
- return s ? /* @__PURE__ */ (0, F.jsx)(AZ, {
+ return s ? /* @__PURE__ */ (0, F.jsx)(jZ, {
name: s,
actions: r.actions,
"data-follow-author": n,
@@ -60703,7 +60754,7 @@ function ICe({ facets: e, pressed: t, context: n, props: r, onPick: i }) {
})
}) : null;
}
-function LCe({ rows: e, pressed: t, props: n, onPick: r }) {
+function QCe({ rows: e, pressed: t, props: n, onPick: r }) {
let i = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
n.helpers.wireDrag(i.current);
@@ -60718,19 +60769,19 @@ function LCe({ rows: e, pressed: t, props: n, onPick: r }) {
onClick: () => r(e[0]),
children: [/* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-mark": "",
- "data-fallback": Pn(e[1], 2),
+ "data-fallback": Yn(e[1], 2),
dangerouslySetInnerHTML: { __html: n.helpers.workMark(e) }
}), e[1]]
}, e[0]))
}) : null;
}
-function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
- let { helpers: o, actions: s } = i, c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = (0, P.useRef)(null), d = (0, P.useRef)(null), f = (0, P.useRef)(null), p = (0, P.useRef)(null), m = !!e.mediaCounts.images || t.media === "images", h = dI(c, u, "[data-follow-filter][aria-pressed=\"true\"]", t.status), g = dI(l, d, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${m}`);
+function $Ce({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
+ let { helpers: o, actions: s } = i, c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = (0, P.useRef)(null), d = (0, P.useRef)(null), f = (0, P.useRef)(null), p = (0, P.useRef)(null), m = !!e.mediaCounts.images || t.media === "images", h = _I(c, u, "[data-follow-filter][aria-pressed=\"true\"]", t.status), g = _I(l, d, "[data-media-view][aria-pressed=\"true\"]", `${t.media}:${m}`);
(0, P.useEffect)(() => {
o.wireDrag(f.current), o.wireDrag(p.current), o.wireScroller(p.current);
}, [o]);
let _ = [...e.providers], v = _.length + e.tagRows.length > 0, y = t.media === "images";
- return /* @__PURE__ */ (0, F.jsx)(iI, {
+ return /* @__PURE__ */ (0, F.jsx)(uI, {
label: "筛选与排序",
topLabel: m ? "媒体与关注筛选" : "关注筛选",
attrs: {
@@ -60782,7 +60833,7 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: R(i) }
}, e);
})
- }), /* @__PURE__ */ (0, F.jsx)(RZ, {})] }) : null, /* @__PURE__ */ (0, F.jsxs)("div", {
+ }), /* @__PURE__ */ (0, F.jsx)(zZ, {})] }) : null, /* @__PURE__ */ (0, F.jsxs)("div", {
ref: f,
"data-entity-scroll": "",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -60791,7 +60842,7 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"aria-label": "状态",
"data-entity-states": "",
onPointerLeave: h.leave,
- children: [Mi.map(([e, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
+ children: [qi.map(([e, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-entity-state": e,
"data-follow-filter": e,
@@ -60802,7 +60853,7 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
t.status !== e && a({ status: e });
},
children: n
- }, e)), v ? /* @__PURE__ */ (0, F.jsx)(RZ, {}) : null]
+ }, e)), v ? /* @__PURE__ */ (0, F.jsx)(zZ, {}) : null]
}), /* @__PURE__ */ (0, F.jsxs)("div", {
ref: p,
"data-entity-tags": "",
@@ -60815,16 +60866,16 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
title: n,
"aria-label": `来源:${n}`,
onClick: () => a({ provider: e.provider === t ? "" : t }),
- dangerouslySetInnerHTML: { __html: JU(t, n) }
+ dangerouslySetInnerHTML: { __html: eW(t, n) }
}, t)),
- _.length && e.tagRows.length ? /* @__PURE__ */ (0, F.jsx)(RZ, {}) : null,
- e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, F.jsxs)(oI, {
+ _.length && e.tagRows.length ? /* @__PURE__ */ (0, F.jsx)(zZ, {}) : null,
+ e.tagRows.map(([n, r]) => /* @__PURE__ */ (0, F.jsxs)(fI, {
"data-follow-tag": n,
"data-entity-press": "",
- "data-tag-cat": `r34-${ca(e.groups, n)}`,
+ "data-tag-cat": `r34-${Ca(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: [Nl(n), r ? /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [Jl(n), r ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-count-badge": n,
children: String(r)
}) : null]
@@ -60838,18 +60889,18 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"data-follow-readout": "",
children: `${n.toLocaleString()} 项更新 · 显示 ${e.visible.length.toLocaleString()}`
}),
- /* @__PURE__ */ (0, F.jsx)(nB, {
+ /* @__PURE__ */ (0, F.jsx)(cB, {
currentHref: () => location.pathname + location.search,
kind: "creator"
}),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-entity-sorts": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(SW, { onPress: s.shuffle }),
- y ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(xW, {
+ /* @__PURE__ */ (0, F.jsx)(jW, { onPress: s.shuffle }),
+ y ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(AW, {
label: "图片布局",
value: i.photoLayout,
- options: jCe,
+ options: KCe,
onChange: (e) => s.setPhotoLayout(e === "fixed" ? "fixed" : "masonry")
}), /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
@@ -60866,7 +60917,7 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
dangerouslySetInnerHTML: { __html: R("captions-off") }
})]
})] }) : null,
- Ni.map(([e, n]) => {
+ Ji.map(([e, n]) => {
let r = t.sort === e;
return /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
@@ -60874,14 +60925,14 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
"data-follow-sort": e,
"data-entity-press": "",
"aria-pressed": r,
- "aria-label": ia(e, n, t.sort, t.dir) || void 0,
+ "aria-label": ya(e, n, t.sort, t.dir) || void 0,
onClick: () => {
- let n = ra(e, t.sort, t.dir);
+ let n = va(e, t.sort, t.dir);
n && a(n);
},
- children: [n, r ? /* @__PURE__ */ (0, F.jsx)(UU, {
- a: kCe,
- b: ACe,
+ children: [n, r ? /* @__PURE__ */ (0, F.jsx)(YU, {
+ a: WCe,
+ b: GCe,
state: t.dir === "asc" ? "a" : "b",
className: "size-(--icon-inline)"
}) : null]
@@ -60892,7 +60943,7 @@ function RCe({ facets: e, view: t, total: n, busy: r, props: i, route: a }) {
] })
});
}
-function zCe({ conditions: e, onDrop: t, onClear: n }) {
+function ewe({ conditions: e, onDrop: t, onClear: n }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-entity-combo": "",
"data-follow-combo": "",
@@ -60917,19 +60968,19 @@ function zCe({ conditions: e, onDrop: t, onClear: n }) {
})] }) : null
});
}
-function BCe({ count: e }) {
+function twe({ count: e }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-broken": "",
- dangerouslySetInnerHTML: { __html: `<div class="geist-note geist-note-error fwarn" role="alert">${R("alert")}<span>${e} 个来源上次检查失败,去<a class="flink" href="${z(VZ())}" data-follow-manage>管理关注</a>看原因。</span></div>` }
+ dangerouslySetInnerHTML: { __html: `<div class="geist-note geist-note-error fwarn" role="alert">${R("alert")}<span>${e} 个来源上次检查失败,去<a class="flink" href="${z(HZ())}" data-follow-manage>管理关注</a>看原因。</span></div>` }
});
}
-var VZ = () => LZ(window.location.search);
-function VCe({ pending: e, facets: t, data: n, context: r, props: i, retryKey: a, checkAction: o }) {
- let { view: s, helpers: c } = i, l = s.media === "images", u = HW(e, () => c.listSkeletonHtml(s.media));
+var HZ = () => RZ(window.location.search);
+function nwe({ pending: e, facets: t, data: n, context: r, props: i, retryKey: a, checkAction: o }) {
+ let { view: s, helpers: c } = i, l = s.media === "images", u = ZW(e, () => c.listSkeletonHtml(s.media));
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-follow-list-body": "",
"data-grid-reveal": u.fading ? "" : void 0,
- children: [u.layer, e ? null : /* @__PURE__ */ (0, F.jsx)(HCe, {
+ children: [u.layer, e ? null : /* @__PURE__ */ (0, F.jsx)(rwe, {
facets: t,
data: n,
context: r,
@@ -60940,29 +60991,29 @@ function VCe({ pending: e, facets: t, data: n, context: r, props: i, retryKey: a
})]
});
}
-function HCe({ facets: e, data: t, context: n, props: r, images: i, retryKey: a, checkAction: o }) {
- let { view: s, actions: c } = r, l = UZ(r), u = i ? {
+function rwe({ facets: e, data: t, context: n, props: r, images: i, retryKey: a, checkAction: o }) {
+ let { view: s, actions: c } = r, l = WZ(r), u = i ? {
"data-size": r.photoSize,
"data-layout": r.photoLayout,
"data-images-only": String(r.imagesOnly)
- } : {}, d = ECe(i && r.photoLayout === "masonry", `${r.photoSize}:${e.visible.map((e) => e.primary.id).join(",")}`), f;
+ } : {}, d = VCe(i && r.photoLayout === "masonry", `${r.photoSize}:${e.visible.map((e) => e.primary.id).join(",")}`), f;
return f = e.visible.length ? e.visible.map((t) => {
let i = e.byId.get(t.primary?.source_id), o = i?.author_key && e.authorSources.get(i.author_key) || [], u = t.primary.id;
- return /* @__PURE__ */ (0, F.jsx)(MZ, {
+ return /* @__PURE__ */ (0, F.jsx)(NZ, {
group: t,
authorSources: o,
media: s.media,
retryKey: a,
context: n,
- selected: r.selected.has(HZ(t, s)),
+ selected: r.selected.has(UZ(t, s)),
selectMode: r.selectMode,
- busy: l.busy.get(HZ(t, s)) || "",
- failure: l.failures.get(HZ(t, s)) || "",
+ busy: l.busy.get(UZ(t, s)) || "",
+ failure: l.failures.get(UZ(t, s)) || "",
actions: c,
onStatus: l.status,
onSave: l.save
}, `${u}:${s.media}`);
- }) : /* @__PURE__ */ (0, F.jsx)(UCe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(iwe, {
data: t,
filtered: !!(s.status || e.author || e.provider || s.work || s.tags.length || s.durMin || s.durMax),
checkAction: o,
@@ -60975,7 +61026,7 @@ function HCe({ facets: e, data: t, context: n, props: r, images: i, retryKey: a,
tags: [],
durMin: 0,
durMax: 0,
- media: t.groups.length ? t.groups.some((e) => Xi(e).has("video")) ? "videos" : "images" : s.media
+ media: t.groups.length ? t.groups.some((e) => da(e).has("video")) ? "videos" : "images" : s.media
})
}), /* @__PURE__ */ (0, F.jsx)("div", {
ref: d,
@@ -60985,22 +61036,22 @@ function HCe({ facets: e, data: t, context: n, props: r, images: i, retryKey: a,
children: f
});
}
-function HZ(e, t) {
- return Zi(e, t.media).id;
+function UZ(e, t) {
+ return fa(e, t.media).id;
}
-function UCe({ data: e, filtered: t, clear: n, checkAction: r }) {
+function iwe({ data: e, filtered: t, clear: n, checkAction: r }) {
let i = !!e.groups.length || t, a = !!e.sources.length;
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-empty": "",
className: "contents",
- children: /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz(i ? "search-x" : "rss"),
+ children: /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz(i ? "search-x" : "rss"),
title: i ? "当前筛选下没有更新" : a ? "还没有更新" : "还没有关注任何来源",
actions: i ? /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
onClick: n,
children: "清除筛选"
- }) : a ? r : /* @__PURE__ */ (0, F.jsx)(pI, {
+ }) : a ? r : /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/subscriptions?tab=add",
children: "添加关注"
@@ -61009,22 +61060,22 @@ function UCe({ data: e, filtered: t, clear: n, checkAction: r }) {
})
});
}
-var WCe = {
+var awe = {
new: "已恢复未看",
seen: "已标记已看",
ignored: "已忽略"
};
-function UZ(e) {
- let { view: t, revision: n, actions: r } = e, [i, a] = (0, P.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, P.useState)(() => /* @__PURE__ */ new Map()), c = Ri(t, n).queryKey, l = (e, t, n) => n((n) => {
+function WZ(e) {
+ let { view: t, revision: n, actions: r } = e, [i, a] = (0, P.useState)(() => /* @__PURE__ */ new Map()), [o, s] = (0, P.useState)(() => /* @__PURE__ */ new Map()), c = $i(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) => {
- H.setQueryData(c, (r) => r && aa(r, t, e, n));
+ H.setQueryData(c, (r) => r && ba(r, t, e, n));
}, d = () => void H.invalidateQueries({
queryKey: c,
exact: !0
}), f = (e) => {
- let t = Hi(H.getQueryData(c));
+ let t = ra(H.getQueryData(c));
for (let n of t?.groups || []) for (let t of [
n.primary,
...n.variants,
@@ -61032,20 +61083,20 @@ function UZ(e) {
]) if (t.id === e) return t.status;
return "new";
}, p = Ft({
- mutationFn: ({ id: e, to: t }) => V(pr, {
+ mutationFn: ({ id: e, to: t }) => V(Or, {
item: e,
to: t
}),
onSuccess: (e, { id: t, to: n, was: i }) => {
- u(t, n), d(), r.toast(WCe[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
- await V(pr, {
+ u(t, n), d(), r.toast(awe[n] || "已更新关注状态", { undo: i === "saved" ? void 0 : async () => {
+ await V(Or, {
item: t,
to: i
}), u(t, i), d();
} });
},
onError: (e, { id: t }) => {
- l(t, tn(e), s), r.failure("更新关注状态", e);
+ l(t, _n(e), s), r.failure("更新关注状态", e);
},
onSettled: (e, t, { id: n }) => l(n, "", a)
}), m = Ft({
@@ -61054,7 +61105,7 @@ function UZ(e) {
u(t, "saved"), d(), r.toast("已保存到数据库");
},
onError: (e, t) => {
- l(t, tn(e), s), r.failure("保存到数据库", e);
+ l(t, _n(e), s), r.failure("保存到数据库", e);
},
onSettled: (e, t, n) => l(n, "", a)
}), h = (0, P.useRef)({
@@ -61082,10 +61133,10 @@ function UZ(e) {
};
}
// src/react/entity-body/entity-online.tsx
-function GCe(e) {
- let { result: t, data: n, media: r, helpers: i } = e, a = t.isPending || t.isPlaceholderData, o = HW(a, () => i.listSkeletonHtml(r));
- return !n && t.isError ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(t.error),
+function owe(e) {
+ let { result: t, data: n, media: r, helpers: i } = e, a = t.isPending || t.isPlaceholderData, o = ZW(a, () => i.listSkeletonHtml(r));
+ return !n && t.isError ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(t.error),
onRetry: () => {
t.refetch();
}
@@ -61095,7 +61146,7 @@ function GCe(e) {
"data-grid-reveal": o.fading ? "" : void 0,
children: [
o.layer,
- a || !n ? null : /* @__PURE__ */ (0, F.jsx)(KCe, {
+ a || !n ? null : /* @__PURE__ */ (0, F.jsx)(swe, {
...e,
data: n
}),
@@ -61109,8 +61160,8 @@ function GCe(e) {
]
});
}
-function KCe({ view: e, media: t, data: n, visible: r, context: i, photoSize: a, photoLayout: o, imagesOnly: s, actions: c, clearFilters: l }) {
- let u = UZ({
+function swe({ view: e, media: t, data: n, visible: r, context: i, photoSize: a, photoLayout: o, imagesOnly: s, actions: c, clearFilters: l }) {
+ let u = WZ({
view: e,
revision: 0,
actions: c
@@ -61127,8 +61178,8 @@ function KCe({ view: e, media: t, data: n, visible: r, context: i, photoSize: a,
"data-layout": o,
"data-images-only": String(s)
} : {}, m = r.length ? r.map((e) => {
- let n = Zi(e, t).id, r = d.byId.get(e.primary?.source_id)?.author_key;
- return /* @__PURE__ */ (0, F.jsx)(MZ, {
+ let n = fa(e, t).id, r = d.byId.get(e.primary?.source_id)?.author_key;
+ return /* @__PURE__ */ (0, F.jsx)(NZ, {
group: e,
authorSources: r && d.byAuthor.get(r) || [],
media: t,
@@ -61141,11 +61192,11 @@ function KCe({ view: e, media: t, data: n, visible: r, context: i, photoSize: a,
onStatus: u.status,
onSave: u.save
}, `${e.primary.id}:${t}`);
- }) : /* @__PURE__ */ (0, F.jsx)(qCe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(cwe, {
searched: !!(n.groups || []).length || !!(e.status || e.provider || e.tags.length || e.durMin || e.durMax),
clear: l,
actions: c,
- sources: xCe(n.sources || [], e.author)
+ sources: ICe(n.sources || [], e.author)
});
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-list": "",
@@ -61154,21 +61205,21 @@ function KCe({ view: e, media: t, data: n, visible: r, context: i, photoSize: a,
children: m
});
}
-function qCe({ searched: e, clear: t, actions: n, sources: r }) {
+function cwe({ searched: e, clear: t, actions: n, sources: r }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-empty": "",
className: "contents",
- children: /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz(e ? "search-x" : "rss"),
+ children: /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz(e ? "search-x" : "rss"),
title: e ? "当前筛选下没有更新" : "还没有抓到更新",
actions: e ? /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
onClick: t,
children: "清除筛选"
- }) : r.length ? /* @__PURE__ */ (0, F.jsx)(SCe, {
+ }) : r.length ? /* @__PURE__ */ (0, F.jsx)(LCe, {
sources: r,
report: n.checkReport
- }) : /* @__PURE__ */ (0, F.jsx)(pI, {
+ }) : /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/subscriptions?tab=add",
children: "添加关注"
@@ -61177,7 +61228,7 @@ function qCe({ searched: e, clear: t, actions: n, sources: r }) {
})
});
}
-function WZ(e) {
+function GZ(e) {
return {
x0: 0,
y0: 0,
@@ -61185,7 +61236,7 @@ function WZ(e) {
y1: e.height
};
}
-function GZ(e) {
+function KZ(e) {
return {
x0: Math.round(e.x0),
y0: Math.round(e.y0),
@@ -61193,40 +61244,40 @@ function GZ(e) {
y1: Math.round(e.y1)
};
}
-function KZ(e) {
+function qZ(e) {
return !!e && Number.isFinite(e.width) && Number.isFinite(e.height) && e.width > 0 && e.height > 0;
}
-function qZ(e, t) {
- if (!KZ(e)) return {
+function JZ(e, t) {
+ if (!qZ(e)) return {
x0: 0,
y0: 0,
x1: 0,
y1: 0
};
- if (t == null || !(t > 0)) return WZ(e);
+ if (t == null || !(t > 0)) return GZ(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 GZ({
+ return KZ({
x0: i,
y0: a,
x1: i + n,
y1: a + r
});
}
-function JCe(e, t) {
- if (!KZ(e) || !(t > 0)) return WZ(e);
+function lwe(e, t) {
+ if (!qZ(e) || !(t > 0)) return GZ(e);
let n = Math.min(e.width, e.height * t);
- return GZ({
+ return KZ({
x0: e.width - n,
y0: 0,
x1: e.width,
y1: e.height
});
}
-function YCe(e, t, n) {
- if (!KZ(t) || !(n > 0)) return WZ(t);
- let r = JZ(e, t), i = qZ({
+function uwe(e, t, n) {
+ if (!qZ(t) || !(n > 0)) return GZ(t);
+ let r = YZ(e, t), i = JZ({
width: r.x1 - r.x0,
height: r.y1 - r.y0
}, n);
@@ -61237,8 +61288,8 @@ function YCe(e, t, n) {
y1: r.y0 + i.y1
};
}
-function JZ(e, t, n = null, r = "width") {
- if (!KZ(t)) return {
+function YZ(e, t, n = null, r = "width") {
+ if (!qZ(t)) return {
x0: 0,
y0: 0,
x1: 0,
@@ -61247,43 +61298,43 @@ function JZ(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 GZ({
+ return KZ({
x0: s,
y0: c,
x1: s + a,
y1: c + o
});
}
-function YZ(e, t, n, r) {
+function XZ(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 GZ({
+ return KZ({
x0: o,
y0: s,
x1: o + i,
y1: s + a
});
}
-function XZ(e, t, n, r = null) {
- if (!KZ(n) || !(t > 0)) return e;
+function ZZ(e, t, n, r = null) {
+ if (!qZ(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 JZ({
+ return YZ({
x0: i - o / 2,
y0: a - s / 2,
x1: i + o / 2,
y1: a + s / 2
}, n, r);
}
-function XCe(e, t, n, r, i = null) {
+function dwe(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 JZ(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
+ return YZ(a, r, i, (a.x1 - a.x0) / Math.max(1, a.y1 - a.y0) > (i ?? 1) ? "height" : "width");
}
-function ZCe(e, t) {
- return KZ(t) ? {
+function fwe(e, t) {
+ return qZ(t) ? {
left: e.x0 / t.width * 100,
top: e.y0 / t.height * 100,
width: (e.x1 - e.x0) / t.width * 100,
@@ -61295,8 +61346,8 @@ function ZCe(e, t) {
height: 0
};
}
-function QCe(e, t) {
- if (!KZ(t)) return {
+function pwe(e, t) {
+ if (!qZ(t)) return {
size: "cover",
position: "50% 50%"
};
@@ -61306,7 +61357,7 @@ function QCe(e, t) {
position: `${i(e.x0, t.width, n)}% ${i(e.y0, t.height, r)}%`
};
}
-function $Ce(e, t) {
+function mwe(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}%`,
@@ -61315,15 +61366,15 @@ function $Ce(e, t) {
height: `${t.height / r * 100}%`
};
}
-function ZZ(e, t, n) {
+function QZ(e, t, n) {
return t > 0 ? e * n / t : 0;
}
-function ewe(e, t) {
+function hwe(e, t) {
return !t || !(t.width > 0) || !(t.height > 0) ? !1 : Math.min(e.width / 100 * t.width, e.height / 100 * t.height) < 36;
}
// src/react/crop/crop-frame.tsx
-var twe = .02, QZ = 1.08;
-function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
+var gwe = .02, $Z = 1.08;
+function eQ({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o }) {
let s = (0, P.useRef)(null), c = (0, P.useRef)(null), [l, u] = (0, P.useState)(!1), [d, f] = (0, P.useState)(null);
(0, P.useEffect)(() => {
u(!1);
@@ -61342,8 +61393,8 @@ function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
dx: 0,
dy: 0
} : {
- dx: ZZ(e, n.clientWidth, r.width),
- dy: ZZ(t, n.clientHeight, r.height)
+ dx: QZ(e, n.clientWidth, r.width),
+ dy: QZ(t, n.clientHeight, r.height)
};
}, [r]);
function m(e) {
@@ -61360,22 +61411,22 @@ function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
let n = c.current, a = s.current;
if (!n || !a || !r) return;
let o = p(e.clientX - n.x, e.clientY - n.y);
- n.mode === "move" ? i(YZ(n.box, o.dx, o.dy, r)) : i(XCe(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));
+ n.mode === "move" ? i(XZ(n.box, o.dx, o.dy, r)) : i(dwe(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 g(e) {
c.current && (c.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId));
}
function _(e) {
if (!n || !r) return;
- let a = Math.max(1, (n.x1 - n.x0) * twe), o = {
+ let a = Math.max(1, (n.x1 - n.x0) * gwe), o = {
ArrowLeft: [-a, 0],
ArrowRight: [a, 0],
ArrowUp: [0, -a],
ArrowDown: [0, a]
};
- o[e.key] ? (e.preventDefault(), i(YZ(n, o[e.key][0], o[e.key][1], r))) : (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(XZ(n, e.key === "-" ? 1 / QZ : QZ, r, t)));
+ o[e.key] ? (e.preventDefault(), i(XZ(n, o[e.key][0], o[e.key][1], r))) : (e.key === "+" || e.key === "=" || e.key === "-") && (e.preventDefault(), i(ZZ(n, e.key === "-" ? 1 / $Z : $Z, r, t)));
}
- let v = n && r ? ZCe(JZ(n, r, t), r) : null, y = v ? ewe(v, d) : !1, b = v ? {
+ let v = n && r ? fwe(YZ(n, r, t), r) : null, y = v ? hwe(v, d) : !1, b = v ? {
"--crop-l": `${v.left}%`,
"--crop-t": `${v.top}%`,
"--crop-w": `${v.width}%`,
@@ -61394,7 +61445,7 @@ function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
draggable: !1,
onLoad: (e) => {
let t = e.currentTarget;
- KZ({
+ qZ({
width: t.naturalWidth,
height: t.naturalHeight
}) && a({
@@ -61433,7 +61484,7 @@ function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
onPointerCancel: g,
onKeyDown: _,
onWheel: (e) => {
- n && r && i(XZ(n, e.deltaY > 0 ? QZ : 1 / QZ, r, t));
+ n && r && i(ZZ(n, e.deltaY > 0 ? $Z : 1 / $Z, 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, F.jsx)("span", {
@@ -61455,13 +61506,13 @@ function $Z({ src: e, aspect: t, box: n, size: r, onBox: i, onSize: a, label: o
});
}
// src/react/avatar-picker/avatar-picker.ts
-var nwe = "/api/avatar-choices", eQ = "/api/avatar-pick", rwe = "/api/avatar-code-cover", tQ = "/api/avatar-frame", iwe = "/avatar-choice", nQ = (e, t) => [
+var _we = "/api/avatar-choices", tQ = "/api/avatar-pick", vwe = "/api/avatar-code-cover", nQ = "/api/avatar-frame", ywe = "/avatar-choice", rQ = (e, t) => [
"avatar-choices",
e,
t
-], rQ = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, iQ = (e, t, n, r = "") => `${iwe}${rQ(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), aQ = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", awe = (e, t, n) => B(nwe + rQ(e, t), n), owe = (e) => V(rwe, { code: e });
-async function swe(e, t, n) {
- let r = await V(tQ, {
+], iQ = (e, t) => `?kind=${encodeURIComponent(e)}&id=${t}`, aQ = (e, t, n, r = "") => `${ywe}${iQ(e, t)}&ref=${encodeURIComponent(n)}` + (r ? `&v=${encodeURIComponent(r)}` : ""), oQ = (e, t) => t.startsWith("cover:") || t.endsWith(":cover") ? e.version : "", bwe = (e, t, n) => B(_we + iQ(e, t), n), xwe = (e) => V(vwe, { code: e });
+async function Swe(e, t, n) {
+ let r = await V(nQ, {
kind: e,
id: t,
ref: n.ref
@@ -61474,31 +61525,31 @@ async function swe(e, t, n) {
bases: r.bases
};
}
-var cwe = (e, t, n) => V(tQ, {
+var Cwe = (e, t, n) => V(nQ, {
kind: e,
id: t,
url: n
-}), lwe = (e, t, n) => oQ(`${tQ}${rQ(e, t)}&name=${encodeURIComponent(n.name)}`, n);
-async function oQ(e, t) {
+}), wwe = (e, t, n) => sQ(`${nQ}${iQ(e, t)}&name=${encodeURIComponent(n.name)}`, n);
+async function sQ(e, t) {
let n = await fetch(e, {
method: "POST",
credentials: "same-origin",
body: t
}), r = await n.json().catch(() => null);
if (n.ok) return r;
- throw new Hn(r?.error || `请求失败(${n.status})`, n.status, r);
+ throw new rr(r?.error || `请求失败(${n.status})`, n.status, r);
}
-function sQ(e, t, n) {
+function cQ(e, t, n) {
let r = t.width === e.width && t.height === e.height;
- return e.focus && r ? YCe(e.focus, t, n) : qZ(t, n);
+ return e.focus && r ? uwe(e.focus, t, n) : JZ(t, n);
}
-var uwe = (e) => e.crop && KZ({
+var Twe = (e) => e.crop && qZ({
width: e.width,
height: e.height
});
-async function dwe(e, t, n) {
+async function Ewe(e, t, n) {
if (!("file" in n)) {
- await V(eQ, {
+ await V(tQ, {
kind: e,
id: t,
...n
@@ -61511,19 +61562,19 @@ async function dwe(e, t, n) {
i.x1,
i.y1
].join(",")}` : "";
- await oQ(`${eQ}${rQ(e, t)}&name=${encodeURIComponent(r.name)}${a}`, r);
+ await sQ(`${tQ}${iQ(e, t)}&name=${encodeURIComponent(r.name)}${a}`, r);
}
-var cQ = 2;
-function fwe(e, t) {
+var lQ = 2;
+function Dwe(e, t) {
if (!t) return e;
let n = t.matched_names.filter((t) => t !== e);
- return n.length ? `${e}:图库里按${`「${n.slice(0, cQ).join("」「")}」`}${n.length > cQ ? `等 ${n.length.toLocaleString()} 个名字` : ""}找到的。` : t.choices.length ? `${e}:换上的那张留在本机,随时能换回来。` : `${e}:还没有备选图片,可输入番号、图片地址或从本机选择。`;
+ return n.length ? `${e}:图库里按${`「${n.slice(0, lQ).join("」「")}」`}${n.length > lQ ? `等 ${n.length.toLocaleString()} 个名字` : ""}找到的。` : t.choices.length ? `${e}:换上的那张留在本机,随时能换回来。` : `${e}:还没有备选图片,可输入番号、图片地址或从本机选择。`;
}
-var pwe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
-function mwe(e) {
- return e?.index_refreshing ? "正在更新图库索引,候选图片会自动显示。" : e?.index_error && e.index_stale ? "图库索引未取得:" + e.index_error : !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${pwe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
+var Owe = (e) => e < 48 ? `${Math.max(1, Math.round(e))} 小时` : `${Math.floor(e / 24)} 天`;
+function kwe(e) {
+ return e?.index_refreshing ? "正在更新图库索引,候选图片会自动显示。" : e?.index_error && e.index_stale ? "图库索引未取得:" + e.index_error : !e || !e.index_stale || e.choices.some((e) => e.source === "gfriends") ? "" : e.index_age_hours === null ? "图库索引还没取过,只能从用过的图里选。" : `图库索引 ${Owe(e.index_age_hours)}没更新,新收的人像这里还查不到。`;
}
-var lQ = (e) => e.cast > 1, hwe = (e) => lQ(e) ? `${e.label}:${e.cast.toLocaleString()} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, gwe = {
+var uQ = (e) => e.cast > 1, Awe = (e) => uQ(e) ? `${e.label}:${e.cast.toLocaleString()} 人合演,先找到她自己的脸,再拖动方框选一块。` : `${e.label}:拖动方框选一块,滚轮或角上那枚方块改大小。`, jwe = {
gfriends: "图库",
history: "用过的",
asset: "作品画面",
@@ -61533,7 +61584,7 @@ var lQ = (e) => e.cast > 1, hwe = (e) => lQ(e) ? `${e.label}:${e.cast.toLocale
social: "社媒头像",
online: "在线作品"
};
-function _we(e) {
+function Mwe(e) {
if (e.startsWith("follow:")) {
let t = e.split(":")[2];
return t === "cover" ? "作品封面" : `内容图片 ${Number(t.replace("image", "") || 0) + 1}`;
@@ -61544,19 +61595,19 @@ function _we(e) {
let n = Number(t.replace("cell", ""));
return Number.isFinite(n) ? `第 ${n + 1} 格` : t;
}
-var vwe = (e) => `${gwe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (lQ(e) ? ` · ${e.cast.toLocaleString()} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : "") + (e.source === "asset" && e.detail && e.detail !== e.label ? ` · ${e.detail}` : ""), ywe = 8, bwe = 3 / 4;
-async function xwe(e, t, n) {
+var Nwe = (e) => `${jwe[e.source] || e.source} · ${e.label}` + (e.width ? ` · ${e.width}×${e.height}` : "") + (uQ(e) ? ` · ${e.cast.toLocaleString()} 人合演` : "") + (e.found_by ? ` · 按「${e.found_by}」找到` : "") + (e.source === "asset" && e.detail && e.detail !== e.label ? ` · ${e.detail}` : ""), Pwe = 8, Fwe = 3 / 4;
+async function Iwe(e, t, n) {
switch (n.via) {
- case "choice": return { choice: await swe(e, t, n.choice) };
- case "code": return { choice: await owe(n.code) };
- case "url": return { choice: await cwe(e, t, n.url) };
+ case "choice": return { choice: await Swe(e, t, n.choice) };
+ case "code": return { choice: await xwe(n.code) };
+ case "url": return { choice: await Cwe(e, t, n.url) };
case "file": return {
- choice: await lwe(e, t, n.file),
+ choice: await wwe(e, t, n.file),
file: n.file
};
}
}
-function Swe({ kind: e, entityId: t, name: n, onPicked: r }) {
+function Lwe({ kind: e, entityId: t, name: n, onPicked: r }) {
let [i, a] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "absolute right-1 bottom-1 z-10",
@@ -61566,17 +61617,17 @@ function Swe({ 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, F.jsx)(ope, {
+ children: /* @__PURE__ */ (0, F.jsx)(gpe, {
"aria-hidden": !0,
className: "size-4"
})
})
- }), /* @__PURE__ */ (0, F.jsx)(Iz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Hz, {
isOpen: i,
onOpenChange: a,
width: "avatar-picker",
label: "更换头像",
- children: /* @__PURE__ */ (0, F.jsx)(Cwe, {
+ children: /* @__PURE__ */ (0, F.jsx)(Rwe, {
kind: e,
entityId: t,
name: n,
@@ -61585,24 +61636,24 @@ function Swe({ kind: e, entityId: t, name: n, onPicked: r }) {
})
})] });
}
-function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
- let a = (0, P.useRef)(null), o = cV(), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(null), p = nQ(e, t), m = (0, P.useRef)(!1), h = Pt({
+function Rwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
+ let a = (0, P.useRef)(null), o = mV(), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(null), p = rQ(e, t), m = (0, P.useRef)(!1), h = Pt({
queryKey: p,
- queryFn: ({ signal: n }) => awe(e, t, n),
+ queryFn: ({ signal: n }) => bwe(e, t, n),
retryOnMount: !0,
refetchOnMount: (e) => e.state.data?.index_stale ? "always" : !1,
refetchInterval: (e) => e.state.data?.index_refreshing && !e.state.error ? 1e3 : !1
});
(0, P.useEffect)(() => () => {
- m.current && H.removeQueries({ queryKey: nQ(e, t) });
+ m.current && H.removeQueries({ queryKey: rQ(e, t) });
}, [e, t]);
let g = Ft({
- mutationFn: (n) => dwe(e, t, n),
+ mutationFn: (n) => Ewe(e, t, n),
onSuccess: () => {
m.current = !0, i(), r();
}
}), _ = Ft({
- mutationFn: (n) => xwe(e, t, n),
+ mutationFn: (n) => Iwe(e, t, n),
onMutate: () => {
g.reset();
},
@@ -61623,39 +61674,39 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
crop: e.crop
} : { file: n }) : g.mutate(e ?? { ref: t.ref });
}
- let x = h.data, S = x?.choices ?? [], C = (g.error ? Wn(g.error) : "") || (!d && _.error ? Wn(_.error) : "") || (h.error ? Wn(h.error) : ""), w = g.isPending || _.isPending, T = d ? "" : mwe(x), E = !!C && !!h.error && C === Wn(h.error), D = h.isPending || S.length > 0;
+ let x = h.data, S = x?.choices ?? [], C = (g.error ? ar(g.error) : "") || (!d && _.error ? ar(_.error) : "") || (h.error ? ar(h.error) : ""), w = g.isPending || _.isPending, T = d ? "" : kwe(x), E = !!C && !!h.error && C === ar(h.error), D = h.isPending || S.length > 0;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, F.jsx)(Lz, { children: /* @__PURE__ */ (0, F.jsx)(Dz, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, F.jsx)(Uz, { children: /* @__PURE__ */ (0, F.jsx)(Nz, { className: "size-6" }) }),
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, F.jsx)(FI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(VI, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: d ? "框出头像那一块" : "更换头像"
- }), !d && S.length ? /* @__PURE__ */ (0, F.jsxs)(aZ, {
+ }), !d && S.length ? /* @__PURE__ */ (0, F.jsxs)(oZ, {
color: "soft",
children: [S.length.toLocaleString(), " 张可选"]
}) : null]
}),
/* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: d ? hwe(d.choice) : fwe(n, x)
+ children: d ? Awe(d.choice) : Dwe(n, x)
}),
- T ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ T ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: T
}) : null,
- C ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ C ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: E ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(h.isFetching),
+ ...Yz(h.isFetching),
onClick: () => {
h.isFetching || h.refetch();
},
@@ -61665,14 +61716,14 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}) : null
]
}),
- /* @__PURE__ */ (0, F.jsx)(ZF, {
- icon: hz,
+ /* @__PURE__ */ (0, F.jsx)(rI, {
+ icon: xz,
size: "small",
"aria-label": "关闭",
onClick: i
})
]
- }), d ? /* @__PURE__ */ (0, F.jsx)(Twe, {
+ }), d ? /* @__PURE__ */ (0, F.jsx)(Bwe, {
kind: e,
entityId: t,
choice: d.choice,
@@ -61692,7 +61743,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
"aria-busy": h.isPending || void 0,
"data-skeleton": h.isPending ? "avatar-choices" : void 0,
className: "inline-grid grid-cols-3 content-start gap-2 sm:grid-cols-4",
- children: h.isPending ? Array.from({ length: ywe }, (e, t) => /* @__PURE__ */ (0, F.jsxs)("span", {
+ children: h.isPending ? Array.from({ length: Pwe }, (e, t) => /* @__PURE__ */ (0, F.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",
@@ -61705,8 +61756,8 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
role: "option",
"data-avatar-choice": !0,
"aria-selected": n.current,
- title: vwe(n),
- ...Uz(w),
+ title: Nwe(n),
+ ...Yz(w),
onClick: () => {
w || (n.crop ? (g.reset(), _.reset(), f({ choice: n })) : _.mutate({
via: "choice",
@@ -61715,8 +61766,8 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
},
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, F.jsx)(wwe, {
- src: iQ(e, t, n.ref, aQ(n, n.ref)),
+ /* @__PURE__ */ (0, F.jsx)(zwe, {
+ src: aQ(e, t, n.ref, oQ(n, n.ref)),
choice: n
}),
/* @__PURE__ */ (0, F.jsx)("span", {
@@ -61725,15 +61776,15 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}),
n.current ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "absolute top-1 left-1",
- children: /* @__PURE__ */ (0, F.jsx)(aZ, {
+ children: /* @__PURE__ */ (0, F.jsx)(oZ, {
variant: "caption",
color: "gray",
children: "在用"
})
}) : null,
- lQ(n) ? /* @__PURE__ */ (0, F.jsx)("span", {
+ uQ(n) ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "absolute top-1 right-1",
- children: /* @__PURE__ */ (0, F.jsxs)(aZ, {
+ children: /* @__PURE__ */ (0, F.jsxs)(oZ, {
variant: "caption",
color: "gray",
children: [n.cast.toLocaleString(), " 人"]
@@ -61755,7 +61806,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
},
children: [/* @__PURE__ */ (0, F.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, F.jsx)(Fz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Vz, {
"aria-label": "番号",
placeholder: "番号,如 ABW-232",
value: l,
@@ -61765,7 +61816,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
type: "submit",
variant: "secondary",
disabled: !l.trim(),
- ...Uz(v("code")),
+ ...Yz(v("code")),
children: "取封面来框"
})]
}), /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -61774,7 +61825,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
onClick: () => a.current?.click(),
- ...Uz(v("file")),
+ ...Yz(v("file")),
children: "从本机选图片"
}),
/* @__PURE__ */ (0, F.jsx)("input", {
@@ -61794,7 +61845,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
className: "flex min-w-0 flex-1 basis-56 items-center gap-2",
children: [/* @__PURE__ */ (0, F.jsx)("div", {
className: "min-w-0 flex-1",
- children: /* @__PURE__ */ (0, F.jsx)(Fz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Vz, {
type: "url",
"aria-label": "图片地址",
placeholder: "https://…",
@@ -61804,7 +61855,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
}), /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
disabled: !s.trim(),
- ...Uz(v("url")),
+ ...Yz(v("url")),
onClick: () => {
w || _.mutate({
via: "url",
@@ -61818,7 +61869,7 @@ function Cwe({ kind: e, entityId: t, name: n, onPicked: r, close: i }) {
})]
})] })] });
}
-function wwe({ src: e, choice: t }) {
+function zwe({ src: e, choice: t }) {
let n = (0, P.useRef)(null), [r, i] = (0, P.useState)(!1), [a, o] = (0, P.useState)(!1);
(0, P.useEffect)(() => {
n.current?.complete && n.current.naturalWidth && i(!0);
@@ -61826,7 +61877,7 @@ function wwe({ src: e, choice: t }) {
let s = {
width: t.width,
height: t.height
- }, c = uwe(t) ? $Ce(sQ(t, s, bwe), s) : null, l = r || a ? !0 : void 0;
+ }, c = Twe(t) ? mwe(cQ(t, s, Fwe), s) : null, l = r || a ? !0 : void 0;
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-choice-lost": a || void 0,
className: "relative block w-full aspect-avatar-choice overflow-hidden",
@@ -61852,23 +61903,23 @@ function wwe({ src: e, choice: t }) {
})]
});
}
-function Twe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
- let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, P.useState)(o[0]), [l, u] = (0, P.useState)(null), [d, f] = (0, P.useState)(null), p = aQ(n, s), m = iQ(e, t, s, p), h = cV();
+function Bwe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a }) {
+ let o = n.bases.length ? n.bases : [n.ref], [s, c] = (0, P.useState)(o[0]), [l, u] = (0, P.useState)(null), [d, f] = (0, P.useState)(null), p = oQ(n, s), m = aQ(e, t, s, p), h = mV();
function g(e) {
c(e), u(null), f(null);
}
- let _ = d && l ? QCe(d, l) : null;
+ let _ = d && l ? pwe(d, l) : null;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("div", {
ref: h,
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: [m ? /* @__PURE__ */ (0, F.jsx)($Z, {
+ children: [m ? /* @__PURE__ */ (0, F.jsx)(eQ, {
src: m,
aspect: 1,
box: d,
size: l,
label: `${n.label} 的头像取景框`,
onSize: (e) => {
- u(e), KZ(e) && f(s === n.ref ? sQ(n, e, 1) : qZ(e, 1));
+ u(e), qZ(e) && f(s === n.ref ? cQ(n, e, 1) : JZ(e, 1));
},
onBox: f
}) : null, o.length > 1 ? /* @__PURE__ */ (0, F.jsx)("div", {
@@ -61882,7 +61933,7 @@ function Twe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
"data-crop-base": !0,
onClick: () => g(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: _we(e)
+ children: Mwe(e)
}, e))
}) : null]
}), /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -61902,12 +61953,12 @@ function Twe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
onClick: i,
- ...Uz(r),
+ ...Yz(r),
children: "返回备选图片"
}),
n.crop ? null : /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(r),
+ ...Yz(r),
onClick: () => {
r || a(null);
},
@@ -61915,7 +61966,7 @@ function Twe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
}),
/* @__PURE__ */ (0, F.jsx)(q, {
disabled: !d || !l,
- ...Uz(r),
+ ...Yz(r),
onClick: () => {
d && !r && a({
ref: s,
@@ -61930,9 +61981,9 @@ function Twe({ kind: e, entityId: t, choice: n, busy: r, back: i, confirm: a })
})] });
}
// src/react/components/source-picture.tsx
-var uQ = (e, t, n = 0) => `/jav-image?code=${encodeURIComponent(e)}&image=${encodeURIComponent(t)}${n ? `&attempt=${n}` : ""}`;
-function dQ({ item: e, image: t, thumbnail: n = !1 }) {
- let [r, i] = (0, P.useState)(0), [a, o] = (0, P.useState)(null), [s, c] = (0, P.useState)(""), l = (0, P.useRef)(null), u = t === "cover" && e.has_cover, d = !u && (t !== "cover" || e.source_image), f = n ? "" : t === "cover" ? `${e.code} 封面` : `${e.code} 预览 ${Number(t) + 1}`, p = d ? uQ(e.code, t, r) : u ? Wa(e, !0) : e.cover_url || "";
+var dQ = (e, t, n = 0) => `/jav-image?code=${encodeURIComponent(e)}&image=${encodeURIComponent(t)}${n ? `&attempt=${n}` : ""}`;
+function fQ({ item: e, image: t, thumbnail: n = !1 }) {
+ let [r, i] = (0, P.useState)(0), [a, o] = (0, P.useState)(null), [s, c] = (0, P.useState)(""), l = (0, P.useRef)(null), u = t === "cover" && e.has_cover, d = !u && (t !== "cover" || e.source_image), f = n ? "" : t === "cover" ? `${e.code} 封面` : `${e.code} 预览 ${Number(t) + 1}`, p = d ? dQ(e.code, t, r) : u ? ao(e, !0) : e.cover_url || "";
if ((0, P.useLayoutEffect)(() => {
let e = l.current;
e?.complete && e.naturalWidth > 0 && o({
@@ -61951,14 +62002,14 @@ function dQ({ item: e, image: t, thumbnail: n = !1 }) {
})
}) : n ? /* @__PURE__ */ (0, F.jsx)("span", { children: "预览未取得" }) : /* @__PURE__ */ (0, F.jsx)("div", {
"data-jav-picture-wait": "",
- children: /* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "封面未取得"
})
});
if (s === p) return n ? /* @__PURE__ */ (0, F.jsx)("span", { children: "预览未取得" }) : /* @__PURE__ */ (0, F.jsx)("div", {
"data-jav-picture-wait": "",
- children: /* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -62013,7 +62064,7 @@ function dQ({ item: e, image: t, thumbnail: n = !1 }) {
] });
}
// src/react/components/source-avatar.tsx
-function fQ({ code: e, person: t, detail: n = !1 }) {
+function pQ({ code: e, person: t, detail: n = !1 }) {
let r = (0, P.useRef)(null), [i, a] = (0, P.useState)(n || typeof IntersectionObserver > "u");
(0, P.useEffect)(() => {
if (!r.current || i) return;
@@ -62025,9 +62076,9 @@ function fQ({ code: e, person: t, detail: n = !1 }) {
let o = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("span", {
ref: r,
"data-source-initial": "",
- children: Fn(t.name)
+ children: Xn(t.name)
}), i && t.source_actor_id ? /* @__PURE__ */ (0, F.jsx)("img", {
- src: uQ(e, `actor:${t.source_actor_id}`),
+ src: dQ(e, `actor:${t.source_actor_id}`),
alt: "",
"data-drop": "self"
}) : null] });
@@ -62037,8 +62088,8 @@ function fQ({ code: e, person: t, detail: n = !1 }) {
}) : o;
}
// src/react/feed-new/feed-new-row.tsx
-function pQ({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
- let a = (0, P.useContext)(OU), o = (0, P.useRef)(null), [s, c] = (0, P.useState)([]), l = e?.items.length ? e.html : "";
+function mQ({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
+ let a = (0, P.useContext)(PU), o = (0, P.useRef)(null), [s, c] = (0, P.useState)([]), l = e?.items.length ? e.html : "";
(0, P.useLayoutEffect)(() => {
t.removeAttribute("aria-busy"), t.hidden = !l, e && i?.(!!l);
}, [
@@ -62070,7 +62121,7 @@ function pQ({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
u(e);
},
dangerouslySetInnerHTML: { __html: l }
- }), s.map((e, t) => (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(fQ, {
+ }), s.map((e, t) => (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(pQ, {
code: e.dataset.code,
person: {
name: e.dataset.name,
@@ -62079,8 +62130,8 @@ function pQ({ feedNew: e, host: t, wire: n, act: r, settled: i }) {
}), e, `${l.length}:${t}`))] }) : null;
}
// src/react/entity-hero/glyph.tsx
-function mQ({ name: e }) {
- let { wide: t, viewBox: n } = rn(e);
+function hQ({ name: e }) {
+ let { wide: t, viewBox: n } = yn(e);
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: n,
"aria-hidden": "true",
@@ -62089,20 +62140,20 @@ function mQ({ name: e }) {
});
}
// src/react/entity-hero/hero-pop.tsx
-function hQ(e, t) {
+function gQ(e, t) {
t.style.removeProperty("max-height");
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, a = innerHeight - 8 - i, o = n.top - 16, s = r.height <= a || r.height > o && a >= o, c = Math.max(0, s ? a : o);
r.height > c && (t.style.maxHeight = `${c}px`), t.style.top = `${s ? i : n.top - 8 - Math.min(r.height, c)}px`;
}
-var gQ = (e) => !!e?.isConnected && e.matches(":popover-open");
-function _Q(e, t, n, r) {
+var _Q = (e) => !!e?.isConnected && e.matches(":popover-open");
+function vQ(e, t, n, r) {
let i = (0, P.useRef)(r);
i.current = r, (0, P.useEffect)(() => {
if (!e) return;
let r = () => {
- t.current && gQ(n.current) ? hQ(t.current, n.current) : i.current();
+ t.current && _Q(n.current) ? gQ(t.current, n.current) : i.current();
};
return addEventListener("scroll", r, {
capture: !0,
@@ -62116,17 +62167,17 @@ function _Q(e, t, n, r) {
n
]);
}
-function vQ({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
+function yQ({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
let o = (0, P.useRef)(null), s = (0, P.useRef)(null), [c, l] = (0, P.useState)(!1), u = (0, P.useRef)(!1), d = (0, P.useRef)(0), f = () => {
- clearTimeout(d.current), u.current = !1, gQ(s.current) && s.current.hidePopover(), l(!1);
+ clearTimeout(d.current), u.current = !1, _Q(s.current) && s.current.hidePopover(), l(!1);
}, p = () => {
- clearTimeout(d.current), s.current && o.current && !gQ(s.current) && (s.current.showPopover(), hQ(o.current, s.current), l(!0));
+ clearTimeout(d.current), s.current && o.current && !_Q(s.current) && (s.current.showPopover(), gQ(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 _Q(c, o, s, f), (0, P.useEffect)(() => {
+ return vQ(c, o, s, f), (0, P.useEffect)(() => {
if (!c) return;
let e = (e) => {
let t = e.target;
@@ -62152,7 +62203,7 @@ function vQ({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
u.current ? f() : (p(), u.current = !0);
},
onKeyDown: (e) => {
- e.key === "Escape" && gQ(s.current) && (e.preventDefault(), f());
+ e.key === "Escape" && _Q(s.current) && (e.preventDefault(), f());
},
children: ["+", t]
}), /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -62170,16 +62221,16 @@ function vQ({ id: e, rest: t, label: n, heading: r, hook: i, children: a }) {
}), a]
})] });
}
-function Ewe({ following: e, busy: t, onToggle: n, tip: r }) {
+function Vwe({ following: e, busy: t, onToggle: n, tip: r }) {
let i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)(null), [s, c] = (0, P.useState)(!1), l = (0, P.useRef)(!1), u = () => {
- gQ(o.current) && o.current.hidePopover(), c(!1);
+ _Q(o.current) && o.current.hidePopover(), c(!1);
}, d = () => {
- !l.current && o.current && i.current && !gQ(o.current) && (o.current.showPopover(), hQ(i.current, o.current), c(!0));
+ !l.current && o.current && i.current && !_Q(o.current) && (o.current.showPopover(), gQ(i.current, o.current), c(!0));
}, f = () => {
l.current = !1, u();
};
- return _Q(s, i, o, () => c(!1)), (0, P.useEffect)(() => {
- i.current && gQ(o.current) && hQ(i.current, o.current);
+ return vQ(s, i, o, () => c(!1)), (0, P.useEffect)(() => {
+ i.current && _Q(o.current) && gQ(i.current, o.current);
}, [r]), /* @__PURE__ */ (0, F.jsxs)("label", {
ref: i,
"data-entry-feed": "",
@@ -62188,7 +62239,7 @@ function Ewe({ following: e, busy: t, onToggle: n, tip: r }) {
a.current?.matches(":focus-visible") || f();
},
children: [
- /* @__PURE__ */ (0, F.jsx)(mQ, { name: "rss" }),
+ /* @__PURE__ */ (0, F.jsx)(hQ, { name: "rss" }),
/* @__PURE__ */ (0, F.jsx)("input", {
ref: a,
type: "checkbox",
@@ -62222,29 +62273,29 @@ function Ewe({ following: e, busy: t, onToggle: n, tip: r }) {
});
}
// src/react/entity-hero/name-picker.tsx
-function Dwe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
+function Hwe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let [i, a] = (0, P.useState)(!1), o = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
o.current?.setAttribute("title", "名字与别名");
- }, []), /* @__PURE__ */ (0, F.jsxs)(kde, {
+ }, []), /* @__PURE__ */ (0, F.jsxs)(zde, {
isOpen: i,
onOpenChange: a,
- children: [/* @__PURE__ */ (0, F.jsx)(NI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(zI, {
ref: o,
"data-namepick-toggle": "",
"aria-label": "名字与别名",
- children: /* @__PURE__ */ (0, F.jsx)(mQ, { name: "chevron-down" })
- }), /* @__PURE__ */ (0, F.jsx)(oR, {
+ children: /* @__PURE__ */ (0, F.jsx)(hQ, { name: "chevron-down" })
+ }), /* @__PURE__ */ (0, F.jsx)(fR, {
placement: "bottom start",
offset: 8,
containerPadding: 8,
- className: eV,
+ className: oV,
"data-namepick-menu": "",
- children: /* @__PURE__ */ (0, F.jsxs)(jde, {
+ children: /* @__PURE__ */ (0, F.jsxs)(Vde, {
"aria-label": "名字与别名",
"data-namepick-list": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(mR, {
+ /* @__PURE__ */ (0, F.jsx)(bR, {
selectionMode: "single",
disallowEmptySelection: !0,
selectedKeys: [e],
@@ -62252,31 +62303,34 @@ function Dwe({ current: e, choices: t, onChoose: n, onAddAlias: r }) {
let r = [...t][0];
r && r !== e && n(r);
},
- children: t.map((e) => /* @__PURE__ */ (0, F.jsxs)(gR, {
- id: e,
- textValue: e,
- "data-namepick-name": e,
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "check" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e })]
- }, e))
+ children: t.map((e) => /* @__PURE__ */ (0, F.jsxs)(SR, {
+ id: e.value,
+ textValue: e.label,
+ "data-namepick-name": e.value,
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "check" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e.label })]
+ }, e.value))
}),
- /* @__PURE__ */ (0, F.jsx)(fde, { "data-namepick-rule": "" }),
- /* @__PURE__ */ (0, F.jsx)(mR, { children: /* @__PURE__ */ (0, F.jsxs)(gR, {
+ /* @__PURE__ */ (0, F.jsx)(Sde, { "data-namepick-rule": "" }),
+ /* @__PURE__ */ (0, F.jsx)(bR, { children: /* @__PURE__ */ (0, F.jsxs)(SR, {
id: "alias",
textValue: "添加别名",
"data-namepick-alias": "",
onAction: r,
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "plus" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "添加别名…" })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "plus" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "添加别名…" })]
}) })
]
})
})]
});
}
-var Owe = (e) => e === "studio" || e === "agency", yQ = (e) => e === "performer" || e === "creator", kwe = (e) => e ? "已订阅新作,点击取消订阅" : "订阅新作";
-function Awe(e) {
- return [e.canonical_name, ...e.aliases || []].filter((e, t, n) => e && n.indexOf(e) === t);
+var Uwe = (e) => e === "studio" || e === "agency", bQ = (e) => e === "performer" || e === "creator", Wwe = (e) => e ? "已订阅新作,点击取消订阅" : "订阅新作";
+function Gwe(e, t = "zh-CN") {
+ return e.name_display ? e.name_display.choices[t] : [e.canonical_name, ...e.aliases || []].filter((e, t, n) => e && n.indexOf(e) === t).map((e) => ({
+ value: e,
+ label: e
+ }));
}
-function bQ(e) {
+function xQ(e) {
if (e.agency) return {
name: e.agency.canonical_name,
linked: !0,
@@ -62288,13 +62342,13 @@ function bQ(e) {
linked: !1
} : null;
}
-function xQ(e, t) {
- let n = Dn(e, "performer"), r = wn(t);
- return r && [e.label, n].map(wn).some((e) => e && (r.includes(e) || e.includes(r))) ? `${t} 官方资料` : n || e.label || "";
+function SQ(e, t) {
+ let n = Hn(e, "performer"), r = zn(t);
+ return r && [e.label, n].map(zn).some((e) => e && (r.includes(e) || e.includes(r))) ? `${t} 官方资料` : n || e.label || "";
}
-var SQ = (e) => ({ site: bn(e) });
-function jwe(e, t) {
- let n = bQ(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
+var CQ = (e) => ({ site: Fn(e) });
+function Kwe(e, t) {
+ let n = xQ(e)?.name || "", r = (e.entry_links || []).filter((e) => e.slot === "pill").map((e) => ({
type: "icon",
url: e.url,
title: e.label,
@@ -62304,7 +62358,7 @@ function jwe(e, t) {
let t = e.retired_year ? `已于 ${e.retired_year} 年隐退` : "链接已失效";
return {
type: "gone",
- title: `${xQ(e, n)} · ${t}`
+ title: `${SQ(e, n)} · ${t}`
};
}
let r = e.url || "";
@@ -62312,32 +62366,32 @@ function jwe(e, t) {
type: "private",
label: e.label || e.hostname || "已记录"
};
- if (yQ(t) && e.link_kind !== "social") return {
+ if (bQ(t) && e.link_kind !== "social") return {
type: "icon",
url: r,
- title: xQ(e, n),
- mark: SQ(e)
+ title: SQ(e, n),
+ mark: CQ(e)
};
if (e.link_kind === "social") {
- let t = Cn(r);
+ let t = Rn(r);
return {
type: "icon",
url: r,
title: e.label || "",
- mark: t ? { brand: t } : SQ(e)
+ mark: t ? { brand: t } : CQ(e)
};
}
return {
type: "url",
url: r,
title: e.label || "",
- text: Dn(e, t, i),
- mark: SQ(e)
+ text: Hn(e, t, i),
+ mark: CQ(e)
};
});
- return [...r, ...Mwe(a)];
+ return [...r, ...qwe(a)];
}
-function Mwe(e) {
+function qwe(e) {
let t = e.filter((e) => e.type === "private");
return t.length < 2 ? e : [...e.filter((e) => e.type !== "private"), {
type: "private",
@@ -62345,8 +62399,8 @@ function Mwe(e) {
sources: t.map((e) => e.label)
}];
}
-var CQ = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
-function Nwe(e) {
+var wQ = (e) => (e.entry_links || []).filter((e) => e.slot === "mark");
+function Jwe(e) {
return [
[
"legal_name",
@@ -62402,7 +62456,7 @@ function Nwe(e) {
}]
}] : []);
}
-function Pwe(e) {
+function Ywe(e) {
if (!e) return [];
let t = [];
e.birth_date && t.push({
@@ -62459,14 +62513,14 @@ function Pwe(e) {
tags: e.tags
}), t;
}
-function wQ(e, t = 4) {
+function TQ(e, t = 4) {
let n = e.length > t + 1 ? t : e.length;
return {
shown: e.slice(0, n),
rest: e.length - n
};
}
-function Fwe(e) {
+function Xwe(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 ? {
@@ -62476,43 +62530,44 @@ function Fwe(e) {
} : null;
}
// src/react/entity-hero/entity-hero-page.tsx
-function Iwe(e) {
- return Xa({
+function Zwe(e) {
+ return fo({
id: e.id,
hasImage: e.has_image,
version: e.image_version,
rep: e.has_avatar ? e.rep : null,
- style: eo(e.avatar_focus),
+ style: go(e.avatar_focus),
focus: e.avatar_focus,
standIn: e.avatar_stand_in
});
}
-function Lwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
- let s = yQ(e), c = Owe(e), l = s ? Pwe(n.profile) : c ? Nwe(n.company_profile) : [], u = jwe(n, e), d = CQ(n), f = e === "agency" ? [] : n.related_performers || [], p = (0, P.useRef)(null), m = (0, P.useRef)(null);
+function Qwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a, helpers: o }) {
+ tI();
+ let s = Qt(e, n.canonical_name, Number(n.id)), c = $t(e, n.canonical_name, Number(n.id)), l = bQ(e), u = Uwe(e), d = l ? Ywe(n.profile) : u ? Jwe(n.company_profile) : [], f = Kwe(n, e), p = wQ(n), m = e === "agency" ? [] : n.related_performers || [], h = (0, P.useRef)(null), g = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
- o.wireScroller(p.current);
- }, [o, u.length]), (0, P.useEffect)(() => {
- o.wireScroller(m.current);
- }, [o, f.length]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("section", {
+ o.wireScroller(h.current);
+ }, [o, f.length]), (0, P.useEffect)(() => {
+ o.wireScroller(g.current);
+ }, [o, m.length]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("section", {
"data-entity-card": "",
"aria-label": "资料",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
- "data-entity-profile": l.length ? "facts" : "",
+ "data-entity-profile": d.length ? "facts" : "",
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-entity-portrait-wrap": "",
- children: [/* @__PURE__ */ (0, F.jsx)(Rwe, {
+ children: [/* @__PURE__ */ (0, F.jsx)($we, {
kind: e,
- name: t,
+ name: s,
helpers: o,
- people: s,
- company: c
- }), s && n.id ? /* @__PURE__ */ (0, F.jsx)("span", {
+ people: l,
+ company: u
+ }), l && n.id ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-avatar-picker": "",
- children: /* @__PURE__ */ (0, F.jsx)(Swe, {
+ children: /* @__PURE__ */ (0, F.jsx)(Lwe, {
kind: e,
entityId: Number(n.id),
- name: n.canonical_name || t,
+ name: s || t,
onPicked: a.avatarPicked
})
}) : null]
@@ -62523,14 +62578,18 @@ function Lwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-entity-title": "",
children: [
- /* @__PURE__ */ (0, F.jsx)("h2", { children: n.canonical_name }),
- e === "tag" ? null : /* @__PURE__ */ (0, F.jsx)(Dwe, {
+ /* @__PURE__ */ (0, F.jsx)("h2", {
+ lang: xF(s),
+ title: c || void 0,
+ children: s
+ }),
+ e === "tag" ? null : /* @__PURE__ */ (0, F.jsx)(Hwe, {
current: n.canonical_name,
- choices: Awe(n),
+ choices: Gwe(n, qt()),
onChoose: a.chooseName,
onAddAlias: a.addAlias
}),
- n.id ? /* @__PURE__ */ (0, F.jsx)(tB, { item: {
+ n.id ? /* @__PURE__ */ (0, F.jsx)(sB, { item: {
entity_id: Number(n.id),
kind: e,
name: n.canonical_name || t,
@@ -62538,7 +62597,13 @@ function Lwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
} }) : null
]
}),
- /* @__PURE__ */ (0, F.jsx)(zwe, {
+ c ? /* @__PURE__ */ (0, F.jsx)("span", {
+ "data-name-fallback": "",
+ "data-copy-key": `performer-name-fallback.${qt()}`,
+ className: "text-caption-1-regular text-text-secondary",
+ children: c
+ }) : null,
+ /* @__PURE__ */ (0, F.jsx)(eTe, {
kind: e,
entity: n,
actions: a
@@ -62546,7 +62611,7 @@ function Lwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
n.related_identities?.length ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "flex min-w-0 flex-wrap gap-2 text-caption-1-regular text-text-secondary",
children: n.related_identities.map((e) => {
- let t = `${e.relation === "same_person" ? "同一人" : "关联账号"}:${e.canonical_name}`;
+ let t = `${e.relation === "same_person" ? "同一人" : "关联账号"}:${Qt(e.kind, e.canonical_name, e.id)}`;
return /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
title: t,
@@ -62556,120 +62621,124 @@ function Lwe({ kind: e, name: t, entity: n, feedNew: r, feedHost: i, actions: a,
}, e.id);
})
}) : null,
- u.length ? /* @__PURE__ */ (0, F.jsx)("div", {
- ref: p,
+ f.length ? /* @__PURE__ */ (0, F.jsx)("div", {
+ ref: h,
"data-entity-links": "",
- children: u.map((e, t) => /* @__PURE__ */ (0, F.jsx)(Gwe, { link: e }, t))
+ children: f.map((e, t) => /* @__PURE__ */ (0, F.jsx)(oTe, { link: e }, t))
}) : null,
- d.length || n.feed ? /* @__PURE__ */ (0, F.jsx)(Kwe, {
+ p.length || n.feed ? /* @__PURE__ */ (0, F.jsx)(sTe, {
entity: n,
actions: a,
helpers: o
}) : null,
- n.follow?.held.length ? /* @__PURE__ */ (0, F.jsx)(Hwe, {
+ n.follow?.held.length ? /* @__PURE__ */ (0, F.jsx)(rTe, {
follow: n.follow,
entity: n,
actions: a
}) : null
]
}),
- l.length ? /* @__PURE__ */ (0, F.jsx)("dl", {
+ d.length ? /* @__PURE__ */ (0, F.jsx)("dl", {
"data-entity-facts": "",
- children: l.map((e) => /* @__PURE__ */ (0, F.jsx)(Uwe, {
+ children: d.map((e) => /* @__PURE__ */ (0, F.jsx)(iTe, {
glyph: e.glyph,
label: e.label,
clip: e.clip,
- children: e.tags ? /* @__PURE__ */ (0, F.jsx)(Wwe, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, F.jsxs)("span", {
+ children: e.tags ? /* @__PURE__ */ (0, F.jsx)(aTe, { tags: e.tags }) : e.parts.map((e, t) => /* @__PURE__ */ (0, F.jsxs)("span", {
"data-fact-tone": e.tone === "plain" ? void 0 : e.tone,
children: [t ? " " : "", e.text]
}, t))
}, e.label))
}) : null
]
- }), f.length ? /* @__PURE__ */ (0, F.jsx)("div", {
+ }), m.length ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-entity-foot": "",
"aria-label": "同台艺人",
children: /* @__PURE__ */ (0, F.jsx)("div", {
- ref: m,
+ ref: g,
"data-related-people": "",
- children: f.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
+ children: m.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-related-performer": e.k,
onClick: () => a.openEntity("performer", e.k),
children: [/* @__PURE__ */ (0, F.jsx)("span", {
"data-hero-ring": "",
- dangerouslySetInnerHTML: { __html: `<span>${z(Fn(e.k))}</span>${Iwe(e)}` }
+ dangerouslySetInnerHTML: { __html: `<span>${z(Xn(Qt("performer", e.k, e.id)))}</span>${Zwe(e)}` }
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-hero-costar-name": "",
- children: e.k
+ children: Qt("performer", e.k, e.id)
})]
}, e.k))
})
}) : null]
- }), i ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(pQ, {
+ }), i ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(mQ, {
feedNew: r,
host: i,
wire: o.wireFeedRow,
act: (e, t) => a.feedAction(e, t)
}), i) : null] });
}
-function Rwe({ kind: e, name: t, helpers: n, people: r, company: i }) {
- let [a] = (0, P.useState)(() => `${n.portraitImg()}<span>${z(Fn(t))}</span>`);
- return /* @__PURE__ */ (0, F.jsx)("div", {
+function $we({ kind: e, name: t, helpers: n, people: r, company: i }) {
+ let a = (0, P.useRef)(null), [o] = (0, P.useState)(() => `${n.portraitImg()}<span data-portrait-initial="">${z(Xn(t))}</span>`);
+ return (0, P.useLayoutEffect)(() => {
+ let e = a.current?.querySelector("[data-portrait-initial]");
+ e && (e.textContent = Xn(t));
+ }, [t]), /* @__PURE__ */ (0, F.jsx)("div", {
"data-entity-portrait": r ? "round" : "square",
"data-fit-native": i ? "mark" : "portrait",
+ ref: a,
"data-entity-kind": e,
- dangerouslySetInnerHTML: { __html: a }
+ dangerouslySetInnerHTML: { __html: o }
});
}
-function zwe({ kind: e, entity: t, actions: n }) {
- let r = bQ(t), i = (e, t) => (r) => {
+function eTe({ kind: e, entity: t, actions: n }) {
+ let r = xQ(t), i = (e, t) => (r) => {
r.preventDefault(), n.openEntity(e, t);
}, a = r ? r.linked ? /* @__PURE__ */ (0, F.jsx)("a", {
- href: hn("agency", r.name, r.id),
+ href: An("agency", r.name, r.id),
"data-agency": r.name,
onClick: i("agency", r.name),
children: r.name
}) : r.name : null, o = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("b", { children: t.asset_count.toLocaleString() }), " 个视频"] });
if (e === "performer" || e === "creator") {
- let e = Fwe(t.name_groups);
+ let e = t.name_display?.groups[qt()] ?? t.name_groups, r = Xwe(e);
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-entity-alias": "meta",
children: [
- /* @__PURE__ */ (0, F.jsx)(TQ, { entity: t }),
+ /* @__PURE__ */ (0, F.jsx)(EQ, { entity: t }),
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "film" }), /* @__PURE__ */ (0, F.jsx)("span", { children: o })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "film" }), /* @__PURE__ */ (0, F.jsx)("span", { children: o })]
}),
- t.follow?.key ? /* @__PURE__ */ (0, F.jsx)(Vwe, {
+ t.follow?.key ? /* @__PURE__ */ (0, F.jsx)(nTe, {
follow: t.follow,
actions: n
}) : null,
a ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "briefcase" }), /* @__PURE__ */ (0, F.jsx)("span", { children: a })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "briefcase" }), /* @__PURE__ */ (0, F.jsx)("span", { children: a })]
}) : null,
- e ? /* @__PURE__ */ (0, F.jsxs)("div", {
+ r ? /* @__PURE__ */ (0, F.jsxs)("div", {
"data-meta-item": "names",
children: [
- /* @__PURE__ */ (0, F.jsx)(mQ, { name: "id-card" }),
+ /* @__PURE__ */ (0, F.jsx)(hQ, { name: "id-card" }),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-alias-names": "",
title: "别名",
- children: e.names.map((e, t) => /* @__PURE__ */ (0, F.jsx)("span", {
- lang: mF(e),
+ children: r.names.map((e, t) => /* @__PURE__ */ (0, F.jsx)("span", {
+ lang: xF(e),
children: e
}, t))
}),
- e.rest > 0 ? /* @__PURE__ */ (0, F.jsx)(vQ, {
+ r.rest > 0 ? /* @__PURE__ */ (0, F.jsx)(yQ, {
id: "entityAliasPop",
hook: "alias",
- rest: e.rest,
- label: `另外 ${e.rest.toLocaleString()} 个别名`,
- heading: `${e.total.toLocaleString()} 个别名`,
- children: /* @__PURE__ */ (0, F.jsx)("dl", { children: (t.name_groups?.groups || []).map((e, t) => /* @__PURE__ */ (0, F.jsx)(EQ, {
+ rest: r.rest,
+ label: `另外 ${r.rest.toLocaleString()} 个别名`,
+ heading: `${r.total.toLocaleString()} 个别名`,
+ children: /* @__PURE__ */ (0, F.jsx)("dl", { children: (e?.groups || []).map((e, t) => /* @__PURE__ */ (0, F.jsx)(DQ, {
label: e.label,
names: e.names
}, t)) })
@@ -62691,61 +62760,61 @@ function zwe({ kind: e, entity: t, actions: n }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-entity-alias": "meta",
children: [
- e === "creator" ? /* @__PURE__ */ (0, F.jsx)(TQ, { entity: t }) : null,
+ e === "creator" ? /* @__PURE__ */ (0, F.jsx)(EQ, { entity: t }) : null,
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
title: "视频",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "film" }), /* @__PURE__ */ (0, F.jsxs)("span", { children: [o, c] })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "film" }), /* @__PURE__ */ (0, F.jsxs)("span", { children: [o, c] })]
}),
a ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
title: "事务所",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "briefcase" }), /* @__PURE__ */ (0, F.jsx)("span", { children: a })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "briefcase" }), /* @__PURE__ */ (0, F.jsx)("span", { children: a })]
}) : null,
l ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
title: "片商",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "clapperboard" }), /* @__PURE__ */ (0, F.jsx)("a", {
- href: hn("studio", l.name, l.id),
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "clapperboard" }), /* @__PURE__ */ (0, F.jsx)("a", {
+ href: An("studio", l.name, l.id),
"data-studio-link": l.name,
onClick: i("studio", l.name),
children: l.name
})]
}) : null,
- s.length ? /* @__PURE__ */ (0, F.jsx)(Bwe, { aliases: s }) : null
+ s.length ? /* @__PURE__ */ (0, F.jsx)(tTe, { aliases: s }) : null
]
});
}
-function Bwe({ aliases: e }) {
- let { shown: t, rest: n } = wQ(e, 3);
+function tTe({ aliases: e }) {
+ let { shown: t, rest: n } = TQ(e, 3);
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-meta-item": "names",
"data-company-names": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(mQ, { name: "id-card" }),
+ /* @__PURE__ */ (0, F.jsx)(hQ, { name: "id-card" }),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-alias-names": "",
title: "别名",
children: t.map((e, t) => /* @__PURE__ */ (0, F.jsx)("span", { children: e }, t))
}),
- n ? /* @__PURE__ */ (0, F.jsx)(vQ, {
+ n ? /* @__PURE__ */ (0, F.jsx)(yQ, {
id: "entityAliasPop",
hook: "alias",
rest: n,
label: `另外 ${n.toLocaleString()} 个别名`,
heading: `${e.length.toLocaleString()} 个别名`,
- children: /* @__PURE__ */ (0, F.jsx)("dl", { children: /* @__PURE__ */ (0, F.jsx)(EQ, { names: e.map((e) => ({ name: e })) }) })
+ children: /* @__PURE__ */ (0, F.jsx)("dl", { children: /* @__PURE__ */ (0, F.jsx)(DQ, { names: e.map((e) => ({ name: e })) }) })
}) : null
]
});
}
-function Vwe({ follow: e, actions: t }) {
+function nTe({ follow: e, actions: t }) {
let n = e.providers.join(" · ");
return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "",
"data-entity-follow": "",
title: n ? `关注 · ${n}` : "关注",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "rss" }), /* @__PURE__ */ (0, F.jsxs)("a", {
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "rss" }), /* @__PURE__ */ (0, F.jsxs)("a", {
href: "?media=online",
onClick: (n) => {
n.preventDefault(), t.openFollowAuthor(e.key);
@@ -62754,7 +62823,7 @@ function Vwe({ follow: e, actions: t }) {
})]
});
}
-function Hwe({ follow: e, entity: t, actions: n }) {
+function rTe({ follow: e, entity: t, actions: n }) {
let [r, i] = (0, P.useState)(""), a = async (e, t) => {
if (!r) {
i(e);
@@ -62768,12 +62837,12 @@ function Hwe({ follow: e, entity: t, actions: n }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-entity-held": "",
className: "flex flex-col gap-2",
- children: e.held.map((e) => /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ children: e.held.map((e) => /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: "info",
title: `关注里有同名作者 ${e.name}`,
action: /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
- ...Uz(r === e.key),
+ ...Yz(r === e.key),
onClick: () => {
a(e.key, e.name);
},
@@ -62788,37 +62857,37 @@ function Hwe({ follow: e, entity: t, actions: n }) {
}, e.key))
});
}
-function TQ({ entity: e }) {
+function EQ({ entity: e }) {
return e.identity_labels?.length ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-meta-item": "classification",
"data-identity-classification": "",
- children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e.identity_labels.join(" · ") })]
+ children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: "user-round" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e.identity_labels.join(" · ") })]
}) : null;
}
-function EQ({ label: e, names: t }) {
+function DQ({ label: e, names: t }) {
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [e ? /* @__PURE__ */ (0, F.jsx)("dt", { children: e }) : null, /* @__PURE__ */ (0, F.jsx)("dd", {
"data-wide": e ? void 0 : "",
children: t.map((e, t) => /* @__PURE__ */ (0, F.jsxs)("span", {
"data-pop-name": "",
- lang: mF(e.name),
+ lang: xF(e.name),
children: [e.name, e.reading ? /* @__PURE__ */ (0, F.jsx)("small", { children: e.reading }) : null]
}, t))
})] });
}
-function Uwe({ glyph: e, label: t, clip: n, children: r }) {
- return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("dt", { children: [/* @__PURE__ */ (0, F.jsx)(mQ, { name: e }), t] }), /* @__PURE__ */ (0, F.jsx)("dd", {
+function iTe({ glyph: e, label: t, clip: n, children: r }) {
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("dt", { children: [/* @__PURE__ */ (0, F.jsx)(hQ, { name: e }), t] }), /* @__PURE__ */ (0, F.jsx)("dd", {
"data-fact": e === "tags" ? "tags" : n ? "clip" : e === "calendar-range" ? "num" : void 0,
title: n,
children: r
})] });
}
-function Wwe({ tags: e }) {
- let { shown: t, rest: n } = wQ(e);
+function aTe({ tags: e }) {
+ let { shown: t, rest: n } = TQ(e);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [t.map((e) => /* @__PURE__ */ (0, F.jsx)("span", {
"data-fact-tag": "",
title: e,
children: e
- }, e)), n ? /* @__PURE__ */ (0, F.jsx)(vQ, {
+ }, e)), n ? /* @__PURE__ */ (0, F.jsx)(yQ, {
id: "entityTagPop",
hook: "fact",
rest: n,
@@ -62834,10 +62903,10 @@ function Wwe({ tags: e }) {
})
}) : null] });
}
-function DQ({ mark: e }) {
+function OQ({ mark: e }) {
if ("brand" in e) return /* @__PURE__ */ (0, F.jsx)("span", {
"data-link-icon": "brand",
- children: /* @__PURE__ */ (0, F.jsx)(mQ, { name: e.brand })
+ children: /* @__PURE__ */ (0, F.jsx)(hQ, { name: e.brand })
});
let t = R("globe") + ("site" in e ? `<img src="${z(e.site)}" alt="" width="20" height="20" loading="lazy" decoding="async" referrerpolicy="no-referrer" data-drop="self">` : "");
return /* @__PURE__ */ (0, F.jsx)("span", {
@@ -62845,7 +62914,7 @@ function DQ({ mark: e }) {
dangerouslySetInnerHTML: { __html: t }
});
}
-function Gwe({ link: e }) {
+function oTe({ link: e }) {
switch (e.type) {
case "icon": return /* @__PURE__ */ (0, F.jsx)("a", {
"data-link": "icon",
@@ -62854,19 +62923,19 @@ function Gwe({ link: e }) {
rel: "noopener noreferrer",
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, F.jsx)(DQ, { mark: e.mark })
+ children: /* @__PURE__ */ (0, F.jsx)(OQ, { mark: e.mark })
});
case "gone": return /* @__PURE__ */ (0, F.jsx)("span", {
"data-link": "gone",
tabIndex: 0,
title: e.title,
"aria-label": e.title,
- children: /* @__PURE__ */ (0, F.jsx)(DQ, { mark: { globe: !0 } })
+ children: /* @__PURE__ */ (0, F.jsx)(OQ, { mark: { globe: !0 } })
});
case "private": return /* @__PURE__ */ (0, F.jsxs)("span", {
"data-link": "private",
title: e.sources ? e.sources.join("\n") : e.label,
- children: [/* @__PURE__ */ (0, F.jsx)(DQ, { mark: { globe: !0 } }), /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [/* @__PURE__ */ (0, F.jsx)(OQ, { mark: { globe: !0 } }), /* @__PURE__ */ (0, F.jsx)("span", {
"data-link-label": "",
children: e.sources ? e.label : `来源 · ${e.label}`
})]
@@ -62878,7 +62947,7 @@ function Gwe({ link: e }) {
rel: "noopener noreferrer",
title: e.title,
children: [
- /* @__PURE__ */ (0, F.jsx)(DQ, { mark: e.mark }),
+ /* @__PURE__ */ (0, F.jsx)(OQ, { mark: e.mark }),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-link-label": "",
children: e.text
@@ -62893,7 +62962,7 @@ function Gwe({ link: e }) {
});
}
}
-function Kwe({ entity: e, actions: t, helpers: n }) {
+function sTe({ entity: e, actions: t, helpers: n }) {
let [r, i] = (0, P.useState)(!!e.feed?.following), [a, o] = (0, P.useState)(!1), s = (0, P.useRef)(!1), c = async (e) => {
if (s.current) return !1;
s.current = !0, o(!0);
@@ -62911,35 +62980,35 @@ function Kwe({ entity: e, actions: t, helpers: n }) {
};
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-entry-marks": "",
- children: [CQ(e).map((e, t) => /* @__PURE__ */ (0, F.jsxs)("a", {
+ children: [wQ(e).map((e, t) => /* @__PURE__ */ (0, F.jsxs)("a", {
"data-entry-mark": "",
href: e.url,
target: "_blank",
rel: "noopener noreferrer",
title: e.label,
"aria-label": e.label,
- children: [e.mark ? /* @__PURE__ */ (0, F.jsx)(mQ, { name: e.mark }) : /* @__PURE__ */ (0, F.jsxs)("span", {
+ children: [e.mark ? /* @__PURE__ */ (0, F.jsx)(hQ, { name: e.mark }) : /* @__PURE__ */ (0, F.jsxs)("span", {
"data-missav-mark": "",
children: [/* @__PURE__ */ (0, F.jsx)("span", { children: "MISS" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "AV" })]
}), e.ordinal ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-entry-ordinal": "",
children: e.ordinal
}) : null]
- }, t)), e.feed ? /* @__PURE__ */ (0, F.jsx)(Ewe, {
+ }, t)), e.feed ? /* @__PURE__ */ (0, F.jsx)(Vwe, {
following: r,
busy: a,
onToggle: (e) => {
l(e);
},
- tip: kwe(r)
+ tip: Wwe(r)
}) : null]
});
}
// src/react/entity-page/use-entity-online.ts
-var qwe = () => ((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991;
-function Jwe(e, t, n) {
- let [r, i] = (0, P.useState)(() => Qi(e));
- r.author !== e && i(Qi(e));
+var cTe = () => ((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991;
+function lTe(e, t, n) {
+ let [r, i] = (0, P.useState)(() => pa(e));
+ r.author !== e && i(pa(e));
let [a, o] = (0, P.useState)({
author: e,
media: ""
@@ -62951,24 +63020,24 @@ function Jwe(e, t, n) {
let s = a.author === e ? a.media : "", c = (t) => o({
author: e,
media: t
- }), l = Ri(r, 0), u = It({
+ }), l = $i(r, 0), u = It({
...l,
enabled: t && !!e
}), d = Pt({
- queryKey: zi,
- queryFn: ({ signal: e }) => Bi(e),
+ queryKey: ea,
+ queryFn: ({ signal: e }) => ta(e),
enabled: t
- }), f = (0, P.useMemo)(() => Hi(u.data), [u.data]), p = u.isPending || u.isPlaceholderData, m = (0, P.useMemo)(() => {
+ }), f = (0, P.useMemo)(() => ra(u.data), [u.data]), p = u.isPending || u.isPlaceholderData, m = (0, P.useMemo)(() => {
let e = {
videos: 0,
images: 0
};
- return (f?.groups || []).forEach((t) => Xi(t).forEach((t) => {
+ return (f?.groups || []).forEach((t) => da(t).forEach((t) => {
e[t === "image" ? "images" : "videos"] += 1;
})), e;
}, [f]), h = m.images > m.videos ? "images" : "videos";
!s && f && !p && c(h);
- let g = s || h, _ = (0, P.useMemo)(() => (f?.groups || []).filter((e) => Xi(e).has(g === "images" ? "image" : "video")), [f, g]), v = (0, P.useMemo)(() => ({
+ let g = s || h, _ = (0, P.useMemo)(() => (f?.groups || []).filter((e) => da(e).has(g === "images" ? "image" : "video")), [f, g]), v = (0, P.useMemo)(() => ({
sources: f?.sources || [],
aliases: f?.author_aliases || [],
credentials: new Set((d.data?.providers || []).filter((e) => e.present).map((e) => e.provider))
@@ -62983,22 +63052,22 @@ function Jwe(e, t, n) {
photoLayouts: n.photoLayouts,
imagesOnly: n.imagesOnly,
status: r.status,
- statuses: Mi,
+ statuses: qi,
provider: r.provider,
providers: (y.providers || []).map((e) => [e, b.get(e) || e]),
tags: x.map(([e, t]) => ({
k: e,
- label: Nl(e),
+ label: Jl(e),
n: t,
selected: r.tags.includes(e),
- cat: ca(f?.groups || [], e)
+ cat: Ca(f?.groups || [], e)
})),
- sorts: Ni.map(([e, t]) => ({
+ sorts: Ji.map(([e, t]) => ({
key: e,
label: t,
pressed: r.sort === e,
dir: r.sort === e ? r.dir : "",
- ariaLabel: ia(e, t, r.sort, r.dir)
+ ariaLabel: ya(e, t, r.sort, r.dir)
}))
}, C = f?.counts || {}, w = r.status ? C[r.status] || 0 : Object.values(C).reduce((e, t) => e + (Number(t) || 0), 0), T = (e) => i((t) => ({
...t,
@@ -63015,15 +63084,15 @@ function Jwe(e, t, n) {
actions: {
onlineMedia: (e) => c(e),
onlineShuffle: () => T({
- sort: Fi,
- seed: qwe()
+ sort: Xi,
+ seed: cTe()
}),
onlineImagesOnly: (e) => n.setImagesOnly(e),
onlineStatus: (e) => T({ status: e }),
onlineProvider: (e) => T({ provider: r.provider === e ? "" : e }),
onlineTag: (e) => T({ tags: r.tags.includes(e) ? r.tags.filter((t) => t !== e) : [...r.tags, e] }),
onlineSort: (e) => {
- let t = ra(e, r.sort, r.dir);
+ let t = va(e, r.sort, r.dir);
t && T(t);
}
},
@@ -63046,8 +63115,8 @@ function Jwe(e, t, n) {
};
}
// src/react/entity-page/entity-page-view.tsx
-function Ywe(e) {
- let { kind: t, name: n } = e, r = Pt(BX(t, n)), i = !!r.data?.error, a = r.data?.canonical_name, o = r.data?.redirect ?? (a && a !== n ? {
+function uTe(e) {
+ let { kind: t, name: n } = e, r = Pt(VX(t, n)), i = !!r.data?.error, a = r.data?.canonical_name, o = r.data?.redirect ?? (a && a !== n ? {
kind: t,
name: a
} : void 0), { actions: s } = e;
@@ -63065,17 +63134,17 @@ function Ywe(e) {
s,
o?.kind,
o?.name
- ]), r.isError ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: Wn(r.error),
+ ]), r.isError ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: ar(r.error),
onRetry: () => {
r.refetch();
}
- }) : !r.data || i || o ? null : /* @__PURE__ */ (0, F.jsx)(Qwe, {
+ }) : !r.data || i || o ? null : /* @__PURE__ */ (0, F.jsx)(pTe, {
...e,
entity: r.data
});
}
-function OQ(e) {
+function kQ(e) {
let [t, n] = (0, P.useState)({
key: e,
n: 1
@@ -63087,22 +63156,22 @@ function OQ(e) {
};
return n(r), r.n;
}
-var Xwe = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
-function Zwe(e, t) {
+var dTe = () => String(((Date.now() ^ (Math.random() * 1e9 | 0)) >>> 0) % 99991);
+function fTe(e, t) {
return `照片 · ${[e.total || !t ? `${(e.total || 0).toLocaleString()} 张` : "", t ? `样张 ${(e.sample_total || 0).toLocaleString()} 张 · ${t.toLocaleString()} 部作品` : ""].filter(Boolean).join(" · ")}`;
}
-function Qwe(e) {
- let { kind: t, name: n, entity: r, filters: i, media: a, helpers: o, actions: s, hosts: c } = e, l = t === "agency" || t === "studio", u = t === "agency" ? r.related_performers || [] : t === "studio" && r.labels || [], d = Number(r.id) || 0, f = It(VX(t, n, 0, "")).data?.pages[0], p = f && !f.error ? f : null, m = p ? (p.total || 0) + (p.sample_total || 0) : 0, h = (p?.total || 0) > 0 || HX(p).length > 0, g = t === "creator" && r.follow?.key || "", _ = !!g && !r.asset_count, v = a.media === "photos" && h ? a : (a.media === "online" || _) && g ? {
+function pTe(e) {
+ let { kind: t, name: n, entity: r, filters: i, media: a, helpers: o, actions: s, hosts: c } = e, l = t === "agency" || t === "studio", u = t === "agency" ? r.related_performers || [] : t === "studio" && r.labels || [], d = Number(r.id) || 0, f = It(HX(t, n, 0, "")).data?.pages[0], p = f && !f.error ? f : null, m = p ? (p.total || 0) + (p.sample_total || 0) : 0, h = (p?.total || 0) > 0 || UX(p).length > 0, g = t === "creator" && r.follow?.key || "", _ = !!g && !r.asset_count, v = a.media === "photos" && h ? a : (a.media === "online" || _) && g ? {
media: "online",
set: 0
- } : NX, [y, b] = (0, P.useState)("people"), x = new URLSearchParams(Object.entries(i).filter(([, e]) => e)).toString(), [S, C] = (0, P.useState)(x);
+ } : PX, [y, b] = (0, P.useState)("people"), x = new URLSearchParams(Object.entries(i).filter(([, e]) => e)).toString(), [S, C] = (0, P.useState)(x);
S !== x && (C(x), b("videos"));
- let w = l && y === "people" && u.length ? "people" : v.media, T = Jwe(g, w === "online", {
+ let w = l && y === "people" && u.length ? "people" : v.media, T = lTe(g, w === "online", {
photoLayout: e.photoLayout,
photoLayouts: e.photoLayouts,
imagesOnly: e.followImagesOnly,
setImagesOnly: e.follow.actions.setImagesOnly
- }), E = w === "photos" || w === "online" && T.media === "images", [D, O] = (0, P.useState)(0), k = zX(e), A = Pt(k), j = OQ(JSON.stringify([k.queryKey, D])), [M] = (0, P.useState)(() => (t === "performer" || t === "studio") && (e.jav || (A.data?.items || []).some((e) => e.is_jav)));
+ }), E = w === "photos" || w === "online" && T.media === "images", [D, O] = (0, P.useState)(0), k = BX(e), A = Pt(k), j = kQ(JSON.stringify([k.queryKey, D])), [M] = (0, P.useState)(() => (t === "performer" || t === "studio") && (e.jav || (A.data?.items || []).some((e) => e.is_jav)));
(0, P.useLayoutEffect)(() => {
s.javContext(M);
}, [s, M]);
@@ -63112,26 +63181,26 @@ function Qwe(e) {
}, [e.layout, M]), te = {
jav: e.jav,
seed: e.seed
- }, ne = (0, P.useCallback)((e, r, a) => RX(t, n, i, te, e, r, a), [j]), [N, re] = (0, P.useState)({}), ie = v.set, ae = N[ie] || "", oe = It({
- ...VX(t, n, ie, ae),
+ }, ne = (0, P.useCallback)((e, r, a) => zX(t, n, i, te, e, r, a), [j]), [N, re] = (0, P.useState)({}), ie = v.set, ae = N[ie] || "", oe = It({
+ ...HX(t, n, ie, ae),
enabled: w === "photos"
- }), se = oe.data?.pages[0], ce = OQ(JSON.stringify(FX(t, n, ie, ae))), le = (0, P.useMemo)(() => {
+ }), se = oe.data?.pages[0], ce = kQ(JSON.stringify(IX(t, n, ie, ae))), le = (0, P.useMemo)(() => {
let e = oe.data?.pages;
if (!e?.[0] || e[0].error) return null;
let t = e[0];
return {
revision: ce,
- codeSets: t.id ? [] : HX(t),
+ codeSets: t.id ? [] : UX(t),
items: e.flatMap((e) => e.items || []),
total: t.total || 0,
hasMore: !!e[e.length - 1]?.has_more
};
}, [oe.data, ce]), ue = oe.refetch, de = oe.fetchNextPage, fe = Pt({
- ...AX(d, o.feedRowHtml),
+ ...jX(d, o.feedRowHtml),
enabled: !!d
}), pe = (0, P.useRef)(e.feedRevision);
(0, P.useEffect)(() => {
- pe.current !== e.feedRevision && (pe.current = e.feedRevision, H.invalidateQueries({ queryKey: kX(d) }));
+ pe.current !== e.feedRevision && (pe.current = e.feedRevision, H.invalidateQueries({ queryKey: AX(d) }));
}, [d, e.feedRevision]);
let me = !!A.data;
(0, P.useEffect)(() => {
@@ -63150,13 +63219,13 @@ function Qwe(e) {
he.current = !1;
}, []);
let I = (0, P.useCallback)(async () => {
- await H.invalidateQueries({ queryKey: ["entity-route"] }), await H.invalidateQueries({ queryKey: PX(t, n) }), await H.invalidateQueries({ queryKey: [
+ await H.invalidateQueries({ queryKey: ["entity-route"] }), await H.invalidateQueries({ queryKey: FX(t, n) }), await H.invalidateQueries({ queryKey: [
"entity-items",
t,
n
] });
}, [t, n]), ge = Ft({
- mutationFn: (e) => on("/api/entity-alias", {
+ mutationFn: (e) => xn("/api/entity-alias", {
method: "POST",
body: JSON.stringify({
kind: t,
@@ -63166,7 +63235,7 @@ function Qwe(e) {
}),
onSuccess: () => I()
}), _e = Ft({
- mutationFn: ({ from: e, to: n }) => on("/api/entity-name", {
+ mutationFn: ({ from: e, to: n }) => xn("/api/entity-name", {
method: "POST",
body: JSON.stringify({
kind: t,
@@ -63176,7 +63245,7 @@ function Qwe(e) {
}),
onSuccess: () => I()
}), ve = Ft({
- mutationFn: (e) => on("/api/feeds/source", {
+ mutationFn: (e) => xn("/api/feeds/source", {
method: "POST",
body: JSON.stringify({
action: "follow",
@@ -63184,14 +63253,14 @@ function Qwe(e) {
enabled: e
})
}),
- onSuccess: (e, r) => H.setQueryData(PX(t, n), (e) => e && {
+ onSuccess: (e, r) => H.setQueryData(FX(t, n), (e) => e && {
...e,
feed: {
...e.feed,
following: r
}
})
- }), ye = Ft({ mutationFn: (e) => on("/api/follow/creator", {
+ }), ye = Ft({ mutationFn: (e) => xn("/api/follow/creator", {
method: "POST",
body: JSON.stringify({
entity_id: d,
@@ -63201,7 +63270,7 @@ function Qwe(e) {
openEntity: s.openEntity,
chooseName: (e) => {
let n = r.canonical_name;
- e !== n && Hc({
+ e !== n && rl({
title: "更改统一名称",
body: `「${e}」将成为这份档案显示的名称,「${n}」留作别名。作品上的署名、搜索和标签都会跟着改写。`,
confirmLabel: "更改统一名称",
@@ -63235,13 +63304,13 @@ function Qwe(e) {
await new Promise((e) => {
setTimeout(e, 3e3);
});
- let e = await on("/api/feeds/check").catch(() => null);
+ let e = await xn("/api/feeds/check").catch(() => null);
if (!e || e.status !== "running") break;
}
- he.current && await H.invalidateQueries({ queryKey: kX(d) });
+ he.current && await H.invalidateQueries({ queryKey: AX(d) });
})();
},
- feedAction: jX,
+ feedAction: MX,
avatarPicked: () => {
s.avatarChanged(), I().then(() => {
he.current && O((e) => e + 1);
@@ -63289,19 +63358,19 @@ function Qwe(e) {
(e !== w || v.set) && (b(e === "people" ? "people" : "videos"), s.route(i, e === "photos" || e === "online" ? {
media: e,
set: 0
- } : NX));
+ } : PX));
},
setState: (e) => s.route({
...i,
state: e
- }, NX),
+ }, PX),
toggleTag: s.toggleTag,
clearFilter: s.clearFilter,
clearAll: s.clearAll,
setSort: s.setSort,
reshuffle: async () => {
if (w !== "photos") {
- let r = s.reshuffleVideos(), a = zX({
+ let r = s.reshuffleVideos(), a = BX({
kind: t,
name: n,
filters: {
@@ -63315,7 +63384,7 @@ function Qwe(e) {
await H.fetchQuery(a).catch(() => null);
return;
}
- let r = Xwe(), a = await H.fetchInfiniteQuery(VX(t, n, ie, r)).catch(() => null);
+ let r = dTe(), a = await H.fetchInfiniteQuery(HX(t, n, ie, r)).catch(() => null);
he.current && a?.pages[0] && !a.pages[0].error && re((e) => ({
...e,
[ie]: r
@@ -63348,9 +63417,9 @@ function Qwe(e) {
})
}), [o, ue]), we = (r.tags || []).map((e) => ({
k: e.k,
- label: Nl(e.k),
+ label: Jl(e.k),
n: e.n,
- selected: MSe(i.tag, e.k)
+ selected: qSe(i.tag, e.k)
})), Te = [
u.length,
!_,
@@ -63385,14 +63454,14 @@ function Qwe(e) {
creator: "",
studio: "",
owner: ""
- }, NX), Ne = "", Pe = !1;
+ }, PX), Ne = "", Pe = !1;
if (w === "people") Ne = `${t === "studio" ? "厂牌" : "艺人"} · ${u.length.toLocaleString()}`;
else if (w === "online") Pe = T.busy, Ne = `在线 · ${(T.total ?? r.follow?.n ?? 0).toLocaleString()} 项更新`;
else if (w === "videos") {
Pe = !A.data;
- let e = IX(i.tag).length;
+ let e = LX(i.tag).length;
Ne = `视频 · ${(A.data?.work_total ?? A.data?.total ?? 0).toLocaleString()}${e ? ` · 已选 ${e.toLocaleString()} 个标签` : ""}`;
- } else se && !se.error ? Ne = De ? `${se.title} · ${(se.total || 0).toLocaleString()} 张` : Zwe(se, HX(se).length) : Pe = oe.isPending;
+ } else se && !se.error ? Ne = De ? `${se.title} · ${(se.total || 0).toLocaleString()} 张` : fTe(se, UX(se).length) : Pe = oe.isPending;
let Fe = (0, P.useMemo)(() => ({
...e.card.actions,
loadMorePhotos: async () => {
@@ -63409,7 +63478,7 @@ function Qwe(e) {
u
]);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(Lwe, {
+ /* @__PURE__ */ (0, F.jsx)(Qwe, {
kind: t,
name: n,
entity: r,
@@ -63419,7 +63488,7 @@ function Qwe(e) {
actions: be,
helpers: xe
}, D),
- (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(pW, {
+ (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(SW, {
kind: t,
name: n,
view: w,
@@ -63436,9 +63505,9 @@ function Qwe(e) {
actions: Se,
helpers: Ce
}), c.filter),
- (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(y_e, {
+ (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(k_e, {
enabled: w === "videos",
- children: w === "online" ? /* @__PURE__ */ (0, F.jsx)(GCe, {
+ children: w === "online" ? /* @__PURE__ */ (0, F.jsx)(owe, {
view: T.view,
media: T.media,
result: T.result,
@@ -63452,16 +63521,16 @@ function Qwe(e) {
actions: e.follow.actions,
canLoadMore: e.canLoadMore,
clearFilters: T.clearFilters
- }, T.key) : w === "videos" && A.isError ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: Wn(A.error),
+ }, T.key) : w === "videos" && A.isError ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: ar(A.error),
onRetry: () => {
A.refetch();
}
- }) : je ? /* @__PURE__ */ (0, F.jsx)($we, {
+ }) : je ? /* @__PURE__ */ (0, F.jsx)(mTe, {
filtered: Ae,
onShowAll: Me,
onOnline: g ? () => Se.setView("online") : void 0
- }) : /* @__PURE__ */ (0, F.jsx)(dCe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(ECe, {
kind: t,
name: n,
view: w,
@@ -63493,9 +63562,9 @@ function Qwe(e) {
}), c.body)
] });
}
-function $we({ filtered: e, onShowAll: t, onOnline: n }) {
- return e ? /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz("search"),
+function mTe({ filtered: e, onShowAll: t, onOnline: n }) {
+ return e ? /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz("search"),
title: "没有符合条件的视频",
actions: /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
@@ -63503,14 +63572,14 @@ function $we({ filtered: e, onShowAll: t, onOnline: n }) {
children: "清除筛选"
}),
children: "清除筛选后查看名下全部视频。"
- }) : /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz("film"),
+ }) : /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz("film"),
title: "还没有视频",
actions: n ? /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
onClick: n,
children: "查看在线作品"
- }) : /* @__PURE__ */ (0, F.jsx)(pI, {
+ }) : /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/",
children: "浏览馆藏"
@@ -63519,30 +63588,30 @@ function $we({ filtered: e, onShowAll: t, onOnline: n }) {
});
}
// src/react/diagnostics/diagnostics.ts
-var kQ = ["diagnostics"], AQ = (e) => B("/api/diagnostics", e);
-async function eTe(e) {
+var AQ = ["diagnostics"], jQ = (e) => B("/api/diagnostics", e);
+async function hTe(e) {
await H.fetchQuery({
- queryKey: kQ,
- queryFn: () => AQ(e),
+ queryKey: AQ,
+ queryFn: () => jQ(e),
staleTime: 1e4
});
}
// src/react/feed-new/feed-new-page.tsx
-function tTe({ host: e, revision: t, helpers: n, actions: r }) {
- let i = Pt(AX(null, n.feedRowHtml)), a = (0, P.useRef)(t);
+function gTe({ host: e, revision: t, helpers: n, actions: r }) {
+ let i = Pt(jX(null, n.feedRowHtml)), a = (0, P.useRef)(t);
return (0, P.useEffect)(() => {
- a.current !== t && (a.current = t, H.invalidateQueries({ queryKey: kX(null) }));
- }, [t]), (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(pQ, {
+ a.current !== t && (a.current = t, H.invalidateQueries({ queryKey: AX(null) }));
+ }, [t]), (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(mQ, {
feedNew: i.data ?? null,
host: e,
wire: n.wireFeedRow,
- act: jX,
+ act: MX,
settled: r.settled
}), e);
}
// src/react/index/index-search.tsx
-var nTe = Vz("search");
-function jQ({ label: e, value: t, onQuery: n }) {
+var _Te = qz("search");
+function MQ({ label: e, value: t, onQuery: n }) {
let [r, i] = (0, P.useState)(t), a = (0, P.useRef)(!1), o = (0, P.useRef)(void 0);
(0, P.useEffect)(() => {
clearTimeout(o.current), i(t);
@@ -63559,15 +63628,15 @@ function jQ({ label: e, value: t, onQuery: n }) {
onCompositionEnd: (e) => {
a.current = !1, s(e.target.value);
},
- children: /* @__PURE__ */ (0, F.jsx)(Mz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Rz, {
"aria-label": e,
value: r,
onChange: (e) => {
i(e), a.current || s(e);
},
- children: /* @__PURE__ */ (0, F.jsx)(Pz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Bz, {
type: "search",
- leadingIcon: nTe,
+ leadingIcon: _Te,
spellCheck: !1,
autoComplete: "off",
enterKeyHint: "search",
@@ -63579,7 +63648,7 @@ function jQ({ label: e, value: t, onQuery: n }) {
});
}
// src/react/index/tag-pagination.ts
-function MQ(e) {
+function NQ(e) {
let [t, n] = (0, P.useState)({
filter: e,
pageIndex: 0,
@@ -63596,7 +63665,7 @@ function MQ(e) {
}), [e])
};
}
-function NQ(e, t, n) {
+function PQ(e, t, n) {
let { pageIndex: r, pageSize: i } = t;
(0, P.useEffect)(() => {
if (e === void 0) return;
@@ -63613,16 +63682,16 @@ function NQ(e, t, n) {
]);
}
// src/react/components/board-tabs.tsx
-function PQ({ value: e }) {
+function FQ({ value: e }) {
return /* @__PURE__ */ (0, F.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 rTe = "relative flex flex-none cursor-pointer items-center whitespace-nowrap rounded-md px-3 py-2 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring hover:text-text-primary aria-selected:bg-background-tertiary-default aria-selected:text-text-primary max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
-function FQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5" }) {
- let a = (0, P.useRef)(null), o = eI(a);
+var vTe = "relative flex flex-none cursor-pointer items-center whitespace-nowrap rounded-md px-3 py-2 text-body-regular text-text-secondary outline-none focus-visible:outline-2 focus-visible:-outline-offset-3 focus-visible:outline-border-focus-ring hover:text-text-primary aria-selected:bg-background-tertiary-default aria-selected:text-text-primary max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular";
+function IQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5" }) {
+ let a = (0, P.useRef)(null), o = oI(a);
return (0, P.useLayoutEffect)(() => {
let e = a.current;
e && (() => {
@@ -63631,7 +63700,7 @@ function FQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5"
let n = t.offsetLeft, r = n + t.offsetWidth;
n < e.scrollLeft ? e.scrollLeft = n : r > e.scrollLeft + e.clientWidth && (e.scrollLeft = r - e.clientWidth);
})();
- }, [t]), /* @__PURE__ */ (0, F.jsx)(uF, {
+ }, [t]), /* @__PURE__ */ (0, F.jsx)(_F, {
ref: o,
role: "tablist",
"aria-label": n,
@@ -63646,7 +63715,7 @@ function FQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5"
},
className: `relative flex flex-none gap-1 overflow-x-auto max-board-narrow:gap-0 ${i}`,
children: e.map((e) => {
- let n = e.symbol ? Vz(e.symbol) : null, i = e.value === t;
+ let n = e.symbol ? qz(e.symbol) : null, i = e.value === t;
return /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
role: "tab",
@@ -63655,7 +63724,7 @@ function FQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5"
"data-pill-selected": i ? "" : void 0,
"data-pill-variant": "gray",
tabIndex: i ? 0 : -1,
- className: rTe,
+ className: vTe,
onClick: () => {
i || r(e.value);
},
@@ -63665,11 +63734,11 @@ function FQ({ tabs: e, value: t, label: n, onChange: r, className: i = "mb-5.5"
});
}
// src/react/index/index-tags.tsx
-var IQ = () => /* @__PURE__ */ (0, F.jsx)("span", {
+var LQ = () => /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
"data-tag-dot": "",
className: "size-1.75 flex-none rounded-full"
-}), LQ = Vz("pencil"), RQ = (e, t) => ({
+}), RQ = qz("pencil"), zQ = (e, t) => ({
kind: "tag",
name: e.k,
favorite: e.favorite,
@@ -63678,7 +63747,7 @@ var IQ = () => /* @__PURE__ */ (0, F.jsx)("span", {
tag_id: e.id || e.k
} : { entity_id: e.entity_id }
});
-function iTe({ tag: e, actions: t }) {
+function yTe({ tag: e, actions: t }) {
let n = t.picked.has(e.k);
return /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 items-center gap-1",
@@ -63687,13 +63756,13 @@ function iTe({ tag: e, actions: t }) {
type: "button",
"data-alpha-tag": "",
"data-k": e.k,
- "data-tag-cat": nZ(t.online, e.cat),
+ "data-tag-cat": rZ(t.online, e.cat),
"aria-pressed": n,
title: e.label,
onClick: () => t.press(e.k),
className: "flex h-9 min-w-0 flex-1 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, F.jsx)(IQ, {}),
+ /* @__PURE__ */ (0, F.jsx)(LQ, {}),
/* @__PURE__ */ (0, F.jsx)("span", {
className: "min-w-0 flex-1 truncate",
children: e.label
@@ -63704,32 +63773,32 @@ function iTe({ tag: e, actions: t }) {
})
]
}),
- t.favorites === !1 ? null : /* @__PURE__ */ (0, F.jsx)(tB, { item: RQ(e, t.online) }),
- t.edit ? /* @__PURE__ */ (0, F.jsx)(eB, {
+ t.favorites === !1 ? null : /* @__PURE__ */ (0, F.jsx)(sB, { item: zQ(e, t.online) }),
+ t.edit ? /* @__PURE__ */ (0, F.jsx)(oB, {
label: `编辑标签 ${e.label}`,
onClick: () => t.edit?.(e.k),
- children: /* @__PURE__ */ (0, F.jsx)(LQ, {})
+ children: /* @__PURE__ */ (0, F.jsx)(RQ, {})
}) : null
]
});
}
-function zQ({ groups: e, actions: t }) {
+function BQ({ groups: e, actions: t }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-alphabet": "",
className: "flex flex-col gap-4",
children: e.map(([e, n], r) => /* @__PURE__ */ (0, F.jsxs)("section", {
"data-alpha-group": r,
- className: UH({
+ className: YH({
radius: "plain",
padding: "none",
className: "px-5 pt-4 pb-3"
}),
children: [/* @__PURE__ */ (0, F.jsxs)("h3", {
className: "mb-2 flex items-center text-title-2-medium text-text-primary",
- children: [e, /* @__PURE__ */ (0, F.jsx)(PQ, { value: n.length })]
+ children: [e, /* @__PURE__ */ (0, F.jsx)(FQ, { value: n.length })]
}), /* @__PURE__ */ (0, F.jsx)("div", {
className: "index-tag-list gap-x-4 gap-y-0.5",
- children: n.map((e) => /* @__PURE__ */ (0, F.jsx)(iTe, {
+ children: n.map((e) => /* @__PURE__ */ (0, F.jsx)(yTe, {
tag: e,
actions: t
}, e.k))
@@ -63737,26 +63806,26 @@ function zQ({ groups: e, actions: t }) {
}, e))
});
}
-var aTe = "\xA0";
-function BQ({ tags: e, actions: t }) {
+var bTe = "\xA0";
+function VQ({ tags: e, actions: t }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-tag-cloud": "",
className: "flex flex-wrap gap-1.75",
children: e.map((e) => /* @__PURE__ */ (0, F.jsxs)("span", {
"data-tag-token": "",
- "data-tag-cat": nZ(t.online, e.cat),
+ "data-tag-cat": rZ(t.online, e.cat),
className: "inline-flex max-w-full min-w-0 items-center gap-1 rounded-lg border p-1",
children: [/* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
"data-tag-chip": "",
"data-k": e.k,
- "data-tag-cat": nZ(t.online, e.cat),
+ "data-tag-cat": rZ(t.online, e.cat),
"aria-pressed": t.picked.has(e.k),
onClick: () => t.press(e.k),
className: "inline-flex max-w-full min-w-0 cursor-pointer items-center rounded-lg px-2 py-0.5 text-body-2-regular text-text-secondary outline-none focus-visible:ring-2 focus-visible:ring-border-focus-ring",
children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "min-w-0 truncate",
- children: e.label + aTe
+ children: e.label + bTe
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-tag-n": "",
className: "text-caption-1-regular opacity-60",
@@ -63765,16 +63834,16 @@ function BQ({ tags: e, actions: t }) {
}), t.favorites !== !1 || t.edit ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-tag-actions": "",
className: "inline-flex flex-none items-center gap-1",
- children: [t.favorites === !1 ? null : /* @__PURE__ */ (0, F.jsx)(tB, { item: RQ(e, t.online) }), t.edit ? /* @__PURE__ */ (0, F.jsx)(eB, {
+ children: [t.favorites === !1 ? null : /* @__PURE__ */ (0, F.jsx)(sB, { item: zQ(e, t.online) }), t.edit ? /* @__PURE__ */ (0, F.jsx)(oB, {
label: `编辑标签 ${e.label}`,
onClick: () => t.edit?.(e.k),
- children: /* @__PURE__ */ (0, F.jsx)(LQ, {})
+ children: /* @__PURE__ */ (0, F.jsx)(RQ, {})
}) : null]
}) : null]
}, e.k))
});
}
-var oTe = [[
+var xTe = [[
"cloud",
"标签云",
"tags"
@@ -63783,34 +63852,34 @@ var oTe = [[
"字母表",
"text-aa"
]];
-function VQ({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c, status: l, actions: u }) {
- let d = eI();
- return /* @__PURE__ */ (0, F.jsx)(iI, {
+function HQ({ categories: e, category: t, online: n, readout: r, letters: i, view: a, onCategory: o, onJump: s, onView: c, status: l, actions: u }) {
+ let d = oI();
+ return /* @__PURE__ */ (0, F.jsx)(uI, {
label: "标签筛选",
topLabel: "标签类型",
top: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [l ? /* @__PURE__ */ (0, F.jsxs)("div", {
role: "group",
"aria-label": "标签状态",
className: "flex flex-none items-center gap-1.75 border-r border-(--glass-low) pr-3",
- children: [[[!1, "使用中"], [!0, "已隐藏"]].map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(oI, {
+ children: [[[!1, "使用中"], [!0, "已隐藏"]].map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(fI, {
"data-tag-pill": "",
"data-tag-cat": "all",
pressed: !l.blocked && l.hidden === e,
onPress: () => l.onChange(!!e),
children: t
- }, String(e))), l.onBlocked ? /* @__PURE__ */ (0, F.jsx)(oI, {
+ }, String(e))), l.onBlocked ? /* @__PURE__ */ (0, F.jsx)(fI, {
"data-tag-pill": "",
"data-tag-cat": "all",
pressed: !!l.blocked,
onPress: l.onBlocked,
children: "已屏蔽内容"
}) : null]
- }) : null, e.map(([e, r]) => /* @__PURE__ */ (0, F.jsxs)(oI, {
+ }) : null, e.map(([e, r]) => /* @__PURE__ */ (0, F.jsxs)(fI, {
"data-tag-pill": "",
- "data-tag-cat": e === "all" ? "all" : nZ(n, e),
+ "data-tag-cat": e === "all" ? "all" : rZ(n, e),
pressed: t === e,
onPress: () => o(e),
- children: [/* @__PURE__ */ (0, F.jsx)(IQ, {}), r]
+ children: [/* @__PURE__ */ (0, F.jsx)(LQ, {}), r]
}, e))] }),
bottom: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
/* @__PURE__ */ (0, F.jsx)("span", {
@@ -63831,19 +63900,19 @@ function VQ({ categories: e, category: t, online: n, readout: r, letters: i, vie
children: e
}, e))
}) : null,
- /* @__PURE__ */ (0, F.jsx)(ER, {
+ /* @__PURE__ */ (0, F.jsx)(MR, {
"aria-label": "标签视图",
orientation: "horizontal",
value: a,
onChange: (e) => c(e),
- className: `ml-auto ${BU}`,
- children: oTe.map(([e, t, n]) => {
- let r = Vz(n);
- return /* @__PURE__ */ (0, F.jsx)(DR, {
+ className: `ml-auto ${KU}`,
+ children: xTe.map(([e, t, n]) => {
+ let r = qz(n);
+ return /* @__PURE__ */ (0, F.jsx)(NR, {
value: e,
"aria-label": t,
"data-glass-segment": "",
- className: VU,
+ className: qU,
children: /* @__PURE__ */ (0, F.jsx)("span", {
title: t,
className: "contents",
@@ -63855,13 +63924,13 @@ function VQ({ categories: e, category: t, online: n, readout: r, letters: i, vie
] })
});
}
-function sTe({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
- return /* @__PURE__ */ (0, F.jsxs)(Fk, {
+function STe({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
+ return /* @__PURE__ */ (0, F.jsxs)(Hk, {
visible: e > 0,
label: "所选标签操作",
count: `已选 ${e.toLocaleString()} 个标签`,
children: [
- /* @__PURE__ */ (0, F.jsx)(sV, {
+ /* @__PURE__ */ (0, F.jsx)(pV, {
isSelected: t === "any",
onChange: (e) => n(e ? "any" : "all"),
children: /* @__PURE__ */ (0, F.jsxs)("span", {
@@ -63892,29 +63961,29 @@ function sTe({ count: e, match: t, onMatch: n, onClear: r, onApply: i }) {
});
}
// src/react/toaster.tsx
-var HQ = (e, t) => /* @__PURE__ */ (0, F.jsx)("span", {
+var UQ = (e, t) => /* @__PURE__ */ (0, F.jsx)("span", {
"data-toast-glyph": t ? "draw" : "still",
"aria-hidden": "true",
dangerouslySetInnerHTML: { __html: e }
-}), UQ = null, WQ = { "--floating-radius": "var(--radius-2xl)" };
-function GQ() {
- let e = UQ;
- UQ = null, e?.root.unmount();
-}
-var KQ = (e, t) => {
- if (UQ?.host === e) return;
- GQ();
+}), WQ = null, GQ = { "--floating-radius": "var(--radius-2xl)" };
+function KQ() {
+ let e = WQ;
+ WQ = null, e?.root.unmount();
+}
+var qQ = (e, t) => {
+ if (WQ?.host === e) return;
+ KQ();
let n = (0, Rt.createRoot)(e);
- UQ = {
+ WQ = {
host: e,
root: n
- }, n.render(/* @__PURE__ */ (0, F.jsxs)(iH, { children: [/* @__PURE__ */ (0, F.jsx)(fH, {
+ }, n.render(/* @__PURE__ */ (0, F.jsxs)(uH, { children: [/* @__PURE__ */ (0, F.jsx)(vH, {
id: "receipts",
position: "bottom-right",
closeButton: !0,
gap: 8,
style: {
- ...WQ,
+ ...GQ,
"--width": "min(560px, calc(100vw - 48px))"
},
offset: {
@@ -63929,16 +63998,16 @@ var KQ = (e, t) => {
toastOptions: { closeButtonAriaLabel: "关闭提示" },
containerAriaLabel: "通知",
icons: {
- success: HQ(t.success, !0),
- error: HQ(t.error, !1)
+ success: UQ(t.success, !0),
+ error: UQ(t.error, !1)
}
- }), /* @__PURE__ */ (0, F.jsx)(fH, {
+ }), /* @__PURE__ */ (0, F.jsx)(vH, {
id: "processing",
position: "bottom-right",
gap: 8,
expand: !0,
style: {
- ...WQ,
+ ...GQ,
"--width": "min(400px, calc(100vw - 32px))"
},
offset: {
@@ -63953,13 +64022,13 @@ var KQ = (e, t) => {
toastOptions: { closeButtonAriaLabel: "关闭任务提示" },
containerAriaLabel: "后台任务"
})] }));
-}, cTe = 6e3, qQ = (e, t) => {
+}, CTe = 6e3, JQ = (e, t) => {
if (!String(t.html ?? "").trim()) return;
- let n = t.alert ? sH.error : sH.success, r = t.action;
+ let n = t.alert ? pH.error : pH.success, r = t.action;
n(/* @__PURE__ */ (0, F.jsx)("span", { dangerouslySetInnerHTML: { __html: t.html } }), {
id: e,
toasterId: "receipts",
- duration: t.timeout > 0 ? t.timeout : cTe,
+ duration: t.timeout > 0 ? t.timeout : CTe,
action: r ? {
label: r.label,
onClick: (e) => {
@@ -63967,7 +64036,7 @@ var KQ = (e, t) => {
}
} : void 0
});
-}, JQ = (e) => e.id ?? e.entity_id, YQ = {
+}, YQ = (e) => e.id ?? e.entity_id, XQ = {
rename: "重命名标签",
merge: "合并标签",
hide: "隐藏标签",
@@ -63975,26 +64044,26 @@ var KQ = (e, t) => {
repair: "整理重复标签",
block: "屏蔽内容",
unblock: "恢复内容"
-}, XQ = (e, t) => V("/api/tag-management/preview", e, "POST", t);
-async function ZQ(e, t, n) {
+}, ZQ = (e, t) => V("/api/tag-management/preview", e, "POST", t);
+async function QQ(e, t, n) {
if (n?.aborted) return !1;
let r = t.tags.map((e) => `「${e.k}」`).join("、"), i = e.operation === "merge" || e.operation === "repair" ? `合并 ${t.tags.length} 个标签,涉及 ${t.assets} 个资源,重叠关联 ${t.overlap} 个。旧名称保留为别名。此操作无法直接撤销。` : e.operation === "rename" ? `${r}将更名为「${t.name || e.name}」,涉及 ${t.assets} 个资源。旧名称保留为别名。` : e.operation === "block" ? `屏蔽带有${r}任一标签的内容及其其它版本,涉及 ${t.assets} 个资源。可在「已屏蔽内容」中恢复。` : e.operation === "unblock" ? `解除${r}的内容屏蔽,涉及 ${t.assets} 个资源。` : `${e.operation === "hide" ? "隐藏" : "恢复"} ${t.tags.length} 个标签,涉及 ${t.assets} 个资源。${e.operation === "hide" ? "可在“已隐藏”中恢复。" : ""}`;
- return !(await Hc({
- title: YQ[e.operation],
+ return !(await rl({
+ title: XQ[e.operation],
body: i,
- confirmLabel: YQ[e.operation],
+ confirmLabel: XQ[e.operation],
onConfirm: () => V("/api/tag-management", {
...e,
token: t.token
}, "POST", n)
- })).confirmed || n?.aborted ? !1 : (await H.invalidateQueries(), qQ(`tag-management-${Date.now()}`, {
- html: `已${YQ[e.operation]}`,
+ })).confirmed || n?.aborted ? !1 : (await H.invalidateQueries(), JQ(`tag-management-${Date.now()}`, {
+ html: `已${XQ[e.operation]}`,
alert: !1,
timeout: 6e3,
action: null
}), !0);
}
-function QQ({ operation: e, selected: t, close: n, done: r, scope: i = "local" }) {
+function $Q({ operation: e, selected: t, close: n, done: r, scope: i = "local" }) {
let a = (0, P.useRef)({
operation: e,
selected: t,
@@ -64003,24 +64072,24 @@ function QQ({ operation: e, selected: t, close: n, done: r, scope: i = "local" }
scope: i
}), o = (0, P.useRef)({
name: t[0]?.k || "",
- target_id: t[0] ? JQ(t[0]) : 0
+ target_id: t[0] ? YQ(t[0]) : 0
}), [s, c] = (0, P.useState)(null);
return (0, P.useEffect)(() => {
- let e = new AbortController(), t = a.current, n = Bc({
- title: YQ[t.operation],
+ let e = new AbortController(), t = a.current, n = tl({
+ title: XQ[t.operation],
confirmLabel: "预览影响范围",
confirmDisabled: !0,
body: "<div class=\"peach-react\" data-tag-editor-fields></div>",
onConfirm: async () => {
let n = {
operation: t.operation,
- ids: t.selected.map(JQ),
+ ids: t.selected.map(YQ),
...t.scope === "online" ? { scope: t.scope } : {},
...t.operation === "rename" ? { name: o.current.name.trim() } : { target_id: o.current.target_id }
};
return {
command: n,
- plan: await XQ(n, e.signal)
+ plan: await ZQ(n, e.signal)
};
}
});
@@ -64031,14 +64100,14 @@ function QQ({ operation: e, selected: t, close: n, done: r, scope: i = "local" }
if (!e.signal.aborted) {
if (n.confirmed) {
let r = n.result;
- await ZQ(r.command, r.plan, e.signal) && t.done();
+ await QQ(r.command, r.plan, e.signal) && t.done();
}
e.signal.aborted || t.close();
}
}), () => {
e.abort(), n.close();
};
- }, []), s ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(lTe, {
+ }, []), s ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(wTe, {
operation: a.current.operation,
selected: a.current.selected,
dialog: s.dialog,
@@ -64047,8 +64116,8 @@ function QQ({ operation: e, selected: t, close: n, done: r, scope: i = "local" }
}
}), s.host) : null;
}
-function lTe({ operation: e, selected: t, dialog: n, update: r }) {
- let [i, a] = (0, P.useState)(t[0]?.k || ""), [o, s] = (0, P.useState)(t[0] ? JQ(t[0]) : 0);
+function wTe({ operation: e, selected: t, dialog: n, update: r }) {
+ let [i, a] = (0, P.useState)(t[0]?.k || ""), [o, s] = (0, P.useState)(t[0] ? YQ(t[0]) : 0);
return (0, P.useEffect)(() => {
r({
name: i,
@@ -64061,7 +64130,7 @@ function lTe({ operation: e, selected: t, dialog: n, update: r }) {
e,
t,
r
- ]), e === "rename" ? /* @__PURE__ */ (0, F.jsx)(Fz, {
+ ]), e === "rename" ? /* @__PURE__ */ (0, F.jsx)(Vz, {
autoFocus: !0,
"aria-label": "标签名称",
value: i,
@@ -64072,17 +64141,17 @@ function lTe({ operation: e, selected: t, dialog: n, update: r }) {
prefix: "保留",
selectedKey: String(o),
onSelectionChange: (e) => {
- let n = t.find((t) => String(JQ(t)) === String(e));
- n && s(JQ(n));
+ let n = t.find((t) => String(YQ(t)) === String(e));
+ n && s(YQ(n));
},
- children: t.map((e) => /* @__PURE__ */ (0, F.jsx)(jU, {
- id: String(JQ(e)),
+ children: t.map((e) => /* @__PURE__ */ (0, F.jsx)(LU, {
+ id: String(YQ(e)),
children: e.k
- }, JQ(e)))
+ }, YQ(e)))
});
}
// src/react/index/tag-manager.tsx
-function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r, onView: i, onJump: a, scope: o = "local" }) {
+function e$({ search: e, category: t = "all", view: n = "cloud", onCategory: r, onView: i, onJump: a, scope: o = "local" }) {
let s = o === "online", c = (0, P.useRef)(null), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(t), [p, m] = (0, P.useState)(n), h = r ? t : d, g = i ? n : p, _ = e ?? l, [v, y] = (0, P.useState)(!1), [b, x] = (0, P.useState)(!1), S = JSON.stringify([
o,
_,
@@ -64090,7 +64159,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
g,
v,
b
- ]), { pagination: C, onChange: w } = MQ(S), T = new URLSearchParams({
+ ]), { pagination: C, onChange: w } = NQ(S), T = new URLSearchParams({
limit: String(C.pageSize),
offset: String(C.pageIndex * C.pageSize),
q: _,
@@ -64107,25 +64176,25 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
],
queryFn: ({ signal: e }) => B(`/api/tag-management?${T}`, e)
});
- NQ(E.data?.total, C, w);
+ PQ(E.data?.total, C, w);
let [D, O] = (0, P.useState)(/* @__PURE__ */ new Map());
(0, P.useEffect)(() => {
O(/* @__PURE__ */ new Map());
}, [S]);
- let k = new Set(D.keys()), [A, j] = (0, P.useState)(null), M = jH(), ee = E.data?.items || [], te = ee, ne = (s ? qX : KX).filter(([e]) => e === "all" || e === h || E.isPending || Number(E.data?.categories[e]) > 0), N = te.map((e) => ({
+ let k = new Set(D.keys()), [A, j] = (0, P.useState)(null), M = LH(), ee = E.data?.items || [], te = ee, ne = (s ? JX : qX).filter(([e]) => e === "all" || e === h || E.isPending || Number(E.data?.categories[e]) > 0), N = te.map((e) => ({
...e,
label: e.k
- })), re = g === "alphabet" ? rZ(N, (e) => e) : [], ie = [...D.values()], ae = (e) => {
+ })), re = g === "alphabet" ? iZ(N, (e) => e) : [], ie = [...D.values()], ae = (e) => {
M.run(e.operation, async (t) => {
let n = s ? {
...e,
scope: o
} : e;
- return ZQ(n, await XQ(n, t), t);
+ return QQ(n, await ZQ(n, t), t);
}, (e) => {
e && O(/* @__PURE__ */ new Map());
});
- }, oe = ie.map(JQ), se = {
+ }, oe = ie.map(YQ), se = {
online: s,
favorites: s,
picked: k,
@@ -64146,13 +64215,13 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
children: [
e === void 0 ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "mb-4 flex",
- children: /* @__PURE__ */ (0, F.jsx)(jQ, {
+ children: /* @__PURE__ */ (0, F.jsx)(MQ, {
label: "过滤标签",
value: l,
onQuery: u
})
}) : null,
- /* @__PURE__ */ (0, F.jsx)(VQ, {
+ /* @__PURE__ */ (0, F.jsx)(HQ, {
categories: ne,
category: h,
online: s,
@@ -64180,7 +64249,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
} } : {}
},
actions: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- E.data?.duplicate_groups.length ? /* @__PURE__ */ (0, F.jsx)(cI, {
+ E.data?.duplicate_groups.length ? /* @__PURE__ */ (0, F.jsx)(mI, {
busy: M.busy === "repair",
onPress: () => ae({
operation: "repair",
@@ -64188,20 +64257,20 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
}),
children: "整理重复标签"
}) : null,
- te.length ? /* @__PURE__ */ (0, F.jsx)(cI, {
+ te.length ? /* @__PURE__ */ (0, F.jsx)(mI, {
onPress: () => O((e) => new Map([...e, ...te.map((e) => [e.k, e])])),
children: "选择本页"
}) : null,
- k.size ? /* @__PURE__ */ (0, F.jsx)(cI, {
+ k.size ? /* @__PURE__ */ (0, F.jsx)(mI, {
onPress: () => O(/* @__PURE__ */ new Map()),
children: "清空选择"
}) : null
] })
}),
- E.isPending ? /* @__PURE__ */ (0, F.jsx)("div", { dangerouslySetInnerHTML: { __html: Is({
+ E.isPending ? /* @__PURE__ */ (0, F.jsx)("div", { dangerouslySetInnerHTML: { __html: Zs({
mode: g,
pageSize: C.pageSize
- }) } }) : E.isError ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) } }) : E.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -64209,13 +64278,13 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
children: "立即重试"
}),
children: "无法读取标签"
- }) : te.length ? g === "alphabet" ? /* @__PURE__ */ (0, F.jsx)(zQ, {
+ }) : te.length ? g === "alphabet" ? /* @__PURE__ */ (0, F.jsx)(BQ, {
groups: re,
actions: se
- }) : /* @__PURE__ */ (0, F.jsx)(BQ, {
+ }) : /* @__PURE__ */ (0, F.jsx)(VQ, {
tags: N,
actions: se
- }) : /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) : /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "没有符合条件的标签。"
}),
@@ -64228,14 +64297,14 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
onChange: w,
unit: "个标签",
pageUnit: "个",
- pageSizes: Fs
+ pageSizes: Xs
})
}) : null,
- M.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ M.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: M.error
}) : null,
- /* @__PURE__ */ (0, F.jsxs)(Fk, {
+ /* @__PURE__ */ (0, F.jsxs)(Hk, {
label: "标签管理操作",
count: `已选 ${k.size} 个标签`,
visible: k.size > 0,
@@ -64257,7 +64326,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(!!M.busy),
+ ...Yz(!!M.busy),
onClick: () => ae({
operation: v ? "restore" : "hide",
ids: oe
@@ -64267,7 +64336,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
s ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(!!M.busy),
+ ...Yz(!!M.busy),
onClick: () => ae({
operation: b ? "unblock" : "block",
ids: oe
@@ -64276,7 +64345,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
}) : null
]
}),
- A ? /* @__PURE__ */ (0, F.jsx)(QQ, {
+ A ? /* @__PURE__ */ (0, F.jsx)($Q, {
operation: A,
selected: ie,
scope: o,
@@ -64287,7 +64356,7 @@ function $Q({ search: e, category: t = "all", view: n = "cloud", onCategory: r,
});
}
// src/react/index/index-page.tsx
-var uTe = [
+var TTe = [
{
value: "studios",
label: "厂牌",
@@ -64303,7 +64372,7 @@ var uTe = [
label: "系列",
symbol: "list"
}
-], dTe = [{
+], ETe = [{
value: "local",
label: "本地",
symbol: "hard-drive"
@@ -64311,7 +64380,7 @@ var uTe = [
value: "online",
label: "在线",
symbol: "rss"
-}], fTe = [
+}], DTe = [
{
value: "performers",
label: "艺人",
@@ -64327,7 +64396,7 @@ var uTe = [
label: "在线",
symbol: "rss"
}
-], pTe = {
+], OTe = {
people: [[
"big",
"大图 · 竖幅头像",
@@ -64356,20 +64425,20 @@ var uTe = [
"layout-grid"
]]
};
-function mTe({ kind: e, layout: t, onChange: n }) {
- return /* @__PURE__ */ (0, F.jsx)(LU, {
- "aria-label": `${GX[e]}索引版式`,
+function kTe({ kind: e, layout: t, onChange: n }) {
+ return /* @__PURE__ */ (0, F.jsx)(UU, {
+ "aria-label": `${KX[e]}索引版式`,
orientation: "horizontal",
value: t,
onChange: (e) => n(e),
"data-index-layout": "",
- className: `flex-none ${RU}`,
- children: pTe[e === "series" ? "series" : XX(e) ? "company" : "people"].map(([e, t, n]) => {
- let r = Vz(n);
- return /* @__PURE__ */ (0, F.jsx)(DR, {
+ className: `flex-none ${WU}`,
+ children: OTe[e === "series" ? "series" : ZX(e) ? "company" : "people"].map(([e, t, n]) => {
+ let r = qz(n);
+ return /* @__PURE__ */ (0, F.jsx)(NR, {
value: e,
"aria-label": t,
- className: w_e,
+ className: P_e,
children: /* @__PURE__ */ (0, F.jsx)("span", {
title: t,
className: "contents",
@@ -64379,14 +64448,14 @@ function mTe({ kind: e, layout: t, onChange: n }) {
})
});
}
-function hTe(e) {
- let [t, n] = (0, P.useState)(!1), [r, i] = (0, P.useState)(() => ZX({
+function ATe(e) {
+ let [t, n] = (0, P.useState)(!1), [r, i] = (0, P.useState)(() => QX({
kind: e.kind,
q: e.q,
scope: e.scope,
view: e.view,
category: e.category
- })), [a, o] = (0, P.useState)(e.layout), [s, c] = (0, P.useState)(/* @__PURE__ */ new Set()), [l, u] = (0, P.useState)("any"), d = (0, P.useRef)(null), { kind: f, q: p, scope: m, view: h, category: g } = r, _ = GX[f], v = f === "tags" && m === "online", y = f === "performers" && m === "online";
+ })), [a, o] = (0, P.useState)(e.layout), [s, c] = (0, P.useState)(/* @__PURE__ */ new Set()), [l, u] = (0, P.useState)("any"), d = (0, P.useRef)(null), { kind: f, q: p, scope: m, view: h, category: g } = r, _ = KX[f], v = f === "tags" && m === "online", y = f === "performers" && m === "online";
(0, P.useEffect)(() => {
if (r.kind === e.kind && r.scope === e.scope && r.category === e.category) return;
let t = !0;
@@ -64405,7 +64474,7 @@ function hTe(e) {
...t
};
x(Object.keys(t).every((e) => e === "q")), i(o), e.route(o, { replace: a });
- }, { pagination: C, onChange: w } = MQ(JSON.stringify(r)), T = tZ(QX(r), C.pageSize), E = It({
+ }, { pagination: C, onChange: w } = NQ(JSON.stringify(r)), T = nZ($X(r), C.pageSize), E = It({
queryKey: f === "tags" && (C.pageIndex || C.pageSize !== 100) ? [
...T.queryKey,
"page",
@@ -64420,16 +64489,16 @@ function hTe(e) {
getNextPageParam: f === "tags" ? () => void 0 : T.getNextPageParam,
enabled: !(t && f === "tags"),
placeholderData: b ? ke : void 0
- }), D = qSe(E.data), O = !!E.hasNextPage && !E.isPlaceholderData, k = E.data?.pages[0]?.total;
- NQ(f === "tags" && !E.isPlaceholderData ? k : void 0, C, w);
- let A = f === "tags" ? E.isPending || E.isError ? "" : `${(k ?? D.length).toLocaleString()} 个标签` : JSe(D.length, !!E.hasNextPage), j = `${f}:${m}:${p}`, M = (0, P.useRef)(null), ee = E.data?.pages[0]?.categories;
+ }), D = cCe(E.data), O = !!E.hasNextPage && !E.isPlaceholderData, k = E.data?.pages[0]?.total;
+ PQ(f === "tags" && !E.isPlaceholderData ? k : void 0, C, w);
+ let A = f === "tags" ? E.isPending || E.isError ? "" : `${(k ?? D.length).toLocaleString()} 个标签` : lCe(D.length, !!E.hasNextPage), j = `${f}:${m}:${p}`, M = (0, P.useRef)(null), ee = E.data?.pages[0]?.categories;
ee && !E.isPlaceholderData && (M.current = {
key: j,
counts: ee
});
let te = ee ?? (M.current?.key === j ? M.current.counts : void 0), ne = E.isPending && !te, N = ([e]) => e === "all" || ne || Number(te?.[e] || 0) > 0;
(0, P.useLayoutEffect)(() => {
- d.current && xl(d.current);
+ d.current && Il(d.current);
}, [a]);
let re = (0, P.useMemo)(() => f === "tags" ? D.map((t) => ({
...t,
@@ -64438,15 +64507,15 @@ function hTe(e) {
D,
f,
v
- ]), ie = (0, P.useMemo)(() => f === "tags" && h === "alphabet" ? rZ(re, (t) => v ? t : e.tagLabel(t)) : [], [
+ ]), ie = (0, P.useMemo)(() => f === "tags" && h === "alphabet" ? iZ(re, (t) => v ? t : e.tagLabel(t)) : [], [
re,
h,
f,
v
]), ae = (t) => {
o(t), e.savePreference({ layout: t });
- }, oe = f === "tags" ? /* @__PURE__ */ (0, F.jsx)(FQ, {
- tabs: dTe,
+ }, oe = f === "tags" ? /* @__PURE__ */ (0, F.jsx)(IQ, {
+ tabs: ETe,
value: m,
label: "词表",
onChange: (e) => {
@@ -64456,8 +64525,8 @@ function hTe(e) {
view: e === "online" ? "alphabet" : h
});
}
- }) : XX(f) || f === "series" ? /* @__PURE__ */ (0, F.jsx)(FQ, {
- tabs: uTe,
+ }) : ZX(f) || f === "series" ? /* @__PURE__ */ (0, F.jsx)(IQ, {
+ tabs: TTe,
value: f,
label: "资料类型",
onChange: (e) => S({ kind: e })
@@ -64466,7 +64535,7 @@ function hTe(e) {
let n = new Set(e);
return n.delete(t) || n.add(t), n;
}) : re.find((e) => e.k === t)?.entity_id ? e.openEntity("tag", t) : e.showTags([t], "all");
- }, ce = (v ? qX : KX).filter(N);
+ }, ce = (v ? JX : qX).filter(N);
return /* @__PURE__ */ (0, F.jsxs)("div", {
ref: d,
"data-index-page": f,
@@ -64481,23 +64550,23 @@ function hTe(e) {
className: "flex flex-none items-center text-display-4-medium whitespace-nowrap text-text-primary max-board-narrow:text-title-1-medium",
children: _
}),
- YX(f) ? /* @__PURE__ */ (0, F.jsx)("span", {
+ XX(f) ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-index-count": "",
className: "text-caption-1-regular leading-5 whitespace-nowrap text-text-secondary tabular-nums max-board-narrow:order-1 max-board-narrow:basis-full",
children: E.isPending || E.isError ? "" : A
}) : null,
- YX(f) ? /* @__PURE__ */ (0, F.jsx)(mTe, {
+ XX(f) ? /* @__PURE__ */ (0, F.jsx)(kTe, {
kind: f,
layout: a,
onChange: ae
}) : null,
- /* @__PURE__ */ (0, F.jsx)(nB, { kind: f === "tags" ? "tag" : f === "series" ? "series" : f === "studios" ? "studio" : f === "agencies" ? "agency" : f === "creators" ? "creator" : "performer" }),
+ /* @__PURE__ */ (0, F.jsx)(cB, { kind: f === "tags" ? "tag" : f === "series" ? "series" : f === "studios" ? "studio" : f === "agencies" ? "agency" : f === "creators" ? "creator" : "performer" }),
f === "tags" ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: t ? "primary" : "ghost",
iconOnly: !0,
className: "flex-none",
"data-tag-mode": "",
- leadingIcon: Vz("pencil"),
+ leadingIcon: qz("pencil"),
"aria-label": t ? "返回标签浏览" : "管理标签",
title: t ? "返回标签浏览" : "管理标签",
"aria-pressed": t,
@@ -64505,7 +64574,7 @@ function hTe(e) {
e.exitSelectMode(), c(/* @__PURE__ */ new Set()), n(!t);
}
}) : null,
- /* @__PURE__ */ (0, F.jsx)(jQ, {
+ /* @__PURE__ */ (0, F.jsx)(MQ, {
label: `过滤${_}`,
value: p,
onQuery: (e) => {
@@ -64514,8 +64583,8 @@ function hTe(e) {
})
]
}),
- f === "performers" || f === "creators" ? /* @__PURE__ */ (0, F.jsx)(FQ, {
- tabs: fTe,
+ f === "performers" || f === "creators" ? /* @__PURE__ */ (0, F.jsx)(IQ, {
+ tabs: DTe,
value: y ? "online" : f,
label: "人物名册",
onChange: (t) => {
@@ -64527,7 +64596,7 @@ function hTe(e) {
}
}) : null,
oe,
- t && f === "tags" ? /* @__PURE__ */ (0, F.jsx)($Q, {
+ t && f === "tags" ? /* @__PURE__ */ (0, F.jsx)(e$, {
scope: m,
search: p,
category: g,
@@ -64541,8 +64610,8 @@ function hTe(e) {
}, m) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
f === "performers" && m === "local" ? /* @__PURE__ */ (0, F.jsx)("div", {
"aria-label": "身份分类",
- className: WX,
- children: UX.filter((e) => e[0] === g || N(e)).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(q, {
+ className: GX,
+ children: WX.filter((e) => e[0] === g || N(e)).map(([e, t]) => /* @__PURE__ */ (0, F.jsx)(q, {
variant: g === e ? "primary" : "secondary",
size: "small",
"aria-pressed": g === e,
@@ -64550,7 +64619,7 @@ function hTe(e) {
children: t
}, e))
}) : null,
- f === "tags" ? /* @__PURE__ */ (0, F.jsx)(VQ, {
+ f === "tags" ? /* @__PURE__ */ (0, F.jsx)(HQ, {
categories: ce,
category: g,
online: v,
@@ -64569,26 +64638,26 @@ function hTe(e) {
children: (() => {
if (E.isPending) return /* @__PURE__ */ (0, F.jsx)("div", {
"aria-busy": "true",
- dangerouslySetInnerHTML: { __html: f === "tags" ? Is({
+ dangerouslySetInnerHTML: { __html: f === "tags" ? Zs({
mode: h,
pageSize: C.pageSize
- }) : zs({
+ }) : ec({
kind: f,
layout: a,
mode: h
}) }
});
- if (E.isError) return /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz("alert"),
+ if (E.isError) return /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz("alert"),
title: `没能读取${_}`,
actions: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
onClick: () => void E.refetch(),
children: "立即重试"
}),
- children: tn(E.error)
+ children: _n(E.error)
});
- if (!D.length) return /* @__PURE__ */ (0, F.jsx)(_Te, {
+ if (!D.length) return /* @__PURE__ */ (0, F.jsx)(MTe, {
kind: f,
filtered: !!p || g !== "all",
online: v || y,
@@ -64597,12 +64666,12 @@ function hTe(e) {
category: "all"
})
});
- if (y) return /* @__PURE__ */ (0, F.jsx)($Se, {
+ if (y) return /* @__PURE__ */ (0, F.jsx)(mCe, {
items: D,
layout: a,
props: e
});
- if (YX(f)) return /* @__PURE__ */ (0, F.jsx)(cZ, {
+ if (XX(f)) return /* @__PURE__ */ (0, F.jsx)(lZ, {
kind: f,
items: D,
layout: a,
@@ -64613,10 +64682,10 @@ function hTe(e) {
picked: s,
press: se
};
- return h === "alphabet" ? /* @__PURE__ */ (0, F.jsx)(zQ, {
+ return h === "alphabet" ? /* @__PURE__ */ (0, F.jsx)(BQ, {
groups: ie,
actions: t
- }) : /* @__PURE__ */ (0, F.jsx)(BQ, {
+ }) : /* @__PURE__ */ (0, F.jsx)(VQ, {
tags: re,
actions: t
});
@@ -64631,7 +64700,7 @@ function hTe(e) {
onChange: w,
unit: "个标签",
pageUnit: "个",
- pageSizes: Fs
+ pageSizes: Xs
})
}) : null,
O ? /* @__PURE__ */ (0, F.jsx)("div", {
@@ -64645,11 +64714,11 @@ function hTe(e) {
onClick: () => void E.fetchNextPage(),
children: [E.isFetchingNextPage ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: xs("正在载入下一批") }
+ dangerouslySetInnerHTML: { __html: Is("正在载入下一批") }
}) : null, "载入更多"]
})
}) : null,
- f === "tags" && !v && e.selectMode ? /* @__PURE__ */ (0, F.jsx)(sTe, {
+ f === "tags" && !v && e.selectMode ? /* @__PURE__ */ (0, F.jsx)(STe, {
count: s.size,
match: l,
onMatch: u,
@@ -64663,7 +64732,7 @@ function hTe(e) {
]
});
}
-var gTe = {
+var jTe = {
tags: "标签",
performers: "艺人",
creators: "卖家",
@@ -64671,9 +64740,9 @@ var gTe = {
agencies: "事务所",
series: "系列"
};
-function _Te({ kind: e, filtered: t, online: n, onClear: r }) {
- if (t) return /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz("search"),
+function MTe({ kind: e, filtered: t, online: n, onClear: r }) {
+ if (t) return /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz("search"),
title: "没有符合条件的内容",
actions: /* @__PURE__ */ (0, F.jsx)(q, {
size: "small",
@@ -64682,16 +64751,16 @@ function _Te({ kind: e, filtered: t, online: n, onClear: r }) {
}),
children: "清除筛选或搜索条件后查看全部内容。"
});
- let i = n && e === "performers" ? "创作者" : gTe[e], a = /* @__PURE__ */ (0, F.jsx)(pI, {
+ let i = n && e === "performers" ? "创作者" : jTe[e], a = /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
variant: n ? "primary" : "secondary",
href: "/subscriptions?tab=add",
children: "添加关注"
});
- return /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: Vz(e === "tags" ? "tags" : "user-round"),
+ return /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: qz(e === "tags" ? "tags" : "user-round"),
title: `还没有${i}`,
- actions: n ? a : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(pI, {
+ actions: n ? a : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/settings/library",
children: "添加媒体"
@@ -64699,15 +64768,15 @@ function _Te({ kind: e, filtered: t, online: n, onClear: r }) {
children: n ? `添加关注来源并获取内容后,这里会显示来源上的${i}。` : "添加内容并补充资料后,这里会显示对应信息。"
});
}
-var e$ = {
+var t$ = {
video: ["视频", "play"],
image: ["图片", "pics"],
archive: ["压缩包", "file-archive"],
audio: ["音频", "file-audio"],
url: ["网址快捷方式", "globe"],
other: ["其它文件", "hard-drive"]
-}, vTe = (e) => e$[e.junk_kind || "other"] || e$.other;
-function yTe(e) {
+}, NTe = (e) => t$[e.junk_kind || "other"] || t$.other;
+function PTe(e) {
return e === "dismissed" ? {
operation: "reconsider-junk",
label: "重新判断",
@@ -64718,40 +64787,40 @@ function yTe(e) {
glyph: "check"
};
}
-var t$ = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), bTe = (e, t) => [
+var n$ = (e, t) => Number((t ? e.counts?.[t] : e.all_total) || 0), FTe = (e, t) => [
"junk-queue",
e.view,
e.kind,
t
];
-function xTe({ kind: e, view: t }) {
+function ITe({ kind: e, view: t }) {
let n = new URLSearchParams({
limit: "200",
status: t
});
return e && n.set("kind", e), n.toString();
}
-async function STe(e, t) {
- let n = await B(`/api/ads?${xTe(e)}`, t);
+async function LTe(e, t) {
+ let n = await B(`/api/ads?${ITe(e)}`, t);
return {
...n,
items: n.items || []
};
}
// src/react/junk-queue/junk-card.tsx
-function n$({ name: e }) {
+function r$({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
}
-var r$ = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
-function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
- let o = (0, P.useRef)(null), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), d = e.junk_kind || "other", [f, p] = vTe(e), m = String(e.name || ""), h = yTe(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
- t.target.closest("[data-junk-actions]") || r$(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
+var i$ = (e, t) => e || t.shiftKey || t.ctrlKey || t.metaKey;
+function RTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions: a }) {
+ let o = (0, P.useRef)(null), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), d = e.junk_kind || "other", [f, p] = NTe(e), m = String(e.name || ""), h = PTe(t), g = d === "video" ? `/thumb?id=${e.id}&c=4` : d === "image" ? `/photo-thumb?id=${e.id}` : "", _ = d === "video" || d === "image", v = (t) => {
+ t.target.closest("[data-junk-actions]") || i$(r, t) && (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey));
}, y = (t) => {
- t.stopPropagation(), r$(r, t) ? (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey)) : o.current && a.open(e, o.current);
+ t.stopPropagation(), i$(r, t) ? (t.preventDefault(), a.toggleSelection(e.id, t.shiftKey)) : o.current && a.open(e, o.current);
}, b = (t) => {
t.preventDefault(), t.stopPropagation(), s !== "reveal" && (c("reveal"), u(""), a.reveal(e).then(u, () => {}).finally(() => c("")));
}, x = (t) => (n) => {
@@ -64782,7 +64851,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"data-junk-kind": d,
"data-selected": n ? "" : void 0,
onClick: v,
- onMouseDown: pG,
+ onMouseDown: SG,
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-media-pic": "",
@@ -64790,7 +64859,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
children: [
/* @__PURE__ */ (0, F.jsxs)("span", {
"data-media-glyph": "",
- children: [/* @__PURE__ */ (0, F.jsx)(n$, { name: p }), /* @__PURE__ */ (0, F.jsx)("b", { children: f })]
+ children: [/* @__PURE__ */ (0, F.jsx)(r$, { name: p }), /* @__PURE__ */ (0, F.jsx)("b", { children: f })]
}),
g ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-art": "thumb",
@@ -64802,7 +64871,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
}),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-media-check": "",
- children: /* @__PURE__ */ (0, F.jsx)(n$, { name: "check" })
+ children: /* @__PURE__ */ (0, F.jsx)(r$, { name: "check" })
})
]
}),
@@ -64821,7 +64890,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
}) : null,
/* @__PURE__ */ (0, F.jsx)("span", {
"data-junk-size": "",
- children: Number(e.size) > 0 ? jn(Number(e.size)) : "大小未知"
+ children: Number(e.size) > 0 ? Kn(Number(e.size)) : "大小未知"
})
]
})]
@@ -64838,8 +64907,8 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
onClick: b,
children: [s === "reveal" ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-junk-spinner": "",
- dangerouslySetInnerHTML: { __html: xs("正在定位") }
- }) : /* @__PURE__ */ (0, F.jsx)(n$, { name: "folder-open" }), /* @__PURE__ */ (0, F.jsx)("span", {
+ dangerouslySetInnerHTML: { __html: Is("正在定位") }
+ }) : /* @__PURE__ */ (0, F.jsx)(r$, { name: "folder-open" }), /* @__PURE__ */ (0, F.jsx)("span", {
"data-junk-label": "",
children: "打开位置"
})]
@@ -64851,7 +64920,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": h.label,
...S(h.operation),
onClick: x(h.operation),
- children: [/* @__PURE__ */ (0, F.jsx)(n$, { name: h.glyph }), /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [/* @__PURE__ */ (0, F.jsx)(r$, { name: h.glyph }), /* @__PURE__ */ (0, F.jsx)("span", {
"data-junk-label": "",
children: h.label
})]
@@ -64863,7 +64932,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
"aria-label": "移入回收站",
...S("dispose"),
onClick: x("dispose"),
- children: [/* @__PURE__ */ (0, F.jsx)(n$, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [/* @__PURE__ */ (0, F.jsx)(r$, { name: "trash" }), /* @__PURE__ */ (0, F.jsx)("span", {
"data-junk-label": "",
children: "移入回收站"
})]
@@ -64878,7 +64947,7 @@ function CTe({ item: e, view: t, selected: n, selectMode: r, helpers: i, actions
]
});
}
-var wTe = (0, P.memo)(CTe), i$ = [
+var zTe = (0, P.memo)(RTe), a$ = [
[
"",
"全部",
@@ -64914,40 +64983,40 @@ var wTe = (0, P.memo)(CTe), i$ = [
"其它",
"hard-drive"
]
-], TTe = (e) => i$.find(([t]) => t === e)?.[0] ?? "";
-function a$(e) {
+], BTe = (e) => a$.find(([t]) => t === e)?.[0] ?? "";
+function o$(e) {
let t = new URLSearchParams(e);
return {
- kind: TTe(t.get("type")),
+ kind: BTe(t.get("type")),
view: t.get("view") === "dismissed" ? "dismissed" : "pending"
};
}
-function o$(e = "", t = "pending") {
+function s$(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 s$(e) {
+function c$(e) {
return e === "dismissed" ? {
view: "pending",
label: "返回待判断",
glyph: "rotate-ccw",
- href: o$("", "pending")
+ href: s$("", "pending")
} : {
view: "dismissed",
label: "已排除",
glyph: "eye-off",
- href: o$("", "dismissed")
+ href: s$("", "dismissed")
};
}
-var c$ = (e) => e === "dismissed" ? "已排除" : "待判断", l$ = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${e}"></use></svg>`;
-function ETe({ kind: e, view: t }) {
- let n = i$.map(([n, r, i]) => `<a href="${o$(n, t)}" data-junk-kind-link="${n}"${n === e ? " aria-current=\"page\"" : ""}>${l$(i)}${z(r)}</a>`).join(""), r = s$(t);
- return `<div class="peach-react" data-junk-count-skeleton=""><div data-junk-count=""><div data-junk-summary="" aria-live="polite">${_s(c$(t))}</div><div data-junk-filters-frame="" data-filter-glass="" data-glass-pane=""><span data-view-glide="" aria-hidden="true" hidden></span><nav data-junk-filters="" aria-label="垃圾文件分类">${n}<i data-junk-divider="" aria-hidden="true"></i><a href="${r.href}" data-junk-view-link="${r.view}"${t === "dismissed" ? " aria-current=\"page\"" : ""}>${l$(r.glyph)}${r.label}</a></nav></div></div></div>`;
+var l$ = (e) => e === "dismissed" ? "已排除" : "待判断", u$ = (e) => `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${e}"></use></svg>`;
+function VTe({ kind: e, view: t }) {
+ let n = a$.map(([n, r, i]) => `<a href="${s$(n, t)}" data-junk-kind-link="${n}"${n === e ? " aria-current=\"page\"" : ""}>${u$(i)}${z(r)}</a>`).join(""), r = c$(t);
+ return `<div class="peach-react" data-junk-count-skeleton=""><div data-junk-count=""><div data-junk-summary="" aria-live="polite">${Ms(l$(t))}</div><div data-junk-filters-frame="" data-filter-glass="" data-glass-pane=""><span data-view-glide="" aria-hidden="true" hidden></span><nav data-junk-filters="" aria-label="垃圾文件分类">${n}<i data-junk-divider="" aria-hidden="true"></i><a href="${r.href}" data-junk-view-link="${r.view}"${t === "dismissed" ? " aria-current=\"page\"" : ""}>${u$(r.glyph)}${r.label}</a></nav></div></div></div>`;
}
// src/react/components/collection-summary.tsx
-function u$({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
+function d$({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !1 }) {
return /* @__PURE__ */ (0, F.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
@@ -64973,31 +65042,31 @@ function u$({ label: e, figure: t, detail: n = "", pending: r = !1, flush: i = !
});
}
// src/react/junk-queue/junk-count.tsx
-function d$({ name: e }) {
+function f$({ name: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
}
-function f$({ scope: e, count: t }) {
+function p$({ scope: e, count: t }) {
return t ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [" ", /* @__PURE__ */ (0, F.jsx)("span", {
"data-count-badge": `junk:${e}`,
children: t.toLocaleString()
})] }) : null;
}
-function DTe({ route: e, page: t, failed: n, onNavigate: r }) {
- let i = cV(), a = (0, P.useRef)(null), { kind: o, view: s } = e, c = dI(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? i$.map(([e]) => t$(t, e)).join(",") : ""}`), l = s$(s), u = (e) => {
+function HTe({ route: e, page: t, failed: n, onNavigate: r }) {
+ let i = mV(), a = (0, P.useRef)(null), { kind: o, view: s } = e, c = _I(a, i, "[data-junk-kind-link][aria-current=\"page\"]", `${s}:${o}:${t ? a$.map(([e]) => n$(t, e)).join(",") : ""}`), l = c$(s), u = (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") || o$()));
+ !t || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || (e.preventDefault(), r(t.getAttribute("href") || s$()));
}, d = t ? `${Number(t.total || 0).toLocaleString()} 个` : n ? "—" : "";
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-junk-count": "",
children: [/* @__PURE__ */ (0, F.jsx)("div", {
"data-junk-summary": "",
"aria-live": "polite",
- children: /* @__PURE__ */ (0, F.jsx)(u$, {
- label: c$(s),
+ children: /* @__PURE__ */ (0, F.jsx)(d$, {
+ label: l$(s),
figure: d,
pending: !t && !n,
flush: !0
@@ -65017,17 +65086,17 @@ function DTe({ route: e, page: t, failed: n, onNavigate: r }) {
onClick: u,
onPointerLeave: c.leave,
children: [
- i$.map(([e, n, r]) => /* @__PURE__ */ (0, F.jsxs)("a", {
- href: o$(e, s),
+ a$.map(([e, n, r]) => /* @__PURE__ */ (0, F.jsxs)("a", {
+ href: s$(e, s),
"data-junk-kind-link": e,
"aria-current": e === o ? "page" : void 0,
onPointerEnter: c.hover,
children: [
- /* @__PURE__ */ (0, F.jsx)(d$, { name: r }),
+ /* @__PURE__ */ (0, F.jsx)(f$, { name: r }),
n,
- /* @__PURE__ */ (0, F.jsx)(f$, {
+ /* @__PURE__ */ (0, F.jsx)(p$, {
scope: e,
- count: t ? t$(t, e) : 0
+ count: t ? n$(t, e) : 0
})
]
}, e || "all")),
@@ -65041,9 +65110,9 @@ function DTe({ route: e, page: t, failed: n, onNavigate: r }) {
"aria-current": s === "dismissed" ? "page" : void 0,
onPointerEnter: s === "dismissed" ? void 0 : c.hover,
children: [
- /* @__PURE__ */ (0, F.jsx)(d$, { name: l.glyph }),
+ /* @__PURE__ */ (0, F.jsx)(f$, { name: l.glyph }),
l.label,
- /* @__PURE__ */ (0, F.jsx)(f$, {
+ /* @__PURE__ */ (0, F.jsx)(p$, {
scope: "dismissed",
count: Number(t?.dismissed_total || 0)
})
@@ -65055,33 +65124,33 @@ function DTe({ route: e, page: t, failed: n, onNavigate: r }) {
});
}
// src/react/junk-queue/junk-queue-page.tsx
-var OTe = Vz("check"), kTe = (e, t) => e[1] === t.view && e[2] === t.kind;
-function ATe(e) {
+var UTe = qz("check"), WTe = (e, t) => e[1] === t.view && e[2] === t.kind;
+function GTe(e) {
let t = {
kind: e.kind,
view: e.view
}, n = Pt({
- queryKey: bTe(t, e.revision),
- queryFn: ({ signal: e }) => STe(t, e),
- placeholderData: (e, n) => n && kTe(n.queryKey, t) ? e : void 0
+ queryKey: FTe(t, e.revision),
+ queryFn: ({ signal: e }) => LTe(t, e),
+ placeholderData: (e, n) => n && WTe(n.queryKey, t) ? e : void 0
});
(0, P.useEffect)(() => {
n.isFetching || e.settled?.(e.revision);
}, [n.isFetching, e.revision]);
- let r = jTe(e.countRow), i = n.isPending;
+ let r = KTe(e.countRow), i = n.isPending;
(0, P.useLayoutEffect)(() => {
let t = e.countRow;
t && (i ? t.setAttribute("aria-busy", "true") : t.removeAttribute("aria-busy"));
}, [e.countRow, i]), (0, P.useLayoutEffect)(() => {
- r && n.data && Ns(r, "junk");
+ r && n.data && Js(r, "junk");
}, [r, n.data]);
- let { navigate: a } = e.actions, o = r ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(DTe, {
+ let { navigate: a } = e.actions, o = r ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(HTe, {
route: t,
page: n.data,
failed: n.isError && !n.data,
onNavigate: a
}), r) : null;
- return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [o, /* @__PURE__ */ (0, F.jsx)(MTe, {
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [o, /* @__PURE__ */ (0, F.jsx)(qTe, {
props: e,
data: n.data,
pending: i,
@@ -65089,7 +65158,7 @@ function ATe(e) {
retry: () => void n.refetch()
}, `${t.view}:${t.kind}`)] });
}
-function jTe(e) {
+function KTe(e) {
let [t, n] = (0, P.useState)(null);
return (0, P.useLayoutEffect)(() => {
if (!e) return;
@@ -65099,8 +65168,8 @@ function jTe(e) {
};
}, [e]), t;
}
-function MTe({ 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, P.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, P.useCallback)(() => {
+function qTe({ props: e, data: t, pending: n, error: r, retry: i }) {
+ let a = ZW(n, e.skeletonHtml), o = Math.max(1, e.batchSize || 60), [s, c] = (0, P.useState)(1), l = t?.items || [], u = l.slice(0, s * o), { canLoadMore: d } = e, f = (0, P.useCallback)(() => {
d?.() !== !1 && c((e) => e + 1);
}, [d]);
return /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -65108,16 +65177,16 @@ function MTe({ 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, F.jsx)(UW, {
- message: tn(r),
+ if (!t) return /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(r),
onRetry: i
});
if (!l.length) {
let t = e.view === "dismissed";
- return /* @__PURE__ */ (0, F.jsx)(zz, {
- icon: OTe,
+ return /* @__PURE__ */ (0, F.jsx)(Gz, {
+ icon: UTe,
title: t ? "没有已排除的文件" : "没有待判断的垃圾文件",
- actions: t ? /* @__PURE__ */ (0, F.jsx)(pI, {
+ actions: t ? /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: "/junk-files",
children: "查看待判断"
@@ -65130,7 +65199,7 @@ function MTe({ 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, F.jsx)(wTe, {
+ children: u.map((t) => /* @__PURE__ */ (0, F.jsx)(zTe, {
item: t,
view: e.view,
selected: e.selected.has(t.id),
@@ -65139,7 +65208,7 @@ function MTe({ props: e, data: t, pending: n, error: r, retry: i }) {
actions: e.actions
}, t.id))
}),
- u.length < l.length ? /* @__PURE__ */ (0, F.jsx)(NTe, { onMore: f }, s) : null,
+ u.length < l.length ? /* @__PURE__ */ (0, F.jsx)(JTe, { onMore: f }, s) : null,
u.length >= l.length && Number(t.total || 0) > l.length ? /* @__PURE__ */ (0, F.jsx)("p", {
"data-junk-truncated": "",
className: "py-6 text-center text-caption-1-regular text-text-secondary",
@@ -65149,35 +65218,35 @@ function MTe({ props: e, data: t, pending: n, error: r, retry: i }) {
})()]
});
}
-function NTe({ onMore: e }) {
+function JTe({ onMore: e }) {
let t = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
let n = t.current;
if (!n || typeof IntersectionObserver > "u") return;
let r = new IntersectionObserver((t) => {
t.some((e) => e.isIntersecting) && e();
- }, { rootMargin: VW });
+ }, { rootMargin: XW });
return r.observe(n), () => r.disconnect();
}, [e]), /* @__PURE__ */ (0, F.jsx)("div", {
ref: t,
"data-load-more": "",
onClick: e,
- dangerouslySetInnerHTML: { __html: Cs(Ss) }
+ dangerouslySetInnerHTML: { __html: Rs(Ls) }
});
}
// src/react/wants/wants.ts
-var p$ = "/api/wants", m$ = ["wants"], PTe = (e) => [
+var m$ = "/api/wants", h$ = ["wants"], YTe = (e) => [
"wants",
"follow",
e
-], FTe = [
+], XTe = [
["searching", "待找"],
["unreleased", "未发售"],
["given_up", "暂时放弃"],
["acquired", "已入库"]
-], h$ = (e) => B(p$, e);
-function ITe(e, t) {
- H.setQueryData(m$, (n) => n?.items.some((n) => n.id === e && n.has_magnets !== t) ? {
+], g$ = (e) => B(m$, e);
+function ZTe(e, t) {
+ H.setQueryData(h$, (n) => n?.items.some((n) => n.id === e && n.has_magnets !== t) ? {
...n,
items: n.items.map((n) => n.id === e ? {
...n,
@@ -65185,37 +65254,37 @@ function ITe(e, t) {
} : n)
} : n);
}
-var LTe = (e, t) => B(`${p$}?follow=${encodeURIComponent(e)}`, t), g$ = (e, t) => V(p$, {
+var QTe = (e, t) => B(`${m$}?follow=${encodeURIComponent(e)}`, t), _$ = (e, t) => V(m$, {
action: "add",
...e
-}, "POST", t), _$ = (e, t) => V(p$, {
+}, "POST", t), v$ = (e, t) => V(m$, {
action: "remove",
ids: e
-}, "POST", t), RTe = (e, t) => V(p$, {
+}, "POST", t), $Te = (e, t) => V(m$, {
action: "reset",
ids: e
-}, "POST", t), v$ = () => H.invalidateQueries({ queryKey: m$ }), zTe = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
-function BTe(e) {
+}, "POST", t), y$ = () => H.invalidateQueries({ queryKey: h$ }), eEe = (e) => e.code || e.title || `关注条目 ${e.follow_item_id ?? e.id}`;
+function tEe(e) {
return e.phase === "acquired" ? e.acquired_at ? `入库于 ${e.acquired_at.slice(0, 10)}` : "已入库" : e.phase === "unreleased" ? e.release_date ? `${e.release_date} 发售` : "还没发售" : e.phase === "given_up" ? `查过 ${e.search_count} 次都没找到` : e.fresh ? "新片:查不到也一直留在待找" : e.search_count ? `查过 ${e.search_count} 次` : "还没查过";
}
// src/react/jav/jav-navigation.ts
-var y$ = [
+var b$ = [
["library", "馆藏"],
["discover", "发现"],
["wants", "想要"]
-], b$ = (e) => y$.some(([t]) => t === e) ? e : "library", VTe = (e) => b$(e) === "library" ? "/?jav=1" : `/jav?tab=${e}`;
-function HTe(e) {
+], x$ = (e) => b$.some(([t]) => t === e) ? e : "library", nEe = (e) => x$(e) === "library" ? "/?jav=1" : `/jav?tab=${e}`;
+function rEe(e) {
let t = new URLSearchParams(e);
return t.delete("tab"), t.set("jav", "1"), "/?" + t;
}
// src/react/jav/jav.ts
-var x$ = (e, t = "taste", n = "desc") => [
+var S$ = (e, t = "taste", n = "desc") => [
"jav-discoveries",
e,
t,
n
];
-function S$(e, t, n = {}) {
+function C$(e, t, n = {}) {
let r = new URLSearchParams({
scope: e,
limit: "100",
@@ -65224,91 +65293,91 @@ function S$(e, t, n = {}) {
});
return n.jobId && r.set("metadata_job_id", n.jobId), n.refreshMetadata && r.set("metadata_refresh", "1"), n.cancelMetadata && r.set("metadata_cancel", "1"), B(`/api/jav/discoveries?${r}`, t);
}
-function UTe(e, t, n) {
- let r = io({
+function iEe(e, t, n) {
+ let r = bo({
...e,
is_jav: !0
}, t, !1, n);
if (r.html || !e.cover_url || !e.code) return r.html;
- let i = z(Ka(e));
- return no(e, t).replace(/ src="[^"]*"/, ` src="${i}" data-jav-image="${e.id}" data-jav-cover="${i}" data-jav-thumb="" data-jav-image-layout="${t}"${t === "big" ? " data-panel-prior=\"1\"" : ""}`).replace("data-drop=\"self\"", "data-drop=\"initial\" data-initial=\"封面未取得\" data-drop-class=\"media-nopic\"");
+ let i = z(so(e));
+ return vo(e, t).replace(/ src="[^"]*"/, ` src="${i}" data-jav-image="${e.id}" data-jav-cover="${i}" data-jav-thumb="" data-jav-image-layout="${t}"${t === "big" ? " data-panel-prior=\"1\"" : ""}`).replace("data-drop=\"self\"", "data-drop=\"initial\" data-initial=\"封面未取得\" data-drop-class=\"media-nopic\"");
}
-async function WTe(e, t) {
+async function aEe(e, t) {
e === "wants" ? await H.ensureQueryData({
- queryKey: m$,
- queryFn: () => h$(t),
+ queryKey: h$,
+ queryFn: () => g$(t),
staleTime: 3e4,
revalidateIfStale: !0
}) : e === "discover" && await H.ensureQueryData({
- queryKey: x$("external"),
- queryFn: () => S$("external", t),
+ queryKey: S$("external"),
+ queryFn: () => C$("external", t),
staleTime: 3e4,
revalidateIfStale: !0
});
}
// src/react/components/fieldset-layout.ts
-var C$ = UH({
+var w$ = YH({
padding: "none",
bordered: "line",
className: "overflow-hidden"
-}), w$ = {
+}), T$ = {
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"
-}, T$ = {
+}, E$ = {
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"
};
-function E$(e) {
- return `${C$} ${e === "split" ? "fieldset-split" : "flex flex-col"}`;
+function D$(e) {
+ return `${w$} ${e === "split" ? "fieldset-split" : "flex flex-col"}`;
}
// src/management.ts
-var D$ = "发现新文件,补全新增及未完成影片的资料和预览。需要检查全部影片时,使用全库维护。", O$ = "部分视频文件可能播放卡顿、打不开,修复缺时间戳表和缺索引的问题。", k$ = "<span class=\"skeleton skeleton-text\" aria-hidden=\"true\"></span>", A$ = "disabled data-skeleton-action", GTe = "aria-disabled=\"true\"", j$ = (e) => `<div class="peach-react"><div class="flex flex-col gap-4">${e}</div></div>`, M$ = (e, t, n) => `<div class="${w$[n]}"><div class="flex flex-col gap-2">
+var O$ = "发现新文件,补全新增及未完成影片的资料和预览。需要检查全部影片时,使用全库维护。", k$ = "部分视频文件可能播放卡顿、打不开,修复缺时间戳表和缺索引的问题。", A$ = "<span class=\"skeleton skeleton-text\" aria-hidden=\"true\"></span>", j$ = "disabled data-skeleton-action", oEe = "aria-disabled=\"true\"", M$ = (e) => `<div class="peach-react"><div class="flex flex-col gap-4">${e}</div></div>`, N$ = (e, t, n) => `<div class="${T$[n]}"><div class="flex flex-col gap-2">
<h3 class="text-title-2-medium text-text-primary">${e}</h3>
<p class="text-body-2-regular text-text-secondary">${t}</p></div></div>`;
-function KTe() {
- return j$(`<section aria-label="扫描与采集" class="${E$("stack")}" data-cleanup-task data-cleanup-processing>
- ${M$("扫描与采集", D$, "stack")}
- <footer class="${T$.stack}"><a href="/sources" class="inline-flex items-center justify-center gap-1 whitespace-nowrap font-sans rounded-sm text-body-medium text-accent-600"><span>来源和凭证</span>${os("arrow-up", "size-(--icon-inline) shrink-0 rotate-90")}</a><span data-button-group data-split-button data-variant="primary">${ls({
+function sEe() {
+ return M$(`<section aria-label="扫描与采集" class="${D$("stack")}" data-cleanup-task data-cleanup-processing>
+ ${N$("扫描与采集", O$, "stack")}
+ <footer class="${E$.stack}"><a href="/sources" class="inline-flex items-center justify-center gap-1 whitespace-nowrap font-sans rounded-sm text-body-medium text-accent-600"><span>来源和凭证</span>${xs("arrow-up", "size-(--icon-inline) shrink-0 rotate-90")}</a><span data-button-group data-split-button data-variant="primary">${ws({
label: "同步新增文件",
- attrs: A$
- })}${ls({
+ attrs: j$
+ })}${ws({
glyph: "chevron-down",
- attrs: `${A$} aria-label="更多同步方式"`
+ attrs: `${j$} aria-label="更多同步方式"`
})}</span></footer>
</section>`);
}
-function qTe() {
- return j$(`<section aria-label="媒体修复" class="${E$("split")}" data-cleanup-task data-cleanup-processing>
- ${M$("媒体修复", O$, "split")}
- <footer class="${T$.split}">${ds(k$, {
+function cEe() {
+ return M$(`<section aria-label="媒体修复" class="${D$("split")}" data-cleanup-task data-cleanup-processing>
+ ${N$("媒体修复", k$, "split")}
+ <footer class="${E$.split}">${Es(A$, {
className: "w-48",
- attrs: GTe
- })}${ls({
+ attrs: oEe
+ })}${ws({
label: "开始修复",
- attrs: A$
+ attrs: j$
})}</footer>
</section>`);
}
-function N$() {
+function P$() {
let e = [
["人工复核", "square-check-big"],
["高清版", "sparkles"],
["重复文件", "file-stack"],
["垃圾文件", "file-archive"],
["回收站", "trash"]
- ], t = C$, n = w$.stack, r = (e, t = "mb-2") => `<h3 class="text-title-2-medium text-text-primary ${t}">${e}</h3>`, i = (e) => `<footer class="${T$.stack}">${ls({
+ ], t = w$, n = T$.stack, r = (e, t = "mb-2") => `<h3 class="text-title-2-medium text-text-primary ${t}">${e}</h3>`, i = (e) => `<footer class="${E$.stack}">${ws({
label: e,
- attrs: A$
+ attrs: j$
})}</footer>`, a = (e) => `<div class="flex flex-col gap-1.5"><span class="text-body-medium text-text-primary">${e}</span><span class="skeleton ui-configuration-skeleton-input"></span></div>`;
return `<div class="peach-react" data-skeleton="cleanup" aria-busy="true" role="status" aria-label="正在读取数据管理状态"><div aria-hidden="true" inert class="mx-auto flex w-full max-w-board flex-col gap-8">
- <div class="inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1">${e.map(([e, t]) => `<div class="min-w-0 bg-background-secondary-default rounded-2xl flex min-h-33 flex-col gap-2 p-4 text-left"><span class="flex min-w-0 items-center gap-2 text-body-medium text-text-secondary"><i class="flex size-8 shrink-0 items-center justify-center rounded-md bg-background-primary-default text-text-primary">${os(t, "size-4")}</i>${e}</span><strong class="text-title-1-medium">${k$}</strong><span class="text-caption-1-regular">${k$}</span></div>`).join("")}</div>
+ <div class="inline-grid w-full grid-cols-5 gap-4 max-plain-stat-pair:grid-cols-2 max-plain-stat-single:grid-cols-1">${e.map(([e, t]) => `<div class="min-w-0 bg-background-secondary-default rounded-2xl flex min-h-33 flex-col gap-2 p-4 text-left"><span class="flex min-w-0 items-center gap-2 text-body-medium text-text-secondary"><i class="flex size-8 shrink-0 items-center justify-center rounded-md bg-background-primary-default text-text-primary">${xs(t, "size-4")}</i>${e}</span><strong class="text-title-1-medium">${A$}</strong><span class="text-caption-1-regular">${A$}</span></div>`).join("")}</div>
<div class="flex flex-col gap-4 max-cleanup-tight:gap-3">
- <div id="libraryProcessing">${KTe()}</div><div id="mediaRepair">${qTe()}</div>
+ <div id="libraryProcessing">${sEe()}</div><div id="mediaRepair">${cEe()}</div>
<section id="organize" class="${t} flex flex-col" data-cleanup-organize><div class="${n}">${r("整理", "mb-3")}<p class="text-body-regular text-text-secondary">清理文件名中的特殊符号与乱码,也可按模板改名并归入目录。先预览,确认后执行;执行过的一批可以整批退回。</p>
- <div class="mt-3 flex flex-col gap-3"><div class="flex min-w-0 flex-wrap items-start gap-2">${ds(k$)}<span class="skeleton ui-configuration-skeleton-input min-w-0 basis-64 flex-1"></span></div><p class="text-caption-1-regular text-text-secondary">指定路径时包含子目录,目录模板以该路径为起点。模板均留空时只清理文件名。</p>${a("文件名模板")}${a("目录模板")}<div class="flex flex-wrap gap-2">${Array.from({ length: 3 }, () => ls({
+ <div class="mt-3 flex flex-col gap-3"><div class="flex min-w-0 flex-wrap items-start gap-2">${Es(A$)}<span class="skeleton ui-configuration-skeleton-input min-w-0 basis-64 flex-1"></span></div><p class="text-caption-1-regular text-text-secondary">指定路径时包含子目录,目录模板以该路径为起点。模板均留空时只清理文件名。</p>${a("文件名模板")}${a("目录模板")}<div class="flex flex-wrap gap-2">${Array.from({ length: 3 }, () => ws({
variant: "secondary",
- label: k$,
- attrs: A$
+ label: A$,
+ attrs: j$
})).join("")}</div></div></div>${i("预览")}</section>
</div>
<section id="link-manager" class="flex scroll-mt-20 flex-col gap-4"><div class="${t} flex flex-col"><div class="${n}">${r("链接管理")}<div class="link-stat-grid mt-4 gap-x-8 gap-y-3">${[
@@ -65316,57 +65385,57 @@ function N$() {
"官网/事务所",
"社交账号",
"作品资料站"
- ].map((e) => `<div class="flex min-w-0 flex-col gap-0.5"><span class="text-caption-1-regular text-text-secondary">${e}</span><b class="text-title-2-semibold">${k$}</b></div>`).join("")}</div><div class="mt-4 flex flex-col gap-0.5"><span class="text-caption-1-regular text-text-secondary">主要站点</span>${k$}</div></div>${i("检查死链")}</div></section>
+ ].map((e) => `<div class="flex min-w-0 flex-col gap-0.5"><span class="text-caption-1-regular text-text-secondary">${e}</span><b class="text-title-2-semibold">${A$}</b></div>`).join("")}</div><div class="mt-4 flex flex-col gap-0.5"><span class="text-caption-1-regular text-text-secondary">主要站点</span>${A$}</div></div>${i("检查死链")}</div></section>
</div></div>`;
}
// src/react/components/fieldset.tsx
-var JTe = UH({
+var lEe = YH({
padding: "none",
radius: "surface",
bordered: "line",
className: "overflow-hidden"
-}), YTe = "border-t border-border-button-default p-4 first:border-t-0";
-function P$({ id: e, gap: t = "none", children: n }) {
+}), uEe = "border-t border-border-button-default p-4 first:border-t-0";
+function F$({ id: e, gap: t = "none", children: n }) {
return /* @__PURE__ */ (0, F.jsx)("h3", {
id: e,
className: `text-title-2-medium text-text-primary ${t === "medium" ? "mb-3" : t === "small" ? "mb-2" : ""}`,
children: n
});
}
-function F$({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
+function I$({ layout: e, label: t, labelledBy: n, id: r, footer: i, children: a, attributes: o }) {
return /* @__PURE__ */ (0, F.jsxs)("section", {
id: r,
"aria-label": t,
"aria-labelledby": n,
...o,
- className: E$(e),
+ className: D$(e),
children: [/* @__PURE__ */ (0, F.jsx)("div", {
- className: w$[e],
+ className: T$[e],
children: a
}), i ? /* @__PURE__ */ (0, F.jsx)("footer", {
- className: T$[e],
+ className: E$[e],
children: i
}) : null]
});
}
// src/react/components/status-label.tsx
-var XTe = {
+var dEe = {
success: "lime",
progress: "blue",
warning: "yellow",
error: "rose",
neutral: "neutral"
};
-function I$({ tone: e = "neutral", ...t }) {
- return /* @__PURE__ */ (0, F.jsx)(aZ, {
+function L$({ tone: e = "neutral", ...t }) {
+ return /* @__PURE__ */ (0, F.jsx)(oZ, {
"data-status-tone": e,
variant: "caption",
- color: XTe[e],
+ color: dEe[e],
...t
});
}
// src/react/components/path-line.tsx
-function ZTe({ className: e }) {
+function fEe({ className: e }) {
return /* @__PURE__ */ (0, F.jsx)("svg", {
"aria-hidden": !0,
viewBox: "0 0 24 24",
@@ -65379,8 +65448,8 @@ function ZTe({ className: e }) {
children: /* @__PURE__ */ (0, F.jsx)("use", { href: "#i-folder-open" })
});
}
-var QTe = "打开文件管理器失败,请重试";
-function L$({ path: e, prefix: t, className: n, onRevealed: r }) {
+var pEe = "打开文件管理器失败,请重试";
+function R$({ path: e, prefix: t, className: n, onRevealed: r }) {
let [i, a] = (0, P.useState)(!1), [o, s] = (0, P.useState)(""), c = (0, P.useRef)(!0);
(0, P.useEffect)(() => () => {
c.current = !1;
@@ -65391,7 +65460,7 @@ function L$({ path: e, prefix: t, className: n, onRevealed: r }) {
try {
await V("/api/reveal", { path: e }), r?.("已在资源管理器中显示");
} catch (e) {
- c.current && s(e instanceof Hn ? e.message : QTe);
+ c.current && s(e instanceof rr ? e.message : pEe);
} finally {
c.current && a(!1);
}
@@ -65402,15 +65471,15 @@ function L$({ path: e, prefix: t, className: n, onRevealed: r }) {
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, F.jsxs)("p", {
- className: sF("min-w-0 break-all", n),
+ className: mF("min-w-0 break-all", n),
children: [t, e]
- }), /* @__PURE__ */ (0, F.jsx)(ZF, {
- icon: ZTe,
+ }), /* @__PURE__ */ (0, F.jsx)(rI, {
+ icon: fEe,
size: "small",
className: "shrink-0",
"aria-label": "在资源管理器中显示",
onClick: () => void l(),
- ...Uz(i)
+ ...Yz(i)
})]
}), o ? /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-caption-1-regular text-text-error-primary",
@@ -65419,7 +65488,7 @@ function L$({ path: e, prefix: t, className: n, onRevealed: r }) {
});
}
// src/react/library-processing/issue-export.ts
-async function $Te(e, t) {
+async function mEe(e, t) {
if (!e.job_id) throw Error("请先选择有问题记录的任务");
let n = [], r = 1, i = "";
for (let a = 0; a < r; a += 200) {
@@ -65442,41 +65511,41 @@ async function $Te(e, t) {
rows: n
}, null, 2);
}
-function eEe(e, t) {
+function hEe(e, t) {
let n = URL.createObjectURL(new Blob([t], { type: "application/json;charset=utf-8" })), r = document.createElement("a");
r.href = n, r.download = `peach-issues-${e}.json`, r.click(), URL.revokeObjectURL(n);
}
// src/react/library-processing/library-processing-card.tsx
-var tEe = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", nEe = (e) => {
+var gEe = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", _Ee = (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(",")}。`;
-}, rEe = (e) => e.requested_stage === "previews" ? `已生成 ${e.previews || 0} 部视频预览。` : `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,取得 ${e.candidates || 0} 组作品资料,自动保存 ${e.auto_applied || 0} 条。` + (e.previews ? `已生成 ${e.previews} 部视频预览。` : "") + nEe(e);
-function iEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
- let a = age(e), o = jH(), s = jH(), c = e.status === "failed" && !!e.retryable_asset_ids?.length, l = nge(e.notes || {}), u = !!t || !e.archived && e.status === "failed", d = !t && !e.archived && vH(e), f = u && !!a?.log, p = hH(e), m = cV();
+}, vEe = (e) => e.requested_stage === "previews" ? `已生成 ${e.previews || 0} 部视频预览。` : `已扫描 ${e.scanned || 0} 个文件,识别 ${e.identified || 0} 个番号,取得 ${e.candidates || 0} 组作品资料,自动保存 ${e.auto_applied || 0} 条。` + (e.previews ? `已生成 ${e.previews} 部视频预览。` : "") + _Ee(e);
+function yEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
+ let a = hge(e), o = LH(), s = LH(), c = e.status === "failed" && !!e.retryable_asset_ids?.length, l = fge(e.notes || {}), u = !!t || !e.archived && e.status === "failed", d = !t && !e.archived && wH(e), f = u && !!a?.log, p = xH(e), m = mV();
return /* @__PURE__ */ (0, F.jsxs)("div", {
"aria-live": "polite",
className: "flex flex-col gap-4 empty:hidden",
children: [
- p ? /* @__PURE__ */ (0, F.jsx)(cge, {
+ p ? /* @__PURE__ */ (0, F.jsx)(vge, {
state: e,
slow: p
- }) : e.status === "running" && e.stalled ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) : e.status === "running" && e.stalled ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "warning",
title: "处理较慢",
- children: tEe
+ children: gEe
}) : null,
- u ? /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ u ? /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: d ? "warning" : "error",
className: "gap-0 p-3",
title: d ? "处理已结束,部分项目需处理" : "处理未完成",
action: /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [d ? /* @__PURE__ */ (0, F.jsx)(AH, {
- href: bH,
+ children: [d ? /* @__PURE__ */ (0, F.jsx)(IH, {
+ href: EH,
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: "查看全部内容"
}) : null, c ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -65488,7 +65557,7 @@ function iEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
}),
extra: a ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "mt-3 border-t border-current/20 pt-3",
- children: /* @__PURE__ */ (0, F.jsxs)(nU, {
+ children: /* @__PURE__ */ (0, F.jsxs)(cU, {
summary: a.label,
contentClassName: "gap-0",
children: [/* @__PURE__ */ (0, F.jsx)("div", {
@@ -65520,7 +65589,7 @@ function iEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
})
}), a.log ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "mt-3 border-t border-current/20 pt-3 text-text-secondary",
- children: /* @__PURE__ */ (0, F.jsx)(L$, {
+ children: /* @__PURE__ */ (0, F.jsx)(R$, {
path: a.log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -65529,55 +65598,55 @@ function iEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
}) : null]
})
}) : null,
- children: [t || e.error || "处理未完成,请重试", d ? `\n${yH}` : null]
+ children: [t || e.error || "处理未完成,请重试", d ? `\n${TH}` : null]
}) : null,
- n?.status === "complete" ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ n?.status === "complete" ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "success",
title: "处理完成",
- children: rEe(n)
+ children: vEe(n)
}) : null,
- n?.status === "cancelled" ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ n?.status === "cancelled" ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
title: "任务已停止",
children: "已取得的资料和预览已保留,不会自动继续这趟任务。"
}) : null,
- e.archived ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ e.archived ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "上一趟的问题提示已归档,历史记录仍保留。"
}) : null,
- !_H(e) && (e.issue_count || e.status === "failed") ? /* @__PURE__ */ (0, F.jsxs)("div", {
+ !CH(e) && (e.issue_count || e.status === "failed") ? /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
children: [e.issue_count ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(!!o.busy),
- onClick: () => void o.run("export", (t) => $Te(e, t), (t) => {
- eEe(e.job_id, t), i("已导出问题清单");
+ ...Yz(!!o.busy),
+ onClick: () => void o.run("export", (t) => mEe(e, t), (t) => {
+ hEe(e.job_id, t), i("已导出问题清单");
}),
children: "导出完整问题清单"
}) : null, e.archived ? null : /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(!!s.busy),
- onClick: () => void s.run("archive", (t) => V(pH, {
+ ...Yz(!!s.busy),
+ onClick: () => void s.run("archive", (t) => V(yH, {
action: "archive",
job_id: e.job_id
}, "POST", t), (e) => {
- H.setQueryData(mH, e), i("已归档问题提示");
+ H.setQueryData(bH, e), i("已归档问题提示");
}),
children: "归档提示"
})]
}) : null,
- o.error || s.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ o.error || s.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "warning",
children: o.error || s.error
}) : null,
- !_H(e) && l ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ !CH(e) && l ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
className: "gap-0 p-3",
extra: e.issues_log && !f ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "mt-3 border-t border-current/20 pt-3 text-text-secondary",
- children: /* @__PURE__ */ (0, F.jsx)(L$, {
+ children: /* @__PURE__ */ (0, F.jsx)(R$, {
path: e.issues_log,
prefix: "完整记录:",
className: "text-caption-1-regular",
@@ -65589,41 +65658,41 @@ function iEe({ state: e, problem: t, settled: n, onRetry: r, toast: i }) {
]
});
}
-function R$(e) {
- let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = HH(e), o = Ft({
- mutationFn: (e) => V(pH, e),
+function z$(e) {
+ let { toast: t, onComplete: n } = e, { job: r, settled: i, forget: a } = JH(e), o = Ft({
+ mutationFn: (e) => V(yH, e),
onSuccess: (e) => {
- a(), H.setQueryData(mH, e), H.invalidateQueries({ queryKey: mH });
+ a(), H.setQueryData(bH, e), H.invalidateQueries({ queryKey: bH });
}
});
(0, P.useEffect)(() => {
i && n?.();
}, [i, n]);
- let s = r.data ?? { status: "idle" }, c = s.job_id || "unavailable", { hidden: l } = vU(c), u = o.error ? Wn(o.error) : r.isError ? r.data ? wH : Wn(r.error) : "", d = o.isPending || _H(s), f = async (e) => {
+ let s = r.data ?? { status: "idle" }, c = s.job_id || "unavailable", { hidden: l } = wU(c), u = o.error ? ar(o.error) : r.isError ? r.data ? AH : ar(r.error) : "", d = o.isPending || CH(s), f = async (e) => {
d || (o.reset(), await o.mutateAsync(e));
};
return /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-col gap-4",
- children: [/* @__PURE__ */ (0, F.jsx)(F$, {
+ children: [/* @__PURE__ */ (0, F.jsx)(I$, {
layout: "stack",
label: "扫描与采集",
footer: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(AH, {
+ /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/sources",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: "来源和凭证"
}),
- /* @__PURE__ */ (0, F.jsx)(AH, {
+ /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/settings/diagnostics",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: "诊断与日志"
}),
- s.candidates ? /* @__PURE__ */ (0, F.jsx)(AH, {
+ s.candidates ? /* @__PURE__ */ (0, F.jsx)(IH, {
href: "/review",
size: "small",
- trailingIcon: pz,
+ trailingIcon: yz,
children: "复核资料"
}) : null,
/* @__PURE__ */ (0, F.jsx)(IK, {
@@ -65642,7 +65711,7 @@ function R$(e) {
className: "flex flex-wrap items-center justify-between gap-2",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, F.jsx)(P$, { children: "扫描与采集" }), s.new_asset_count ? /* @__PURE__ */ (0, F.jsx)(aZ, {
+ children: [/* @__PURE__ */ (0, F.jsx)(F$, { children: "扫描与采集" }), s.new_asset_count ? /* @__PURE__ */ (0, F.jsx)(oZ, {
variant: "caption",
color: "blue",
children: /* @__PURE__ */ (0, F.jsxs)("span", {
@@ -65650,31 +65719,31 @@ function R$(e) {
children: [s.new_asset_count.toLocaleString(), " 部待补全"]
})
}) : null]
- }), l && (_H(s) || s.status === "failed" || r.isError) ? /* @__PURE__ */ (0, F.jsx)(q, {
+ }), l && (CH(s) || s.status === "failed" || r.isError) ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- onClick: () => _U(c, !0),
+ onClick: () => CU(c, !0),
children: "显示进度浮窗"
}) : null]
}),
/* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: D$
+ children: O$
}),
s.status === "paused" && !s.total ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "self-start",
- children: /* @__PURE__ */ (0, F.jsx)(I$, { children: "已暂停" })
- }) : _H(s) ? /* @__PURE__ */ (0, F.jsx)(Cge, { state: s }) : null,
- _H(s) ? /* @__PURE__ */ (0, F.jsx)("p", {
+ children: /* @__PURE__ */ (0, F.jsx)(L$, { children: "已暂停" })
+ }) : CH(s) ? /* @__PURE__ */ (0, F.jsx)(Nge, { state: s }) : null,
+ CH(s) ? /* @__PURE__ */ (0, F.jsx)("p", {
className: "text-body-2-regular text-text-secondary tabular-nums",
"data-processing-eta": "",
- children: xH(s)
+ children: DH(s)
}) : null,
- _H(s) ? /* @__PURE__ */ (0, F.jsx)(uU, { traffic: s.traffic }) : null,
- _H(s) ? /* @__PURE__ */ (0, F.jsx)(VH, { state: s }) : null
+ CH(s) ? /* @__PURE__ */ (0, F.jsx)(gU, { traffic: s.traffic }) : null,
+ CH(s) ? /* @__PURE__ */ (0, F.jsx)(qH, { state: s }) : null
]
})
- }), /* @__PURE__ */ (0, F.jsx)(iEe, {
+ }), /* @__PURE__ */ (0, F.jsx)(yEe, {
state: s,
problem: u,
settled: i,
@@ -65689,32 +65758,32 @@ function R$(e) {
});
}
// src/react/playlists/playlists.ts
-var aEe = "/api/playlists", z$ = "/api/playlist", B$ = ["playlists"], V$ = (e) => B(aEe, e);
-async function oEe(e) {
+var bEe = "/api/playlists", B$ = "/api/playlist", V$ = ["playlists"], H$ = (e) => B(bEe, e);
+async function xEe(e) {
await H.fetchQuery({
- queryKey: B$,
- queryFn: () => V$(e),
+ queryKey: V$,
+ queryFn: () => H$(e),
staleTime: 0
});
}
-var sEe = () => H.invalidateQueries({
- queryKey: B$,
+var SEe = () => H.invalidateQueries({
+ queryKey: V$,
exact: !0
-}), cEe = (e) => e.current_asset_id || e.preview_asset_id || null, lEe = (e) => `/poster?id=${e}&c=4`, uEe = (e) => V(z$, {
+}), CEe = (e) => e.current_asset_id || e.preview_asset_id || null, wEe = (e) => `/poster?id=${e}&c=4`, TEe = (e) => V(B$, {
action: "create",
name: e,
asset_ids: []
-}), dEe = (e, t) => V(z$, {
+}), EEe = (e, t) => V(B$, {
action: "rename",
id: e,
name: t
-}), fEe = (e) => V(z$, {
+}), DEe = (e) => V(B$, {
action: "delete",
id: e
-}), pEe = (e) => B(`${z$}?id=${e}`).catch(() => null);
-function mEe(e) {
+}), OEe = (e) => B(`${B$}?id=${e}`).catch(() => null);
+function kEe(e) {
let t = (e.items || []).map((e) => e.id), n = e.source_seed_asset_id;
- return V(z$, {
+ return V(B$, {
action: "create",
name: e.name,
asset_ids: t,
@@ -65723,13 +65792,9 @@ function mEe(e) {
});
}
// src/react/scraping/custom-source-data.ts
-var H$ = "/api/custom-metadata", U$ = ["custom-metadata"], W$ = (e) => B(H$, e), hEe = "/api/scraping", gEe = "/api/scraping/settings", _Ee = "/api/scraping/check", G$ = "/api/scraping/cover", vEe = "/api/scraping/amane-bridge", yEe = "/api/scraping/amane-bridge/check", bEe = "/api/scraping/amane-bridge/rebuild", K$ = ["scraping"], q$ = ["scraping", "cover"], J$ = ["scraping", "amane-bridge"], xEe = 262144, Y$ = (e) => B(hEe, e), X$ = (e) => B(G$, e), Z$ = (e) => B(vEe, e);
-async function SEe(e) {
+var U$ = "/api/custom-metadata", W$ = ["custom-metadata"], G$ = (e) => B(U$, e), AEe = "/api/scraping", jEe = "/api/scraping/settings", MEe = "/api/scraping/check", K$ = "/api/scraping/cover", NEe = "/api/scraping/amane-bridge", PEe = "/api/scraping/amane-bridge/check", FEe = "/api/scraping/amane-bridge/rebuild", q$ = ["scraping"], J$ = ["scraping", "cover"], Y$ = ["scraping", "amane-bridge"], IEe = 262144, X$ = (e) => B(AEe, e), Z$ = (e) => B(K$, e), Q$ = (e) => B(NEe, e);
+async function LEe(e) {
await Promise.all([
- H.fetchQuery({
- queryKey: K$,
- queryFn: () => Y$(e)
- }),
H.fetchQuery({
queryKey: q$,
queryFn: () => X$(e)
@@ -65739,36 +65804,40 @@ async function SEe(e) {
queryFn: () => Z$(e)
}),
H.fetchQuery({
- queryKey: U$,
- queryFn: () => W$(e)
+ queryKey: Y$,
+ queryFn: () => Q$(e)
+ }),
+ H.fetchQuery({
+ queryKey: W$,
+ queryFn: () => G$(e)
})
]);
}
-function CEe(e, t) {
+function REe(e, t) {
return `${t}${e.label === "来源页面" ? "" : " 高清图片"}:${e.ok ? "可连接" : "不能连接"}` + (e.width ? ` · ${e.width} × ${e.height}` : "") + (e.elapsed_s === void 0 ? "" : ` · ${e.elapsed_s.toFixed(2)} 秒`) + (e.message ? `。${e.message}` : "");
}
// src/react/search/search.ts
-var Q$ = /* @__PURE__ */ new Set([
+var $$ = /* @__PURE__ */ new Set([
"performer",
"creator",
"studio",
"agency",
"series"
-]), $$ = /* @__PURE__ */ new Set([
+]), e1 = /* @__PURE__ */ new Set([
"asset",
"jav",
"post",
"photo",
"release"
-]), e1 = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase();
-function wEe({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o, recommendations: s = [] }) {
+]), t1 = (e) => String(e ?? "").normalize("NFKC").trim().toLocaleLowerCase();
+function zEe({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a, kind: o, recommendations: s = [] }) {
let c = 0, l = [], u = (e) => {
let t = {
...e,
index: c++
};
return l.push(t), t;
- }, d = t.filter((t) => !e || e1(t).includes(e1(e)));
+ }, d = t.filter((t) => !e || t1(t).includes(t1(e)));
if (!e) {
if (s.length) {
let e = s.map((e) => ({
@@ -65789,8 +65858,8 @@ function wEe({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a
value: e
}))
} : null,
- left: e.filter((e) => !$$.has(e.kind)),
- right: e.filter((e) => $$.has(e.kind)),
+ left: e.filter((e) => !e1.has(e.kind)),
+ right: e.filter((e) => e1.has(e.kind)),
empty: !1,
options: l
};
@@ -65840,7 +65909,7 @@ function wEe({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a
options: n,
more: r
};
- }, g = m.filter((e) => !$$.has(e.kind)).map(h), _ = m.filter((e) => $$.has(e.kind)).map(h), v = f && !m.some((e) => e.items.length);
+ }, g = m.filter((e) => !e1.has(e.kind)).map(h), _ = m.filter((e) => e1.has(e.kind)).map(h), v = f && !m.some((e) => e.items.length);
return {
tabs: f && a.length > 1 ? [...a] : null,
recent: p,
@@ -65850,16 +65919,16 @@ function wEe({ query: e, history: t, picks: n, suggestFor: r, groups: i, tabs: a
options: l
};
}
-function TEe(e, t, n = Math.random) {
+function BEe(e, t, n = Math.random) {
let r = [...e];
for (let e = r.length - 1; e > 0; --e) {
let t = Math.floor(n() * (e + 1));
[r[e], r[t]] = [r[t], r[e]];
}
- return r.filter((e) => !t.some((t) => e1(t) === e1(e))).slice(0, 5);
+ return r.filter((e) => !t.some((t) => t1(t) === t1(e))).slice(0, 5);
}
// src/react/search/search-page.tsx
-var EEe = () => ({
+var VEe = () => ({
dismissed: !1,
history: [],
pool: [],
@@ -65878,7 +65947,7 @@ var EEe = () => ({
active: -1,
reveal: !1,
rewind: !1
-}), t1 = (e) => wEe({
+}), n1 = (e) => zEe({
query: e.query,
history: e.history,
picks: e.picks,
@@ -65887,18 +65956,18 @@ var EEe = () => ({
tabs: e.tabs,
kind: e.kind,
recommendations: e.recommendations
-}), DEe = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length || e.empty), n1 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
+}), HEe = (e) => !!(e.tabs || e.recent || e.left.length || e.right.length || e.empty), r1 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
});
-function OEe(e) {
+function UEe(e) {
let t = (0, P.useRef)(e);
t.current = e;
let n = (0, P.useRef)(null);
- n.current ??= EEe();
+ n.current ??= VEe();
let r = n.current, i = (0, P.useRef)(null), [, a] = (0, P.useReducer)((e) => e + 1, 0), o = (0, P.useRef)(null);
- o.current ??= kEe(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
+ o.current ??= WEe(() => t.current, r, () => i.current?.closest("[data-search-menu]") ?? null, a);
let s = o.current;
(0, P.useLayoutEffect)(() => {
let { input: e } = t.current, n = (e) => s.input(e), i = () => t.current.helpers.composing(), a = (e) => s.key(e), o = () => s.focus(), c = () => {
@@ -65913,7 +65982,7 @@ function OEe(e) {
let e = i.current?.closest("[data-search-menu]");
r.rewind && e && (e.scrollTop = 0), r.rewind = !1, r.reveal && i.current?.querySelector("[data-search-option][data-active]")?.scrollIntoView({ block: "nearest" }), r.reveal = !1;
});
- let c = t1(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, F.jsx)(jEe, {
+ let c = n1(r), l = e.historyLimit, u = (t) => /* @__PURE__ */ (0, F.jsx)(KEe, {
entry: t,
active: t.index === r.active,
helpers: e.helpers,
@@ -65926,7 +65995,7 @@ function OEe(e) {
children: [
/* @__PURE__ */ (0, F.jsxs)("h3", { children: [e.label, e.href ? /* @__PURE__ */ (0, F.jsx)("a", {
href: e.href,
- onMouseDown: r1,
+ onMouseDown: i1,
onClick: (t) => {
t.ctrlKey || t.metaKey || t.shiftKey || t.altKey || (t.preventDefault(), s.openPath(e.href));
},
@@ -65945,7 +66014,7 @@ function OEe(e) {
"data-search-recommendations": !r.query && r.recommendations.length ? "" : void 0,
"data-history-limit": l,
children: [
- c.tabs ? /* @__PURE__ */ (0, F.jsx)(AEe, {
+ c.tabs ? /* @__PURE__ */ (0, F.jsx)(GEe, {
tabs: c.tabs,
kind: r.kind,
onPick: s.pickKind,
@@ -65972,7 +66041,7 @@ function OEe(e) {
]
});
}
-function kEe(e, t, n, r) {
+function WEe(e, t, n, r) {
let i = () => e().input, a = () => document.activeElement === i(), o = () => t.history.slice(0, e().historyLimit), s = (n) => {
t.history = n.slice(0, e().historyLimit);
}, c = async () => {
@@ -65983,7 +66052,7 @@ function kEe(e, t, n, r) {
t.history = Array.isArray(e.items) ? e.items.map(String) : [];
} catch {}
}, l = (t) => {
- t && e().historyLimit && (s([t, ...o().filter((e) => e1(e) !== e1(t))]), V("/api/search-history", { query: t }).catch(() => null));
+ t && e().historyLimit && (s([t, ...o().filter((e) => t1(e) !== t1(t))]), V("/api/search-history", { query: t }).catch(() => null));
}, u = async () => {
let n = ++t.poolRequest;
t.pool = [];
@@ -66030,9 +66099,9 @@ function kEe(e, t, n, r) {
i && e().helpers.dismiss(i), t.active = -1, r();
}, h = () => {
if (t.dismissed) return;
- t.query = i().value.trim(), t.picks = t.query ? [] : TEe(t.pool, o()), t.active = -1;
+ t.query = i().value.trim(), t.picks = t.query ? [] : BEe(t.pool, o()), t.active = -1;
let a = n();
- a && (DEe(t1(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
+ a && (HEe(n1(t)) ? e().helpers.present(a) : e().helpers.dismiss(a)), r();
}, g = () => {
t.active = -1, t.kind = "", clearTimeout(t.timer);
let e = i().value.trim();
@@ -66044,7 +66113,7 @@ function kEe(e, t, n, r) {
n && e !== t.kind && (t.kind = e, clearTimeout(t.timer), h(), t.rewind = !0, f(n, e).then(() => {
a() && t.kind === e && h();
}));
- }, v = () => p() ? t1(t).options : [], y = (e) => {
+ }, v = () => p() ? n1(t).options : [], y = (e) => {
let n = v();
return n.length ? (t.active = (t.active + e + n.length) % n.length, t.reveal = !0, r(), !0) : !1;
}, b = (t, n) => {
@@ -66053,7 +66122,7 @@ function kEe(e, t, n, r) {
}, x = (t, n) => {
i().blur(), l(n), e().actions.openEntity(t, n);
}, S = (t) => {
- t.type === "suggest" && t.item.followMedia && t.item.id && e().actions.openFollow ? (i().blur(), e().actions.openFollow(t.item.id, t.item.followMedia, t.item.mediaIndex ?? null)) : t.type === "suggest" && t.item.href ? C(t.item.href) : t.type === "more" ? (b(!1, !0), i().blur()) : t.type === "suggest" && t.kind === "asset" && t.item.id != null ? (i().blur(), e().actions.openItem(t.item.id)) : t.type === "suggest" && Q$.has(t.kind) ? x(t.kind, t.value) : (i().value = t.value, b(!1, !0));
+ t.type === "suggest" && t.item.followMedia && t.item.id && e().actions.openFollow ? (i().blur(), e().actions.openFollow(t.item.id, t.item.followMedia, t.item.mediaIndex ?? null)) : t.type === "suggest" && t.item.href ? C(t.item.href) : t.type === "more" ? (b(!1, !0), i().blur()) : t.type === "suggest" && t.kind === "asset" && t.item.id != null ? (i().blur(), e().actions.openItem(t.item.id)) : t.type === "suggest" && $$.has(t.kind) ? x(t.kind, t.value) : (i().value = t.value, b(!1, !0));
}, C = (t) => {
m(), i().blur(), e().actions.openPath?.(t);
};
@@ -66099,13 +66168,13 @@ function kEe(e, t, n, r) {
await V("/api/search-history", {
operation: "remove",
query: e
- }).catch(() => null), s(o().filter((t) => e1(t) !== e1(e))), t.active = -1, r();
+ }).catch(() => null), s(o().filter((t) => t1(t) !== t1(e))), t.active = -1, r();
},
pickKind: _,
openPath: C
};
}
-function AEe({ tabs: e, kind: t, onPick: n, wire: r }) {
+function GEe({ tabs: e, kind: t, onPick: n, wire: r }) {
let i = (0, P.useRef)(null);
(0, P.useLayoutEffect)(() => {
r(i.current);
@@ -66119,9 +66188,9 @@ function AEe({ tabs: e, kind: t, onPick: n, wire: r }) {
"data-pill-variant": "gray",
onMouseDown: (e) => e.preventDefault(),
onClick: () => n(e),
- children: [r, i ? /* @__PURE__ */ (0, F.jsx)(PQ, { value: i }) : null]
+ children: [r, i ? /* @__PURE__ */ (0, F.jsx)(FQ, { value: i }) : null]
}, e || "all");
- return /* @__PURE__ */ (0, F.jsxs)(uF, {
+ return /* @__PURE__ */ (0, F.jsxs)(_F, {
ref: i,
"data-search-tabs": "",
"data-pill-nav": "",
@@ -66130,8 +66199,9 @@ function AEe({ tabs: e, kind: t, onPick: n, wire: r }) {
children: [a("", "全部"), e.map((e) => a(e.kind, e.label, e.total))]
});
}
-var r1 = (e) => e.preventDefault();
-function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
+var i1 = (e) => e.preventDefault();
+function KEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove: a }) {
+ tI();
let o = {
"data-search-value": e.value,
"data-active": t ? "" : void 0,
@@ -66143,33 +66213,33 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
type: "button",
"data-search-option": "more",
...o,
- onMouseDown: r1,
+ onMouseDown: i1,
children: [
"查看全部 ",
e.total.toLocaleString(),
" 个视频",
- /* @__PURE__ */ (0, F.jsx)(n1, { name: "chevron-right" })
+ /* @__PURE__ */ (0, F.jsx)(r1, { name: "chevron-right" })
]
});
if (e.type !== "suggest") return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-search-option": "",
...o,
children: [
- /* @__PURE__ */ (0, F.jsx)(n1, { name: e.type === "history" ? "history" : "sparkles" }),
+ /* @__PURE__ */ (0, F.jsx)(r1, { name: e.type === "history" ? "history" : "sparkles" }),
/* @__PURE__ */ (0, F.jsx)("span", { children: e.value }),
e.type === "history" ? /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-remove-history": e.value,
"aria-label": `删除历史 ${e.value}`,
- onMouseDown: r1,
+ onMouseDown: i1,
onClick: (t) => {
t.stopPropagation(), a(e.value);
},
- children: /* @__PURE__ */ (0, F.jsx)(n1, { name: "x" })
+ children: /* @__PURE__ */ (0, F.jsx)(r1, { name: "x" })
}) : null
]
});
- let { item: s, kind: c } = e, l = Q$.has(c) ? c : void 0;
+ let { item: s, kind: c } = e, l = $$.has(c) ? c : void 0;
if ([
"asset",
"jav",
@@ -66183,8 +66253,8 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-search-option": "work",
"data-open-item": c === "asset" ? s.id : void 0,
...o,
- onMouseDown: r1,
- children: [/* @__PURE__ */ (0, F.jsx)(i1, {
+ onMouseDown: i1,
+ children: [/* @__PURE__ */ (0, F.jsx)(a1, {
card: s.card,
helpers: n
}), /* @__PURE__ */ (0, F.jsxs)("span", {
@@ -66209,9 +66279,9 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-search-option": "person",
"data-open-entity": l,
...o,
- onMouseDown: r1,
+ onMouseDown: i1,
children: [
- /* @__PURE__ */ (0, F.jsx)(a1, {
+ /* @__PURE__ */ (0, F.jsx)(o1, {
item: s,
kind: c
}),
@@ -66219,10 +66289,10 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
type: "button",
"data-search-person": "",
"data-search-meta": "",
- "aria-label": `查看 ${s.value}`,
+ "aria-label": `查看 ${Qt(c, s.value)}`,
children: [/* @__PURE__ */ (0, F.jsxs)("span", {
"data-search-name": "",
- children: [/* @__PURE__ */ (0, F.jsx)("span", { children: s.value }), u]
+ children: [/* @__PURE__ */ (0, F.jsx)("span", { children: Qt(c, s.value) }), u]
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-search-sub": "",
children: t
@@ -66234,11 +66304,11 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
type: "button",
"data-open-work": e.id,
"aria-label": `打开 ${e.code || s.value}`,
- onMouseDown: r1,
+ onMouseDown: i1,
onClick: (t) => {
t.stopPropagation(), i(e);
},
- children: /* @__PURE__ */ (0, F.jsx)(i1, {
+ children: /* @__PURE__ */ (0, F.jsx)(a1, {
card: e,
helpers: n
})
@@ -66252,7 +66322,7 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
"data-open-entity": l,
...o,
children: [
- c === "studio" || c === "agency" ? /* @__PURE__ */ (0, F.jsx)(a1, {
+ c === "studio" || c === "agency" ? /* @__PURE__ */ (0, F.jsx)(o1, {
item: s,
kind: c
}) : null,
@@ -66265,13 +66335,13 @@ function jEe({ entry: e, active: t, helpers: n, onPick: r, onPeek: i, onRemove:
]
});
}
-function i1({ card: e, helpers: t }) {
+function a1({ card: e, helpers: t }) {
return /* @__PURE__ */ (0, F.jsx)("span", {
"data-search-pic": "",
dangerouslySetInnerHTML: { __html: t.coverHtml(e) }
});
}
-function a1({ item: e, kind: t }) {
+function o1({ item: e, kind: t }) {
if (e.avatarHtml) return /* @__PURE__ */ (0, F.jsx)("span", {
"data-search-face": "",
dangerouslySetInnerHTML: { __html: e.avatarHtml }
@@ -66282,7 +66352,7 @@ function a1({ item: e, kind: t }) {
image_version: e.image_version,
avatar_focus: e.avatar_focus,
avatar_stand_in: e.avatar_stand_in
- }, r = Za(e.value, n, e.rep || null, t, e.mark || null, e.has_logo ? e.value : "", "icon", void 0, !0);
+ }, r = po(e.value, n, e.rep || null, t, e.mark || null, e.has_logo ? e.value : "", "icon", void 0, !0);
return /* @__PURE__ */ (0, F.jsx)("span", {
"data-search-face": "",
"data-kind": t,
@@ -66290,28 +66360,28 @@ function a1({ item: e, kind: t }) {
});
}
// src/react/settings/configuration.ts
-var o1 = ["configuration"], s1 = (e) => B(GY, e);
-async function MEe(e) {
+var s1 = ["configuration"], c1 = (e) => B(GY, e);
+async function qEe(e) {
await H.fetchQuery({
- queryKey: o1,
- queryFn: () => s1(e)
+ queryKey: s1,
+ queryFn: () => c1(e)
});
}
// src/react/settings-panel/legacy-controls.tsx
-var c1 = (e) => e.map(([e, t, n]) => n ? [
+var l1 = (e) => e.map(([e, t, n]) => n ? [
e,
t,
n
] : [e, t]);
-function l1({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
+function u1({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant: o, text: s = !1, epoch: c, onChoose: l }) {
let u = (0, P.useRef)(null), d = (0, P.useRef)(null), f = (0, P.useRef)(l);
return f.current = l, (0, P.useLayoutEffect)(() => {
let e = u.current;
- e && (d.current && d.current.value === i && d.current.epoch === c || (e.innerHTML = Mc(t, n, c1(r), i, {
+ e && (d.current && d.current.value === i && d.current.epoch === c || (e.innerHTML = qc(t, n, l1(r), i, {
attr: a,
className: o,
text: s
- }), Nc(e, a, (e) => {
+ }), Jc(e, a, (e) => {
d.current = {
value: e,
epoch: c
@@ -66325,18 +66395,18 @@ function l1({ id: e, name: t, legend: n, options: r, value: i, attr: a, variant:
ref: u
});
}
-function u1({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
+function d1({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a = !1, hidden: o, describedBy: s, epoch: c, onPick: l, decorate: u }) {
let d = (0, P.useRef)(null), f = (0, P.useRef)(null), p = (0, P.useRef)(-1), m = (0, P.useRef)(l);
return m.current = l, (0, P.useLayoutEffect)(() => {
let e = d.current;
if (!e) return;
if (p.current !== c || !f.current) {
- e.innerHTML = Yo(c1(n), r, { label: t });
- let i = Xo(e.firstElementChild);
+ e.innerHTML = us(l1(n), r, { label: t });
+ let i = ds(e.firstElementChild);
i.addEventListener("change", () => m.current(i.value)), f.current = i, p.current = c;
}
let o = f.current;
- o.value !== r && (o.value = r), o.disabled !== i && (o.disabled = i), o.getAttribute("aria-busy") === "true" !== a && kc(o, a), u?.(o);
+ o.value !== r && (o.value = r), o.disabled !== i && (o.disabled = i), o.getAttribute("aria-busy") === "true" !== a && Wc(o, a), u?.(o);
}), /* @__PURE__ */ (0, F.jsx)("div", {
id: e,
ref: d,
@@ -66344,7 +66414,7 @@ function u1({ id: e, label: t, options: n, value: r, disabled: i = !1, busy: a =
"aria-describedby": s
});
}
-function NEe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSettle: o }) {
+function JEe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSettle: o }) {
let s = (0, P.useRef)(null), c = (0, P.useRef)(null), l = (0, P.useRef)({
onStep: a,
onSettle: o
@@ -66354,14 +66424,14 @@ function NEe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSet
onSettle: o
}, (0, P.useLayoutEffect)(() => {
let i = s.current;
- i && !c.current && (i.insertAdjacentHTML("beforeend", Fc({
+ i && !c.current && (i.insertAdjacentHTML("beforeend", Xc({
value: r,
min: 0,
max: n,
step: 1,
label: t,
attr: `data-glow-dial="${e}"`
- })), c.current = Ic(i.lastElementChild, {
+ })), c.current = Zc(i.lastElementChild, {
onInput: (e) => l.current.onStep(e),
onChange: (e) => l.current.onSettle(e)
}));
@@ -66378,7 +66448,7 @@ function NEe({ field: e, label: t, max: n, value: r, hidden: i, onStep: a, onSet
});
}
// src/react/settings-panel/glow-settings.tsx
-var PEe = [
+var YEe = [
[
"strength",
"强度",
@@ -66405,8 +66475,8 @@ var PEe = [
100
]
];
-function FEe({ host: e, spot: t, index: n, glow: r }) {
- let i = ese[n], a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = cV(), [l, u] = (0, P.useState)("all");
+function XEe({ host: e, spot: t, index: n, glow: r }) {
+ let i = cse[n], a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = mV(), [l, u] = (0, P.useState)("all");
(0, P.useLayoutEffect)(() => {
let [e, t, n] = [
a.current,
@@ -66415,11 +66485,11 @@ function FEe({ host: e, spot: t, index: n, glow: r }) {
];
e && t && n && (t.addEventListener("click", () => {
n.style.width = `${t.offsetWidth}px`;
- }), qo(e, t, n));
+ }), cs(e, t, n));
}, []);
let d = r[t].color, f = (n) => {
let r = e.store.value.homeGlow;
- r[t].color = cA(n, r[t].color), r.preset = "custom", e.store.save(), e.changed("glow"), Vo(), o.current?.focus();
+ r[t].color = hA(n, r[t].color), r.preset = "custom", e.store.save(), e.changed("glow"), ns(), o.current?.focus();
};
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-glow-stop": t,
@@ -66444,7 +66514,7 @@ function FEe({ host: e, spot: t, index: n, glow: r }) {
children: d
})]
}),
- /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-down" })
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-down" })
]
}), /* @__PURE__ */ (0, F.jsxs)("div", {
className: "popmenu",
@@ -66456,7 +66526,7 @@ function FEe({ host: e, spot: t, index: n, glow: r }) {
"data-glow-pills": "",
role: "group",
"aria-label": "色系",
- children: rse.map(([e, t]) => /* @__PURE__ */ (0, F.jsx)("button", {
+ children: dse.map(([e, t]) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-glow-pill": e,
"aria-pressed": e === l,
@@ -66470,7 +66540,7 @@ function FEe({ host: e, spot: t, index: n, glow: r }) {
"data-glow-palette": "",
role: "radiogroup",
"aria-label": `${i}颜色`,
- children: ise.map(([e, t, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
+ children: fse.map(([e, t, n]) => /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
role: "radio",
"aria-checked": n === d,
@@ -66487,8 +66557,8 @@ function FEe({ host: e, spot: t, index: n, glow: r }) {
})]
});
}
-function IEe({ host: e }) {
- let t = e.store.value.homeGlow, n = tA(t.preset);
+function ZEe({ host: e }) {
+ let t = e.store.value.homeGlow, n = cA(t.preset);
return /* @__PURE__ */ (0, F.jsxs)("section", {
"data-glow-setting": "",
id: "homeGlowControls",
@@ -66507,10 +66577,10 @@ function IEe({ host: e }) {
"data-glow-current": "",
children: ["当前配色", /* @__PURE__ */ (0, F.jsx)("b", {
"data-glow-preset-name": "",
- children: tse(t.preset)
+ children: lse(t.preset)
})]
}),
- /* @__PURE__ */ (0, F.jsx)(rj, {
+ /* @__PURE__ */ (0, F.jsx)(dj, {
store: e.store,
label: "光晕配色"
}),
@@ -66521,7 +66591,7 @@ function IEe({ host: e }) {
}),
/* @__PURE__ */ (0, F.jsx)("div", {
"data-glow-fields": "",
- children: PEe.map(([r, i, a]) => /* @__PURE__ */ (0, F.jsx)(NEe, {
+ children: YEe.map(([r, i, a]) => /* @__PURE__ */ (0, F.jsx)(JEe, {
field: r,
label: i,
max: a,
@@ -66542,7 +66612,7 @@ function IEe({ host: e }) {
className: "geist-button",
"data-glow-reset": "",
onClick: () => {
- e.store.value.homeGlow = uA(null), e.store.save(), e.changed("glow");
+ e.store.value.homeGlow = _A(null), e.store.save(), e.changed("glow");
},
children: "恢复默认"
})
@@ -66561,7 +66631,7 @@ function IEe({ host: e }) {
"data-glow-colour-card": "",
children: /* @__PURE__ */ (0, F.jsx)("div", {
"data-glow-stops": "",
- children: Qk.map((n, r) => /* @__PURE__ */ (0, F.jsx)(FEe, {
+ children: aA.map((n, r) => /* @__PURE__ */ (0, F.jsx)(XEe, {
host: e,
spot: n,
index: r,
@@ -66573,7 +66643,7 @@ function IEe({ host: e }) {
});
}
// src/react/settings-panel/number-setting.tsx
-var LEe = {
+var QEe = {
batchSizeSetting: {
min: 1,
max: 200,
@@ -66620,22 +66690,22 @@ var LEe = {
optional: !0,
fallback: 60
}
-}, d1 = (e) => `peach.number.${e}`;
-function f1(e, t) {
+}, f1 = (e) => `peach.number.${e}`;
+function p1(e, t) {
if (t !== "分钟" || !Number.isInteger(e) || e < 1440) return "";
let n = e / 1440;
return Number.isInteger(n) ? `${n.toLocaleString()} 天` : `约 ${n.toFixed(1)} 天`;
}
-function p1({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
- let a = LEe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, P.useRef)(0);
- d.current ||= Vk(Number(localStorage.getItem(d1(e))), o, s, n && n > 0 ? n : l);
+function m1({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
+ let a = QEe[e], { min: o, max: s, unit: c, fallback: l } = a, u = a.optional === !0, d = (0, P.useRef)(0);
+ d.current ||= qk(Number(localStorage.getItem(f1(e))), o, s, n && n > 0 ? n : l);
let [f, p] = (0, P.useState)(n ?? 0), [m, h] = (0, P.useState)(String(n && n > 0 ? n : d.current)), [g, _] = (0, P.useState)(""), v = (0, P.useRef)(null), y = (0, P.useRef)(i);
y.current = i, (0, P.useLayoutEffect)(() => {
n !== null && (p(n), n > 0 && h(String(n)));
}, [n]);
let b = () => {
let t = v.current;
- t && (!t.value || !t.checkValidity() ? (t.setAttribute("aria-invalid", "true"), _(`请输入 ${o}–${s} 的整数(${c})`)) : (t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(d1(e), String(d.current)), y.current(d.current)));
+ t && (!t.value || !t.checkValidity() ? (t.setAttribute("aria-invalid", "true"), _(`请输入 ${o}–${s} 的整数(${c})`)) : (t.removeAttribute("aria-invalid"), _(""), d.current = Number(t.value), localStorage.setItem(f1(e), String(d.current)), y.current(d.current)));
}, x = (0, P.useRef)(b);
x.current = b, (0, P.useEffect)(() => {
let e = v.current;
@@ -66645,7 +66715,7 @@ function p1({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
}, []);
let S = f > 0, C = () => {
let t = v.current;
- t?.removeAttribute("aria-invalid"), _(""), S ? (t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(d1(e), String(d.current)), p(0), y.current(0)) : (p(d.current), h(String(d.current)), y.current(d.current));
+ t?.removeAttribute("aria-invalid"), _(""), S ? (t && t.value && t.checkValidity() && (d.current = Number(t.value)), localStorage.setItem(f1(e), String(d.current)), p(0), y.current(0)) : (p(d.current), h(String(d.current)), y.current(d.current));
}, w = r || n === null;
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-number-setting": "",
@@ -66682,7 +66752,7 @@ function p1({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
}
}), /* @__PURE__ */ (0, F.jsxs)("span", {
"aria-hidden": "true",
- children: [c, f1(Number(m), c) ? ` · ${f1(Number(m), c)}` : ""]
+ children: [c, p1(Number(m), c) ? ` · ${p1(Number(m), c)}` : ""]
})]
}), /* @__PURE__ */ (0, F.jsx)("small", {
id: `${e}-error`,
@@ -66695,13 +66765,13 @@ function p1({ id: e, label: t, value: n, disabled: r = !1, onApply: i }) {
});
}
// src/react/sidebar/sidebar-order.ts
-function m1(e) {
+function h1(e) {
let { mutate: t } = rX();
return (0, P.useCallback)((n) => {
e.value.sidebarOrder = n, e.save(), t({ sidebarOrder: n }, { onError: () => {} });
}, [e, t]);
}
-function h1(e, t, n, r) {
+function g1(e, t, n, r) {
if (t === n) return null;
let i = [...e], a = i.indexOf(t);
if (a < 0) return null;
@@ -66710,23 +66780,23 @@ function h1(e, t, n, r) {
return o < 0 ? null : (i.splice(o + +!!r, 0, t), i);
}
// src/react/settings-panel/sidebar-order.tsx
-var REe = "__home__", g1 = (e) => e === "" ? REe : e;
-function zEe({ host: e }) {
- let t = m1(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), a = e.navCatalog.filter(([e]) => !n.includes(e)), [o, s] = (0, P.useState)(null), [c, l] = (0, P.useState)(!1), [u, d] = (0, P.useState)(null), [f, p] = (0, P.useState)(null), m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = (e, r, i) => {
- let a = h1(n, e, r, i);
+var $Ee = "__home__", _1 = (e) => e === "" ? $Ee : e;
+function eDe({ host: e }) {
+ let t = h1(e.store), n = e.store.value.sidebarOrder, r = new Map(e.navCatalog.map((e) => [e[0], e])), i = n.map((e) => r.get(e)).filter((e) => e !== void 0), a = e.navCatalog.filter(([e]) => !n.includes(e)), [o, s] = (0, P.useState)(null), [c, l] = (0, P.useState)(!1), [u, d] = (0, P.useState)(null), [f, p] = (0, P.useState)(null), m = (0, P.useRef)(null), h = (0, P.useRef)(null), g = (e, r, i) => {
+ let a = g1(n, e, r, i);
a && t(a);
}, _ = (e, r) => {
let i = n.indexOf(e), a = i + r;
if (i < 0 || a < 0 || a >= n.length) return;
let o = [...n];
[o[i], o[a]] = [o[a], o[i]], t(o);
- }, v = a.find(([e]) => g1(e) === o) ?? a[0], y = () => {
- h.current && Wo(h.current), l(!1);
+ }, v = a.find(([e]) => _1(e) === o) ?? a[0], y = () => {
+ h.current && as(h.current), l(!1);
}, b = () => {
let e = h.current;
if (!e) return;
let t = !c;
- t ? Uo(e) : Wo(e), l(t), t && e.querySelector("[aria-selected=\"true\"]")?.focus();
+ t ? is(e) : as(e), l(t), t && e.querySelector("[aria-selected=\"true\"]")?.focus();
}, x = (e) => {
if (e.key === "Escape") {
e.preventDefault(), y(), m.current?.focus();
@@ -66741,7 +66811,7 @@ function zEe({ host: e }) {
}, C = (e) => ({
draggable: !0,
onDragStart: (t) => {
- d(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", g1(e));
+ d(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", _1(e));
},
onDragOver: (t) => {
if (u === null || u === e) return;
@@ -66773,9 +66843,9 @@ function zEe({ host: e }) {
/* @__PURE__ */ (0, F.jsx)("i", {
"data-sidebar-grip": "",
"aria-hidden": "true",
- children: /* @__PURE__ */ (0, F.jsx)(gP, { name: "grip-vertical" })
+ children: /* @__PURE__ */ (0, F.jsx)(CP, { name: "grip-vertical" })
}),
- /* @__PURE__ */ (0, F.jsx)(gP, { name: a ?? "" }),
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: a ?? "" }),
/* @__PURE__ */ (0, F.jsx)("b", { children: r })
]
}), /* @__PURE__ */ (0, F.jsxs)("span", {
@@ -66789,7 +66859,7 @@ function zEe({ host: e }) {
title: "上移",
disabled: o === 0,
onClick: () => _(e, -1),
- children: /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-up" })
+ children: /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-up" })
}),
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -66799,7 +66869,7 @@ function zEe({ host: e }) {
title: "下移",
disabled: o === i.length - 1,
onClick: () => _(e, 1),
- children: /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-down" })
+ children: /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-down" })
}),
/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -66811,11 +66881,11 @@ function zEe({ host: e }) {
onClick: () => {
n.length > 1 && t(n.filter((t) => t !== e));
},
- children: /* @__PURE__ */ (0, F.jsx)(gP, { name: "eye-off" })
+ children: /* @__PURE__ */ (0, F.jsx)(CP, { name: "eye-off" })
})
]
})]
- }, g1(e))), /* @__PURE__ */ (0, F.jsxs)("div", {
+ }, _1(e))), /* @__PURE__ */ (0, F.jsxs)("div", {
"data-sidebar-add-row": "",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-sidebar-add-picker": "",
@@ -66831,13 +66901,13 @@ function zEe({ host: e }) {
ref: m,
onClick: b,
children: v ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(gP, { name: v[2] ?? "" }),
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: v[2] ?? "" }),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-sidebar-add-label": "",
children: v[1]
}),
- /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-down" })
- ] }) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(gP, { name: "check" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "全部页面都已显示" })] })
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-down" })
+ ] }) : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(CP, { name: "check" }), /* @__PURE__ */ (0, F.jsx)("span", { children: "全部页面都已显示" })] })
}), a.length ? /* @__PURE__ */ (0, F.jsx)("div", {
className: "popmenu",
"data-sidebar-add-menu": "",
@@ -66848,15 +66918,15 @@ function zEe({ host: e }) {
children: a.map(([e, t, n]) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
role: "option",
- "data-sidebar-add-option": g1(e),
+ "data-sidebar-add-option": _1(e),
"aria-selected": v?.[0] === e,
tabIndex: v?.[0] === e ? 0 : -1,
onKeyDown: x,
onClick: () => {
- s(g1(e)), y(), m.current?.focus();
+ s(_1(e)), y(), m.current?.focus();
},
- children: [/* @__PURE__ */ (0, F.jsx)(gP, { name: n ?? "" }), /* @__PURE__ */ (0, F.jsx)("span", { children: t })]
- }, g1(e)))
+ children: [/* @__PURE__ */ (0, F.jsx)(CP, { name: n ?? "" }), /* @__PURE__ */ (0, F.jsx)("span", { children: t })]
+ }, _1(e)))
}) : null]
}), /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -66872,13 +66942,13 @@ function zEe({ host: e }) {
});
}
// src/react/settings-panel/settings-panel.tsx
-var _1 = [
+var v1 = [
["外观与导航", "ri-palette-line"],
["浏览与播放", "ri-play-circle-line"],
["JAV 与新作", "jav"],
["搜索与推荐", "ri-search-line"],
["内容显示", "ri-shield-check-line"]
-], BEe = [
+], tDe = [
["seed", "随机"],
["rating", "评分"],
["o", "高潮计数"],
@@ -66887,7 +66957,7 @@ var _1 = [
["size", "体积"],
["new", "入库时间"],
["played", "观看时间"]
-], VEe = [["desc", "降序"], ["asc", "升序"]], HEe = [[
+], nDe = [["desc", "降序"], ["asc", "升序"]], rDe = [[
"cover",
"官方封面",
""
@@ -66895,7 +66965,7 @@ var _1 = [
"thumbnail",
"预览图",
""
-]], UEe = [
+]], iDe = [
[
"feedHideGroupSetting",
"feedHideGroupCompilations",
@@ -66914,88 +66984,88 @@ var _1 = [
"切片",
"隐藏切片"
]
-], WEe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", v1 = null, y1 = {
+], aDe = "button:not([disabled]),input:not([disabled]),textarea:not([disabled]),a[href]", y1 = null, b1 = {
open: !1,
closing: !1,
epoch: 0,
tab: 0,
configurable: null
-}, b1 = 0, x1 = null, S1 = /* @__PURE__ */ new Set();
-function GEe(e) {
- return S1.add(e), () => {
- S1.delete(e);
+}, x1 = 0, S1 = null, C1 = /* @__PURE__ */ new Set();
+function oDe(e) {
+ return C1.add(e), () => {
+ C1.delete(e);
};
}
-function KEe() {
- for (let e of [...S1]) e();
+function sDe() {
+ for (let e of [...C1]) e();
}
-function C1(e) {
- y1 = {
- ...y1,
+function w1(e) {
+ b1 = {
+ ...b1,
...e
- }, (0, Lt.flushSync)(KEe);
+ }, (0, Lt.flushSync)(sDe);
}
-async function qEe(e) {
- let t = y1.epoch, n = await e.configurable();
- y1.open && y1.epoch === t && C1({ configurable: n });
+async function cDe(e) {
+ let t = b1.epoch, n = await e.configurable();
+ b1.open && b1.epoch === t && w1({ configurable: n });
}
-function JEe(e = "") {
- let t = v1;
+function lDe(e = "") {
+ let t = y1;
if (!t) return;
- let n = _1.findIndex(([t]) => t === e);
- if (y1.open && !y1.closing) {
- n >= 0 && n !== y1.tab && C1({ tab: n });
+ let n = v1.findIndex(([t]) => t === e);
+ if (b1.open && !b1.closing) {
+ n >= 0 && n !== b1.tab && w1({ tab: n });
return;
}
- Vo(), b1 += 1, x1 ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
- let r = Nxe();
- C1({
+ ns(), x1 += 1, S1 ||= document.activeElement, t.sound("whoosh"), document.documentElement.style.overflow = "hidden", document.body.classList.add("settings-open");
+ let r = Yxe();
+ w1({
open: !0,
closing: !1,
configurable: null,
- epoch: y1.epoch + 1,
- tab: n >= 0 ? n : y1.tab
+ epoch: b1.epoch + 1,
+ tab: n >= 0 ? n : b1.tab
}), r.then((e) => {
e && t.syncRemote(e);
- }), qEe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
+ }), cDe(t), queueMicrotask(() => document.getElementById("settingsClose")?.focus());
}
-function w1(e = !0) {
- if (!y1.open || y1.closing) return;
- let t = ++b1;
- e && v1?.closed?.(), C1({ closing: !0 });
+function T1(e = !0) {
+ if (!b1.open || b1.closing) return;
+ let t = ++x1;
+ e && y1?.closed?.(), w1({ closing: !0 });
let n = () => {
- t === b1 && y1.closing && (C1({
+ t === x1 && b1.closing && (w1({
open: !1,
closing: !1
- }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), x1 instanceof HTMLElement && document.contains(x1) && x1.focus(), x1 = null);
+ }), document.documentElement.style.overflow = "", document.body.classList.remove("settings-open"), S1 instanceof HTMLElement && document.contains(S1) && S1.focus(), S1 = null);
};
matchMedia("(prefers-reduced-motion: reduce)").matches ? queueMicrotask(n) : (document.querySelector("#settingsPanel > [data-settings-card]")?.addEventListener("animationend", n, { once: !0 }), setTimeout(n, 380));
}
-var YEe = {
- open: JEe,
- close: w1,
- isOpen: () => y1.open,
+var uDe = {
+ open: lDe,
+ close: T1,
+ isOpen: () => b1.open,
reveal: (e) => queueMicrotask(() => document.querySelector(e)?.scrollIntoView({ block: "nearest" }))
};
-function XEe(e) {
- return v1 = e, YEe;
+function dDe(e) {
+ return y1 = e, uDe;
}
-function ZEe() {
- let e = (0, P.useSyncExternalStore)(GEe, () => y1);
- return v1 ? /* @__PURE__ */ (0, F.jsx)(eDe, {
- host: v1,
+function fDe() {
+ let e = (0, P.useSyncExternalStore)(oDe, () => b1);
+ return y1 ? /* @__PURE__ */ (0, F.jsx)(hDe, {
+ host: y1,
view: e
}) : null;
}
-function QEe(e) {
+function pDe(e) {
if (e.key !== "Tab") return;
- let t = [...e.currentTarget.querySelectorAll(WEe)].filter((e) => e.getClientRects().length > 0);
+ let t = [...e.currentTarget.querySelectorAll(aDe)].filter((e) => e.getClientRects().length > 0);
if (!t.length) return;
let n = t[0], r = t[t.length - 1];
e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
}
-var T1 = (e) => `settings-tab-${e}`, E1 = (e) => `settings-group-${e}`;
-function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect: i }) {
+var E1 = (e) => `settings-tab-${e}`, D1 = (e) => `settings-group-${e}`;
+function mDe({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect: i }) {
let a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useRef)(e), l = (0, P.useRef)([]), u = (e, t) => {
let n = o.current;
if (!n) return;
@@ -67010,12 +67080,12 @@ function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect
w: e.offsetWidth,
h: e.offsetHeight
}, i = s.current;
- s.current = r, Cc(n, t ? i : null, r, "y");
+ s.current = r, Rc(n, t ? i : null, r, "y");
}, d = (0, P.useRef)(u);
d.current = u, (0, P.useLayoutEffect)(() => {
let e = a.current;
if (!e) return;
- lc(e);
+ wc(e);
let t = new ResizeObserver(() => d.current(l.current[c.current], !1));
return t.observe(e), () => t.disconnect();
}, []), (0, P.useLayoutEffect)(() => {
@@ -67023,7 +67093,7 @@ function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect
c.current = e, d.current(l.current[e], t);
}, [e, t]);
let f = (e, t) => {
- let n = _1.length, r = t;
+ let n = v1.length, r = t;
if (e.key === "ArrowRight" || e.key === "ArrowDown") r = (t + 1) % n;
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") r = (t + n - 1) % n;
else if (e.key === "Home") r = 0;
@@ -67052,11 +67122,11 @@ function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect
role: "presentation",
children: "设置"
}),
- _1.map(([t, n], r) => /* @__PURE__ */ (0, F.jsxs)("button", {
+ v1.map(([t, n], r) => /* @__PURE__ */ (0, F.jsxs)("button", {
type: "button",
role: "tab",
- id: T1(r),
- "aria-controls": E1(r),
+ id: E1(r),
+ "aria-controls": D1(r),
"aria-selected": r === e,
tabIndex: r === e ? 0 : -1,
ref: (e) => {
@@ -67067,7 +67137,7 @@ function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect
onPointerEnter: (e) => {
e.pointerType !== "touch" && u(e.currentTarget, !0);
},
- children: [n === "jav" ? /* @__PURE__ */ (0, F.jsx)(gP, { name: n }) : /* @__PURE__ */ (0, F.jsx)(Cle, { name: n }), t]
+ children: [n === "jav" ? /* @__PURE__ */ (0, F.jsx)(CP, { name: n }) : /* @__PURE__ */ (0, F.jsx)(jle, { name: n }), t]
}, t)),
/* @__PURE__ */ (0, F.jsx)("div", {
"data-settings-service": "",
@@ -67078,27 +67148,27 @@ function $Ee({ tab: e, epoch: t, configurable: n, openConfiguration: r, onSelect
onClick: r,
title: n === !1 ? "请在运行 Peach 的设备上打开 Peach 配置" : void 0,
children: [
- /* @__PURE__ */ (0, F.jsx)(gP, { name: "folder-cog" }),
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: "folder-cog" }),
"Peach 配置",
- /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-right" })
+ /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-right" })
]
})
})
]
});
}
-function D1({ index: e, tab: t, children: n, cards: r = !1 }) {
+function O1({ index: e, tab: t, children: n, cards: r = !1 }) {
return /* @__PURE__ */ (0, F.jsxs)("section", {
"data-setting-group": "",
"data-setting-layout": r ? "cards" : void 0,
- id: E1(e),
+ id: D1(e),
role: "tabpanel",
- "aria-labelledby": T1(e),
+ "aria-labelledby": E1(e),
hidden: e !== t,
- children: [/* @__PURE__ */ (0, F.jsx)("h3", { children: _1[e][0] }), n]
+ children: [/* @__PURE__ */ (0, F.jsx)("h3", { children: v1[e][0] }), n]
});
}
-function O1({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
+function k1({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Setting$/, "")}Description`, checked: i, onToggle: a }) {
return /* @__PURE__ */ (0, F.jsxs)("label", {
"data-setting-row": "",
children: [/* @__PURE__ */ (0, F.jsxs)("span", { children: [/* @__PURE__ */ (0, F.jsx)("b", { children: t }), n ? /* @__PURE__ */ (0, F.jsx)("small", {
@@ -67115,7 +67185,7 @@ function O1({ id: e, title: t, description: n, describedBy: r = `${e.replace(/Se
})]
});
}
-function k1({ title: e, description: t, kind: n, children: r }) {
+function A1({ title: e, description: t, kind: n, children: r }) {
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-setting-row": "",
"data-setting-sort": n === "sort" ? "" : void 0,
@@ -67123,7 +67193,7 @@ function k1({ title: e, description: t, kind: n, children: r }) {
children: [/* @__PURE__ */ (0, F.jsxs)("span", { children: [/* @__PURE__ */ (0, F.jsx)("b", { children: e }), typeof t == "string" ? /* @__PURE__ */ (0, F.jsx)("small", { children: t }) : t] }), r]
});
}
-function eDe({ host: e, view: t }) {
+function hDe({ host: e, view: t }) {
(0, P.useSyncExternalStore)(e.store.subscribe, e.store.version);
let n = e.store.value, r = (0, P.useRef)(null), i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useRef)(t.tab), l = () => {
let [e, t] = [i.current, o.current];
@@ -67134,17 +67204,17 @@ function eDe({ host: e, view: t }) {
u.current = l, (0, P.useLayoutEffect)(() => {
let t = o.current;
if (!t || !r.current) return;
- s.current = yo(t) ?? s.current, e.attached(r.current);
+ s.current = Po(t) ?? s.current, e.attached(r.current);
let n = () => u.current();
return t.addEventListener("scroll", n, { passive: !0 }), () => t.removeEventListener("scroll", n);
}, [e]), (0, P.useLayoutEffect)(() => {
let e = c.current !== t.tab;
- c.current = t.tab, o.current && (o.current.scrollTop = 0), e && a.current && Ps(a.current, "h2"), u.current();
+ c.current = t.tab, o.current && (o.current.scrollTop = 0), e && a.current && Ys(a.current, "h2"), u.current();
}, [t.tab, t.epoch]), (0, P.useLayoutEffect)(() => {
s.current?.();
});
let d = t.epoch, f = (t) => {
- t !== y1.tab && (C1({ tab: t }), e.selectSection?.(_1[t][0]));
+ t !== b1.tab && (w1({ tab: t }), e.selectSection?.(v1[t][0]));
}, p = () => e.store.save();
return /* @__PURE__ */ (0, F.jsx)("section", {
"data-settings-panel": "",
@@ -67155,9 +67225,9 @@ function eDe({ host: e, view: t }) {
"aria-labelledby": "settingsTitle",
"data-closing": t.closing ? "" : void 0,
ref: r,
- onKeyDown: QEe,
+ onKeyDown: pDe,
onClick: (e) => {
- e.target === e.currentTarget && w1();
+ e.target === e.currentTarget && T1();
},
children: /* @__PURE__ */ (0, F.jsxs)("div", {
"data-settings-card": "",
@@ -67168,27 +67238,27 @@ function eDe({ host: e, view: t }) {
ref: a,
children: [/* @__PURE__ */ (0, F.jsx)("h2", {
id: "settingsTitle",
- children: _1[t.tab][0]
- }), /* @__PURE__ */ (0, F.jsx)(Hz, {
+ children: v1[t.tab][0]
+ }), /* @__PURE__ */ (0, F.jsx)(Jz, {
id: "settingsClose",
label: "关闭设置",
- onPress: () => w1()
+ onPress: () => T1()
})]
}),
- /* @__PURE__ */ (0, F.jsx)($Ee, {
+ /* @__PURE__ */ (0, F.jsx)(mDe, {
tab: t.tab,
epoch: d,
configurable: t.configurable,
onSelect: f,
openConfiguration: () => {
- w1(!1), e.openConfiguration();
+ T1(!1), e.openConfiguration();
}
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-settings-scroll": "",
ref: o,
children: [
- /* @__PURE__ */ (0, F.jsxs)(D1, {
+ /* @__PURE__ */ (0, F.jsxs)(O1, {
index: 0,
tab: t.tab,
cards: !0,
@@ -67196,9 +67266,9 @@ function eDe({ host: e, view: t }) {
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-setting-card": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "主题",
- children: /* @__PURE__ */ (0, F.jsx)(l1, {
+ children: /* @__PURE__ */ (0, F.jsx)(u1, {
id: "themeSetting",
name: "theme",
legend: "主题",
@@ -67226,7 +67296,7 @@ function eDe({ host: e, view: t }) {
onChange: (t) => e.setHighContrast(t.target.checked)
})]
}),
- /* @__PURE__ */ (0, F.jsx)(O1, {
+ /* @__PURE__ */ (0, F.jsx)(k1, {
id: "uiSoundsSetting",
title: "界面音效",
checked: n.uiSounds,
@@ -67234,7 +67304,7 @@ function eDe({ host: e, view: t }) {
n.uiSounds = t, p(), e.changed("uiSounds");
}
}),
- /* @__PURE__ */ (0, F.jsx)(O1, {
+ /* @__PURE__ */ (0, F.jsx)(k1, {
id: "homeGlowSetting",
title: "侧栏光晕",
checked: n.homeGlow.on,
@@ -67244,7 +67314,7 @@ function eDe({ host: e, view: t }) {
})
]
}),
- /* @__PURE__ */ (0, F.jsx)(IEe, { host: e }),
+ /* @__PURE__ */ (0, F.jsx)(ZEe, { host: e }),
/* @__PURE__ */ (0, F.jsxs)("section", {
"data-setting-block": "",
"aria-labelledby": "sidebarOrderTitle",
@@ -67256,35 +67326,35 @@ function eDe({ host: e, view: t }) {
"data-setting-card": "",
children: /* @__PURE__ */ (0, F.jsx)("section", {
"data-sidebar-setting": "",
- children: /* @__PURE__ */ (0, F.jsx)(zEe, { host: e })
+ children: /* @__PURE__ */ (0, F.jsx)(eDe, { host: e })
})
})]
})
]
}),
- /* @__PURE__ */ (0, F.jsx)(nDe, {
+ /* @__PURE__ */ (0, F.jsx)(_De, {
host: e,
tab: t.tab,
epoch: d
}),
- /* @__PURE__ */ (0, F.jsx)(rDe, {
+ /* @__PURE__ */ (0, F.jsx)(vDe, {
host: e,
tab: t.tab,
epoch: d
}),
- /* @__PURE__ */ (0, F.jsxs)(D1, {
+ /* @__PURE__ */ (0, F.jsxs)(O1, {
index: 3,
tab: t.tab,
children: [
- /* @__PURE__ */ (0, F.jsx)(oDe, {
+ /* @__PURE__ */ (0, F.jsx)(SDe, {
host: e,
epoch: d
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "相关推荐数量",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "relatedLimitSetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "relatedLimitSetting",
label: "相关推荐数量",
value: n.relatedLimit,
@@ -67294,24 +67364,24 @@ function eDe({ host: e, view: t }) {
}, d)
})
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "口味与记录",
children: /* @__PURE__ */ (0, F.jsx)("div", {
className: "peach-react",
- children: /* @__PURE__ */ (0, F.jsx)(pI, {
+ children: /* @__PURE__ */ (0, F.jsx)(yI, {
variant: "secondary",
href: "/taste",
- onClick: () => w1(!1),
+ onClick: () => T1(!1),
children: "打开口味与记录"
})
})
})
]
}),
- /* @__PURE__ */ (0, F.jsx)(D1, {
+ /* @__PURE__ */ (0, F.jsx)(O1, {
index: 4,
tab: t.tab,
- children: /* @__PURE__ */ (0, F.jsx)(O1, {
+ children: /* @__PURE__ */ (0, F.jsx)(k1, {
id: "censorSetting",
title: "SFW 模式",
describedBy: "sfwDescription",
@@ -67326,19 +67396,19 @@ function eDe({ host: e, view: t }) {
})
});
}
-function tDe(e, t) {
+function gDe(e, t) {
let n = e.querySelector("[data-select-label]");
if (!n) return;
- n.querySelector("[data-icon-swap]") || (n.innerHTML = Ds("arrow-up", "arrow-down", "a", {
+ n.querySelector("[data-icon-swap]") || (n.innerHTML = Hs("arrow-up", "arrow-down", "a", {
className: "gselectmark",
iconClass: "gselectmark"
- }) + "<span data-sort-direction-label></span>"), Os(n, t ? "a" : "b");
+ }) + "<span data-sort-direction-label></span>"), Us(n, t ? "a" : "b");
let r = n.querySelector("[data-sort-direction-label]");
r && (r.textContent = t ? "升序" : "降序");
}
-function nDe({ host: e, tab: t, epoch: n }) {
+function _De({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save(), a = r.defaultSort === "seed", o = r.defaultSortDirection === "asc";
- return /* @__PURE__ */ (0, F.jsxs)(D1, {
+ return /* @__PURE__ */ (0, F.jsxs)(O1, {
index: 1,
tab: t,
children: [
@@ -67346,11 +67416,11 @@ function nDe({ host: e, tab: t, epoch: n }) {
"data-settings-subheading": "",
children: "作品列表"
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "每批加载作品",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "batchSizeSetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "batchSizeSetting",
label: "每批作品",
value: r.batchSize,
@@ -67360,24 +67430,24 @@ function nDe({ host: e, tab: t, epoch: n }) {
}, n)
})
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "默认排序",
kind: "sort",
children: /* @__PURE__ */ (0, F.jsxs)("div", {
"data-setting-sort-controls": "",
- children: [/* @__PURE__ */ (0, F.jsx)(u1, {
+ children: [/* @__PURE__ */ (0, F.jsx)(d1, {
id: "defaultSortSetting",
label: "默认排序",
- options: BEe,
+ options: tDe,
value: r.defaultSort,
epoch: n,
onPick: (t) => {
r.defaultSort = t, i(), e.changed("defaultSort");
}
- }), /* @__PURE__ */ (0, F.jsx)(u1, {
+ }), /* @__PURE__ */ (0, F.jsx)(d1, {
id: "defaultSortDirectionSetting",
label: "默认排序方向",
- options: VEe,
+ options: nDe,
value: o ? "asc" : "desc",
hidden: a,
disabled: a,
@@ -67385,13 +67455,13 @@ function nDe({ host: e, tab: t, epoch: n }) {
onPick: (t) => {
r.defaultSortDirection = t, i(), e.changed("sortDirection");
},
- decorate: (e) => tDe(e, o)
+ decorate: (e) => gDe(e, o)
})]
})
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "视频卡片大小",
- children: /* @__PURE__ */ (0, F.jsx)(l1, {
+ children: /* @__PURE__ */ (0, F.jsx)(u1, {
id: "javSizeSetting",
name: "video-size",
legend: "视频卡片大小",
@@ -67417,16 +67487,16 @@ function nDe({ host: e, tab: t, epoch: n }) {
}
})]
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "悬停预览延迟",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "hoverDelaySetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "hoverDelaySetting",
label: "悬停预览延迟",
value: r.hoverDelaySeconds,
onApply: (t) => {
- r.hoverDelaySeconds = Vk(t, 0, 60, 5), i(), e.changed("hoverDelay");
+ r.hoverDelaySeconds = qk(t, 0, 60, 5), i(), e.changed("hoverDelay");
}
}, n)
})
@@ -67435,16 +67505,16 @@ function nDe({ host: e, tab: t, epoch: n }) {
"data-settings-subheading": "",
children: "播放"
}),
- /* @__PURE__ */ (0, F.jsx)(aDe, {
+ /* @__PURE__ */ (0, F.jsx)(xDe, {
host: e,
epoch: n
})
]
});
}
-function rDe({ host: e, tab: t, epoch: n }) {
+function vDe({ host: e, tab: t, epoch: n }) {
let r = e.store.value, i = () => e.store.save();
- return /* @__PURE__ */ (0, F.jsxs)(D1, {
+ return /* @__PURE__ */ (0, F.jsxs)(O1, {
index: 2,
tab: t,
children: [
@@ -67452,20 +67522,24 @@ function rDe({ host: e, tab: t, epoch: n }) {
"data-settings-subheading": "",
children: "作品显示"
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(yDe, {
+ host: e,
+ epoch: n
+ }),
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "默认图片",
- children: /* @__PURE__ */ (0, F.jsx)(l1, {
+ children: /* @__PURE__ */ (0, F.jsx)(u1, {
id: "javImageSetting",
name: "jav-image",
legend: "默认图片",
- options: HEe,
+ options: rDe,
value: r.javImage,
attr: "data-jav-image-choice",
variant: "javimageswitch",
text: !0,
epoch: n,
onChoose: (t) => {
- r.javImage = Fa(t), i(), e.changed("javImage");
+ r.javImage = Xa(t), i(), e.changed("javImage");
}
})
}),
@@ -67473,21 +67547,21 @@ function rDe({ host: e, tab: t, epoch: n }) {
"data-settings-subheading": "",
children: "新作显示"
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "显示数量",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "feedLimitSetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "feedLimitSetting",
label: "新作显示数量",
value: r.feedLimit,
onApply: (t) => {
- r.feedLimit = Vk(t, 1, 100, 12), i(), e.changed("feedLimit");
+ r.feedLimit = qk(t, 1, 100, 12), i(), e.changed("feedLimit");
}
}, n)
})
}),
- /* @__PURE__ */ (0, F.jsx)(O1, {
+ /* @__PURE__ */ (0, F.jsx)(k1, {
id: "feedAutoScrollSetting",
title: "自动滚动",
checked: r.feedAutoScroll,
@@ -67495,7 +67569,7 @@ function rDe({ host: e, tab: t, epoch: n }) {
r.feedAutoScroll = t, i(), e.changed("feedAutoScroll");
}
}),
- UEe.map(([t, n, r, i]) => /* @__PURE__ */ (0, F.jsx)(iDe, {
+ iDe.map(([t, n, r, i]) => /* @__PURE__ */ (0, F.jsx)(bDe, {
host: e,
id: t,
settingKey: n,
@@ -67505,15 +67579,50 @@ function rDe({ host: e, tab: t, epoch: n }) {
]
});
}
-function iDe({ host: e, id: t, settingKey: n, label: r, title: i }) {
+function yDe({ host: e, epoch: t }) {
+ let n = Pt({
+ queryKey: ZY,
+ queryFn: ({ signal: e }) => nX(e),
+ staleTime: 0
+ }), r = rX(), [i, a] = (0, P.useState)(null), o = n.data?.performerNameLanguage;
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(A1, {
+ title: "女优名称",
+ description: /* @__PURE__ */ (0, F.jsx)("small", {
+ "data-copy-key": "performer-name-language-help",
+ children: "名称与别名只显示所选语言的写法;缺少对应时保留当前名称。偏好保存在数据库,其他设备读取同一份设置。"
+ }),
+ children: /* @__PURE__ */ (0, F.jsx)(d1, {
+ id: "performerNameLanguageSetting",
+ label: "女优名称",
+ epoch: t,
+ options: [["zh-CN", "中文"], ["ja", "日文原文"]],
+ value: i ?? o ?? e.store.value.performerNameLanguage,
+ disabled: n.isPending || n.isError || r.isPending || !o,
+ busy: r.isPending,
+ onPick: (t) => {
+ r.isPending || t !== "zh-CN" && t !== "ja" || t === o || (a(t), r.mutate({ performerNameLanguage: t }, {
+ onSuccess: (t) => {
+ e.syncRemote(t), e.receipt("已保存名称显示偏好");
+ },
+ onError: (t) => e.failure("保存名称显示偏好", t),
+ onSettled: () => a(null)
+ }));
+ }
+ })
+ }), n.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
+ tone: "error",
+ children: "未取得数据库中的名称偏好,请重新打开设置。"
+ }) : null] });
+}
+function bDe({ host: e, id: t, settingKey: n, label: r, title: i }) {
let a = rX(), [o, s] = (0, P.useState)(null), c = (0, P.useRef)(null), l = e.store.value, u = (t) => {
- s(t), kc(c.current), a.mutate({ [n]: t }, {
+ s(t), Wc(c.current), a.mutate({ [n]: t }, {
onSuccess: (i) => {
l[n] = i[n] === !0, e.store.save(), e.changed("feedCompilations"), e.receipt(t ? `新作已收起${r}` : `新作已列出${r}`);
},
onError: (t) => e.failure(`保存${r}开关`, t),
onSettled: () => {
- s(null), kc(c.current, !1);
+ s(null), Wc(c.current, !1);
}
});
};
@@ -67530,10 +67639,10 @@ function iDe({ host: e, id: t, settingKey: n, label: r, title: i }) {
})]
});
}
-function aDe({ host: e, epoch: t }) {
+function xDe({ host: e, epoch: t }) {
let n = e.store.value, r = () => e.store.save();
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(O1, {
+ /* @__PURE__ */ (0, F.jsx)(k1, {
id: "detailAutoplaySetting",
title: "打开详情自动播放",
checked: n.detailAutoplay,
@@ -67541,7 +67650,7 @@ function aDe({ host: e, epoch: t }) {
n.detailAutoplay = e, r();
}
}),
- /* @__PURE__ */ (0, F.jsx)(O1, {
+ /* @__PURE__ */ (0, F.jsx)(k1, {
id: "miniplayerSetting",
title: "离开详情后小窗播放",
checked: n.miniplayer,
@@ -67549,11 +67658,11 @@ function aDe({ host: e, epoch: t }) {
n.miniplayer = t, r(), e.changed("miniplayer");
}
}),
- /* @__PURE__ */ (0, F.jsx)(k1, {
+ /* @__PURE__ */ (0, F.jsx)(A1, {
title: "快进 / 快退步长",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "seekSecondsSetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "seekSecondsSetting",
label: "快进 / 快退",
value: n.seekSeconds,
@@ -67565,86 +67674,86 @@ function aDe({ host: e, epoch: t }) {
})
] });
}
-function oDe({ host: e, epoch: t }) {
+function SDe({ host: e, epoch: t }) {
let n = e.store.value, r = rX();
- return /* @__PURE__ */ (0, F.jsx)(k1, {
+ return /* @__PURE__ */ (0, F.jsx)(A1, {
title: "搜索记录数量",
children: /* @__PURE__ */ (0, F.jsx)("div", {
id: "searchHistoryLimitSetting",
- children: /* @__PURE__ */ (0, F.jsx)(p1, {
+ children: /* @__PURE__ */ (0, F.jsx)(m1, {
id: "searchHistoryLimitSetting",
label: "搜索记录",
value: n.searchHistoryLimit,
onApply: (t) => {
- n.searchHistoryLimit = Vk(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
+ n.searchHistoryLimit = qk(t, 0, 50, 10), e.store.save(), e.changed("searchHistoryLimit"), r.mutate({ searchHistoryLimit: n.searchHistoryLimit }, { onError: () => {} });
}
}, t)
})
});
}
// src/react/sidebar/sidebar-island.tsx
-var A1 = "__home__", sDe = {
+var j1 = "__home__", CDe = {
creator: 26,
tag: 30,
tech: 16
-}, j1 = 180, M1 = null, N1 = {
+}, M1 = 180, N1 = null, P1 = {
props: {
content: null,
filters: {},
latest: null
},
epoch: 0
-}, P1 = /* @__PURE__ */ new Set();
-function cDe(e) {
- return P1.add(e), () => {
- P1.delete(e);
+}, F1 = /* @__PURE__ */ new Set();
+function wDe(e) {
+ return F1.add(e), () => {
+ F1.delete(e);
};
}
-function F1() {
- for (let e of [...P1]) e();
+function I1() {
+ for (let e of [...F1]) e();
}
-var lDe = {
+var TDe = {
render(e) {
- N1 = {
- ...N1,
+ P1 = {
+ ...P1,
props: e
- }, (0, Lt.flushSync)(F1);
+ }, (0, Lt.flushSync)(I1);
},
navChanged() {
- N1 = {
- ...N1,
- epoch: N1.epoch + 1
- }, (0, Lt.flushSync)(F1);
+ P1 = {
+ ...P1,
+ epoch: P1.epoch + 1
+ }, (0, Lt.flushSync)(I1);
}
};
-function uDe(e) {
- return M1 = e, N1 = {
- ...N1,
+function EDe(e) {
+ return N1 = e, P1 = {
+ ...P1,
props: {
content: null,
filters: {},
latest: null
}
- }, lDe;
+ }, TDe;
}
-function dDe() {
- let e = (0, P.useSyncExternalStore)(cDe, () => N1);
- return M1 ? /* @__PURE__ */ (0, F.jsx)(fDe, {
- host: M1,
+function DDe() {
+ let e = (0, P.useSyncExternalStore)(wDe, () => P1);
+ return N1 ? /* @__PURE__ */ (0, F.jsx)(ODe, {
+ host: N1,
props: e.props,
epoch: e.epoch
}) : null;
}
-function fDe({ host: e, props: t, epoch: n }) {
+function ODe({ host: e, props: t, epoch: n }) {
let r = (0, P.useSyncExternalStore)(e.store.subscribe, e.store.version);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
/* @__PURE__ */ (0, F.jsx)("div", { "data-sidebar-head": "" }),
- /* @__PURE__ */ (0, F.jsx)(pDe, {
+ /* @__PURE__ */ (0, F.jsx)(kDe, {
host: e,
epoch: n,
version: r
}),
- t.content ? /* @__PURE__ */ (0, F.jsx)(hDe, {
+ t.content ? /* @__PURE__ */ (0, F.jsx)(jDe, {
host: e,
content: t.content,
filters: t.filters,
@@ -67652,8 +67761,8 @@ function fDe({ host: e, props: t, epoch: n }) {
}) : null
] });
}
-function pDe({ host: e, epoch: t, version: n }) {
- let r = m1(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = dI(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || A1 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
+function kDe({ host: e, epoch: t, version: n }) {
+ let r = h1(e.store), i = e.store.value.sidebarOrder, a = new Map(e.navCatalog.map((e) => [e[0], e])), o = i.map((e) => a.get(e)).filter((e) => e !== void 0), s = o.map(([t]) => e.navOn(t)), c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = _I(l, c, "[data-nav][aria-pressed=\"true\"]", `${t}:${n}:${o.map(([e], t) => s[t] ? e || j1 : "").join(",")}`, { axis: "y" }), { sync: d } = u;
(0, P.useEffect)(() => {
let t = e.scroll, n = t.parentElement, r = t.querySelector(":scope > [data-sidebar-head]"), i = new ResizeObserver(() => d());
[
@@ -67677,7 +67786,7 @@ function pDe({ host: e, epoch: t, version: n }) {
}, _ = (e) => ({
draggable: !0,
onDragStart: (t) => {
- p(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e || A1);
+ p(e), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e || j1);
},
onDragOver: (t) => {
if (f === null || f === e) return;
@@ -67692,7 +67801,7 @@ function pDe({ host: e, epoch: t, version: n }) {
t.preventDefault();
let n = f, a = m?.key === e && m.after;
g();
- let o = n === null ? null : h1(i, n, e, a);
+ let o = n === null ? null : g1(i, n, e, a);
o && r(o);
},
onDragEnd: g
@@ -67720,16 +67829,16 @@ function pDe({ host: e, epoch: t, version: n }) {
height: 24,
alt: "",
decoding: "async"
- }) : /* @__PURE__ */ (0, F.jsx)(gP, { name: r }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
- }, t || A1))
+ }) : /* @__PURE__ */ (0, F.jsx)(CP, { name: r }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
+ }, t || j1))
}), v ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)("span", {
"data-sidebar-glide": "",
"aria-hidden": "true",
ref: l
}), v) : null] });
}
-var I1 = (e, t) => String(e[t] ?? "").split(",").filter(Boolean);
-function mDe(e) {
+var L1 = (e, t) => String(e[t] ?? "").split(",").filter(Boolean);
+function ADe(e) {
if (!e) return null;
let t = /* @__PURE__ */ new Map(), n = [
["loc", e.locations],
@@ -67743,17 +67852,17 @@ function mDe(e) {
for (let [e, r] of n) for (let n of r) t.set(`${e}\n${n.value}`, n.n ?? 0);
return t;
}
-function hDe({ host: e, content: t, filters: n, latest: r }) {
+function jDe({ host: e, content: t, filters: n, latest: r }) {
let i = t.kind === "catalog" ? t.key : `follow:${t.selected.join(",")}:${t.tags.map((e) => e.value).join(",")}:${(t.providers || []).map((e) => e.value).join(",")}:${n.provider ?? ""}:${+!!t.duration}:${n.dur_min ?? ""}:${n.dur_max ?? ""}`;
(0, P.useLayoutEffect)(() => {
- t.kind === "catalog" && Ns(e.scroll, "drawer");
+ t.kind === "catalog" && Js(e.scroll, "drawer");
}, [
e,
i,
t.kind
]);
- let a = t.kind === "catalog" ? gDe(e, t.facets, n, r, i) : _De(e, t, n), o = 0;
- return a.map((e) => e && /* @__PURE__ */ (0, F.jsx)(vDe, {
+ let a = t.kind === "catalog" ? MDe(e, t.facets, n, r, i) : NDe(e, t, n), o = 0;
+ return a.map((e) => e && /* @__PURE__ */ (0, F.jsx)(PDe, {
title: e.title,
kind: e.kind,
active: e.active,
@@ -67762,11 +67871,11 @@ function hDe({ host: e, content: t, filters: n, latest: r }) {
children: e.body
}, e.title));
}
-function gDe(e, t, n, r, i) {
- let a = mDe(r), o = (t, r, i) => {
+function MDe(e, t, n, r, i) {
+ let a = ADe(r), o = (t, r, i) => {
if (!t.length) return null;
- let o = I1(n, r);
- return /* @__PURE__ */ (0, F.jsx)(z1, {
+ let o = L1(n, r);
+ return /* @__PURE__ */ (0, F.jsx)(B1, {
rows: t,
filterKey: r,
multi: i,
@@ -67776,7 +67885,7 @@ function gDe(e, t, n, r, i) {
});
}, s = (t, s, c, l, u, d) => {
if (!c.length) return null;
- let f = I1(n, l), p = c.some((e) => f.includes(e.value));
+ let f = L1(n, l), p = c.some((e) => f.includes(e.value));
if (!d) return {
title: t,
kind: s,
@@ -67788,12 +67897,12 @@ function gDe(e, t, n, r, i) {
title: t,
kind: s,
active: p,
- body: /* @__PURE__ */ (0, F.jsx)(bDe, {
+ body: /* @__PURE__ */ (0, F.jsx)(IDe, {
epoch: i,
title: t,
rows: c,
latest: m ?? null,
- limit: sDe[d],
+ limit: CDe[d],
filterKey: l,
selected: f,
counts: a,
@@ -67808,7 +67917,7 @@ function gDe(e, t, n, r, i) {
title: "时长",
kind: "meta",
active: !1,
- body: /* @__PURE__ */ (0, F.jsx)(H1, {
+ body: /* @__PURE__ */ (0, F.jsx)(U1, {
host: e,
filters: n
})
@@ -67823,7 +67932,7 @@ function gDe(e, t, n, r, i) {
title: "关注标签",
kind: "online",
active: !1,
- body: /* @__PURE__ */ (0, F.jsx)(B1, {
+ body: /* @__PURE__ */ (0, F.jsx)(V1, {
rows: t.followTags,
host: e,
selected: null,
@@ -67832,14 +67941,14 @@ function gDe(e, t, n, r, i) {
} : null
];
}
-function _De(e, t, n) {
- let r = t.providers || [], i = I1(n, "provider"), a = new Set(t.selected);
+function NDe(e, t, n) {
+ let r = t.providers || [], i = L1(n, "provider"), a = new Set(t.selected);
return [
r.length ? {
title: "来源",
kind: "src",
active: r.some((e) => i.includes(e.value)),
- body: /* @__PURE__ */ (0, F.jsx)(z1, {
+ body: /* @__PURE__ */ (0, F.jsx)(B1, {
rows: r,
filterKey: "provider",
multi: !1,
@@ -67853,7 +67962,7 @@ function _De(e, t, n) {
title: "时长",
kind: "meta",
active: !1,
- body: /* @__PURE__ */ (0, F.jsx)(H1, {
+ body: /* @__PURE__ */ (0, F.jsx)(U1, {
host: e,
filters: n,
commit: e.setFollowDuration
@@ -67863,7 +67972,7 @@ function _De(e, t, n) {
title: "内容标签",
kind: "online",
active: t.tags.some((e) => a.has(e.value)),
- body: /* @__PURE__ */ (0, F.jsx)(B1, {
+ body: /* @__PURE__ */ (0, F.jsx)(V1, {
rows: t.tags,
host: e,
selected: a,
@@ -67872,25 +67981,25 @@ function _De(e, t, n) {
} : null
];
}
-function L1(e, t) {
+function R1(e, t) {
let n = null;
try {
n = sessionStorage.getItem(`peach.sidebar.group.${e}`);
} catch {}
return n === null ? t : n === "open";
}
-function vDe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
- let o = (0, P.useRef)(null), s = (0, P.useRef)(null), [c, l] = (0, P.useState)(() => L1(e, n)), u = (0, P.useRef)(!1);
+function PDe({ title: e, kind: t, active: n, index: r, epoch: i, children: a }) {
+ let o = (0, P.useRef)(null), s = (0, P.useRef)(null), [c, l] = (0, P.useState)(() => R1(e, n)), u = (0, P.useRef)(!1);
(0, P.useLayoutEffect)(() => {
let t = o.current, r = s.current;
if (!t || !r) return;
- let i = u.current ? L1(e, n) : c;
+ let i = u.current ? R1(e, n) : c;
u.current = !0, t.open !== i && (t.open = i, r.inert = !i, r.style.height = "", r.classList.contains("ui-fcollapse") && r.classList.toggle("ui-fcollapse-settled", i), l(i));
}, [i]);
let d = (t) => {
if (t?.preventDefault(), !o.current || !s.current) return;
let n = !c;
- xo(o.current, s.current, n), l(n);
+ Io(o.current, s.current, n), l(n);
try {
sessionStorage.setItem(`peach.sidebar.group.${e}`, n ? "open" : "closed");
} catch {}
@@ -67905,7 +68014,7 @@ function vDe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
"aria-expanded": c,
"aria-controls": f,
onClick: d,
- children: [/* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-right" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e })]
+ children: [/* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-right" }), /* @__PURE__ */ (0, F.jsx)("span", { children: e })]
}), /* @__PURE__ */ (0, F.jsx)("div", {
ref: s,
"data-sidebar-collapse": "",
@@ -67916,7 +68025,7 @@ function vDe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
children: /* @__PURE__ */ (0, F.jsx)("div", {
"data-sidebar-body": "",
id: `sidebar-group-${encodeURIComponent(e)}`,
- children: /* @__PURE__ */ (0, F.jsx)(R1.Provider, {
+ children: /* @__PURE__ */ (0, F.jsx)(z1.Provider, {
value: d,
children: a
})
@@ -67925,15 +68034,15 @@ function vDe({ title: e, kind: t, active: n, index: r, epoch: i, children: a })
})]
});
}
-var R1 = (0, P.createContext)(() => {});
-function yDe({ dot: e }) {
- return e ? e.kind === "glyph" ? /* @__PURE__ */ (0, F.jsx)(gP, { name: e.name }) : e.kind === "image" ? /* @__PURE__ */ (0, F.jsx)("img", {
+var z1 = (0, P.createContext)(() => {});
+function FDe({ dot: e }) {
+ return e ? e.kind === "glyph" ? /* @__PURE__ */ (0, F.jsx)(CP, { name: e.name }) : e.kind === "image" ? /* @__PURE__ */ (0, F.jsx)("img", {
"data-sidebar-source-icon": "",
src: e.src,
alt: ""
}) : /* @__PURE__ */ (0, F.jsx)("i", { "data-sidebar-cost": e.cost }) : null;
}
-function z1({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a, onToggle: o = a.toggleChip }) {
+function B1({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a, onToggle: o = a.toggleChip }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-sidebar-chips": "",
children: e.map((e) => {
@@ -67950,7 +68059,7 @@ function z1({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a,
title: e.offline || e.label,
onClick: () => o(t, e.value, n),
children: [
- /* @__PURE__ */ (0, F.jsx)(yDe, { dot: e.dot }),
+ /* @__PURE__ */ (0, F.jsx)(FDe, { dot: e.dot }),
/* @__PURE__ */ (0, F.jsx)("span", {
"data-sidebar-chip-label": "",
children: e.label
@@ -67965,8 +68074,8 @@ function z1({ rows: e, filterKey: t, multi: n, selected: r, counts: i, host: a,
})
});
}
-function bDe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: c, expandable: l }) {
- let u = (0, P.useContext)(R1), [d, f] = (0, P.useState)(null), [p, m] = (0, P.useState)(e);
+function IDe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, selected: o, counts: s, host: c, expandable: l }) {
+ let u = (0, P.useContext)(z1), [d, f] = (0, P.useState)(null), [p, m] = (0, P.useState)(e);
p !== e && (m(e), f(null));
let h = (0, P.useRef)(null), g = (0, P.useRef)(null), _ = !!d?.all, v = d ? d.rows : n;
return (0, P.useLayoutEffect)(() => {
@@ -67978,10 +68087,10 @@ function bDe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, s
};
if (_) {
let t = e.body.closest("details");
- e.body.classList.add("ui-fcollapse"), To(e.body, e.before, () => !!t?.open && !e.body.inert);
+ e.body.classList.add("ui-fcollapse"), Bo(e.body, e.before, () => !!t?.open && !e.body.inert);
}
t(), requestAnimationFrame(t);
- }, [d, _]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(z1, {
+ }, [d, _]), /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(B1, {
rows: _ ? v : v.slice(0, i),
filterKey: a,
multi: !1,
@@ -68006,10 +68115,10 @@ function bDe({ epoch: e, title: t, rows: n, latest: r, limit: i, filterKey: a, s
all: !_
}), _ && u());
},
- children: /* @__PURE__ */ (0, F.jsx)(gP, { name: "chevron-down" })
+ children: /* @__PURE__ */ (0, F.jsx)(CP, { name: "chevron-down" })
}) : null] });
}
-function B1({ rows: e, host: t, selected: n, badges: r }) {
+function V1({ rows: e, host: t, selected: n, badges: r }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-sidebar-chips": "",
children: e.map((e) => /* @__PURE__ */ (0, F.jsxs)("button", {
@@ -68031,10 +68140,10 @@ function B1({ rows: e, host: t, selected: n, badges: r }) {
}, e.value))
});
}
-var V1 = (e, t) => e ? Math.min(j1, Number(e) / 60) : t;
-function H1({ host: e, filters: t, commit: n = e.setDuration }) {
- let r = `${t.dur_min ?? ""}:${t.dur_max ?? ""}`, [i, a] = (0, P.useState)(r), [o, s] = (0, P.useState)(() => [V1(t.dur_min, 0), V1(t.dur_max, j1)]), [c, l] = (0, P.useState)("max");
- i !== r && (a(r), s([V1(t.dur_min, 0), V1(t.dur_max, j1)]));
+var H1 = (e, t) => e ? Math.min(M1, Number(e) / 60) : t;
+function U1({ host: e, filters: t, commit: n = e.setDuration }) {
+ let r = `${t.dur_min ?? ""}:${t.dur_max ?? ""}`, [i, a] = (0, P.useState)(r), [o, s] = (0, P.useState)(() => [H1(t.dur_min, 0), H1(t.dur_max, M1)]), [c, l] = (0, P.useState)("max");
+ i !== r && (a(r), s([H1(t.dur_min, 0), H1(t.dur_max, M1)]));
let [u, d] = o, f = (0, P.useRef)(null), p = (0, P.useRef)(null), m = (0, P.useRef)(null), h = (0, P.useRef)(o);
h.current = o;
let g = (e, t) => {
@@ -68047,11 +68156,11 @@ function H1({ host: e, filters: t, commit: n = e.setDuration }) {
}, [n]), (0, P.useLayoutEffect)(() => {
let e = f.current;
if (!e) return;
- e.style.setProperty("--lo", `${u / j1 * 100}%`), e.style.setProperty("--hi", `${d / j1 * 100}%`);
+ e.style.setProperty("--lo", `${u / M1 * 100}%`), e.style.setProperty("--hi", `${d / M1 * 100}%`);
let t = e.getBoundingClientRect();
e.querySelectorAll("[data-sidebar-range-tip]").forEach((e) => {
let n = e.dataset.rangeEnd === "max" ? d : u;
- e.style.left = `${n / j1 * 100}%`, e.style.setProperty("--range-tip-shift", "0px");
+ e.style.left = `${n / M1 * 100}%`, e.style.setProperty("--range-tip-shift", "0px");
let r = e.getBoundingClientRect(), i = r.right > t.right ? t.right - r.right : r.left < t.left ? t.left - r.left : 0;
i && e.style.setProperty("--range-tip-shift", `${Math.round(i)}px`);
});
@@ -68061,7 +68170,7 @@ function H1({ host: e, filters: t, commit: n = e.setDuration }) {
"data-range-end": e,
"data-range-active": c === e ? "" : void 0,
"aria-hidden": "true",
- children: e === "max" && t >= j1 ? "不限" : `${t} 分钟`
+ children: e === "max" && t >= M1 ? "不限" : `${t} 分钟`
});
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-sidebar-duration": "",
@@ -68076,7 +68185,7 @@ function H1({ host: e, filters: t, commit: n = e.setDuration }) {
id: "durMin",
type: "range",
min: "0",
- max: j1,
+ max: M1,
step: "5",
value: u,
"aria-label": "最短时长(分钟)",
@@ -68087,7 +68196,7 @@ function H1({ host: e, filters: t, commit: n = e.setDuration }) {
id: "durMax",
type: "range",
min: "0",
- max: j1,
+ max: M1,
step: "5",
value: d,
"aria-label": "最长时长(分钟)",
@@ -68101,8 +68210,8 @@ function H1({ host: e, filters: t, commit: n = e.setDuration }) {
});
}
// src/diagnostics-skeleton.ts
-function U1() {
- let e = (e) => ls({
+function W1() {
+ let e = (e) => ws({
label: e,
variant: "secondary",
attrs: "disabled data-skeleton-action"
@@ -68115,11 +68224,11 @@ function U1() {
</div></div>`;
}
// src/react/settings/library-policy-copy.ts
-var W1 = "每个媒体库都先读本地 NFO 和同目录图片;处理方式只决定要不要联网补全。", xDe = [
+var G1 = "每个媒体库都先读本地 NFO 和同目录图片;处理方式只决定要不要联网补全。", LDe = [
"自动补全",
"仅使用本地资料",
"自定义"
-], SDe = [
+], RDe = [
[
"读本地 NFO 和图片",
"✓",
@@ -68150,7 +68259,7 @@ var W1 = "每个媒体库都先读本地 NFO 和同目录图片;处理方式
"—",
"可选"
]
-], CDe = "本地只有竖版海报时:自动补全会联网找完整封套(FC2 商品图除外),仅使用本地资料直接用竖版。", G1 = "一个媒体库可以有多个文件夹,作品合在一起显示,共用名称、颜色和处理方式;要分开显示或分开设置时再添加媒体库。", K1 = "JavDB 或 MISSAV 打不开时,填一个能打开的镜像域名。", q1 = "只填域名,留空用默认地址", wDe = [
+], zDe = "本地只有竖版海报时:自动补全会联网找完整封套(FC2 商品图除外),仅使用本地资料直接用竖版。", K1 = "一个媒体库可以有多个文件夹,作品合在一起显示,共用名称、颜色和处理方式;要分开显示或分开设置时再添加媒体库。", q1 = "JavDB 或 MISSAV 打不开时,填一个能打开的镜像域名。", J1 = "只填域名,留空用默认地址", BDe = [
{
provider: "coomer",
label: "Coomer",
@@ -68240,8 +68349,8 @@ var W1 = "每个媒体库都先读本地 NFO 和同目录图片;处理方式
label: "SubscribeStar",
requirement: "none"
}
-], J1 = "API 代理用于列目录和查询文件信息,数据代理用于读取视频及配套文件。保存后,同一网盘账号在 CloudDrive 中的其他读取也会使用此设置。", TDe = "peach.configuration.shape.v1";
-function Y1() {
+], Y1 = "API 代理用于列目录和查询文件信息,数据代理用于读取视频及配套文件。保存后,同一网盘账号在 CloudDrive 中的其他读取也会使用此设置。", VDe = "peach.configuration.shape.v1";
+function X1() {
try {
let e = JSON.parse(localStorage.getItem("peach.configuration.shape.v1") || "{}");
return e && typeof e == "object" ? e : {};
@@ -68249,28 +68358,28 @@ function Y1() {
return {};
}
}
-function EDe(e, t) {
+function HDe(e, t) {
try {
- let n = Y1();
+ let n = X1();
if (JSON.stringify(n[e]) === JSON.stringify(t)) return;
- localStorage.setItem(TDe, JSON.stringify({
+ localStorage.setItem(VDe, JSON.stringify({
...n,
[e]: t
}));
} catch {}
}
-var X1 = (e) => Y1()[e], Z1 = (e) => e === !0, Q1 = (e, t) => Number.isInteger(e) && e > 0 ? Math.min(e, t) : 0, $1 = (e, t, n) => Array.isArray(e) ? e.slice(0, t).map(n) : [], e0 = "disabled data-skeleton-action", t0 = (e = "60%") => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, n0 = (e = "100%") => `<span class="skeleton ui-configuration-skeleton-input" style="width:${e}"></span>`, r0 = (e, t) => `<span class="skeleton shrink-0" style="width:${e};height:${t}"></span>`, i0 = (e = "3em") => r0(e, "24px"), a0 = () => r0("var(--icon-inline)", "var(--icon-inline)"), o0 = (e, t = "primary", n = "medium") => ls({
+var Z1 = (e) => X1()[e], Q1 = (e) => e === !0, $1 = (e, t) => Number.isInteger(e) && e > 0 ? Math.min(e, t) : 0, e0 = (e, t, n) => Array.isArray(e) ? e.slice(0, t).map(n) : [], t0 = "disabled data-skeleton-action", n0 = (e = "60%") => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, r0 = (e = "100%") => `<span class="skeleton ui-configuration-skeleton-input" style="width:${e}"></span>`, i0 = (e, t) => `<span class="skeleton shrink-0" style="width:${e};height:${t}"></span>`, a0 = (e = "3em") => i0(e, "24px"), o0 = () => i0("var(--icon-inline)", "var(--icon-inline)"), s0 = (e, t = "primary", n = "medium") => ws({
label: e,
variant: t,
size: n,
- attrs: e0
-}), s0 = (e, t = "") => `<div class="-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">${t ? `<div class="mr-auto min-w-0 text-body-2-regular text-text-secondary">${t}</div>` : ""}${e}</div>`, c0 = (e, t = !1) => `<div class="flex flex-col gap-4 ${t ? "border-t border-separator-border " : ""}py-4 pr-3">${e}</div>`, DDe = (e, t, n) => {
- let r = `<p class="w-full px-3 text-body-2-medium text-text-secondary">${n ? `<span class="inline-flex items-center gap-1.5">${a0()}${e}</span>` : e}</p>`;
+ attrs: t0
+}), c0 = (e, t = "") => `<div class="-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">${t ? `<div class="mr-auto min-w-0 text-body-2-regular text-text-secondary">${t}</div>` : ""}${e}</div>`, l0 = (e, t = !1) => `<div class="flex flex-col gap-4 ${t ? "border-t border-separator-border " : ""}py-4 pr-3">${e}</div>`, UDe = (e, t, n) => {
+ let r = `<p class="w-full px-3 text-body-2-medium text-text-secondary">${n ? `<span class="inline-flex items-center gap-1.5">${o0()}${e}</span>` : e}</p>`;
return t ? `<div class="flex w-full flex-wrap items-center justify-between gap-2"><div class="min-w-40 flex-1">${r}</div><div class="flex min-w-0 max-w-full">${t}</div></div>` : r;
-}, l0 = (e, t, n = "", { aside: r = "", status: i = "", mark: a = !1 } = {}) => `<section aria-label="${e}" class="flex w-full flex-col gap-2 wrap-anywhere">${DDe(e, r, a)}<div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${t}${n ? s0(n, i) : ""}</div></section>`, u0 = (e, t, n) => `<div class="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"><div class="flex min-w-0 flex-col"><p class="text-body-regular text-text-primary">${e}</p>${t ? `<p class="text-body-2-regular text-text-secondary">${t}</p>` : ""}</div>${n}</div>`, d0 = (e, t = "", n = "ui-configuration-skeleton-toggle") => u0(e, t, `<span class="skeleton ${n}"></span>`), f0 = (e, t = "4em") => u0(e, "", t0(t)), p0 = (e) => `<p class="text-body-2-regular text-text-secondary">${e}</p>`, m0 = (e) => `<p class="text-body-medium text-text-primary">${e}</p>`, h0 = (e, t = "") => `<div class="flex w-full flex-col items-start gap-1"><span class="flex items-center gap-0.5 text-body-medium text-text-primary">${e}</span>${n0()}${t ? `<span class="pt-px text-caption-1-medium text-text-secondary">${t}</span>` : ""}</div>`, g0 = (e) => `<div class="flex flex-col gap-1">${m0(e)}${ds(t0("8em"))}</div>`, _0 = (e) => `<span class="flex items-center gap-2 text-body-regular text-text-primary">${r0("16px", "16px")}${e}</span>`, v0 = (e) => `<span class="inline-flex items-center gap-1">${a0()}${e}</span>`, y0 = (e, t = !1) => `<span class="flex w-fit items-center gap-1 text-body-2-medium text-text-secondary">${os("chevron-right", `size-(--icon-inline) shrink-0${t ? " rotate-90" : ""}`)}${e}</span>`, ODe = /* @__PURE__ */ new Set(["FFmpeg", "untrunc"]), b0 = (e) => `<dl class="ui-settings-facts flex flex-col">${e.map((e) => `<div class="flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0"><dt class="flex max-w-1/2 min-w-0 shrink-0 items-center gap-2 text-body-regular text-text-secondary">${e}</dt><dd class="flex min-w-0 flex-wrap items-center justify-end gap-2 text-body-regular text-text-primary">${ODe.has(e) ? t0("100%") + t0("80%") + t0("6em") : t0("6em")}</dd></div>`).join("")}</dl>`, kDe = wDe;
-function ADe(e = X1("credentials")) {
- let t = new Set($1(e?.done, 64, String));
- return kDe.map((e) => {
+}, u0 = (e, t, n = "", { aside: r = "", status: i = "", mark: a = !1 } = {}) => `<section aria-label="${e}" class="flex w-full flex-col gap-2 wrap-anywhere">${UDe(e, r, a)}<div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${t}${n ? c0(n, i) : ""}</div></section>`, d0 = (e, t, n) => `<div class="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"><div class="flex min-w-0 flex-col"><p class="text-body-regular text-text-primary">${e}</p>${t ? `<p class="text-body-2-regular text-text-secondary">${t}</p>` : ""}</div>${n}</div>`, f0 = (e, t = "", n = "ui-configuration-skeleton-toggle") => d0(e, t, `<span class="skeleton ${n}"></span>`), p0 = (e, t = "4em") => d0(e, "", n0(t)), m0 = (e) => `<p class="text-body-2-regular text-text-secondary">${e}</p>`, h0 = (e) => `<p class="text-body-medium text-text-primary">${e}</p>`, g0 = (e, t = "") => `<div class="flex w-full flex-col items-start gap-1"><span class="flex items-center gap-0.5 text-body-medium text-text-primary">${e}</span>${r0()}${t ? `<span class="pt-px text-caption-1-medium text-text-secondary">${t}</span>` : ""}</div>`, _0 = (e) => `<div class="flex flex-col gap-1">${h0(e)}${Es(n0("8em"))}</div>`, v0 = (e) => `<span class="flex items-center gap-2 text-body-regular text-text-primary">${i0("16px", "16px")}${e}</span>`, y0 = (e) => `<span class="inline-flex items-center gap-1">${o0()}${e}</span>`, b0 = (e, t = !1) => `<span class="flex w-fit items-center gap-1 text-body-2-medium text-text-secondary">${xs("chevron-right", `size-(--icon-inline) shrink-0${t ? " rotate-90" : ""}`)}${e}</span>`, WDe = /* @__PURE__ */ new Set(["FFmpeg", "untrunc"]), x0 = (e) => `<dl class="ui-settings-facts flex flex-col">${e.map((e) => `<div class="flex min-h-11 items-center justify-between gap-4 border-b border-separator-border py-2.5 pr-3 last:border-b-0"><dt class="flex max-w-1/2 min-w-0 shrink-0 items-center gap-2 text-body-regular text-text-secondary">${e}</dt><dd class="flex min-w-0 flex-wrap items-center justify-end gap-2 text-body-regular text-text-primary">${WDe.has(e) ? n0("100%") + n0("80%") + n0("6em") : n0("6em")}</dd></div>`).join("")}</dl>`, GDe = BDe;
+function KDe(e = Z1("credentials")) {
+ let t = new Set(e0(e?.done, 64, String));
+ return GDe.map((e) => {
let n = t.has(e.provider);
return {
...e,
@@ -68279,131 +68388,131 @@ function ADe(e = X1("credentials")) {
};
});
}
-function jDe(e) {
- let t = e.fields ?? [], n = e.requirement !== "none" && e.requirement !== "blocked", r = i0() + (n && !e.done ? t.map(() => i0("4.5em")).join("") : ""), i = `<span class="flex min-w-0 flex-wrap items-center gap-2">${r0("14px", "14px")}<b class="min-w-0 text-body-medium wrap-anywhere text-text-primary">${z(e.label)}</b>${r}</span>`;
- if (!n) return `<div class="flex flex-wrap items-center gap-3 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4">${i}${e.requirement === "blocked" && e.why ? p0(z(e.why)) : ""}</div>`;
- let a = e.open ? "<div class=\"flex flex-col gap-2 pt-3\"><div class=\"flex flex-col gap-3\">" + p0(`${z(e.why ?? "")}${e.where ? " 获取凭据" : ""}`) + (e.howto ? p0(z(e.howto)) : "") + `<div class="flex w-full flex-col gap-3">${t.map((e) => h0(z(e))).join("")}</div><div class="flex flex-wrap items-center gap-2">${o0("保存配置")}</div>${y0("凭据文件")}</div></div>` : "";
- return `<div class="flex flex-col gap-2 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4">${i}<div>${y0(e.done ? "修改凭据" : "填写凭据", e.open)}${a}</div></div>`;
+function qDe(e) {
+ let t = e.fields ?? [], n = e.requirement !== "none" && e.requirement !== "blocked", r = a0() + (n && !e.done ? t.map(() => a0("4.5em")).join("") : ""), i = `<span class="flex min-w-0 flex-wrap items-center gap-2">${i0("14px", "14px")}<b class="min-w-0 text-body-medium wrap-anywhere text-text-primary">${z(e.label)}</b>${r}</span>`;
+ if (!n) return `<div class="flex flex-wrap items-center gap-3 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4">${i}${e.requirement === "blocked" && e.why ? m0(z(e.why)) : ""}</div>`;
+ let a = e.open ? "<div class=\"flex flex-col gap-2 pt-3\"><div class=\"flex flex-col gap-3\">" + m0(`${z(e.why ?? "")}${e.where ? " 获取凭据" : ""}`) + (e.howto ? m0(z(e.howto)) : "") + `<div class="flex w-full flex-col gap-3">${t.map((e) => g0(z(e))).join("")}</div><div class="flex flex-wrap items-center gap-2">${s0("保存配置")}</div>${b0("凭据文件")}</div></div>` : "";
+ return `<div class="flex flex-col gap-2 border-b border-separator-border px-6 py-5 last:border-b-0 max-sm:px-4">${i}<div>${b0(e.done ? "修改凭据" : "填写凭据", e.open)}${a}</div></div>`;
}
-function x0() {
- let e = ADe(), t = e.filter((e) => e.requirement === "required" && !e.done).length;
- return l0("来源凭据", c0(`<div class="flex flex-col gap-4">${[
+function S0() {
+ let e = KDe(), t = e.filter((e) => e.requirement === "required" && !e.done).length;
+ return u0("来源凭据", l0(`<div class="flex flex-col gap-4">${[
["可配置凭据", e.filter((e) => e.requirement !== "none" && e.requirement !== "blocked")],
["不需要凭据", e.filter((e) => e.requirement === "none")],
["暂不支持", e.filter((e) => e.requirement === "blocked")]
- ].filter(([, e]) => e.length).map(([e, t]) => `<div class="flex flex-col gap-2"><h4 class="text-body-medium text-text-secondary">${e}</h4><div class="min-w-0 border border-separator-border bg-background-primary-default rounded-surface flex flex-col overflow-hidden">${t.map(jDe).join("")}</div></div>`).join("")}</div>`), "", { aside: t ? t0("5em") : "" });
-}
-function S0() {
- let e = $1(X1("indexers")?.open, 20, Z1).map((e) => `<div class="min-w-0 border-t border-separator-border pt-2"><span class="flex w-full min-w-0 items-center gap-1 text-body-2-medium">${os("chevron-right", `size-(--icon-inline) shrink-0 text-text-secondary${e ? " rotate-90" : ""}`)}${t0("6em")}${t0("12em")}</span>` + (e ? `<div class="flex flex-col gap-2 pt-3"><div class="flex min-w-0 flex-col gap-4">${h0("名称")}${h0("Torznab 地址")}${h0("API key")}<div class="flex flex-wrap items-center gap-x-6 gap-y-2">${_0("启用")}${o0("移除", "secondary", "small")}</div></div></div>` : "") + "</div>").join("");
- return l0("资源搜索", c0(`<div class="flex min-w-0 flex-col gap-4">${y0("索引器连接帮助")}${e}</div>`), o0("添加索引器", "secondary") + o0("保存配置"));
+ ].filter(([, e]) => e.length).map(([e, t]) => `<div class="flex flex-col gap-2"><h4 class="text-body-medium text-text-secondary">${e}</h4><div class="min-w-0 border border-separator-border bg-background-primary-default rounded-surface flex flex-col overflow-hidden">${t.map(qDe).join("")}</div></div>`).join("")}</div>`), "", { aside: t ? n0("5em") : "" });
}
function C0() {
- let e = X1("javBrowser"), t = Z1(e?.enabled);
- return l0("浏览器添加 JAV", c0(`<div class="flex min-w-0 flex-col gap-4">${`<div class="min-w-0 bg-background-primary-default rounded-2xl shadow-card p-5 border border-border-button-default flex flex-col gap-3"><div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-medium text-text-primary">Peach 用户脚本</span>${t0("4em")}</div><div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-regular text-text-secondary">浏览器添加</span>${i0()}</div><p class="text-caption-1-regular text-text-secondary">${t0("70%")}</p><div class="flex flex-wrap items-center gap-2">${o0("重新检测", "secondary")}</div></div>`}${g0("浏览器添加的下载渠道")}${Z1(e?.ready) ? "" : p0("请在媒体库中添加支持云下载的网盘,并配置账号与目标目录。")}${h0("Peach 地址")}</div>`), (t ? o0("关闭浏览器添加", "secondary") : "") + o0(t ? "更新渠道与令牌" : "启用并生成令牌"));
+ let e = e0(Z1("indexers")?.open, 20, Q1).map((e) => `<div class="min-w-0 border-t border-separator-border pt-2"><span class="flex w-full min-w-0 items-center gap-1 text-body-2-medium">${xs("chevron-right", `size-(--icon-inline) shrink-0 text-text-secondary${e ? " rotate-90" : ""}`)}${n0("6em")}${n0("12em")}</span>` + (e ? `<div class="flex flex-col gap-2 pt-3"><div class="flex min-w-0 flex-col gap-4">${g0("名称")}${g0("Torznab 地址")}${g0("API key")}<div class="flex flex-wrap items-center gap-x-6 gap-y-2">${v0("启用")}${s0("移除", "secondary", "small")}</div></div></div>` : "") + "</div>").join("");
+ return u0("资源搜索", l0(`<div class="flex min-w-0 flex-col gap-4">${b0("索引器连接帮助")}${e}</div>`), s0("添加索引器", "secondary") + s0("保存配置"));
+}
+function w0() {
+ let e = Z1("javBrowser"), t = Q1(e?.enabled);
+ return u0("浏览器添加 JAV", l0(`<div class="flex min-w-0 flex-col gap-4">${`<div class="min-w-0 bg-background-primary-default rounded-2xl shadow-card p-5 border border-border-button-default flex flex-col gap-3"><div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-medium text-text-primary">Peach 用户脚本</span>${n0("4em")}</div><div class="flex flex-wrap items-center justify-between gap-3"><span class="text-body-regular text-text-secondary">浏览器添加</span>${a0()}</div><p class="text-caption-1-regular text-text-secondary">${n0("70%")}</p><div class="flex flex-wrap items-center gap-2">${s0("重新检测", "secondary")}</div></div>`}${_0("浏览器添加的下载渠道")}${Q1(e?.ready) ? "" : m0("请在媒体库中添加支持云下载的网盘,并配置账号与目标目录。")}${g0("Peach 地址")}</div>`), (t ? s0("关闭浏览器添加", "secondary") : "") + s0(t ? "更新渠道与令牌" : "启用并生成令牌"));
}
-var w0 = (e, t) => `<div class="flex min-w-0 flex-col gap-3">${m0(e)}${ds(t0("6em"))}` + (t ? `<div class="flex flex-wrap gap-3"><div class="min-w-40 flex-1">${h0(`${e}地址`)}</div><div class="w-full sm:w-28">${h0(`${e}端口`)}</div></div>${y0("代理认证")}` : "") + "</div>";
-function T0() {
- let e = X1("cloudProxy"), t = $1(e?.accounts, 12, (e) => Array.isArray(e) ? [Z1(e[0]), Z1(e[1])] : [!1, !1]), n = Q1(e?.unlinked, 12), r = t.length || n ? Array.from({ length: n }, () => `<div class="flex min-w-0 flex-col gap-1">${m0(v0(t0("6em")))}${p0(t0("9em"))}</div>`).join("") + t.map(([e, t]) => `<div class="flex min-w-0 flex-col gap-4 border-t border-separator-border pt-4">${m0(v0(t0("8em")))}${p0(t0("50%"))}${w0("数据代理", e)}${w0("API 代理", t)}<div class="flex justify-end">${o0("保存配置")}</div></div>`).join("") : p0(t0("60%"));
- return l0("CloudDrive 代理", c0(`${p0(J1)}<div class="flex min-w-0 flex-col gap-4">${r}</div>`), o0("重新读取", "secondary"));
+var T0 = (e, t) => `<div class="flex min-w-0 flex-col gap-3">${h0(e)}${Es(n0("6em"))}` + (t ? `<div class="flex flex-wrap gap-3"><div class="min-w-40 flex-1">${g0(`${e}地址`)}</div><div class="w-full sm:w-28">${g0(`${e}端口`)}</div></div>${b0("代理认证")}` : "") + "</div>";
+function E0() {
+ let e = Z1("cloudProxy"), t = e0(e?.accounts, 12, (e) => Array.isArray(e) ? [Q1(e[0]), Q1(e[1])] : [!1, !1]), n = $1(e?.unlinked, 12), r = t.length || n ? Array.from({ length: n }, () => `<div class="flex min-w-0 flex-col gap-1">${h0(y0(n0("6em")))}${m0(n0("9em"))}</div>`).join("") + t.map(([e, t]) => `<div class="flex min-w-0 flex-col gap-4 border-t border-separator-border pt-4">${h0(y0(n0("8em")))}${m0(n0("50%"))}${T0("数据代理", e)}${T0("API 代理", t)}<div class="flex justify-end">${s0("保存配置")}</div></div>`).join("") : m0(n0("60%"));
+ return u0("CloudDrive 代理", l0(`${m0(Y1)}<div class="flex min-w-0 flex-col gap-4">${r}</div>`), s0("重新读取", "secondary"));
}
-var E0 = (e, t, n) => `<div class="flex min-w-0 flex-col gap-1 ${n}"><span class="flex items-center gap-0.5 text-body-medium text-text-primary" aria-hidden="true">${e}</span>${t}</div>`, MDe = (e) => `<div data-folder-row class="@container flex flex-col gap-2 rounded-2lg border border-separator-border bg-background-primary-default p-3">
- <div class="flex items-start gap-2"><span class="min-w-0 flex-1">${n0()}</span>${ls({
+var D0 = (e, t, n) => `<div class="flex min-w-0 flex-col gap-1 ${n}"><span class="flex items-center gap-0.5 text-body-medium text-text-primary" aria-hidden="true">${e}</span>${t}</div>`, JDe = (e) => `<div data-folder-row class="@container flex flex-col gap-2 rounded-2lg border border-separator-border bg-background-primary-default p-3">
+ <div class="flex items-start gap-2"><span class="min-w-0 flex-1">${r0()}</span>${ws({
glyph: "folder-search",
variant: "secondary",
- attrs: e0
+ attrs: t0
})}</div>
- <div class="flex flex-wrap items-end gap-2"><div class="flex w-full flex-wrap items-start gap-2">${E0("来源", ds(t0("6em")), "w-full @lg:w-60")}${E0("读取策略", ds(t0("4em")), "w-full @lg:w-32")}${e > 1 ? E0("移到媒体库", ds(t0("4em")), "w-full @lg:w-48") : ""}</div></div>
- </div>`, NDe = (e, t) => `<div data-library-block class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col p-2">
- <div data-library-head>${ls({
+ <div class="flex flex-wrap items-end gap-2"><div class="flex w-full flex-wrap items-start gap-2">${D0("来源", Es(n0("6em")), "w-full @lg:w-60")}${D0("读取策略", Es(n0("4em")), "w-full @lg:w-32")}${e > 1 ? D0("移到媒体库", Es(n0("4em")), "w-full @lg:w-48") : ""}</div></div>
+ </div>`, YDe = (e, t) => `<div data-library-block class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col p-2">
+ <div data-library-head>${ws({
label: "自动识别",
variant: "secondary",
- attrs: e0
-})}${n0()}<span class="skeleton ui-configuration-skeleton-input" style="width:136px"></span>${ds(t0("4em"), { prefix: "处理方式" })}</div>
- <div data-library-folders>${MDe(t).repeat(e)}<div class="flex">${ls({
+ attrs: t0
+})}${r0()}<span class="skeleton ui-configuration-skeleton-input" style="width:136px"></span>${Es(n0("4em"), { prefix: "处理方式" })}</div>
+ <div data-library-folders>${JDe(t).repeat(e)}<div class="flex">${ws({
label: "添加文件夹",
variant: "secondary",
- attrs: e0
-})}</div></div></div>`, PDe = `<div data-policy-legend class="flex flex-col gap-1"><p class="text-body-2-regular text-text-secondary">${W1}</p><span class="flex items-center gap-1 text-body-2-medium text-text-secondary">三种处理方式对比</span></div>`, FDe = "<p class=\"text-body-2-regular text-text-secondary\">读取策略选「代理保护」时,会限制自动读取视频。</p><div class=\"flex flex-col gap-3\"><span class=\"flex items-center gap-1 text-body-2-medium text-text-secondary\">CloudDrive 设置帮助</span></div>";
-function IDe(e = X1("media")) {
- let t = $1(e?.folders, 12, (e) => Q1(e, 50)).filter(Boolean);
+ attrs: t0
+})}</div></div></div>`, XDe = `<div data-policy-legend class="flex flex-col gap-1"><p class="text-body-2-regular text-text-secondary">${G1}</p><span class="flex items-center gap-1 text-body-2-medium text-text-secondary">三种处理方式对比</span></div>`, ZDe = "<p class=\"text-body-2-regular text-text-secondary\">读取策略选「代理保护」时,会限制自动读取视频。</p><div class=\"flex flex-col gap-3\"><span class=\"flex items-center gap-1 text-body-2-medium text-text-secondary\">CloudDrive 设置帮助</span></div>";
+function QDe(e = Z1("media")) {
+ let t = e0(e?.folders, 12, (e) => $1(e, 50)).filter(Boolean);
return t.length ? {
folders: t,
- cloud: Z1(e?.cloud)
+ cloud: Q1(e?.cloud)
} : {
folders: [1],
cloud: !1
};
}
-function LDe() {
- let e = X1("discovery"), t = Z1(e?.enabled), n = t && Z1(e?.cloud), r = n && Z1(e?.webhook), i = `<div class="flex items-start gap-2"><span class="min-w-0 flex-1">${n0()}</span>${ds(t0("4em"), { prefix: "对应目录" })}${ls({
+function $De() {
+ let e = Z1("discovery"), t = Q1(e?.enabled), n = t && Q1(e?.cloud), r = n && Q1(e?.webhook), i = `<div class="flex items-start gap-2"><span class="min-w-0 flex-1">${r0()}</span>${Es(n0("4em"), { prefix: "对应目录" })}${ws({
glyph: "trash",
variant: "secondary",
- attrs: e0
+ attrs: t0
})}</div>`;
- return l0("自动发现新文件", c0(`<div class="flex flex-wrap items-center gap-2"><span class="text-body-regular text-text-secondary">本机监视</span>${i0()}</div>`) + d0("发现新文件后自动入库", t ? t0("10em") : "") + d0("监视本机文件夹", t && Z1(e?.watchLocal) ? t0("12em") : "") + d0("接收 CloudDrive2 通知") + (n ? u0("Webhook 配置", t0("20em"), "") : "") + (r ? c0(y0("查看配置"), !0) : "") + (n ? c0(`<div class="flex flex-col gap-3">${m0("云端路径前缀")}<div class="flex flex-col gap-3">${i.repeat(Q1(e?.prefixes, 20))}</div><div>${o0("添加前缀", "secondary")}</div></div>`, !0) : ""), (r ? o0("更换密钥", "secondary") : "") + o0("保存配置"));
-}
-var RDe = () => {
- let e = IDe();
- return l0("媒体库与目录", c0(`${PDe}<div class="flex flex-col gap-4">${e.folders.map((t) => NDe(t, e.folders.length)).join("")}</div>
- <div class="self-start">${o0("添加媒体库", "secondary")}</div>
- <p class="text-body-2-regular text-text-secondary">${G1}</p>
- ${e.cloud ? FDe : ""}<span class="text-body-medium text-text-primary">${t0("15em")}</span>`), o0("保存配置"), { status: "保存后 Peach 会重新启动。" }) + (e.cloud ? T0() : "") + LDe() + l0("番号识别规则", c0(`${t0("90%")}${t0("60%")}<span class="skeleton ui-configuration-skeleton-input" style="width:100%;height:88px"></span>`), o0("保存配置")) + l0("视频预览", d0("生成视频预览", "为本地视频生成九宫格与时间轴预览;关闭后仍按入库规则探测时长与分辨率。") + d0("时间轴预览", "按所选间隔抽帧,仅处理本机磁盘上的视频。", "ui-configuration-skeleton-select") + d0("抽帧解码方式", "用于生成封面、九宫格和时间轴。", "ui-configuration-skeleton-select"));
-}, zDe = () => `<div>${o0("采集来源与登录状态", "secondary")}</div>` + x0() + l0("关注采集", u0("自动检查更新", "", "<span class=\"flex items-center gap-2\"><span class=\"skeleton ui-configuration-skeleton-toggle\"></span><span class=\"skeleton ui-configuration-skeleton-input\" style=\"width:96px\"></span></span>") + f0("订阅源拉取") + d0("首次采集范围", "", "ui-configuration-skeleton-select") + f0("头像刷新") + f0("favicon 刷新")) + S0() + l0("作品资料站点", c0(`<p class="text-body-2-regular text-text-secondary">${K1}</p>${h0(v0("JavDB 地址"), q1)}${h0(v0("MISSAV 地址"), q1)}`), o0("保存配置")), BDe = () => {
- let e = X1("downloads"), t = Z1(e?.pikpak), n = Z1(e?.pikpakRoots) ? g0(v0("PikPak 根目录对应的媒体目录")) : `<div class="flex flex-col gap-1">${m0(v0("PikPak 根目录对应的媒体目录"))}${p0("先在「媒体库与入库」添加 PikPak 挂载文件夹。")}</div>`, r = Z1(e?.cloud) ? l0("云下载", c0(h0("CloudDrive2 地址") + h0("CloudDrive2 API 令牌", "需要离线任务权限。") + (Z1(e?.has115) ? h0(v0("115 目标目录"), "应位于自动入库的云端路径前缀内。") : "") + (t ? h0(v0("PikPak 目标目录"), "目录要已经存在。") + n : "") + h0("等待上限(小时)", t0("14em"))), o0("检查连接", "secondary") + o0("保存配置")) : "", i = Z1(e?.pikpakLoggedIn);
- return r + (t ? l0("PikPak 账号", i ? b0(["账号", t0("4em")]) : c0(h0("账号") + h0("密码") + _0("保存密码,登录过期时自动重新登录")), i ? o0("登出", "secondary") : (Z1(e?.browserLogin) ? o0("用浏览器登录", "secondary") : "") + o0("登录"), {
- aside: i0(),
+ return u0("自动发现新文件", l0(`<div class="flex flex-wrap items-center gap-2"><span class="text-body-regular text-text-secondary">本机监视</span>${a0()}</div>`) + f0("发现新文件后自动入库", t ? n0("10em") : "") + f0("监视本机文件夹", t && Q1(e?.watchLocal) ? n0("12em") : "") + f0("接收 CloudDrive2 通知") + (n ? d0("Webhook 配置", n0("20em"), "") : "") + (r ? l0(b0("查看配置"), !0) : "") + (n ? l0(`<div class="flex flex-col gap-3">${h0("云端路径前缀")}<div class="flex flex-col gap-3">${i.repeat($1(e?.prefixes, 20))}</div><div>${s0("添加前缀", "secondary")}</div></div>`, !0) : ""), (r ? s0("更换密钥", "secondary") : "") + s0("保存配置"));
+}
+var eOe = () => {
+ let e = QDe();
+ return u0("媒体库与目录", l0(`${XDe}<div class="flex flex-col gap-4">${e.folders.map((t) => YDe(t, e.folders.length)).join("")}</div>
+ <div class="self-start">${s0("添加媒体库", "secondary")}</div>
+ <p class="text-body-2-regular text-text-secondary">${K1}</p>
+ ${e.cloud ? ZDe : ""}<span class="text-body-medium text-text-primary">${n0("15em")}</span>`), s0("保存配置"), { status: "保存后 Peach 会重新启动。" }) + (e.cloud ? E0() : "") + $De() + u0("番号识别规则", l0(`${n0("90%")}${n0("60%")}<span class="skeleton ui-configuration-skeleton-input" style="width:100%;height:88px"></span>`), s0("保存配置")) + u0("视频预览", f0("生成视频预览", "为本地视频生成九宫格与时间轴预览;关闭后仍按入库规则探测时长与分辨率。") + f0("时间轴预览", "按所选间隔抽帧,仅处理本机磁盘上的视频。", "ui-configuration-skeleton-select") + f0("抽帧解码方式", "用于生成封面、九宫格和时间轴。", "ui-configuration-skeleton-select"));
+}, tOe = () => `<div>${s0("采集来源与登录状态", "secondary")}</div>` + S0() + u0("关注采集", d0("自动检查更新", "", "<span class=\"flex items-center gap-2\"><span class=\"skeleton ui-configuration-skeleton-toggle\"></span><span class=\"skeleton ui-configuration-skeleton-input\" style=\"width:96px\"></span></span>") + p0("订阅源拉取") + f0("首次采集范围", "", "ui-configuration-skeleton-select") + p0("头像刷新") + p0("favicon 刷新")) + C0() + u0("作品资料站点", l0(`<p class="text-body-2-regular text-text-secondary">${q1}</p>${g0(y0("JavDB 地址"), J1)}${g0(y0("MISSAV 地址"), J1)}`), s0("保存配置")), nOe = () => {
+ let e = Z1("downloads"), t = Q1(e?.pikpak), n = Q1(e?.pikpakRoots) ? _0(y0("PikPak 根目录对应的媒体目录")) : `<div class="flex flex-col gap-1">${h0(y0("PikPak 根目录对应的媒体目录"))}${m0("先在「媒体库与入库」添加 PikPak 挂载文件夹。")}</div>`, r = Q1(e?.cloud) ? u0("云下载", l0(g0("CloudDrive2 地址") + g0("CloudDrive2 API 令牌", "需要离线任务权限。") + (Q1(e?.has115) ? g0(y0("115 目标目录"), "应位于自动入库的云端路径前缀内。") : "") + (t ? g0(y0("PikPak 目标目录"), "目录要已经存在。") + n : "") + g0("等待上限(小时)", n0("14em"))), s0("检查连接", "secondary") + s0("保存配置")) : "", i = Q1(e?.pikpakLoggedIn);
+ return r + (t ? u0("PikPak 账号", i ? x0(["账号", n0("4em")]) : l0(g0("账号") + g0("密码") + v0("保存密码,登录过期时自动重新登录")), i ? s0("登出", "secondary") : (Q1(e?.browserLogin) ? s0("用浏览器登录", "secondary") : "") + s0("登录"), {
+ aside: a0(),
mark: !0
- }) : "") + C0();
-}, D0 = {
+ }) : "") + w0();
+}, O0 = {
legacy: "当前使用系统生成的访问口令。改设自己的密码,或关闭登录要求。",
locked: "访问设置无法读取,请在本机检查配置文件。",
password: "已设置密码。新设备需要登录,登录时勾选「保持登录」可保持 30 天。"
-}, O0 = {
+}, k0 = {
quick: "临时预览用,地址随机,重启后会变。启动前要先设置访问密码。",
named: "使用你在 Cloudflare 绑定的固定域名。启动前要先设置访问密码。"
};
-function VDe(e) {
- let t = e === "locked" ? "" : h0(e === "password" ? "新访问密码 *" : "设置访问密码 *", "至少 8 个字符。保存后其他设备需要重新登录。") + h0(e === "password" ? "确认新访问密码 *" : "确认访问密码 *");
- return (D0[e] ? p0(D0[e]) : "") + (e === "open" ? r0("100%", "64px") : "") + (e === "password" || e === "legacy" ? _0("关闭访问密码") : "") + (e === "password" ? h0("当前访问密码 *") : "") + t;
+function rOe(e) {
+ let t = e === "locked" ? "" : g0(e === "password" ? "新访问密码 *" : "设置访问密码 *", "至少 8 个字符。保存后其他设备需要重新登录。") + g0(e === "password" ? "确认新访问密码 *" : "确认访问密码 *");
+ return (O0[e] ? m0(O0[e]) : "") + (e === "open" ? i0("100%", "64px") : "") + (e === "password" || e === "legacy" ? v0("关闭访问密码") : "") + (e === "password" ? g0("当前访问密码 *") : "") + t;
}
-var HDe = () => {
- let e = X1("network"), t = typeof e?.access == "string" && e.access ? e.access : "legacy", n = Z1(e?.tunnelNamed), r = (n && Z1(e?.tunnelNamedMode) ? p0(O0.named) + h0("公开主机名", "Cloudflare Zero Trust 里指向这台电脑的主机名。") + h0("隧道令牌", t0("16em")) : p0(O0.quick)) + (Z1(e?.tunnelNote) ? r0("100%", "64px") : ""), i = Q1(e?.addresses, 3), a = Array.from({ length: i }, (e, t) => `<div class="flex min-w-0 flex-wrap items-end gap-2"><div class="min-w-0 flex-1">${h0([
+var iOe = () => {
+ let e = Z1("network"), t = typeof e?.access == "string" && e.access ? e.access : "legacy", n = Q1(e?.tunnelNamed), r = (n && Q1(e?.tunnelNamedMode) ? m0(k0.named) + g0("公开主机名", "Cloudflare Zero Trust 里指向这台电脑的主机名。") + g0("隧道令牌", n0("16em")) : m0(k0.quick)) + (Q1(e?.tunnelNote) ? i0("100%", "64px") : ""), i = $1(e?.addresses, 3), a = Array.from({ length: i }, (e, t) => `<div class="flex min-w-0 flex-wrap items-end gap-2"><div class="min-w-0 flex-1">${g0([
"本机地址",
"手机连接地址",
"备用 IP 地址"
- ][t])}</div>${o0("复制地址", "secondary")}</div>`).join("");
- return (i || Z1(e?.port) ? l0("访问地址", c0(a + (i ? r0("100%", "40px") : "") + (Z1(e?.networkEditable) ? `<div class="flex flex-col gap-1.5">${m0("谁可以访问")}${r0("min(100%, 20em)", "36px")}</div>` + (Z1(e?.lan) ? h0("局域网访问地址") : "") : "") + (Z1(e?.port) ? h0("端口") : "")), Z1(e?.port) ? o0("保存配置") : "", Z1(e?.port) ? { status: "保存后 Peach 会重启,并跳转到新地址。" } : {}) : "") + l0("访问密码", c0(VDe(t)), t === "locked" ? "" : o0("保存配置")) + l0("Cloudflare 公网入口", c0((n ? r0("10.5em", "36px") : "") + r), o0("启动公网入口", n ? "secondary" : "primary") + (n ? o0("保存配置") : ""), { aside: i0() }) + l0("Peach 代理", d0("连接方式", "", "ui-configuration-skeleton-select") + (Z1(e?.proxyAddress) ? c0(h0("代理地址"), !0) : ""), o0("保存配置"));
-}, UDe = [
+ ][t])}</div>${s0("复制地址", "secondary")}</div>`).join("");
+ return (i || Q1(e?.port) ? u0("访问地址", l0(a + (i ? i0("100%", "40px") : "") + (Q1(e?.networkEditable) ? `<div class="flex flex-col gap-1.5">${h0("谁可以访问")}${i0("min(100%, 20em)", "36px")}</div>` + (Q1(e?.lan) ? g0("局域网访问地址") : "") : "") + (Q1(e?.port) ? g0("端口") : "")), Q1(e?.port) ? s0("保存配置") : "", Q1(e?.port) ? { status: "保存后 Peach 会重启,并跳转到新地址。" } : {}) : "") + u0("访问密码", l0(rOe(t)), t === "locked" ? "" : s0("保存配置")) + u0("Cloudflare 公网入口", l0((n ? i0("10.5em", "36px") : "") + r), s0("启动公网入口", n ? "secondary" : "primary") + (n ? s0("保存配置") : ""), { aside: a0() }) + u0("Peach 代理", f0("连接方式", "", "ui-configuration-skeleton-select") + (Q1(e?.proxyAddress) ? l0(g0("代理地址"), !0) : ""), s0("保存配置"));
+}, aOe = [
"版本",
"操作系统",
"数据目录",
"设置文件",
"日志目录"
-], WDe = () => {
- let e = X1("maintenance"), t = [
+], oOe = () => {
+ let e = Z1("maintenance"), t = [
"当前版本",
"安装方式",
"更新通道",
"最新版本",
"下载内容"
- ].slice(0, Math.max(4, Q1(e?.releaseFacts, 5))), n = Q1(e?.releaseNotes, 4), r = Q1(e?.storageRows, 12), i = Q1(e?.storageNotes, 3), a = $1(e?.facts, 12, (e) => z(String(e))), o = `<span class="self-start">${i0("6em")}</span>`, s = (t) => !e || Z1(t), c = s(e?.reporting) ? d0("发送版本统计与错误诊断(推荐)", "上传版本、系统信息、故障类型、代码位置与发生次数。") + (Z1(e?.reportingIdle) ? c0(o, !0) : "") : "", l = s(e?.sharing) ? `<div class="border-t border-separator-border">${d0("上传馆藏与口味明细", Z1(e?.sharingNotice) ? t0("12em") : "")}${Z1(e?.sharingIdle) ? c0(o, !0) : ""}${s0(o0("预览上传内容", "secondary"))}</div>` : "";
- return l0("检查更新", b0(t) + (n ? c0(p0(t0("50%")).repeat(n), !0) : ""), o0("检查更新"), {
- aside: i0("4em"),
- status: t0("5em")
- }) + l0("自动更新", d0("自动检查新版本") + d0("自动下载更新") + d0("检查频率", Z1(e?.autoUpdateHelp) ? t0("12em") : "", "ui-configuration-skeleton-select"), o0("保存配置")) + l0("开机自启", d0("开机后启动 Peach") + d0("只启动托盘,不打开网页") + d0("在桌面创建快捷方式", Z1(e?.desktopNote) ? t0("12em") : "") + (Z1(e?.startupNote) ? c0(p0(t0("60%")), !0) : ""), o0("保存配置")) + l0("视频播放", d0("转码方式", "用于播放时的视频转码。", "ui-configuration-skeleton-select")) + l0("存储空间", b0(["数据目录", "所在磁盘"]) + (r ? Array.from({ length: r }, () => u0(t0("6em"), "", t0("4em"))).join("") : c0(p0("统计后显示各类数据的占用,并可清理缓存与旧备份。"), !0)) + (i ? c0(p0(t0("80%")).repeat(i), !0) : ""), o0("更改位置", "secondary") + o0(r ? "重新统计" : "统计占用")) + (c || l ? l0("数据上传", c + l) : "") + l0("运行信息", b0(a.length ? a : UDe)) + `<section aria-label="安装教程" class="w-full"><div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${u0("安装教程", "", o0("重新打开教程", "secondary"))}</div></section>` + (s(e?.uninstall) ? l0("卸载 Peach", (Z1(e?.uninstallHelp) ? c0(p0("卸载移除 Peach 程序本身,原始媒体文件保留。")) : "") + d0("完全卸载", "同时删除设置、本地数据库、观看记录、凭据和缓存") + c0(y0("数据目录"), !0), o0("卸载 Peach"), { status: t0("16em") }) : "");
+ ].slice(0, Math.max(4, $1(e?.releaseFacts, 5))), n = $1(e?.releaseNotes, 4), r = $1(e?.storageRows, 12), i = $1(e?.storageNotes, 3), a = e0(e?.facts, 12, (e) => z(String(e))), o = `<span class="self-start">${a0("6em")}</span>`, s = (t) => !e || Q1(t), c = s(e?.reporting) ? f0("发送版本统计与错误诊断(推荐)", "上传版本、系统信息、故障类型、代码位置与发生次数。") + (Q1(e?.reportingIdle) ? l0(o, !0) : "") : "", l = s(e?.sharing) ? `<div class="border-t border-separator-border">${f0("上传馆藏与口味明细", Q1(e?.sharingNotice) ? n0("12em") : "")}${Q1(e?.sharingIdle) ? l0(o, !0) : ""}${c0(s0("预览上传内容", "secondary"))}</div>` : "";
+ return u0("检查更新", x0(t) + (n ? l0(m0(n0("50%")).repeat(n), !0) : ""), s0("检查更新"), {
+ aside: a0("4em"),
+ status: n0("5em")
+ }) + u0("自动更新", f0("自动检查新版本") + f0("自动下载更新") + f0("检查频率", Q1(e?.autoUpdateHelp) ? n0("12em") : "", "ui-configuration-skeleton-select"), s0("保存配置")) + u0("开机自启", f0("开机后启动 Peach") + f0("只启动托盘,不打开网页") + f0("在桌面创建快捷方式", Q1(e?.desktopNote) ? n0("12em") : "") + (Q1(e?.startupNote) ? l0(m0(n0("60%")), !0) : ""), s0("保存配置")) + u0("视频播放", f0("转码方式", "用于播放时的视频转码。", "ui-configuration-skeleton-select")) + u0("存储空间", x0(["数据目录", "所在磁盘"]) + (r ? Array.from({ length: r }, () => d0(n0("6em"), "", n0("4em"))).join("") : l0(m0("统计后显示各类数据的占用,并可清理缓存与旧备份。"), !0)) + (i ? l0(m0(n0("80%")).repeat(i), !0) : ""), s0("更改位置", "secondary") + s0(r ? "重新统计" : "统计占用")) + (c || l ? u0("数据上传", c + l) : "") + u0("运行信息", x0(a.length ? a : aOe)) + `<section aria-label="安装教程" class="w-full"><div class="flex w-full flex-col rounded-2xl bg-background-secondary-default pl-3">${d0("安装教程", "", s0("重新打开教程", "secondary"))}</div></section>` + (s(e?.uninstall) ? u0("卸载 Peach", (Q1(e?.uninstallHelp) ? l0(m0("卸载移除 Peach 程序本身,原始媒体文件保留。")) : "") + f0("完全卸载", "同时删除设置、本地数据库、观看记录、凭据和缓存") + l0(b0("数据目录"), !0), s0("卸载 Peach"), { status: n0("16em") }) : "");
};
-function GDe(e) {
+function sOe(e) {
switch (e) {
- case "系统诊断": return U1();
- case "来源与订阅": return zDe();
- case "下载渠道": return BDe();
- case "网络与访问": return HDe();
- case "应用与维护": return WDe();
- default: return RDe();
+ case "系统诊断": return W1();
+ case "来源与订阅": return tOe();
+ case "下载渠道": return nOe();
+ case "网络与访问": return iOe();
+ case "应用与维护": return oOe();
+ default: return eOe();
}
}
-function k0(e = "媒体库与入库") {
- return `<div class="peach-react"><div class="ui-configpage">${`<div class="ui-board-local-nav" data-section-nav data-section-items>${Object.values(uV).map((t) => `<button type="button" tabindex="-1" aria-selected="${t === e}">${t}</button>`).join("")}</div>`}<div class="flex min-w-0 flex-col gap-6">${GDe(e)}</div></div></div>`;
+function cOe(e = "媒体库与入库") {
+ return `<div class="peach-react"><div class="ui-configpage">${`<div class="ui-board-local-nav" data-section-nav data-section-items>${Object.values(gV).map((t) => `<button type="button" tabindex="-1" aria-selected="${t === e}">${t}</button>`).join("")}</div>`}<div class="flex min-w-0 flex-col gap-6">${sOe(e)}</div></div></div>`;
}
// src/react/jav/discovery-sorts.ts
var A0 = [
@@ -68414,7 +68523,7 @@ var A0 = [
],
[
"release_date",
- Uk[1],
+ Xk[1],
"按发行日期排序"
],
[
@@ -68433,10 +68542,10 @@ var A0 = [
"按番号排序"
]
];
-function KDe(e) {
+function lOe(e) {
return typeof e == "number" && Number.isFinite(e) ? e.toFixed(3) : "—";
}
-function qDe(e) {
+function uOe(e) {
if (typeof e != "number" || !Number.isFinite(e)) return {
score: "—",
label: "资料未取得",
@@ -68461,7 +68570,7 @@ function qDe(e) {
};
}
// src/jav-skeleton.ts
-var j0 = (e) => `<span data-jav-skeleton-text class="skeleton block rounded-md" style="width:${e}" aria-hidden="true"></span>`, JDe = (e) => `<span data-jav-skeleton-cover class="skeleton ${e}"></span>`, M0 = "w-full min-w-0";
+var j0 = (e) => `<span data-jav-skeleton-text class="skeleton block rounded-md" style="width:${e}" aria-hidden="true"></span>`, dOe = (e) => `<span data-jav-skeleton-cover class="skeleton ${e}"></span>`, M0 = "w-full min-w-0";
function N0() {
return [
"w-20",
@@ -68472,10 +68581,10 @@ function N0() {
"w-24"
].map((e) => `<span data-skeleton="tag" aria-hidden="true" class="skeleton-sheen relative block h-8 flex-none rounded-(--tag-radius) ${e}"></span>`).join("");
}
-function P0(e, t = kA()) {
- if (e === "wants") return `<div class="flex w-full flex-col gap-8" data-skeleton="jav-wants">${j0("5em")}${Array.from({ length: 3 }, () => `<div class="flex min-w-0 gap-4 rounded-2lg bg-background-secondary-default p-6">${JDe("block w-card-cover shrink-0 aspect-card-cover rounded-2lg max-sm:w-24")}<div class="flex min-w-0 flex-1 flex-col gap-3">${j0("80%")}${j0("60%")}${j0("40%")}</div></div>`).join("")}</div>`;
- let n = LA({
- ...IA({
+function P0(e, t = FA()) {
+ if (e === "wants") return `<div class="flex w-full flex-col gap-8" data-skeleton="jav-wants">${j0("5em")}${Array.from({ length: 3 }, () => `<div class="flex min-w-0 gap-4 rounded-2lg bg-background-secondary-default p-6">${dOe("block w-card-cover shrink-0 aspect-card-cover rounded-2lg max-sm:w-24")}<div class="flex min-w-0 flex-1 flex-col gap-3">${j0("80%")}${j0("60%")}${j0("40%")}</div></div>`).join("")}</div>`;
+ let n = UA({
+ ...HA({
active: !0,
home: !1,
portrait: !1
@@ -68491,36 +68600,36 @@ function P0(e, t = kA()) {
<div data-jav-skeleton-actions class="flex flex-wrap gap-2"><span data-jav-skeleton-action class="skeleton block h-9 w-20 rounded-md"></span><span data-jav-skeleton-action class="skeleton block h-9 w-12 rounded-md"></span><span data-jav-skeleton-action class="skeleton block h-9 w-26 rounded-md"></span></div>
</div>`).join("")}</div>`;
}
-function YDe(e) {
+function fOe(e) {
let t = e === "wants" ? "筛选想要" : "筛选推荐";
return `<div class="peach-react"><div class="flex w-full flex-col gap-6">
- <div class="flex w-full flex-col gap-4"><div class="flex flex-wrap items-center justify-between gap-2"><h2 data-page-title class="text-display-4-medium text-text-primary max-board-narrow:text-title-1-medium">JAV</h2>${ls({
+ <div class="flex w-full flex-col gap-4"><div class="flex flex-wrap items-center justify-between gap-2"><h2 data-page-title class="text-display-4-medium text-text-primary max-board-narrow:text-title-1-medium">JAV</h2>${ws({
variant: "primary",
label: "查找资源",
attrs: "disabled data-skeleton-action"
})}</div>
- <div class="relative flex flex-none gap-1 overflow-x-auto max-board-narrow:gap-0">${y$.map(([t, n]) => `<span class="relative flex flex-none items-center whitespace-nowrap rounded-md px-3 py-2 text-body-regular max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular ${t === e ? "bg-background-tertiary-default text-text-primary" : "text-text-secondary"}">${n}</span>`).join("")}</div></div>
- <form aria-label="${t}">${cs("筛选番号、女优或标题", "", t)}</form>
- ${e === "wants" ? `<div class="rounded-2lg bg-background-secondary-default px-6 py-5"><h3 class="mb-4 text-title-2-medium text-text-primary">按番号添加</h3>${j0("100%")}</div>${P0(e)}` : `<section class="flex min-w-0 flex-col gap-4">${XDe()}${P0(e)}</section>`}</div></div>`;
+ <div class="relative flex flex-none gap-1 overflow-x-auto max-board-narrow:gap-0">${b$.map(([t, n]) => `<span class="relative flex flex-none items-center whitespace-nowrap rounded-md px-3 py-2 text-body-regular max-board-narrow:px-2.25 max-board-narrow:text-body-2-regular ${t === e ? "bg-background-tertiary-default text-text-primary" : "text-text-secondary"}">${n}</span>`).join("")}</div></div>
+ <form aria-label="${t}">${Cs("筛选番号、女优或标题", "", t)}</form>
+ ${e === "wants" ? `<div class="rounded-2lg bg-background-secondary-default px-6 py-5"><h3 class="mb-4 text-title-2-medium text-text-primary">按番号添加</h3>${j0("100%")}</div>${P0(e)}` : `<section class="flex min-w-0 flex-col gap-4">${pOe()}${P0(e)}</section>`}</div></div>`;
}
-function XDe() {
- let e = (e, t) => `<button type="button" data-entity-tag="${e}" data-entity-press="" aria-pressed="${e === "external"}" class="flex h-8 flex-none 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">${t}</button>`, t = (e, t) => `<span data-glass-segment="" ${kA() === e ? "data-selected=\"true\"" : ""} class="flex size-8 flex-none items-center justify-center rounded-lg text-(--glass-text)/62">${os(t, "size-4")}</span>`;
+function pOe() {
+ let e = (e, t) => `<button type="button" data-entity-tag="${e}" data-entity-press="" aria-pressed="${e === "external"}" class="flex h-8 flex-none 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">${t}</button>`, t = (e, t) => `<span data-glass-segment="" ${FA() === e ? "data-selected=\"true\"" : ""} class="flex size-8 flex-none items-center justify-center rounded-lg text-(--glass-text)/62">${xs(t, "size-4")}</span>`;
return `<div data-filter-glass data-glass-pane data-filter-frame data-jav-filter data-catalog-frame class="sticky top-topbar z-10 mb-5.5 flex flex-col">
<div data-filter-row="top" class="flex h-12 min-w-0 items-center overscroll-x-contain px-3 py-2 gap-1.5 overflow-visible">
<div data-catalog-scroll><div data-catalog-views>${e("external", "库外发现")}${e("library", "馆藏探索")}<span data-entity-sep aria-hidden="true"></span></div><div data-catalog-tags>${N0()}</div></div>
</div>
<div data-filter-row="bottom" aria-busy="true" class="flex min-h-12 min-w-0 items-center gap-3 px-3 py-2">
<span data-catalog-readout><span data-skeleton="count" class="relative inline-block h-3.5 w-37.5 rounded-md align-middle skeleton-sheen"></span></span>
- ${ss()}
- <span data-entity-sorts><button type="button" data-entity-batch data-filter-action data-skeleton-action data-jav-metadata-update title="更新资料" aria-label="更新资料" disabled>${os("refresh-cw", "size-4")}</button><span data-entity-layout class="inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg">${t("big", "maximize")}${t("small", "layout-grid")}</span>
- ${A0.map(([e, t]) => `<button type="button" data-entity-sort="${e}" data-entity-press aria-pressed="${e === "taste"}">${t}${e === "taste" ? os("arrow-down", "size-3.5") : ""}</button>`).join("")}
+ ${Ss()}
+ <span data-entity-sorts><button type="button" data-entity-batch data-filter-action data-skeleton-action data-jav-metadata-update title="更新资料" aria-label="更新资料" disabled>${xs("refresh-cw", "size-4")}</button><span data-entity-layout class="inline-flex w-max max-w-full flex-none items-center gap-0.5 rounded-lg">${t("big", "maximize")}${t("small", "layout-grid")}</span>
+ ${A0.map(([e, t]) => `<button type="button" data-entity-sort="${e}" data-entity-press aria-pressed="${e === "taste"}">${t}${e === "taste" ? xs("arrow-down", "size-3.5") : ""}</button>`).join("")}
</span>
</div>
</div>`;
}
// src/management-skeletons.ts
var F0 = "relative overflow-hidden skeleton-sheen bg-background-tertiary-default rounded-lg", I0 = (e = "60%") => `<span class="${F0} inline-block max-w-full align-middle" style="width:${e};height:1em"></span>`, L0 = "disabled data-skeleton-action", R0 = "min-w-0 rounded-2-5xl bg-background-secondary-default p-5 flex flex-col gap-4 max-sm:p-4";
-function ZDe() {
+function mOe() {
let e = [
"馆藏视频",
"看过",
@@ -68561,7 +68670,7 @@ function ZDe() {
</section>
</div></div>`;
}
-function QDe() {
+function hOe() {
let e = (e) => `<div class="inline-flex w-max max-w-full items-center gap-0.5 overflow-x-auto rounded-2lg bg-background-tertiary-default p-1" data-taste-segments>${e.map((e, t) => `<span class="flex min-h-7 flex-none items-center gap-1.5 rounded-md px-2.5 py-1 text-body-medium whitespace-nowrap text-text-secondary data-selected:bg-background-primary-default data-selected:text-text-primary data-selected:shadow-card dark:data-selected:bg-background-primary-hover"${t === 0 ? " data-selected=\"true\"" : ""}>${e}</span>`).join("")}</div>`, t = [
"浏览记录",
"口味维度",
@@ -68576,11 +68685,11 @@ function QDe() {
return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">
<div class="flex flex-col gap-5">
<div class="flex flex-wrap items-center justify-between gap-3">${e(["浏览器记录", "Peach 内部"])}
- <div class="flex flex-wrap items-center gap-2">${ds("全部时间")}<span data-button-group data-split-button data-variant="primary">${ls({
+ <div class="flex flex-wrap items-center gap-2">${Es("全部时间")}<span data-button-group data-split-button data-variant="primary">${ws({
glyph: "compass",
label: "读取浏览器历史",
attrs: L0
- })}${ls({
+ })}${ws({
glyph: "chevron-down",
attrs: L0
})}</span></div>
@@ -68617,7 +68726,7 @@ function QDe() {
</div>
</div></div>`;
}
-function $De() {
+function gOe() {
let e = `<div class="duplicate-row items-center gap-3 border-t border-separator-border px-5 py-4 max-compact:p-4">
<span class="${F0} row-span-2 inline-grid aspect-16/10 w-full rounded-2lg"></span>
<span class="text-body-regular max-duplicate-narrow:col-start-2 max-duplicate-narrow:-col-end-1">${I0("70%")}</span>
@@ -68630,7 +68739,7 @@ function $De() {
"留最大",
"留最长",
"整组回收"
- ].map((e) => ls({
+ ].map((e) => ws({
variant: "secondary",
size: "small",
label: e,
@@ -68645,12 +68754,12 @@ function $De() {
${t.repeat(2)}
</div></div>`;
}
-function eOe() {
+function _Oe() {
let e = `<li class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card border border-separator-border flex flex-col gap-3 p-3">
<div class="flex min-w-0 gap-4"><span class="${F0} inline-grid w-card-cover shrink-0 aspect-card-cover rounded-2lg"></span>
<div class="flex min-w-0 flex-1 flex-col gap-1.5"><h3 class="text-headline-medium">${I0("80%")}</h3><p class="text-body-2-regular">${I0("60%")}</p></div>
</div>
- <footer class="flex justify-end">${ls({
+ <footer class="flex justify-end">${ws({
variant: "secondary",
size: "small",
label: "查看版本",
@@ -68658,77 +68767,77 @@ function eOe() {
})}</footer>
</li>`;
return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">
- ${_s("待升级")}
+ ${Ms("待升级")}
<ul class="card-grid-cover gap-5">${e.repeat(6)}</ul>
</div></div>`;
}
// src/board-skeleton.ts
-var z0 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, tOe = () => `${z0("80%")}${z0("48%")}`, B0 = (e, t) => e.repeat(t), V0 = "disabled data-skeleton-action", H0 = (e) => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, U0 = (e, t, n = !1) => `<span class="skeleton" style="width:${e}px;height:${t}px;flex:none${n ? ";border-radius:50%" : ""}"></span>`, nOe = "min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4", W0 = () => `<div class="inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6">${[
+var z0 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, vOe = () => `${z0("80%")}${z0("48%")}`, B0 = (e, t) => e.repeat(t), V0 = "disabled data-skeleton-action", H0 = (e) => `<span class="skeleton skeleton-text" style="width:${e}"></span>`, U0 = (e, t, n = !1) => `<span class="skeleton" style="width:${e}px;height:${t}px;flex:none${n ? ";border-radius:50%" : ""}"></span>`, yOe = "min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-3 px-6 py-5 max-sm:gap-2 max-sm:p-4", W0 = () => `<div class="inline-grid w-full grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 xl:grid-cols-6">${[
"关注创作者",
"启用来源",
"检查失败",
"未看更新",
"JAV 订阅",
"未看新作"
-].map((e) => `<div class="${nOe}"><span class="text-body-medium text-text-secondary">${e}</span><b class="text-title-1-medium tabular-nums text-text-primary">${H0("3em")}</b></div>`).join("")}</div>`, rOe = (e = "") => NZ.some(([t]) => t === e) ? e : "list", G0 = (e) => `<div data-section-nav data-section-items class="flex max-w-full flex-nowrap overflow-x-auto">${NZ.map(([t, n]) => `<span class="whitespace-nowrap" aria-selected="${t === e}">${n}</span>`).join("")}</div>`, K0 = (e = "") => `<span class="group inline-flex items-center select-none gap-2"><span class="flex shrink-0 items-center justify-center rounded-sm size-4 border bg-background-primary-default shadow-xs border-border-checkbox-default"></span>${e ? `<span class="text-body-medium text-text-primary">${e}</span>` : ""}</span>`, iOe = ({ table: e, sort: t, dir: n }) => {
- let r = Gn.find(([e]) => e === t)[1];
- return `<div data-responsive-toolbar class="ui-follow-skeleton-toolbar"><span data-follow-toolbar-heading data-toolbar-heading><h3 class="text-title-2-medium text-text-primary">关注列表</h3><span class="text-body-2-regular text-text-secondary">${H0("132px")}</span></span><div data-follow-toolbar-actions data-toolbar-actions>${ls({
+].map((e) => `<div class="${yOe}"><span class="text-body-medium text-text-secondary">${e}</span><b class="text-title-1-medium tabular-nums text-text-primary">${H0("3em")}</b></div>`).join("")}</div>`, bOe = (e = "") => PZ.some(([t]) => t === e) ? e : "list", G0 = (e) => `<div data-section-nav data-section-items class="flex max-w-full flex-nowrap overflow-x-auto">${PZ.map(([t, n]) => `<span class="whitespace-nowrap" aria-selected="${t === e}">${n}</span>`).join("")}</div>`, K0 = (e = "") => `<span class="group inline-flex items-center select-none gap-2"><span class="flex shrink-0 items-center justify-center rounded-sm size-4 border bg-background-primary-default shadow-xs border-border-checkbox-default"></span>${e ? `<span class="text-body-medium text-text-primary">${e}</span>` : ""}</span>`, xOe = ({ table: e, sort: t, dir: n }) => {
+ let r = or.find(([e]) => e === t)[1];
+ return `<div data-responsive-toolbar class="ui-follow-skeleton-toolbar"><span data-follow-toolbar-heading data-toolbar-heading><h3 class="text-title-2-medium text-text-primary">关注列表</h3><span class="text-body-2-regular text-text-secondary">${H0("132px")}</span></span><div data-follow-toolbar-actions data-toolbar-actions>${ws({
glyph: "refresh-cw",
label: "检查全部",
compact: !0,
attrs: V0
- })}<span data-follow-toolbar-controls class="contents"><span data-button-group role="group">${ls({
+ })}<span data-follow-toolbar-controls class="contents"><span data-button-group role="group">${ws({
variant: "ghost",
glyph: "layout-grid",
attrs: `aria-pressed="${!e}"`
- })}${ls({
+ })}${ws({
variant: "ghost",
glyph: "table",
attrs: `aria-pressed="${e}"`
- })}</span><span class="flex flex-none items-center gap-2">${ds(r, { prefix: "排序" })}${ls({
+ })}</span><span class="flex flex-none items-center gap-2">${Es(r, { prefix: "排序" })}${ws({
variant: "secondary",
glyph: n === "asc" ? "arrow-up" : "arrow-down"
- })}</span>${e ? "" : ls({
+ })}</span>${e ? "" : ws({
variant: "secondary",
glyph: "chevron-up",
label: "全部收起",
compact: !0,
attrs: V0
})}</span></div></div>`;
-}, q0 = () => `<span class="flex shrink-0 items-center gap-1">${ls({
+}, q0 = () => `<span class="flex shrink-0 items-center gap-1">${ws({
variant: "secondary",
size: "small",
glyph: "refresh-cw",
attrs: V0
-})}${ls({
+})}${ws({
variant: "secondary",
size: "small",
glyph: "trash",
attrs: V0
-})}</span>`, aOe = () => `<div class="flex min-h-16 flex-wrap items-center gap-3 px-2 py-3 max-sm:gap-x-2 follow-skeleton-source">${K0()}<span class="flex min-w-0 grow basis-0 flex-col gap-0.5"><span class="text-body-medium">${H0("8em")}</span></span><span class="flex shrink-0 items-center gap-1.5">${U0(14, 14)}</span>${U0(48, 24)}<span data-follow-source-controls class="flex w-max max-w-full flex-none flex-wrap items-center gap-1.5 max-sm:w-full"><span class="shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary max-sm:mr-auto max-sm:text-caption-1-regular">${H0("113px")}</span>${q0()}</span></div>`, J0 = (e) => `<section class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col overflow-hidden p-2 follow-skeleton-author"><div class="flex flex-wrap items-center gap-3 px-2 py-2.5" data-follow-author-header data-open>${U0(32, 32, !0)}<b class="min-w-0 grow text-body-medium wrap-anywhere text-text-primary max-sm:basis-0">${H0("92px")}</b><span data-follow-author-controls class="flex w-max max-w-full flex-none flex-wrap items-center gap-2 max-sm:w-full">${ls({
+})}</span>`, SOe = () => `<div class="flex min-h-16 flex-wrap items-center gap-3 px-2 py-3 max-sm:gap-x-2 follow-skeleton-source">${K0()}<span class="flex min-w-0 grow basis-0 flex-col gap-0.5"><span class="text-body-medium">${H0("8em")}</span></span><span class="flex shrink-0 items-center gap-1.5">${U0(14, 14)}</span>${U0(48, 24)}<span data-follow-source-controls class="flex w-max max-w-full flex-none flex-wrap items-center gap-1.5 max-sm:w-full"><span class="shrink-0 text-body-2-regular whitespace-nowrap text-text-secondary max-sm:mr-auto max-sm:text-caption-1-regular">${H0("113px")}</span>${q0()}</span></div>`, J0 = (e) => `<section class="min-w-0 bg-background-primary-default rounded-2xl shadow-card flex flex-col overflow-hidden p-2 follow-skeleton-author"><div class="flex flex-wrap items-center gap-3 px-2 py-2.5" data-follow-author-header data-open>${U0(32, 32, !0)}<b class="min-w-0 grow text-body-medium wrap-anywhere text-text-primary max-sm:basis-0">${H0("92px")}</b><span data-follow-author-controls class="flex w-max max-w-full flex-none flex-wrap items-center gap-2 max-sm:w-full">${ws({
variant: "secondary",
size: "small",
glyph: "refresh-cw",
attrs: V0
-})}<span class="flex shrink-0 items-center gap-1 max-sm:mr-auto">${U0(14, 14)}${U0(14, 14)}</span><span class="flex flex-none items-center gap-2">${ls({
+})}<span class="flex shrink-0 items-center gap-1 max-sm:mr-auto">${U0(14, 14)}${U0(14, 14)}</span><span class="flex flex-none items-center gap-2">${ws({
variant: "secondary",
size: "small",
glyph: "check-check",
label: "全选",
attrs: V0
-})}${ls({
+})}${ws({
variant: "secondary",
size: "small",
glyph: "chevron-up",
label: "收起",
attrs: V0
-})}</span></span></div><div data-source-divider>${B0(aOe(), e)}</div></section>`, oOe = () => {
+})}</span></span></div><div data-source-divider>${B0(SOe(), e)}</div></section>`, COe = () => {
try {
return Number(JSON.parse(localStorage.getItem("peach.settings.v1") || "{}").followPageSize) || 20;
} catch {
return 20;
}
-}, sOe = [
+}, wOe = [
["select", ""],
["author", "创作者"],
["source", "来源"],
@@ -68736,13 +68845,13 @@ var z0 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, tOe
["status", "状态"],
["checked", "上次检查"],
["actions", ""]
-], cOe = {
+], TOe = {
name: "author",
source: "source",
provider: "provider",
status: "status",
checked: "checked"
-}, lOe = "<svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z\" fill=\"currentColor\"/></svg>", uOe = (e, { sort: t, dir: n }) => `<div data-board-data-table data-follow-table class="follow-skeleton-table"><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm"><thead><tr>${sOe.map(([e, r]) => r ? `<th><span class="flex items-center gap-0.5">${r}<span data-sort-indicator${cOe[t] === e ? ` data-direction="${n === "asc" ? "ascending" : "descending"}"` : ""}>${lOe}</span></span></th>` : "<th></th>").join("")}</tr></thead><tbody>${B0(`<tr>${[
+}, EOe = "<svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><path d=\"M12.7071 15.2929C12.3166 15.6834 11.6834 15.6834 11.2929 15.2929L7.70711 11.7071C7.07714 11.0771 7.52331 10 8.41421 10H15.5858C16.4767 10 16.9229 11.0771 16.2929 11.7071L12.7071 15.2929Z\" fill=\"currentColor\"/></svg>", DOe = (e, { sort: t, dir: n }) => `<div data-board-data-table data-follow-table class="follow-skeleton-table"><div class="w-full overflow-x-auto"><table class="bui-table bui-table-sm"><thead><tr>${wOe.map(([e, r]) => r ? `<th><span class="flex items-center gap-0.5">${r}<span data-sort-indicator${TOe[t] === e ? ` data-direction="${n === "asc" ? "ascending" : "descending"}"` : ""}>${EOe}</span></span></th>` : "<th></th>").join("")}</tr></thead><tbody>${B0(`<tr>${[
K0(),
`<span class="flex min-w-0 items-center gap-2">${U0(32, 32, !0)}${H0("5em")}</span>`,
H0("10em"),
@@ -68750,38 +68859,38 @@ var z0 = (e = "60%") => `<span class="skeleton" style="width:${e}"></span>`, tOe
U0(48, 24),
H0("113px"),
q0()
-].map((e) => `<td>${e}</td>`).join("")}</tr>`, e)}</tbody></table></div></div>`, dOe = (e, t) => `<div class="flex flex-wrap items-center justify-between gap-3"><span class="mr-auto text-body-2-regular text-text-secondary">${H0("111px")}</span><div data-toolbar-actions>${ds(`每页 ${t} ${e ? "条" : "位"}`, { size: "sm" })}${U0(204, 32)}</div></div>`, fOe = () => `<div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 ui-follow-skeleton-surface"><h3 class="text-title-2-medium text-text-primary">${H0("120px")}</h3>${[
+].map((e) => `<td>${e}</td>`).join("")}</tr>`, e)}</tbody></table></div></div>`, OOe = (e, t) => `<div class="flex flex-wrap items-center justify-between gap-3"><span class="mr-auto text-body-2-regular text-text-secondary">${H0("111px")}</span><div data-toolbar-actions>${Es(`每页 ${t} ${e ? "条" : "位"}`, { size: "sm" })}${U0(204, 32)}</div></div>`, kOe = () => `<div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 ui-follow-skeleton-surface"><h3 class="text-title-2-medium text-text-primary">${H0("120px")}</h3>${[
"72%",
"56%",
"64%",
"40%"
-].map((e) => `<span class="text-body-medium">${H0(e)}</span>`).join("")}</div>`, pOe = (e) => {
- let t = rOe(e.followTab);
- if (t !== "list") return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${W0()}<div class="flex flex-col gap-6">${G0(t)}<div class="flex flex-col gap-4">${fOe()}</div></div></div></div>`;
- let n = e.followLayout === "table", r = Yn(e.followSort, e.followDir), i = e.followPageSize || oOe(), a = n ? uOe(i, r) : `${K0("全选本页")}<div class="flex flex-col gap-3">${J0(3)}${J0(4)}${J0(3)}</div>`;
- return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${W0()}<div class="flex flex-col gap-6">${G0(t)}<div class="flex flex-col gap-4"><div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 ui-follow-skeleton-surface" data-layout="${n ? "table" : "default"}">${iOe({
+].map((e) => `<span class="text-body-medium">${H0(e)}</span>`).join("")}</div>`, AOe = (e) => {
+ let t = bOe(e.followTab);
+ if (t !== "list") return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${W0()}<div class="flex flex-col gap-6">${G0(t)}<div class="flex flex-col gap-4">${kOe()}</div></div></div></div>`;
+ let n = e.followLayout === "table", r = ur(e.followSort, e.followDir), i = e.followPageSize || COe(), a = n ? DOe(i, r) : `${K0("全选本页")}<div class="flex flex-col gap-3">${J0(3)}${J0(4)}${J0(3)}</div>`;
+ return `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${W0()}<div class="flex flex-col gap-6">${G0(t)}<div class="flex flex-col gap-4"><div class="min-w-0 bg-background-secondary-default rounded-2xl shadow-card flex flex-col gap-4 px-6 py-5 max-sm:px-4 ui-follow-skeleton-surface" data-layout="${n ? "table" : "default"}">${xOe({
table: n,
...r
- })}${a}${dOe(n, i)}</div></div></div></div></div>`;
+ })}${a}${OOe(n, i)}</div></div></div></div></div>`;
};
-function mOe() {
- return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="ui-skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="ui-skeleton-lines">${z0("85%")}${z0("65%")}${B0(tOe(), 4)}</div></aside></div>`;
+function jOe() {
+ return `<div data-stage-grid="" aria-hidden="true"><div data-stage-media="" class="ui-skeleton-detail-media skeleton"></div><aside data-stage-side=""><div data-stage-side-content="" class="ui-skeleton-lines">${z0("85%")}${z0("65%")}${B0(vOe(), 4)}</div></aside></div>`;
}
-function hOe(e, t = {}) {
+function MOe(e, t = {}) {
let n = "";
- if (e === "/stats") n = ZDe();
- else if (e === "/jav") n = YDe(new URLSearchParams(location.search).get("tab") === "wants" ? "wants" : "discover");
- else if (e === "/taste") n = QDe();
- else if (e === "/subscriptions") n = pOe(t);
- else if (e.startsWith("/settings/") && e.split("/")[2] in uV) n = k0(uV[e.split("/")[2]]);
+ if (e === "/stats") n = mOe();
+ else if (e === "/jav") n = fOe(new URLSearchParams(location.search).get("tab") === "wants" ? "wants" : "discover");
+ else if (e === "/taste") n = hOe();
+ else if (e === "/subscriptions") n = AOe(t);
+ else if (e.startsWith("/settings/") && e.split("/")[2] in gV) n = cOe(gV[e.split("/")[2]]);
else if (e === "/tasks") n = `<div class="peach-react"><div class="mx-auto flex w-full max-w-board flex-col gap-8">${[
"正在进行",
"本次未执行",
"最近完成"
].map((e) => `<section class="activitysection flex min-w-0 flex-col gap-3"><h3 class="text-title-2-medium text-text-primary">${e}</h3><div class="min-w-0 rounded-2xl shadow-card border border-border-button-default bg-background-secondary-default"><div class="flex flex-col gap-1.5 px-5 pt-5 pb-4"><span class="text-title-1-medium">${H0("8em")}</span><span class="text-caption-1-regular">${H0("14em")}</span>${H0("60%")}${H0("40%")}</div><div class="border-t border-separator-border px-5 py-2.5">${H0("6em")}</div></div></section>`).join("")}</div></div>`;
- else if (e === "/duplicates") n = $De();
- else if (e === "/quality-goals") n = eOe();
- else if (e === "/playlists") n = `<div class="peach-react"><section class="w-full pt-1 pb-10.5"><header class="mb-4 flex items-start justify-between gap-4.5 max-board-narrow:flex-col max-board-narrow:items-stretch"><div><h2 class="mb-1 text-display-4-medium! text-text-primary">播放列表</h2><p class="text-body-2-regular text-text-secondary">保存 Mix,按自己的顺序继续播放。</p></div><div class="flex flex-wrap items-end gap-2"><div class="min-w-50 max-w-80 flex-1 basis-50 max-board-narrow:min-w-0 max-board-narrow:max-w-none"><span class="text-body-medium">新播放列表</span><span class="skeleton ui-configuration-skeleton-input mt-1.5"></span></div>${ls({
+ else if (e === "/duplicates") n = gOe();
+ else if (e === "/quality-goals") n = _Oe();
+ else if (e === "/playlists") n = `<div class="peach-react"><section class="w-full pt-1 pb-10.5"><header class="mb-4 flex items-start justify-between gap-4.5 max-board-narrow:flex-col max-board-narrow:items-stretch"><div><h2 class="mb-1 text-display-4-medium! text-text-primary">播放列表</h2><p class="text-body-2-regular text-text-secondary">保存 Mix,按自己的顺序继续播放。</p></div><div class="flex flex-wrap items-end gap-2"><div class="min-w-50 max-w-80 flex-1 basis-50 max-board-narrow:min-w-0 max-board-narrow:max-w-none"><span class="text-body-medium">新播放列表</span><span class="skeleton ui-configuration-skeleton-input mt-1.5"></span></div>${ws({
label: "新建",
attrs: V0
})}</div></header><div class="mx-auto w-full max-w-board"><div class="ui-playlistcards card-grid-cover gap-4.5">${B0("<article class=\"playlistcard skeletoncard\"><i></i><b></b><em></em></article>", 6)}</div></div></section></div>`;
@@ -68789,7 +68898,7 @@ function hOe(e, t = {}) {
return `<div class="board-page-skeleton" data-skeleton="board${e}" role="status" aria-label="正在读取页面"><div aria-hidden="true" inert>${n}</div></div>`;
}
// src/react/components/overlay-host.ts
-function gOe(e) {
+function NOe(e) {
let t = e.querySelector(":scope > [data-react-overlays]");
if (t) return t;
let n = e.ownerDocument.createElement("div");
@@ -68797,10 +68906,10 @@ function gOe(e) {
}
function Y0(e) {
let t = e?.ownerDocument ?? globalThis.document, n = e?.closest("dialog[open]");
- return gOe(n ?? t.body);
+ return NOe(n ?? t.body);
}
var X0 = "[role=\"dialog\"],[role=\"listbox\"],[role=\"menu\"]";
-function _Oe(e) {
+function POe(e) {
let t = e.querySelector(":scope > [data-react-overlays]");
for (let e = t?.lastElementChild; e; e = e.previousElementSibling) {
let t = e.matches(X0) ? e : e.querySelector(X0);
@@ -68813,15 +68922,15 @@ function Z0(e) {
t && t.parentElement !== n && n.append(t);
}
// src/react/follow-detail/follow-detail.ts
-var Q0 = (e) => ["follow-item", e], vOe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, yOe = "/api/follow/save", bOe = "/api/follow/media/hide", $0 = class extends Error {
+var Q0 = (e) => ["follow-item", e], FOe = (e) => `/api/follow?item=${encodeURIComponent(e)}`, IOe = "/api/follow/save", LOe = "/api/follow/media/hide", $0 = class extends Error {
constructor() {
super("这条关注内容已不存在");
}
};
async function e2(e, t) {
- let n = await B(vOe(e), t);
+ let n = await B(FOe(e), t);
for (let t of n.groups || []) {
- let r = Wi(t).find((t) => t.id === e);
+ let r = aa(t).find((t) => t.id === e);
if (r) return {
item: r,
group: t,
@@ -68831,10 +68940,10 @@ async function e2(e, t) {
}
throw new $0();
}
-function xOe(e) {
+function ROe(e) {
for (let [, t] of H.getQueriesData({ queryKey: ["follow-item"] })) {
if (!t?.group) continue;
- let n = Wi(t.group).find((t) => t.id === e);
+ let n = aa(t.group).find((t) => t.id === e);
if (n) return {
...t,
item: n
@@ -68843,20 +68952,20 @@ function xOe(e) {
return null;
}
async function t2(e, t) {
- let n = Q0(e.id), r = Gi(e.id), i = H.getQueryData(zi) ? null : H.fetchQuery({
- queryKey: zi,
- queryFn: () => Bi(t)
+ let n = Q0(e.id), r = oa(e.id), i = H.getQueryData(ea) ? null : H.fetchQuery({
+ queryKey: ea,
+ queryFn: () => ta(t)
}), a = r ? {
...r,
item: r.item
- } : H.getQueryData(n) ?? xOe(e.id);
+ } : H.getQueryData(n) ?? ROe(e.id);
a ? H.setQueryData(n, a) : await H.fetchQuery({
queryKey: n,
queryFn: () => e2(e.id, t)
}), await i;
}
-function SOe(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 && $i(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 zOe(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 && ma(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,
@@ -68870,32 +68979,32 @@ function SOe(e, t, n, r) {
src: e.playable ? `/follow-stream?id=${e.id}${s ? `&media=${s.index}` : ""}` : ""
};
}
-var COe = (e) => Wi(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), wOe = {
+var BOe = (e) => aa(e).find((e) => (e.media_items || []).some((e) => e.resource_group)), VOe = {
"gofile.io": "Gofile",
"pixeldrain.com": "Pixeldrain",
"mega.nz": "MEGA",
"mega.io": "MEGA",
"mediafire.com": "MediaFire",
"drive.google.com": "Google Drive"
-}, TOe = {
+}, HOe = {
gofile: "Gofile",
pixeldrain: "Pixeldrain",
mega: "MEGA",
mediafire: "MediaFire",
google_drive: "Google Drive"
};
-function EOe(e) {
+function UOe(e) {
try {
let t = new URL(e).hostname.replace(/^www\./, "");
- return wOe[t] || t;
+ return VOe[t] || t;
} catch {
return "外部文件页";
}
}
function n2(e, t) {
- return TOe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
+ return HOe[e?.resource_provider || ""] || t.provider_label || t.provider || "在线图片";
}
-function DOe(e, t, n = "") {
+function WOe(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;
@@ -68904,16 +69013,16 @@ function DOe(e, t, n = "") {
title: e.is_release && t.author ? `${t.author}:${i}` : i
};
}
-var OOe = (e) => String(e.name || "").trim(), r2 = (e, t) => e.tag_types?.[t] || "unknown", kOe = /* @__PURE__ */ new Set([
+var GOe = (e) => String(e.name || "").trim(), r2 = (e, t) => e.tag_types?.[t] || "unknown", KOe = /* @__PURE__ */ new Set([
"artist",
"character",
"copyright",
"metadata",
"unknown"
]);
-function AOe(e, t) {
+function qOe(e, t) {
let n = r2(e, t);
- return `r34-${kOe.has(n) ? n : "general"}`;
+ return `r34-${KOe.has(n) ? n : "general"}`;
}
var i2 = [
"copyright",
@@ -68922,7 +69031,7 @@ var i2 = [
"general",
"metadata"
];
-function jOe(e, t) {
+function JOe(e, t) {
let n = e.detail_tags || e.tags || [], r = (t) => {
let n = i2.indexOf(r2(e, t));
return n < 0 ? i2.length : n;
@@ -68933,12 +69042,12 @@ function a2(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 MOe = (e, t) => ({
+var YOe = (e, t) => ({
sources: e.sources,
aliases: e.aliases,
credentials: t
}), o2 = (e) => e?.size ? { size: e.size } : {};
-function NOe(e, t) {
+function XOe(e, t) {
let { images: n, kind: r, src: i, selected: a } = t;
return n.length ? n.map((t) => ({
src: `/follow-stream?id=${e.id}&media=${t.index}`,
@@ -68959,7 +69068,7 @@ function NOe(e, t) {
source: e.provider_label || e.provider || "在线图片"
}] : [];
}
-var POe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态", s2 = (e, { cards: t = !1, className: n = "", variant: r = "", count: i, fill: a, cardRatio: o, gridClass: s = "", gridSize: c = "" } = {}) => Rs(e, {
+var ZOe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态", s2 = (e, { cards: t = !1, className: n = "", variant: r = "", count: i, fill: a, cardRatio: o, gridClass: s = "", gridSize: c = "" } = {}) => $s(e, {
variant: r || (t ? "cards" : "panel"),
className: n,
gridClass: s,
@@ -68967,7 +69076,7 @@ var POe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态", s2
...i ? { count: i } : {},
...a === void 0 ? {} : { fill: a },
...o ? { cardRatio: o } : {}
-}), FOe = [
+}), QOe = [
"元数据字段",
"创作者标签",
"厂牌 Logo",
@@ -68977,14 +69086,14 @@ var POe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态", s2
"FC2 评论标记",
"FC2 跨号相似",
"片尾/出处证据"
-], IOe = (e = "正在读取复核队列") => `<div class="review review-workspace review-skeleton" data-skeleton="review" aria-busy="true" aria-label="${z(e)}">
+], $Oe = (e = "正在读取复核队列") => `<div class="review review-workspace review-skeleton" data-skeleton="review" aria-busy="true" aria-label="${z(e)}">
<div class="reviewcontrols" data-section-nav><h2 class="review-category-title">复核分类</h2>
- <div class="reviewtabs" data-section-items>${FOe.map((e, t) => `<button type="button" disabled aria-selected="${t === 0}">${z(e)}<span class="skeleton reviewcountskeleton" aria-hidden="true"></span></button>`).join("")}</div></div>
+ <div class="reviewtabs" data-section-items>${QOe.map((e, t) => `<button type="button" disabled aria-selected="${t === 0}">${z(e)}<span class="skeleton reviewcountskeleton" aria-hidden="true"></span></button>`).join("")}</div></div>
<div class="reviewbulkbar reviewbulktoolbar" aria-hidden="true">${"<span class=\"skeleton reviewtoolskeleton\"></span>".repeat(3)}</div>
- <section class="reviewsection"><div class="reviewlist">${"<div class=\"skeletoncard\" aria-hidden=\"true\"><i></i><b></b><em></em></div>".repeat(6)}</div></section></div>`, LOe = {
- "/data-cleanup": () => N$(),
- "/resource-sync": () => N$(),
- "/review": () => IOe(),
+ <section class="reviewsection"><div class="reviewlist">${"<div class=\"skeletoncard\" aria-hidden=\"true\"><i></i><b></b><em></em></div>".repeat(6)}</div></section></div>`, eke = {
+ "/data-cleanup": () => P$(),
+ "/resource-sync": () => P$(),
+ "/review": () => $Oe(),
"/sources": () => `<div class="scraping-page"><p>高清图片可能要经代理才能下载,先检查连接。</p>
${s2("正在读取采集来源", {
cards: !0,
@@ -68994,23 +69103,23 @@ var POe = (e) => e === "seen" ? "已标记看过" : "已更新关注状态", s2
})}</div>`
};
function c2(e, { followLayout: t, followSort: n, followDir: r }) {
- return hOe(e, {
+ return MOe(e, {
followLayout: t,
...e === "/subscriptions" ? {
followSort: n,
followDir: r
} : {}
- }) || (LOe[e] ?? (() => s2("正在读取页面")))();
+ }) || (eke[e] ?? (() => s2("正在读取页面")))();
}
var l2 = (e) => String(e).match(/data-skeleton="([^"]*)"/)?.[1] || "";
function u2(e, t) {
let n = e.querySelector("[data-skeleton]")?.dataset.skeleton || "", r = l2(t);
- r && r === n || (e.innerHTML = t, Ks(e));
+ r && r === n || (e.innerHTML = t, sc(e));
}
// src/react/components/related-section.tsx
function d2({ children: e, wireDrag: t, busy: n, empty: r, error: i, onRetry: a, online: o = !1, ...s }) {
let c = (0, P.useCallback)((e) => {
- e && (Ks(e), t(e));
+ e && (sc(e), t(e));
}, [t]);
return /* @__PURE__ */ (0, F.jsxs)("div", {
...s,
@@ -69021,17 +69130,17 @@ function d2({ children: e, wireDrag: t, busy: n, empty: r, error: i, onRetry: a,
children: "接着看"
}), i ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-related-state": "",
- children: /* @__PURE__ */ (0, F.jsx)(UW, {
+ children: /* @__PURE__ */ (0, F.jsx)(QW, {
message: i,
onRetry: a || (() => {})
})
}) : r && !n ? /* @__PURE__ */ (0, F.jsx)("div", {
"data-related-state": "",
- children: /* @__PURE__ */ (0, F.jsx)(zz, {
+ children: /* @__PURE__ */ (0, F.jsx)(Gz, {
size: "compact",
- icon: Oz,
+ icon: Pz,
title: "暂无接着看的内容",
- actions: /* @__PURE__ */ (0, F.jsx)(pI, {
+ actions: /* @__PURE__ */ (0, F.jsx)(yI, {
size: "small",
href: o ? "/follow" : "/",
children: o ? "返回关注" : "浏览馆藏"
@@ -69060,7 +69169,7 @@ function p2({ items: e, position: t, onSelect: n, below: r = !1, renderThumbnail
if ((0, P.useLayoutEffect)(() => {
let e = a.current?.querySelector("[data-media-thumbnails]");
if (!e) return;
- let t = lc(e, { drag: !0 }), n = () => {
+ let t = wc(e, { drag: !0 }), n = () => {
let n = e.querySelector("[aria-current=\"true\"]");
if (n && e.clientWidth) {
let t = n.getBoundingClientRect(), r = e.getBoundingClientRect(), i = parseFloat(getComputedStyle(e).paddingLeft);
@@ -69078,7 +69187,7 @@ function p2({ items: e, position: t, onSelect: n, below: r = !1, renderThumbnail
]), (0, P.useLayoutEffect)(() => {
let e = a.current, t = e?.querySelector("[data-follow-image-dots]"), n = e?.closest("[data-stage-media]");
if (!e || !t) return;
- let i = lc(t, { drag: !0 }), o = () => {
+ let i = wc(t, { drag: !0 }), o = () => {
let a = t.querySelector("[aria-current=\"true\"]");
if (a && t.clientWidth) {
let e = a.getBoundingClientRect(), n = t.getBoundingClientRect(), r = parseFloat(getComputedStyle(t).paddingLeft);
@@ -69135,7 +69244,7 @@ function p2({ items: e, position: t, onSelect: n, below: r = !1, renderThumbnail
"data-media-thumbnails": "",
role: "group",
"aria-label": "媒体缩略图",
- children: e.map((e, r) => /* @__PURE__ */ (0, F.jsx)(ROe, {
+ children: e.map((e, r) => /* @__PURE__ */ (0, F.jsx)(tke, {
item: e,
selected: r === t,
onSelect: n,
@@ -69154,7 +69263,7 @@ function p2({ items: e, position: t, onSelect: n, below: r = !1, renderThumbnail
]
});
}
-function ROe({ item: e, selected: t, onSelect: n, render: r }) {
+function tke({ item: e, selected: t, onSelect: n, render: r }) {
let i = (0, P.useRef)(null), [a, o] = (0, P.useState)(typeof IntersectionObserver > "u");
return (0, P.useEffect)(() => {
if (!i.current || a) return;
@@ -69180,7 +69289,7 @@ function ROe({ item: e, selected: t, onSelect: n, render: r }) {
});
}
// src/react/follow-detail/follow-related.ts
-var zOe = (e, t, n) => [
+var nke = (e, t, n) => [
"follow-feed",
"related",
e,
@@ -69188,12 +69297,12 @@ var zOe = (e, t, n) => [
n
];
function m2(e, t, n, r) {
- let i = new Set((t.group ? Wi(t.group) : [t.item]).map((e) => e.id)), a = /* @__PURE__ */ new Set(), o = new Set(t.item.tags || []), s = t.sources.find((e) => e.id === t.item.source_id)?.author_key, c = new Map(e.flatMap((e) => e.sources || []).map((e) => [e.id, e]));
+ let i = new Set((t.group ? aa(t.group) : [t.item]).map((e) => e.id)), a = /* @__PURE__ */ new Set(), o = new Set(t.item.tags || []), s = t.sources.find((e) => e.id === t.item.source_id)?.author_key, c = new Map(e.flatMap((e) => e.sources || []).map((e) => [e.id, e]));
return e.flatMap((e) => e.groups || []).filter((e) => {
- let t = Wi(e);
- return t.some((e) => i.has(e.id) || a.has(e.id)) || !Xi(e).has(n === "images" ? "image" : "video") || Zi(e, n).status !== "new" ? !1 : (t.forEach((e) => a.add(e.id)), !0);
+ let t = aa(e);
+ return t.some((e) => i.has(e.id) || a.has(e.id)) || !da(e).has(n === "images" ? "image" : "video") || fa(e, n).status !== "new" ? !1 : (t.forEach((e) => a.add(e.id)), !0);
}).map((e, t) => {
- let r = Zi(e, n), i = r.source_id === void 0 ? void 0 : c.get(r.source_id);
+ let r = fa(e, n), i = r.source_id === void 0 ? void 0 : c.get(r.source_id);
return {
group: e,
order: t,
@@ -69202,15 +69311,15 @@ function m2(e, t, n, r) {
};
}).sort((e, t) => Number(t.sameAuthor) - Number(e.sameAuthor) || t.common - e.common || e.order - t.order).slice(0, r).map((e) => e.group);
}
-async function BOe(e, t, n, r) {
+async function rke(e, t, n, r) {
let i = e.sources.find((t) => t.id === e.item.source_id)?.author_key || "", a = {
- ...Qi(i),
+ ...pa(i),
status: "new",
media: t,
sort: "rand",
seed: e.item.id
}, o = [], s = async (e, t) => {
- let n = await B(Ii({
+ let n = await B(Zi({
...a,
author: e
}, t), r);
@@ -69231,7 +69340,7 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
queryKey: ["tag-management", n],
queryFn: ({ signal: e }) => B(`/api/tag-management${n === "online" ? "?scope=online" : ""}`, e),
enabled: f && (n === "online" || !t.length)
- }), h = m.data?.items?.filter((e) => !e.hidden && !e.blocked && (n === "online" || e.cat !== "meta")) || t, g = jH(), _ = (e) => {
+ }), h = m.data?.items?.filter((e) => !e.hidden && !e.blocked && (n === "online" || e.cat !== "meta")) || t, g = LH(), _ = (e) => {
g.run("rename", async (t) => {
let r = (await H.fetchQuery({
queryKey: ["tag-management", n],
@@ -69263,7 +69372,7 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
"data-edit-tag": e.k,
title: "修改标签名称",
"aria-label": `修改标签 ${a(e.k)}`,
- ...Uz(!!g.busy),
+ ...Yz(!!g.busy),
onClick: () => _(e),
children: /* @__PURE__ */ (0, F.jsx)(h2, { name: "pencil" })
}),
@@ -69277,7 +69386,7 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
children: /* @__PURE__ */ (0, F.jsx)(h2, { name: "x" })
})
]
- }, e.k)), /* @__PURE__ */ (0, F.jsx)(VOe, {
+ }, e.k)), /* @__PURE__ */ (0, F.jsx)(ike, {
tags: e,
candidates: h,
label: a,
@@ -69288,11 +69397,11 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
loading: m.isFetching
})]
}),
- g.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ g.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: g.error
}) : null,
- m.isError ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ m.isError ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -69301,7 +69410,7 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
}),
children: "无法读取标签候选"
}) : null,
- u ? /* @__PURE__ */ (0, F.jsx)(QQ, {
+ u ? /* @__PURE__ */ (0, F.jsx)($Q, {
operation: "rename",
selected: [u],
scope: n,
@@ -69310,8 +69419,8 @@ function g2({ tags: e, candidates: t, scope: n = "local", id: r, adding: i, labe
}) : null
] });
}
-function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a, onOpen: o, loading: s }) {
- let c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = cV(), d = (0, P.useRef)(null), f = (0, P.useRef)(!1), [p, m] = (0, P.useState)(!1), [h, g] = (0, P.useState)(""), [_, v] = (0, P.useState)(""), [y, b] = (0, P.useState)(-1), x = (0, P.useRef)({
+function ike({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a, onOpen: o, loading: s }) {
+ let c = (0, P.useRef)(null), l = (0, P.useRef)(null), u = mV(), d = (0, P.useRef)(null), f = (0, P.useRef)(!1), [p, m] = (0, P.useState)(!1), [h, g] = (0, P.useState)(""), [_, v] = (0, P.useState)(""), [y, b] = (0, P.useState)(-1), x = (0, P.useRef)({
adding: i,
query: h,
tags: e,
@@ -69330,7 +69439,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
let [e, t] = [c.current, l.current];
if (!e || !t) return;
"showPopover" in t && t.setAttribute("popover", "manual");
- let n = qo(e.parentElement, e, t);
+ let n = cs(e.parentElement, e, t);
S.current = n;
let r = () => {
let e = x.current;
@@ -69339,7 +69448,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
return;
}
let t = n.isOpen();
- m(t), t && (e.onOpen(), (!e.query.trim() || e.tags.some((t) => wn(t.k) === wn(e.query.trim()))) && (g(""), v("")), b(-1), requestAnimationFrame(() => d.current?.focus({ preventScroll: !0 })));
+ m(t), t && (e.onOpen(), (!e.query.trim() || e.tags.some((t) => zn(t.k) === zn(e.query.trim()))) && (g(""), v("")), b(-1), requestAnimationFrame(() => d.current?.focus({ preventScroll: !0 })));
};
e.addEventListener("click", r);
let i = new MutationObserver(() => m(n.isOpen()));
@@ -69356,7 +69465,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
_,
t.length
]);
- let w = p ? kce(_, t, dN()) : {
+ let w = p ? Lce(_, t, vN()) : {
recent: [],
results: [],
create: ""
@@ -69384,7 +69493,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
}
}, O = -1, k = (t) => {
O += 1;
- let r = O, i = e.some((e) => wn(e.k) === wn(t.k)), o = t.cat || e.find((e) => wn(e.k) === wn(t.k))?.cat || "unknown", s = o === "unknown" ? "r34-unknown" : a === "online" && [
+ let r = O, i = e.some((e) => zn(e.k) === zn(t.k)), o = t.cat || e.find((e) => zn(e.k) === zn(t.k))?.cat || "unknown", s = o === "unknown" ? "r34-unknown" : a === "online" && [
"general",
"artist",
"character",
@@ -69419,7 +69528,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
title: "添加标签",
"aria-label": "添加标签",
"aria-expanded": p,
- ...Uz(!!i),
+ ...Yz(!!i),
children: /* @__PURE__ */ (0, F.jsx)(h2, { name: "plus" })
}), /* @__PURE__ */ (0, F.jsxs)("div", {
ref: l,
@@ -69432,7 +69541,7 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
"data-tag-search": "",
children: [s ? /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: xs("正在读取标签") }
+ dangerouslySetInnerHTML: { __html: Is("正在读取标签") }
}) : /* @__PURE__ */ (0, F.jsx)(h2, { name: "search" }), /* @__PURE__ */ (0, F.jsx)("input", {
ref: d,
id: "tagPickSearch",
@@ -69494,15 +69603,15 @@ function VOe({ tags: e, candidates: t, label: n, onAdd: r, adding: i, scope: a,
})] });
}
// src/react/follow-detail/follow-tags.tsx
-function HOe({ item: e, label: t, actions: n }) {
- let r = jH(), i = () => H.invalidateQueries({ predicate: (e) => [
+function ake({ item: e, label: t, actions: n }) {
+ let r = LH(), i = () => H.invalidateQueries({ predicate: (e) => [
"follow-feed",
"follow",
"tag-management"
].includes(String(e.queryKey[0])) }), a = (e) => {
- Ki(e.item), H.setQueriesData({ queryKey: ["follow-item"] }, (t) => {
+ sa(e.item), H.setQueriesData({ queryKey: ["follow-item"] }, (t) => {
if (!t) return t;
- let n = Wi(e.group).find((e) => e.id === t.item.id);
+ let n = aa(e.group).find((e) => e.id === t.item.id);
return n ? {
...t,
item: n,
@@ -69518,7 +69627,7 @@ function HOe({ item: e, label: t, actions: n }) {
}, "POST", t);
a(n), await i();
}, () => {
- o === "add" && fN(s);
+ o === "add" && yN(s);
let r = o === "add" ? "remove" : e.custom_tags?.includes(s) ? "add" : "restore";
n.toast(o === "add" ? `已添加标签「${t(s)}」` : `已删除标签「${t(s)}」`, { undo: async () => {
let t = await V("/api/follow/tag", {
@@ -69535,9 +69644,9 @@ function HOe({ item: e, label: t, actions: n }) {
"data-follow-tag-editor": "",
"data-follow-detail-tags": "",
children: [/* @__PURE__ */ (0, F.jsx)(g2, {
- tags: jOe(e, t).map((t) => ({
+ tags: JOe(e, t).map((t) => ({
k: t,
- cat: AOe(e, t)
+ cat: qOe(e, t)
})),
scope: "online",
adding: !!r.busy,
@@ -69546,30 +69655,30 @@ function HOe({ item: e, label: t, actions: n }) {
onOpen: n.openTag,
onAdd: (e) => o("add", e),
onRemove: (e) => o("remove", e.k),
- busyAttrs: () => Uz(!!r.busy)
- }), r.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ busyAttrs: () => Yz(!!r.busy)
+ }), r.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: r.error
}) : null]
});
}
// src/react/follow-detail/follow-detail-page.tsx
-var _2 = (e) => Number(e) > 0, UOe = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
+var _2 = (e) => Number(e) > 0, oke = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: R(e) }
}), v2 = R("external-link", "ui-externalmark");
-function WOe(e) {
+function ske(e) {
let { id: t, actions: n } = e, r = Pt({
queryKey: Q0(t),
queryFn: ({ signal: e }) => e2(t, e)
}), i = Pt({
- queryKey: zi,
- queryFn: ({ signal: e }) => Bi(e)
+ queryKey: ea,
+ queryFn: ({ signal: e }) => ta(e)
}), a = (0, P.useMemo)(() => new Set((i.data?.providers || []).filter((e) => e.present).map((e) => e.provider)), [i.data]), [o, s] = (0, P.useState)(e.mediaIndex);
- return r.data ? /* @__PURE__ */ (0, F.jsx)(qOe, {
+ return r.data ? /* @__PURE__ */ (0, F.jsx)(uke, {
...e,
data: r.data,
- context: MOe(r.data, a),
+ context: YOe(r.data, a),
mediaIndex: o,
onMedia: s
}) : /* @__PURE__ */ (0, F.jsx)("div", {
@@ -69580,22 +69689,22 @@ function WOe(e) {
"data-follow-detail-media": "none",
children: [/* @__PURE__ */ (0, F.jsx)(y2, { onClose: n.close }), /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-detail-placeholder": "",
- children: r.isError ? GOe(r.error) ? /* @__PURE__ */ (0, F.jsx)(KOe, { onBack: n.close }) : /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(r.error),
+ children: r.isError ? cke(r.error) ? /* @__PURE__ */ (0, F.jsx)(lke, { onBack: n.close }) : /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(r.error),
onRetry: () => void r.refetch()
}) : null
})]
})
});
}
-var GOe = (e) => e instanceof $0 || e instanceof Hn && e.status === 404;
-function KOe({ onBack: e }) {
+var cke = (e) => e instanceof $0 || e instanceof rr && e.status === 404;
+function lke({ onBack: e }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-follow-detail-gone": "",
onClick: (t) => {
t.target.closest("[data-note-action]") && e();
},
- dangerouslySetInnerHTML: { __html: bs("这条关注内容已不存在,可能已被来源删除或已清理。", { actionLabel: "回到关注" }) }
+ dangerouslySetInnerHTML: { __html: Fs("这条关注内容已不存在,可能已被来源删除或已清理。", { actionLabel: "回到关注" }) }
});
}
var y2 = ({ onClose: e }) => /* @__PURE__ */ (0, F.jsx)("button", {
@@ -69607,8 +69716,8 @@ var y2 = ({ onClose: e }) => /* @__PURE__ */ (0, F.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: R("x") }
});
-function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, relatedLimit: a, helpers: o, actions: s }) {
- let { item: c, group: l } = e, u = SOe(c, l, n, i), d = $Oe(c, s, r), f = `${c.id}:${u.selected?.index ?? ""}`, [p, m] = (0, P.useState)({
+function uke({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, relatedLimit: a, helpers: o, actions: s }) {
+ let { item: c, group: l } = e, u = zOe(c, l, n, i), d = gke(c, s, r), f = `${c.id}:${u.selected?.index ?? ""}`, [p, m] = (0, P.useState)({
key: "",
kind: ""
}), h = {
@@ -69628,7 +69737,7 @@ function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, rel
c,
u.kind
]);
- let g = !u.embedded.length && u.collection ? COe(u.collection) : void 0, _ = u.embeddedQueue ? /* @__PURE__ */ (0, F.jsx)(C2, {
+ let g = !u.embedded.length && u.collection ? BOe(u.collection) : void 0, _ = u.embeddedQueue ? /* @__PURE__ */ (0, F.jsx)(C2, {
item: c,
current: u.selected.index,
helpers: o,
@@ -69641,7 +69750,7 @@ function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, rel
actions: s,
onMedia: r,
currentId: c.id
- }) : /* @__PURE__ */ (0, F.jsx)(XOe, {
+ }) : /* @__PURE__ */ (0, F.jsx)(pke, {
group: u.collection,
itemId: c.id,
helpers: o,
@@ -69651,14 +69760,14 @@ function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, rel
"data-stage-grid": "",
"data-with-queue": _ ? "" : void 0,
"data-follow-detail": "",
- children: [/* @__PURE__ */ (0, F.jsx)(YOe, {
+ children: [/* @__PURE__ */ (0, F.jsx)(fke, {
item: c,
media: u,
helpers: o,
actions: s,
onMedia: r,
issues: h
- }, f), /* @__PURE__ */ (0, F.jsx)(ZOe, {
+ }, f), /* @__PURE__ */ (0, F.jsx)(mke, {
item: c,
data: e,
context: t,
@@ -69670,7 +69779,7 @@ function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, rel
})]
}), /* @__PURE__ */ (0, F.jsx)(f2, {
queue: _,
- children: a > 0 ? /* @__PURE__ */ (0, F.jsx)(JOe, {
+ children: a > 0 ? /* @__PURE__ */ (0, F.jsx)(dke, {
data: e,
media: u.kind === "image" ? "images" : u.kind === "video" ? "videos" : i,
limit: a,
@@ -69680,10 +69789,10 @@ function qOe({ data: e, context: t, mediaIndex: n, onMedia: r, mediaView: i, rel
}) : null
})] });
}
-function JOe({ data: e, media: t, limit: n, context: r, helpers: i, actions: a }) {
+function dke({ data: e, media: t, limit: n, context: r, helpers: i, actions: a }) {
let o = Pt({
- queryKey: zOe(e.item.id, t, n),
- queryFn: ({ signal: r }) => BOe(e, t, n, r)
+ queryKey: nke(e.item.id, t, n),
+ queryFn: ({ signal: r }) => rke(e, t, n, r)
}), [s] = (0, P.useState)(() => s2("正在读取推荐", {
cards: !0,
className: "related-skeleton"
@@ -69702,11 +69811,11 @@ function JOe({ data: e, media: t, limit: n, context: r, helpers: i, actions: a }
wireDrag: i.wireDrag,
busy: o.isPending,
empty: !!o.data && !l.length,
- error: o.isError ? `读取接着看失败:${tn(o.error)}` : void 0,
+ error: o.isError ? `读取接着看失败:${_n(o.error)}` : void 0,
onRetry: () => {
o.refetch();
},
- children: o.data ? l.map((e) => /* @__PURE__ */ (0, F.jsx)(MZ, {
+ children: o.data ? l.map((e) => /* @__PURE__ */ (0, F.jsx)(NZ, {
variant: "next",
group: e,
media: t,
@@ -69723,8 +69832,8 @@ function JOe({ data: e, media: t, limit: n, context: r, helpers: i, actions: a }
})
});
}
-function YOe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
- let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, P.useRef)(null), p = NOe(e, t), m = o?.thumb_url || e.thumb_url || "", h = e.playable && a === "video", g = e.playable && a === "image" ? s : e.thumb_url || "", _ = e.playable && a === "image" && m && m !== s ? m : "", [v, y] = (0, P.useState)(g), b = (0, P.useRef)({
+function fke({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
+ let { kind: a, selected: o, src: s, images: c, position: l, carousel: u, frameRatio: d } = t, f = (0, P.useRef)(null), p = XOe(e, t), m = o?.thumb_url || e.thumb_url || "", h = e.playable && a === "video", g = e.playable && a === "image" ? s : e.thumb_url || "", _ = e.playable && a === "image" && m && m !== s ? m : "", [v, y] = (0, P.useState)(g), b = (0, P.useRef)({
item: e,
selected: o
}), x = (0, P.useRef)(i.failed);
@@ -69745,7 +69854,7 @@ function YOe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
src: v,
alt: e.title,
referrerPolicy: "no-referrer",
- onClick: p.length ? () => void xZ(Math.max(0, l), p) : void 0,
+ onClick: p.length ? () => void SZ(Math.max(0, l), p) : void 0,
onError: () => {
_ && v !== _ ? (y(_), i.thumbFallback()) : i.failed();
}
@@ -69753,7 +69862,7 @@ function YOe({ item: e, media: t, actions: n, onMedia: r, issues: i }) {
"data-follow-detail-placeholder": "",
children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
- dangerouslySetInnerHTML: { __html: qU(e.resource_provider || e.provider) }
+ dangerouslySetInnerHTML: { __html: $U(e.resource_provider || e.provider) }
}), /* @__PURE__ */ (0, F.jsx)("span", { children: "没有可用预览" })]
}),
u ? /* @__PURE__ */ (0, F.jsx)(p2, {
@@ -69792,25 +69901,25 @@ function S2(e) {
t && e.wireDrag(t);
}, [e]);
}
-function XOe({ group: e, itemId: t, helpers: n, actions: r }) {
- let i = $i(e), a = S2(n);
- return /* @__PURE__ */ (0, F.jsx)(CK, {
+function pke({ group: e, itemId: t, helpers: n, actions: r }) {
+ let i = ma(e), a = S2(n);
+ return /* @__PURE__ */ (0, F.jsx)(EK, {
kind: "collection",
"data-follow-queue": "",
title: "视频合集",
onClose: r.close,
listRef: a,
- summary: `${YU(e.primary)} · ${i.length} 个视频`,
+ summary: `${tW(e.primary)} · ${i.length} 个视频`,
children: i.map((n) => {
- let i = e.duplicates.includes(n), a = DOe(e, n, i ? n.provider_label : ""), o = i ? qU(n.provider, n.provider_label) : "";
- return /* @__PURE__ */ (0, F.jsxs)(wK, {
+ let i = e.duplicates.includes(n), a = WOe(e, n, i ? n.provider_label : ""), o = i ? $U(n.provider, n.provider_label) : "";
+ return /* @__PURE__ */ (0, F.jsxs)(DK, {
current: n.id === t,
"data-follow-queue-item": n.id,
onClick: () => r.openItem(n.id),
pic: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [n.thumb_url ? /* @__PURE__ */ (0, F.jsx)(x2, { src: n.thumb_url }) : /* @__PURE__ */ (0, F.jsx)(b2, { kind: "video" }), _2(n.duration) ? /* @__PURE__ */ (0, F.jsx)("i", {
className: "mono",
"data-mix-item-duration": "",
- children: kn(n.duration)
+ children: Wn(n.duration)
}) : null] }),
children: [/* @__PURE__ */ (0, F.jsx)("b", {
"data-truncate-end": "",
@@ -69825,7 +69934,7 @@ function XOe({ group: e, itemId: t, helpers: n, actions: r }) {
children: a.label
}), /* @__PURE__ */ (0, F.jsx)("time", {
dateTime: n.published_at || "",
- children: iW(n)
+ children: uW(n)
})]
})]
}, n.id);
@@ -69843,17 +69952,17 @@ function C2({ 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, F.jsx)(CK, {
+ return /* @__PURE__ */ (0, F.jsx)(EK, {
kind: "media",
"data-follow-queue": "",
title: "多媒体",
onClose: i.close,
listRef: s,
- summary: `${YU(e)} · ${o.length} 个媒体`,
- children: c.map((n) => [n.label ? /* @__PURE__ */ (0, F.jsx)(TK, {
+ summary: `${tW(e)} · ${o.length} 个媒体`,
+ children: c.map((n) => [n.label ? /* @__PURE__ */ (0, F.jsx)(U_e, {
label: n.label,
count: n.items.length
- }, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, F.jsxs)(wK, {
+ }, `label:${n.key}`) : null, ...n.items.map((n) => /* @__PURE__ */ (0, F.jsxs)(DK, {
current: n.index === t,
"data-follow-media-owner": e.id,
"data-follow-media-item": n.index,
@@ -69862,7 +69971,7 @@ function C2({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
pic: n.thumb_url ? /* @__PURE__ */ (0, F.jsx)(x2, { src: n.thumb_url }) : /* @__PURE__ */ (0, F.jsx)(b2, { kind: n.media_kind || "" }),
children: [/* @__PURE__ */ (0, F.jsx)("b", {
"data-middle-truncate": "",
- children: OOe(n)
+ children: GOe(n)
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-truncate-end": "",
children: n.media_kind === "image" ? "图片" : "视频"
@@ -69870,13 +69979,13 @@ function C2({ item: e, current: t, currentId: n = e.id, helpers: r, actions: i,
}, n.index))])
});
}
-function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
+function mke({ item: e, data: t, context: n, media: r, write: i, issue: a, helpers: o, actions: s }) {
let { kind: c, selected: l, src: u } = r, d = {
primary: e,
variants: [],
duplicates: [],
has_wip: e.variant_kind === "wip"
- }, f = tW(d, e), p = $U(e, a2(e, t.sources), n), m = p.credited ? "" : e.author && wn(e.author) !== wn(p.author) ? e.author : "", h = nW(e, n), g = e.status === "saved", { busy: _ } = i, v = (e) => _.has(e) ? {
+ }, f = sW(d, e), p = aW(e, a2(e, t.sources), n), m = p.credited ? "" : e.author && zn(e.author) !== zn(p.author) ? e.author : "", h = cW(e, n), g = e.status === "saved", { busy: _ } = i, v = (e) => _.has(e) ? {
"aria-busy": !0,
"aria-disabled": !0
} : {};
@@ -69892,7 +70001,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-title": "",
"data-follow-detail-name": "",
"data-reveal-line": "",
- dangerouslySetInnerHTML: { __html: eW(d, e) + z(YU(e)) }
+ dangerouslySetInnerHTML: { __html: oW(d, e) + z(tW(e)) }
}), e.url ? /* @__PURE__ */ (0, F.jsx)("a", {
"data-follow-origin": "",
href: e.url,
@@ -69908,8 +70017,8 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"data-stage-meta": "",
"data-reveal-line": "",
children: [
- /* @__PURE__ */ (0, F.jsx)("span", { children: iW(e) }),
- _2(e.duration) ? /* @__PURE__ */ (0, F.jsx)("span", { children: kn(e.duration) }) : null,
+ /* @__PURE__ */ (0, F.jsx)("span", { children: uW(e) }),
+ _2(e.duration) ? /* @__PURE__ */ (0, F.jsx)("span", { children: Wn(e.duration) }) : null,
f ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-follow-badges": "",
dangerouslySetInnerHTML: { __html: f }
@@ -69926,7 +70035,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
children: "创作者"
}), /* @__PURE__ */ (0, F.jsx)("div", {
"data-id-row": "",
- children: p.entityName ? /* @__PURE__ */ (0, F.jsxs)(AZ, {
+ children: p.entityName ? /* @__PURE__ */ (0, F.jsxs)(jZ, {
name: p.entityName,
actions: s,
"data-id-cell": "creator",
@@ -69958,7 +70067,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
children: [m ? /* @__PURE__ */ (0, F.jsxs)("span", { children: ["发布者 ", m] }) : null, p.credited ? /* @__PURE__ */ (0, F.jsxs)("span", { children: ["署名含 ", p.credited] }) : null]
}) : null]
}),
- e.summary ? /* @__PURE__ */ (0, F.jsx)(QOe, { text: e.summary }, e.id) : null,
+ e.summary ? /* @__PURE__ */ (0, F.jsx)(hke, { text: e.summary }, e.id) : null,
h ? /* @__PURE__ */ (0, F.jsx)("p", {
"data-follow-media-issue": "",
children: h
@@ -69981,7 +70090,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
href: e,
target: "_blank",
rel: "noreferrer noopener",
- children: [EOe(e), /* @__PURE__ */ (0, F.jsx)("span", {
+ children: [UOe(e), /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: v2 }
})]
@@ -70083,7 +70192,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"aria-label": `恢复显示 ${e.name || ""}`,
...v(`restore:${e.index}`),
onClick: () => i.restore(e.index),
- children: [e.thumb_url ? /* @__PURE__ */ (0, F.jsx)(x2, { src: e.thumb_url }) : /* @__PURE__ */ (0, F.jsx)(UOe, { name: "image-off" }), /* @__PURE__ */ (0, F.jsx)("i", { dangerouslySetInnerHTML: { __html: R("rotate-ccw") } })]
+ children: [e.thumb_url ? /* @__PURE__ */ (0, F.jsx)(x2, { src: e.thumb_url }) : /* @__PURE__ */ (0, F.jsx)(oke, { name: "image-off" }), /* @__PURE__ */ (0, F.jsx)("i", { dangerouslySetInnerHTML: { __html: R("rotate-ccw") } })]
}, e.index))
})]
}) : null,
@@ -70092,7 +70201,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
"aria-live": "polite",
children: i.failure
}),
- /* @__PURE__ */ (0, F.jsx)(HOe, {
+ /* @__PURE__ */ (0, F.jsx)(ake, {
item: e,
label: o.tagLabel,
actions: s
@@ -70101,7 +70210,7 @@ function ZOe({ item: e, data: t, context: n, media: r, write: i, issue: a, helpe
})
});
}
-function QOe({ text: e }) {
+function hke({ text: e }) {
let t = (0, P.useRef)(null), [n, r] = (0, P.useState)(!1), [i, a] = (0, P.useState)(!1);
return (0, P.useLayoutEffect)(() => {
let e = t.current;
@@ -70114,7 +70223,7 @@ function QOe({ text: e }) {
ref: t,
"data-follow-detail-summary": "",
"data-long-text": "",
- lang: mF(e),
+ lang: xF(e),
"data-clamped": n ? void 0 : "",
children: e
}), i || n ? /* @__PURE__ */ (0, F.jsx)(q, {
@@ -70126,7 +70235,7 @@ function QOe({ text: e }) {
children: n ? "收起" : "展开"
}) : null] });
}
-function $Oe(e, t, n) {
+function gke(e, t, n) {
let r = e.id, i = Q0(r), [a, o] = (0, P.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, P.useState)(""), l = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
@@ -70137,17 +70246,17 @@ function $Oe(e, t, n) {
...t.item,
status: e
}
- }), qi(r, e);
+ }), ca(r, e);
}, d = (e) => {
- c(tn(e) || "操作失败"), t.failure("更新关注状态", e);
+ c(_n(e) || "操作失败"), t.failure("更新关注状态", e);
}, f = Ft({
- mutationFn: ({ to: e }) => V(pr, {
+ mutationFn: ({ to: e }) => V(Or, {
item: r,
to: e
}),
onSuccess: (e, { to: n, was: i }) => {
- u(n), c(""), n === "ignored" && v$(), t.toast(POe(n), { undo: i === "saved" ? void 0 : async () => {
- await V(pr, {
+ u(n), c(""), n === "ignored" && y$(), t.toast(ZOe(n), { undo: i === "saved" ? void 0 : async () => {
+ await V(Or, {
item: r,
to: i
}), u(i);
@@ -70156,7 +70265,7 @@ function $Oe(e, t, n) {
onError: d,
onSettled: (e, t, { to: n }) => l(n, !1)
}), p = Ft({
- mutationFn: () => V(yOe, { item: r }),
+ mutationFn: () => V(IOe, { item: r }),
onSuccess: () => {
u("saved"), c(""), t.toast("已保存到数据库");
},
@@ -70164,7 +70273,7 @@ function $Oe(e, t, n) {
onSettled: () => l("save", !1)
}), m = Ft({
mutationFn: async ({ index: e, hidden: t }) => {
- await V(bOe, {
+ await V(LOe, {
item: r,
media: e,
hidden: t
@@ -70175,17 +70284,17 @@ function $Oe(e, t, n) {
},
onSuccess: (e, { hidden: r, next: a }) => {
let o = H.getQueryData(i);
- o && Ki(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
+ o && sa(o.item), n(a), c(""), t.toast(r ? "已隐藏这张图" : "已恢复显示");
},
onError: d,
onSettled: (e, t, { index: n, hidden: r }) => l(`${r ? "hide" : "restore"}:${n}`, !1)
}), h = Pt({
- queryKey: PTe(r),
- queryFn: ({ signal: e }) => LTe(r, e)
+ queryKey: YTe(r),
+ queryFn: ({ signal: e }) => QTe(r, e)
}).data?.want ?? null, g = Ft({
- mutationFn: async (e) => (e ? await _$([e.id]) : await g$({ follow: r }), !e),
+ mutationFn: async (e) => (e ? await v$([e.id]) : await _$({ follow: r }), !e),
onSuccess: (e) => {
- c(""), t.toast(e ? "已加入想要" : "已取消想要"), v$();
+ c(""), t.toast(e ? "已加入想要" : "已取消想要"), y$();
},
onError: d,
onSettled: () => l("want", !1)
@@ -70225,9 +70334,10 @@ function $Oe(e, t, n) {
}
// src/react/components/identity-cell.tsx
function w2({ kind: e, person: t, onOpen: n, hidden: r, overflow: i, face: a }) {
- let o = e === "performer" || e === "creator" ? /* @__PURE__ */ (0, F.jsx)("span", {
+ tI();
+ let o = Qt(e, t.name, t.id), s = e === "performer" || e === "creator" ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-id-face": "",
- dangerouslySetInnerHTML: { __html: `<span>${z(Fn(t.name))}</span>` + Xa({
+ dangerouslySetInnerHTML: { __html: `<span>${z(Xn(o))}</span>` + fo({
kind: e,
id: t.id,
hasImage: t.has_image,
@@ -70238,8 +70348,8 @@ function w2({ kind: e, person: t, onOpen: n, hidden: r, overflow: i, face: a })
}) }
}) : /* @__PURE__ */ (0, F.jsxs)("span", {
"data-id-face": "",
- children: [/* @__PURE__ */ (0, F.jsx)("span", { children: e === "studio" ? Pn(t.name, 2) : Fn(t.name) }), e === "studio" && t.has_logo ? /* @__PURE__ */ (0, F.jsx)("img", {
- src: qa(t.name, "icon", t.logo_version),
+ children: [/* @__PURE__ */ (0, F.jsx)("span", { children: e === "studio" ? Yn(t.name, 2) : Xn(t.name) }), e === "studio" && t.has_logo ? /* @__PURE__ */ (0, F.jsx)("img", {
+ src: co(t.name, "icon", t.logo_version),
alt: "",
width: 128,
height: 128,
@@ -70247,27 +70357,27 @@ function w2({ kind: e, person: t, onOpen: n, hidden: r, overflow: i, face: a })
decoding: "async",
"data-drop": "self"
}) : null]
- }), s = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [a ?? o, /* @__PURE__ */ (0, F.jsx)("span", {
+ }), c = /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [a ?? s, /* @__PURE__ */ (0, F.jsx)("span", {
"data-id-name": "",
- children: t.name
- })] }), c = {
+ children: o
+ })] }), l = {
"data-id-cell": e,
- title: t.name,
+ title: $t(e, t.name, t.id) || o,
hidden: r,
"data-castoverflow": i ? "" : void 0
};
return t.id ? /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
- ...c,
+ ...l,
"data-entity-kind": e,
"data-entity-name": t.name,
onClick: () => {
- Ut(e, t.name, t.id), n(e, t.name);
+ an(e, t.name, t.id), n(e, t.name);
},
- children: s
+ children: c
}) : /* @__PURE__ */ (0, F.jsx)("span", {
- ...c,
- children: s
+ ...l,
+ children: c
});
}
function T2({ people: e, onOpen: t }) {
@@ -70291,7 +70401,7 @@ function T2({ people: e, onOpen: t }) {
"data-entity-name": e.name,
title: e.name,
onClick: () => {
- Ut("series", e.name, e.id), t("series", e.name);
+ an("series", e.name, e.id), t("series", e.name);
},
children: n(e)
}, e.name) : /* @__PURE__ */ (0, F.jsx)("span", {
@@ -70322,7 +70432,7 @@ function E2(e) {
// src/react/item-detail/catalog-picture.tsx
function D2({ item: e, image: t, source: n = !1, thumbnail: r = !1 }) {
let [i, a] = (0, P.useState)(""), [o, s] = (0, P.useState)(0);
- if (n && t > 0 && e.code) return /* @__PURE__ */ (0, F.jsx)(dQ, {
+ if (n && t > 0 && e.code) return /* @__PURE__ */ (0, F.jsx)(fQ, {
item: {
code: e.code,
has_cover: !1,
@@ -70331,12 +70441,12 @@ function D2({ item: e, image: t, source: n = !1, thumbnail: r = !1 }) {
image: String(t - 1),
thumbnail: r
});
- let c = t < 0 ? Wa(e, !0) : `/${r ? "sample-thumb" : "sample-image"}?code=${encodeURIComponent(e.code || "")}&n=${t}`;
+ let c = t < 0 ? ao(e, !0) : `/${r ? "sample-thumb" : "sample-image"}?code=${encodeURIComponent(e.code || "")}&n=${t}`;
return r ? i === c ? /* @__PURE__ */ (0, F.jsx)("span", { children: "预览未取得" }) : /* @__PURE__ */ (0, F.jsx)("img", {
src: c,
alt: "",
onError: () => a(c)
- }) : i === c ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) : i === c ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -70354,20 +70464,20 @@ function D2({ item: e, image: t, source: n = !1, thumbnail: r = !1 }) {
}, o);
}
// src/react/jav-detail/jav-detail.ts
-var O2 = (e) => ["jav-detail", e], k2 = (e, t, n = !1) => B(`/api/jav/detail?code=${encodeURIComponent(e)}${n ? "&refresh=1" : ""}`, t), eke = (e, t, n, r = !1) => B(`/api/jav/reviews?code=${encodeURIComponent(e)}&page=${t}${r ? "&refresh=1" : ""}`, n), A2 = (e, t) => H.ensureQueryData({
+var O2 = (e) => ["jav-detail", e], k2 = (e, t, n = !1) => B(`/api/jav/detail?code=${encodeURIComponent(e)}${n ? "&refresh=1" : ""}`, t), _ke = (e, t, n, r = !1) => B(`/api/jav/reviews?code=${encodeURIComponent(e)}&page=${t}${r ? "&refresh=1" : ""}`, n), A2 = (e, t) => H.ensureQueryData({
queryKey: O2(e.code),
queryFn: () => k2(e.code, t),
staleTime: 216e5,
revalidateIfStale: !0
});
-function tke(e, t) {
+function vke(e, t) {
if (!e.ok || !e.more) return;
let n = new Set(t.slice(0, -1).flatMap((e) => e.items.map((e) => e.id)));
return e.items.some((e) => !n.has(e.id)) ? e.page + 1 : void 0;
}
// src/react/item-detail/external-playback.tsx
var j2 = "peach.playback-target.v1", M2 = [["m3u", "M3U 播放列表"], ["url", "网络播放地址 / VR"]];
-function nke() {
+function yke() {
try {
return localStorage.getItem(j2) || `local:${localStorage.getItem("peach.local-player.v1") || "default"}`;
} catch {
@@ -70375,7 +70485,7 @@ function nke() {
}
}
function N2({ id: e, onOpened: t }) {
- let [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)(nke), [o, s] = (0, P.useState)(null), [c, l] = (0, P.useState)(""), [u, d] = (0, P.useState)(0), f = jH();
+ let [n, r] = (0, P.useState)(null), [i, a] = (0, P.useState)(yke), [o, s] = (0, P.useState)(null), [c, l] = (0, P.useState)(""), [u, d] = (0, P.useState)(0), f = LH();
(0, P.useEffect)(() => {
let e = new AbortController();
return B("/api/local-players", e.signal).then((t) => {
@@ -70405,7 +70515,7 @@ function N2({ id: e, onOpened: t }) {
children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-local-playback-row": "",
- children: [/* @__PURE__ */ (0, F.jsx)(u1, {
+ children: [/* @__PURE__ */ (0, F.jsx)(d1, {
id: `external-player-${e}`,
label: "外部播放器",
options: [...(n || []).map((e) => [`local:${e.id}`, e.label]), ...M2],
@@ -70422,12 +70532,12 @@ function N2({ id: e, onOpened: t }) {
variant: "secondary",
"aria-label": "使用外部播放器打开",
disabled: n === null,
- ...Uz(f.busy === "open"),
+ ...Yz(f.busy === "open"),
onClick: p,
children: "打开"
})]
}),
- f.error || c ? /* @__PURE__ */ (0, F.jsx)(eU, { children: f.error || c }) : null,
+ f.error || c ? /* @__PURE__ */ (0, F.jsx)(oU, { children: f.error || c }) : null,
c ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
disabled: !!f.busy,
@@ -70436,16 +70546,16 @@ function N2({ id: e, onOpened: t }) {
},
children: "重新检测播放器"
}) : null,
- o ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(Fz, {
+ o ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(Vz, {
label: "网络播放地址",
value: o.url,
isReadOnly: !0
- }), /* @__PURE__ */ (0, F.jsx)($H, { children: "链接有效期为 6 小时。VR 播放器可使用网络播放地址;另一台设备需要能访问当前 Peach 地址。" })] }) : null
+ }), /* @__PURE__ */ (0, F.jsx)(aU, { children: "链接有效期为 6 小时。VR 播放器可使用网络播放地址;另一台设备需要能访问当前 Peach 地址。" })] }) : null
]
});
}
// src/react/boardui/components/base/switch/switch.tsx
-var rke = cF({
+var bke = hF({
sm: {
track: "h-4 w-7",
trackRadius: {
@@ -70507,23 +70617,23 @@ var rke = cF({
}
}
});
-function ike({ state: e, size: t = "md", shape: n = "pill" }) {
- let r = rke[t];
+function xke({ state: e, size: t = "md", shape: n = "pill" }) {
+ let r = bke[t];
return /* @__PURE__ */ (0, F.jsx)("span", {
"aria-hidden": !0,
- className: sF("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? sF("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: mF("relative shrink-0 transition-colors duration-200 ease", r.track, r.trackRadius[n], e.isSelected ? mF("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, F.jsx)("span", {
- className: sF("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, F.jsx)("span", { className: sF("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: mF("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, F.jsx)("span", { className: mF("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 P2({ className: e, children: t, size: n = "md", shape: r = "pill", ref: i, ...a }) {
- return /* @__PURE__ */ (0, F.jsx)(efe, {
+ return /* @__PURE__ */ (0, F.jsx)(ufe, {
ref: i,
...a,
- className: (t) => sF("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, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(ike, {
+ className: (t) => mF("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, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(xke, {
state: e,
size: n,
shape: r
@@ -70534,7 +70644,7 @@ function P2({ className: e, children: t, size: n = "md", shape: r = "pill", ref:
});
}
// src/react/cover-crop/cover-crop.ts
-var ake = "/api/cover-crop", oke = (e, t) => V(ake, {
+var Ske = "/api/cover-crop", Cke = (e, t) => V(Ske, {
code: e,
box: t
});
@@ -70552,7 +70662,7 @@ function F2({ className: e }) {
children: /* @__PURE__ */ (0, F.jsx)("use", { href: "#i-crop" })
});
}
-function ske({ code: e, coverUrl: t, box: n, onSaved: r }) {
+function wke({ code: e, coverUrl: t, box: n, onSaved: r }) {
let [i, a] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
@@ -70563,12 +70673,12 @@ function ske({ code: e, coverUrl: t, box: n, onSaved: r }) {
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, F.jsx)(F2, { className: "size-3.75" })
- }), /* @__PURE__ */ (0, F.jsx)(Iz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Hz, {
isOpen: i,
onOpenChange: a,
width: "cover-crop",
label: "裁剪封面",
- children: /* @__PURE__ */ (0, F.jsx)(cke, {
+ children: /* @__PURE__ */ (0, F.jsx)(Tke, {
code: e,
coverUrl: t,
box: n,
@@ -70577,9 +70687,9 @@ function ske({ code: e, coverUrl: t, box: n, onSaved: r }) {
})
})] });
}
-function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
- let [a, o] = (0, P.useState)(null), [s, c] = (0, P.useState)(null), [l, u] = (0, P.useState)(!0), d = cV(), f = Ft({
- mutationFn: (t) => oke(e, t),
+function Tke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
+ let [a, o] = (0, P.useState)(null), [s, c] = (0, P.useState)(null), [l, u] = (0, P.useState)(!0), d = mV(), f = Ft({
+ mutationFn: (t) => Cke(e, t),
onSuccess: (e) => {
i(), r(e.poster_box);
}
@@ -70591,19 +70701,19 @@ function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
y0: n.y0,
x1: n.x1,
y1: n.y1
- } : JCe(e, La);
- c(JZ(t, e, null));
+ } : lwe(e, Qa);
+ c(YZ(t, e, null));
}
let m = f.isPending;
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex shrink-0 items-start gap-4 p-5",
children: [
- /* @__PURE__ */ (0, F.jsx)(Lz, { children: /* @__PURE__ */ (0, F.jsx)(F2, { className: "size-6" }) }),
+ /* @__PURE__ */ (0, F.jsx)(Uz, { children: /* @__PURE__ */ (0, F.jsx)(F2, { className: "size-6" }) }),
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-1 flex-col gap-2",
children: [
- /* @__PURE__ */ (0, F.jsx)(FI, {
+ /* @__PURE__ */ (0, F.jsx)(VI, {
slot: "title",
className: "text-title-3-semibold text-text-primary",
children: "裁剪封面"
@@ -70612,14 +70722,14 @@ function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
className: "text-body-2-regular text-text-secondary",
children: [e, ":框出正封那一块,封面原图不动。拖动方框移动,滚轮或角上那枚方块改大小。"]
}),
- f.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ f.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(f.error)
+ children: ar(f.error)
}) : null
]
}),
- /* @__PURE__ */ (0, F.jsx)(ZF, {
- icon: hz,
+ /* @__PURE__ */ (0, F.jsx)(rI, {
+ icon: xz,
size: "small",
"aria-label": "关闭",
onClick: i
@@ -70629,14 +70739,14 @@ function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
/* @__PURE__ */ (0, F.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, F.jsx)($Z, {
+ children: /* @__PURE__ */ (0, F.jsx)(eQ, {
src: t,
- aspect: l ? La : null,
+ aspect: l ? Qa : null,
box: s,
size: a,
label: `${e} 的正封取景框`,
onSize: (e) => {
- KZ(e) && p(e);
+ qZ(e) && p(e);
},
onBox: c
})
@@ -70646,7 +70756,7 @@ function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
children: [/* @__PURE__ */ (0, F.jsx)(P2, {
isSelected: l,
onChange: (e) => {
- u(e), e && s && a && c(JZ(s, a, La));
+ u(e), e && s && a && c(YZ(s, a, Qa));
},
children: /* @__PURE__ */ (0, F.jsx)("span", {
className: "text-body-2-regular text-text-secondary",
@@ -70656,14 +70766,14 @@ function cke({ code: e, coverUrl: t, box: n, onSaved: r, close: i }) {
className: "flex flex-1 flex-wrap items-center justify-end gap-3",
children: [/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(m),
+ ...Yz(m),
onClick: () => {
m || f.mutate(null);
},
children: "恢复默认"
}), /* @__PURE__ */ (0, F.jsx)(q, {
disabled: !s || !a,
- ...Uz(m),
+ ...Yz(m),
onClick: () => {
s && !m && f.mutate(s);
},
@@ -70680,15 +70790,15 @@ var I2 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
}), L2 = ({ html: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
className: "contents",
dangerouslySetInnerHTML: { __html: e }
-}), R2 = (e) => Number(e) > 0 ? jn(Number(e)) : "大小未知";
-function lke(e) {
+}), R2 = (e) => Number(e) > 0 ? Kn(Number(e)) : "大小未知";
+function Eke(e) {
let { queue: t, actions: n } = e, r = Pt({
- queryKey: t ? KM(t) : ["item-queue", "none"],
- queryFn: ({ signal: n }) => tN(t, e.helpers, n),
+ queryKey: t ? $M(t) : ["item-queue", "none"],
+ queryFn: ({ signal: n }) => cN(t, e.helpers, n),
enabled: !!t
- }), i = t && r.data || null, a = i ? iN(i, e.id) : t ? null : e.id, o = Pt({
- queryKey: GM(a ?? 0),
- queryFn: ({ signal: e }) => eN(a, e),
+ }), i = t && r.data || null, a = i ? dN(i, e.id) : t ? null : e.id, o = Pt({
+ queryKey: QM(a ?? 0),
+ queryFn: ({ signal: e }) => sN(a, e),
enabled: a != null
});
if (!o.data || t && !i) {
@@ -70701,8 +70811,8 @@ function lke(e) {
"data-item-media": "none",
children: [/* @__PURE__ */ (0, F.jsx)(z2, { onClose: n.close }), /* @__PURE__ */ (0, F.jsx)("div", {
"data-item-placeholder": "",
- children: e ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: tn(e),
+ children: e ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: _n(e),
onRetry: () => {
r.error && r.refetch(), o.error && o.refetch();
}
@@ -70711,9 +70821,9 @@ function lke(e) {
})
});
}
- return /* @__PURE__ */ (0, F.jsx)(uke, {
+ return /* @__PURE__ */ (0, F.jsx)(Dke, {
...e,
- item: Ece(o.data, i),
+ item: Pce(o.data, i),
queue: i
}, o.data.id);
}
@@ -70726,23 +70836,23 @@ var z2 = ({ onClose: e }) => /* @__PURE__ */ (0, F.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: R("x") }
});
-function uke(e) {
- let { item: t, queue: n, actions: r, helpers: i } = e, a = Tke(t, r, i.tagLabel), o = (0, P.useRef)(t);
+function Dke(e) {
+ let { item: t, queue: n, actions: r, helpers: i } = e, a = Hke(t, r, i.tagLabel), o = (0, P.useRef)(t);
(0, P.useLayoutEffect)(() => {
r.present(o.current, n);
}, [r]), (0, P.useEffect)(() => {
- n?.kind === "playlist" && V(qM, {
+ n?.kind === "playlist" && V(eN, {
action: "progress",
id: n.playlistId,
asset_id: t.id
}).catch(() => {});
}, []);
- let s = Ice(t, i.sourceOffline(String(t.root_id || t.location || ""))), c = aN(n, t.id);
+ let s = Wce(t, i.sourceOffline(String(t.root_id || t.location || ""))), c = fN(n, t.id);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-stage-grid": "",
"data-with-queue": n ? "" : void 0,
"data-item-detail": "",
- children: [/* @__PURE__ */ (0, F.jsx)(dke, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Oke, {
item: t,
gate: s,
helpers: i,
@@ -70755,7 +70865,7 @@ function uke(e) {
autoplay: !0
}, c.id);
}
- }), /* @__PURE__ */ (0, F.jsx)(gke, {
+ }), /* @__PURE__ */ (0, F.jsx)(Nke, {
item: t,
queue: n,
write: a,
@@ -70764,13 +70874,13 @@ function uke(e) {
})]
}), /* @__PURE__ */ (0, F.jsx)(f2, {
queueCards: n?.kind === "parts" || n?.kind === "editions" ? n.items.length : void 0,
- queue: n ? /* @__PURE__ */ (0, F.jsx)(pke, {
+ queue: n ? /* @__PURE__ */ (0, F.jsx)(Ake, {
queue: n,
itemId: t.id,
helpers: i,
actions: r
}) : null,
- children: e.relatedLimit > 0 && (!n || n.kind === "parts" || n.kind === "editions") ? /* @__PURE__ */ (0, F.jsx)(wke, {
+ children: e.relatedLimit > 0 && (!n || n.kind === "parts" || n.kind === "editions") ? /* @__PURE__ */ (0, F.jsx)(Vke, {
...e,
item: n ? {
...t,
@@ -70779,7 +70889,7 @@ function uke(e) {
}) : null
})] });
}
-function dke({ item: e, gate: t, helpers: n, actions: r, autoplay: i, onEnded: a }) {
+function Oke({ item: e, gate: t, helpers: n, actions: r, autoplay: i, onEnded: a }) {
let [o, s] = (0, P.useState)(t ? "" : "auto"), c = (0, P.useRef)(null), [l, u] = (0, P.useState)(-2), d = (0, P.useRef)(!1), f = Pt({
queryKey: O2(e.code || ""),
queryFn: ({ signal: t }) => {
@@ -70865,8 +70975,8 @@ function dke({ item: e, gate: t, helpers: n, actions: r, autoplay: i, onEnded: a
className: "relative block h-12 w-20 skeleton-sheen"
}) : /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(f.isFetching),
- title: f.data?.message || tn(f.error),
+ ...Yz(f.isFetching),
+ title: f.data?.message || _n(f.error),
"aria-label": "立即重试样图",
onClick: () => {
d.current = !0, f.refetch();
@@ -70874,7 +70984,7 @@ function dke({ item: e, gate: t, helpers: n, actions: r, autoplay: i, onEnded: a
children: "立即重试"
})
}) : null,
- t === "offline" ? /* @__PURE__ */ (0, F.jsx)(fke, {
+ t === "offline" ? /* @__PURE__ */ (0, F.jsx)(kke, {
item: e,
badge: y,
helpers: n,
@@ -70915,7 +71025,7 @@ function dke({ item: e, gate: t, helpers: n, actions: r, autoplay: i, onEnded: a
]
});
}
-function fke({ item: e, badge: t, helpers: n, actions: r }) {
+function kke({ item: e, badge: t, helpers: n, actions: r }) {
let [i, a] = (0, P.useState)(!1), [o, s] = (0, P.useState)(!1), c = async () => {
a(!0);
let t = await r.checkSource(e.location || "").catch(() => !1);
@@ -70940,8 +71050,8 @@ function fke({ item: e, badge: t, helpers: n, actions: r }) {
]
});
}
-function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
- let i = Mce(e), a = (0, P.useRef)(null), o = hke(e, t, r), s = (0, P.useRef)(o);
+function Ake({ queue: e, itemId: t, helpers: n, actions: r }) {
+ let i = Bce(e), a = (0, P.useRef)(null), o = Mke(e, t, r), s = (0, P.useRef)(o);
s.current = o;
let c = (0, P.useCallback)((t) => {
a.current = t, t && (n.wireDrag(t), e.kind === "playlist" && n.wireDragReorder(t, {
@@ -70949,7 +71059,7 @@ function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
attribute: "data-queue-row",
onMove: (e, t, n) => s.current.move(+e, +t, n)
}));
- }, [n, e.kind]), l = mke(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, F.jsx)("button", {
+ }, [n, e.kind]), l = jke(e, r), u = e.kind === "mix" ? /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-save-mix": "",
title: "保存为播放列表",
@@ -70968,7 +71078,7 @@ function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
seedId: e.seedId,
playlistId: e.playlistId
};
- return /* @__PURE__ */ (0, F.jsx)(CK, {
+ return /* @__PURE__ */ (0, F.jsx)(EK, {
kind: e.kind,
title: i.title,
summary: i.summary,
@@ -70977,11 +71087,11 @@ function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
listRef: c,
children: e.items.map((i) => {
let a = e.kind === "editions" && i.edition_label ? /* @__PURE__ */ (0, F.jsx)("i", {
- className: `javedition ${Ace[i.edition_label] || "censored"}`,
+ className: `javedition ${Rce[i.edition_label] || "censored"}`,
"data-queue-edition": "",
children: i.edition_label
- }) : null, s = e.kind === "playlist" && rN(i);
- return /* @__PURE__ */ (0, F.jsxs)(wK, {
+ }) : null, s = e.kind === "playlist" && uN(i);
+ return /* @__PURE__ */ (0, F.jsxs)(DK, {
current: i.id === t,
"data-queue-item": i.id,
row: { "data-queue-row": i.id },
@@ -70991,12 +71101,12 @@ function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
onClick: () => {
s || r.openQueueItem(d, i.id);
},
- pic: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(L2, { html: co(i, n.javImage()) }), /* @__PURE__ */ (0, F.jsx)("i", {
+ pic: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(L2, { html: wo(i, n.javImage()) }), /* @__PURE__ */ (0, F.jsx)("i", {
className: "mono",
"data-mix-item-duration": "",
- children: kn(i.duration)
+ children: Wn(i.duration)
})] }),
- lead: /* @__PURE__ */ (0, F.jsx)(L2, { html: fo(i) }),
+ lead: /* @__PURE__ */ (0, F.jsx)(L2, { html: Do(i) }),
after: e.kind === "playlist" ? /* @__PURE__ */ (0, F.jsxs)("span", {
"data-queue-edit": "",
children: [/* @__PURE__ */ (0, F.jsx)("i", {
@@ -71020,14 +71130,14 @@ function pke({ queue: e, itemId: t, helpers: n, actions: r }) {
})]
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-truncate-end": "",
- children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" || e.kind === "editions" && i.part_label ? pN(i.part_label) : po(i, n.tagLabel)
+ children: s ? "已消失 · 文件已不在盘上" : e.kind === "parts" || e.kind === "editions" && i.part_label ? bN(i.part_label) : Oo(i, n.tagLabel)
})]
}, i.id);
})
});
}
-function mke(e, t) {
- let n = Ft({ mutationFn: (t) => V(qM, {
+function jke(e, t) {
+ let n = Ft({ mutationFn: (t) => V(eN, {
action: "create",
name: t,
asset_ids: e.items.map((e) => e.id),
@@ -71040,11 +71150,11 @@ function mke(e, t) {
save: (e) => n.mutateAsync(e)
});
}
-function hke(e, t, n) {
- let r = KM({
+function Mke(e, t, n) {
+ let r = $M({
kind: "playlist",
playlistId: e.playlistId
- }), i = (e) => (H.setQueryData(r, nN(e)), e), a = (t) => V(qM, {
+ }), i = (e) => (H.setQueryData(r, lN(e)), e), a = (t) => V(eN, {
id: e.playlistId,
...t
}).then((e) => e.playlist), o = Ft({
@@ -71060,8 +71170,8 @@ function hke(e, t, n) {
return {
move: async (t, r, c) => {
if (e.kind !== "playlist") return;
- let l = Pce(s, t, r, c);
- if (Fce(l, s)) return;
+ let l = Hce(s, t, r, c);
+ if (Uce(l, s)) return;
let u = s;
await o.mutateAsync(l), n.toast("已调整播放顺序", { undo: async () => {
i(await a({
@@ -71072,7 +71182,7 @@ function hke(e, t, n) {
},
remove: (e) => {
let r = s;
- Hc({
+ rl({
title: "移出播放列表",
body: "这个视频将从播放列表移除,视频文件保留。",
confirmLabel: "移出播放列表",
@@ -71103,7 +71213,7 @@ function hke(e, t, n) {
}
};
}
-function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
+function Nke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
let a = e.location === "online", o = n.busyAttrs, [s, c] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-stage-side": "",
@@ -71111,7 +71221,7 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
children: /* @__PURE__ */ (0, F.jsxs)("div", {
"data-stage-side-content": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(_ke, {
+ /* @__PURE__ */ (0, F.jsx)(Pke, {
item: e,
queue: t,
helpers: r,
@@ -71123,7 +71233,7 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
"aria-live": "polite",
children: n.sourceState
}),
- /* @__PURE__ */ (0, F.jsx)(yke, {
+ /* @__PURE__ */ (0, F.jsx)(Ike, {
item: e,
write: n
}),
@@ -71162,12 +71272,12 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
id: e.id,
onOpened: () => i.toast("已请求打开本地播放器")
}, e.id) : null,
- /* @__PURE__ */ (0, F.jsx)(bke, {
+ /* @__PURE__ */ (0, F.jsx)(Lke, {
item: e,
helpers: r,
actions: i
}),
- /* @__PURE__ */ (0, F.jsx)(xke, {
+ /* @__PURE__ */ (0, F.jsx)(Rke, {
item: e,
write: n,
helpers: r,
@@ -71176,10 +71286,10 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
/* @__PURE__ */ (0, F.jsx)(RK, {
assetIds: LK([e], r.javImage()),
onComplete: () => {
- H.invalidateQueries({ queryKey: GM(e.id) });
+ H.invalidateQueries({ queryKey: QM(e.id) });
}
}),
- /* @__PURE__ */ (0, F.jsx)(Ske, { item: e }),
+ /* @__PURE__ */ (0, F.jsx)(zke, { item: e }),
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-stage-actions": "",
"data-item-feedback": "",
@@ -71273,7 +71383,7 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
]
}),
- /* @__PURE__ */ (0, F.jsx)(Cke, {
+ /* @__PURE__ */ (0, F.jsx)(Bke, {
item: e,
open: s,
write: n
@@ -71297,8 +71407,8 @@ function gke({ item: e, queue: t, write: n, helpers: r, actions: i }) {
})
});
}
-function _ke({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
- let { text: a, expanded: o, foldable: s, toggle: c } = E2(String(e.title || e.name || "")), l = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + Nce(e, t);
+function Pke({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
+ let { text: a, expanded: o, foldable: s, toggle: c } = E2(String(e.title || e.name || "")), l = n.badgeHtml(e.location || "", e.cost || "", "srcbig") + n.titleHtml(e) + Vce(e, t);
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-item-title": "",
children: /* @__PURE__ */ (0, F.jsxs)("div", {
@@ -71325,23 +71435,23 @@ function _ke({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
"aria-label": o ? "收起标题" : "展开标题",
title: o ? "收起标题" : "展开完整标题",
onClick: c,
- children: /* @__PURE__ */ (0, F.jsx)(XH, {})
+ children: /* @__PURE__ */ (0, F.jsx)(nU, {})
}),
e.has_cover && (e.cover_key || e.code) ? /* @__PURE__ */ (0, F.jsx)("span", {
"data-cover-crop-host": "",
- children: /* @__PURE__ */ (0, F.jsx)(ske, {
+ children: /* @__PURE__ */ (0, F.jsx)(wke, {
code: e.cover_key || e.code || "",
- coverUrl: Wa(e),
+ coverUrl: ao(e),
box: e.poster_box || null,
onSaved: (t) => {
H.invalidateQueries({
- queryKey: GM(e.id),
+ queryKey: QM(e.id),
exact: !0
- }), VM((t) => (t.cover_key || t.code) === (e.cover_key || e.code), { poster_box: t });
+ }), JM((t) => (t.cover_key || t.code) === (e.cover_key || e.code), { poster_box: t });
}
})
}) : null,
- e.location === "online" ? null : /* @__PURE__ */ (0, F.jsx)(vke, {
+ e.location === "online" ? null : /* @__PURE__ */ (0, F.jsx)(Fke, {
id: e.id,
actions: r,
onStatus: i
@@ -71351,7 +71461,7 @@ function _ke({ item: e, queue: t, helpers: n, actions: r, onStatus: i }) {
})
});
}
-function vke({ id: e, actions: t, onStatus: n }) {
+function Fke({ id: e, actions: t, onStatus: n }) {
let [r, i] = (0, P.useState)(""), a = async () => {
r || (i("reveal"), n(""), n(await t.reveal(e)), i(""));
}, o = async () => {
@@ -71370,7 +71480,7 @@ function vke({ id: e, actions: t, onStatus: n }) {
"aria-disabled": !0
} : {},
onClick: () => void a(),
- dangerouslySetInnerHTML: { __html: r === "reveal" ? xs("正在定位") : R("folder-open") }
+ dangerouslySetInnerHTML: { __html: r === "reveal" ? Is("正在定位") : R("folder-open") }
}), /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-sync": e,
@@ -71384,14 +71494,14 @@ function vke({ id: e, actions: t, onStatus: n }) {
children: /* @__PURE__ */ (0, F.jsx)(I2, { name: "folder-sync" })
})] });
}
-function yke({ item: e, write: t }) {
- let n = UM(e.rating);
+function Ike({ item: e, write: t }) {
+ let n = XM(e.rating);
return /* @__PURE__ */ (0, F.jsxs)("div", {
id: "detailRating",
role: "group",
"data-item-rating": "",
"aria-label": "评分",
- "data-value": HM(e.rating),
+ "data-value": YM(e.rating),
children: [/* @__PURE__ */ (0, F.jsx)(ZJ, {
value: n,
onRate: (e) => t.rate(e),
@@ -71406,12 +71516,12 @@ function yke({ item: e, write: t }) {
}), /* @__PURE__ */ (0, F.jsx)("span", {
"data-rating-value": "",
"aria-live": "polite",
- children: Sce(e.rating)
+ children: Ace(e.rating)
})]
});
}
-function bke({ item: e, actions: t }) {
- let n = (0, P.useMemo)(() => Dce(e), [e]), [r, i] = (0, P.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
+function Lke({ item: e, actions: t }) {
+ let n = (0, P.useMemo)(() => Fce(e), [e]), [r, i] = (0, P.useState)(!1), a = Math.max(0, n.cast.length - 8), o = (e, n, i) => {
let a = e === "performer" && i >= 8 && !r;
return /* @__PURE__ */ (0, F.jsx)(w2, {
kind: e,
@@ -71452,12 +71562,12 @@ function bke({ item: e, actions: t }) {
})]
})
})]
- }, "unowned") : s(Ya(e), "performer", n.cast, a && !r ? /* @__PURE__ */ (0, F.jsxs)(q, {
+ }, "unowned") : s(uo(e), "performer", n.cast, a && !r ? /* @__PURE__ */ (0, F.jsxs)(q, {
variant: "secondary",
size: "small",
id: "castMore",
"data-cast-more": "",
- trailingIcon: fz,
+ trailingIcon: vz,
"aria-expanded": !1,
onClick: () => i(!0),
children: [
@@ -71482,12 +71592,12 @@ function bke({ item: e, actions: t }) {
})]
});
}
-function xke({ item: e, write: t, helpers: n, actions: r }) {
+function Rke({ item: e, write: t, helpers: n, actions: r }) {
return /* @__PURE__ */ (0, F.jsx)("div", {
"data-item-tags": "",
children: /* @__PURE__ */ (0, F.jsx)(g2, {
id: "detailTags",
- tags: Oce(e, n),
+ tags: Ice(e, n),
candidates: n.tagCandidates(),
label: n.tagLabel,
adding: [...t.busy].some((e) => e.startsWith("add:")),
@@ -71498,8 +71608,8 @@ function xke({ item: e, write: t, helpers: n, actions: r }) {
})
});
}
-function Ske({ item: e }) {
- let t = Lce(e);
+function zke({ item: e }) {
+ let t = Gce(e);
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-item-trace": "",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -71533,7 +71643,7 @@ function Ske({ item: e }) {
})]
});
}
-function Cke({ item: e, open: t, write: n }) {
+function Bke({ item: e, open: t, write: n }) {
let [r, i] = (0, P.useState)(e.like_reason || ""), a = (0, P.useRef)(null);
(0, P.useEffect)(() => {
t && a.current?.focus();
@@ -71567,21 +71677,21 @@ function Cke({ item: e, open: t, write: n }) {
"aria-label": "提交喜爱理由",
...n.busyAttrs("preference"),
onClick: () => n.preference({ reason: r }),
- dangerouslySetInnerHTML: { __html: o ? `${xs("正在提交喜爱理由")}<span>提交中</span>` : "<span>提交</span>" }
+ dangerouslySetInnerHTML: { __html: o ? `${Is("正在提交喜爱理由")}<span>提交中</span>` : "<span>提交</span>" }
})]
})]
});
}
-function wke(e) {
+function Vke(e) {
let { item: t, relatedLimit: n, helpers: r, grid: i } = e, a = Pt({
- queryKey: Cce(t.id, n),
- queryFn: async ({ signal: e }) => (await B(Tce(t.id, n), e)).items || []
+ queryKey: jce(t.id, n),
+ queryFn: async ({ signal: e }) => (await B(Nce(t.id, n), e)).items || []
}), [o] = (0, P.useState)(() => r.relatedSkeletonHtml());
return /* @__PURE__ */ (0, F.jsx)(d2, {
wireDrag: r.wireDrag,
busy: a.isPending,
empty: a.data?.length === 0,
- error: a.isError ? `读取接着看失败:${tn(a.error)}` : void 0,
+ error: a.isError ? `读取接着看失败:${_n(a.error)}` : void 0,
onRetry: () => {
a.refetch();
},
@@ -71601,8 +71711,8 @@ function wke(e) {
}) : /* @__PURE__ */ (0, F.jsx)(L2, { html: o })
});
}
-function Tke(e, t, n) {
- let r = e.id, i = GM(r), [a, o] = (0, P.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), d = (e, t) => o((n) => {
+function Hke(e, t, n) {
+ let r = e.id, i = QM(r), [a, o] = (0, P.useState)(() => /* @__PURE__ */ new Set()), [s, c] = (0, P.useState)(""), [l, u] = (0, P.useState)(""), d = (e, t) => o((n) => {
let r = new Set(n);
return t ? r.add(e) : r.delete(e), r;
}), f = () => H.getQueryData(i) || e, p = (e) => {
@@ -71618,7 +71728,7 @@ function Tke(e, t, n) {
rating: t.rating,
o_count: t.o_count
};
- return BM(r, n), t;
+ return qM(r, n), t;
}, m = (e, t) => V(e, {
id: r,
...t
@@ -71633,7 +71743,7 @@ function Tke(e, t, n) {
run: n
}));
}, _ = async (e, t) => {
- let n = await m(JM, t === void 0 ? { kind: e } : {
+ let n = await m(tN, t === void 0 ? { kind: e } : {
kind: e,
value: t
});
@@ -71653,21 +71763,21 @@ function Tke(e, t, n) {
"aria-disabled": !0
} : {},
rate: (e) => g(`rate:${e}`, "评分", async () => {
- let n = f().rating || 0, r = WM(n, e);
- await _("rate", r), t.toast(r ? `已评 ${UM(r)} 星` : "已取消评分", { undo: async () => {
+ let n = f().rating || 0, r = ZM(n, e);
+ await _("rate", r), t.toast(r ? `已评 ${XM(r)} 星` : "已取消评分", { undo: async () => {
await _("rate", n);
} });
}),
feedback: (e) => g(e, "操作", async () => {
let n = { feedback: f().feedback || null }, r = await _(e);
- t.toast(mN(e, r), { undo: async () => {
+ t.toast(xN(e, r), { undo: async () => {
e === "o" ? await _("o-undo") : e === "dispose" ? await _("dispose") : (r.feedback && await _(r.feedback), n.feedback && await _(n.feedback)), await t.trashChanged(f().disposal || null, !0);
} }), e === "dispose" && await t.trashChanged(r.disposal || null, !1);
}),
later: () => g("later", "更新稍后看", async () => {
- let e = await m(XM, {});
+ let e = await m(rN, {});
p({ watch_later: e.watch_later }), t.toast(e.watch_later ? "已加入稍后看" : "已移出稍后看", { undo: async () => {
- p({ watch_later: (await m(XM, {})).watch_later });
+ p({ watch_later: (await m(rN, {})).watch_later });
} });
}),
quality: () => g("quality", "更新版本需求", async () => {
@@ -71677,9 +71787,9 @@ function Tke(e, t, n) {
}, n = (e) => p({
better_version: e.better_version,
better_version_reason: e.better_version_reason || ""
- }), r = await m(ZM, { wanted: !e.wanted });
+ }), r = await m(iN, { wanted: !e.wanted });
n(r), t.toast(r.better_version ? "已标记寻找更好版本" : "已取消寻找更好版本", { undo: async () => {
- n(await m(ZM, e));
+ n(await m(iN, e));
} });
}),
preference: ({ liked: e, reason: n }) => {
@@ -71693,7 +71803,7 @@ function Tke(e, t, n) {
});
u("保存中…");
try {
- o(await m(QM, {
+ o(await m(aN, {
liked: a,
reason: i
}));
@@ -71703,7 +71813,7 @@ function Tke(e, t, n) {
u("已保存"), setTimeout(() => u((e) => e === "已保存" ? "" : e), 1400);
let s = f();
t.toast(s.liked ? "已保存喜欢偏好" : "已取消喜欢", { undo: async () => {
- o(await m(QM, r));
+ o(await m(aN, r));
} });
});
},
@@ -71712,37 +71822,37 @@ function Tke(e, t, n) {
operation: "remove",
tag: e.k
})).ok) throw Error("标签未删除");
- p((t) => cN(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
- await m(YM, {
+ p((t) => hN(t, e.k)), t.toast(`已删除标签「${n(e.k)}」`, { undo: async () => {
+ await m(nN, {
operation: "add",
tag: e.k
- }), p((t) => lN(t, e));
+ }), p((t) => gN(t, e));
} });
}),
addTag: (e) => {
let r = e.trim();
r && g(`add:${r}`, "添加标签", async () => {
- let e = await m(YM, {
+ let e = await m(nN, {
operation: "add",
tag: r
});
if (!e.ok) return;
let i = e.tag || r;
- sN(f(), i) ? t.toast(`标签「${n(i)}」已存在`) : (p((e) => lN(e, {
+ mN(f(), i) ? t.toast(`标签「${n(i)}」已存在`) : (p((e) => gN(e, {
k: i,
cat: "general"
- })), fN(i), t.toast(`已添加标签「${n(i)}」`, { undo: async () => {
- await m(YM, {
+ })), yN(i), t.toast(`已添加标签「${n(i)}」`, { undo: async () => {
+ await m(nN, {
operation: "remove",
tag: i
- }), p((e) => cN(e, i));
+ }), p((e) => hN(e, i));
} }));
});
}
};
}
// src/react/activity/downloads-panel.tsx
-var B2 = "/api/downloads", V2 = ["downloads"], Eke = "/api/downloads/cancel", Dke = "/api/downloads/postprocess", H2 = (e) => e?.tasks.some((e) => e.cancellable || e.postprocess_active) ? 5e3 : 3e4, Oke = {
+var B2 = "/api/downloads", V2 = ["downloads"], Uke = "/api/downloads/cancel", Wke = "/api/downloads/postprocess", H2 = (e) => e?.tasks.some((e) => e.cancellable || e.postprocess_active) ? 5e3 : 3e4, Gke = {
ingested: "lime",
failed: "rose",
cancelled: "neutral",
@@ -71752,14 +71862,14 @@ var B2 = "/api/downloads", V2 = ["downloads"], Eke = "/api/downloads/cancel", Dk
landed: "lime",
submitted: "neutral"
}, U2 = (e) => {
- let t = e.display_code || e.code || "", { title: n } = hF({
+ let t = e.display_code || e.code || "", { title: n } = SF({
is_jav: !!t,
code: t,
name: e.display_title ?? e.title ?? e.display_name ?? e.remote_name
});
return [t, n].filter(Boolean).join(" · ") || `磁力 ${e.info_hash?.slice(0, 8) ?? e.id}`;
-}, W2 = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "", kke = (e) => (e.postprocess_detail || "").replace("正片已绑定", "已确认主视频对应的作品").replace("整理跳过:", "未整理文件:");
-function Ake() {
+}, W2 = (e) => e.failure_label ? [e.failure_label, e.failure_detail].filter(Boolean).join(":") : "", Kke = (e) => (e.postprocess_detail || "").replace("正片已绑定", "已确认主视频对应的作品").replace("整理跳过:", "未整理文件:");
+function qke() {
let e = (0, P.useId)(), t = It({
queryKey: [...V2, "pages"],
initialPageParam: null,
@@ -71777,14 +71887,14 @@ function Ake() {
className: "text-title-2-medium text-text-primary",
children: "云下载"
}),
- t.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ t.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(t.error)
+ children: ar(t.error)
}) : null,
r.length ? /* @__PURE__ */ (0, F.jsx)("ul", {
"aria-live": "polite",
className: "flex min-w-0 flex-col gap-3",
- children: r.map((e) => /* @__PURE__ */ (0, F.jsx)(jke, {
+ children: r.map((e) => /* @__PURE__ */ (0, F.jsx)(Jke, {
task: e,
writable: n[0]?.available ?? !1
}, e.id))
@@ -71792,9 +71902,9 @@ function Ake() {
t.hasNextPage ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- leadingIcon: fz,
+ leadingIcon: vz,
className: "self-start",
- ...Uz(t.isFetchingNextPage),
+ ...Yz(t.isFetchingNextPage),
onClick: () => {
t.isFetching || t.fetchNextPage();
},
@@ -71803,15 +71913,15 @@ function Ake() {
]
});
}
-function jke({ task: e, writable: t }) {
- let n = oe(), r = jH(), [i, a] = (0, P.useState)(!1), [o, s] = (0, P.useState)(!1), c = (0, P.useId)(), l = W2(e) || (e.cancellable && e.failure_detail ? `稍后自动重试 · ${e.failure_detail}` : ""), u = e.artwork, d = u?.performer_entities || [], f = e.state === "ingested" && e.asset_id ? `/assets/${e.asset_id}` : void 0, p = e.state === "failed" || e.postprocess_state === "failed", m = [
+function Jke({ task: e, writable: t }) {
+ let n = oe(), r = LH(), [i, a] = (0, P.useState)(!1), [o, s] = (0, P.useState)(!1), c = (0, P.useId)(), l = W2(e) || (e.cancellable && e.failure_detail ? `稍后自动重试 · ${e.failure_detail}` : ""), u = e.artwork, d = u?.performer_entities || [], f = e.state === "ingested" && e.asset_id ? `/assets/${e.asset_id}` : void 0, p = e.state === "failed" || e.postprocess_state === "failed", m = [
e.display_code || e.code ? "" : "番号未识别",
e.target,
- GF(e.submitted_at)
+ XF(e.submitted_at)
].filter(Boolean).join(" · "), h = () => {
n.invalidateQueries({ queryKey: V2 });
}, g = () => {
- r.run("cancel", (t) => V(Eke, { id: e.id }, "POST", t), h);
+ r.run("cancel", (t) => V(Uke, { id: e.id }, "POST", t), h);
}, _ = () => {
let t = {
magnet: e.source_uri,
@@ -71825,12 +71935,12 @@ function jke({ task: e, writable: t }) {
}, v = () => {
navigator.clipboard.writeText(e.source_uri).then(() => a(!0), () => a(!1));
}, y = () => {
- r.run("postprocess", (t) => V(Dke, { id: e.id }, "POST", t), h);
+ r.run("postprocess", (t) => V(Wke, { id: e.id }, "POST", t), h);
};
return /* @__PURE__ */ (0, F.jsxs)("li", {
"data-download-state": e.state,
"data-download-id": e.id,
- className: UH({
+ className: YH({
padding: "none",
bordered: "line",
className: p ? "flex flex-col border-border-error-default" : "flex flex-col"
@@ -71841,19 +71951,19 @@ function jke({ task: e, writable: t }) {
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
"data-download-cover": "",
"data-media-pic": "",
- style: { "--card-ratio": String(DA) },
+ style: { "--card-ratio": String(NA) },
className: "w-20 shrink-0 self-start text-caption-1-regular text-text-secondary sm:w-32",
children: [
u?.has_cover ? null : /* @__PURE__ */ (0, F.jsx)("span", {
"data-media-nopic": "",
children: "无封面"
}),
- u?.has_cover ? /* @__PURE__ */ (0, F.jsx)(WW, {
+ u?.has_cover ? /* @__PURE__ */ (0, F.jsx)($W, {
artwork: {
kind: "cover",
- html: no(u, "big")
+ html: vo(u, "big")
},
- relayout: (e) => Sl(e, "big")
+ relayout: (e) => Ll(e, "big")
}) : null,
f ? /* @__PURE__ */ (0, F.jsx)("a", {
"data-download-cover-link": "",
@@ -71878,10 +71988,10 @@ function jke({ task: e, writable: t }) {
}) : U2(e)
}), /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex shrink-0 items-center gap-2",
- children: [/* @__PURE__ */ (0, F.jsx)(aZ, {
- color: Oke[e.state] ?? "neutral",
+ children: [/* @__PURE__ */ (0, F.jsx)(oZ, {
+ color: Gke[e.state] ?? "neutral",
children: e.state_label
- }), e.state === "ingested" ? /* @__PURE__ */ (0, F.jsx)(aZ, {
+ }), e.state === "ingested" ? /* @__PURE__ */ (0, F.jsx)(oZ, {
color: e.postprocess_state === "complete" ? "lime" : e.postprocess_state === "failed" ? "rose" : e.postprocess_state === "running" ? "blue" : "neutral",
children: e.postprocess_label
}) : null]
@@ -71891,7 +72001,7 @@ function jke({ task: e, writable: t }) {
className: "flex min-w-0 items-center gap-2 text-caption-1-regular text-text-secondary",
children: [/* @__PURE__ */ (0, F.jsx)("span", {
className: "flex shrink-0",
- children: /* @__PURE__ */ (0, F.jsx)(oU, {
+ children: /* @__PURE__ */ (0, F.jsx)(fU, {
source: e.provider,
label: e.provider_label
})
@@ -71907,10 +72017,10 @@ function jke({ task: e, writable: t }) {
className: "flex shrink-0 items-center gap-1",
children: d.slice(0, 3).map((e) => /* @__PURE__ */ (0, F.jsx)("a", {
"data-media-avatar": "",
- href: hn("performer", e.name, e.id),
+ href: An("performer", e.name, e.id),
"aria-label": `打开女优页:${e.name}`,
title: e.name,
- dangerouslySetInnerHTML: { __html: Za(e.name, e, null) }
+ dangerouslySetInnerHTML: { __html: po(e.name, e, null) }
}, e.id || e.name))
}), /* @__PURE__ */ (0, F.jsxs)("span", {
className: "min-w-0 truncate text-caption-1-regular text-text-secondary",
@@ -71918,7 +72028,7 @@ function jke({ task: e, writable: t }) {
children: [d.map((e) => e.name).join("、"), (u?.performer_total || 0) > d.length ? ` 等 ${u.performer_total} 人` : ""]
})]
}) : null,
- e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, F.jsx)(KH, {
+ e.state === "remote_running" && e.progress != null ? /* @__PURE__ */ (0, F.jsx)(QH, {
label: "远端下载进度",
value: Math.round(e.progress * 100),
max: 100
@@ -71928,7 +72038,7 @@ function jke({ task: e, writable: t }) {
title: e.ledger_path,
children: e.ledger_path
}) : null,
- r.error ? /* @__PURE__ */ (0, F.jsx)(eU, { children: r.error }) : null,
+ r.error ? /* @__PURE__ */ (0, F.jsx)(oU, { children: r.error }) : null,
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-download-actions": "",
className: "flex flex-wrap items-center gap-2 pt-1 sm:mt-auto",
@@ -71953,21 +72063,21 @@ function jke({ task: e, writable: t }) {
e.cancellable ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(r.busy === "cancel"),
+ ...Yz(r.busy === "cancel"),
onClick: g,
children: "取消"
}) : null,
e.resubmittable ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(r.busy === "resubmit"),
+ ...Yz(r.busy === "resubmit"),
onClick: _,
children: "重新提交"
}) : null,
e.postprocess_retryable ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- ...Uz(r.busy === "postprocess"),
+ ...Yz(r.busy === "postprocess"),
onClick: y,
children: "重试入库后整理"
}) : null
@@ -71988,7 +72098,7 @@ function jke({ task: e, writable: t }) {
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, F.jsx)("p", {
className: "wrap-anywhere text-caption-1-regular text-text-secondary",
- children: l || kke(e)
+ children: l || Kke(e)
})
}) : null
]
@@ -71997,18 +72107,18 @@ function jke({ task: e, writable: t }) {
// src/react/activity/work-code.ts
var G2 = (e) => (e || "").toUpperCase().replace(/[^A-Z0-9]/g, ""), K2 = (e, t) => !!G2(e) && G2(e) === G2(t);
// src/react/activity/resource-search.tsx
-function Mke({ className: e }) {
+function Yke({ className: e }) {
return /* @__PURE__ */ (0, F.jsx)("span", {
className: e,
"aria-hidden": !0,
- dangerouslySetInnerHTML: { __html: xs("") }
+ dangerouslySetInnerHTML: { __html: Is("") }
});
}
-function Nke(e) {
+function Xke(e) {
return ["中字", "中文字幕"].includes(e?.trim() ?? "") ? "chinese" : ["无码", "无码破解"].includes(e?.trim() ?? "") ? "uncensored" : "quality";
}
-function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
- let [a, o] = (0, P.useState)(e), [s, c] = (0, P.useState)(() => Nke(t)), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(""), [p, m] = (0, P.useState)(null), [h, g] = (0, P.useState)(""), [_, v] = (0, P.useState)(""), y = jH(), b = (0, P.useRef)(null);
+function Zke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
+ let [a, o] = (0, P.useState)(e), [s, c] = (0, P.useState)(() => Xke(t)), [l, u] = (0, P.useState)(""), [d, f] = (0, P.useState)(""), [p, m] = (0, P.useState)(null), [h, g] = (0, P.useState)(""), [_, v] = (0, P.useState)(""), y = LH(), b = (0, P.useRef)(null);
(0, P.useEffect)(() => () => b.current?.abort(), []);
let x = () => {
if (!a.trim() || y.busy) return;
@@ -72032,7 +72142,7 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
release_date: String(r.release_date || ""),
duration: r.duration,
studio: r.studio,
- cover: r.has_cover ? Wa(r, !0) : "",
+ cover: r.has_cover ? ao(r, !0) : "",
origin: `asset:${r.id}`
} : null);
}, () => {
@@ -72045,18 +72155,18 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
"aria-busy": !!y.busy,
className: "flex min-w-0 flex-col gap-4",
children: [
- t ? /* @__PURE__ */ (0, F.jsxs)($H, { children: [
+ t ? /* @__PURE__ */ (0, F.jsxs)(aU, { children: [
"版本目标:",
t,
"。可在下方调整搜索优先项;完整度与水印需要逐条复核。"
] }) : null,
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "按番号查找资源",
value: a,
maxLength: 80,
placeholder: "输入番号,按回车搜索",
enterKeyHint: "search",
- leadingIcon: y.busy ? Mke : Ez,
+ leadingIcon: y.busy ? Yke : Mz,
isReadOnly: !!y.busy,
"aria-busy": !!y.busy,
onChange: o,
@@ -72066,7 +72176,7 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-col gap-1",
- children: [/* @__PURE__ */ (0, F.jsx)(tU, { children: "优先寻找" }), /* @__PURE__ */ (0, F.jsxs)(AU, {
+ children: [/* @__PURE__ */ (0, F.jsx)(sU, { children: "优先寻找" }), /* @__PURE__ */ (0, F.jsxs)(IU, {
"aria-label": "优先寻找",
selectedKey: s,
isDisabled: !!y.busy,
@@ -72074,15 +72184,15 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
e !== null && c(String(e));
},
children: [
- /* @__PURE__ */ (0, F.jsx)(jU, {
+ /* @__PURE__ */ (0, F.jsx)(LU, {
id: "quality",
children: "高清"
}),
- /* @__PURE__ */ (0, F.jsx)(jU, {
+ /* @__PURE__ */ (0, F.jsx)(LU, {
id: "chinese",
children: "中字"
}),
- /* @__PURE__ */ (0, F.jsx)(jU, {
+ /* @__PURE__ */ (0, F.jsx)(LU, {
id: "uncensored",
children: "无码"
})
@@ -72091,32 +72201,32 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex gap-3 max-sm:flex-col",
- children: [/* @__PURE__ */ (0, F.jsx)(Fz, {
+ children: [/* @__PURE__ */ (0, F.jsx)(Vz, {
label: "最小体积(GiB)",
inputMode: "decimal",
value: l,
onChange: u
- }), /* @__PURE__ */ (0, F.jsx)(Fz, {
+ }), /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "最大体积(GiB)",
inputMode: "decimal",
value: d,
onChange: f
})]
}),
- y.busy ? /* @__PURE__ */ (0, F.jsx)($H, {
+ y.busy ? /* @__PURE__ */ (0, F.jsx)(aU, {
role: "status",
children: "正在搜索资源"
}) : null,
- y.error ? /* @__PURE__ */ (0, F.jsx)(eU, { children: y.error }) : null,
- p?.error ? /* @__PURE__ */ (0, F.jsx)($H, {
+ y.error ? /* @__PURE__ */ (0, F.jsx)(oU, { children: y.error }) : null,
+ p?.error ? /* @__PURE__ */ (0, F.jsx)(aU, {
role: "status",
children: p.error
}) : null,
- p?.state === "ready" && !p.items.length ? /* @__PURE__ */ (0, F.jsx)($H, {
+ p?.state === "ready" && !p.items.length ? /* @__PURE__ */ (0, F.jsx)(aU, {
role: "status",
children: "没有符合条件的资源。"
}) : null,
- p?.warnings.map((e) => /* @__PURE__ */ (0, F.jsx)($H, { children: e }, e)),
+ p?.warnings.map((e) => /* @__PURE__ */ (0, F.jsx)(aU, { children: e }, e)),
p?.items.length ? /* @__PURE__ */ (0, F.jsx)("ul", {
className: "flex min-w-0 flex-col gap-4",
children: p.items.map((e) => /* @__PURE__ */ (0, F.jsxs)("li", {
@@ -72126,7 +72236,7 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
className: "break-words text-body-2-medium text-text-primary",
children: e.name
}),
- /* @__PURE__ */ (0, F.jsx)($H, { children: [
+ /* @__PURE__ */ (0, F.jsx)(aU, { children: [
e.size > 0 ? `${(e.size / 1024 ** 3).toFixed(2)} GiB` : "体积未取得",
e.seeders >= 0 ? `${e.seeders} 个做种` : "做种未取得",
e.resolution ? `${e.resolution}p` : "",
@@ -72150,19 +72260,19 @@ function Pke({ initialCode: e, reason: t, choose: n, onSearch: r, onWork: i }) {
});
}
// src/react/activity/cloud-download-dialog.tsx
-var Fke = {
+var Qke = {
submitted: "已提交离线下载,进度在任务中心",
adopted: "这个磁力已有任务,没有重复提交",
adopted_remote: "网盘中已有相同的下载任务,Peach 已开始跟踪进度"
};
function q2({ prefill: e, close: t, receipt: n, provider: r }) {
- return /* @__PURE__ */ (0, F.jsx)(Iz, {
+ return /* @__PURE__ */ (0, F.jsx)(Hz, {
isOpen: !!e,
onOpenChange: (e) => {
e || t();
},
width: "form",
- children: e ? /* @__PURE__ */ (0, F.jsx)(Ike, {
+ children: e ? /* @__PURE__ */ (0, F.jsx)($ke, {
prefill: e,
close: t,
receipt: n,
@@ -72170,26 +72280,26 @@ function q2({ prefill: e, close: t, receipt: n, provider: r }) {
}) : null
});
}
-function Ike({ prefill: e, close: t, receipt: n, provider: r }) {
+function $ke({ prefill: e, close: t, receipt: n, provider: r }) {
let i = Pt({
queryKey: V2,
queryFn: ({ signal: e }) => B(`${B2}?limit=50`, e),
refetchInterval: (e) => H2(e.state.data)
}), a = i.data, o = /* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex items-center justify-between gap-4 px-5 pt-5",
- children: [/* @__PURE__ */ (0, F.jsx)(FI, {
+ children: [/* @__PURE__ */ (0, F.jsx)(VI, {
slot: "title",
className: "text-title-2-semibold text-text-primary",
children: "查找资源"
}), /* @__PURE__ */ (0, F.jsx)(q, {
variant: "ghost",
iconOnly: !0,
- leadingIcon: hz,
+ leadingIcon: xz,
"aria-label": "关闭资源面板",
onClick: t
})]
});
- return a ? /* @__PURE__ */ (0, F.jsx)(Lke, {
+ return a ? /* @__PURE__ */ (0, F.jsx)(eAe, {
header: o,
snapshot: a,
prefill: e,
@@ -72202,9 +72312,9 @@ function Ike({ prefill: e, close: t, receipt: n, provider: r }) {
o,
/* @__PURE__ */ (0, F.jsx)("div", {
className: "flex min-h-0 flex-col gap-4 overflow-y-auto p-5",
- children: i.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: i.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
- children: Wn(i.error)
+ children: ar(i.error)
}) : null
}),
/* @__PURE__ */ (0, F.jsx)("div", {
@@ -72218,8 +72328,8 @@ function Ike({ prefill: e, close: t, receipt: n, provider: r }) {
]
});
}
-function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provider: a }) {
- let o = oe(), s = t.providers.filter((e) => e.configured), c = s.find((e) => e.key === a) ?? s[0], [l, u] = (0, P.useState)(c?.key || ""), [d, f] = (0, P.useState)(""), [p, m] = (0, P.useState)(n.code ?? ""), [h, g] = (0, P.useState)(c?.target || ""), [_, v] = (0, P.useState)(n.code ? n : null), [y, b] = (0, P.useState)(""), x = t.available && s.some((e) => e.key === l), S = jH(), C = (0, P.useRef)(null), w = (e) => {
+function eAe({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provider: a }) {
+ let o = oe(), s = t.providers.filter((e) => e.configured), c = s.find((e) => e.key === a) ?? s[0], [l, u] = (0, P.useState)(c?.key || ""), [d, f] = (0, P.useState)(""), [p, m] = (0, P.useState)(n.code ?? ""), [h, g] = (0, P.useState)(c?.target || ""), [_, v] = (0, P.useState)(n.code ? n : null), [y, b] = (0, P.useState)(""), x = t.available && s.some((e) => e.key === l), S = LH(), C = (0, P.useRef)(null), w = (e) => {
u(e), g(s.find((t) => t.key === e)?.target ?? "");
};
return /* @__PURE__ */ (0, F.jsxs)("form", {
@@ -72237,7 +72347,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
};
b(""), S.run("submit", (e) => V(B2, t, "POST", e), (e) => {
o.invalidateQueries({ queryKey: V2 });
- let t = Fke[e.outcome];
+ let t = Qke[e.outcome];
if (e.ok && t) {
i(t), r();
return;
@@ -72266,7 +72376,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
children: [/* @__PURE__ */ (0, F.jsx)("p", {
className: "break-words text-body-medium text-text-primary",
children: _ ? [_.code, _.title].filter(Boolean).join(" · ") : "作品资料未取得"
- }), _ ? /* @__PURE__ */ (0, F.jsx)($H, { children: [
+ }), _ ? /* @__PURE__ */ (0, F.jsx)(aU, { children: [
_.performers,
_.studio,
_.release_date,
@@ -72274,7 +72384,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
].filter(Boolean).join(" · ") }) : null]
})]
}) : null,
- /* @__PURE__ */ (0, F.jsx)(Pke, {
+ /* @__PURE__ */ (0, F.jsx)(Zke, {
initialCode: n.code ?? "",
reason: n.searchReason,
onSearch: (e) => {
@@ -72289,7 +72399,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
f(e), m(t), C.current?.focus();
}
}),
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
ref: C,
label: "磁力链接",
placeholder: "magnet:?xt=urn:btih:…",
@@ -72301,38 +72411,38 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex flex-col gap-1",
children: [
- /* @__PURE__ */ (0, F.jsx)(tU, { children: "下载到" }),
- /* @__PURE__ */ (0, F.jsx)(AU, {
+ /* @__PURE__ */ (0, F.jsx)(sU, { children: "下载到" }),
+ /* @__PURE__ */ (0, F.jsx)(IU, {
"aria-label": "下载到",
selectedKey: l || null,
isDisabled: !s.length,
onSelectionChange: (e) => {
e !== null && w(String(e));
},
- children: s.map((e) => /* @__PURE__ */ (0, F.jsx)(jU, {
+ children: s.map((e) => /* @__PURE__ */ (0, F.jsx)(LU, {
id: e.key,
textValue: e.label,
- children: /* @__PURE__ */ (0, F.jsx)(oU, {
+ children: /* @__PURE__ */ (0, F.jsx)(fU, {
source: e.key,
label: e.label
})
}, e.key))
}),
- l === "115" ? /* @__PURE__ */ (0, F.jsx)($H, { children: "每提交一次扣一条离线配额,重新提交也算。" }) : null
+ l === "115" ? /* @__PURE__ */ (0, F.jsx)(aU, { children: "每提交一次扣一条离线配额,重新提交也算。" }) : null
]
}),
- t.available ? null : /* @__PURE__ */ (0, F.jsx)(Rz, {
+ t.available ? null : /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "云下载只在允许修改数据库的设备上可用。"
}),
- s.length ? null : /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ s.length ? null : /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: "neutral",
children: ["尚未配置下载渠道。", /* @__PURE__ */ (0, F.jsx)("a", {
href: "/settings/library?section=%E4%B8%8B%E8%BD%BD%E6%B8%A0%E9%81%93",
children: "下载渠道设置"
})]
}),
- /* @__PURE__ */ (0, F.jsx)(Fz, {
+ /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "目标目录",
placeholder: "/云下载",
autoComplete: "off",
@@ -72340,7 +72450,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
value: h,
onChange: g
}),
- n.code ? null : /* @__PURE__ */ (0, F.jsx)(Fz, {
+ n.code ? null : /* @__PURE__ */ (0, F.jsx)(Vz, {
label: "番号",
placeholder: "可不填",
autoComplete: "off",
@@ -72350,7 +72460,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
m(e), K2(e, _?.code) || v(null);
}
}),
- y || S.error ? /* @__PURE__ */ (0, F.jsx)(eU, { children: y || S.error }) : null
+ y || S.error ? /* @__PURE__ */ (0, F.jsx)(oU, { children: y || S.error }) : null
]
}),
/* @__PURE__ */ (0, F.jsxs)("div", {
@@ -72362,7 +72472,7 @@ function Lke({ header: e, snapshot: t, prefill: n, close: r, receipt: i, provide
}), /* @__PURE__ */ (0, F.jsx)(q, {
type: "submit",
disabled: !d.trim() || !x,
- ...Uz(S.busy === "submit"),
+ ...Yz(S.busy === "submit"),
children: "提交下载"
})]
})
@@ -72382,12 +72492,12 @@ function X2(e) {
let o = new Date(Date.UTC(n, r + 2, 0)).getUTCDate();
return Date.UTC(n, r + 1, Math.min(i, o));
}
-function Rke(e, t = Date.now()) {
+function tAe(e, t = Date.now()) {
let n = X2(e);
return n !== void 0 && Y2(t) > n ? Infinity : J2;
}
function Z2(e, t, n = Date.now()) {
- return !Number.isFinite(e) || e <= 0 || e > n ? !1 : Rke(t, n) === Infinity ? Y2(e) > X2(t) : n - e < J2;
+ return !Number.isFinite(e) || e <= 0 || e > n ? !1 : tAe(t, n) === Infinity ? Y2(e) > X2(t) : n - e < J2;
}
// src/react/wants/resource-cache.ts
var Q2 = "peach.want-resources.v2";
@@ -72409,11 +72519,11 @@ function t4() {
return [];
}
}
-function zke(e, t) {
+function nAe(e, t) {
let n = t4().find((t) => t.code === e);
return n && Z2(n.saved, t) ? n : void 0;
}
-function Bke(e) {
+function rAe(e) {
let t = new Map(t4().map((e) => [e.code, e])), n = /* @__PURE__ */ new Map();
for (let r of e) {
if (!r.code) continue;
@@ -72422,7 +72532,7 @@ function Bke(e) {
}
return n;
}
-function Vke(e, t) {
+function iAe(e, t) {
if (t.state === "ready" && $2(t)) try {
let n = t4().filter((t) => t.code !== e), r = Date.parse(t.checked_at || "");
localStorage.setItem(Q2, JSON.stringify([{
@@ -72433,11 +72543,11 @@ function Vke(e, t) {
} catch {}
}
// src/react/wants/resource-display.ts
-function Hke(e) {
+function aAe(e) {
let t = /^([\d,]+)\s*B$/i.exec(e.trim());
- return /^[\d,.]+$/.test(e.trim()) ? "大小未知" : t ? jn(Number(t[1].replaceAll(",", ""))) : e || "大小未知";
+ return /^[\d,.]+$/.test(e.trim()) ? "大小未知" : t ? Kn(Number(t[1].replaceAll(",", ""))) : e || "大小未知";
}
-function Uke(e) {
+function oAe(e) {
return /^更多评论.*(?:VIP|官方 App)/.test(e) ? "来源只返回了部分评论,资源链接可能不完整。" : e;
}
// src/react/wants/want-magnets.tsx
@@ -72452,7 +72562,7 @@ function n4({ icon: e, children: t, title: n }) {
});
}
function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSource: a, queryUrl: o }) {
- let s = (0, P.useRef)(null), [c, l] = (0, P.useState)(typeof IntersectionObserver > "u"), [u, d] = (0, P.useState)([]), f = jH(), p = oe(), m = (0, P.useRef)(!1), h = o ? `comment-resources:${o}:${e.code}` : `all-sources:${e.code || ""}`, g = (0, P.useMemo)(() => zke(h, e.release_date), [h, e.release_date]);
+ let s = (0, P.useRef)(null), [c, l] = (0, P.useState)(typeof IntersectionObserver > "u"), [u, d] = (0, P.useState)([]), f = LH(), p = oe(), m = (0, P.useRef)(!1), h = o ? `comment-resources:${o}:${e.code}` : `all-sources:${e.code || ""}`, g = (0, P.useMemo)(() => nAe(h, e.release_date), [h, e.release_date]);
(0, P.useEffect)(() => {
if (!s.current || c) return;
let e = new IntersectionObserver((t) => {
@@ -72472,7 +72582,7 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
],
queryFn: async ({ signal: t }) => {
let n = m.current, r = o || `/api/wants/magnets?id=${e.id}`, i = await B(`${r}${n ? `${r.includes("?") ? "&" : "?"}refresh=1` : ""}`, t);
- return m.current = n && i.state === "busy", Vke(h, i), i;
+ return m.current = n && i.state === "busy", iAe(h, i), i;
},
initialData: g?.result,
initialDataUpdatedAt: g?.saved,
@@ -72487,7 +72597,7 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
(0, P.useEffect)(() => {
_.data?.source_url && a?.(_.data.source_url);
}, [_.data?.source_url, a]), (0, P.useEffect)(() => {
- !o && _.data && (_.data.state === "ready" || _.data.items.length > 0) && ITe(e.id, _.data.items.some((e) => e.protocol === "magnet"));
+ !o && _.data && (_.data.state === "ready" || _.data.items.length > 0) && ZTe(e.id, _.data.items.some((e) => e.protocol === "magnet"));
}, [
_.data,
o,
@@ -72510,7 +72620,7 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
});
}, b = (e) => {
f.run(`copy:${e.id}`, () => navigator.clipboard.writeText(e.uri), () => i("已复制链接"));
- }, x = _.isFetching || _.data?.state === "busy", S = _.error ? Wn(_.error) : _.data?.error;
+ }, x = _.isFetching || _.data?.state === "busy", S = _.error ? ar(_.error) : _.data?.error;
return /* @__PURE__ */ (0, F.jsxs)("div", {
ref: s,
"data-want-magnets": "",
@@ -72524,39 +72634,39 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
}), /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- leadingIcon: Tz,
- ...Uz(x),
+ leadingIcon: jz,
+ ...Yz(x),
onClick: () => {
x || (m.current = !0, _.refetch());
},
children: "重新查询"
})]
}),
- x ? /* @__PURE__ */ (0, F.jsx)(WH, { label: "正在查找资源链接" }) : null,
- S ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ x ? /* @__PURE__ */ (0, F.jsx)(XH, { label: "正在查找资源链接" }) : null,
+ S ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
title: "资源链接未取得",
children: S
}) : null,
- _.data?.warnings?.map((e) => /* @__PURE__ */ (0, F.jsx)(Rz, {
+ _.data?.warnings?.map((e) => /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
- children: Uke(e)
+ children: oAe(e)
}, e)),
- _.data?.warnings?.length && _.data.source_url ? /* @__PURE__ */ (0, F.jsx)(pI, {
+ _.data?.warnings?.length && _.data.source_url ? /* @__PURE__ */ (0, F.jsx)(yI, {
variant: "secondary",
size: "small",
className: "self-start",
- trailingIcon: gz,
+ trailingIcon: Sz,
href: _.data.source_url,
target: "_blank",
rel: "noopener noreferrer",
children: "查看来源页"
}) : null,
- _.data?.state === "ready" && !_.data.items.length && !_.data.warnings?.length ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ _.data?.state === "ready" && !_.data.items.length && !_.data.warnings?.length ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "暂未找到资源链接。"
}) : null,
- f.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ f.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
title: "操作未完成",
children: f.error
@@ -72571,7 +72681,7 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
className: "flex min-w-0 flex-col gap-1",
children: [/* @__PURE__ */ (0, F.jsxs)("div", {
className: "flex min-w-0 flex-wrap items-center gap-2",
- children: [/* @__PURE__ */ (0, F.jsx)(aZ, {
+ children: [/* @__PURE__ */ (0, F.jsx)(oZ, {
variant: "caption",
color: e.protocol === "magnet" ? "blue" : e.protocol === "ed2k" ? "purple" : "neutral",
children: e.protocol === "magnet" ? "磁链" : e.protocol === "ed2k" ? "ED2K" : "网页链接"
@@ -72586,25 +72696,25 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
className: "flex flex-wrap gap-x-2 gap-y-1 text-caption-1-regular text-text-secondary",
children: [
/* @__PURE__ */ (0, F.jsx)(n4, {
- icon: Fpe,
+ icon: Gpe,
children: e.source
}),
/* @__PURE__ */ (0, F.jsx)(n4, {
- icon: bz,
+ icon: Ez,
title: `来源大小:${e.size}`,
- children: Hke(e.size)
+ children: aAe(e.size)
}),
e.files ? /* @__PURE__ */ (0, F.jsx)(n4, {
- icon: Epe,
+ icon: Ipe,
children: e.files.replaceAll("個", "个")
}) : null,
/* @__PURE__ */ (0, F.jsx)(n4, {
- icon: fpe,
+ icon: Spe,
title: e.source === "JavDB 评论" ? "评论日期" : "收录日期",
children: e.date ? e.date.slice(0, 10) : "日期未知"
}),
e.attributes.filter((e) => e !== "高清").map((e) => /* @__PURE__ */ (0, F.jsx)(n4, {
- icon: wz,
+ icon: Az,
children: e
}, e))
]
@@ -72613,11 +72723,11 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
"data-resource-actions": "",
className: "flex flex-wrap gap-2",
children: [
- /* @__PURE__ */ (0, F.jsx)(pI, {
+ /* @__PURE__ */ (0, F.jsx)(yI, {
"data-button-link": "",
variant: "secondary",
size: "small",
- trailingIcon: gz,
+ trailingIcon: Sz,
href: e.source_url,
target: "_blank",
rel: "noopener noreferrer",
@@ -72626,18 +72736,18 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
/* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
size: "small",
- leadingIcon: wpe,
- ...Uz(f.busy === `copy:${e.id}`),
+ leadingIcon: Ppe,
+ ...Yz(f.busy === `copy:${e.id}`),
onClick: () => b(e),
children: "复制链接"
}),
e.protocol === "magnet" ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "primary",
size: "small",
- leadingIcon: v ? aU(v.key) : vpe,
+ leadingIcon: v ? dU(v.key) : Ope,
title: v ? `下载到 ${v.label}` : void 0,
disabled: t || !n?.available || !v || r,
- ...Uz(f.busy === e.id),
+ ...Yz(f.busy === e.id),
onClick: () => y(e),
children: r ? "已添加" : "添加下载"
}) : null
@@ -72648,7 +72758,7 @@ function r4({ want: e, readOnly: t, downloads: n, provider: r, toast: i, onSourc
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)("ul", {
className: "flex min-w-0 flex-col gap-4",
children: e.slice(0, 3)
- }), e.length > 3 ? /* @__PURE__ */ (0, F.jsx)(nU, {
+ }), e.length > 3 ? /* @__PURE__ */ (0, F.jsx)(cU, {
summary: `更多资源(${e.length - 3} 条)`,
children: /* @__PURE__ */ (0, F.jsx)("ul", {
className: "flex min-w-0 flex-col gap-4",
@@ -72671,7 +72781,7 @@ function a4() {
return [];
}
}
-function Wke(e, t) {
+function sAe(e, t) {
if (t.ok && !t.cache_stale) try {
let n = Date.parse(t.checked_at || ""), r = [{
code: e,
@@ -72681,7 +72791,7 @@ function Wke(e, t) {
i.length <= 2e6 && localStorage.setItem(i4, i);
} catch {}
}
-function Gke(e, t) {
+function cAe(e, t) {
let n = a4(), r = [], i = Infinity;
for (let a = 1; a <= 8; a++) {
let o = n.find((t) => t.code === e && t.result.page === a);
@@ -72693,11 +72803,11 @@ function Gke(e, t) {
saved: i
} : void 0;
}
-function Kke(e, t, n) {
+function lAe(e, t, n) {
return e.length > 0 && e.every((e) => e.ok && !e.cache_stale && Z2(Date.parse(e.checked_at || "") || t, n));
}
// src/react/jav-detail/jav-detail-page.tsx
-function qke(e) {
+function uAe(e) {
let t = (0, P.useRef)(!1), n = Pt({
queryKey: O2(e.code),
queryFn: ({ signal: n }) => {
@@ -72712,15 +72822,15 @@ function qke(e) {
"data-jav-detail": "",
"data-item-detail": "",
"data-stage-grid": "",
- children: n.data ? /* @__PURE__ */ (0, F.jsx)(Jke, {
+ children: n.data ? /* @__PURE__ */ (0, F.jsx)(dAe, {
...e,
item: n.data,
retry: r,
retrying: n.isFetching
}, e.code) : /* @__PURE__ */ (0, F.jsxs)("div", {
"data-jav-failure": "",
- children: [/* @__PURE__ */ (0, F.jsx)(o4, { close: e.actions.close }), n.error ? /* @__PURE__ */ (0, F.jsx)(UW, {
- message: Wn(n.error),
+ children: [/* @__PURE__ */ (0, F.jsx)(o4, { close: e.actions.close }), n.error ? /* @__PURE__ */ (0, F.jsx)(QW, {
+ message: ar(n.error),
onRetry: r
}) : null]
})
@@ -72735,7 +72845,7 @@ var o4 = ({ close: e }) => /* @__PURE__ */ (0, F.jsx)("button", {
onClick: e,
dangerouslySetInnerHTML: { __html: R("x") }
});
-function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a }) {
+function dAe({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a }) {
(0, P.useEffect)(() => {
n.canonicalCode?.(t.code);
}, [n, t.code]), (0, P.useEffect)(() => {
@@ -72755,13 +72865,13 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
label: "视频预览",
video: !0
}] : []
- ], [l, u] = (0, P.useState)(null), [d, f] = (0, P.useState)(t.want_id), p = jH(), m = () => {
- p.run("want", async (e) => d ? (await _$([d], e), null) : (await g$({ code: t.code }, e)).want.id, (t) => {
+ ], [l, u] = (0, P.useState)(null), [d, f] = (0, P.useState)(t.want_id), p = LH(), m = () => {
+ p.run("want", async (e) => d ? (await v$([d], e), null) : (await _$({ code: t.code }, e)).want.id, (t) => {
f(t), H.setQueryData(O2(e), (e) => e && {
...e,
wanted: !!t,
want_id: t
- }), n.receipt(t ? "已加入想要" : "已取消想要"), v$(), H.invalidateQueries({ queryKey: ["feed-new"] }), H.invalidateQueries({ queryKey: ["jav-discoveries"] });
+ }), n.receipt(t ? "已加入想要" : "已取消想要"), y$(), H.invalidateQueries({ queryKey: ["feed-new"] }), H.invalidateQueries({ queryKey: ["jav-discoveries"] });
});
};
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
@@ -72778,7 +72888,7 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
onClick: () => s(o === -2 ? -1 : -2),
children: [/* @__PURE__ */ (0, F.jsx)(s4, { name: o === -2 ? "image" : "play" }), o === -2 ? "查看图片" : "视频预览"]
}) : null,
- o === -2 && t.preview_video_url ? /* @__PURE__ */ (0, F.jsx)(Zke, { src: t.preview_video_url }, t.preview_video_url) : /* @__PURE__ */ (0, F.jsx)(dQ, {
+ o === -2 && t.preview_video_url ? /* @__PURE__ */ (0, F.jsx)(mAe, { src: t.preview_video_url }, t.preview_video_url) : /* @__PURE__ */ (0, F.jsx)(fQ, {
item: t,
image: o === -1 ? "cover" : String(o)
}, t.code),
@@ -72787,7 +72897,7 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
position: Math.max(0, c.findIndex((e) => e.index === o)),
onSelect: s,
below: !0,
- renderThumbnail: (e) => /* @__PURE__ */ (0, F.jsx)(dQ, {
+ renderThumbnail: (e) => /* @__PURE__ */ (0, F.jsx)(fQ, {
item: t,
image: e.index < 0 ? "cover" : String(e.index),
thumbnail: !0
@@ -72801,7 +72911,7 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
"data-stage-side-content": "",
"data-jav-info": "",
children: [
- /* @__PURE__ */ (0, F.jsx)(Yke, { item: t }),
+ /* @__PURE__ */ (0, F.jsx)(fAe, { item: t }),
Number(t.score) > 0 ? /* @__PURE__ */ (0, F.jsx)(l4, { score: Number(t.score) }) : null,
/* @__PURE__ */ (0, F.jsxs)("div", {
className: "mono",
@@ -72817,7 +72927,7 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
value: t.duration ? `${t.duration} 分钟` : void 0
})]
}),
- /* @__PURE__ */ (0, F.jsx)(Xke, {
+ /* @__PURE__ */ (0, F.jsx)(pAe, {
item: t,
navigate: n.navigate
}),
@@ -72847,23 +72957,23 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
children: /* @__PURE__ */ (0, F.jsx)("button", {
type: "button",
"data-tag": e.name,
- title: Nl(e.name),
+ title: Jl(e.name),
onClick: () => n.openTag(e.name),
- children: Nl(e.name)
+ children: Jl(e.name)
})
}, e.name))
}) : null,
t.summary ? /* @__PURE__ */ (0, F.jsx)("p", {
"data-jav-summary": "",
"data-long-text": "",
- lang: mF(t.summary),
+ lang: xF(t.summary),
children: t.summary
}) : null,
- t.message ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ t.message ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(a),
+ ...Yz(a),
onClick: i,
children: "立即重试"
}),
@@ -72872,10 +72982,10 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
/* @__PURE__ */ (0, F.jsxs)("div", {
"data-jav-actions": "",
children: [
- t.source_url ? /* @__PURE__ */ (0, F.jsx)(pI, {
+ t.source_url ? /* @__PURE__ */ (0, F.jsx)(yI, {
"data-button-link": "",
variant: "secondary",
- trailingIcon: gz,
+ trailingIcon: Sz,
href: t.source_url,
target: "_blank",
rel: "noopener noreferrer",
@@ -72885,7 +72995,7 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
variant: "secondary",
disabled: r,
"aria-pressed": !!d,
- ...Uz(!!p.busy),
+ ...Yz(!!p.busy),
onClick: m,
children: d ? "取消想要" : "想要"
}),
@@ -72903,16 +73013,16 @@ function Jke({ code: e, item: t, actions: n, readOnly: r, retry: i, retrying: a
})
]
}),
- p.error ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ p.error ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "error",
children: p.error
}) : null,
- /* @__PURE__ */ (0, F.jsx)(Qke, {
+ /* @__PURE__ */ (0, F.jsx)(hAe, {
code: t.code,
count: t.comments_count,
released: t.release_date
}),
- /* @__PURE__ */ (0, F.jsx)($ke, {
+ /* @__PURE__ */ (0, F.jsx)(gAe, {
item: t,
actions: n,
readOnly: r
@@ -72936,7 +73046,7 @@ var s4 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("span", {
title: t,
children: [/* @__PURE__ */ (0, F.jsx)(s4, { name: e }), /* @__PURE__ */ (0, F.jsx)("span", { children: n })]
}) : null;
-function Yke({ item: e }) {
+function fAe({ item: e }) {
let { text: t, expanded: n, foldable: r, toggle: i } = E2(e.title), a = e.title === e.code ? "" : e.title;
return /* @__PURE__ */ (0, F.jsxs)("div", {
"data-item-title": "",
@@ -72953,7 +73063,7 @@ function Yke({ item: e }) {
r && !String(getSelection() || "") && i();
},
children: [/* @__PURE__ */ (0, F.jsx)("b", { children: e.code }), a ? /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [" ", /* @__PURE__ */ (0, F.jsx)("span", {
- lang: mF(a),
+ lang: xF(a),
children: a
})] }) : null]
})
@@ -72967,7 +73077,7 @@ function Yke({ item: e }) {
"aria-label": n ? "收起标题" : "展开标题",
title: n ? "收起标题" : "展开完整标题",
onClick: i,
- children: /* @__PURE__ */ (0, F.jsx)(XH, {})
+ children: /* @__PURE__ */ (0, F.jsx)(nU, {})
})
})]
});
@@ -72985,8 +73095,8 @@ function l4({ score: e, review: t = !1 }) {
})]
});
}
-function Xke({ item: e, navigate: t }) {
- let n = (e, n) => t(hn(e, n)), r = (t, r, i, a) => i.length ? /* @__PURE__ */ (0, F.jsxs)("section", {
+function pAe({ item: e, navigate: t }) {
+ let n = (e, n) => t(An(e, n)), r = (t, r, i, a) => i.length ? /* @__PURE__ */ (0, F.jsxs)("section", {
"data-id-group": t,
"data-id-gender": a,
children: [/* @__PURE__ */ (0, F.jsx)("h5", {
@@ -73001,7 +73111,7 @@ function Xke({ item: e, navigate: t }) {
id: r.id ?? null
},
onOpen: n,
- face: t === "performer" && !r.has_image && !r.has_avatar && r.source_avatar && r.source_actor_id ? /* @__PURE__ */ (0, F.jsx)(fQ, {
+ face: t === "performer" && !r.has_image && !r.has_avatar && r.source_avatar && r.source_actor_id ? /* @__PURE__ */ (0, F.jsx)(pQ, {
code: e.code,
person: r,
detail: !0
@@ -73027,18 +73137,18 @@ function Xke({ item: e, navigate: t }) {
})]
});
}
-function Zke({ src: e }) {
+function mAe({ src: e }) {
let t = (0, P.useRef)(null), [n, r] = (0, P.useState)(!1), [i, a] = (0, P.useState)(0);
return (0, P.useLayoutEffect)(() => {
let n = t.current, i = document.createElement("video");
- return i.className = "video-js vjs-big-play-centered", i.controls = !0, i.setAttribute("playsinline", ""), i.setAttribute("aria-label", "视频预览"), n.append(i), oce(i, {
+ return i.className = "video-js vjs-big-play-centered", i.controls = !0, i.setAttribute("playsinline", ""), i.setAttribute("aria-label", "视频预览"), n.append(i), mce(i, {
src: e,
type: /\.m3u8(?:\?|$)/i.test(e) ? "application/x-mpegURL" : "video/mp4"
}, () => r(!0));
}, [e, i]), /* @__PURE__ */ (0, F.jsx)("div", {
ref: t,
"data-jav-video": "",
- children: n ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ children: n ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
@@ -73051,8 +73161,8 @@ function Zke({ src: e }) {
}) : null
});
}
-function Qke({ code: e, count: t, released: n }) {
- let r = oe(), [i, a] = (0, P.useState)(!1), o = (0, P.useMemo)(() => Gke(e, n), [e, n]), s = (0, P.useRef)(!1), c = It({
+function hAe({ code: e, count: t, released: n }) {
+ let r = oe(), [i, a] = (0, P.useState)(!1), o = (0, P.useMemo)(() => cAe(e, n), [e, n]), s = (0, P.useRef)(!1), c = It({
queryKey: ["jav-reviews", e],
enabled: i,
initialPageParam: 1,
@@ -73061,12 +73171,12 @@ function Qke({ code: e, count: t, released: n }) {
pageParams: o.pageParams
} : void 0,
initialDataUpdatedAt: o?.saved,
- staleTime: (e) => Kke(e.state.data?.pages || [], e.state.dataUpdatedAt, n) ? Infinity : 0,
+ staleTime: (e) => lAe(e.state.data?.pages || [], e.state.dataUpdatedAt, n) ? Infinity : 0,
gcTime: 864e5,
refetchOnWindowFocus: !1,
queryFn: async ({ signal: t, pageParam: n }) => {
- let i = await eke(e, n, t, s.current);
- if (Wke(e, i), !i.ok || i.cache_stale) {
+ let i = await _ke(e, n, t, s.current);
+ if (sAe(e, i), !i.ok || i.cache_stale) {
let t = r.getQueryData(["jav-reviews", e])?.pages.find((e) => e.page === n);
if (t?.ok) return {
...t,
@@ -73076,18 +73186,18 @@ function Qke({ code: e, count: t, released: n }) {
}
return i;
},
- getNextPageParam: tke
+ getNextPageParam: vke
});
(0, P.useEffect)(() => {
c.isFetching || (s.current = !1);
}, [c.isFetching]);
- let l = c.data?.pages || [], u = [...new Map(l.flatMap((e) => e.items).map((e) => [e.id, e])).values()], d = c.error ? Wn(c.error) : l.find((e) => !e.ok || e.cache_stale)?.message;
+ let l = c.data?.pages || [], u = [...new Map(l.flatMap((e) => e.items).map((e) => [e.id, e])).values()], d = c.error ? ar(c.error) : l.find((e) => !e.ok || e.cache_stale)?.message;
return /* @__PURE__ */ (0, F.jsx)("section", {
"data-jav-reviews": "",
- children: /* @__PURE__ */ (0, F.jsxs)(nU, {
+ children: /* @__PURE__ */ (0, F.jsxs)(cU, {
trailing: !0,
summary: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(ppe, { "aria-hidden": !0 }),
+ /* @__PURE__ */ (0, F.jsx)(Cpe, { "aria-hidden": !0 }),
"评论",
t > 0 ? ` · ${t}` : ""
] }),
@@ -73136,28 +73246,28 @@ function Qke({ code: e, count: t, released: n }) {
]
}), /* @__PURE__ */ (0, F.jsx)("p", {
"data-long-text": "",
- lang: mF(e.content),
+ lang: xF(e.content),
children: e.content
})]
}, e.id)),
- d ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ d ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
action: /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(c.isFetching),
+ ...Yz(c.isFetching),
onClick: () => {
s.current = !0, c.refetch();
},
children: "立即重试"
}),
children: d
- }) : !c.isPending && !u.length ? /* @__PURE__ */ (0, F.jsx)(Rz, {
+ }) : !c.isPending && !u.length ? /* @__PURE__ */ (0, F.jsx)(Wz, {
tone: "neutral",
children: "暂无评论"
}) : null,
!d && l.length ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(c.isFetching),
+ ...Yz(c.isFetching),
onClick: () => {
s.current = !0, c.refetch();
},
@@ -73165,13 +73275,13 @@ function Qke({ code: e, count: t, released: n }) {
}) : null,
c.hasNextPage ? /* @__PURE__ */ (0, F.jsx)(q, {
variant: "secondary",
- ...Uz(c.isFetchingNextPage),
+ ...Yz(c.isFetchingNextPage),
onClick: () => {
c.isFetchingNextPage || c.fetchNextPage();
},
children: "更多评论"
}) : null,
- !d && l.at(-1)?.page === 8 && t > u.length ? /* @__PURE__ */ (0, F.jsxs)(Rz, {
+ !d && l.at(-1)?.page === 8 && t > u.length ? /* @__PURE__ */ (0, F.jsxs)(Wz, {
tone: "neutral",
children: [
"已显示 ",
@@ -73183,7 +73293,7 @@ function Qke({ code: e, count: t, released: n }) {
})
});
}
-function $ke({ item: e, actions: t, readOnly: n }) {
+function gAe({ item: e, actions: t, readOnly: n }) {
let [r, i] = (0, P.useState)(!1), a = Pt({
queryKey: V2,
enabled: r,
@@ -73191,7 +73301,7 @@ function $ke({ item: e, actions: t, readOnly: n }) {
}), o = a.data?.providers.find((e) => e.configured)?.key || "", [s, c] = (0, P.useState)(!1);
return /* @__PURE__ */ (0, F.jsx)("section", {
"data-jav-resources": "",
- children: /* @__PURE__ */ (0, F.jsx)(nU, {
+ children: /* @__PURE__ */ (0, F.jsx)(cU, {
trailing: !0,
summary: /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(s4, { name: "link" }), "资源"] }),
onOpenChange: (e) => {
@@ -73215,16 +73325,16 @@ function $ke({ item: e, actions: t, readOnly: n }) {
}
// src/react/stage/stage-player.ts
var u4 = null, d4 = null, f4 = null, p4 = null, m4 = null, h4 = !1, g4 = 0, _4 = null, v4 = () => !1, y4 = (e, t, n) => `${e}:${t}:${n ?? ""}`;
-function eAe(e, t) {
- u4 = e, v4 = () => t.isOpen(), _4 = () => t.requestClose(), Ase({
+function _Ae(e, t) {
+ u4 = e, v4 = () => t.isOpen(), _4 = () => t.requestClose(), Lse({
...e.player,
stage: () => document.getElementById("stage")
- }), jse({
+ }), Rse({
inMiniplayer: (e) => d4?.player === e,
kind: (e) => d4?.player === e ? d4.kind : f4?.kind ?? p4?.kind ?? "item",
expand: () => z4(),
toMiniplayer: () => B4()
- }), b4 || (b4 = !0, addEventListener("pagehide", () => fM()));
+ }), b4 || (b4 = !0, addEventListener("pagehide", () => _M()));
}
var b4 = !1;
function x4() {
@@ -73234,10 +73344,10 @@ function x4() {
function S4(e) {
p4 = e;
}
-var tAe = () => p4;
+var vAe = () => p4;
function C4(e, t) {
let { kind: n, item: r, media: i = null } = t, a = y4(n, r.id, i?.index ?? null);
- if (d4 && d4.key === a) return rAe(e, d4);
+ if (d4 && d4.key === a) return bAe(e, d4);
d4 && R4();
let o = {
player: null,
@@ -73249,7 +73359,7 @@ function C4(e, t) {
f4 = o;
let s = document.createElement("video");
t.id && (s.id = t.id), s.className = "video-js vjs-big-play-centered", s.controls = !1, s.setAttribute("playsinline", ""), s.preload = "metadata", t.poster && (s.poster = t.poster), t.onError && s.addEventListener("error", t.onError), e.append(s);
- let c = OM(s, {
+ let c = FM(s, {
kind: n,
item: r,
media: i,
@@ -73262,11 +73372,11 @@ function C4(e, t) {
});
return () => {
let e = !!o.player && d4?.player === o.player;
- f4 === o && (f4 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), fM());
+ f4 === o && (f4 = null), c(), !e && (o.player || (s.pause(), s.removeAttribute("src"), s.load()), _M());
};
}
-async function nAe(e, t, n) {
- let r = await on(`/api/item?id=${e.id}`, { signal: n });
+async function yAe(e, t, n) {
+ let r = await xn(`/api/item?id=${e.id}`, { signal: n });
if (n.throwIfAborted(), !r || r.error) throw Error(r?.error || "作品未取得");
if (r.medium && r.medium !== "video") throw Error("这条作品没有可播放的视频");
if (r.location === "online") throw Error("请打开详情播放在线作品");
@@ -73289,9 +73399,9 @@ async function nAe(e, t, n) {
s || (s = !0, e && p4 === a && T4(!0), o(), p4 === a && S4(null));
};
}
-function rAe(e, t) {
+function bAe(e, t) {
let { player: n } = t;
- I4(t), d4 = null, L4(), n.el().classList.remove("vjs-peach-mini"), EM(e), e.append(n.el()), pj(n);
+ I4(t), d4 = null, L4(), n.el().classList.remove("vjs-peach-mini"), NM(e), e.append(n.el()), xj(n);
let r = {
player: n,
kind: t.kind,
@@ -73300,9 +73410,9 @@ function rAe(e, t) {
key: t.key
};
f4 = r;
- let i = DM(n, e);
- return mj(n), () => {
- f4 === r && (f4 = null), i(), d4?.player !== n && (fj() === n && pj(null), eM(n), fM());
+ let i = PM(n, e);
+ return Sj(n), () => {
+ f4 === r && (f4 = null), i(), d4?.player !== n && (bj() === n && xj(null), cM(n), _M());
};
}
var w4 = () => {
@@ -73315,7 +73425,7 @@ function T4(e) {
let n = f4, r = n?.player, i = p4;
if (!n || !r || r.isDisposed() || !i || !m4) return;
let a = x4().player.settings();
- (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && sAe({
+ (t || e && a.miniplayer && !r.paused() && !r.ended() && !r.error()) && wAe({
player: r,
kind: n.kind,
item: n.item,
@@ -73330,11 +73440,11 @@ function D4(e) {
m4 = e, m4 && P4();
}
var O4 = () => !!d4 && !d4.pending && !d4.player.isDisposed();
-function iAe() {
+function xAe() {
return O4() ? m4?.frame.querySelector("video") ?? null : null;
}
-function aAe() {
- return v4() ? document.getElementById("stage")?.querySelector("video") ?? null : w4()?.el().querySelector("video") ?? iAe();
+function SAe() {
+ return v4() ? document.getElementById("stage")?.querySelector("video") ?? null : w4()?.el().querySelector("video") ?? xAe();
}
function k4(e) {
m4 && (m4.title.textContent = e.title || "", m4.sub.textContent = e.sub || "", m4.info.setAttribute("aria-label", e.title ? `展开到详情:${e.title}` : "展开到详情"));
@@ -73348,13 +73458,13 @@ function j4() {
let e = d4?.player;
if (!e || e.isDisposed() || !m4) return;
let t = e.paused();
- m4.play.setAttribute("aria-label", t ? "播放" : "暂停"), m4.play.querySelector("[data-icon-swap]") || (m4.play.innerHTML = Ds("player-pause", "player-play", t ? "b" : "a")), Os(m4.play, t ? "b" : "a");
+ m4.play.setAttribute("aria-label", t ? "播放" : "暂停"), m4.play.querySelector("[data-icon-swap]") || (m4.play.innerHTML = Hs("player-pause", "player-play", t ? "b" : "a")), Us(m4.play, t ? "b" : "a");
}
function M4() {
let e = d4?.player;
if (!e || e.isDisposed() || !m4) return;
- let t = On(d4?.item.duration) || On(e.duration());
- m4.time.textContent = `${An(e.currentTime())} / ${t ? An(t) : "0:00"}`;
+ let t = Un(d4?.item.duration) || Un(e.duration());
+ m4.time.textContent = `${Gn(e.currentTime())} / ${t ? Gn(t) : "0:00"}`;
}
var N4 = () => Math.max(1, Number(x4().player.settings().seekSeconds) || 10);
function P4() {
@@ -73383,7 +73493,7 @@ function F4(e) {
function I4(e) {
e.off.forEach((e) => e()), e.off = [];
}
-function oAe() {
+function CAe() {
let e = m4?.root;
if (!e) return;
let t = e.hidden;
@@ -73404,7 +73514,7 @@ function L4() {
e.style.transform = "";
}
}
-function sAe(e, t) {
+function wAe(e, t) {
if (!m4) return;
let n = {
...e,
@@ -73412,13 +73522,13 @@ function sAe(e, t) {
off: [],
pending: !1
};
- d4 = n, g4++, e.player.el().classList.add("vjs-peach-mini"), m4.frame.prepend(e.player.el()), k4(t), F4(n), oAe(), mj(e.player);
+ d4 = n, g4++, e.player.el().classList.add("vjs-peach-mini"), m4.frame.prepend(e.player.el()), k4(t), F4(n), CAe(), Sj(e.player);
}
function R4() {
let e = d4;
e && I4(e), d4 = null, g4++;
let t = e?.player ?? null;
- t && fj() === t && pj(null), eM(t), t && fM(), m4?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), uj(), L4();
+ t && bj() === t && xj(null), cM(t), t && _M(), m4?.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove()), vj(), L4();
}
function z4() {
if (!O4() || !d4) return;
@@ -73428,29 +73538,29 @@ function z4() {
function B4() {
O4() && !v4() ? z4() : v4() && w4() && _4 && (h4 = !0, _4());
}
-function cAe() {
+function TAe() {
let e = d4?.player;
e && !e.isDisposed() && (e.paused() ? e.play()?.catch(() => {}) : e.pause());
}
function V4(e) {
let t = d4?.player;
if (!t || t.isDisposed()) return;
- let n = On(t.duration()) || On(d4?.item.duration) || 0, r = Math.max(0, (Number(t.currentTime()) || 0) + N4() * e);
+ let n = Un(t.duration()) || Un(d4?.item.duration) || 0, r = Math.max(0, (Number(t.currentTime()) || 0) + N4() * e);
t.currentTime(n ? Math.min(n, r) : r);
}
function H4(e) {
return !(!O4() || !e || e.part_group || e.edition_group || e.medium && e.medium !== "video" || e.cost === "metered" && e.location !== "online" || e.location === "online" && !e.follow_item_id || x4().sourceOffline(String(e.root_id || e.location || "")));
}
-async function lAe(e) {
+async function EAe(e) {
if (!O4() || !d4 || !m4) return;
- let t = ++g4, n = await on(`/api/item?id=${e}`).catch(() => null);
+ let t = ++g4, n = await xn(`/api/item?id=${e}`).catch(() => null);
if (t !== g4 || !O4() || !d4 || !m4 || !n || n.error) return;
if (!H4(n)) {
x4().openItem(e);
return;
}
let r = d4;
- I4(r), fj() === r.player && pj(null), eM(r.player), fM(), m4.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
+ I4(r), bj() === r.player && xj(null), cM(r.player), _M(), m4.frame.querySelectorAll(".video-js,video").forEach((e) => e.remove());
let i = document.createElement("video");
i.className = "video-js", i.setAttribute("playsinline", ""), i.preload = "metadata", m4.frame.prepend(i);
let a = {
@@ -73459,14 +73569,14 @@ async function lAe(e) {
title: String(n.title || n.name || ""),
sub: String(n.performers?.[0] || n.creator || "未归属")
};
- k4(a), OM(i, {
+ k4(a), FM(i, {
kind: "item",
item: n,
autoplay: !0,
chrome: !1,
onPlayer: (r) => {
if (t !== g4) {
- r && fj() === r && pj(null), eM(r);
+ r && bj() === r && xj(null), cM(r);
return;
}
if (!r) {
@@ -73493,9 +73603,9 @@ var U4 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
viewBox: "0 0 24 24",
"aria-hidden": "true",
children: /* @__PURE__ */ (0, F.jsx)("use", { href: `#i-${e}` })
-}), uAe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, W4 = (e) => (t) => {
+}), DAe = { __html: "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#i-player-pause\"/></svg>" }, W4 = (e) => (t) => {
t.stopPropagation(), e();
-}, dAe = (0, P.memo)(function() {
+}, OAe = (0, P.memo)(function() {
let e = (0, P.useRef)(null), t = (0, P.useRef)(null), n = (0, P.useRef)(null), r = (0, P.useRef)(null), i = (0, P.useRef)(null), a = (0, P.useRef)(null), o = (0, P.useRef)(null), s = (0, P.useRef)(null), c = (0, P.useRef)(null), l = (0, P.useRef)(null);
return (0, P.useLayoutEffect)(() => (D4({
root: e.current,
@@ -73507,7 +73617,7 @@ var U4 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
title: s.current,
sub: c.current,
info: l.current
- }), () => D4(null)), []), (0, P.useEffect)(() => pAe(e.current, t.current), []), /* @__PURE__ */ (0, F.jsx)("aside", {
+ }), () => D4(null)), []), (0, P.useEffect)(() => AAe(e.current, t.current), []), /* @__PURE__ */ (0, F.jsx)("aside", {
ref: e,
"data-miniplayer": "",
id: "miniplayer",
@@ -73557,8 +73667,8 @@ var U4 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
id: "miniplayerPlay",
"aria-label": "暂停",
"aria-keyshortcuts": "k",
- onClick: W4(cAe),
- dangerouslySetInnerHTML: uAe
+ onClick: W4(TAe),
+ dangerouslySetInnerHTML: DAe
}),
/* @__PURE__ */ (0, F.jsx)("button", {
ref: o,
@@ -73597,7 +73707,7 @@ var U4 = ({ name: e }) => /* @__PURE__ */ (0, F.jsx)("svg", {
})
});
});
-function fAe(e, t, n) {
+function kAe(e, t, n) {
let r = e.getBoundingClientRect(), i = (r.top + r.height / 2 < innerHeight / 2 ? "t" : "b") + (r.left + r.width / 2 < innerWidth / 2 ? "l" : "r"), a = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--topH")) || 56, o = {
left: r.left - t,
top: r.top - n
@@ -73619,7 +73729,7 @@ function fAe(e, t, n) {
};
e.addEventListener("transitionend", u), setTimeout(u, 600);
}
-function pAe(e, t) {
+function AAe(e, t) {
let n = null, r = (e) => {
if (!(e.button !== 0 || e.target.closest("[data-miniplayer-button],[data-miniplayer-play],[data-miniplayer-seek],.vjs-control-bar"))) {
n = {
@@ -73645,7 +73755,7 @@ function pAe(e, t) {
} catch {}
i.moved && (e.dataset.dragged = "1", setTimeout(() => {
delete e.dataset.dragged;
- }, 0), fAe(e, i.dx, i.dy));
+ }, 0), kAe(e, i.dx, i.dy));
}, o = (t) => {
e.dataset.dragged && (t.stopPropagation(), t.preventDefault());
}, s = (e) => {
@@ -73664,25 +73774,25 @@ function e3() {
if (!G4) throw Error("舞台还没有接上宿主(configureStage)");
return G4;
}
-function mAe(e) {
+function jAe(e) {
return J4.add(e), () => {
J4.delete(e);
};
}
-function hAe() {
+function MAe() {
for (let e of [...J4]) e();
}
function t3() {
- (0, Lt.flushSync)(hAe);
+ (0, Lt.flushSync)(MAe);
}
-function gAe({ view: e }) {
- return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [e ? /* @__PURE__ */ (0, F.jsx)(_Ae, { view: e }, e.generation) : null, /* @__PURE__ */ (0, F.jsx)(dAe, {})] });
+function NAe({ view: e }) {
+ return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [e ? /* @__PURE__ */ (0, F.jsx)(PAe, { view: e }, e.generation) : null, /* @__PURE__ */ (0, F.jsx)(OAe, {})] });
}
var n3 = () => /* @__PURE__ */ (0, F.jsx)("div", {
"data-skeleton": "detail",
role: "status",
"aria-label": "正在读取作品详情",
- dangerouslySetInnerHTML: { __html: mOe() }
+ dangerouslySetInnerHTML: { __html: jOe() }
});
function r3(e) {
let t = e.currentTarget;
@@ -73691,14 +73801,14 @@ function r3(e) {
return e.clientX < n.left || e.clientX > n.right || e.clientY < n.top || e.clientY > n.bottom;
}
function i3() {
- let e = $4(), t = e && _Oe(e);
+ let e = $4(), t = e && POe(e);
t ? (t.focus({ preventScroll: !0 }), t.dispatchEvent(new KeyboardEvent("keydown", {
key: "Escape",
bubbles: !0,
cancelable: !0
}))) : a3();
}
-function _Ae({ view: e }) {
+function PAe({ view: e }) {
let t = (0, P.useRef)(null);
(0, P.useLayoutEffect)(() => {
let e = t.current, n = (t) => {
@@ -73706,7 +73816,7 @@ function _Ae({ view: e }) {
};
return e.addEventListener("cancel", n), () => e.removeEventListener("cancel", n);
}, []);
- let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, F.jsx)(lke, { ...r.props }) : r.kind === "jav" ? /* @__PURE__ */ (0, F.jsx)(qke, { ...r.props }, r.props.code) : /* @__PURE__ */ (0, F.jsx)(WOe, { ...r.props }, r.props.id);
+ let { phase: n, content: r } = e, i = r.kind === "item" ? /* @__PURE__ */ (0, F.jsx)(Eke, { ...r.props }) : r.kind === "jav" ? /* @__PURE__ */ (0, F.jsx)(uAe, { ...r.props }, r.props.code) : /* @__PURE__ */ (0, F.jsx)(ske, { ...r.props }, r.props.id);
return /* @__PURE__ */ (0, F.jsxs)("dialog", {
ref: t,
id: "stage",
@@ -73733,7 +73843,7 @@ function _Ae({ view: e }) {
"data-stage-scroll": "",
children: /* @__PURE__ */ (0, F.jsx)("div", {
className: "peach-react",
- children: /* @__PURE__ */ (0, F.jsx)(FT, {
+ children: /* @__PURE__ */ (0, F.jsx)(HT, {
getContainer: () => Y0(t.current),
children: i
})
@@ -73826,7 +73936,7 @@ function s3(e) {
}
};
}
-function vAe(e, t) {
+function FAe(e, t) {
let n = e.querySelector(":scope > [data-stage-fade]");
e.setAttribute("data-stage-reveal", ""), e.getBoundingClientRect(), e.setAttribute("data-stage-revealing", "");
let r = 0, i = () => {
@@ -73843,7 +73953,7 @@ function c3(e) {
let t = $4();
return !K4 || K4.content.kind !== e || Z4 || !t?.open || t.hasAttribute("data-closing") ? null : t;
}
-async function yAe(e) {
+async function IAe(e) {
!q4 && document.activeElement instanceof HTMLElement && document.activeElement !== document.body && (q4 = {
left: window.scrollX,
top: window.scrollY,
@@ -73851,7 +73961,7 @@ async function yAe(e) {
});
let t = c3(e.kind);
if (t) {
- await xAe(e, t);
+ await RAe(e, t);
return;
}
K4 && l3({ miniplayer: !1 });
@@ -73864,12 +73974,12 @@ async function yAe(e) {
content: i,
phase: "skeleton"
};
- let a = i.kind === "item" ? oN(i.props, r.signal) : i.kind === "jav" ? A2(i.props, r.signal) : t2(i.props, r.signal);
+ let a = i.kind === "item" ? pN(i.props, r.signal) : i.kind === "jav" ? A2(i.props, r.signal) : t2(i.props, r.signal);
if (n !== Y4 || K4?.request !== e) {
await a.catch(() => {});
return;
}
- let o = bAe(i);
+ let o = LAe(i);
K4 = {
...K4,
phase: o ? "content" : "skeleton"
@@ -73879,7 +73989,7 @@ async function yAe(e) {
await a.catch(() => {});
return;
}
- o || Ks(s), document.body.setAttribute("data-detail-open", ""), s.open || s.showModal(), Z0(s);
+ o || sc(s), document.body.setAttribute("data-detail-open", ""), s.open || s.showModal(), Z0(s);
try {
await a;
} catch {
@@ -73890,40 +74000,40 @@ async function yAe(e) {
K4 = {
...K4,
phase: c ? "content" : "reveal"
- }, t3(), c || vAe(s, n), Ps(s, ":scope>:not([data-stage-fade]) [data-reveal-line]");
+ }, t3(), c || FAe(s, n), Ys(s, ":scope>:not([data-stage-fade]) [data-reveal-line]");
let l = document.activeElement;
l !== s && s.contains(l) || s.querySelector("#closeStage")?.focus();
}
-function bAe(e) {
+function LAe(e) {
if (e.kind === "jav") return !!H.getQueryData(O2(e.props.code));
if (e.kind === "follow") return !!H.getQueryData(Q0(e.props.id));
- let { queue: t, id: n } = e.props, r = t ? H.getQueryData(KM(t)) : null;
+ let { queue: t, id: n } = e.props, r = t ? H.getQueryData($M(t)) : null;
if (t && !r) return !1;
- let i = r ? iN(r, n) : n;
- return i != null && !!H.getQueryData(GM(i));
+ let i = r ? dN(r, n) : n;
+ return i != null && !!H.getQueryData(QM(i));
}
-async function xAe(e, t) {
+async function RAe(e, t) {
let n = ++Y4;
X4?.abort();
let r = new AbortController();
X4 = r, Q4 = !1;
let i = s3(e);
try {
- i.kind === "item" ? await oN(i.props, r.signal) : i.kind === "jav" ? await A2(i.props, r.signal) : await t2(i.props, r.signal);
+ i.kind === "item" ? await pN(i.props, r.signal) : i.kind === "jav" ? await A2(i.props, r.signal) : await t2(i.props, r.signal);
} catch {
if (r.signal.aborted) return;
}
if (n !== Y4 || !K4 || c3(e.kind) !== t) return;
- e.kind === "jav" ? R4() : E4(e.kind, e.id ?? NaN), kl(t), uj(), K4 = {
+ e.kind === "jav" ? R4() : E4(e.kind, e.id ?? NaN), Wl(t), vj(), K4 = {
...K4,
request: e,
content: i,
phase: "content"
- }, t3(), t.removeAttribute("data-stage-reveal"), t.removeAttribute("data-stage-revealing"), t.querySelector(":scope > [data-stage-scroll]")?.scrollTo({ top: 0 }), Ps(t, ":scope>:not([data-stage-fade]) [data-reveal-line]");
+ }, t3(), t.removeAttribute("data-stage-reveal"), t.removeAttribute("data-stage-revealing"), t.querySelector(":scope > [data-stage-scroll]")?.scrollTo({ top: 0 }), Ys(t, ":scope>:not([data-stage-fade]) [data-reveal-line]");
let a = document.activeElement;
a !== t && t.contains(a) || (t.querySelector("[data-mix-item][aria-current=\"true\"]") || t.querySelector("#closeStage"))?.focus({ preventScroll: !0 });
}
-function SAe() {
+function zAe() {
Z0(null);
let e = $4();
return !e?.open || e.hasAttribute("data-closing") || matchMedia("(prefers-reduced-motion: reduce)").matches ? Promise.resolve() : (e.setAttribute("data-closing", ""), new Promise((t) => {
@@ -73938,7 +74048,7 @@ function SAe() {
function l3({ miniplayer: e = !0 } = {}) {
if (Y4++, X4?.abort(), X4 = null, T4(e), !K4) return;
let t = $4();
- t && kl(t), uj(), Z0(null), t?.open && t.close(), K4 = null, Z4 = !1, Q4 = !1, t3(), S4(null), document.body.removeAttribute("data-detail-open");
+ t && Wl(t), vj(), Z0(null), t?.open && t.close(), K4 = null, Z4 = !1, Q4 = !1, t3(), S4(null), document.body.removeAttribute("data-detail-open");
let n = q4;
q4 = null;
let r = () => {
@@ -73950,7 +74060,7 @@ function l3({ miniplayer: e = !0 } = {}) {
};
r(), requestAnimationFrame(r);
}
-function CAe(e) {
+function BAe(e) {
K4 && (K4 = {
...K4,
content: K4.content.kind === "item" ? {
@@ -73968,62 +74078,62 @@ function CAe(e) {
}
}, t3());
}
-function wAe() {
- let e = tAe(), t = e?.kind === "item" ? e.item : null, n = t ? lo(t, e3().player.settings().javImage) : "";
+function VAe() {
+ let e = vAe(), t = e?.kind === "item" ? e.item : null, n = t ? To(t, e3().player.settings().javImage) : "";
if (!n) return;
let r = w4();
r ? r.poster(n) : document.getElementById("vid")?.setAttribute("poster", n);
}
-var TAe = {
- open: yAe,
- update: CAe,
- exit: SAe,
+var HAe = {
+ open: IAe,
+ update: BAe,
+ exit: zAe,
dispose: l3,
requestClose: a3,
requestEscape: i3,
- repaintPoster: wAe,
+ repaintPoster: VAe,
isOpen: () => !!K4,
showing: () => K4 && c3(K4.content.kind) ? K4.content.kind : null,
- activeVideo: () => aAe(),
- mountWallPlayer: nAe,
+ activeVideo: () => SAe(),
+ mountWallPlayer: yAe,
toggleTheater: () => {
- K4 && Vj(!e3().player.settings().theaterMode);
+ K4 && Yj(!e3().player.settings().theaterMode);
},
toggleMiniplayer: () => B4(),
closeMiniplayer: () => R4(),
miniplayerActive: () => O4(),
miniplayerTakesCard: (e) => H4(e),
miniplayerPlay: (e) => {
- lAe(e);
+ EAe(e);
}
};
-function EAe(e) {
- return G4 = e, eAe(e, {
+function UAe(e) {
+ return G4 = e, _Ae(e, {
isOpen: () => !!K4,
requestClose: a3
- }), TAe;
+ }), HAe;
}
-function DAe() {
- let e = (0, P.useSyncExternalStore)(mAe, () => K4);
- return G4 ? /* @__PURE__ */ (0, F.jsx)(gAe, { view: e }) : null;
+function WAe() {
+ let e = (0, P.useSyncExternalStore)(jAe, () => K4);
+ return G4 ? /* @__PURE__ */ (0, F.jsx)(NAe, { view: e }) : null;
}
// src/react/stats/stats.ts
-var OAe = "/api/stats", u3 = ["stats"], d3 = (e) => B(OAe, e);
-async function kAe(e) {
+var GAe = "/api/stats", u3 = ["stats"], d3 = (e) => B(GAe, e);
+async function KAe(e) {
await H.fetchQuery({
queryKey: u3,
queryFn: () => d3(e)
});
}
-var f3 = (e) => e != null && Number.isFinite(e), AAe = (e) => f3(e) ? e.toLocaleString() : "未取得", jAe = (e, t) => f3(e) && f3(t) && t > 0 ? Math.min(100, Math.max(0, Math.round(e / t * 100))) : 0, MAe = (e, t) => {
- let n = jAe(e, t);
+var f3 = (e) => e != null && Number.isFinite(e), qAe = (e) => f3(e) ? e.toLocaleString() : "未取得", JAe = (e, t) => f3(e) && f3(t) && t > 0 ? Math.min(100, Math.max(0, Math.round(e / t * 100))) : 0, YAe = (e, t) => {
+ let n = JAe(e, t);
return !n && f3(e) && e > 0 && f3(t) && t > 0 ? "<1%" : `${n}%`;
}, p3 = (e) => {
if (!f3(e)) return "未取得";
let t = Math.max(0, e);
return t >= 172800 ? `${(t / 86400).toLocaleString(void 0, { maximumFractionDigits: 1 })} 天` : t >= 3600 ? `${(t / 3600).toFixed(1)} 小时` : `${Math.round(t / 60)} 分钟`;
-}, m3 = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, h3 = (e) => (e.max_reached || 0) * 100, NAe = (e) => e.kind === "online" ? "在线直接观看" : m3(e) < h3(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", PAe = (e) => `${e.kind === "online" ? "/posts/" : "/assets/"}${e.id}`;
-function FAe(e, t = 6) {
+}, m3 = (e) => e.duration ? Math.min(e.play_seconds / e.duration, 1) * 100 : 0, h3 = (e) => (e.max_reached || 0) * 100, XAe = (e) => e.kind === "online" ? "在线直接观看" : m3(e) < h3(e) - 25 ? "快进扫过" : e.o_count ? `高潮 ${e.o_count}` : "正常观看", ZAe = (e) => `${e.kind === "online" ? "/posts/" : "/assets/"}${e.id}`;
+function QAe(e, t = 6) {
let n = e.filter((e) => Number.isFinite(e.value) && e.value >= 0);
if (n.length <= t) return n;
let r = [...n].sort((e, t) => t.value - e.value), i = r.slice(t - 1);
@@ -74033,7 +74143,7 @@ function FAe(e, t = 6) {
bytes: i.reduce((e, t) => e + (t.bytes ?? 0), 0)
}];
}
-var IAe = (e) => Math.max(1, ...e) * 1.1, LAe = (e, t) => e > 0 ? Math.max(e, t * .02) : 0, RAe = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), zAe = {
+var $Ae = (e) => Math.max(1, ...e) * 1.1, eje = (e, t) => e > 0 ? Math.max(e, t * .02) : 0, tje = (e) => Math.max(4, Math.min(14, Math.round(90 / Math.max(1, e)))), nje = {
video: "视频",
image: "图片",
illustration: "插画",
@@ -74041,10 +74151,10 @@ var IAe = (e) => Math.max(1, ...e) * 1.1, LAe = (e, t) => e > 0 ? Math.max(e, t
audio: "音频",
account: "账号",
other: "其它文件"
-}, BAe = (e) => e.map((e) => ({
- name: zAe[e.k] ?? e.k,
+}, rje = (e) => e.map((e) => ({
+ name: nje[e.k] ?? e.k,
value: e.n
-})).sort((e, t) => t.value - e.value), VAe = {
+})).sort((e, t) => t.value - e.value), ije = {
速食: "<5 分钟",
短: "5–15 分钟",
中: "15–40 分钟",
@@ -74052,7 +74162,7 @@ var IAe = (e) => Math.max(1, ...e) * 1.1, LAe = (e, t) => e > 0 ? Math.max(e, t
}, g3 = (e, t = {}) => e.map((e) => ({
name: t[e.k] ?? e.k,
value: e.n
-})), HAe = (e) => g3(e, VAe), UAe = [
+})), aje = (e) => g3(e, ije), oje = [
[
1,
1,
@@ -74088,7 +74198,7 @@ var IAe = (e) => Math.max(1, ...e) * 1.1, LAe = (e, t) => e > 0 ? Math.max(e, t
Infinity,
"≥10"
]
-], WAe = (e) => UAe.map(([t, n, r]) => ({
+], sje = (e) => oje.map(([t, n, r]) => ({
name: r,
value: e.filter((e) => e.k >= t && e.k <= n).reduce((e, t) => e + t.n, 0)
}));
@@ -74123,7 +74233,7 @@ function y3(e, t) {
return n;
}
// node_modules/d3-sankey/src/align.js
-function GAe(e, t) {
+function cje(e, t) {
return e.sourceLinks.length ? e.depth : t - 1;
}
// node_modules/d3-sankey/src/constant.js
@@ -74145,13 +74255,13 @@ function C3(e, t) {
function w3(e) {
return e.value;
}
-function KAe(e) {
+function lje(e) {
return e.index;
}
-function qAe(e) {
+function uje(e) {
return e.nodes;
}
-function JAe(e) {
+function dje(e) {
return e.links;
}
function T3(e, t) {
@@ -74166,8 +74276,8 @@ function E3({ nodes: e }) {
for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
}
}
-function YAe() {
- let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = KAe, c = GAe, l, u, d = qAe, f = JAe, p = 6;
+function fje() {
+ let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = lje, c = cje, l, u, d = uje, f = dje, p = 6;
function m() {
let e = {
nodes: d.apply(null, arguments),
@@ -74352,7 +74462,7 @@ function YAe() {
return m;
}
// node_modules/d3-path/src/path.js
-var D3 = Math.PI, O3 = 2 * D3, k3 = 1e-6, XAe = O3 - k3;
+var D3 = Math.PI, O3 = 2 * D3, k3 = 1e-6, pje = O3 - k3;
function A3() {
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
}
@@ -74393,7 +74503,7 @@ A3.prototype = j3.prototype = {
e = +e, t = +t, n = +n, a = !!a;
var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
if (n < 0) throw Error("negative radius: " + n);
- this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > k3 || Math.abs(this._y1 - l) > k3) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % O3 + O3), d > XAe ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > k3 && (this._ += "A" + n + "," + n + ",0," + +(d >= D3) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
+ this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > k3 || Math.abs(this._y1 - l) > k3) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % O3 + O3), d > pje ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > k3 && (this._ += "A" + n + "," + n + ",0," + +(d >= D3) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
},
rect: function(e, t, n, r) {
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
@@ -74409,25 +74519,25 @@ function M3(e) {
};
}
// node_modules/d3-shape/src/point.js
-function ZAe(e) {
+function mje(e) {
return e[0];
}
-function QAe(e) {
+function hje(e) {
return e[1];
}
// node_modules/d3-shape/src/array.js
-var $Ae = Array.prototype.slice;
+var gje = Array.prototype.slice;
// node_modules/d3-shape/src/link/index.js
-function eje(e) {
+function _je(e) {
return e.source;
}
-function tje(e) {
+function vje(e) {
return e.target;
}
-function nje(e) {
- var t = eje, n = tje, r = ZAe, i = QAe, a = null;
+function yje(e) {
+ var t = _je, n = vje, r = mje, i = hje, a = null;
function o() {
- var o, s = $Ae.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
+ var o, s = gje.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
if (a ||= o = j3(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
}
return o.source = function(e) {
@@ -74442,54 +74552,54 @@ function nje(e) {
return arguments.length ? (a = e ?? null, o) : a;
}, o;
}
-function rje(e, t, n, r, i) {
+function bje(e, t, n, r, i) {
e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
}
-function ije() {
- return nje(rje);
+function xje() {
+ return yje(bje);
}
// node_modules/d3-sankey/src/sankeyLinkHorizontal.js
-function aje(e) {
+function Sje(e) {
return [e.source.x1, e.y0];
}
-function oje(e) {
+function Cje(e) {
return [e.target.x0, e.y1];
}
-function sje() {
- return ije().source(aje).target(oje);
+function wje() {
+ return xje().source(Sje).target(Cje);
}
// src/react/taste/taste.ts
-var cje = "/api/taste", N3 = "/api/taste/refresh", lje = "/api/taste/import", P3 = "/api/taste/source", F3 = (e) => ["taste", e], uje = ["taste", "refresh"], dje = [
+var Tje = "/api/taste", N3 = "/api/taste/refresh", Eje = "/api/taste/import", P3 = "/api/taste/source", F3 = (e) => ["taste", e], Dje = ["taste", "refresh"], Oje = [
["7d", "最近 7 天"],
["30d", "最近 30 天"],
["90d", "最近 90 天"],
["365d", "最近一年"],
["all", "全部时间"]
-], fje = 2e3, pje = (e) => e?.stale && !e.error ? fje : !1, mje = (e) => e ? new Date(e).toLocaleString("zh-CN", {
+], kje = 2e3, Aje = (e) => e?.stale && !e.error ? kje : !1, jje = (e) => e ? new Date(e).toLocaleString("zh-CN", {
month: "numeric",
day: "numeric",
hour: "2-digit",
minute: "2-digit"
-}) : "—", hje = (e, t) => V(P3, {
+}) : "—", Mje = (e, t) => V(P3, {
...e,
window: t
-}), I3 = (e, t, n = !1) => B(`${cje}?window=${e}${n ? "&retry=1" : ""}`, t), gje = (e) => B(N3, e);
-async function _je(e, t) {
+}), I3 = (e, t, n = !1) => B(`${Tje}?window=${e}${n ? "&retry=1" : ""}`, t), Nje = (e) => B(N3, e);
+async function Pje(e, t) {
await H.fetchQuery({
queryKey: F3(e),
queryFn: () => I3(e, t)
});
}
-var vje = (e) => V(N3, {
+var Fje = (e) => V(N3, {
window: e,
background: !0
-}), yje = (e, t) => V(P3, {
+}), Ije = (e, t) => V(P3, {
operation: "remove",
source_key: e,
window: t
});
-async function bje(e) {
- let t = await fetch(lje, {
+async function Lje(e) {
+ let t = await fetch(Eje, {
method: "POST",
credentials: "same-origin",
headers: {
@@ -74503,12 +74613,12 @@ async function bje(e) {
} catch {}
if (!t.ok) {
let e = n?.error;
- throw new Hn(e || `导入失败(${t.status})`, t.status, n);
+ throw new rr(e || `导入失败(${t.status})`, t.status, n);
}
return n;
}
-var xje = 1e4, L3 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—";
-function Sje(e) {
+var Rje = 1e4, L3 = (e) => e ? new Date(e).toLocaleDateString("zh-CN") : "—";
+function zje(e) {
let t = `${Number(e.history_sources || 0).toLocaleString()} 个数据源`;
if (!e.range_start && !e.range_end) return t;
let n = e.range_start?.slice(0, 4) === e.range_end?.slice(0, 4), r = (e) => e && n ? new Date(e).toLocaleDateString("zh-CN", {
@@ -74517,31 +74627,31 @@ function Sje(e) {
}) : L3(e);
return `${t} · ${r(e.range_start)}–${r(e.range_end)}`;
}
-var Cje = p3, wje = (e) => e.filter((e) => Number.isFinite(Number(e.score)) && Number(e.score) > 0).sort((e, t) => Number(t.score) - Number(e.score)), Tje = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
-function Eje(e) {
+var Bje = p3, Vje = (e) => e.filter((e) => Number.isFinite(Number(e.score)) && Number(e.score) > 0).sort((e, t) => Number(t.score) - Number(e.score)), Hje = (e) => Number(e.web_visits ?? e.score ?? e.visits ?? e.peach_items ?? 0);
+function Uje(e) {
if (e.web_visits == null && !e.web_bookmarks) return Number(e.score || e.visits || 0).toLocaleString();
let t = [], n = Number(e.web_bookmarks || 0), r = Number(e.web_visits ?? e.visits ?? 0) - n;
return r > 0 && t.push(`浏览 ${r.toLocaleString()}`), n && t.push(`书签 ${n.toLocaleString()}`), e.peach_items && t.push(`Peach ${Number(e.peach_items).toLocaleString()}`), t.join(" · ");
}
-function Dje(e) {
- let t = e.map(Tje), n = Math.max(1, ...t);
+function Wje(e) {
+ let t = e.map(Hje), n = Math.max(1, ...t);
return t.map((e) => Math.max(0, Math.min(100, e / n * 100)));
}
var R3 = (e, t) => e.filter((e) => Number.isFinite(Number(e.score)) && Number(e.score) > 0).map((e) => ({
name: e.name,
value: Number(e.score)
})).sort((e, t) => t.value - e.value).slice(0, t);
-function Oje(e) {
+function Gje(e) {
let t = R3(e, 6);
return t.length < 3 ? [] : t;
}
var z3 = {
width: 720,
height: 435
-}, kje = {
+}, Kje = {
source: 145,
target: 545
-}, B3 = 30, Aje = 240;
+}, B3 = 30, qje = 240;
function V3(e, t, n) {
let r = /* @__PURE__ */ new Map();
for (let n of e) r.set(n[t], (r.get(n[t]) ?? 0) + n.value);
@@ -74549,7 +74659,7 @@ function V3(e, t, n) {
let i = [...r].sort((e, t) => t[1] - e[1]).map(([e]) => e), a = new Set(i.slice(0, 11)), o = n(i.length - a.size);
return (e) => a.has(e) ? e : o;
}
-function jje(e = []) {
+function Jje(e = []) {
let t = e.filter((e) => e.source && e.target && Number.isFinite(e.value) && e.value > 0);
if (!t.length) return null;
let n = V3(t, "source", (e) => `其余 ${e.toLocaleString()} 个网站`), r = V3(t, "target", (e) => `其余 ${e.toLocaleString()} 位创作者`), i = /* @__PURE__ */ new Map();
@@ -74561,7 +74671,7 @@ function jje(e = []) {
value: e.value
});
}
- let a = [...i.values()], o = [...new Set(a.map((e) => e.source))], s = [...new Set(a.map((e) => e.target))], c = Math.max(o.length, s.length), l = Math.max(404, 16 + (c - 1) * B3 + Aje), u = YAe().nodeId((e) => e.id).nodeWidth(10).nodePadding(B3).extent([[155, 16], [535, l]])({
+ let a = [...i.values()], o = [...new Set(a.map((e) => e.source))], s = [...new Set(a.map((e) => e.target))], c = Math.max(o.length, s.length), l = Math.max(404, 16 + (c - 1) * B3 + qje), u = fje().nodeId((e) => e.id).nodeWidth(10).nodePadding(B3).extent([[155, 16], [535, l]])({
nodes: [...o.map((e) => ({
id: `source:${e}`,
name: e,
@@ -74576,7 +74686,7 @@ function jje(e = []) {
target: `target:${e.target}`,
value: e.value
}))
- }), d = a.reduce((e, t) => e + t.value, 0), f = sje();
+ }), d = a.reduce((e, t) => e + t.value, 0), f = wje();
return {
nodes: u.nodes.map((e) => ({
id: e.id,
@@ -74607,14 +74717,14 @@ function jje(e = []) {
height: l + z3.height - 404
};
}
-var Mje = (e) => In(e, 17), H3 = {
+var Yje = (e) => Zn(e, 17), H3 = {
performers: "艺人",
creators: "卖家",
studios: "厂牌",
agencies: "事务所",
series: "系列",
tags: "标签"
-}, Nje = [[
+}, Xje = [[
"big",
"大图 · 竖幅头像",
"maximize"
@@ -74622,7 +74732,7 @@ var Mje = (e) => In(e, 17), H3 = {
"compact",
"紧凑 · 圆形头像",
"layout-grid"
-]], Pje = [[
+]], Zje = [[
"big",
"大图 · 完整标识",
"maximize"
@@ -74630,7 +74740,7 @@ var Mje = (e) => In(e, 17), H3 = {
"compact",
"紧凑 · 圆形标识",
"layout-grid"
-]], Fje = [[
+]], Qje = [[
"big",
"大图 · 系列图片",
"maximize"
@@ -74638,7 +74748,7 @@ var Mje = (e) => In(e, 17), H3 = {
"compact",
"紧凑 · 系列图片",
"layout-grid"
-]], Ije = [
+]], $je = [
[
"studios",
"厂牌",
@@ -74654,7 +74764,7 @@ var Mje = (e) => In(e, 17), H3 = {
"系列",
"file-stack"
]
-], Lje = [[
+], eMe = [[
"local",
"本地",
"hard-drive"
@@ -74662,7 +74772,7 @@ var Mje = (e) => In(e, 17), H3 = {
"online",
"在线",
"rss"
-]], Rje = [
+]], tMe = [
[
"performers",
"艺人",
@@ -74678,7 +74788,7 @@ var Mje = (e) => In(e, 17), H3 = {
"在线",
"rss"
]
-], zje = [[
+], nMe = [[
"cloud",
"标签云",
"tags"
@@ -74697,7 +74807,7 @@ function W3(e, t) {
category: n.get("category") || "all"
};
}
-var G3 = (e, t, n) => ws(e.map(([e, t, n]) => ({
+var G3 = (e, t, n) => zs(e.map(([e, t, n]) => ({
value: e,
label: t,
symbol: n
@@ -74705,43 +74815,43 @@ var G3 = (e, t, n) => ws(e.map(([e, t, n]) => ({
active: t,
label: n,
className: "indextabs"
-}), Bje = (e) => `<div class="peach-react contents"><div data-filter-glass data-glass-pane class="sticky top-topbar z-10 mb-5.5 flex flex-col">
+}), rMe = (e) => `<div class="peach-react contents"><div data-filter-glass data-glass-pane class="sticky top-topbar z-10 mb-5.5 flex flex-col">
<div class="flex h-12 min-w-0 items-center gap-1.75 overflow-x-auto overscroll-x-contain px-3 py-2" data-filter-row="top" data-skeleton-tier="filter-pill" aria-label="标签类型"></div>
<div class="flex min-h-11.5 min-w-0 items-center gap-3 px-3 py-2" data-filter-row="bottom"><span class="countskeleton"></span>
- <span class="ml-auto">${Mc("tag-view", "标签视图", zje, e, { className: "tag-skeleton-view" })}</span></div></div></div>`;
-function Vje({ kind: e, q: t, scope: n, view: r, category: i }, a) {
- let o = H3[e] || "标签", s = e !== "tags", c = e === "studios" || e === "agencies" || e === "series", l = s ? Mc("people-layout", o + "索引版式", e === "series" ? Fje : c ? Pje : Nje, a) : "";
+ <span class="ml-auto">${qc("tag-view", "标签视图", nMe, e, { className: "tag-skeleton-view" })}</span></div></div></div>`;
+function iMe({ kind: e, q: t, scope: n, view: r, category: i }, a) {
+ let o = H3[e] || "标签", s = e !== "tags", c = e === "studios" || e === "agencies" || e === "series", l = s ? qc("people-layout", o + "索引版式", e === "series" ? Qje : c ? Zje : Xje, a) : "";
return `<div class="ihead peach-react" data-index-head>
<h2 class="disp indexheading">${o}</h2>
${s ? "<span class=\"mono\" id=\"indexCount\"><span class=\"countskeleton\"></span></span>" : ""}${l}
- ${ss("default")}
- ${e === "tags" ? ls({
+ ${Ss("default")}
+ ${e === "tags" ? ws({
variant: "ghost",
glyph: "pencil",
attrs: "data-tag-mode data-skeleton-action disabled tabindex=\"-1\" aria-label=\"管理标签\""
}) : ""}
- <div data-index-search class="ml-auto min-w-0 max-w-80 flex-1">${cs("", t, "过滤" + o)}</div>
+ <div data-index-search class="ml-auto min-w-0 max-w-80 flex-1">${Cs("", t, "过滤" + o)}</div>
</div>
- ${e === "tags" ? G3(Lje, n, "词表") : e === "performers" || e === "creators" ? G3(Rje, e === "performers" && n === "online" ? "online" : e, "人物名册") : c ? G3(Ije, e, "资料类型") : ""}
- ${e === "tags" ? Bje(r) : ""}
- ${e === "performers" && n !== "online" ? FSe(i) : ""}
- ${zs({
+ ${e === "tags" ? G3(eMe, n, "词表") : e === "performers" || e === "creators" ? G3(tMe, e === "performers" && n === "online" ? "online" : e, "人物名册") : c ? G3($je, e, "资料类型") : ""}
+ ${e === "tags" ? rMe(r) : ""}
+ ${e === "performers" && n !== "online" ? XSe(i) : ""}
+ ${ec({
kind: e,
layout: a,
mode: r
})}`;
}
-var Hje = (e) => e.match(/data-skeleton="([^"]*)"/)?.[1] || "";
+var aMe = (e) => e.match(/data-skeleton="([^"]*)"/)?.[1] || "";
function K3(e, t, n) {
- let r = Vje(t, n);
- e.querySelector("[data-skeleton]")?.dataset.skeleton !== Hje(r) && (e.innerHTML = r, Ks(e));
+ let r = iMe(t, n);
+ e.querySelector("[data-skeleton]")?.dataset.skeleton !== aMe(r) && (e.innerHTML = r, sc(e));
}
// src/react/router/pages/index-entity.tsx
-var Uje = () => lu, Wje = () => Jl, q3 = () => document.getElementById("index");
+var oMe = () => wu, sMe = () => lu, q3 = () => document.getElementById("index");
function J3(e, t, n = {}) {
- let r = (0, P.useSyncExternalStore)(bu, Uje);
- BB();
- let i = bV($V.navigation.location.pathname), a = (0, P.useRef)({
+ let r = (0, P.useSyncExternalStore)(Pu, oMe);
+ KB();
+ let i = EV(aH.navigation.location.pathname), a = (0, P.useRef)({
mounted: !0,
epoch: -1,
opens: -1,
@@ -74765,8 +74875,8 @@ function J3(e, t, n = {}) {
r !== 0 && queueMicrotask(() => {
let t = a.current;
if (!t.mounted) return;
- let n = t.epoch !== e || t.opens !== lu, r = t.opens !== lu;
- if (t.epoch = e, t.opens = lu, bV($V.navigation.location.pathname)) {
+ let n = t.epoch !== e || t.opens !== wu, r = t.opens !== wu;
+ if (t.epoch = e, t.opens = wu, EV(aH.navigation.location.pathname)) {
n && o.current.options.onCovered?.();
return;
}
@@ -74787,37 +74897,37 @@ function J3(e, t, n = {}) {
i
]);
}
-async function Gje(e, t, n, r) {
+async function cMe(e, t, n, r) {
let i = q3();
if (!i) return;
let a = `/${t}`;
e.surfaceChanged("index", a);
- let o = W3(t, n), s = U3(vA().value.peopleLayout);
- K3(i, o, s), await HV(a, {
+ let o = W3(t, n), s = U3(CA().value.peopleLayout);
+ K3(i, o, s), await JV(a, {
...o,
layout: s,
- selectMode: Jl,
+ selectMode: lu,
configurable: !!e.configurable?.()
}, {
container: i,
isCurrent: r
}) && r() && e.surfaceShown?.("index", a);
}
-function Kje(e) {
- let t = q3(), n = t ? RV(t) : null;
+function lMe(e) {
+ let t = q3(), n = t ? WV(t) : null;
return !!t && !t.hidden && !!n && n.path === e && n.host.isConnected;
}
-function qje({ epoch: e }) {
- let t = (0, P.useContext)(OU), n = BB(), r = n.pathname.split("/").filter(Boolean)[0];
+function uMe({ epoch: e }) {
+ let t = (0, P.useContext)(PU), n = KB(), r = n.pathname.split("/").filter(Boolean)[0];
return J3(e, (e, i) => {
- t && Gje(t, r, n.search, i);
- }, { shown: () => Kje(`/${r}`) }), null;
+ t && cMe(t, r, n.search, i);
+ }, { shown: () => lMe(`/${r}`) }), null;
}
-function Jje() {
- let e = DU(), t = (0, P.useSyncExternalStore)(bu, Wje), n = (0, P.useRef)(t);
+function dMe() {
+ let e = NU(), t = (0, P.useSyncExternalStore)(Pu, sMe), n = (0, P.useRef)(t);
return (0, P.useEffect)(() => {
- n.current !== t && (n.current = t, window.location.pathname === "/tags" && UV(q3(), { selectMode: t }));
- }, [t]), /* @__PURE__ */ (0, F.jsx)(qje, { epoch: e }, e);
+ n.current !== t && (n.current = t, window.location.pathname === "/tags" && YV(q3(), { selectMode: t }));
+ }, [t]), /* @__PURE__ */ (0, F.jsx)(uMe, { epoch: e }, e);
}
function Y3(e) {
let t;
@@ -74826,7 +74936,7 @@ function Y3(e) {
} catch {
return null;
}
- let [n = "", ...r] = t.split("/").filter(Boolean), i = Object.hasOwn(mn, n) ? mn[n] : void 0, a = r.join("/");
+ let [n = "", ...r] = t.split("/").filter(Boolean), i = Object.hasOwn(kn, n) ? kn[n] : void 0, a = r.join("/");
return i && a ? {
segment: n,
kind: i,
@@ -74834,7 +74944,7 @@ function Y3(e) {
} : null;
}
var X3 = /* @__PURE__ */ new WeakMap();
-function Yje(e) {
+function fMe(e) {
let t = X3.get(e);
return t || (t = {
helpers: {
@@ -74848,15 +74958,15 @@ function Yje(e) {
}, X3.set(e, t)), t;
}
function Z3() {
- let e = q3(), t = e ? RV(e) : null;
+ let e = q3(), t = e ? WV(e) : null;
return !!t && t.path.endsWith("/*") && t.host.isConnected;
}
-async function Xje(e, t, n, r, i, a, o) {
+async function pMe(e, t, n, r, i, a, o) {
let s = q3();
if (!s) return;
let { segment: c, kind: l, name: u } = n;
if (e.surfaceChanged("entity", r), await t.loading(l, u, a), !a()) return;
- vu({ entityJavLayout: !1 });
+ W({ entityJavLayout: !1 });
let d = document.createElement("template");
d.innerHTML = "<div data-entity-hero><div class=\"peach-react\"></div></div>\n <div data-entity-filter><div class=\"peach-react\"></div></div>\n <section class=\"feednew\" data-feed-new aria-label=\"未入库的新作\" hidden></section>\n <div data-entity-body><div class=\"peach-react\"></div></div>";
let f = [...d.content.childNodes], p = d.content.querySelector("[data-entity-hero]"), m = {
@@ -74866,16 +74976,16 @@ async function Xje(e, t, n, r, i, a, o) {
}, h = t.props(l, u, i), g = {
...h,
hosts: m,
- card: Yje(e),
+ card: fMe(e),
resolvedEntity: o,
actions: {
...h.actions,
javContext: (e) => {
- vu({ entityJavLayout: !!e });
+ W({ entityJavLayout: !!e });
}
}
};
- await HV(`/${c}/*`, g, {
+ await JV(`/${c}/*`, g, {
container: s,
isCurrent: a,
place: (e) => (e.replaceChildren(...f), p.firstElementChild)
@@ -74884,8 +74994,8 @@ async function Xje(e, t, n, r, i, a, o) {
behavior: "smooth"
}));
}
-function Zje({ target: e }) {
- let t = (0, P.useContext)(OU), n = DU(), r = BB();
+function mMe({ target: e }) {
+ let t = (0, P.useContext)(PU), n = NU(), r = KB();
return J3(n, (n, i) => {
let a = t?.entity;
t && a && (async () => {
@@ -74902,9 +75012,9 @@ function Zje({ target: e }) {
}).catch(() => null);
if (!i()) return;
if (s?.redirect) {
- eH(hn(s.redirect.kind, s.redirect.name, s.redirect.id) + r.search + r.hash, {
+ oH(An(s.redirect.kind, s.redirect.name, s.redirect.id) + r.search + r.hash, {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
});
return;
}
@@ -74912,20 +75022,20 @@ function Zje({ target: e }) {
a.missing(e.kind);
return;
}
- let c = String(s.canonical_name || e.name), l = hn(e.kind, c, Number(s.id));
- l === r.pathname ? (n || !a.refresh(e.kind, c, r.search)) && Xje(t, a, {
+ let c = String(s.canonical_name || e.name), l = An(e.kind, c, Number(s.id));
+ l === r.pathname ? (n || !a.refresh(e.kind, c, r.search)) && pMe(t, a, {
...e,
name: c
- }, r.pathname, r.search, i, s) : eH(l + r.search + r.hash, {
+ }, r.pathname, r.search, i, s) : oH(l + r.search + r.hash, {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
});
})();
}, { shown: () => Z3() && !q3()?.hidden }), null;
}
-function Qje() {
- let e = Y3(BB().pathname);
- return e ? /* @__PURE__ */ (0, F.jsx)(Zje, { target: e }, JSON.stringify([e.kind, e.name])) : null;
+function hMe() {
+ let e = Y3(KB().pathname);
+ return e ? /* @__PURE__ */ (0, F.jsx)(mMe, { target: e }, JSON.stringify([e.kind, e.name])) : null;
}
// src/react/jav/jav-header.tsx
function Q3({ tab: e, navigate: t, find: n }) {
@@ -74942,19 +75052,19 @@ function Q3({ tab: e, navigate: t, find: n }) {
onClick: n,
children: "查找资源"
})]
- }), /* @__PURE__ */ (0, F.jsx)(FQ, {
- tabs: y$.map(([e, t]) => ({
+ }), /* @__PURE__ */ (0, F.jsx)(IQ, {
+ tabs: b$.map(([e, t]) => ({
value: e,
label: t
})),
value: e,
label: "JAV 分区",
className: "",
- onChange: (e) => t(VTe(e))
+ onChange: (e) => t(nEe(e))
})]
});
}
-function $je({ navigate: e, receipt: t }) {
+function gMe({ navigate: e, receipt: t }) {
let [n, r] = (0, P.useState)(null);
return /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [/* @__PURE__ */ (0, F.jsx)(Q3, {
tab: "library",
@@ -74967,12 +75077,12 @@ function $je({ navigate: e, receipt: t }) {
})] });
}
// src/react/router/pages/catalog.tsx
-var eMe = () => lu, $3 = $V.navigation.seq, e6 = $V.navigation.openEpoch, t6 = $V.navigation.location.pathname, n6 = {
+var _Me = () => wu, $3 = aH.navigation.seq, e6 = aH.navigation.openEpoch, t6 = aH.navigation.location.pathname, n6 = {
seq: $3,
claimed: !0,
from: t6
};
-$V.listen((e) => {
+aH.listen((e) => {
n6 = {
seq: e.seq,
claimed: e.openEpoch === e6,
@@ -74981,18 +75091,18 @@ $V.listen((e) => {
});
var r6 = !1;
function i6(e) {
- let { seq: t, openEpoch: n, location: r } = $V.navigation, i = bV(r.pathname), a = nH() ?? r, o = U ?? {};
+ let { seq: t, openEpoch: n, location: r } = aH.navigation, i = EV(r.pathname), a = cH() ?? r, o = U ?? {};
return {
seq: t,
epoch: n,
- opens: lu,
+ opens: wu,
covered: i,
address: `${a.pathname}${a.search}`,
filters: JSON.stringify(o, Object.keys(o).sort()),
opened: e
};
}
-function tMe(e, t, n, r) {
+function vMe(e, t, n, r) {
let i = { ...U };
if (e === "/trash") return {
...i,
@@ -75003,22 +75113,22 @@ function tMe(e, t, n, r) {
state: "trash",
q: ""
};
- let a = new URLSearchParams(t), { defaultSort: o, defaultSortDirection: s } = vA().value;
+ let a = new URLSearchParams(t), { defaultSort: o, defaultSortDirection: s } = CA().value;
return {
...i,
loc: a.get("loc") ?? r.defaultLoc(),
creator: a.get("creator") || "",
studio: a.get("studio") || "",
owner: a.get("owner") === "none" ? "none" : "",
- tag: Vn(a.get("tag")),
+ tag: nr(a.get("tag")),
tag_match: a.get("tag_match") === "any" ? "any" : "all",
len: a.get("len") || "",
dur_min: a.get("dur_min") || "",
dur_max: a.get("dur_max") || "",
orient: a.get("orient") || "",
- state: un[e] || a.get("state") || "",
- ...Zk(a.get("sort"), a.get("dir"), o, s),
- seed: a.get("seed") || (n ? zn() : i.seed || zn()),
+ state: Tn[e] || a.get("state") || "",
+ ...iA(a.get("sort"), a.get("dir"), o, s),
+ seed: a.get("seed") || (n ? er() : i.seed || er()),
q: a.get("q") || "",
jav: a.get("jav") || "",
performer: a.get("performer") || "",
@@ -75028,13 +75138,13 @@ function tMe(e, t, n, r) {
folder_recursive: a.get("folder_recursive") === "0" ? "0" : ""
};
}
-function nMe(e, t) {
+function yMe(e, t) {
let n = { ...e }, r = i6(n.opened);
Object.assign(e, r);
let i = t.catalog;
if (!i || r.opens === 0) return;
if (r.covered) {
- nH() || i.fill();
+ cH() || i.fill();
return;
}
let a = !1;
@@ -75044,41 +75154,41 @@ function nMe(e, t) {
i.load();
return;
}
- r.epoch !== n.epoch && (a = $V.navigation.action === "POP" && n6.from !== "/");
+ r.epoch !== n.epoch && (a = aH.navigation.action === "POP" && n6.from !== "/");
}
- let { pathname: o, search: s } = $V.navigation.location;
+ let { pathname: o, search: s } = aH.navigation.location;
if (o === "/" && new URLSearchParams(s).get("state") === "ads") {
- let { kind: e, view: t } = a$(s);
- r6 = !0, eH(o$(e, t), { replace: !0 });
+ let { kind: e, view: t } = o$(s);
+ r6 = !0, oH(s$(e, t), { replace: !0 });
return;
}
let c = r6;
- r6 = !1, a &&= o === "/", e.opened = !0, vu({ state: tMe(o, s, a, i) }), i.open(o, {
+ r6 = !1, a &&= o === "/", e.opened = !0, W({ state: vMe(o, s, a, i) }), i.open(o, {
entering: a,
retitle: c
});
}
-function rMe(e) {
- return fn(e) || e === "/trash" || bV(e) || e === "/immerse" || !!Y3(e);
+function bMe(e) {
+ return Dn(e) || e === "/trash" || EV(e) || e === "/immerse" || !!Y3(e);
}
-function iMe() {
- let e = (0, P.useContext)(OU), t = DU(), n = (0, P.useSyncExternalStore)(bu, eMe), r = BB(), i = (0, P.useRef)(null), a = (0, P.useRef)({
+function xMe() {
+ let e = (0, P.useContext)(PU), t = NU(), n = (0, P.useSyncExternalStore)(Pu, _Me), r = KB(), i = (0, P.useRef)(null), a = (0, P.useRef)({
mounted: !0,
queued: !1
});
return (0, P.useEffect)(() => {
let t = a.current;
t.mounted = !0;
- let n = i6(!bV($V.navigation.location.pathname));
+ let n = i6(!EV(aH.navigation.location.pathname));
return !n.covered && n.opens > 0 && (r6 || n6.seq === $3 ? n.opens = -1 : n6.claimed ? n.seq = -1 : n.epoch = -1), i.current = n, () => {
t.mounted = !1, queueMicrotask(() => {
- e?.catalog && !rMe($V.navigation.location.pathname) && e.catalog.release();
+ e?.catalog && !bMe(aH.navigation.location.pathname) && e.catalog.release();
});
};
}, []), (0, P.useEffect)(() => {
let t = a.current;
!t.queued && e && (t.queued = !0, queueMicrotask(() => {
- t.queued = !1, t.mounted && i.current && nMe(i.current, e);
+ t.queued = !1, t.mounted && i.current && yMe(i.current, e);
}));
}, [
t,
@@ -75088,7 +75198,7 @@ function iMe() {
]), null;
}
function a6() {
- let { pathname: e, search: t } = BB();
+ let { pathname: e, search: t } = KB();
(0, P.useLayoutEffect)(() => {
if (e !== "/wall") return;
document.body.setAttribute("data-wall-open", ""), document.documentElement.removeAttribute("data-wall-entry");
@@ -75101,36 +75211,36 @@ function a6() {
});
};
}, [e]);
- let n = (0, P.useContext)(OU), r = document.getElementById("javLibraryHeader"), i = fn(e) && new URLSearchParams(t).get("jav") === "1";
+ let n = (0, P.useContext)(PU), r = document.getElementById("javLibraryHeader"), i = Dn(e) && new URLSearchParams(t).get("jav") === "1";
return (0, P.useLayoutEffect)(() => {
if (r) return r.hidden = !i, () => {
r.hidden = !0;
};
- }, [r, i]), bV(e) && !yV(e) ? null : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
- /* @__PURE__ */ (0, F.jsx)(iMe, {}, e === "/junk-files" ? "/junk-files" : "/"),
- fn(e) ? /* @__PURE__ */ (0, F.jsx)(IU, {}) : null,
- i && r && n ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)($je, {
+ }, [r, i]), EV(e) && !TV(e) ? null : /* @__PURE__ */ (0, F.jsxs)(F.Fragment, { children: [
+ /* @__PURE__ */ (0, F.jsx)(xMe, {}, e === "/junk-files" ? "/junk-files" : "/"),
+ Dn(e) ? /* @__PURE__ */ (0, F.jsx)(HU, {}) : null,
+ i && r && n ? (0, Lt.createPortal)(/* @__PURE__ */ (0, F.jsx)(gMe, {
navigate: n.navigate,
receipt: (e) => n.receipt(e)
}), r) : null
] });
}
// src/react/router/pages/follow.tsx
-var o6 = () => document.getElementById("stats"), aMe = () => hu;
-function oMe(e) {
+var o6 = () => document.getElementById("stats"), SMe = () => Au;
+function CMe(e) {
let t = document.createElement("div");
- return t.className = "peach-react", Ls(e, () => {
+ return t.className = "peach-react", Qs(e, () => {
e.textContent = "", e.append(t);
}), t;
}
-async function sMe(e, t) {
+async function wMe(e, t) {
let n = o6(), r = e.follow;
if (!n || !r || r.refresh()) return;
- let i = mu;
- e.surfaceChanged("follow", "/follow"), u2(n, r.skeleton()), await HV("/follow", r.props(), {
+ let i = ku;
+ e.surfaceChanged("follow", "/follow"), u2(n, r.skeleton()), await JV("/follow", r.props(), {
container: n,
isCurrent: t,
- place: oMe
+ place: CMe
}), t() && window.scrollTo(i ? {
top: i,
behavior: "instant"
@@ -75139,32 +75249,32 @@ async function sMe(e, t) {
behavior: "smooth"
});
}
-function cMe() {
- let e = o6(), t = e ? RV(e) : null;
+function TMe() {
+ let e = o6(), t = e ? WV(e) : null;
return !!e && !e.hidden && !!t && t.path === "/follow" && t.host.isConnected;
}
-function lMe() {
- let e = (0, P.useContext)(OU);
- return J3(DU(), (t, n) => {
- e && sMe(e, n);
+function EMe() {
+ let e = (0, P.useContext)(PU);
+ return J3(NU(), (t, n) => {
+ e && wMe(e, n);
}, {
- shown: cMe,
+ shown: TMe,
onCovered: () => {
- $V.navigation.location.pathname.startsWith("/posts/") && e?.follow?.ground();
+ aH.navigation.location.pathname.startsWith("/posts/") && e?.follow?.ground();
}
}), null;
}
function s6(e) {
- let t = e ? RV(e) : null;
+ let t = e ? WV(e) : null;
return !!t && t.path === "/playlists" && t.host.isConnected;
}
-async function uMe(e, t) {
+async function DMe(e, t) {
let n = o6();
n && (e.surfaceChanged("playlists", "/playlists"), u2(n, c2("/playlists", {
followLayout: "",
followSort: "",
followDir: ""
- })), await HV("/playlists", { revision: hu }, {
+ })), await JV("/playlists", { revision: Au }, {
container: n,
isCurrent: t
}), t() && window.scrollTo({
@@ -75172,33 +75282,33 @@ async function uMe(e, t) {
behavior: "smooth"
}));
}
-function dMe() {
- let e = (0, P.useContext)(OU), t = (0, P.useSyncExternalStore)(bu, aMe), n = (0, P.useRef)(t);
+function OMe() {
+ let e = (0, P.useContext)(PU), t = (0, P.useSyncExternalStore)(Pu, SMe), n = (0, P.useRef)(t);
return (0, P.useEffect)(() => {
if (n.current === t) return;
n.current = t;
let e = o6();
- s6(e) && UV(e, { revision: t });
- }, [t]), J3(DU(), (t, n) => {
- e && uMe(e, n);
+ s6(e) && YV(e, { revision: t });
+ }, [t]), J3(NU(), (t, n) => {
+ e && DMe(e, n);
}, { shown: () => {
let e = o6();
return s6(e) && !e.hidden;
} }), null;
}
// src/react/router/pages/immerse.tsx
-function fMe() {
- let e = new URLSearchParams($V.navigation.location.search).get("id");
+function kMe() {
+ let e = new URLSearchParams(aH.navigation.location.search).get("id");
return /^\d+$/.test(e || "") ? Number(e) : void 0;
}
-function pMe() {
- let e = (0, P.useContext)(OU);
- return TU(() => {
- e?.openImmerse(fMe());
+function AMe() {
+ let e = (0, P.useContext)(PU);
+ return jU(() => {
+ e?.openImmerse(kMe());
}, !0), null;
}
-function mMe() {
- return /* @__PURE__ */ (0, F.jsx)(pMe, {}, DU());
+function jMe() {
+ return /* @__PURE__ */ (0, F.jsx)(AMe, {}, NU());
}
// src/ui-kit/anchor-scroll.ts
var c6 = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "instant" : "smooth";
@@ -75221,8 +75331,8 @@ async function l6(e, t) {
});
}
// src/react/router/pages/managed.tsx
-var hMe = () => lu > 0, u6 = () => (0, P.useSyncExternalStore)(bu, hMe), d6 = () => vA().value.followLayout === "table" ? "table" : "default", f6 = () => new URLSearchParams(window.location.search);
-function gMe(e) {
+var MMe = () => wu > 0, u6 = () => (0, P.useSyncExternalStore)(Pu, MMe), d6 = () => CA().value.followLayout === "table" ? "table" : "default", f6 = () => new URLSearchParams(window.location.search);
+function NMe(e) {
let t = f6();
return c2(e, {
followLayout: d6(),
@@ -75231,8 +75341,8 @@ function gMe(e) {
});
}
function p6(e) {
- return on("/healthz", { signal: e.controller.signal }).catch((e) => {
- if (sn(e)) return null;
+ return xn("/healthz", { signal: e.controller.signal }).catch((e) => {
+ if (Sn(e)) return null;
throw e;
});
}
@@ -75243,22 +75353,22 @@ function m6(e, t) {
writerUrl: e?.ledger_writer_origin ? new URL(t, e.ledger_writer_origin).href : ""
};
}
-async function _Me(e, t) {
+async function PMe(e, t) {
if (e === "/jav") {
let e = await p6(t);
return t.live ? {
- tab: b$(f6().get("tab")),
+ tab: x$(f6().get("tab")),
readOnly: !!e?.ledger_read_only
} : null;
}
if (e === "/stats") return {};
if (e === "/taste") {
- let e = cu;
- return vu({ cameFromSetup: !1 }), { onboarding: e };
+ let e = Cu;
+ return W({ cameFromSetup: !1 }), { onboarding: e };
}
if (e.startsWith("/settings/")) {
- window.location.hash === "#peachProxy" && vu({ configurationRequestedSection: "网络与访问" });
- let t = f6().get("section") || ou || dV(e);
+ window.location.hash === "#peachProxy" && W({ configurationRequestedSection: "网络与访问" });
+ let t = f6().get("section") || xu || _V(e);
return t ? { section: t } : {};
}
if (e === "/review") {
@@ -75270,9 +75380,9 @@ async function _Me(e, t) {
} : null;
}
if (e === "/subscriptions") {
- let e = FZ("?" + f6().toString()), n = await p6(t);
+ let e = IZ("?" + f6().toString()), n = await p6(t);
if (!t.live) return null;
- let r = vA().value;
+ let r = CA().value;
return {
...e,
pageSize: Number(r.followPageSize) || 20,
@@ -75282,12 +75392,12 @@ async function _Me(e, t) {
}
return {};
}
-var vMe = () => {
+var FMe = () => {
window.scrollTo({
top: 0,
behavior: c6()
});
-}, yMe = /* @__PURE__ */ new Set([
+}, IMe = /* @__PURE__ */ new Set([
"/stats",
"/taste",
"/review",
@@ -75295,18 +75405,18 @@ var vMe = () => {
"/tasks",
"/subscriptions"
]);
-async function bMe(e, t, n) {
- let r = $V.navigation.seq, i = () => n.live && $V.navigation.seq === r;
- if (e === "/jav" && b$(f6().get("tab")) === "library") {
- $V.replace(HTe(window.location.search));
+async function LMe(e, t, n) {
+ let r = aH.navigation.seq, i = () => n.live && aH.navigation.seq === r;
+ if (e === "/jav" && x$(f6().get("tab")) === "library") {
+ aH.replace(rEe(window.location.search));
return;
}
if (e === "/subscriptions" && f6().get("tab") === "wants") {
- eH("/jav?tab=wants", { replace: !0 });
+ oH("/jav?tab=wants", { replace: !0 });
return;
}
if (e === "/subscriptions" && f6().get("tab") === "source") {
- eH("/settings/subscriptions", { replace: !0 });
+ oH("/settings/subscriptions", { replace: !0 });
return;
}
let a = document.getElementById("stats");
@@ -75314,7 +75424,7 @@ async function bMe(e, t, n) {
e === "/jav" && window.scrollTo({
top: 0,
behavior: "instant"
- }), t.surfaceChanged("management", e), e === "/taste" && (vu({ state: {
+ }), t.surfaceChanged("management", e), e === "/taste" && (W({ state: {
...U,
creator: "",
studio: "",
@@ -75328,38 +75438,38 @@ async function bMe(e, t, n) {
state: "",
q: "",
jav: ""
- } }), t.clearSearch()), u2(a, gMe(e));
- let o = await _Me(e, n);
+ } }), t.clearSearch()), u2(a, NMe(e));
+ let o = await PMe(e, n);
if (!o) return;
- let s = await HV(e, o, {
+ let s = await JV(e, o, {
container: a,
isCurrent: () => n.live
});
- if (s && (n.revision = RV(a)?.revision ?? 0), e.startsWith("/settings/") && s && vu({ configurationRequestedSection: "" }), s && i()) {
+ if (s && (n.revision = WV(a)?.revision ?? 0), e.startsWith("/settings/") && s && W({ configurationRequestedSection: "" }), s && i()) {
let { hash: t } = window.location;
e === "/settings/library" && t === "#libraryProcessing" ? queueMicrotask(() => {
- i() && eH("/data-cleanup#libraryProcessing", {
+ i() && oH("/data-cleanup#libraryProcessing", {
replace: !0,
state: null
});
- }) : t ? l6(t, i) : (yMe.has(e) || e === "/settings/library") && vMe();
+ }) : t ? l6(t, i) : (IMe.has(e) || e === "/settings/library") && FMe();
}
}
function h6({ path: e }) {
- let t = DU();
- BB();
- let n = bV($V.navigation.location.pathname), r = (0, P.useRef)(n ? null : t), i = (0, P.useRef)(n);
+ let t = NU();
+ KB();
+ let n = EV(aH.navigation.location.pathname), r = (0, P.useRef)(n ? null : t), i = (0, P.useRef)(n);
n || i.current && r.current !== null || (r.current = t), i.current = n;
let a = e.startsWith("/settings/") ? "/settings/configuration" : e;
- return /* @__PURE__ */ (0, F.jsx)(xMe, {
+ return /* @__PURE__ */ (0, F.jsx)(RMe, {
path: e,
covered: r.current === null
}, `${a} ${r.current ?? "covered"}`);
}
-function xMe({ path: e, covered: t }) {
- let n = (0, P.useContext)(OU), r = u6(), i = (0, P.useRef)(null);
+function RMe({ path: e, covered: t }) {
+ let n = (0, P.useContext)(PU), r = u6(), i = (0, P.useRef)(null);
return (0, P.useEffect)(() => {
- e.startsWith("/settings/") && UV(document.getElementById("stats"), { section: dV(e) });
+ e.startsWith("/settings/") && YV(document.getElementById("stats"), { section: _V(e) });
}, [e]), (0, P.useEffect)(() => {
if (t || !n || !r || i.current) return;
let a = {
@@ -75368,7 +75478,7 @@ function xMe({ path: e, covered: t }) {
controller: new AbortController()
};
i.current = a, queueMicrotask(() => {
- a.live && bMe(e, n, a);
+ a.live && LMe(e, n, a);
});
}, [r]), (0, P.useEffect)(() => () => {
let e = i.current;
@@ -75376,29 +75486,29 @@ function xMe({ path: e, covered: t }) {
e.live = !1, e.controller.abort();
let t = document.getElementById("stats");
queueMicrotask(() => {
- t && e.revision && !t.hidden && RV(t)?.revision === e.revision && WV(t);
+ t && e.revision && !t.hidden && WV(t)?.revision === e.revision && XV(t);
});
}, []), null;
}
-function SMe() {
+function zMe() {
let e = u6(), t = (0, P.useRef)(!1);
return (0, P.useEffect)(() => {
- if (!e || t.current || bV($V.navigation.location.pathname)) return;
+ if (!e || t.current || EV(aH.navigation.location.pathname)) return;
t.current = !0;
let n = !0;
return queueMicrotask(() => {
- n && eH("/data-cleanup#resource-sync", { replace: !0 });
+ n && oH("/data-cleanup#resource-sync", { replace: !0 });
}), () => {
n = !1;
};
}, [e]), null;
}
// src/react/router/route-chunk.ts
-var g6 = [], _6 = "peach.chunkReloadAt", CMe = 3e4;
-async function wMe() {
+var g6 = [], _6 = "peach.chunkReloadAt", BMe = 3e4;
+async function VMe() {
try {
let e = Number(sessionStorage.getItem(_6) || 0);
- if (Date.now() - e < CMe || !(await fetch("/healthz", {
+ if (Date.now() - e < BMe || !(await fetch("/healthz", {
cache: "no-store",
credentials: "same-origin"
})).ok) return;
@@ -75411,7 +75521,7 @@ function v6(e) {
});
return g6.push(r), {
preload: () => r().catch(async (e) => {
- throw await wMe(), e;
+ throw await VMe(), e;
}),
get: () => {
if (!t) throw Error("页面代码还没装载");
@@ -75419,7 +75529,7 @@ function v6(e) {
}
};
}
-function TMe() {
+function HMe() {
let e = globalThis.requestIdleCallback;
if (typeof e != "function") return;
let t = [...g6], n = () => {
@@ -75443,7 +75553,7 @@ var b6 = v6(() => import("./peach-app.jav-page-C5uPjDXP.js")), x6 = v6(() => imp
DiagnosticsPage: t
};
}), k6 = v6(() => import("./peach-app.activity-page-B66P-r0P.js")), A6 = v6(() => import("./peach-app.follow-manage-page-36Z6mSDD.js")), j6 = v6(() => import("./peach-app.playlists-page-Be7ygGCR.js"));
-function EMe(e, t, n) {
+function UMe(e, t, n) {
if (e === "duplicates") {
n("/duplicates");
return;
@@ -75453,7 +75563,7 @@ function EMe(e, t, n) {
}
var M6 = (e) => ({
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: e }),
- prefetch: (t, n) => y6(O6, Promise.all([MEe(n), ...e === "/settings/diagnostics" ? [eTe(n)] : []]).then(() => {})),
+ prefetch: (t, n) => y6(O6, Promise.all([qEe(n), ...e === "/settings/diagnostics" ? [hTe(n)] : []]).then(() => {})),
page: (t, n) => {
let { ConfigurationPage: r, DiagnosticsPage: i } = O6.get();
return /* @__PURE__ */ (0, F.jsx)(r, {
@@ -75469,7 +75579,7 @@ var M6 = (e) => ({
}), N6 = {
"/jav": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/jav" }),
- prefetch: (e, t) => y6(b6, WTe(e.tab, t)),
+ prefetch: (e, t) => y6(b6, aEe(e.tab, t)),
page: (e, t) => {
let { JavPage: n } = b6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
@@ -75481,18 +75591,18 @@ var M6 = (e) => ({
},
"/stats": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/stats" }),
- prefetch: (e, t) => y6(x6, kAe(t)),
+ prefetch: (e, t) => y6(x6, KAe(t)),
page: (e, t) => {
let { StatsPage: n } = x6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
- tagLabel: Nl,
+ tagLabel: Jl,
onTag: t.openTag
});
}
},
"/taste": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/taste" }),
- prefetch: (e, t) => y6(S6, _je("all", t)),
+ prefetch: (e, t) => y6(S6, Pje("all", t)),
page: (e, t, n) => {
let { TastePage: r } = S6.get();
return /* @__PURE__ */ (0, F.jsx)(r, {
@@ -75505,7 +75615,7 @@ var M6 = (e) => ({
},
"/review": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/review" }),
- prefetch: (e, t) => y6(C6, vxe(t)),
+ prefetch: (e, t) => y6(C6, Pxe(t)),
page: (e, t) => {
let { ReviewPage: n } = C6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
@@ -75520,19 +75630,19 @@ var M6 = (e) => ({
},
"/data-cleanup": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/data-cleanup" }),
- prefetch: (e, t) => y6(w6, TSe(t)),
+ prefetch: (e, t) => y6(w6, BSe(t)),
page: (e, t, n) => {
let { DataCleanupPage: r } = w6.get();
return /* @__PURE__ */ (0, F.jsx)(r, {
failure: t.failure,
- open: (e) => EMe(e, t, n),
+ open: (e) => UMe(e, t, n),
toast: (e, { warning: n = !1 } = {}) => n ? t.toast({ text: e }, { sound: "warning" }) : t.receipt(e)
});
}
},
"/duplicates": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/duplicates" }),
- prefetch: (e, t) => y6(T6, Pbe(t)),
+ prefetch: (e, t) => y6(T6, Xbe(t)),
page: (e, t) => {
let { DuplicatesPage: n } = T6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
@@ -75544,13 +75654,13 @@ var M6 = (e) => ({
},
"/quality-goals": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/quality-goals" }),
- prefetch: (e, t) => y6(E6, Kbe(t)),
+ prefetch: (e, t) => y6(E6, cxe(t)),
page: (e, t) => {
let { QualityGoalsPage: n } = E6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
openItem: t.openItem,
- javTitleHtml: _F,
- javDisplayName: gF,
+ javTitleHtml: wF,
+ javDisplayName: CF,
toast: (e) => t.receipt(e),
srcBadge: t.srcBadge
});
@@ -75558,7 +75668,7 @@ var M6 = (e) => ({
},
"/sources": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/sources" }),
- prefetch: (e, t) => y6(D6, SEe(t)),
+ prefetch: (e, t) => y6(D6, LEe(t)),
page: (e, t) => {
let { ScrapingPage: n } = D6.get();
return /* @__PURE__ */ (0, F.jsx)(n, { toast: (e) => t.toast(e) });
@@ -75572,7 +75682,7 @@ var M6 = (e) => ({
"/settings/diagnostics": M6("/settings/diagnostics"),
"/tasks": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/tasks" }),
- prefetch: (e, t) => y6(k6, Vue(t)),
+ prefetch: (e, t) => y6(k6, Yue(t)),
page: () => {
let { ActivityPage: e } = k6.get();
return /* @__PURE__ */ (0, F.jsx)(e, {});
@@ -75580,7 +75690,7 @@ var M6 = (e) => ({
},
"/subscriptions": {
element: /* @__PURE__ */ (0, F.jsx)(h6, { path: "/subscriptions" }),
- prefetch: (e, t) => y6(A6, yi(t)),
+ prefetch: (e, t) => y6(A6, Pi(t)),
page: (e, t) => {
let { FollowManagePage: n } = A6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
@@ -75592,10 +75702,10 @@ var M6 = (e) => ({
});
}
}
-}, P6 = (e) => Object.hasOwn(N6, e), DMe = { "/resource-sync": { element: /* @__PURE__ */ (0, F.jsx)(SMe, {}) } }, OMe = { "/immerse": { element: /* @__PURE__ */ (0, F.jsx)(mMe, {}) } }, F6 = {
+}, P6 = (e) => Object.hasOwn(N6, e), WMe = { "/resource-sync": { element: /* @__PURE__ */ (0, F.jsx)(zMe, {}) } }, GMe = { "/immerse": { element: /* @__PURE__ */ (0, F.jsx)(jMe, {}) } }, F6 = {
"/playlists": {
- element: /* @__PURE__ */ (0, F.jsx)(dMe, {}),
- prefetch: (e, t) => y6(j6, oEe(t)),
+ element: /* @__PURE__ */ (0, F.jsx)(OMe, {}),
+ prefetch: (e, t) => y6(j6, xEe(t)),
page: (e, t) => {
let { PlaylistsPage: n } = j6.get();
return /* @__PURE__ */ (0, F.jsx)(n, {
@@ -75608,21 +75718,21 @@ var M6 = (e) => ({
}
},
"/follow": {
- element: /* @__PURE__ */ (0, F.jsx)(lMe, {}),
- prefetch: (e, t) => Vi(e, t),
- page: (e) => /* @__PURE__ */ (0, F.jsx)(NCe, { ...e })
+ element: /* @__PURE__ */ (0, F.jsx)(EMe, {}),
+ prefetch: (e, t) => na(e, t),
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(JCe, { ...e })
}
}, I6 = (e) => Object.hasOwn(F6, e), L6 = {
- element: /* @__PURE__ */ (0, F.jsx)(Jje, {}),
- prefetch: (e, t) => KSe(e, t),
- page: (e, t) => /* @__PURE__ */ (0, F.jsx)(hTe, {
+ element: /* @__PURE__ */ (0, F.jsx)(dMe, {}),
+ prefetch: (e, t) => sCe(e, t),
+ page: (e, t) => /* @__PURE__ */ (0, F.jsx)(ATe, {
...e,
route: t.routeIndex,
savePreference: t.savePeopleLayout,
exitSelectMode: t.exitSelectMode,
personAvatar: t.personAvatar,
authorAvatar: t.authorAvatar,
- tagLabel: Nl,
+ tagLabel: Jl,
openEntity: t.openEntity,
showTags: t.showIndexTags,
openFollowAuthor: t.openFollowAuthor,
@@ -75636,9 +75746,9 @@ var M6 = (e) => ({
"/tags": L6,
"/series": L6
}, z6 = {
- element: /* @__PURE__ */ (0, F.jsx)(Qje, {}),
- prefetch: (e) => PSe(e),
- page: (e) => /* @__PURE__ */ (0, F.jsx)(Ywe, { ...e })
+ element: /* @__PURE__ */ (0, F.jsx)(hMe, {}),
+ prefetch: (e) => YSe(e),
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(uTe, { ...e })
}, B6 = {
"/performers/*": z6,
"/studios/*": z6,
@@ -75649,59 +75759,59 @@ var M6 = (e) => ({
}, V6 = {
"/": {
element: /* @__PURE__ */ (0, F.jsx)(a6, {}),
- prefetch: (e, t) => hce(e, t),
+ prefetch: (e, t) => Cce(e, t),
page: (e) => /* @__PURE__ */ (0, F.jsx)(oY, { ...e })
},
"/junk-files": {
element: /* @__PURE__ */ (0, F.jsx)(a6, {}),
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, F.jsx)(ATe, { ...e })
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(GTe, { ...e })
}
-}, H6 = (e) => Object.hasOwn(V6, e), kMe = (e) => e.mode === "notice" ? /* @__PURE__ */ (0, F.jsx)(Bge, { ...e }) : /* @__PURE__ */ (0, F.jsx)(R$, { ...e }), U6 = {
+}, H6 = (e) => Object.hasOwn(V6, e), KMe = (e) => e.mode === "notice" ? /* @__PURE__ */ (0, F.jsx)(Xge, { ...e }) : /* @__PURE__ */ (0, F.jsx)(z$, { ...e }), U6 = {
"catalog-filter": {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, F.jsx)(jW, { ...e })
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(BW, { ...e })
},
"feed-new": {
- prefetch: (e) => ASe(e),
- page: (e) => /* @__PURE__ */ (0, F.jsx)(tTe, { ...e })
+ prefetch: (e) => GSe(e),
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(gTe, { ...e })
},
"library-processing": {
- prefetch: (e, t) => CH(t),
- page: (e) => /* @__PURE__ */ (0, F.jsx)(kMe, { ...e })
+ prefetch: (e, t) => kH(t),
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(KMe, { ...e })
},
search: {
prefetch: async () => {},
- page: (e) => /* @__PURE__ */ (0, F.jsx)(OEe, { ...e })
+ page: (e) => /* @__PURE__ */ (0, F.jsx)(UEe, { ...e })
}
}, W6 = (e) => Object.hasOwn(U6, e), G6 = {
"batch-dock": {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(Zoe, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(ose, {})
},
"glow-picker": {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(Ose, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(Fse, {})
},
"manage-header": {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(xue, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(kue, {})
},
immerse: {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(_le, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(Tle, {})
},
"settings-panel": {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(ZEe, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(fDe, {})
},
sidebar: {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(dDe, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(DDe, {})
},
stage: {
prefetch: async () => {},
- page: () => /* @__PURE__ */ (0, F.jsx)(DAe, {})
+ page: () => /* @__PURE__ */ (0, F.jsx)(WAe, {})
}
}, K6 = (e) => Object.hasOwn(G6, e), q6 = [
"/",
@@ -75723,86 +75833,86 @@ var J6 = (e) => P6(e) || I6(e) || Object.hasOwn(R6, e) || Object.hasOwn(B6, e) |
function Y6(e) {
return P6(e) ? N6[e] : I6(e) ? F6[e] : H6(e) ? V6[e] : W6(e) ? U6[e] : K6(e) ? G6[e] : Object.hasOwn(R6, e) ? R6[e] : B6[e];
}
-function AMe(e, t, n) {
+function qMe(e, t, n) {
return J6(e) ? Y6(e).prefetch(t, n) : Promise.reject(/* @__PURE__ */ Error(`路由树里没有这一页:${e}`));
}
-function jMe(e, t, n, r) {
+function JMe(e, t, n, r) {
return Y6(e).page(t, n, r);
}
// src/react/application-residents.ts
var X6 = null, Z6 = null, Q6 = 0, $6 = /* @__PURE__ */ new Set();
-function MMe(e) {
+function YMe(e) {
return X6 = e, Z6 && e(Z6), () => {
X6 === e && (X6 = null);
};
}
-function NMe(e) {
- return X6 && (Z6 = e, X6(e), xhe(Promise.resolve(AMe)), TMe()), Promise.resolve();
+function XMe(e) {
+ return X6 && (Z6 = e, X6(e), jhe(Promise.resolve(qMe)), HMe()), Promise.resolve();
}
async function e8(e, t, n = (e) => e) {
let r = Q6;
- if (t.isConnected || $6.add(t), !await HV(e, {}, {
+ if (t.isConnected || $6.add(t), !await JV(e, {}, {
container: t,
resident: !0,
isCurrent: () => !!X6 && r === Q6,
place: () => n(t)
}) || r !== Q6 || !X6) throw new DOMException("应用已卸载", "AbortError");
}
-function PMe() {
+function ZMe() {
Q6 += 1, X6 = null, Z6 = null, t8 = null, n8 = null, a8 = null, o8 = null, c8 = null, l8 = null, d8 = null, f8 = null, m8 = null, h8 = null, _8 = null, v8 = null, b8 = null;
for (let e of $6) e.remove();
- $6.clear(), GQ();
+ $6.clear(), KQ();
}
var t8 = null, n8 = null;
function r8(e) {
return t8 ??= (async () => {
- let t = EAe(e), n = document.createElement("div");
+ let t = UAe(e), n = document.createElement("div");
return n.dataset.stageHost = "", await e8("stage", n, (e) => (document.body.append(e), e)), n8 = t, t;
})(), t8;
}
var i8 = () => n8, a8 = null, o8 = null;
-function FMe(e) {
+function QMe(e) {
return a8 ??= (async () => {
- let t = gle(e), n = document.createElement("div");
+ let t = wle(e), n = document.createElement("div");
return n.dataset.immerseHost = "", await e8("immerse", n, (e) => (document.body.append(e), e)), o8 = t, t;
})(), a8;
}
var s8 = () => o8, c8 = null, l8 = null;
-function IMe(e) {
+function $Me(e) {
return c8 ??= (async () => {
- let t = XEe(e), n = document.createElement("div");
+ let t = dDe(e), n = document.createElement("div");
return n.dataset.settingsHost = "", await e8("settings-panel", n, (e) => (document.body.append(e), e)), l8 = t, t;
})(), c8;
}
var u8 = () => l8, d8 = null, f8 = null;
-function LMe(e) {
+function eNe(e) {
return d8 ??= (async () => {
- let t = uDe(e);
+ let t = EDe(e);
return await e8("sidebar", e.scroll, (e) => (e.replaceChildren(), e)), e.attached(), f8 = t, t;
})(), d8;
}
var p8 = () => f8, m8 = null, h8 = null;
-function RMe(e) {
+function tNe(e) {
return m8 ??= (async () => {
- let t = bue(e);
+ let t = Oue(e);
return await e8("manage-header", e.root, (e) => (e.replaceChildren(), e)), h8 = t, t;
})(), m8;
}
var g8 = () => h8, _8 = null, v8 = null;
-function zMe(e) {
+function nNe(e) {
return _8 ??= (async () => {
- let t = Xoe(e);
+ let t = ase(e);
return await e8("batch-dock", e.root), v8 = t, t;
})(), _8;
}
var y8 = () => v8, b8 = null;
-function BMe(e) {
+function rNe(e) {
return b8 ??= (async () => {
- Dse(e), await e8("glow-picker", e.root);
+ Pse(e), await e8("glow-picker", e.root);
})(), b8;
}
function x8(e, t, n, r) {
- KQ(e, t), qQ(n, r);
+ qQ(e, t), JQ(n, r);
}
// src/application/effects.ts
var S8 = class {
@@ -75887,7 +75997,7 @@ var S8 = class {
if (e.length) throw AggregateError(e, "应用资源清理未全部完成");
}
}, J = new S8();
-function VMe() {
+function iNe() {
return J.dispose(), J = new S8(), J;
}
// src/application/receipts.js
@@ -75901,13 +76011,13 @@ var C8 = {
rollSeed: void 0,
seededSample: void 0
};
-function HMe() {
- KQ(L("#toasts"), {
+function aNe() {
+ qQ(L("#toasts"), {
success: R("check"),
error: R("circle-alert")
}), C8.toastBody = (e) => e && typeof e == "object" && "html" in e ? String(e.html) : z(e && typeof e == "object" ? e.text ?? "" : e ?? ""), C8.toastSeq = 0, C8.toast = (e, { timeout: t = 6e3, warn: n = !1, action: r = null, sound: i = null } = {}) => {
let a = `toast-${++C8.toastSeq}`, o = (e, t, n, r) => {
- No(i || (t ? "error" : "success")), x8(L("#toasts"), {
+ Jo(i || (t ? "error" : "success")), x8(L("#toasts"), {
success: R("check"),
error: R("circle-alert")
}, a, {
@@ -75917,7 +76027,7 @@ function HMe() {
action: r && !t ? {
label: r.label,
run: (e) => {
- kc(e), r.run();
+ Wc(e), r.run();
}
} : null
});
@@ -75941,14 +76051,14 @@ function HMe() {
}
} : null
}), r;
- }, C8.actionFailure = (e, t) => C8.toast({ text: `${e}失败:${t?.message || "请重试"}` }, { warn: !0 }), C8.rollSeed = () => zn(), C8.seededSample = (e, t, n, r = (e) => e.k) => {
+ }, C8.actionFailure = (e, t) => C8.toast({ text: `${e}失败:${t?.message || "请重试"}` }, { warn: !0 }), C8.rollSeed = () => er(), C8.seededSample = (e, t, n, r = (e) => e.k) => {
if (e.length <= t) return e;
- let i = new Set([...e].sort((e, t) => Rn(n, r(e)) - Rn(n, r(t))).slice(0, t).map(r));
+ let i = new Set([...e].sort((e, t) => $n(n, r(e)) - $n(n, r(t))).slice(0, t).map(r));
return e.filter((e) => i.has(r(e)));
};
}
// src/react/catalog-grid/catalog-state.ts
-var UMe = [
+var oNe = [
"loc",
"creator",
"studio",
@@ -75970,16 +76080,16 @@ var UMe = [
"folder_recursive"
];
function w8(e, t, n, r = n.defaultSort) {
- return Zk(e, t, n.defaultSort, n.defaultSortDirection, r);
+ return iA(e, t, n.defaultSort, n.defaultSortDirection, r);
}
-function WMe(e, t, n) {
- let r = decodeURIComponent(e.pathname), i = new URLSearchParams(e.search), a = fn(r) || r === "/trash", o = (e) => a ? i.get(e) : null;
+function sNe(e, t, n) {
+ let r = decodeURIComponent(e.pathname), i = new URLSearchParams(e.search), a = Dn(r) || r === "/trash", o = (e) => a ? i.get(e) : null;
return {
loc: i.get("loc") ?? "local,115",
creator: o("creator") || "",
studio: o("studio") || "",
owner: o("owner") === "none" ? "none" : "",
- tag: Vn(o("tag")),
+ tag: nr(o("tag")),
tag_match: o("tag_match") === "any" ? "any" : "all",
len: o("len") || "",
dur_min: o("dur_min") || "",
@@ -75987,7 +76097,7 @@ function WMe(e, t, n) {
orient: o("orient") || "",
region: o("region") || "",
year: o("year") || "",
- state: un[r] || o("state") || "",
+ state: Tn[r] || o("state") || "",
...w8(o("sort"), o("dir"), t),
seed: o("seed") || n(),
q: o("q") || "",
@@ -75998,18 +76108,18 @@ function WMe(e, t, n) {
folder_recursive: o("folder_recursive") === "0" ? "0" : ""
};
}
-function GMe(e, t) {
+function cNe(e, t) {
return e.split(",").filter(Boolean).filter((e) => t[e] !== !1).join(",") || e;
}
-function KMe(e) {
- let t = ln[e.state ?? ""] || "/", n = new URLSearchParams();
- for (let t of UMe) {
+function lNe(e) {
+ let t = wn[e.state ?? ""] || "/", n = new URLSearchParams();
+ for (let t of oNe) {
let r = e[t];
- !r || t === "tag_match" && r === "all" || t === "dir" && r === Jk(e.sort ?? "") || n.set(t, r);
+ !r || t === "tag_match" && r === "all" || t === "dir" && r === tA(e.sort ?? "") || n.set(t, r);
}
- return !ln[e.state ?? ""] && e.state && n.set("state", e.state), t + (n.size ? `?${n}` : "");
+ return !wn[e.state ?? ""] && e.state && n.set("state", e.state), t + (n.size ? `?${n}` : "");
}
-function qMe(e, t, n) {
+function uNe(e, t, n) {
return {
loc: e.loc ?? "",
creator: "",
@@ -76025,7 +76135,7 @@ function qMe(e, t, n) {
year: "",
state: "",
sort: t.defaultSort,
- dir: Xk(t.defaultSort, t.defaultSort, t.defaultSortDirection),
+ dir: rA(t.defaultSort, t.defaultSort, t.defaultSortDirection),
seed: n(),
q: "",
jav: "",
@@ -76046,7 +76156,7 @@ function T8(e) {
};
}
// src/react/catalog-grid/catalog-controller.ts
-var JMe = class {
+var dNe = class {
currentRevision = 0;
currentPage = "";
painting = null;
@@ -76091,38 +76201,38 @@ var JMe = class {
let e = [...this.waiters.values()];
this.waiters.clear(), e.forEach((e) => e());
}
-}, E8 = 3e4, D8 = 0, YMe = (e, t = D8) => [
+}, E8 = 3e4, D8 = 0, fNe = (e, t = D8) => [
"facets",
e,
t
-], XMe = (e, t, n = D8) => [
+], pNe = (e, t, n = D8) => [
"tops",
e,
t,
n
-], ZMe = (e, t = D8) => [
+], mNe = (e, t = D8) => [
"tops",
e,
t
];
async function O8(e) {
- let t = String(e), n = await on(`/api/tops?${t}`), r = new URLSearchParams(t);
- return n.performers.length || n.studios.length || !r.has("state") ? n : (r.delete("state"), await on(`/api/tops?${r}`));
+ let t = String(e), n = await xn(`/api/tops?${t}`), r = new URLSearchParams(t);
+ return n.performers.length || n.studios.length || !r.has("state") ? n : (r.delete("state"), await xn(`/api/tops?${r}`));
}
-function QMe(e, t) {
+function hNe(e, t) {
return Promise.all([H.fetchQuery({
- queryKey: YMe(e),
- queryFn: () => on(`/api/facets${e ? `?${e}` : ""}`),
+ queryKey: fNe(e),
+ queryFn: () => xn(`/api/facets${e ? `?${e}` : ""}`),
staleTime: E8
}), H.fetchQuery({
- queryKey: XMe(t, e),
+ queryKey: pNe(t, e),
queryFn: () => O8(t),
staleTime: E8
})]);
}
-function $Me(e) {
+function gNe(e) {
return H.fetchQuery({
- queryKey: ZMe(e),
+ queryKey: mNe(e),
queryFn: () => O8(e),
staleTime: E8
});
@@ -76243,11 +76353,11 @@ var A8 = [
"follow",
"activity",
"configuration"
-], eNe = (e) => j8.filter(([t]) => M8.includes(t) && (t !== "configuration" || e)), N8 = j8.flatMap(([e, t, n]) => e === "configuration" ? [] : [[
+], _Ne = (e) => j8.filter(([t]) => M8.includes(t) && (t !== "configuration" || e)), N8 = j8.flatMap(([e, t, n]) => e === "configuration" ? [] : [[
e === "follow" ? "follow-manage" : e === "cleanup" ? "data-cleanup" : e,
t,
n
-]]), tNe = [...A8, ...N8], nNe = {
+]]), vNe = [...A8, ...N8], yNe = {
stats: "stats",
review: "review",
"data-cleanup": "cleanup",
@@ -76269,23 +76379,23 @@ function F8({ kind: e, q: t, scope: n, view: r, category: i }) {
function I8(e, t, n) {
let r = e.entity_id || e.id, i = t === "studio" || t === "agency";
return {
- html: Za(e.k, r ? {
+ html: po(e.k, r ? {
id: r,
has_image: e.has_image,
image_version: e.image_version,
logo_version: e.logo_version,
avatar_stand_in: e.avatar_stand_in
} : null, e.has_avatar && !i ? e.rep : null, t, e.mark, e.has_logo ? e.k : "", i && n ? "large" : "ring", i ? null : e.avatar_focus, !0),
- face: $a(e.avatar_focus)
+ face: ho(e.avatar_focus)
};
}
function L8(e) {
- let t = String(e.k || ""), n = (t.match(/[A-Za-z0-9]/)?.[0] || Array.from(t)[0] || "?").toUpperCase(), r = e.avatar ? `<img src="${z(e.avatar)}" alt="" loading="lazy" referrerpolicy="no-referrer" ${Sa({ fallbacks: [e.avatar_fallback || ""] })}>` : "";
+ let t = String(e.k || ""), n = (t.match(/[A-Za-z0-9]/)?.[0] || Array.from(t)[0] || "?").toUpperCase(), r = e.avatar ? `<img src="${z(e.avatar)}" alt="" loading="lazy" referrerpolicy="no-referrer" ${La({ fallbacks: [e.avatar_fallback || ""] })}>` : "";
return `<span class="ini">${z(n)}</span>${r}`;
}
-function rNe(e) {
+function bNe(e) {
let t = (t) => {
- e.adoptFollowView(t), e.hideIndex(), e.openPage(ua(t));
+ e.adoptFollowView(t), e.hideIndex(), e.openPage(Ta(t));
};
return {
route(t, { replace: n = !1 } = {}) {
@@ -76294,41 +76404,41 @@ function rNe(e) {
personAvatar: I8,
authorAvatar: L8,
openFollowAuthor(n) {
- t(da(e.followView(), n));
+ t(Ea(e.followView(), n));
},
openFollowTag(n) {
- t(fa(e.followView(), n));
+ t(Da(e.followView(), n));
}
};
}
// src/application/source-action.ts
-function iNe(e) {
+function xNe(e) {
return async (t, n, { button: r = null } = {}) => {
if (r?.getAttribute("aria-busy") === "true") return;
let i = r?.innerHTML ?? "", a = r?.textContent?.trim() ?? "";
- r && (kc(r), r.innerHTML = `${xs("正在定位")}${a ? `<span>${z(a)}</span>` : ""}`), n.textContent = "";
+ r && (Wc(r), r.innerHTML = `${Is("正在定位")}${a ? `<span>${z(a)}</span>` : ""}`), n.textContent = "";
try {
await e.request(t), n.textContent = "", e.success();
} catch (t) {
n.textContent = e.failureText(t);
} finally {
- r && (kc(r, !1), r.innerHTML = i);
+ r && (Wc(r, !1), r.innerHTML = i);
}
};
}
// src/react/entity-page/entity-route.ts
-var R8 = () => Object.fromEntries(MX.map((e) => [e, e === "sort" ? "new" : e === "dir" ? "desc" : ""]));
+var R8 = () => Object.fromEntries(NX.map((e) => [e, e === "sort" ? "new" : e === "dir" ? "desc" : ""]));
function z8(e, t) {
let n = new URLSearchParams(e), r = R8();
- for (let e of MX) e !== "sort" && e !== "dir" && (r[e] = n.get(e) || "");
+ for (let e of NX) e !== "sort" && e !== "dir" && (r[e] = n.get(e) || "");
return {
...r,
- ...Zk(n.get("sort"), n.get("dir"), t.sort, t.dir, "new")
+ ...iA(n.get("sort"), n.get("dir"), t.sort, t.dir, "new")
};
}
function B8(e) {
let t = new URLSearchParams();
- for (let n of MX) !e[n] || n === "sort" && e[n] === "new" || n === "dir" && e[n] === Jk(e.sort || "") || t.set(n, e[n]);
+ for (let n of NX) !e[n] || n === "sort" && e[n] === "new" || n === "dir" && e[n] === tA(e.sort || "") || t.set(n, e[n]);
return t.toString();
}
function V8(e) {
@@ -76342,18 +76452,18 @@ function H8(e, t) {
let n = new URLSearchParams(B8(e));
return t?.media === "photos" ? (n.set("media", "photos"), t.set && n.set("set", String(t.set))) : t?.media === "online" && n.set("media", "online"), n.toString();
}
-function aNe(e, t, n, r) {
+function SNe(e, t, n, r) {
let i = H8(n, r);
- return hn(e, t) + (i ? `?${i}` : "");
+ return An(e, t) + (i ? `?${i}` : "");
}
-function oNe() {
+function CNe() {
let e = "";
return {
fresh(t, n) {
- return e = hn(t, n), e;
+ return e = An(t, n), e;
},
read(t, n, r, i) {
- let a = e === hn(t, n) && !r;
+ let a = e === An(t, n) && !r;
e = "";
let o = a ? R8() : { ...z8(r, i) };
return t === "creator" && (o.creator = ""), {
@@ -76367,10 +76477,10 @@ function oNe() {
};
}
// src/react/entity-page/photo-surface.ts
-function sNe(e, t) {
+function wNe(e, t) {
return e.entityWall && e.entityCurrent && e.indexVisible || e.pathname === "/follow" && e.followMedia === "images" && e.statsVisible ? !0 : t();
}
-function cNe(e) {
+function TNe(e) {
let t = () => {
let t = e.preferences();
for (let n of e.walls()) n.dataset.size = t.size, n.dataset.layout = "fixed", n.dataset.imagesOnly = String(t.imagesOnly);
@@ -76392,12 +76502,12 @@ function cNe(e) {
};
}
// src/react/entity-page/entity-controller.ts
-function lNe(e, t, n) {
+function ENe(e, t, n) {
let r = (t, n, r, i = {
media: "videos",
set: 0
}, { push: a = !0 } = {}) => {
- if (a && e.route(aNe(t, n, r, i)), e.restoreHomeContext(), !e.live(t, n)) return !1;
+ if (a && e.route(SNe(t, n, r, i)), e.restoreHomeContext(), !e.live(t, n)) return !1;
e.releaseBodyPreviews();
let o = e.state();
return e.push({
@@ -76407,7 +76517,7 @@ function lNe(e, t, n) {
jav: o.jav
}), !0;
}, i = /* @__PURE__ */ new Map(), a = (t, a) => {
- let o = hn(t, a), s = i.get(o);
+ let o = An(t, a), s = i.get(o);
if (s) return s;
let c = () => {
let n = e.context();
@@ -76424,7 +76534,7 @@ function lNe(e, t, n) {
e.tag = "", e.creator = "", e.studio = "", e.owner = "";
}),
setSort: (e) => {
- let n = c(), i = Yk(e, n.sort || "new", n.dir || "");
+ let n = c(), i = nA(e, n.sort || "new", n.dir || "");
i && r(t, a, {
...n,
...i
@@ -76444,7 +76554,7 @@ function lNe(e, t, n) {
e.setPhotoLayout(t), e.syncPhotoWalls();
},
openEntity: (t, n, r = !1) => {
- r ? e.route(hn(t, n) + e.suffix(), !0) : e.openEntity(t, n);
+ r ? e.route(An(t, n) + e.suffix(), !0) : e.openEntity(t, n);
},
painted: (t, n) => {
let r = e.photoViewActive();
@@ -76475,7 +76585,7 @@ function lNe(e, t, n) {
};
}
// src/react/entity-page/entity-loading.ts
-function uNe(e) {
+function DNe(e) {
return async (t, n, r) => {
!e.shapesReady(t, n) && (await e.waitShapes(), !r()) || (e.paintSkeleton(t, n), e.resetView(), e.loadShapes().then(() => {
r() && e.syncParts(t, n);
@@ -76483,8 +76593,8 @@ function uNe(e) {
};
}
// src/react/entity-page/entity-portrait.ts
-function dNe(e, t) {
- let n = e === "studio" || e === "agency", r = t.id ? Xa({
+function ONe(e, t) {
+ let n = e === "studio" || e === "agency", r = t.id ? fo({
kind: e,
id: t.id,
hasImage: t.has_image,
@@ -76497,19 +76607,19 @@ function dNe(e, t) {
logoVariant: "large",
alt: z(t.canonical_name),
lazy: !1,
- style: n ? "" : eo(t.avatar_focus),
+ style: n ? "" : go(t.avatar_focus),
focus: n ? null : t.avatar_focus,
dropStyle: !0,
thumb: !1
}) : "", i = e === "creator" ? t.follow : null;
- return r || (i?.avatar ? `<img src="${z(i.avatar)}" alt="${z(t.canonical_name)}" referrerpolicy="no-referrer" ${Sa({ fallbacks: [i.avatar_fallback || ""] })}>` : "");
+ return r || (i?.avatar ? `<img src="${z(i.avatar)}" alt="${z(t.canonical_name)}" referrerpolicy="no-referrer" ${La({ fallbacks: [i.avatar_fallback || ""] })}>` : "");
}
// src/react/entity-page/entity-application.ts
-function fNe(e) {
- let t = oNe(), n = {
+function kNe(e) {
+ let t = CNe(), n = {
...e.helpers,
- portraitImg: dNe
- }, r = lNe(e.controller, n, e.actions);
+ portraitImg: ONe
+ }, r = ENe(e.controller, n, e.actions);
return {
...r,
helpers: n,
@@ -76518,15 +76628,15 @@ function fNe(e) {
let { filters: o, media: s } = t.read(n, i, a, e.sortPreference());
return r.props(n, i, o, s);
},
- loading: uNe(e.loading),
- photos: cNe(e.photos)
+ loading: DNe(e.loading),
+ photos: TNe(e.photos)
};
}
// src/card-art/feed-identity.ts
-function pNe(e) {
+function ANe(e) {
let t = e.performer_refs || [], n = [...new Set((e.performers || "").split(/[,,、;/]/).map((e) => e.trim()).filter(Boolean))], r = t.length ? t : n.map((e) => ({ name: e })), i = r.slice(0, 3).map((t) => {
- let n = e.code && t.source_actor_id && t.source_avatar && !t.has_image && !t.has_avatar, r = n ? ` data-feed-source-avatar data-code="${z(e.code)}" data-actor="${z(t.source_actor_id)}" data-name="${z(t.name)}"` : "", i = n ? "" : Za(t.name, t, null);
- return "id" in t && t.id ? `<a class="mav"${r} href="${z(hn("performer", t.name, t.id))}" aria-label="打开女优页:${z(t.name)}">${i}</a>` : `<span class="mav"${r} title="${z(t.name)}">${i}</span>`;
+ let n = e.code && t.source_actor_id && t.source_avatar && !t.has_image && !t.has_avatar, r = n ? ` data-feed-source-avatar data-code="${z(e.code)}" data-actor="${z(t.source_actor_id)}" data-name="${z(t.name)}"` : "", i = n ? "" : po(t.name, t, null);
+ return "id" in t && t.id ? `<a class="mav"${r} href="${z(An("performer", t.name, t.id))}" aria-label="打开女优页:${z(t.name)}">${i}</a>` : `<span class="mav"${r} title="${z(t.name)}">${i}</span>`;
}).join("");
return r.length > 1 ? `<div class="mavstack">${i}</div>` : i;
}
@@ -76548,35 +76658,35 @@ var U8 = {
HERO_WIDE_PX: void 0
};
function W8(e) {
- return e.has_cover ? no(e, "big") : !e.cover_url || !e.code ? e.cover_fetching ? `<span class="nopic" data-feed-cover-state="fetching">${Cs("抓取中")}</span>` : "<span class=\"nopic\" data-feed-cover-state=\"missing\">无封面</span>" : no(e, "big").replace(/ src="[^"]*"/, ` src="${z(Ka(e))}" data-panel-prior="1"`).replace("data-drop=\"self\"", "data-drop=\"initial\" data-initial=\"封面未取得\" data-drop-class=\"nopic\"");
+ return e.has_cover ? vo(e, "big") : !e.cover_url || !e.code ? e.cover_fetching ? `<span class="nopic" data-feed-cover-state="fetching">${Rs("抓取中")}</span>` : "<span class=\"nopic\" data-feed-cover-state=\"missing\">无封面</span>" : vo(e, "big").replace(/ src="[^"]*"/, ` src="${z(so(e))}" data-panel-prior="1"`).replace("data-drop=\"self\"", "data-drop=\"initial\" data-initial=\"封面未取得\" data-drop-class=\"nopic\"");
}
-function mNe(e) {
- let t = [e.performers && `<span class="feednewperformers" title="${z(e.performers)}">${z(e.performers)}</span>`, e.release_date && `<span>${z(e.release_date)}</span>`].filter(Boolean).join(""), n = W8(e), r = e.code || String(e.title || "").trim() || "未命名新作", i = e.code ? _F({
+function jNe(e) {
+ let t = [e.performers && `<span class="feednewperformers" title="${z(e.performers)}">${z(e.performers)}</span>`, e.release_date && `<span>${z(e.release_date)}</span>`].filter(Boolean).join(""), n = W8(e), r = e.code || String(e.title || "").trim() || "未命名新作", i = e.code ? wF({
is_jav: !0,
code: e.code,
name: e.code,
display_title: e.title || ""
}) : z(r), a = e.code ? `<a class="feednewopen" href="/works/${encodeURIComponent(e.code)}" aria-label="打开 ${z(r)} 的作品详情"></a>` : "";
return `<article class="card feednewcard${e.read ? " isread" : ""}" data-feed-id="${e.id}">
- ${a}<div class="pic" style="--card-ratio:${DA}">${n}
+ ${a}<div class="pic" style="--card-ratio:${NA}">${n}
<div class="hovertools feednewtools">
<button type="button" data-feed-action="${e.wanted ? "unwant" : "want"}" aria-pressed="${!!e.wanted}" title="${e.wanted ? "取消想要" : "想要"}" aria-label="想要 ${z(r)}">${R("star")}</button>
<button type="button" data-feed-action="ignore" title="不想看" aria-label="不想看 ${z(r)}">${R("x")}</button>
<button type="button" data-feed-action="read" title="标为已看过" aria-label="标为已看过 ${z(r)}">${R("check")}</button></div></div>
- <div class="meta">${pNe(e)}<div class="mtext"><span class="t">${i}</span>
+ <div class="meta">${ANe(e)}<div class="mtext"><span class="t">${i}</span>
<div class="s mono">${t || (e.title ? "" : "资料还没取到")}</div></div></div></article>`;
}
-function hNe() {
+function MNe() {
let e = document.getElementById("peach-entity-shape");
if (e) try {
let t = JSON.parse(e.textContent || "null");
if (!t?.id || typeof t.kind != "string" || !Array.isArray(t.names) || !Array.isArray(t.parts)) return;
- U8.entityShapes = new Map([String(t.id), ...t.names].map((e) => [`${t.kind}/${wn(e)}`, t.parts]));
+ U8.entityShapes = new Map([String(t.id), ...t.names].map((e) => [`${t.kind}/${zn(e)}`, t.parts]));
} catch {}
}
async function G8() {
- let e = J, t = await on("/api/entity/shapes", { signal: e.signal }).catch(() => null);
- return e.isActive && t && !t.error && (U8.entityShapesComplete = !0, U8.entityShapes = new Map((t.entities || []).flatMap((e) => [String(e.id), ...e.names].map((t) => [`${e.kind}/${wn(t)}`, e.parts]))), typeof t.home?.feed == "boolean" && q8(t.home.feed), Z8(location.pathname) && J8(L("#feedNew"))), U8.entityShapes;
+ let e = J, t = await xn("/api/entity/shapes", { signal: e.signal }).catch(() => null);
+ return e.isActive && t && !t.error && (U8.entityShapesComplete = !0, U8.entityShapes = new Map((t.entities || []).flatMap((e) => [String(e.id), ...e.names].map((t) => [`${e.kind}/${zn(t)}`, e.parts]))), typeof t.home?.feed == "boolean" && q8(t.home.feed), Z8(location.pathname) && J8(L("#feedNew"))), U8.entityShapes;
}
var K8 = "peach.home-feed.v1";
function q8(e) {
@@ -76585,7 +76695,7 @@ function q8(e) {
localStorage.setItem(K8, e ? "1" : "0");
} catch {}
}
-function gNe() {
+function NNe() {
try {
let e = localStorage.getItem(K8);
return e === "1" || e !== "0" && null;
@@ -76594,10 +76704,10 @@ function gNe() {
}
}
function J8(e) {
- !e || zV(e) || e.querySelector("[data-feed-id]") || (e.hidden = X.homeHasFeed !== !0, X.homeHasFeed === !0 && (e.setAttribute("aria-busy", "true"), e.querySelector(".feednewskeleton") || (e.innerHTML = U8.feedNewSkeletonHtml())));
+ !e || GV(e) || e.querySelector("[data-feed-id]") || (e.hidden = X.homeHasFeed !== !0, X.homeHasFeed === !0 && (e.setAttribute("aria-busy", "true"), e.querySelector(".feednewskeleton") || (e.innerHTML = U8.feedNewSkeletonHtml())));
}
-function _Ne(e, t) {
- return !(e > 0) || !t.some((e) => !e.has_cover) ? "" : bs(`${e} 部新作的封面连不上 DMM 图片主机,中国移动宽带常见。把 DMM / FANZA 的连接方式设成 Peach 代理,下一轮会自动重取。`, {
+function PNe(e, t) {
+ return !(e > 0) || !t.some((e) => !e.has_cover) ? "" : Fs(`${e} 部新作的封面连不上 DMM 图片主机,中国移动宽带常见。把 DMM / FANZA 的连接方式设成 Peach 代理,下一轮会自动重取。`, {
variant: "warning",
className: "feednetwork",
actionLabel: "配置连接方式",
@@ -76606,17 +76716,17 @@ function _Ne(e, t) {
}
function Y8(e) {
let t = e && !e.error && e.items || [];
- return _Ne(e?.cover_network, t) + `<div class="feednewrow srow">${t.map(mNe).join("")}</div>`;
+ return PNe(e?.cover_network, t) + `<div class="feednewrow srow">${t.map(jNe).join("")}</div>`;
}
function X8(e) {
- e && (t9(e), Z.appSettings.feedAutoScroll && yc(e));
+ e && (t9(e), Z.appSettings.feedAutoScroll && Pc(e));
}
function Z8(e) {
- return fn(e) && e !== "/junk-files";
+ return Dn(e) && e !== "/junk-files";
}
-function vNe() {
+function FNe() {
let e = L("#feedNew");
- zV(e) ? UV(e, { revision: ++U8.feedRevision }) : (J8(e), HV("feed-new", {
+ GV(e) ? YV(e, { revision: ++U8.feedRevision }) : (J8(e), JV("feed-new", {
host: e,
revision: U8.feedRevision,
helpers: U8.feedNewHelpers,
@@ -76628,31 +76738,31 @@ function vNe() {
}
function Q8() {
let e = L("#feedNew");
- e.querySelectorAll(".feednewrow").forEach(bc), WV(e), e.hidden = !0, e.innerHTML = "", e.removeAttribute("aria-busy");
+ e.querySelectorAll(".feednewrow").forEach(Fc), XV(e), e.hidden = !0, e.innerHTML = "", e.removeAttribute("aria-busy");
}
function $8() {
- U8.feedRevision += 1, UV(L("#feedNew"), { revision: U8.feedRevision }), o5({ feedRevision: U8.feedRevision });
+ U8.feedRevision += 1, YV(L("#feedNew"), { revision: U8.feedRevision }), o5({ feedRevision: U8.feedRevision });
}
-function yNe() {
- document.querySelectorAll(".feednewrow").forEach((e) => Z.appSettings.feedAutoScroll ? yc(e) : bc(e));
+function INe() {
+ document.querySelectorAll(".feednewrow").forEach((e) => Z.appSettings.feedAutoScroll ? Pc(e) : Fc(e));
}
var e5 = 0;
-function bNe([e]) {
+function LNe([e]) {
let t = e.contentRect.width >= U8.HERO_WIDE_PX;
cancelAnimationFrame(e5), e5 = requestAnimationFrame(() => {
e5 = 0, L("#index")?.toggleAttribute("data-hero-wide", t);
});
}
-function xNe() {
- U8.FEED_SKELETON_CARDS = 8, U8.feedNewSkeletonHtml = () => `<div class="feednewrow srow" data-skeleton="feed/new" aria-hidden="true">${`<article class="card feednewcard feednewskeleton"><div class="pic imgwait" style="--card-ratio:${DA}"></div>
+function RNe() {
+ U8.FEED_SKELETON_CARDS = 8, U8.feedNewSkeletonHtml = () => `<div class="feednewrow srow" data-skeleton="feed/new" aria-hidden="true">${`<article class="card feednewcard feednewskeleton"><div class="pic imgwait" style="--card-ratio:${NA}"></div>
<div class="meta"><div class="mtext"><span class="t"><span class="skeleton"></span></span>
- <div class="s mono"><span class="skeleton">&#8203;</span></div></div></div></article>`.repeat(U8.FEED_SKELETON_CARDS)}</div>`, U8.entityShapes = null, U8.entityShapesComplete = !1, U8.hasEntityShape = (e, t) => U8.entityShapesComplete || !!U8.entityShapes?.has(`${e}/${wn(t)}`), U8.hasEntityPart = (e, t, n) => !!t && !!U8.entityShapes?.get(`${e}/${wn(t)}`)?.includes(n), U8.feedNewSkeletonSection = () => `<section class="feednew">${U8.feedNewSkeletonHtml()}</section>`, U8.COSTAR_SKELETON_PEOPLE = 12, U8.costarSkeletonFoot = () => `<div class="entityfoot" data-entity-foot><div class="relatedpeople" data-related-people>${"<button type=\"button\" disabled tabindex=\"-1\"><span class=\"skeleton\" data-hero-ring></span><span class=\"skeleton\" data-hero-costar-name>&#8203;</span></button>".repeat(U8.COSTAR_SKELETON_PEOPLE)}</div></div>`, U8.factsSkeleton = () => `<dl class="entityfacts" data-entity-facts>${"<dt><span class=\"skeleton\"></span></dt><dd><span class=\"skeleton\"></span></dd>".repeat(5)}</dl>`, U8.feedRevision = 0, U8.feedNewHelpers = {
+ <div class="s mono"><span class="skeleton">&#8203;</span></div></div></div></article>`.repeat(U8.FEED_SKELETON_CARDS)}</div>`, U8.entityShapes = null, U8.entityShapesComplete = !1, U8.hasEntityShape = (e, t) => U8.entityShapesComplete || !!U8.entityShapes?.has(`${e}/${zn(t)}`), U8.hasEntityPart = (e, t, n) => !!t && !!U8.entityShapes?.get(`${e}/${zn(t)}`)?.includes(n), U8.feedNewSkeletonSection = () => `<section class="feednew">${U8.feedNewSkeletonHtml()}</section>`, U8.COSTAR_SKELETON_PEOPLE = 12, U8.costarSkeletonFoot = () => `<div class="entityfoot" data-entity-foot><div class="relatedpeople" data-related-people>${"<button type=\"button\" disabled tabindex=\"-1\"><span class=\"skeleton\" data-hero-ring></span><span class=\"skeleton\" data-hero-costar-name>&#8203;</span></button>".repeat(U8.COSTAR_SKELETON_PEOPLE)}</div></div>`, U8.factsSkeleton = () => `<dl class="entityfacts" data-entity-facts>${"<dt><span class=\"skeleton\"></span></dt><dd><span class=\"skeleton\"></span></dd>".repeat(5)}</dl>`, U8.feedRevision = 0, U8.feedNewHelpers = {
feedRowHtml: Y8,
wireFeedRow: (e) => X8(e)
- }, U8.feedNewActions = { settled: (e) => q8(e) }, U8.HERO_WIDE_PX = 900, J.resize(bNe).observe(L("#index"));
+ }, U8.feedNewActions = { settled: (e) => q8(e) }, U8.HERO_WIDE_PX = 900, J.resize(LNe).observe(L("#index"));
}
// src/entity-skeleton.ts
-function SNe(e, t, n, r = "") {
+function zNe(e, t, n, r = "") {
let i = e === "studio" || e === "agency", a = new URLSearchParams(location.search), o = a.get("browse") === "folders" || a.get("folder") ? `<div class="peach-react entity-folder-workspace" data-folder-workspace data-folder-browse><aside data-folder-tree-host><div class="flex flex-col gap-3"><span class="skeleton ui-configuration-skeleton-input"></span>${"<span class=\"skeleton\" style=\"width:75%;height:32px\"></span>".repeat(8)}</div></aside><div class="min-w-0"><div data-folder-header-host><span class="skeleton" style="width:160px;height:32px"></span></div>${n}</div></div>` : n;
return `<section data-skeleton="entity/${e}" role="status" aria-label="正在读取资料">
<span class="sr-only">正在读取资料</span><div aria-hidden="true" inert><div class="peach-react contents">
@@ -76666,9 +76776,9 @@ function SNe(e, t, n, r = "") {
<div class="entitysection">${o}</div></div></section>`;
}
// src/filter-controls-skeleton.ts
-var t5 = (e) => e.startsWith("ri-") ? `<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><use href="#${e}"/></svg>` : os(e, "size-4 shrink-0"), n5 = "inert aria-disabled=\"true\" tabindex=\"-1\" data-skeleton-control", r5 = (e, t, n) => `<span data-entity-layout="" class="${BU}" role="radiogroup" aria-label="${z(e)}">${n.map(([e, n, r]) => `<span class="${VU}" role="radio" aria-label="${z(n)}" aria-checked="${e === t}" data-glass-segment=""${e === t ? " data-selected=\"\"" : ""} ${n5}>${t5(r)}</span>`).join("")}</span>`;
+var t5 = (e) => e.startsWith("ri-") ? `<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><use href="#${e}"/></svg>` : xs(e, "size-4 shrink-0"), n5 = "inert aria-disabled=\"true\" tabindex=\"-1\" data-skeleton-control", r5 = (e, t, n) => `<span data-entity-layout="" class="${KU}" role="radiogroup" aria-label="${z(e)}">${n.map(([e, n, r]) => `<span class="${qU}" role="radio" aria-label="${z(n)}" aria-checked="${e === t}" data-glass-segment=""${e === t ? " data-selected=\"\"" : ""} ${n5}>${t5(r)}</span>`).join("")}</span>`;
function i5(e, t) {
- let n = PM(), r = new URLSearchParams(location.search), i = t && n === "cards" ? r5(t.label, t.value, t.options) : "";
+ let n = VM(), r = new URLSearchParams(location.search), i = t && n === "cards" ? r5(t.label, t.value, t.options) : "";
return `<span data-entity-sorts=""><button type="button" data-entity-batch="" data-filter-action="" aria-label="换一批" ${n5}>${t5("shuffle")}</button>${i}${r5("馆藏显示方式", n, [[
"cards",
"卡片",
@@ -76706,14 +76816,14 @@ var Y = {
application: void 0
};
function a5() {
- let e = RV(L("#index"));
+ let e = WV(L("#index"));
return e && e.path.endsWith("/*") && e.host.isConnected ? e : null;
}
function o5(e) {
- Y.entityPageCurrent() && UV(L("#index"), e);
+ Y.entityPageCurrent() && YV(L("#index"), e);
}
function s5() {
- if (Wl.type === "item") return Wl;
+ if (au.type === "item") return au;
let e = a5();
if (e) {
let { kind: t, name: n, filters: r } = e.props;
@@ -76724,17 +76834,17 @@ function s5() {
filters: { ...r }
};
}
- return Wl;
+ return au;
}
function c5(e, t, n = t7()) {
- return gPe(n).map(([n, r]) => {
- let i = e === n, a = Yk(n, e, t);
+ return NPe(n).map(([n, r]) => {
+ let i = e === n, a = nA(n, e, t);
return {
key: n,
label: r,
pressed: i,
- dir: i && qk(n, t) ? t === "asc" ? "asc" : "desc" : "",
- ariaLabel: a ? `按${r}${a.dir ? qk(a.sort, a.dir) : ""}排序` : ""
+ dir: i && eA(n, t) ? t === "asc" ? "asc" : "desc" : "",
+ ariaLabel: a ? `按${r}${a.dir ? eA(a.sort, a.dir) : ""}排序` : ""
};
});
}
@@ -76742,7 +76852,7 @@ function l5(e, t, n, r = Y.EMPTY_ENTITY_MEDIA, i = {}) {
return Y.application.route(e, t, n, r, i);
}
function u5() {
- return sNe({
+ return wNe({
entityWall: Y.entityPageWall,
entityCurrent: Y.entityPageCurrent(),
indexVisible: !L("#index").hidden,
@@ -76755,13 +76865,13 @@ function d5() {
Y.photos.sync();
}
function f5() {
- u5() ? JA(NA()) : KA();
+ u5() ? Mse(zA()) : QA();
}
-function CNe(e) {
+function BNe(e) {
Y.photos.setSize(e);
}
-var p5 = iNe({
- request: (e) => on("/api/reveal", {
+var p5 = xNe({
+ request: (e) => xn("/api/reveal", {
method: "POST",
body: JSON.stringify({ id: e })
}),
@@ -76772,7 +76882,7 @@ async function m5(e) {
let t = { textContent: "" };
return await p5(e, t), t.textContent;
}
-async function wNe(e) {
+async function VNe(e) {
let t = { textContent: "" }, n = [];
return await h5(e, t, (e) => {
e.items && (n = e.items.map((e) => e.id));
@@ -76784,7 +76894,7 @@ async function wNe(e) {
async function h5(e, t, n) {
t.textContent = "正在核对目录…";
try {
- let r = await on("/api/purge-missing", {
+ let r = await xn("/api/purge-missing", {
method: "POST",
body: JSON.stringify({ id: e })
});
@@ -76795,7 +76905,7 @@ async function h5(e, t, n) {
if (t.textContent = r.removed ? `${Y.syncedText(r)}(核对 ${r.checked} 项${r.unreadable ? `,${r.unreadable} 项未能读取` : ""})` : r.unreadable ? `目录有 ${r.unreadable} 项暂时无法读取,本次未改动` : `目录内 ${r.checked} 项都还在,无需改动`, r.removed) {
let e = (r.items || []).filter((e) => e.disposal !== "reattached").map((e) => e.id);
n && n(r), C8.actionReceipt(Y.syncedText(r), { undo: e.length ? async () => {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: e,
@@ -76811,18 +76921,18 @@ async function h5(e, t, n) {
t.textContent = Y.sourceHint(e.message), C8.actionFailure("核对目录", e);
}
}
-function TNe(e) {
+function HNe(e) {
return `<div class="srctools">${Y.sourceToolButtons(e)}
<span class="srcstate" aria-live="polite"></span></div>`;
}
-function ENe(e, t) {
+function UNe(e, t) {
let n = e.querySelector(".srcstate");
if (!n) return;
let r = e.querySelector("[data-reveal]"), i = e.querySelector("[data-sync]");
r && J.handler(r, "onclick", () => p5(Number(r.dataset.reveal), n, { button: r })), i && J.handler(i, "onclick", () => h5(Number(i.dataset.sync), n, t));
}
-async function DNe(e, t) {
- let n = Bc({
+async function WNe(e, t) {
+ let n = tl({
title: "添加别名",
description: "图库按名字查找图片,添加别名可能找到更多备选图片;也可以将别名设为统一显示的名称。",
body: "<label class=\"modalfield\"><span>别名</span>\n <input class=\"geist-input\" name=\"alias\" maxlength=\"80\" autocomplete=\"off\"\n placeholder=\"另一种写法,或另一个艺名\"></label>" + (e.length ? `<div class="modalfield"><span>自己添过的</span>
@@ -76860,20 +76970,20 @@ async function DNe(e, t) {
} }) : C8.actionReceipt(`${a?.alias} 已经是这份档案中的名字`));
}
function g5(e, t) {
- let n = ["performer", "studio"].includes(e) && U8.hasEntityPart(e, t, "jav"), r = `<div data-filter-row="bottom" class="flex min-w-0 items-center gap-3 px-3 py-2 min-h-12"><h3 data-entity-readout><span data-skeleton="count" class="relative inline-block h-3.5 w-24 rounded-md align-middle skeleton-sheen"></span></h3>${ss()}${e === "agency" ? "" : i5(c5(U.sort, U.dir, n), n ? {
+ let n = ["performer", "studio"].includes(e) && U8.hasEntityPart(e, t, "jav"), r = `<div data-filter-row="bottom" class="flex min-w-0 items-center gap-3 px-3 py-2 min-h-12"><h3 data-entity-readout><span data-skeleton="count" class="relative inline-block h-3.5 w-24 rounded-md align-middle skeleton-sheen"></span></h3>${Ss()}${e === "agency" ? "" : i5(c5(U.sort, U.dir, n), n ? {
name: "jav-layout",
label: "JAV 卡片版式",
- value: kA(),
- options: wA
- } : null)}</div>`, i = e === "agency" ? "" : `<div data-entity-media><button type="button" data-media-view="videos" aria-label="视频" aria-pressed="true" ${n5}>${R("play")}</button><button type="button" data-media-view="photos" data-media-icon="image" aria-label="照片" ${n5}>${R("pics")}</button></div><span data-entity-sep></span><div data-entity-scroll><div data-entity-states>${X.catalogViews().map((e) => `<button type="button" data-entity-state="${z(e.k)}" aria-pressed="${U.state === e.k}" ${n5}>${z(e.label)}</button>`).join("")}<span data-entity-sep></span></div>`, a = SNe(e, r, e === "agency" ? zs({
+ value: FA(),
+ options: AA
+ } : null)}</div>`, i = e === "agency" ? "" : `<div data-entity-media><button type="button" data-media-view="videos" aria-label="视频" aria-pressed="true" ${n5}>${R("play")}</button><button type="button" data-media-view="photos" data-media-icon="image" aria-label="照片" ${n5}>${R("pics")}</button></div><span data-entity-sep></span><div data-entity-scroll><div data-entity-states>${X.catalogViews().map((e) => `<button type="button" data-entity-state="${z(e.k)}" aria-pressed="${U.state === e.k}" ${n5}>${z(e.label)}</button>`).join("")}<span data-entity-sep></span></div>`, a = zNe(e, r, e === "agency" ? ec({
kind: "performers",
layout: M5.peopleIndexLayout()
- }) : VJ("正在读取作品", LA(IA({
+ }) : VJ("正在读取作品", UA(HA({
active: n,
home: !1,
portrait: !1
}))), i);
- L("#index").firstElementChild?.dataset.skeleton === `entity/${e}` ? _5(e, t) : (L("#index").innerHTML = a, _5(e, t), Ks(L("#index")));
+ L("#index").firstElementChild?.dataset.skeleton === `entity/${e}` ? _5(e, t) : (L("#index").innerHTML = a, _5(e, t), sc(L("#index")));
}
function _5(e, t) {
let n = L("#index").firstElementChild;
@@ -76884,13 +76994,13 @@ function _5(e, t) {
r(n.querySelector(".entityfoot"), e !== "agency" && U8.hasEntityPart(e, t, "costars"), () => n.querySelector(".entityhero")?.insertAdjacentHTML("beforeend", U8.costarSkeletonFoot())), r(n.querySelector(".feednew"), U8.hasEntityPart(e, t, "feed"), () => n.querySelector(".entitysection")?.insertAdjacentHTML("beforebegin", U8.feedNewSkeletonSection())), r(n.querySelector(".entityfacts"), e === "performer" && U8.hasEntityPart(e, t, "facts"), () => n.querySelector(".entityprofile")?.insertAdjacentHTML("beforeend", U8.factsSkeleton()));
}
function v5(e) {
- let t = pn[e] || e, n = H3[t] || "条目", r = H3[t] ? `<a class="geist-button primary" href="/${t}">返回${n}列表</a>` : "";
+ let t = On[e] || e, n = H3[t] || "条目", r = H3[t] ? `<a class="geist-button primary" href="/${t}">返回${n}列表</a>` : "";
L("#index").innerHTML = Z.emptyState("search-x", `找不到这个${n}`, "名字可能拼错了,或者已经合并到别的名字下;回列表里重新找。", { actions: r });
}
function y5(e, t) {
x9(Y.application.fresh(e, t));
}
-function ONe() {
+function GNe() {
Y.ENTITY_FILTER_KEYS = [
"loc",
"creator",
@@ -76913,7 +77023,7 @@ function ONe() {
return e.type === "home" ? U : e.filters;
}, L("#q").value = U.q, X.rememberSearchValue();
}
-function kNe() {
+function KNe() {
Y.entityPageView = "", Y.entityPageWall = !1, Y.entityPageRevision = 0, Y.entityPageCurrent = () => !!a5(), Y.entityPageLive = (e, t) => {
let n = a5();
return !!n && !L("#index").hidden && n.props.kind === e && n.props.name === t;
@@ -76925,15 +77035,15 @@ function kNe() {
e && t9(e);
},
wireScroller: (e) => {
- e && lc(e);
+ e && wc(e);
},
wireFeedRow: (e) => X8(e),
feedRowHtml: Y8,
receipt: (e, t) => C8.actionReceipt(e, t),
failure: (e, t) => C8.actionFailure(e, t),
- aliasForm: (e, t) => DNe(e, t),
- sourceToolsHtml: (e) => TNe(e),
- wireSourceTools: (e, t) => ENe(e, t),
+ aliasForm: (e, t) => WNe(e, t),
+ sourceToolsHtml: (e) => HNe(e),
+ wireSourceTools: (e, t) => UNe(e, t),
comboItems: (e) => I7(e),
sortKeys: (e, t, n) => c5(e, t, n)
}, Y.entityFollowActions = {
@@ -76958,8 +77068,8 @@ function kNe() {
<button type="button" data-sync="${e}" title="核对该目录:磁盘上已删除的移入 Peach 回收站,带个人记录的标为已消失"
aria-label="同步删除">${R("folder-sync")}</button>`;
}
-function ANe() {
- Y.application = fNe({
+function qNe() {
+ Y.application = kNe({
controller: {
context: () => {
let e = s5();
@@ -76969,11 +77079,11 @@ function ANe() {
current: () => Y.entityPageCurrent(),
route: (e, t = !1) => Q.route(e, t),
suffix: () => location.search + location.hash,
- restoreHomeContext: () => vu({ barsContext: {
+ restoreHomeContext: () => W({ barsContext: {
type: "home",
filters: U
} }),
- releaseBodyPreviews: () => kl(L("#index [data-entity-body]")),
+ releaseBodyPreviews: () => Wl(L("#index [data-entity-body]")),
push: o5,
state: () => ({
seed: String(U.seed || ""),
@@ -76982,17 +77092,17 @@ function ANe() {
preferences: () => ({
revision: Y.entityPageRevision,
feedRevision: U8.feedRevision,
- photoSize: NA(),
- photoLayout: PA(),
- photoLayouts: EA,
+ photoSize: zA(),
+ photoLayout: BA(),
+ photoLayouts: MA,
followImagesOnly: !!Z.appSettings.followImagesOnly,
- javLayout: kA(),
- javLayouts: wA,
+ javLayout: FA(),
+ javLayouts: AA,
states: X.VIEW_PILLS,
peopleLayout: M5.peopleIndexLayout(),
layout: K7(),
- selectMode: Jl,
- selected: new Set(Kl),
+ selectMode: lu,
+ selected: new Set(su),
seekSeconds: Z.appSettings.seekSeconds,
groupCollapse: Z.appSettings.groupCollapse,
wireDrag: t9,
@@ -77006,11 +77116,11 @@ function ANe() {
changeFilter: C7,
rollSeed: () => C8.rollSeed(),
writeSeed: (e) => {
- U.seed = e, yu();
+ U.seed = e, Nu();
},
setJavLayout: i7,
- javLayout: kA,
- setPhotoLayout: zA,
+ javLayout: FA,
+ setPhotoLayout: GA,
syncPhotoWalls: d5,
openEntity: y5,
photoViewActive: u5,
@@ -77019,7 +77129,7 @@ function ANe() {
},
syncDensity: f5,
scheduleSticky: d7,
- releasePage: () => WV(L("#index")),
+ releasePage: () => XV(L("#index")),
showMissing: v5,
dropBars: k8
},
@@ -77028,28 +77138,28 @@ function ANe() {
waitShapes: z5,
paintSkeleton: g5,
resetView: () => {
- vu({ detailReturnBarsContext: null }), Y.entityPageView = "", Y.entityPageWall = !1;
+ W({ detailReturnBarsContext: null }), Y.entityPageView = "", Y.entityPageWall = !1;
},
loadShapes: G8,
syncParts: _5
},
photos: {
preferences: () => ({
- size: NA(),
- layout: PA(),
+ size: zA(),
+ layout: BA(),
imagesOnly: !!Z.appSettings.followImagesOnly
}),
walls: () => document.querySelectorAll(".followphotowall"),
pushEntity: o5,
pushFollow: E9,
syncDensity: f5,
- storeSize: xse
+ storeSize: Ase
},
helpers: Y.entityPageHelpers,
actions: {
toggleTag: F7,
openFollowAuthor: F5,
- javContext: (e) => vu({ entityJavLayout: !!e })
+ javContext: (e) => W({ entityJavLayout: !!e })
},
sortPreference: () => ({
sort: Z.appSettings.defaultSort,
@@ -77059,8 +77169,8 @@ function ANe() {
}
// src/application/playlists.js
var b5 = { playlistWrite: void 0 };
-function jNe(e, t) {
- e === "tag" ? (vu({ state: {
+function JNe(e, t) {
+ e === "tag" ? (W({ state: {
...U,
tag: t,
tag_match: "all",
@@ -77075,8 +77185,8 @@ function x5(e = "") {
return `<label class="modalfield"><span>名称</span><input class="geist-input" name="name"
maxlength="80" placeholder="输入名称" value="${z(e)}"></label>`;
}
-async function MNe({ title: e, count: t, save: n }) {
- let r = Bc({
+async function YNe({ title: e, count: t, save: n }) {
+ let r = tl({
title: "保存为播放列表",
description: `这个 Mix 的 ${t} 个视频会存成一份可以继续播放的列表。`,
body: x5(e),
@@ -77096,12 +77206,12 @@ async function MNe({ title: e, count: t, save: n }) {
}), x9("/playlists");
} }));
}
-async function NNe(e) {
- let t = ((await on("/api/playlists")).items || []).map((e) => `<label class="pickrow">${Es(`data-pick-playlist="${e.id}"`)}
- <span class="pickrowtext"><b>${z(e.name)}</b><small>${e.item_count} 个视频</small></span></label>`).join(""), n = Bc({
+async function XNe(e) {
+ let t = ((await xn("/api/playlists")).items || []).map((e) => `<label class="pickrow">${Vs(`data-pick-playlist="${e.id}"`)}
+ <span class="pickrowtext"><b>${z(e.name)}</b><small>${e.item_count} 个视频</small></span></label>`).join(""), n = tl({
title: "加入播放列表",
description: "勾选要加入的列表,或者填个名称新建一份。",
- body: x5() + (t ? `<div class="picklist" role="group" aria-label="已有播放列表">${t}</div>` : bs("还没有播放列表,填个名称就能新建一份。", { size: "small" })),
+ body: x5() + (t ? `<div class="picklist" role="group" aria-label="已有播放列表">${t}</div>` : Fs("还没有播放列表,填个名称就能新建一份。", { size: "small" })),
confirmLabel: "保存",
confirmDisabled: !0,
onConfirm: async () => {
@@ -77141,20 +77251,20 @@ async function NNe(e) {
} });
}
function S5() {
- kl(), a9(!1), U5();
- let e = RV(L("#stats"));
- e?.path !== "/playlists" || !e.host.isConnected ? vu({ pageOpens: lu + 1 }) : (H5({ manage: !1 }), vu({ playlistsRevision: hu + 1 }));
+ Wl(), a9(!1), U5();
+ let e = WV(L("#stats"));
+ e?.path !== "/playlists" || !e.host.isConnected ? W({ pageOpens: wu + 1 }) : (H5({ manage: !1 }), W({ playlistsRevision: Au + 1 }));
}
-function PNe(e) {
+function ZNe(e) {
let t = new URLSearchParams(location.search);
for (let n of ["category", "queue"]) e[n] ? t.set(n, e[n]) : t.delete(n);
Q.route("/review" + (t.size ? "?" + t : ""));
}
function C5(e) {
- vu({ configurationRequestedSection: e }), Q.navigatePath(hV(e));
+ W({ configurationRequestedSection: e }), Q.navigatePath(xV(e));
}
-function FNe() {
- b5.playlistWrite = (e) => on("/api/playlist", {
+function QNe() {
+ b5.playlistWrite = (e) => xn("/api/playlist", {
method: "POST",
body: JSON.stringify(e)
});
@@ -77178,12 +77288,12 @@ function E5(e, t, n, r, i, a = !1) {
...o ? { followLastSelectedId: s } : { lastSelectedId: s }
};
}
-function INe(e, t, n, r) {
+function $Ne(e, t, n, r) {
let i = w5(t);
return {
count: (i === "follow" ? e.followSelected : e.selected).size,
context: i === "catalog" && r === "trash" ? "trash" : i,
- junkDismissed: a$(n).view === "dismissed"
+ junkDismissed: o$(n).view === "dismissed"
};
}
// src/application/selection.js
@@ -77197,41 +77307,41 @@ var D5 = {
};
function O5() {
W7({
- selected: new Set(Kl),
- selectMode: Jl
+ selected: new Set(su),
+ selectMode: lu
}), o5({
- selected: new Set(Kl),
- selectMode: Jl
+ selected: new Set(su),
+ selectMode: lu
}), E9({
- selected: new Set(ql),
- selectMode: Jl
- }), D5.batchDockProps = KNe(), y8() && (y8().render(D5.batchDockProps), Z.syncGlassOptics());
+ selected: new Set(cu),
+ selectMode: lu
+ }), D5.batchDockProps = lPe(), y8() && (y8().render(D5.batchDockProps), Z.syncGlassOptics());
}
function k5(e, t = !1) {
- vu(T5({
- selected: Kl,
- followSelected: ql
- }, j5(), w5(location.pathname), !!e, t)), document.body.classList.toggle("select-mode", Jl), Jl && kl(), L("#selectMode").setAttribute("aria-pressed", String(Jl)), O5();
+ W(T5({
+ selected: su,
+ followSelected: cu
+ }, j5(), w5(location.pathname), !!e, t)), document.body.classList.toggle("select-mode", lu), lu && Wl(), L("#selectMode").setAttribute("aria-pressed", String(lu)), O5();
}
-function LNe() {
+function ePe() {
return [...I5.gridCards()].map((e) => +e.dataset.id);
}
function A5(e, t = !1) {
- vu(E5({
- selected: Kl,
- followSelected: ql
- }, j5(), w5(location.pathname), LNe(), e, t)), k5(!0);
+ W(E5({
+ selected: su,
+ followSelected: cu
+ }, j5(), w5(location.pathname), ePe(), e, t)), k5(!0);
}
-function RNe() {
+function tPe() {
return [...document.querySelectorAll("[data-follow-list] > [data-follow-item]")].map((e) => +e.dataset.followItem);
}
-function zNe(e, t = !1) {
- vu(E5({
- selected: Kl,
- followSelected: ql
- }, j5(), "follow", RNe(), e, t)), k5(!0);
+function nPe(e, t = !1) {
+ W(E5({
+ selected: su,
+ followSelected: cu
+ }, j5(), "follow", tPe(), e, t)), k5(!0);
}
-async function BNe(e, t) {
+async function rPe(e, t) {
let n = {
like: "喜欢",
seen: "标为看过",
@@ -77246,16 +77356,16 @@ async function BNe(e, t) {
dispose: "移入回收站",
restore: "还原所选项目",
delete: "永久删除所选项目"
- }, i = [...Kl];
- if (i.length) return Hc({
+ }, i = [...su];
+ if (i.length) return rl({
title: r[e],
body: `将处理选中的 ${i.length} 项。${e === "delete" ? "文件和馆藏记录会永久删除,无法恢复。" : e === "dispose" ? "馆藏记录可在回收站还原。" : ""}`,
confirmLabel: r[e],
danger: e === "delete",
onConfirm: async () => {
- kc(t);
+ Wc(t);
try {
- let t = await on("/api/batch", {
+ let t = await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: i,
@@ -77274,7 +77384,7 @@ async function BNe(e, t) {
"missing"
]) {
let n = i.filter((n) => t.restored_reasons[n] === e);
- n.length && await on("/api/batch", {
+ n.length && await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: n,
@@ -77283,7 +77393,7 @@ async function BNe(e, t) {
})
});
}
- else await on("/api/batch", {
+ else await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: i,
@@ -77293,17 +77403,17 @@ async function BNe(e, t) {
await o7();
} : null });
} catch (e) {
- throw kc(t, !1), e;
+ throw Wc(t, !1), e;
} finally {
- kc(t, !1), O5();
+ Wc(t, !1), O5();
}
}
});
}
-async function VNe() {
- let e = [...Kl];
+async function iPe() {
+ let e = [...su];
if (!e.length) return;
- let t = Bc({
+ let t = tl({
title: "判定产地",
description: `选中的 ${e.length} 项归为同一个产地。判定之后,刮削和自动推断不再改写产地。`,
body: "<div class=\"chips\" role=\"group\" aria-label=\"产地\">" + D5.REGION_CHOICES.map(([e, t]) => `<button type="button" class="chip" aria-pressed="false" data-region-pick="${e}">
@@ -77313,7 +77423,7 @@ async function VNe() {
onConfirm: async () => {
let n = t.dialog.querySelector("[data-region-pick][aria-pressed=\"true\"]");
if (!n) throw Error("先选一个产地");
- return await on("/api/batch", {
+ return await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: e,
@@ -77332,8 +77442,8 @@ async function VNe() {
let { confirmed: n, result: r } = await t.done;
n && (k5(!1, !0), await o7(), C8.actionReceipt(r.region === "none" ? `已撤回 ${e.length} 项的产地判定` : `已判为${r.label}:${e.length} 项`));
}
-async function HNe(e, t) {
- let n = [...ql];
+async function aPe(e, t) {
+ let n = [...cu];
if (!n.length) return;
let r = {
save: "保存到数据库",
@@ -77344,31 +77454,31 @@ async function HNe(e, t) {
seen: "标记为已看",
ignored: "忽略所选作品"
};
- return Hc({
+ return rl({
title: i[e],
body: `将处理选中的 ${n.length} 项关注作品。`,
confirmLabel: i[e],
danger: !1,
onConfirm: async () => {
- kc(t);
+ Wc(t);
try {
- await on(e === "save" ? "/api/follow/save" : "/api/follow/status", {
+ await xn(e === "save" ? "/api/follow/save" : "/api/follow/status", {
method: "POST",
body: JSON.stringify(e === "save" ? { items: n } : {
items: n,
to: e
})
- }), k5(!1, !0), location.pathname === "/follow" && vu({ pageOpens: lu + 1 }), C8.actionReceipt(`已${r[e]} ${n.length} 项`);
+ }), k5(!1, !0), location.pathname === "/follow" && W({ pageOpens: wu + 1 }), C8.actionReceipt(`已${r[e]} ${n.length} 项`);
} catch (e) {
- throw kc(t, !1), e;
+ throw Wc(t, !1), e;
} finally {
- kc(t, !1), O5();
+ Wc(t, !1), O5();
}
}
});
}
-async function UNe(e, t) {
- let n = [...Kl];
+async function oPe(e, t) {
+ let n = [...su];
if (!n.length) return;
let r = {
"dismiss-junk": "不是垃圾",
@@ -77379,15 +77489,15 @@ async function UNe(e, t) {
"reconsider-junk": "重新检查文件",
dispose: "移入回收站"
};
- return Hc({
+ return rl({
title: i[e],
body: `将处理选中的 ${n.length} 个文件。`,
confirmLabel: i[e],
danger: !1,
onConfirm: async () => {
- kc(t);
+ Wc(t);
try {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: n,
@@ -77397,7 +77507,7 @@ async function UNe(e, t) {
}), k5(!1, !0), await R7();
let t = e === "dispose" ? "restore" : e === "dismiss-junk" ? "reconsider-junk" : e === "reconsider-junk" ? "dismiss-junk" : null;
C8.actionReceipt(`已批量${r[e]}:${n.length} 项`, { undo: t ? async () => {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: n,
@@ -77406,15 +77516,15 @@ async function UNe(e, t) {
}), await R7();
} : null });
} catch (e) {
- throw kc(t, !1), e;
+ throw Wc(t, !1), e;
} finally {
- kc(t, !1), O5();
+ Wc(t, !1), O5();
}
}
});
}
-function WNe() {
- zMe({
+function sPe() {
+ nNe({
root: L("[data-batch-dock]"),
run: (e, t, n) => {
D5.BATCH_RUNNERS[e]?.(t, n);
@@ -77423,12 +77533,12 @@ function WNe() {
e.render(D5.batchDockProps), Z.syncGlassOptics();
}).catch(() => {});
}
-function GNe() {
+function cPe() {
D5.batchDockProps = {
count: 0,
context: "catalog",
junkDismissed: !1
- }, D5.trashCount = null, D5.currentSelectSurface = () => w5(location.pathname), J.handler(L("#selectMode"), "onclick", () => k5(!Jl, !!Jl)), D5.REGION_CHOICES = [
+ }, D5.trashCount = null, D5.currentSelectSurface = () => w5(location.pathname), J.handler(L("#selectMode"), "onclick", () => k5(!lu, !!lu)), D5.REGION_CHOICES = [
["jp", "日本"],
["kr", "韩国"],
["cn", "国产"],
@@ -77436,37 +77546,37 @@ function GNe() {
["other", "其他"],
["none", "撤回判定"]
], D5.BATCH_RUNNERS = {
- batch: BNe,
- region: VNe,
- follow: HNe,
- junk: UNe,
+ batch: rPe,
+ region: iPe,
+ follow: aPe,
+ junk: oPe,
clear: () => k5(!1, !0)
}, J.handler(L("#density"), "onclick", () => {
- u5() ? CNe(NA() === "big" ? "small" : "big") : qA();
- }), KA(), Dl({
- selecting: () => Jl,
+ u5() ? BNe(zA() === "big" ? "small" : "big") : jse();
+ }), QA(), Hl({
+ selecting: () => lu,
censored: () => $7(),
delaySeconds: () => Z.appSettings.hoverDelaySeconds
- }), J.listen(window, "pagehide", () => kl()), J.listen(document, "visibilitychange", () => {
- document.hidden && kl();
- }), wl(), D5.coverRecheck = 0, J.listen(window, "resize", () => {
- xl(L("#index")), clearTimeout(D5.coverRecheck), D5.coverRecheck = J.delay(() => L("#index").querySelectorAll("img.cover").forEach((e) => {
- e.complete && fl(e);
+ }), J.listen(window, "pagehide", () => Wl()), J.listen(document, "visibilitychange", () => {
+ document.hidden && Wl();
+ }), zl(), D5.coverRecheck = 0, J.listen(window, "resize", () => {
+ Il(L("#index")), clearTimeout(D5.coverRecheck), D5.coverRecheck = J.delay(() => L("#index").querySelectorAll("img.cover").forEach((e) => {
+ e.complete && Dl(e);
}), 200);
}, { passive: !0 });
}
function j5() {
return {
- selectMode: Jl,
- selectSurface: Zl,
- lastSelectedId: Yl,
- followLastSelectedId: Xl
+ selectMode: lu,
+ selectSurface: fu,
+ lastSelectedId: uu,
+ followLastSelectedId: du
};
}
-function KNe() {
- return INe({
- selected: Kl,
- followSelected: ql
+function lPe() {
+ return $Ne({
+ selected: su,
+ followSelected: cu
}, location.pathname, location.search, U.state);
}
// src/application/index.js
@@ -77474,22 +77584,22 @@ var M5 = {
peopleIndexLayout: void 0,
personAvatar: void 0
};
-function qNe() {
+function uPe() {
return Z.appSettings.followLayout === "table" ? "table" : "default";
}
-function JNe() {
- return FZ(location.search);
+function dPe() {
+ return IZ(location.search);
}
-function YNe(e) {
- return IZ(e);
+function fPe(e) {
+ return LZ(e);
}
-function XNe(e) {
- Q.route(YNe(e));
+function pPe(e) {
+ Q.route(fPe(e));
}
-function ZNe(e = "") {
- return LZ(location.search, e);
+function mPe(e = "") {
+ return RZ(location.search, e);
}
-function QNe(e) {
+function hPe(e) {
return L8(e);
}
function N5(e) {
@@ -77498,8 +77608,8 @@ function N5(e) {
function P5() {
L("#stats").hidden = !0, L("#index").hidden = !1, B7(), X.hideCatalogCombo(), L("#count").textContent = "", L("#loadSentinel").hidden = !0;
}
-function $Ne(e, t) {
- vu({ state: {
+function gPe(e, t) {
+ W({ state: {
...U,
state: "",
tag: e.join(","),
@@ -77509,16 +77619,16 @@ function $Ne(e, t) {
function F5(e) {
M5.controller.openFollowAuthor(e);
}
-function ePe(e) {
+function _Pe(e) {
M5.controller.openFollowTag(e);
}
-function tPe() {
- $.FOLLOW_MANAGE_TABS = PZ, J.listen(document, "click", (e) => {
+function vPe() {
+ $.FOLLOW_MANAGE_TABS = FZ, J.listen(document, "click", (e) => {
e.target.closest?.("[data-empty-settings]") && C5("媒体库与入库");
}), M5.peopleIndexLayout = () => U3(Z.appSettings.peopleLayout), M5.personAvatar = I8;
}
-function nPe() {
- M5.controller = rNe({
+function yPe() {
+ M5.controller = bNe({
route: Q.route,
followView: C9,
adoptFollowView: w9,
@@ -77544,12 +77654,12 @@ function L5(e = "正在读取作品") {
return;
}
let t = L("#count"), n = decodeURIComponent(location.pathname) === "/junk-files";
- if (t.classList.toggle("manage-static", n), t.classList.toggle("junkcount", n), n ? (t.setAttribute("aria-busy", "true"), t.setAttribute("aria-label", e), t.innerHTML = ETe(a$(location.search)), Ks(t)) : (t.removeAttribute("aria-busy"), t.removeAttribute("aria-label"), t.textContent = "", U && T7({
+ if (t.classList.toggle("manage-static", n), t.classList.toggle("junkcount", n), n ? (t.setAttribute("aria-busy", "true"), t.setAttribute("aria-label", e), t.innerHTML = VTe(o$(location.search)), sc(t)) : (t.removeAttribute("aria-busy"), t.removeAttribute("aria-label"), t.textContent = "", U && T7({
count: null,
...O7()
})), L("#loadSentinel").hidden = !0, U7()) return;
let r = L("#grid"), i = q7(e), a = r.querySelector(".catalog-skeleton");
- (a?.dataset.skeleton !== l2(i) || Number(a.querySelector("[style]")?.style.getPropertyValue("--skeleton-card-ratio")) !== J7()) && (a ? r.innerHTML = `<div class="grid">${i}</div>` : I5.setGridCards(i), Ks(L("#grid")));
+ (a?.dataset.skeleton !== l2(i) || Number(a.querySelector("[style]")?.style.getPropertyValue("--skeleton-card-ratio")) !== J7()) && (a ? r.innerHTML = `<div class="grid">${i}</div>` : I5.setGridCards(i), sc(L("#grid")));
}
function R5() {
L("#catalogFilter").style.display = "none", w7();
@@ -77564,32 +77674,32 @@ function z5() {
});
return Promise.race([I5.entityShapesReady ||= G8(), e]);
}
-function rPe() {
+function bPe() {
let e = decodeURIComponent(location.pathname);
if (document.body.dataset.surface = location.pathname, e === "/wall") document.body.setAttribute("data-wall-open", ""), R5();
else if (/^\/assets\/\d+$/.test(e)) R5();
else if (e === "/settings" || /^\/settings\/(appearance|playback|jav|search|content)$/.test(e) || e.startsWith("/posts/") || e.startsWith("/works/")) R5();
else if (e === "/junk-files") L5("正在读取垃圾文件");
- else if (e === "/jav" && b$(new URLSearchParams(location.search).get("tab")) === "library") L5("正在读取馆藏");
+ else if (e === "/jav" && x$(new URLSearchParams(location.search).get("tab")) === "library") L5("正在读取馆藏");
else if (Q.managedPagePath(e)) {
R5();
let t = L("#stats");
- t.hidden = !1, B7(), t.innerHTML = e.startsWith("/follow") && e !== "/subscriptions" ? $.followSkeletonHtml("正在读取关注内容") : I5.managementPlaceholder(e), Ks(t);
+ t.hidden = !1, B7(), t.innerHTML = e.startsWith("/follow") && e !== "/subscriptions" ? $.followSkeletonHtml("正在读取关注内容") : I5.managementPlaceholder(e), sc(t);
} else if (/^\/(performers|creators|studios|agencies|tags)$/.test(e)) R5(), P5(), K3(L("#index"), W3(e.slice(1), location.search), M5.peopleIndexLayout());
else if (/^\/(?:performers|creators|studios|agencies|series|tags)\//.test(e)) {
R5(), L("#index").hidden = !1, B7();
- let t = mn[e.split("/")[1]], n = e.split("/").slice(2).join("/");
+ let t = kn[e.split("/")[1]], n = e.split("/").slice(2).join("/");
(U8.hasEntityShape(t, n) ? Promise.resolve() : z5()).then(() => {
- L("#index").firstElementChild || decodeURIComponent(location.pathname) !== e || (g5(t, n), Ks(L("#index")));
+ L("#index").firstElementChild || decodeURIComponent(location.pathname) !== e || (g5(t, n), sc(L("#index")));
});
} else Q.routeMeta(e) ? L5() : (B7(), L("#count").textContent = "", L("#loadSentinel").hidden = !0);
}
-function iPe() {
+function xPe() {
$.followContentSkeletonHtml = (e = new URLSearchParams(location.search).get("media") === "images" ? "images" : "videos", t = "正在读取关注内容") => s2(t, {
cards: !0,
className: "follow-content-skeleton postercard-skeleton",
gridClass: e === "images" ? "followlist followphotowall" : "",
- gridSize: NA()
+ gridSize: zA()
}), $.followSkeletonHtml = (e = "正在读取关注内容") => `<div class="peach-react"><div class="follow" data-follow-feed>
<div data-follow-head><h2 data-follow-title>关注</h2></div>
<div class="tier followauthors" data-skeleton-tier="av"></div>
@@ -77597,17 +77707,17 @@ function iPe() {
<div class="board-filter-frame" data-filter-frame>
<div class="tagbar followfilters" data-filter-row="top" data-skeleton-tier="pill"></div>
<div class="count followcount" data-filter-row="bottom"><span class="mono"><span class="countskeleton"></span></span></div></div>
- ${$.followContentSkeletonHtml(void 0, e)}</div></div>`, L("#loadSentinel").innerHTML = Cs(Ss), I5.setGridCards = (e) => Ls(L("#grid"), () => {
+ ${$.followContentSkeletonHtml(void 0, e)}</div></div>`, L("#loadSentinel").innerHTML = Rs(Ls), I5.setGridCards = (e) => Qs(L("#grid"), () => {
L("#grid").innerHTML = `<div class="grid">${e}</div>`;
}), I5.gridCards = () => document.querySelectorAll(":is(#grid,#index [data-entity-grid]) :is([data-media-grid] > [data-media-card][data-id],[data-catalog-row][data-id])"), I5.managementPlaceholder = (e) => c2(e, {
- followLayout: qNe(),
+ followLayout: uPe(),
...(({ sort: e, dir: t, tab: n }) => ({
followSort: e,
followDir: t,
followTab: n
- }))(JNe())
+ }))(dPe())
}), I5.wantsDiscoveryBars = () => L("#catalogFilter").style.display !== "none", I5.entityShapesReady = null, I5.ENTITY_SHAPES_WAIT = 400, I5.syncPageTitle = (e) => {
- let t = new URL(e, location.origin), n = AV(decodeURIComponent(t.pathname))?.title;
+ let t = new URL(e, location.origin), n = IV(decodeURIComponent(t.pathname))?.title;
document.title = n ? `${n} · Peach` : "Peach · 蜜桃", document.body.dataset.surface = t.pathname, h9();
};
}
@@ -77619,7 +77729,7 @@ var B5 = (e) => e.replace(/[&<>"']/g, (e) => ({
"\"": "&quot;",
"'": "&#39;"
})[e]);
-function aPe(e, t, n) {
+function SPe(e, t, n) {
let r = new Map(t.map((e) => [e[0], e]));
return `<div data-sidebar-head=""></div><div data-sidebar-nav="">${e.map((e) => r.get(e)).filter((e) => e !== void 0).map(([e, t, r]) => {
let i = e === "" ? "<img data-sidebar-home-logo=\"\" src=\"/peach-logo-64.png\" srcset=\"/peach-logo-64.png 64w, /peach-logo-128.png 128w\" sizes=\"24px\" width=\"24\" height=\"24\" alt=\"\" decoding=\"async\">" : `<svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-${B5(r)}"/></svg>`;
@@ -77627,7 +77737,7 @@ function aPe(e, t, n) {
}).join("")}</div>`;
}
// src/application/filter-scroll.js
-function oPe(e, t, n, r = !1) {
+function CPe(e, t, n, r = !1) {
if (t = Math.max(0, t), !e || !n || r || t <= 8) return {
y: t,
origin: t,
@@ -77674,9 +77784,9 @@ function U5() {
X.hideCatalogCombo(), R5(), document.body.classList.remove("entity-open", "index-open");
}
function W5() {
- document.body.classList.remove("entity-open", "index-open"), WV(L("#index")), L("#stats").hidden = !0, L("#index").hidden = !0, Z8(location.pathname) || (L("#feedNew").hidden = !0), L("#catalogFilter").style.display = "", w7(), Z5(), $5();
+ document.body.classList.remove("entity-open", "index-open"), XV(L("#index")), L("#stats").hidden = !0, L("#index").hidden = !0, Z8(location.pathname) || (L("#feedNew").hidden = !0), L("#catalogFilter").style.display = "", w7(), Z5(), $5();
}
-function sPe() {
+function wPe() {
Q.route("/"), W5();
}
function G5({ tags: e = [], providers: t = [], duration: n = !1 }) {
@@ -77685,7 +77795,7 @@ function G5({ tags: e = [], providers: t = [], duration: n = !1 }) {
kind: "follow",
tags: e.map(([e, t]) => ({
value: e,
- label: Nl(e),
+ label: Jl(e),
n: t
})),
selected: [...$.followTags],
@@ -77704,7 +77814,7 @@ function G5({ tags: e = [], providers: t = [], duration: n = !1 }) {
});
}
function K5(e) {
- pFe({
+ AFe({
...C9(),
...e
}), g9({ filters: $.followSidebarFilters() });
@@ -77716,33 +77826,33 @@ function J5(e) {
let t = L("#drawer"), n = !e && t.contains(document.activeElement);
t.inert = !e && q5(), t.classList.toggle("open", e), L("#scrim").classList.toggle("on", e), document.body.classList.toggle("drawer-open", !!e), document.dispatchEvent(new Event("board:sidebar")), L("#filterBtn").setAttribute("aria-expanded", String(!!e)), L("#filterBtn").setAttribute("aria-controls", "drawer"), L("#filterBtn").setAttribute("aria-label", e ? "收起侧栏" : "展开侧栏"), n && L("#filterBtn").focus(), sessionStorage.setItem("board.sidebar", e ? "open" : "closed");
}
-function cPe() {
+function TPe() {
q5() && J5(!1);
}
-function lPe() {
- su === null && (vu({ runtimeConfigurable: !1 }), on("/healthz").then((e) => {
- vu({ runtimeConfigurable: !!e.configurable }), su && X5() && Z5();
+function EPe() {
+ Su === null && (W({ runtimeConfigurable: !1 }), xn("/healthz").then((e) => {
+ W({ runtimeConfigurable: !!e.configurable }), Su && X5() && Z5();
}).catch(() => {}));
}
function Y5(e = "", t = !1) {
- if (!t && !pV(location.pathname)) {
- let t = $V.navigation;
- $V.push(hV(e), { settingsBackground: {
+ if (!t && !yV(location.pathname)) {
+ let t = aH.navigation;
+ aH.push(xV(e), { settingsBackground: {
pathname: location.pathname,
search: location.search,
state: t.location.state,
seq: t.seq
} });
- } else !t && e && eH(hV(e), {
+ } else !t && e && oH(xV(e), {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
});
- return e ||= mV(location.pathname), IMe(V5.settingsHost()).then((t) => (t.open(e), t));
+ return e ||= bV(location.pathname), $Me(V5.settingsHost()).then((t) => (t.open(e), t));
}
-function uPe() {
- pV(location.pathname) && (gV($V.navigation.location.state) ? $V.go(-1) : Q.navigatePath("/", !0));
+function DPe() {
+ yV(location.pathname) && (SV(aH.navigation.location.state) ? aH.go(-1) : Q.navigatePath("/", !0));
}
-function dPe() {
+function OPe() {
return {
scroll: L("#drawerScroll"),
store: Z.settingsStore,
@@ -77774,31 +77884,31 @@ function dPe() {
}
};
}
-function fPe() {
+function kPe() {
let e = L("#drawerScroll"), t = [...e.querySelector("[data-sidebar-head]")?.children || []];
- e.innerHTML = aPe(Z.appSettings.sidebarOrder, V5.NAV_CATALOG, c7), e.querySelector("[data-sidebar-head]").append(...t), J.listen(e, "click", (e) => {
+ e.innerHTML = SPe(Z.appSettings.sidebarOrder, V5.NAV_CATALOG, c7), e.querySelector("[data-sidebar-head]").append(...t), J.listen(e, "click", (e) => {
if (p8()) return;
let t = e.target.closest?.("[data-nav]");
t && l7(t.dataset.nav);
- }), LMe(dPe()).then((e) => e.render(V5.sidebarProps)).catch(() => {});
+ }), eNe(OPe()).then((e) => e.render(V5.sidebarProps)).catch(() => {});
}
-async function pPe() {
+async function APe() {
let e = J, t = null;
try {
- t = await on("/api/settings", { signal: e.signal });
+ t = await xn("/api/settings", { signal: e.signal });
} catch {
return;
}
- e.isActive && yA(t, (e) => Z.settingsEffects[e]?.());
+ e.isActive && wA(t, (e) => Z.settingsEffects[e]?.());
}
function X5() {
return Q.routeMeta(decodeURIComponent(location.pathname))?.route.section || (U.state === "ads" ? "cleanup" : "");
}
function Z5() {
let e = X5();
- lPe(), e && R5(), L("#count").classList.toggle("no-tagbar", !!e), _9(), e !== "trash" && (D5.trashCount = null), Q5(e);
+ EPe(), e && R5(), L("#count").classList.toggle("no-tagbar", !!e), _9(), e !== "trash" && (D5.trashCount = null), Q5(e);
}
-function mPe(e) {
+function jPe(e) {
return {
section: e,
path: decodeURIComponent(location.pathname),
@@ -77809,16 +77919,16 @@ function mPe(e) {
}
function Q5(e = X5()) {
$5();
- let t = mPe(e), n = g8();
+ let t = jPe(e), n = g8();
if (n) n.render(t);
else {
- let e = xle(t);
+ let e = kle(t);
e !== V5.manageHeaderSkeleton && (V5.manageHeaderSkeleton = e, V5.manageHeaderRoot().innerHTML = e);
}
- let r = fP(t)?.title || "";
- r !== V5.lastManagePageLabel && (V5.lastManagePageLabel = r, r && Ps(V5.manageHeaderRoot(), "[data-manage-title],[data-manage-lede]"));
+ let r = yP(t)?.title || "";
+ r !== V5.lastManagePageLabel && (V5.lastManagePageLabel = r, r && Ys(V5.manageHeaderRoot(), "[data-manage-title],[data-manage-lede]"));
}
-function hPe() {
+function MPe() {
let e = V5.manageHeaderRoot();
J.listen(e, "click", (e) => {
if (g8()) return;
@@ -77828,7 +77938,7 @@ function hPe() {
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button) return;
e.preventDefault(), Q.navigatePath("/data-cleanup");
} else e.target.closest?.("[data-empty-trash]") && P7();
- }), RMe({
+ }), tNe({
root: e,
openManage: e7,
openDataCleanup: () => Q.navigatePath("/data-cleanup"),
@@ -77838,40 +77948,40 @@ function hPe() {
function $5() {
let e = L("#listTitle");
if (!e) return;
- let t = decodeURIComponent(location.pathname), n = !X5() && fn(t) && dn[U.state] || "";
- e.hidden = !n, n && (e.textContent = n), L("#catalogPageHeading").hidden = !!X5() || !fn(t) || !!n || U.jav === "1";
+ let t = decodeURIComponent(location.pathname), n = !X5() && Dn(t) && En[U.state] || "";
+ e.hidden = !n, n && (e.textContent = n), L("#catalogPageHeading").hidden = !!X5() || !Dn(t) || !!n || U.jav === "1";
}
function e7(e = "stats") {
let t = Q.routePathOf("section", e);
- t ? Q.openRoutePath(t) : (U.orient = "", U.state = "ads", yu(), Q.route(o$()), W5(), _9(), N7());
+ t ? Q.openRoutePath(t) : (U.orient = "", U.state = "ads", Nu(), Q.route(s$()), W5(), _9(), N7());
}
function t7() {
let e = decodeURIComponent(location.pathname);
- return e === "/" ? U.jav === "1" : e.startsWith("/performers/") || e.startsWith("/studios/") ? U.jav === "1" || du : !1;
+ return e === "/" ? U.jav === "1" : e.startsWith("/performers/") || e.startsWith("/studios/") ? U.jav === "1" || Eu : !1;
}
-function gPe(e = t7()) {
- let t = Hk.filter(([e]) => e !== "seed");
- return e ? [Uk, ...t] : t;
+function NPe(e = t7()) {
+ let t = Yk.filter(([e]) => e !== "seed");
+ return e ? [Xk, ...t] : t;
}
function n7() {
return decodeURIComponent(location.pathname) === "/" && U.jav !== "1";
}
function r7() {
- return AA(n7());
+ return IA(n7());
}
-function _Pe(e) {
- yse(e), a7(), L("#grid").hidden || Y7();
+function PPe(e) {
+ Ose(e), a7(), L("#grid").hidden || Y7();
}
function i7(e) {
- RA(e), a7(), Y7();
+ WA(e), a7(), Y7();
}
function a7() {
document.querySelectorAll("[data-video-layout]").forEach((e) => {
e.checked = e.value === r7();
}), X.catalogFilterProps && T7({ layout: D7() });
}
-function vPe(e) {
- bse(e), a7(), Y7();
+function FPe(e) {
+ kse(e), a7(), Y7();
}
async function o7() {
k8(), X.mixRelatedCache.clear(), await Promise.all([s7(), N7()]);
@@ -77882,8 +77992,8 @@ async function s7() {
return;
}
let e = decodeURIComponent(location.pathname);
- if (AV(e)?.reload === "reopen" || e === "/follow") {
- vu({ pageOpens: lu + 1 });
+ if (IV(e)?.reload === "reopen" || e === "/follow") {
+ W({ pageOpens: wu + 1 });
return;
}
let t = Q.routeMeta(e);
@@ -77896,10 +78006,10 @@ function c7(e) {
let e = X5();
return !!e && !Z.appSettings.sidebarOrder.some((t) => V5.DIRECT_MANAGE_NAV[t] === e);
}
- return e === "jav" ? t === "/jav" || t7() : e === "shorts" ? U.orient === "竖屏" : e === "" ? t === "/" && !X5() && !U.state && !t7() && U.orient !== "竖屏" : ln[e] ? n === e && U.orient !== "竖屏" : n ? n === e : t === "/" && U.state === e && U.orient !== "竖屏";
+ return e === "jav" ? t === "/jav" || t7() : e === "shorts" ? U.orient === "竖屏" : e === "" ? t === "/" && !X5() && !U.state && !t7() && U.orient !== "竖屏" : wn[e] ? n === e && U.orient !== "竖屏" : n ? n === e : t === "/" && U.state === e && U.orient !== "竖屏";
}
function l7(e) {
- if (cPe(), V5.DIRECT_MANAGE_NAV[e]) {
+ if (TPe(), V5.DIRECT_MANAGE_NAV[e]) {
e7(V5.DIRECT_MANAGE_NAV[e]);
return;
}
@@ -77915,20 +78025,20 @@ function l7(e) {
_7();
return;
}
- let t = ln[e] ? null : Q.routePathOf("nav", e);
- t ? Q.openRoutePath(t) : (e === "shorts" ? (U.orient = "竖屏", U.state = "") : (U.orient = "", U.state = e), yu(), Q.route(g7()), W5(), _9(), N7());
+ let t = wn[e] ? null : Q.routePathOf("nav", e);
+ t ? Q.openRoutePath(t) : (e === "shorts" ? (U.orient = "竖屏", U.state = "") : (U.orient = "", U.state = e), Nu(), Q.route(g7()), W5(), _9(), N7());
}
function u7() {
let e = decodeURIComponent(location.pathname), t = e.split("/").filter(Boolean);
- Jl && Zl !== D5.currentSelectSurface() && k5(!1, !0);
- let n = t.length > 1 && Object.prototype.hasOwnProperty.call(mn, t[0]), r = fn(e) || e === "/trash", i = r || n || e === "/tags" || e === "/follow", a = r || n || e === "/follow";
- L("#selectMode").hidden = !i, L("#density").hidden = !a, d5(), !i && Jl && k5(!1, !0);
+ lu && fu !== D5.currentSelectSurface() && k5(!1, !0);
+ let n = t.length > 1 && Object.prototype.hasOwnProperty.call(kn, t[0]), r = Dn(e) || e === "/trash", i = r || n || e === "/tags" || e === "/follow", a = r || n || e === "/follow";
+ L("#selectMode").hidden = !i, L("#density").hidden = !a, d5(), !i && lu && k5(!1, !0);
}
-function yPe() {
+function IPe() {
let e = [...document.querySelectorAll("[data-filter-frame]")], t = e.find((e) => e.offsetParent !== null);
(t !== V5.mobileFilterHost || location.pathname !== V5.mobileFilterPath) && (V5.mobileFilterScroll = null), V5.mobileFilterHost = t, V5.mobileFilterPath = location.pathname;
let n = Math.max(0, Math.min(scrollY, document.documentElement.scrollHeight - innerHeight)), r = !!t?.querySelector(":focus-visible,input:focus,select:focus,textarea:focus,[aria-expanded=\"true\"]");
- V5.mobileFilterScroll = oPe(V5.mobileFilterScroll, n, innerWidth <= 760, r);
+ V5.mobileFilterScroll = CPe(V5.mobileFilterScroll, n, innerWidth <= 760, r);
for (let n of e) {
let e = n === t && V5.mobileFilterScroll.free;
if (e && n.style.setProperty("--filter-free-top", `${-n.offsetHeight - 12}px`), e === n.hasAttribute("data-filter-free")) continue;
@@ -77942,49 +78052,49 @@ function yPe() {
});
}
}
-function bPe() {
- yPe(), [".board-filter-frame", "#count"].forEach((e) => {
+function LPe() {
+ IPe(), [".board-filter-frame", "#count"].forEach((e) => {
let t = L(e), n = t && getComputedStyle(t), r = n ? parseFloat(n.top) : NaN, i = !!t && n.position === "sticky" && t.offsetParent !== null && window.scrollY > 0 && Number.isFinite(r) && t.getBoundingClientRect().top - (parseFloat(n.translate.split(" ")[1]) || 0) <= r + 1;
t && t.classList.toggle("is-stuck", i), t?.matches(".board-filter-frame") && t.classList.toggle("board-is-stuck", i);
});
}
function d7() {
V5.stickyFrame ||= J.frame(() => {
- V5.stickyFrame = 0, bPe();
+ V5.stickyFrame = 0, LPe();
});
}
-function xPe() {
+function RPe() {
$.followSidebarFilters = () => ({
provider: [...$.followProviders][0] || "",
dur_min: $.followDurMin || "",
dur_max: $.followDurMax || ""
- }), J.handler(L("#filterBtn"), "onclick", () => J5(!L("#drawer").classList.contains("open"))), V5.SIDEBAR_ITEMS = A8, V5.MANAGE_SECTIONS = j8, V5.MANAGE_MENU_SECTIONS = M8, V5.manageMenuSections = () => eNe(su === !0), V5.OPTIONAL_SIDEBAR_ITEMS = N8, V5.NAV_CATALOG = tNe, V5.DIRECT_MANAGE_NAV = nNe, V5.settingsHost = () => ({
- selectSection: (e) => eH(hV(e), {
+ }), J.handler(L("#filterBtn"), "onclick", () => J5(!L("#drawer").classList.contains("open"))), V5.SIDEBAR_ITEMS = A8, V5.MANAGE_SECTIONS = j8, V5.MANAGE_MENU_SECTIONS = M8, V5.manageMenuSections = () => _Ne(Su === !0), V5.OPTIONAL_SIDEBAR_ITEMS = N8, V5.NAV_CATALOG = vNe, V5.DIRECT_MANAGE_NAV = yNe, V5.settingsHost = () => ({
+ selectSection: (e) => oH(xV(e), {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
}),
- closed: uPe,
+ closed: DPe,
store: Z.settingsStore,
changed: (e) => Z.settingsEffects[e]?.(),
- sound: (e) => No(e),
+ sound: (e) => Jo(e),
navCatalog: V5.NAV_CATALOG,
- themeOptions: mse,
- videoLayouts: wA,
+ themeOptions: Cse,
+ videoLayouts: AA,
followInitialRanges: P8,
videoLayout: () => r7(),
- setVideoLayout: vPe,
+ setVideoLayout: FPe,
censored: $7,
- setCensored: WPe,
+ setCensored: sFe,
highContrast: () => document.documentElement.classList.contains("board-high-contrast"),
- setHighContrast: GPe,
+ setHighContrast: cFe,
receipt: (e) => C8.actionReceipt(e),
failure: C8.actionFailure,
- syncRemote: (e) => yA(e, (e) => Z.settingsEffects[e]?.()),
+ syncRemote: (e) => wA(e, (e) => Z.settingsEffects[e]?.()),
openConfiguration: () => Q.navigatePath("/settings/library"),
attached: () => Z.syncGlassOptics(),
- configurable: () => on("/healthz").then((e) => (vu({ runtimeConfigurable: !!e.configurable }), su)).catch(() => null)
+ configurable: () => xn("/healthz").then((e) => (W({ runtimeConfigurable: !!e.configurable }), Su)).catch(() => null)
}), J.handler(L("#settingsBtn"), "onclick", () => void Y5()), V5.lastManagePageLabel = "", V5.manageHeaderSkeleton = "", V5.manageHeaderRoot = () => L("[data-manage-header]"), window.__scrolling = !1, V5.scrollT = null, V5.stickyFrame = 0, V5.mobileFilterScroll = null, V5.mobileFilterHost = null, V5.mobileFilterPath = "", J.listen(document, "focusin", d7), J.listen(document, "focusout", d7), J.listen(window, "scroll", () => {
- d7(), location.pathname === "/follow" && T9() && vu({ followScrollY: scrollY }), window.__scrolling = !0, kl(), clearTimeout(V5.scrollT), V5.scrollT = J.delay(() => {
+ d7(), location.pathname === "/follow" && T9() && W({ followScrollY: scrollY }), window.__scrolling = !0, Wl(), clearTimeout(V5.scrollT), V5.scrollT = J.delay(() => {
window.__scrolling = !1;
}, 180);
}, { passive: !0 }), J.listen(window, "resize", d7, { passive: !0 }), J.handler(L("#scrim"), "onclick", () => J5(!1));
@@ -77996,9 +78106,9 @@ var f7 = 64, p7 = (e) => e.replace(/[&<>"]/g, (e) => ({
">": "&gt;",
"\"": "&quot;"
})[e]), m7 = (e) => e.repeat(f7);
-function SPe(e, t, n) {
- let r = e.map((e) => `<a href="${p7(e.href)}" data-catalog-view="${p7(e.k)}" data-entity-press="" aria-pressed="${t === e.k}">${p7(e.label)}</a>`).join(""), i = OW();
- return `<div class="peach-react"><div class="contents" data-catalog-root="" data-loading=""><div data-catalog-tiers="" aria-busy="true"${i.performers || i.studios ? "" : " hidden"}>` + (i.performers ? "<div data-catalog-tier=\"performers\" data-skeleton=\"tiers\">" + m7("<span data-catalog-placeholder=\"performer\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div>" : "") + (i.studios ? "<div data-catalog-tier=\"studios\">" + m7("<span data-catalog-placeholder=\"studio\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div>" : "") + `</div><div role="group" aria-label="筛选与排序" data-filter-glass="" data-glass-pane="" data-filter-frame="" data-catalog-frame="" class="sticky top-topbar z-10 mb-5.5 flex flex-col mx-4"><div role="group" aria-label="视图与标签" data-filter-row="top" class="flex h-12 min-w-0 items-center overscroll-x-contain px-3 py-2 gap-1.5 overflow-visible"><div data-catalog-scroll=""><div role="group" aria-label="视图" data-catalog-views="">${r}<span data-entity-sep="" aria-hidden="true"></span></div><div data-catalog-tags=""><span data-catalog-placeholder="tag" aria-hidden="true">` + "<span></span>".repeat(f7) + `</span></div></div></div><div data-filter-row="bottom" aria-busy="true" class="flex min-w-0 items-center gap-3 px-3 py-2 min-h-12"><span data-catalog-summary=""><span data-catalog-readout=""><span data-skeleton="count" aria-hidden="true" class="relative inline-block h-3.5 w-37.5 rounded-md align-middle skeleton-sheen"></span></span>${ss()}</span>` + (n ? i5(n.sorts, n.layout) : "") + "</div></div></div></div>";
+function zPe(e, t, n) {
+ let r = e.map((e) => `<a href="${p7(e.href)}" data-catalog-view="${p7(e.k)}" data-entity-press="" aria-pressed="${t === e.k}">${p7(e.label)}</a>`).join(""), i = LW();
+ return `<div class="peach-react"><div class="contents" data-catalog-root="" data-loading=""><div data-catalog-tiers="" aria-busy="true"${i.performers || i.studios ? "" : " hidden"}>` + (i.performers ? "<div data-catalog-tier=\"performers\" data-skeleton=\"tiers\">" + m7("<span data-catalog-placeholder=\"performer\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div>" : "") + (i.studios ? "<div data-catalog-tier=\"studios\">" + m7("<span data-catalog-placeholder=\"studio\" aria-hidden=\"true\"><span></span><span>&nbsp;</span></span>") + "</div>" : "") + `</div><div role="group" aria-label="筛选与排序" data-filter-glass="" data-glass-pane="" data-filter-frame="" data-catalog-frame="" class="sticky top-topbar z-10 mb-5.5 flex flex-col mx-4"><div role="group" aria-label="视图与标签" data-filter-row="top" class="flex h-12 min-w-0 items-center overscroll-x-contain px-3 py-2 gap-1.5 overflow-visible"><div data-catalog-scroll=""><div role="group" aria-label="视图" data-catalog-views="">${r}<span data-entity-sep="" aria-hidden="true"></span></div><div data-catalog-tags=""><span data-catalog-placeholder="tag" aria-hidden="true">` + "<span></span>".repeat(f7) + `</span></div></div></div><div data-filter-row="bottom" aria-busy="true" class="flex min-w-0 items-center gap-3 px-3 py-2 min-h-12"><span data-catalog-summary=""><span data-catalog-readout=""><span data-skeleton="count" aria-hidden="true" class="relative inline-block h-3.5 w-37.5 rounded-md align-middle skeleton-sheen"></span></span>${Ss()}</span>` + (n ? i5(n.sorts, n.layout) : "") + "</div></div></div></div>";
}
// src/application/catalog.js
var X = {
@@ -78037,47 +78147,47 @@ var X = {
junkQueueHelpers: void 0,
junkQueueActions: void 0
};
-function CPe() {
- X.initialParams.has("loc") || (U.loc = h7(U.loc), yu());
+function BPe() {
+ X.initialParams.has("loc") || (U.loc = h7(U.loc), Nu());
}
function h7(e) {
- return GMe(e, Z.sourceOnline);
+ return cNe(e, Z.sourceOnline);
}
function g7(e = U) {
- return KMe(e);
+ return lNe(e);
}
-function wPe() {
- vu(T8(qMe(U, Z.appSettings, C8.rollSeed))), k8();
+function VPe() {
+ W(T8(uNe(U, Z.appSettings, C8.rollSeed))), k8();
}
function _7(e = null, t = !1) {
- wPe(), e && (Object.assign(U, e), yu()), Q.route(e ? g7() : "/"), X.clearSearchField(), a9(!1), W5(), _9(), N7(), t && window.scrollTo({
+ VPe(), e && (Object.assign(U, e), Nu()), Q.route(e ? g7() : "/"), X.clearSearchField(), a9(!1), W5(), _9(), N7(), t && window.scrollTo({
top: 0,
behavior: "smooth"
});
}
-function TPe(e, t = null) {
+function HPe(e, t = null) {
let n = e.id;
!e.medium || e.medium === "video" ? l9(n, !0, null, t) : e.medium === "image" && e.location !== "online" ? window.open("/photo?id=" + n, "_blank", "noopener") : A5(n);
}
function v7(e) {
- return X.mixRelatedCache.has(e) || X.mixRelatedCache.set(e, on("/api/related?id=" + e + "&limit=28").then((t) => (t.items || []).filter((t) => t.id !== e)).catch((t) => {
+ return X.mixRelatedCache.has(e) || X.mixRelatedCache.set(e, xn("/api/related?id=" + e + "&limit=28").then((t) => (t.items || []).filter((t) => t.id !== e)).catch((t) => {
throw X.mixRelatedCache.delete(e), t;
})), X.mixRelatedCache.get(e);
}
-function EPe(e, t) {
+function UPe(e, t) {
i8()?.miniplayerTakesCard(e) ? i8().miniplayerPlay(e.id) : y7(e, t);
}
function y7(e, t) {
- e.edition_group ? QPe(e.edition_group.seed_id, e.id, !0, t) : e.part_group ? $Pe(e.part_group.seed_id, e.id, !0, t) : l9(e.id, !0, null, t);
+ e.edition_group ? hFe(e.edition_group.seed_id, e.id, !0, t) : e.part_group ? gFe(e.part_group.seed_id, e.id, !0, t) : l9(e.id, !0, null, t);
}
-async function DPe(e, t) {
+async function WPe(e, t) {
try {
- let n = await on("/api/watch-later", {
+ let n = await xn("/api/watch-later", {
method: "POST",
body: JSON.stringify({ id: e.id })
});
e.watch_later = n.watch_later, t(!!n.watch_later), C8.actionReceipt(n.watch_later ? "已加入稍后看" : "已移出稍后看", { undo: async () => {
- let n = await on("/api/watch-later", {
+ let n = await xn("/api/watch-later", {
method: "POST",
body: JSON.stringify({ id: e.id })
});
@@ -78087,9 +78197,9 @@ async function DPe(e, t) {
C8.actionFailure("更新稍后看", e);
}
}
-async function OPe(e, t) {
+async function GPe(e, t) {
try {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: [e.id],
@@ -78098,7 +78208,7 @@ async function OPe(e, t) {
}), await R7();
let n = t === "restore" ? "dispose" : "restore";
C8.actionReceipt(t === "restore" ? "已还原" : "已移入回收站", { undo: async () => {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: [e.id],
@@ -78111,9 +78221,9 @@ async function OPe(e, t) {
throw C8.actionFailure("操作", e), e;
}
}
-async function kPe(e, t, n, r) {
- let i = Number(e.rating) || 0, a = WM(i, t), o = async (t, r) => {
- let i = (await on("/api/feedback", {
+async function KPe(e, t, n, r) {
+ let i = Number(e.rating) || 0, a = ZM(i, t), o = async (t, r) => {
+ let i = (await xn("/api/feedback", {
method: "POST",
body: JSON.stringify({
id: e.id,
@@ -78126,7 +78236,7 @@ async function kPe(e, t, n, r) {
};
try {
let e = await o(a, r);
- C8.actionReceipt(e ? `已评 ${UM(e)} 星` : "已取消评分", { undo: () => o(i) });
+ C8.actionReceipt(e ? `已评 ${XM(e)} 星` : "已取消评分", { undo: () => o(i) });
} catch (e) {
throw r?.aborted || C8.actionFailure("评分", e), e;
}
@@ -78155,9 +78265,9 @@ async function b7(e) {
e[n] && t.set(n, e[n]);
});
}
- return QMe(t.toString(), X.topsQueryParams(e).toString());
+ return hNe(t.toString(), X.topsQueryParams(e).toString());
}
-function APe() {
+function qPe() {
if (scrollY <= 0) return;
let e = document.documentElement;
e.classList.add("refiltering");
@@ -78177,24 +78287,24 @@ async function S7(e) {
t === X.facetCountsSeq && (e.type === "home" && (n9.facets = n), g9({ latest: Q7(n, e) }));
}
function C7(e) {
- APe();
+ qPe();
let t = s5();
if (t.type === "entity") {
let n = { ...t.filters };
e(n), l5(t.kind, t.name, n), x7(n), S7(s5());
} else if (t.type === "item") {
- let t = Y.cloneBarsContext(Gl);
- if (a9(!1), vu({ detailReturnBarsContext: null }), t && t.type === "entity") {
- e(t.filters), l5(t.kind, t.name, t.filters) ? N7() : vu({ pageOpens: lu + 1 });
+ let t = Y.cloneBarsContext(ou);
+ if (a9(!1), W({ detailReturnBarsContext: null }), t && t.type === "entity") {
+ e(t.filters), l5(t.kind, t.name, t.filters) ? N7() : W({ pageOpens: wu + 1 });
return;
}
- e(U), vu({ barsContext: {
+ e(U), W({ barsContext: {
type: "home",
filters: U
} }), Q.route(g7()), W5(), N7();
- } else e(U), yu(), Q.route(g7()), x7(U), S7(Wl);
+ } else e(U), Nu(), Q.route(g7()), x7(U), S7(au);
}
-function jPe() {
+function JPe() {
return {
tiers: null,
tiersPending: !1,
@@ -78216,7 +78326,7 @@ function jPe() {
helpers: {
wireDrag: t9,
wireScroller: (e) => {
- e && lc(e);
+ e && wc(e);
}
}
};
@@ -78230,12 +78340,12 @@ function T7(e) {
...e,
offscreen: n
}, X.catalogFilterProps = {
- ...X.catalogFilterProps || jPe(),
+ ...X.catalogFilterProps || JPe(),
...e
- }, !X.catalogFilterMounting && (zV(t) ? UV(t, e) : (!t.firstChild && !n && (t.innerHTML = SPe(X.catalogViews(), X.catalogFilterProps.state, O7()), Ks(t)), X.catalogFilterMounting = HV("catalog-filter", X.catalogFilterProps, {
+ }, !X.catalogFilterMounting && (GV(t) ? YV(t, e) : (!t.firstChild && !n && (t.innerHTML = zPe(X.catalogViews(), X.catalogFilterProps.state, O7()), sc(t)), X.catalogFilterMounting = JV("catalog-filter", X.catalogFilterProps, {
container: t,
isCurrent: () => !0
- }).then(() => UV(t, X.catalogFilterProps)).finally(() => {
+ }).then(() => YV(t, X.catalogFilterProps)).finally(() => {
X.catalogFilterMounting = null;
})));
}
@@ -78247,7 +78357,7 @@ function E7() {
},
openEntity: (e, t) => y5(e, t),
setView: (e) => {
- U.state = e, yu(), T7({ state: e }), Q.route(g7()), N7();
+ U.state = e, Nu(), T7({ state: e }), Q.route(g7()), N7();
},
toggleTag: (e) => F7(e),
clearFilter: (e) => C7((t) => {
@@ -78257,17 +78367,17 @@ function E7() {
e.tag = "", e.creator = "", e.studio = "", e.owner = "";
}),
setSort: (e) => {
- let t = Yk(e, U.sort, U.dir);
- t && (U.sort = t.sort, U.dir = t.dir, yu(), Z7());
+ let t = nA(e, U.sort, U.dir);
+ t && (U.sort = t.sort, U.dir = t.dir, Nu(), Z7());
},
- reshuffle: () => UPe(),
+ reshuffle: () => oFe(),
setLayout: (e) => {
- t7() ? i7(e) : _Pe(e);
+ t7() ? i7(e) : PPe(e);
},
moreTops: async (e) => {
let t = X.catalogTopsPages;
if (!t) return [];
- let n = (await $Me(X.topsQueryParams(t.context, ++t[e]).toString()))[e] || [];
+ let n = (await gNe(X.topsQueryParams(t.context, ++t[e]).toString()))[e] || [];
return e === "performers" ? n.map(A7) : n.map(j7);
}
};
@@ -78276,13 +78386,13 @@ function D7() {
return t7() ? {
name: "jav-layout",
label: "JAV 卡片版式",
- value: kA(),
- options: wA
+ value: FA(),
+ options: AA
} : n7() ? {
name: "home-layout",
label: "首页卡片版式",
value: r7(),
- options: wA
+ options: AA
} : null;
}
function O7() {
@@ -78302,12 +78412,12 @@ function k7(e) {
function A7(e) {
return {
name: e.k,
- ringHtml: `<span data-tier-initial>${z(Fn(e.k))}</span>${Xa({
+ ringHtml: `<span data-tier-initial>${z(Xn(Qt("performer", e.k, e.id)))}</span>${fo({
id: e.id,
hasImage: e.has_image,
version: e.image_version,
rep: e.has_avatar ? e.rep : null,
- style: eo(e.avatar_focus),
+ style: go(e.avatar_focus),
focus: e.avatar_focus,
standIn: e.avatar_stand_in
})}`
@@ -78316,11 +78426,11 @@ function A7(e) {
function j7(e) {
return {
name: e.k,
- fallback: Pn(e.k, 2),
- logo: e.has_logo ? qa(e.k, "icon", e.logo_version) : ""
+ fallback: Yn(e.k, 2),
+ logo: e.has_logo ? co(e.k, "icon", e.logo_version) : ""
};
}
-function MPe(e, t) {
+function YPe(e, t) {
X.catalogFilterProps?.tiers || (X.barsRendered = "", X.barsPendingSeq = t, T7({
tiers: null,
tiersPending: !0,
@@ -78332,7 +78442,7 @@ function M7(e) {
}
async function N7() {
let e = ++X.barsRequestSeq;
- if (g9(), !Vl(location.pathname) || Wl.type === "item") return;
+ if (g9(), !nu(location.pathname) || au.type === "item") return;
let t = s5(), n = Y.activeFilterState(), r = JSON.stringify([
t,
n,
@@ -78340,7 +78450,7 @@ async function N7() {
U.seed || "",
t7()
]);
- MPe(n, e);
+ YPe(n, e);
let i;
try {
i = await b7(t);
@@ -78362,7 +78472,7 @@ async function N7() {
}
X.barsRendered = s, t.type === "home" && (n9.facets = a);
let c = a.tags || [];
- ja(o.performers), ja(o.studios);
+ Ka(o.performers), Ka(o.studios);
let l = t.type === "home" && !t7() && !U.state && !U.q && !a.locations.some((e) => e.n > 0);
X.catalogTopsPages = {
context: t,
@@ -78372,7 +78482,7 @@ async function N7() {
let u = X.tagList(n.tag), d = new Map(c.map((e) => [e.k, e])), f = u.map((e) => d.get(e) || { k: e }), p = c.filter((e) => !u.includes(e.k)), m = C8.seededSample(p, X.TAGS_FIRST, `tags:${U.seed || ""}`), h = new Set(m.map((e) => e.k));
X.catalogTagRows = f.concat(m, p.filter((e) => !h.has(e.k))).map((e) => ({
k: e.k,
- label: Nl(e.k),
+ label: Jl(e.k),
n: e.n ?? null
})), X.barsPendingSeq = 0, T7({
tiers: {
@@ -78396,7 +78506,7 @@ async function N7() {
latest: null
});
}
-function NPe(e, t) {
+function XPe(e, t) {
n9.total = e, U.state === "trash" && (D5.trashCount = {
total: n9.total,
shown: t
@@ -78406,14 +78516,14 @@ function NPe(e, t) {
} });
}
function P7() {
- return Hc({
+ return rl({
title: "清空回收站",
body: "回收站中的全部文件和馆藏记录将永久删除,无法恢复。",
confirmLabel: "清空回收站",
danger: !0,
onConfirm: async () => {
try {
- let e = await on("/api/trash/empty", { method: "POST" });
+ let e = await xn("/api/trash/empty", { method: "POST" });
if (e.blocked && e.blocked.length) throw Error(`已永久删除 ${e.purged} 项;${e.blocked.length} 项未能删除,仍在回收站:\n` + e.blocked.slice(0, 5).map((e) => `${e.path}(${e.reason})`).join("\n"));
C8.actionReceipt(`已永久删除 ${e.purged} 项`);
} finally {
@@ -78448,7 +78558,7 @@ function I7(e) {
}), X.tagList(e.tag).forEach((e) => t.push({
kind: "untag",
key: e,
- label: Nl(e)
+ label: Jl(e)
})), t;
}
function L7() {
@@ -78459,16 +78569,16 @@ function L7() {
}
async function R7() {
let e = Q.claimSurface(Q.surfacePath());
- if (vu({
+ if (W({
barsContext: {
type: "home",
filters: U
},
detailReturnBarsContext: null
- }), a9(!1), U.state === "ads") return IPe(e);
+ }), a9(!1), U.state === "ads") return $Pe(e);
if (X.controller.page === "/junk-files" && B7(), L5(), W5(), Z8(location.pathname) && U.browse !== "folders") {
if (await I5.entityShapesReady, !Q.surfaceCurrent(e)) return;
- vNe();
+ FNe();
} else Q8();
return L7(), L("#count").classList.remove("manage-static", "junkcount"), V7(e);
}
@@ -78477,31 +78587,31 @@ function z7(e) {
}
function B7() {
let e = L("#grid");
- kl(e), WV(e), X.controller.clear(), e.innerHTML = "";
+ Wl(e), XV(e), X.controller.clear(), e.innerHTML = "";
}
function V7(e) {
- return G7("/", FPe, e, { place: hFe });
+ return G7("/", QPe, e, { place: MFe });
}
-function PPe(e) {
- return G7("/junk-files", RPe, e);
+function ZPe(e) {
+ return G7("/junk-files", tFe, e);
}
function H7() {
- return !!RV(L("#grid"));
+ return !!WV(L("#grid"));
}
function U7() {
return X.controller.taken(H7());
}
function W7(e) {
- UV(L("#grid"), e);
+ YV(L("#grid"), e);
}
function G7(e, t, n, r = {}) {
let i = L("#grid");
X.controller.page && X.controller.page !== e && B7();
let a = X.controller.begin(e, H7()), o = t();
if (!a.mount) return W7(o), a.settled;
- kl(i);
- let s = () => WV(i);
- return a.signal.addEventListener("abort", s, { once: !0 }), HV(e, o, {
+ Wl(i);
+ let s = () => XV(i);
+ return a.signal.addEventListener("abort", s, { once: !0 }), JV(e, o, {
...r,
container: i,
isCurrent: () => Q.surfaceCurrent(n) && a.isCurrent()
@@ -78511,7 +78621,7 @@ function G7(e, t, n, r = {}) {
}
function K7() {
let e = n7();
- return IA({
+ return HA({
active: t7() || e,
home: e,
portrait: U.orient === "竖屏"
@@ -78521,27 +78631,27 @@ function q7(e = "正在读取作品") {
return VJ(e, J7());
}
function J7() {
- return U ? LA(K7()) : 16 / 9;
+ return U ? UA(K7()) : 16 / 9;
}
function Y7() {
- U7() && (kl(L("#grid")), W7({
+ U7() && (Wl(L("#grid")), W7({
layout: K7(),
seekSeconds: Z.appSettings.seekSeconds
- })), Y.entityPageCurrent() && (kl(L("#index [data-entity-hero]")), o5({
+ })), Y.entityPageCurrent() && (Wl(L("#index [data-entity-hero]")), o5({
layout: K7(),
seekSeconds: Z.appSettings.seekSeconds
}));
}
-function FPe() {
- let e = decodeURIComponent(location.pathname), t = fn(e), n = U.state === "trash";
+function QPe() {
+ let e = decodeURIComponent(location.pathname), t = Dn(e), n = U.state === "trash";
return {
mode: "catalog",
helpers: X.gridHelpers,
actions: X.gridActions,
layout: K7(),
wall: e === "/wall",
- selectMode: Jl,
- selected: new Set(Kl),
+ selectMode: lu,
+ selected: new Set(su),
seekSeconds: Z.appSettings.seekSeconds,
revision: X.controller.revision,
wireDrag: t9,
@@ -78554,24 +78664,24 @@ function FPe() {
mix: t && e !== "/wall" && !n && U.browse !== "folders",
shorts: t && e !== "/wall" && !t7() && U.orient !== "竖屏" && !n && U.browse !== "folders",
countRow: L("#count"),
- onCount: NPe,
+ onCount: XPe,
onCountFailed: () => T7({ count: !1 }),
emptyHtml: ({ trash: e, libraryEmpty: t }) => e ? Z.emptyState("trash", "回收站是空的", "删掉的内容会先到这里;确认不再需要后再清空。") : NK({
jav: t7() && !t,
- configurable: su,
+ configurable: Su,
filtered: !t
}),
canLoadMore: () => L("#stats").hidden && L("#index").hidden
};
}
-function IPe(e) {
+function $Pe(e) {
let t = L("#count");
- return X.controller.page === "/junk-files" && H7() && !X.controller.pending && t.querySelector(":scope > .peach-react:not([data-junk-count-skeleton])") || (B7(), L5("正在读取垃圾文件")), W5(), L7(), t.classList.add("manage-static", "junkcount"), t.classList.remove("is-stuck"), PPe(e);
+ return X.controller.page === "/junk-files" && H7() && !X.controller.pending && t.querySelector(":scope > .peach-react:not([data-junk-count-skeleton])") || (B7(), L5("正在读取垃圾文件")), W5(), L7(), t.classList.add("manage-static", "junkcount"), t.classList.remove("is-stuck"), ZPe(e);
}
-async function LPe(e, t) {
+async function eFe(e, t) {
let n = [e.id], r = t === "dispose", i = t === "reconsider-junk";
try {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: n,
@@ -78581,7 +78691,7 @@ async function LPe(e, t) {
}), await R7();
let e = r ? "restore" : i ? "dismiss-junk" : "reconsider-junk";
C8.actionReceipt(r ? "已移入回收站" : i ? "已重新加入垃圾判断" : "已标记为不是垃圾", { undo: async () => {
- await on("/api/batch", {
+ await xn("/api/batch", {
method: "POST",
body: JSON.stringify({
ids: n,
@@ -78593,15 +78703,15 @@ async function LPe(e, t) {
throw C8.actionFailure("操作", e), e;
}
}
-function RPe() {
+function tFe() {
return {
- ...a$(location.search),
+ ...o$(location.search),
helpers: X.junkQueueHelpers,
actions: X.junkQueueActions,
batchSize: Z.appSettings.batchSize,
revision: X.controller.revision,
- selectMode: Jl,
- selected: new Set(Kl),
+ selectMode: lu,
+ selected: new Set(su),
countRow: L("#count"),
settled: z7,
skeletonHtml: () => s2("正在读取垃圾文件", {
@@ -78611,8 +78721,8 @@ function RPe() {
canLoadMore: () => L("#stats").hidden && L("#index").hidden
};
}
-function zPe() {
- X.initialParams = new URLSearchParams(location.search), X.resolveSort = (e, t, n = Z.appSettings.defaultSort) => w8(e, t, Z.appSettings, n), vu(T8(WMe(location, Z.appSettings, C8.rollSeed))), X.searchValueSnapshot = {
+function nFe() {
+ X.initialParams = new URLSearchParams(location.search), X.resolveSort = (e, t, n = Z.appSettings.defaultSort) => w8(e, t, Z.appSettings, n), W(T8(sNe(location, Z.appSettings, C8.rollSeed))), X.searchValueSnapshot = {
text: "",
scrollLeft: 0
}, X.cancelSearchDissolve = () => {}, X.rememberSearchValue = (e = L("#q")) => {
@@ -78627,39 +78737,39 @@ function zPe() {
text: t.value,
scrollLeft: t.scrollLeft || 0
}, r = e || (n.text ? n : X.searchValueSnapshot);
- X.cancelSearchDissolve(), X.cancelSearchDissolve = js(t, t.parentElement, r), X.searchValueSnapshot = {
+ X.cancelSearchDissolve(), X.cancelSearchDissolve = Ks(t, t.parentElement, r), X.searchValueSnapshot = {
text: "",
scrollLeft: 0
};
};
}
-function BPe() {
+function rFe() {
J.handler(L("#wallBtn"), "onclick", () => {
k5(!1, !0);
let e = s5(), t = {
...Y.activeFilterState(),
jav: t7() ? "1" : ""
};
- e.type === "entity" && e.kind !== "tag" && (t[e.kind] = e.name), Q.navigatePath(DK(void 0, t));
+ e.type === "entity" && e.kind !== "tag" && (t[e.kind] = e.name), Q.navigatePath(G_e(void 0, t));
}), X.mixRelatedCache = /* @__PURE__ */ new Map(), X.reduceMotion = () => matchMedia("(prefers-reduced-motion:reduce)").matches, X.tagList = (e = U.tag) => String(e || "").split(",").filter(Boolean), X.tagPressed = (e, t) => X.tagList(e).includes(String(t)), X.withTagToggled = (e, t) => {
let n = X.tagList(e), r = n.indexOf(t);
return r >= 0 ? n.splice(r, 1) : n.push(t), n.join(",");
}, X.gridHelpers = {
badgeHtml: (e, t) => Z.srcBadge(e, t),
- titleHtml: (e, t) => _F(e, t),
- displayName: (e, t) => gF(e, t),
- tagLabel: (e) => Nl(e)
+ titleHtml: (e, t) => wF(e, t),
+ displayName: (e, t) => CF(e, t),
+ tagLabel: (e) => Jl(e)
}, X.gridActions = {
wallPlayer: async (e, t, n) => {
let r = await r8(n9.stageHost);
return n.throwIfAborted(), r.mountWallPlayer(e, t, n);
},
wallDetails: y7,
- open: (e, t) => EPe(e, t),
- openResource: (e, t) => i8()?.miniplayerTakesCard(e) ? i8().miniplayerPlay(e.id) : TPe(e, t),
+ open: (e, t) => UPe(e, t),
+ openResource: (e, t) => i8()?.miniplayerTakesCard(e) ? i8().miniplayerPlay(e.id) : HPe(e, t),
openShort: (e) => i8()?.miniplayerTakesCard(e) ? i8().miniplayerPlay(e.id) : f9(e.id),
openShorts: () => f9(),
- openMix: (e, t) => ZPe(e, e, !0, t),
+ openMix: (e, t) => mFe(e, e, !0, t),
openEntity: (e, t) => y5(e, t),
openUnowned: () => _7({ owner: "none" }, !0),
toggleTag: (e) => {
@@ -78671,11 +78781,11 @@ function BPe() {
});
},
toggleSelection: (e, t) => A5(e, t),
- watchLater: (e, t) => DPe(e, t),
- rate: (e, t, n, r) => kPe(e, t, n, r),
- resourceOperation: (e, t) => OPe(e, t),
+ watchLater: (e, t) => WPe(e, t),
+ rate: (e, t, n, r) => KPe(e, t, n, r),
+ resourceOperation: (e, t) => GPe(e, t),
mixRelated: (e) => v7(e),
- canFlip: () => !Jl && !$7() && !window.__scrolling && !X.reduceMotion()
+ canFlip: () => !lu && !$7() && !window.__scrolling && !X.reduceMotion()
}, X.topsQueryParams = (e, t = 0) => {
let n = new URLSearchParams({
n: "60",
@@ -78701,7 +78811,7 @@ function BPe() {
}
], X.catalogViews = () => X.VIEW_PILLS.map((e) => ({
...e,
- href: e.k ? ln[e.k] : "/"
+ href: e.k ? wn[e.k] : "/"
})), X.TAGS_FIRST = 26, J.listen(L("#catalogFilter"), "click", (e) => {
let t = e.target.closest?.("[data-catalog-view]");
t && !e.defaultPrevented && (e.preventDefault(), E7().setView(t.dataset.catalogView));
@@ -78713,16 +78823,16 @@ function BPe() {
X.catalogFilterProps && T7({ comboHidden: !0 });
};
}
-function VPe() {
+function iFe() {
X.junkQueueHelpers = { badgeHtml: (e, t) => Z.srcBadge(e, t) }, X.junkQueueActions = {
navigate: (e) => {
- Jl && k5(!1, !0), Q.route(e);
+ lu && k5(!1, !0), Q.route(e);
},
toggleSelection: (e, t) => A5(e, t),
open: (e, t) => e.junk_kind === "image" ? window.open("/photo?id=" + e.id, "_blank", "noopener") : l9(e.id, !0, null, t),
reveal: async (e) => {
try {
- return await on("/api/reveal", {
+ return await xn("/api/reveal", {
method: "POST",
body: JSON.stringify({ id: e.id })
}), C8.toast({ text: "已在资源管理器中显示" }), "";
@@ -78730,10 +78840,10 @@ function VPe() {
return Y.sourceHint(e.message);
}
},
- operate: (e, t) => LPe(e, t)
+ operate: (e, t) => eFe(e, t)
};
}
-X.controller = new JMe();
+X.controller = new dNe();
// src/application/preferences.js
var Z = {
sourceOnline: void 0,
@@ -78759,7 +78869,7 @@ var Z = {
async function X7() {
let e = J;
try {
- let t = await rr(e.signal);
+ let t = await vr(e.signal);
if (!e.isActive) return Z.sourceOnline;
let n = (t.sources || []).flatMap((e) => e.roots || []).filter((e) => e.root_id);
Z.sourceOnline = Object.fromEntries([...(t.sources || []).map((e) => [e.location, e.online]), ...n.map((e) => [e.root_id, e.online])]), Z.sourceProblems = Object.fromEntries([...(t.sources || []).map((e) => [e.location, e.message || ""]), ...n.map((e) => [e.root_id, e.message || ""])]);
@@ -78767,18 +78877,18 @@ async function X7() {
if (!e.isActive) return Z.sourceOnline;
Z.sourceOnline = {}, Z.sourceProblems = {};
}
- return document.body.classList.toggle("offline-source", Object.values(Z.sourceOnline).includes(!1)), CPe(), Z.sourceOnline;
+ return document.body.classList.toggle("offline-source", Object.values(Z.sourceOnline).includes(!1)), BPe(), Z.sourceOnline;
}
function Z7() {
let e = Q.surfacePath();
- if (!fn(e) || e === "/junk-files") return R7();
+ if (!Dn(e) || e === "/junk-files") return R7();
let t = Z.nextCatalogLoad();
- return eH(g7(), {
+ return oH(g7(), {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
}), t;
}
-function HPe(e) {
+function aFe(e) {
if (e === "local") return {
kind: "glyph",
name: "hard-drive"
@@ -78787,7 +78897,7 @@ function HPe(e) {
kind: "glyph",
name: "rss"
};
- let t = Qo[e];
+ let t = ps[e];
return t ? t.startsWith("data:") ? {
kind: "image",
src: t
@@ -78800,7 +78910,7 @@ function HPe(e) {
};
}
function Q7(e, t) {
- let n = (e, t = (e) => e.label || Nl(e.k)) => (e || []).map((e) => ({
+ let n = (e, t = (e) => e.label || Jl(e.k)) => (e || []).map((e) => ({
value: String(e.k),
label: t(e),
n: e.n ?? null
@@ -78808,23 +78918,23 @@ function Q7(e, t) {
return {
locations: (e.locations || []).map((e) => ({
value: e.k,
- label: Ln[e.k] || e.k,
+ label: Qn[e.k] || e.k,
n: e.n ?? null,
- dot: HPe(e.k),
+ dot: aFe(e.k),
...Z.sourceOffline(e.k) ? { offline: Z.OFFLINE_HINT } : {}
})),
regions: n(e.regions),
orientations: n(e.orientations),
years: n(e.years),
- creators: n(r),
+ creators: n(r, (e) => Qt("creator", e.k)),
tags: n(e.tags),
tech: n(e.tech),
- followTags: n(e.follow_tags, (e) => Nl(e.k)),
+ followTags: n(e.follow_tags, (e) => Jl(e.k)),
duration: !!e.stats?.duration
};
}
-async function UPe(e = !1) {
- if (e && (document.hidden || !fn(decodeURIComponent(location.pathname)) || n9.stageOpen() || n9.immerseOpen() || Jl || Kl.size || document.activeElement === L("#q"))) return !1;
+async function oFe(e = !1) {
+ if (e && (document.hidden || !Dn(decodeURIComponent(location.pathname)) || n9.stageOpen() || n9.immerseOpen() || lu || su.size || document.activeElement === L("#q"))) return !1;
if (!L("#stats").hidden) {
let e = decodeURIComponent(location.pathname), t = Q.routeMeta(e)?.route.refresh;
if (t === "skip") return;
@@ -78833,9 +78943,9 @@ async function UPe(e = !1) {
return;
}
let n = t === "reopen" ? e : "/stats";
- n === e ? Q.navigatePath(location.pathname + location.search + location.hash, !0, $V.navigation.location.state) : Q.navigatePath(n);
+ n === e ? Q.navigatePath(location.pathname + location.search + location.hash, !0, aH.navigation.location.state) : Q.navigatePath(n);
} else if (L("#index").hidden) {
- U.sort = "seed", U.dir = "", U.seed = C8.rollSeed(), yu(), k8(), T7({ refreshing: !0 });
+ U.sort = "seed", U.dir = "", U.seed = C8.rollSeed(), Nu(), k8(), T7({ refreshing: !0 });
try {
let e = Z7();
await null, await Promise.all([e, N7()]);
@@ -78854,71 +78964,74 @@ function $7() {
function e9(e) {
document.body.classList.toggle("censor", e), Z.settingsStore.notify();
}
-function WPe(e) {
- localStorage.setItem(Z.CENSOR_KEY, e ? "1" : "0"), e9(e), e && kl();
+function sFe(e) {
+ localStorage.setItem(Z.CENSOR_KEY, e ? "1" : "0"), e9(e), e && Wl();
}
-function GPe(e) {
+function cFe(e) {
localStorage.setItem("peach.high-contrast", String(e)), document.documentElement.classList.toggle("board-high-contrast", e), Z.settingsStore.notify();
}
function t9(e) {
- return lc(e, { drag: !0 });
+ return wc(e, { drag: !0 });
}
-function KPe() {
+function lFe() {
["#nrow", "#count"].forEach((e) => t9(L(e))), document.querySelectorAll(".tier,.srow").forEach(t9);
}
-function qPe() {
+function uFe() {
let e = new URLSearchParams(location.search).get("id");
return /^\d+$/.test(e || "") ? Number(e) : void 0;
}
-function JPe() {
+function dFe() {
Z.sourceOnline = {}, Z.sourceProblems = {}, Z.sourceOffline = (e) => Z.sourceOnline[e] === !1, Z.OFFLINE_HINT = "媒体目录无法访问,请检查目录、读取权限和网盘挂载状态", Z.OFFLINE_REASON = {
local: "无法读取媒体目录,请检查目录是否存在及读取权限。",
115: "无法读取 115 媒体目录,请检查目录权限及网盘挂载工具是否正常运行。",
pikpak: "无法读取 PikPak 媒体目录,请检查目录权限及网盘挂载工具是否正常运行。"
- }, Z.offlineReason = (e) => Z.sourceProblems[e] || Z.OFFLINE_REASON[e] || "无法读取这个来源的媒体目录,请检查目录权限及挂载状态。", Z.settingsStore = vA(), Z.appSettings = Z.settingsStore.value, Z.saveSettings = () => Z.settingsStore.save(), document.documentElement.style.setProperty("--hover-delay", `${Z.appSettings.hoverDelaySeconds}s`), Mo(Z.appSettings.uiSounds), Ro(), SA(), _se(), YA(), QA(), $A(), Z.catalogLoadWaiters = [], Z.nextCatalogLoad = () => new Promise((e) => Z.catalogLoadWaiters.push(e)), Z.handOff = (e) => (Z.catalogLoadWaiters.splice(0).forEach((t) => t(e)), e), Z.settingsEffects = {
- theme: () => SA(),
+ }, Z.offlineReason = (e) => Z.sourceProblems[e] || Z.OFFLINE_REASON[e] || "无法读取这个来源的媒体目录,请检查目录权限及挂载状态。", Z.settingsStore = CA(), Z.appSettings = Z.settingsStore.value, Jt(Z.appSettings.performerNameLanguage), Z.saveSettings = () => Z.settingsStore.save(), document.documentElement.style.setProperty("--hover-delay", `${Z.appSettings.hoverDelaySeconds}s`), qo(Z.appSettings.uiSounds), $o(), OA(), Ese(), $A(), nj(), rj(), Z.catalogLoadWaiters = [], Z.nextCatalogLoad = () => new Promise((e) => Z.catalogLoadWaiters.push(e)), Z.handOff = (e) => (Z.catalogLoadWaiters.splice(0).forEach((t) => t(e)), e), Z.settingsEffects = {
+ performerNameLanguage: () => {
+ Jt(Z.appSettings.performerNameLanguage), I5.syncPageTitle(location.href), X.barsRendered = "", N7();
+ },
+ theme: () => OA(),
uiSounds: () => {
- Mo(Z.appSettings.uiSounds), Z.appSettings.uiSounds && No("toggle-on");
+ qo(Z.appSettings.uiSounds), Z.appSettings.uiSounds && Jo("toggle-on");
},
- glowFrame: () => ZA(),
+ glowFrame: () => tj(),
glow: () => {
- ZA(), QA();
+ tj(), nj();
},
batchSize: () => {
location.pathname === "/" && R7();
},
defaultSort: () => {
- U.sort = Z.appSettings.defaultSort, U.dir = Xk(U.sort, Z.appSettings.defaultSort, Z.appSettings.defaultSortDirection), yu(), location.pathname === "/" && Z7();
+ U.sort = Z.appSettings.defaultSort, U.dir = rA(U.sort, Z.appSettings.defaultSort, Z.appSettings.defaultSortDirection), Nu(), location.pathname === "/" && Z7();
},
sortDirection: () => {
- U.dir = Xk(U.sort, Z.appSettings.defaultSort, Z.appSettings.defaultSortDirection), yu(), location.pathname === "/" && Z7();
+ U.dir = rA(U.sort, Z.appSettings.defaultSort, Z.appSettings.defaultSortDirection), Nu(), location.pathname === "/" && Z7();
},
hoverDelay: () => {
Z.appSettings.hoverDelaySeconds || document.querySelectorAll("[data-previewing],[data-longhover]").forEach((e) => {
- jl(e, "previewing", !1), jl(e, "longhover", !1);
+ Kl(e, "previewing", !1), Kl(e, "longhover", !1);
}), document.documentElement.style.setProperty("--hover-delay", `${Z.appSettings.hoverDelaySeconds}s`);
},
seekSeconds: () => Y7(),
groupCollapse: () => s7(),
- feedAutoScroll: () => yNe(),
+ feedAutoScroll: () => INe(),
feedLimit: () => $8(),
feedCompilations: () => $8(),
miniplayer: () => {
Z.appSettings.miniplayer || i8()?.closeMiniplayer();
},
javImage: () => {
- Ba(document, Z.appSettings.javImage), Y7(), document.querySelectorAll("img[data-jav-image].cover").forEach(cl), XPe();
+ to(document, Z.appSettings.javImage), Y7(), document.querySelectorAll("img[data-jav-image].cover").forEach(Cl), pFe();
},
- searchHistoryLimit: () => UV(L("#searchMenu"), { historyLimit: Z.appSettings.searchHistoryLimit })
+ searchHistoryLimit: () => YV(L("#searchMenu"), { historyLimit: Z.appSettings.searchHistoryLimit })
}, Z.syncGlassOptics = () => {}, Z.placeSidebarHead = () => {}, Z.SRCICON = {
- ...Object.fromEntries(Object.entries(Qo).map(([e, t]) => [e, t.startsWith("data:") ? `<img class="source-icon" src="${t}" alt="">` : R(t)])),
+ ...Object.fromEntries(Object.entries(ps).map(([e, t]) => [e, t.startsWith("data:") ? `<img class="source-icon" src="${t}" alt="">` : R(t)])),
online: R("rss")
}, Z.srcBadge = (e, t, n) => {
- let r = `${Ln[e] || e}${t === "metered" ? " · 计费" : ""}`;
+ let r = `${Qn[e] || e}${t === "metered" ? " · 计费" : ""}`;
return `<span class="${n || "src"} ${t === "metered" ? "metered" : "free"}" title="${z(r)}" aria-label="${z(r)}">` + (Z.SRCICON[e] || "") + "</span>";
- }, Z.emptyState = Ts;
+ }, Z.emptyState = Bs;
}
-function YPe() {
+function fFe() {
Z.CENSOR_KEY = "peach-censor", e9(localStorage.getItem(Z.CENSOR_KEY) === "1");
}
// src/application/media.js
@@ -78944,23 +79057,23 @@ function i9() {
return i8()?.exit() || Promise.resolve();
}
function a9(e = !1, t = !1, { miniplayer: n = !0, preserveQueueRequest: r = null } = {}) {
- Q.queueOpenRequest !== r && v9(), i8()?.dispose({ miniplayer: n }), vu({
+ Q.queueOpenRequest !== r && v9(), i8()?.dispose({ miniplayer: n }), W({
activeQueue: null,
pendingQueueRoute: null,
presentedItem: null
- }), t || vu({
+ }), t || W({
detailOriginAnchor: null,
detailOriginAbove: !1,
detailReturnNeedsRestore: !1
- }), d7(), e && Q.route(Ql || "/");
+ }), d7(), e && Q.route(pu || "/");
}
-function XPe() {
+function pFe() {
i8()?.repaintPoster();
}
function o9(e, t, n, r, i = null, a = {}) {
t = +t;
- let o = nu?.kind === e && (e === "playlist" ? nu.playlistId : nu.seedId) === t;
- r && !o && vu({ detailReturnPath: location.pathname + location.search }), r && wV();
+ let o = _u?.kind === e && (e === "playlist" ? _u.playlistId : _u.seedId) === t;
+ r && !o && W({ detailReturnPath: location.pathname + location.search }), r && AV();
let s = e === "playlist" ? {
kind: e,
playlistId: t,
@@ -78973,19 +79086,19 @@ function o9(e, t, n, r, i = null, a = {}) {
if (a.autoplay && (s.autoplay = !0), r) {
v9();
let e = Q.queueOpenRequest = {
- seq: $V.navigation.seq,
+ seq: aH.navigation.seq,
cancelled: !1
};
- Q.requestedQueue = () => l9(n == null ? null : +n, !1, s, i, !0, e), vu({ queueOpens: uu + 1 });
+ Q.requestedQueue = () => l9(n == null ? null : +n, !1, s, i, !0, e), W({ queueOpens: Tu + 1 });
} else return l9(n == null ? null : +n, !1, s, i, r);
}
-function ZPe(e, t = e, n = !0, r = null) {
+function mFe(e, t = e, n = !0, r = null) {
return o9("mix", e, t, n, r);
}
-function QPe(e, t = e, n = !0, r = null) {
+function hFe(e, t = e, n = !0, r = null) {
return o9("editions", e, t, n, r);
}
-function $Pe(e, t = e, n = !0, r = null) {
+function gFe(e, t = e, n = !0, r = null) {
return o9("parts", e, t, n, r);
}
function s9(e, t = null, n = !0) {
@@ -78997,23 +79110,23 @@ function c9() {
async function l9(e, t = !0, n = null, r = null, i = !1, a = null) {
if (a?.cancelled) return;
if (a || v9(), t && !n) {
- vu({ detailReturnPath: location.pathname + location.search }), y9("/assets/" + +e, "item", () => l9(e, !1, null, r));
+ W({ detailReturnPath: location.pathname + location.search }), y9("/assets/" + +e, "item", () => l9(e, !1, null, r));
return;
}
- kl(), e = e == null ? null : +e;
- let o = r?.isConnected ? r : $l?.isConnected ? $l : null, s = r?.isConnected ? r.getBoundingClientRect().top + r.getBoundingClientRect().height / 2 > window.innerHeight / 2 : eu, c = c9(), l = tu || !t && !c, u = Wl.type === "item" ? Gl : Y.cloneBarsContext(s5());
- t ? vu({ detailReturnPath: location.pathname + location.search }) : i || vu({ detailReturnPath: EV() || Ql }), t && wV(), i8()?.showing() !== "item" && a9(!1, !0, {
+ Wl(), e = e == null ? null : +e;
+ let o = r?.isConnected ? r : mu?.isConnected ? mu : null, s = r?.isConnected ? r.getBoundingClientRect().top + r.getBoundingClientRect().height / 2 > window.innerHeight / 2 : hu, c = c9(), l = gu || !t && !c, u = au.type === "item" ? ou : Y.cloneBarsContext(s5());
+ t ? W({ detailReturnPath: location.pathname + location.search }) : i || W({ detailReturnPath: MV() || pu }), t && AV(), i8()?.showing() !== "item" && a9(!1, !0, {
miniplayer: !1,
preserveQueueRequest: a
- }), vu({
+ }), W({
detailOriginAnchor: o,
detailOriginAbove: s,
detailReturnNeedsRestore: l
- }), vu({ detailReturnBarsContext: u }), vu({ activeQueue: n && {
+ }), W({ detailReturnBarsContext: u }), W({ activeQueue: n && {
kind: n.kind,
seedId: n.seedId,
playlistId: n.playlistId
- } }), vu({ pendingQueueRoute: n && i ? `${n.kind}=${n.kind === "playlist" ? n.playlistId : n.seedId}` : null }), t && !n && Q.route("/assets/" + e, !1, DV("item"));
+ } }), W({ pendingQueueRoute: n && i ? `${n.kind}=${n.kind === "playlist" ? n.playlistId : n.seedId}` : null }), t && !n && Q.route("/assets/" + e, !1, NV("item"));
let d = await r8(n9.stageHost);
if (a?.cancelled) return;
let f = a ? {
@@ -79037,32 +79150,32 @@ async function l9(e, t = !0, n = null, r = null, i = !1, a = null) {
actions: X.gridActions
},
layout: K7(),
- selectMode: Jl,
- selected: new Set(Kl),
+ selectMode: lu,
+ selected: new Set(su),
seekSeconds: Z.appSettings.seekSeconds,
resume: t || e == null ? null : r9()
}), d7();
}
async function u9() {
- let e = Y.cloneBarsContext(Gl), t = Ql || "/", n = tu;
- await i9(), a9(!1, !1, { miniplayer: !1 }), vu({ detailReturnBarsContext: null }), TV(), vu({ barsContext: e || {
+ let e = Y.cloneBarsContext(ou), t = pu || "/", n = gu;
+ await i9(), a9(!1, !1, { miniplayer: !1 }), W({ detailReturnBarsContext: null }), jV(), W({ barsContext: e || {
type: "home",
filters: U
- } }), n && Q.managedPagePath(new URL(t, location.href).pathname) ? Q.navigatePath(t) : (Q.route(t), n ? vu({ pageOpens: lu + 1 }) : (N7(), location.pathname === "/playlists" && vu({ pageOpens: lu + 1 })));
+ } }), n && Q.managedPagePath(new URL(t, location.href).pathname) ? Q.navigatePath(t) : (Q.route(t), n ? W({ pageOpens: wu + 1 }) : (N7(), location.pathname === "/playlists" && W({ pageOpens: wu + 1 })));
}
async function d9(e, t = !0) {
if (t) {
- vu({ detailReturnPath: location.pathname + location.search }), y9("/works/" + encodeURIComponent(e), "jav", () => d9(e, !1));
+ W({ detailReturnPath: location.pathname + location.search }), y9("/works/" + encodeURIComponent(e), "jav", () => d9(e, !1));
return;
}
- let n = $V.navigation.seq, r = Y.cloneBarsContext(s5()), i = !c9(), a = EV() || (i ? "/jav?tab=discover" : Ql) || "/jav?tab=discover";
- i8()?.showing() !== "jav" && a9(!1, !0, { miniplayer: !1 }), vu({
+ let n = aH.navigation.seq, r = Y.cloneBarsContext(s5()), i = !c9(), a = MV() || (i ? "/jav?tab=discover" : pu) || "/jav?tab=discover";
+ i8()?.showing() !== "jav" && a9(!1, !0, { miniplayer: !1 }), W({
detailReturnPath: a,
detailReturnBarsContext: r,
detailReturnNeedsRestore: i
- }), kl();
+ }), Wl();
let [o, s] = await Promise.all([r8(n9.stageHost), B("/healthz")]);
- $V.navigation.seq === n && (await o.open({
+ aH.navigation.seq === n && (await o.open({
kind: "jav",
code: e,
readOnly: !!s.ledger_read_only,
@@ -79070,9 +79183,9 @@ async function d9(e, t = !0) {
close: () => void u9(),
navigate: (e) => Q.navigatePath(e),
canonicalCode: (t) => {
- $V.navigation.seq === n && t && t !== e && eH("/works/" + encodeURIComponent(t) + location.search + location.hash, {
+ aH.navigation.seq === n && t && t !== e && oH("/works/" + encodeURIComponent(t) + location.search + location.hash, {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
});
},
openTag: (e) => {
@@ -79088,9 +79201,9 @@ async function d9(e, t = !0) {
}), d7());
}
async function f9(e = null, t = !0) {
- t ? (n9.requestedImmerseId = e, Q.route("/immerse")) : (i8()?.closeMiniplayer(), await (await FMe(n9.immerseHost)).open(e));
+ t ? (n9.requestedImmerseId = e, Q.route("/immerse")) : (i8()?.closeMiniplayer(), await (await QMe(n9.immerseHost)).open(e));
}
-function eFe() {
+function _Fe() {
n9.total = 0, n9.facets = null, n9.stageHost = {
player: {
settings: () => Z.appSettings,
@@ -79106,14 +79219,14 @@ function eFe() {
openItem: (e) => void l9(e)
}, n9.stageOpen = () => !!i8()?.isOpen();
}
-function tFe() {
+function vFe() {
n9.itemDetailHelpers = {
badgeHtml: (e, t, n) => Z.srcBadge(e, t, n),
- titleHtml: (e) => _F(e),
- displayName: (e) => gF(e),
+ titleHtml: (e) => wF(e),
+ displayName: (e) => CF(e),
javImage: () => Z.appSettings.javImage,
- tagLabel: (e) => Nl(e),
- isDurationTag: (e) => Bn.has(e),
+ tagLabel: (e) => Jl(e),
+ isDurationTag: (e) => tr.has(e),
tagCandidates: () => n9.facets && n9.facets.tags || [],
sourceOffline: (e) => Z.sourceOffline(e),
offlineReason: (e) => Z.offlineReason(e),
@@ -79123,30 +79236,30 @@ function tFe() {
}),
mixRelated: (e) => v7(e),
wireDrag: (e) => t9(e),
- wireDragReorder: (e, t) => Rc(e, t)
+ wireDragReorder: (e, t) => $c(e, t)
}, n9.itemDetailActions = {
close: () => u9(),
present: (e) => {
- vu({ presentedItem: e });
- let t = Gl;
- vu({ barsContext: {
+ W({ presentedItem: e });
+ let t = ou;
+ W({ barsContext: {
type: "item",
id: e.id,
filters: t?.type === "entity" ? { ...t.filters } : Y.emptyEntityFilters()
- } }), ru && (Q.queueOpenRequest = null, Q.route(`/assets/${e.id}?${ru}`, !1, DV("item")), vu({ pendingQueueRoute: null })), N7();
+ } }), vu && (Q.queueOpenRequest = null, Q.route(`/assets/${e.id}?${vu}`, !1, NV("item")), W({ pendingQueueRoute: null })), N7();
},
redirect: (e) => {
- let t = !!ru;
- e.kind === "follow" ? (Q.queueOpenRequest = null, vu({
+ let t = !!vu;
+ e.kind === "follow" ? (Q.queueOpenRequest = null, W({
pendingQueueRoute: null,
- followDetailReturnPath: Ql || "/"
- }), Q.route(`/posts/${e.id}`, !t, DV("follow")), O9(e.id, !1, null, !0)) : e.kind === "item" ? l9(e.id, !0) : e.kind === "playlists" ? t || location.pathname !== "/playlists" ? x9("/playlists") : S5() : a9(!1);
+ followDetailReturnPath: pu || "/"
+ }), Q.route(`/posts/${e.id}`, !t, NV("follow")), O9(e.id, !1, null, !0)) : e.kind === "item" ? l9(e.id, !0) : e.kind === "playlists" ? t || location.pathname !== "/playlists" ? x9("/playlists") : S5() : a9(!1);
},
openQueueItem: (e, t, n = !0) => void o9(e.kind, e.kind === "playlist" ? e.playlistId : e.seedId, t, n, null, { autoplay: e.autoplay }),
reopen: () => {
- let e = iu;
+ let e = yu;
if (!e) return;
- let t = nu;
+ let t = _u;
t ? o9(t.kind, t.kind === "playlist" ? t.playlistId : t.seedId, e.id, !1) : l9(e.id, !1);
},
checkSource: async (e) => (await X7())[e] !== !1,
@@ -79164,14 +79277,14 @@ function tFe() {
behavior: "smooth"
});
},
- addToPlaylist: (e) => NNe(e),
- saveMix: (e) => MNe(e),
+ addToPlaylist: (e) => XNe(e),
+ saveMix: (e) => YNe(e),
editPlaylist: () => x9("/playlists"),
openPlaylists: () => x9("/playlists"),
reveal: (e) => m5(e),
- sync: (e) => wNe(e),
+ sync: (e) => VNe(e),
trashChanged: async (e, t) => {
- U.state === "ads" && (t || e === "trash") && (t || (TV(), a9(!0, !1, { miniplayer: !1 })), await R7());
+ U.state === "ads" && (t || e === "trash") && (t || (jV(), a9(!0, !1, { miniplayer: !1 })), await R7());
},
toast: (e, { undo: t } = {}) => C8.actionReceipt(e, { undo: t }),
failure: (e, t) => C8.actionFailure(e, t)
@@ -79179,7 +79292,7 @@ function tFe() {
filters: () => U,
seekSeconds: () => Z.appSettings.seekSeconds,
sourceOffline: (e) => Z.sourceOffline(e),
- displayName: (e) => gF(e),
+ displayName: (e) => CF(e),
route: (e) => Q.route("/immerse?id=" + e, !0),
closed: () => _7(),
openItem: (e) => void l9(e),
@@ -79200,8 +79313,8 @@ var p9 = {
readPostSetupTutorialDone: void 0,
openTutorialTarget: void 0
};
-async function nFe() {
- il(), await p9.writePostSetupTutorialDone(!1), await m9();
+async function yFe() {
+ yl(), await p9.writePostSetupTutorialDone(!1), await m9();
}
async function m9() {
let e = L("#postSetupTutorial");
@@ -79209,37 +79322,37 @@ async function m9() {
let t = () => {
e.hidden = !0, e.innerHTML = "", delete e.dataset.tutorialSignature, e.removeAttribute("aria-busy");
};
- if (p9.postSetupTutorialNeedsReopen && (p9.postSetupTutorialNeedsReopen = !1, await p9.writePostSetupTutorialDone(!1).catch(() => {})), Jc() !== "pending" || await p9.readPostSetupTutorialDone()) {
+ if (p9.postSetupTutorialNeedsReopen && (p9.postSetupTutorialNeedsReopen = !1, await p9.writePostSetupTutorialDone(!1).catch(() => {})), ll() !== "pending" || await p9.readPostSetupTutorialDone()) {
t();
return;
}
- let n = nl();
+ let n = _l();
e.hidden = !1, e.setAttribute("aria-busy", "true"), e.firstElementChild || (e.innerHTML = `<article class="post-setup-notification post-setup-loading">${R("compass")}<p>正在检查安装进度…</p></article>`);
try {
let r = await p9.postSetupTutorialTasks();
- if (!rl(n)) return;
- let i = new Set(r.map((e) => e.key)), a = new Set([...Qc()].filter((e) => i.has(e)));
- $c(a);
+ if (!vl(n)) return;
+ let i = new Set(r.map((e) => e.key)), a = new Set([...pl()].filter((e) => i.has(e)));
+ ml(a);
let o = r.filter((e) => !a.has(e.key)), s = o.filter((e) => !e.done);
if (!s.length) {
- Yc("complete"), t(), await p9.writePostSetupTutorialDone(!0).catch(() => {});
+ ul("complete"), t(), await p9.writePostSetupTutorialDone(!0).catch(() => {});
return;
}
- let c = el(o);
+ let c = hl(o);
if (e.dataset.tutorialSignature === c) {
e.removeAttribute("aria-busy");
return;
}
e.innerHTML = p9.postSetupTutorialHtml(o, a.size, r.length), e.dataset.tutorialSignature = c, e.removeAttribute("aria-busy");
let l = s[0], u = e.querySelector("[data-tutorial-collapse]"), d = e.querySelector(".post-setup-collapse-body");
- d.inert = Xc(), d.classList.toggle("ui-fcollapse-settled", !d.inert), J.handler(u, "onclick", () => {
+ d.inert = dl(), d.classList.toggle("ui-fcollapse-settled", !d.inert), J.handler(u, "onclick", () => {
let t = e.querySelector(".post-setup-notification"), n = t.dataset.collapsed !== "true";
- t.dataset.collapsed = String(n), Zc(n), u.setAttribute("aria-expanded", String(!n)), u.setAttribute("aria-label", n ? "展开安装教程" : "折叠安装教程"), So(d, !n);
+ t.dataset.collapsed = String(n), fl(n), u.setAttribute("aria-expanded", String(!n)), u.setAttribute("aria-label", n ? "展开安装教程" : "折叠安装教程"), Lo(d, !n);
}), e.querySelectorAll("[data-tutorial-skip]").forEach((e) => J.handler(e, "onclick", () => {
- let t = Qc(), n = e.dataset.tutorialSkip;
- t.add(n), $c(t), C8.actionReceipt(`已跳过「${e.dataset.tutorialLabel}」`, { undo: async () => {
- let e = Qc();
- e.delete(n), $c(e), Yc("pending"), await m9();
+ let t = pl(), n = e.dataset.tutorialSkip;
+ t.add(n), ml(t), C8.actionReceipt(`已跳过「${e.dataset.tutorialLabel}」`, { undo: async () => {
+ let e = pl();
+ e.delete(n), ml(e), ul("pending"), await m9();
} }), m9();
}));
let f = new Map(o.map((e) => [e.key, e]));
@@ -79248,30 +79361,30 @@ async function m9() {
!n || t.metaKey || t.ctrlKey || t.shiftKey || t.button || (t.preventDefault(), p9.openTutorialTarget(n));
})), J.handler(e.querySelector("[data-tutorial-action]"), "onclick", () => p9.openTutorialTarget(l));
} catch {
- if (!rl(n)) return;
- e.innerHTML = al(R("alert")), e.removeAttribute("aria-busy"), J.handler(e.querySelector("[data-tutorial-retry]"), "onclick", () => {
+ if (!vl(n)) return;
+ e.innerHTML = bl(R("alert")), e.removeAttribute("aria-busy"), J.handler(e.querySelector("[data-tutorial-retry]"), "onclick", () => {
delete e.dataset.tutorialSignature, e.innerHTML = "", m9();
}), J.handler(e.querySelector("[data-tutorial-dismiss]"), "onclick", t);
}
}
-function rFe() {
- if (vu({ cameFromSetup: new URLSearchParams(location.search).get("onboarding") === "1" }), p9.postSetupTutorialDone = null, p9.postSetupTutorialNeedsReopen = !1, cu) {
- Yc("pending"), p9.postSetupTutorialDone = !1, p9.postSetupTutorialNeedsReopen = !0;
+function bFe() {
+ if (W({ cameFromSetup: new URLSearchParams(location.search).get("onboarding") === "1" }), p9.postSetupTutorialDone = null, p9.postSetupTutorialNeedsReopen = !1, Cu) {
+ ul("pending"), p9.postSetupTutorialDone = !1, p9.postSetupTutorialNeedsReopen = !0;
let e = new URL(location.href);
- e.searchParams.delete("onboarding"), eH(e, {
+ e.searchParams.delete("onboarding"), oH(e, {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
});
}
{
let e = new URL(location.href), t = e.searchParams.get("agentation");
- localStorage.removeItem("peach.agentation"), t !== null && (e.searchParams.delete("agentation"), eH(e, {
+ localStorage.removeItem("peach.agentation"), t !== null && (e.searchParams.delete("agentation"), oH(e, {
replace: !0,
- state: $V.navigation.location.state
+ state: aH.navigation.location.state
})), t === "on" && import("/dev/agentation.js").catch(() => {});
}
p9.postSetupTutorialTasks = async () => {
- let { library: e, scraping: t, taste: n, follow: r, credentials: i, review: a } = await on("/api/post-setup-tutorial"), o = (t.sources || []).filter((e) => e.accepts_cookie).filter((e) => e.cookie_saved), s = (r.sources || []).filter((e) => e.enabled !== !1), c = new Map((i.providers || []).map((e) => [e.provider, e])), l = [...new Set(s.map((e) => e.provider))].map((e) => c.get(e)).filter((e) => e?.requirement === "required"), u = Number(e.total || 0) > 0, d = s.length > 0, f = d && l.every((e) => e.present && !e.missing?.length), p = Object.values(a.counts || {}).reduce((e, t) => e + (Number(t) || 0), 0);
+ let { library: e, scraping: t, taste: n, follow: r, credentials: i, review: a } = await xn("/api/post-setup-tutorial"), o = (t.sources || []).filter((e) => e.accepts_cookie).filter((e) => e.cookie_saved), s = (r.sources || []).filter((e) => e.enabled !== !1), c = new Map((i.providers || []).map((e) => [e.provider, e])), l = [...new Set(s.map((e) => e.provider))].map((e) => c.get(e)).filter((e) => e?.requirement === "required"), u = Number(e.total || 0) > 0, d = s.length > 0, f = d && l.every((e) => e.present && !e.missing?.length), p = Object.values(a.counts || {}).reduce((e, t) => e + (Number(t) || 0), 0);
return [
{
key: "library",
@@ -79324,7 +79437,7 @@ function rFe() {
}
];
}, p9.postSetupTutorialHtml = (e, t, n) => {
- let r = [...e].sort((e, t) => Number(e.done) - Number(t.done)), i = e.find((e) => !e.done), a = e.filter((e) => e.done).length + t, o = Xc(), s = r.map((e) => `<li class="post-setup-task" data-state="${e.done ? "checked" : "unchecked"}">
+ let r = [...e].sort((e, t) => Number(e.done) - Number(t.done)), i = e.find((e) => !e.done), a = e.filter((e) => e.done).length + t, o = dl(), s = r.map((e) => `<li class="post-setup-task" data-state="${e.done ? "checked" : "unchecked"}">
<a href="${e.href}" data-tutorial-task="${e.key}">
<span class="post-setup-check" aria-hidden="true">${e.done ? R("check") : R(e.icon)}</span>
<span><b>${e.label}</b><small>${e.description}</small></span>
@@ -79345,19 +79458,19 @@ function rFe() {
</div>
</article>`;
}, p9.writePostSetupTutorialDone = async (e) => {
- p9.postSetupTutorialDone = e, await on("/api/settings", {
+ p9.postSetupTutorialDone = e, await xn("/api/settings", {
method: "POST",
body: JSON.stringify({ postSetupTutorialDone: e })
});
}, p9.readPostSetupTutorialDone = async () => {
if (p9.postSetupTutorialDone === null) try {
- p9.postSetupTutorialDone = (await on("/api/settings")).postSetupTutorialDone === !0;
+ p9.postSetupTutorialDone = (await xn("/api/settings")).postSetupTutorialDone === !0;
} catch {
p9.postSetupTutorialDone = !1;
}
return p9.postSetupTutorialDone;
}, p9.openTutorialTarget = (e) => {
- e.setupEntry && vu({ cameFromSetup: !0 }), Q.navigatePath(e.href);
+ e.setupEntry && W({ cameFromSetup: !0 }), Q.navigatePath(e.href);
};
}
// src/application/navigation.js
@@ -79399,29 +79512,29 @@ function _9() {
g9(), h9(), u7();
}
function v9() {
- Q.queueOpenRequest && (Q.queueOpenRequest.cancelled = !0), Q.queueOpenRequest = null, Q.requestedQueue = null, vu({ pendingQueueRoute: null });
+ Q.queueOpenRequest && (Q.queueOpenRequest.cancelled = !0), Q.queueOpenRequest = null, Q.requestedQueue = null, W({ pendingQueueRoute: null });
}
function y9(e, t, n) {
- v9(), wV(), Q.requestedOverlay = {
+ v9(), AV(), Q.requestedOverlay = {
path: e,
open: n
- }, Q.route(e, !1, DV(t));
+ }, Q.route(e, !1, NV(t));
}
function b9() {
- Q.surfaceEpoch++, X.barsRequestSeq++, I5.syncPageTitle(location.href), g9(), TV(), m9();
+ Q.surfaceEpoch++, X.barsRequestSeq++, I5.syncPageTitle(location.href), g9(), jV(), m9();
}
function x9(e) {
- Q.route(e), vu({ pageOpens: lu + 1 });
+ Q.route(e), W({ pageOpens: wu + 1 });
}
-function iFe() {
+function xFe() {
Q.routeMeta = (e) => {
- let t = AV(e);
+ let t = IV(e);
return t ? { route: t } : null;
- }, Q.routePathOf = (e, t) => Object.keys(kV).find((n) => kV[n][e] === t), Q.catalogPage = (e) => fn(e) || e === "/trash", Q.managedPagePath = (e) => {
- let t = AV(e);
- return !!t && t.reload !== "reopen" && !Q.catalogPage(e) && !bV(e) && e !== "/immerse";
+ }, Q.routePathOf = (e, t) => Object.keys(FV).find((n) => FV[n][e] === t), Q.catalogPage = (e) => Dn(e) || e === "/trash", Q.managedPagePath = (e) => {
+ let t = IV(e);
+ return !!t && t.reload !== "reopen" && !Q.catalogPage(e) && !EV(e) && e !== "/immerse";
}, Q.openRoutePath = (e) => {
- e === "/immerse" ? f9(qPe()) : e === "/follow" ? D9() : e === "/playlists" || Q.catalogPage(e) ? x9(e) : Q.managedPagePath(e) ? Q.navigatePath(e === "/subscriptions" ? ZNe() : e) : (k5(!1, !0), x9(N5({
+ e === "/immerse" ? f9(uFe()) : e === "/follow" ? D9() : e === "/playlists" || Q.catalogPage(e) ? x9(e) : Q.managedPagePath(e) ? Q.navigatePath(e === "/subscriptions" ? mPe() : e) : (k5(!1, !0), x9(N5({
kind: e.slice(1),
q: "",
scope: "local",
@@ -79430,34 +79543,34 @@ function iFe() {
})));
};
}
-function aFe() {
+function SFe() {
Q.surfaceEpoch = 0, Q.surfacePath = () => decodeURIComponent(location.pathname), Q.surfaceRequests = null, Q.surfaceToken = (e) => ({
epoch: Q.surfaceEpoch,
path: e,
signal: Q.surfaceRequests?.signal
- }), Q.surfaceCurrent = (e) => e.epoch === Q.surfaceEpoch && Q.surfacePath() === e.path, Q.claimSurface = (e) => (Z8(e) || Q8(), WV(L("#stats"), L("#index")), !fn(e) && e !== "/trash" && B7(), Q.surfaceRequests?.abort(), Q.surfaceRequests = new AbortController(), Q.surfaceEpoch++, Q.surfaceToken(e)), Q.route = (e, t = !1, n) => {
- Q.surfaceEpoch++, X.barsRequestSeq++, eH(e, {
+ }), Q.surfaceCurrent = (e) => e.epoch === Q.surfaceEpoch && Q.surfacePath() === e.path, Q.claimSurface = (e) => (Z8(e) || Q8(), XV(L("#stats"), L("#index")), !Dn(e) && e !== "/trash" && B7(), Q.surfaceRequests?.abort(), Q.surfaceRequests = new AbortController(), Q.surfaceEpoch++, Q.surfaceToken(e)), Q.route = (e, t = !1, n) => {
+ Q.surfaceEpoch++, X.barsRequestSeq++, oH(e, {
replace: t,
state: n
}), I5.syncPageTitle(e), queueMicrotask(() => {
u7(), $5(), g9(), m9();
});
}, Q.navigatePath = (e, t = !1, n) => {
- t ? $V.replace(e, n) : $V.push(e, n), queueMicrotask(() => {
+ t ? aH.replace(e, n) : aH.push(e, n), queueMicrotask(() => {
u7(), $5();
});
}, Q.requestedOverlay = null, Q.requestedQueue = null, Q.queueOpenRequest = null, Q.initialOverlayOpened = !1;
}
// src/jobs.ts
-function oFe(e, t, n) {
+function CFe(e, t, n) {
if (!Number.isFinite(n) || n <= 0) return "";
let r = Math.max(0, Math.min(n, Number.isFinite(t) ? t : 0)), i = r / n * 100;
return `<div class="ui-board-job-progress" role="progressbar" aria-label="${z(e)}" aria-valuemin="0" aria-valuemax="${n}" aria-valuenow="${r}"><svg width="36" height="36" viewBox="0 0 36 36" aria-hidden="true"><circle class="ui-board-job-track" cx="18" cy="18" r="15"/><circle class="ui-board-job-fill" cx="18" cy="18" r="15" pathLength="100" stroke-dasharray="${i} ${100 - i}" transform="rotate(-90 18 18)"/></svg><span>${z(e)}<small>${Math.round(i)}%</small></span></div>`;
}
-function sFe(e, t = 0, n = 0) {
- return n > 0 ? oFe(e, t, n) : Cs(e);
+function wFe(e, t = 0, n = 0) {
+ return n > 0 ? CFe(e, t, n) : Rs(e);
}
-async function cFe(e) {
+async function TFe(e) {
let t = e.pause || ((e) => new Promise((t) => setTimeout(t, e))), n = 0;
for (; e.active();) {
let r;
@@ -79472,14 +79585,14 @@ async function cFe(e) {
await t(2e3);
}
}
-function lFe(e) {
- let t = e.note || ((e) => bs(e, {
+function EFe(e) {
+ let t = e.note || ((e) => Fs(e, {
label: "任务状态",
variant: "error"
- })), n = e.loading || Cs, r = e.progress || ((e, t, n) => sFe(n || `已处理 ${e} / ${t}`, e, t)), i = e.container || ((e) => `<section class="followtask" data-geist-fieldset aria-label="任务进度"><div class="geist-fieldset-content">${e}</div></section>`), a = document.createElement("div");
+ })), n = e.loading || Rs, r = e.progress || ((e, t, n) => wFe(n || `已处理 ${e} / ${t}`, e, t)), i = e.container || ((e) => `<section class="followtask" data-geist-fieldset aria-label="任务进度"><div class="geist-fieldset-content">${e}</div></section>`), a = document.createElement("div");
e.host.hidden = !0, a.dataset.followJob = "", a.setAttribute("aria-live", "polite"), e.host.prepend(a);
let o = e.storageKey || "peach-follow-job", s = sessionStorage.getItem(o) || void 0, c = !1;
- cFe({
+ TFe({
read: e.read,
active: () => !c && e.active() && a.isConnected,
keepWatching: e.watchIdle !== !1,
@@ -79528,9 +79641,9 @@ var $ = {
FOLLOW_MANAGE_TABS: void 0,
followSidebarFilters: void 0
};
-function uFe(e) {
+function DFe(e) {
let t = (e.results || []).filter((e) => !e.ok).length;
- C8.toast({ text: Ci(e) }, {
+ C8.toast({ text: Ri(e) }, {
warn: !!t,
timeout: t ? 8e3 : 6e3,
sound: t ? "warning" : "success",
@@ -79541,9 +79654,9 @@ function uFe(e) {
});
}
function S9() {
- return ua(C9());
+ return Ta(C9());
}
-function dFe() {
+function OFe() {
return $.controller.read();
}
function C9() {
@@ -79564,17 +79677,17 @@ function C9() {
function w9(e) {
$.followFilter = e.status, $.followMediaView = e.media, $.followAuthors = new Set(e.author ? [e.author] : []), $.followProviders = new Set(e.provider ? [e.provider] : []), $.followWorks = new Set(e.work ? [e.work] : []), $.followTags = new Set(e.tags), $.followDurMin = e.durMin || 0, $.followDurMax = e.durMax || 0, $.followSort = e.sort, $.followDir = e.dir, $.followSeed = e.seed;
}
-function fFe() {
- let e = RV(L("#stats"));
+function kFe() {
+ let e = WV(L("#stats"));
return e && e.path === "/follow" && e.host.isConnected ? e : null;
}
function T9() {
- return !!fFe();
+ return !!kFe();
}
function E9(e) {
- T9() && UV(L("#stats"), e);
+ T9() && YV(L("#stats"), e);
}
-function pFe(e, t = {}) {
+function AFe(e, t = {}) {
return $.controller.route(e, t);
}
function D9(e = !1) {
@@ -79582,12 +79695,12 @@ function D9(e = !1) {
}
async function O9(e, t = !0, n = null, r = !1) {
if (t) {
- !location.pathname.startsWith("/posts/") && !r && vu({ followDetailReturnPath: location.pathname + location.search }), y9(`/posts/${+e}`, "follow", () => O9(e, !1, n, r));
+ !location.pathname.startsWith("/posts/") && !r && W({ followDetailReturnPath: location.pathname + location.search }), y9(`/posts/${+e}`, "follow", () => O9(e, !1, n, r));
return;
}
- kl(), e = +e;
+ Wl(), e = +e;
let i = !location.pathname.startsWith("/posts/");
- t && i && !r && vu({ followDetailReturnPath: location.pathname + location.search }), !t && !r && vu({ followDetailReturnPath: EV() || "/follow" }), t && wV(), i8()?.showing() !== "follow" && a9(!1, !1, { miniplayer: !1 }), t && Q.route(`/posts/${e}`, !1, DV("follow")), await (await r8(n9.stageHost)).open({
+ t && i && !r && W({ followDetailReturnPath: location.pathname + location.search }), !t && !r && W({ followDetailReturnPath: MV() || "/follow" }), t && AV(), i8()?.showing() !== "follow" && a9(!1, !1, { miniplayer: !1 }), t && Q.route(`/posts/${e}`, !1, NV("follow")), await (await r8(n9.stageHost)).open({
kind: "follow",
id: e,
mediaIndex: n,
@@ -79598,78 +79711,78 @@ async function O9(e, t = !0, n = null, r = !1) {
resume: t ? null : r9()
}), d7();
}
-async function mFe() {
- await i9(), a9(!1, !1, { miniplayer: !1 }), TV(), Q.route(au || "/follow"), !(Y.entityPageView && Y.entityPageCurrent() && !L("#index").hidden) && (location.pathname === "/follow" && T9() ? (dFe(), E9({ view: C9() })) : vu({ pageOpens: lu + 1 }));
+async function jFe() {
+ await i9(), a9(!1, !1, { miniplayer: !1 }), jV(), Q.route(bu || "/follow"), !(Y.entityPageView && Y.entityPageCurrent() && !L("#index").hidden) && (location.pathname === "/follow" && T9() ? (OFe(), E9({ view: C9() })) : W({ pageOpens: wu + 1 }));
}
-function hFe(e) {
+function MFe(e) {
let t = document.createElement("div");
- return t.className = "peach-react", Ls(e, () => {
+ return t.className = "peach-react", Qs(e, () => {
e.textContent = "", e.append(t);
}), t;
}
-function gFe() {
- $.followFeedHelpers = Fl({
+function NFe() {
+ $.followFeedHelpers = Xl({
wireDrag: (e) => {
e && t9(e);
},
wireScroller: (e) => {
- e && lc(e);
+ e && wc(e);
},
listSkeletonHtml: (e) => $.followContentSkeletonHtml(e),
- jobProgress: lFe
+ jobProgress: EFe
}), $.followFeedActions = {
loaded: (e) => G5(e),
openDetail: (e) => O9(e),
- openAuthor: (e) => Q.navigatePath(hn("creator", e)),
- toggleSelection: (e, t) => zNe(e, t),
+ openAuthor: (e) => Q.navigatePath(An("creator", e)),
+ toggleSelection: (e, t) => nPe(e, t),
setImagesOnly: (e) => {
Z.appSettings.followImagesOnly = !!e, Z.saveSettings(), d5();
},
setPhotoLayout: (e) => {
- zA(e), d5();
+ GA(e), d5();
},
- canFlip: () => !Jl && !$7() && !window.__scrolling && !X.reduceMotion(),
+ canFlip: () => !lu && !$7() && !window.__scrolling && !X.reduceMotion(),
toast: (e, { undo: t } = {}) => C8.actionReceipt(e, { undo: t }),
failure: (e, t) => C8.actionFailure(e, t),
- checkReport: (e) => uFe(e)
+ checkReport: (e) => DFe(e)
}, $.followFeedShell = {
skeleton: () => $.followSkeletonHtml("正在读取关注内容"),
ground: () => {
- i8()?.showing() !== "follow" && (kl(), a9(!1), U5(), !T9() && (Q.claimSurface(Q.surfacePath()), H5({ manage: !1 }), L("#stats").querySelector(".peach-react") && WV(L("#stats")), L("#stats").replaceChildren()));
+ i8()?.showing() !== "follow" && (Wl(), a9(!1), U5(), !T9() && (Q.claimSurface(Q.surfacePath()), H5({ manage: !1 }), L("#stats").querySelector(".peach-react") && XV(L("#stats")), L("#stats").replaceChildren()));
}
- }, $.followDetailActions = Ul({
+ }, $.followDetailActions = iu({
view: C9,
adoptView: w9,
- rememberReturn: (e) => vu({ followDetailReturnPath: e }),
- close: () => void mFe(),
+ rememberReturn: (e) => W({ followDetailReturnPath: e }),
+ close: () => void jFe(),
open: (e, t, n) => void O9(e, !0, t, n),
drawer: G5,
- openAuthor: (e) => Q.navigatePath(hn("creator", e))
+ openAuthor: (e) => Q.navigatePath(An("creator", e))
}, {
toast: (e, { undo: t } = {}) => C8.actionReceipt(e, { undo: t }),
failure: C8.actionFailure
});
}
-function _Fe() {
- $.controller = pa({
+function PFe() {
+ $.controller = Oa({
location: () => location,
view: C9,
adoptView: w9,
session: () => ({
- discoverySeed: fu,
- revision: pu,
- scrollY: mu
+ discoverySeed: Du,
+ revision: Ou,
+ scrollY: ku
}),
- writeSession: (e) => vu({
+ writeSession: (e) => W({
...e.discoverySeed === void 0 ? {} : { followDiscoverySeed: e.discoverySeed },
...e.revision === void 0 ? {} : { followRevision: e.revision },
...e.scrollY === void 0 ? {} : { followScrollY: e.scrollY }
}),
preferences: () => ({
- selectMode: Jl,
- selected: ql,
- photoSize: NA(),
- photoLayout: PA(),
+ selectMode: lu,
+ selected: cu,
+ photoSize: zA(),
+ photoLayout: BA(),
imagesOnly: !!Z.appSettings.followImagesOnly
}),
live: T9,
@@ -79679,7 +79792,7 @@ function _Fe() {
rollSeed: () => Number(C8.rollSeed()),
enterSeed: () => Math.floor(Math.random() * 4294967295),
revealFeed: () => {
- kl(), U5(), H5({ manage: !1 });
+ Wl(), U5(), H5({ manage: !1 });
},
syncPhotoWalls: d5,
scrollTop: () => window.scrollTo({
@@ -79689,8 +79802,8 @@ function _Fe() {
}, $.followFeedHelpers, $.followFeedActions), $.followFeedActions = $.controller.actions, $.followFeedProps = $.controller.props, $.followFeedShell.refresh = $.controller.refresh, $.followFeedShell.props = $.controller.props;
}
// src/application/lifecycle.js
-function vFe() {
- tCe(), jc(document), yo(document.documentElement, { variant: "page" }), yo(L("#drawerScroll")), J.own(Oc()), Ta(document.body), X.homeHasFeed = gNe(), X.barsRequestSeq = 0, X.barsPendingSeq = 0, X.barsRendered = "", X.catalogFilterProps = null, X.catalogFilterMounting = null, X.catalogTagRows = [], X.catalogTopsPages = null, V5.sidebarProps = {
+function FFe() {
+ gCe(), Kc(document), Po(document.documentElement, { variant: "page" }), Po(L("#drawerScroll")), J.own(Uc()), Ba(document.body), X.homeHasFeed = NNe(), X.barsRequestSeq = 0, X.barsPendingSeq = 0, X.barsRendered = "", X.catalogFilterProps = null, X.catalogFilterMounting = null, X.catalogTagRows = [], X.catalogTopsPages = null, V5.sidebarProps = {
content: null,
filters: {},
latest: null
@@ -79701,7 +79814,7 @@ function vFe() {
], $.FOLLOW_RANDOM_SORT = "rand", $.followSort = "new", $.followDir = "desc", $.followSeed = 0, $.followDurMin = 0, $.followDurMax = 0;
}
// src/react/search/recommendations.ts
-async function yFe(e) {
+async function IFe(e) {
let t = (await Promise.allSettled([
e("/api/items?sort=rand&limit=5"),
e("/api/jav/discoveries?scope=library&limit=5"),
@@ -79722,12 +79835,12 @@ async function yFe(e) {
credentials: /* @__PURE__ */ new Set()
};
for (let e of i?.groups || []) {
- let t = Xi(e);
+ let t = da(e);
for (let n of ["videos", "images"]) {
if (n === "images" ? !t.has("image") : t.size && !t.has("video")) continue;
- let r = Zi(e, n), i = l.sources.find((e) => e.id === r.source_id), a = $U(r, i?.author_key ? l.sources.filter((e) => e.author_key === i.author_key) : i ? [i] : [], l), o = n === "images" ? r.media_items?.find((e) => e.media_kind === "image") : void 0;
+ let r = fa(e, n), i = l.sources.find((e) => e.id === r.source_id), a = aW(r, i?.author_key ? l.sources.filter((e) => e.author_key === i.author_key) : i ? [i] : [], l), o = n === "images" ? r.media_items?.find((e) => e.media_kind === "image") : void 0;
(n === "images" ? c : s).push({
- value: YU(r),
+ value: tW(r),
id: r.id,
who: a.author,
href: `/posts/${r.id}`,
@@ -79743,7 +79856,7 @@ async function yFe(e) {
let u = (t[4]?.items || []).map((e) => ({
value: e.k,
href: e.entity_id ? `/creators/${e.entity_id}` : `/follow?author=${encodeURIComponent(e.key)}`,
- avatarHtml: QU(l.sources.filter((t) => t.author_key === e.key), e.k),
+ avatarHtml: iW(l.sources.filter((t) => t.author_key === e.key), e.k),
subtitle: "关注中的作者"
})), d = /* @__PURE__ */ new Map();
for (let e of r) for (let t of e.performer_refs || []) t.id && !d.has(t.name) && d.set(t.name, {
@@ -79813,7 +79926,7 @@ async function yFe(e) {
];
}
// src/application/search-morph.js
-function bFe(e, t, n, r, i, a, o) {
+function LFe(e, t, n, r, i, a, o) {
let s = a.startsWith("linear(") ? a.slice(7, -1).split(",").map(Number) : [0, 1];
return s.map((a, c) => {
let l = c / (s.length - 1), u = (e, t) => e + (t - e) * a, d = Math.max(8, Math.min(o - 44, u(e.left, t.left))), f = Math.max(36, Math.min(o - 8 - d, u(e.width, t.width))), p = u(e.height, t.height) + Math.sin(Math.PI * l) * t.height * .12, m = u(e.top + e.height / 2, t.top + t.height / 2);
@@ -79838,12 +79951,12 @@ var k9 = {
function A9() {
k9.searchControl?.close();
}
-function xFe(e) {
- let t = e ? Ia({
+function RFe(e) {
+ let t = e ? Za({
...e,
is_jav: !!e.code
}, Z.appSettings.javImage) : "";
- return t === "cover" ? no(e, "big") : t ? `<img class="poster still" src="/poster?id=${e.id}&c=4" width="640" height="360" alt="" loading="lazy" data-drop="self">` : "<span class=\"nopic\">无预览</span>";
+ return t === "cover" ? vo(e, "big") : t ? `<img class="poster still" src="/poster?id=${e.id}&c=4" width="640" height="360" alt="" loading="lazy" data-drop="self">` : "<span class=\"nopic\">无预览</span>";
}
function j9() {
k9.searchMorph?.cancel(), k9.searchMorph = null, L(".search").classList.remove("search-morphing");
@@ -79855,9 +79968,9 @@ function M9(e) {
j9(), t.classList.remove("open");
let o = n.getBoundingClientRect();
if (t.classList.toggle("open", e), L("#searchBtn").setAttribute("aria-expanded", String(e)), innerWidth > 760 || matchMedia("(prefers-reduced-motion:reduce)").matches) return;
- let s = t.getBoundingClientRect(), c = getComputedStyle(t), l = parseFloat(c.paddingLeft), u = t.querySelector("svg").getBoundingClientRect().width, d = Math.max(0, (o.width - u) / 2 - parseFloat(c.borderLeftWidth)), f = r ? i : e ? o : s, p = e ? s : o, m = Sc();
+ let s = t.getBoundingClientRect(), c = getComputedStyle(t), l = parseFloat(c.paddingLeft), u = t.querySelector("svg").getBoundingClientRect().width, d = Math.max(0, (o.width - u) / 2 - parseFloat(c.borderLeftWidth)), f = r ? i : e ? o : s, p = e ? s : o, m = Lc();
t.classList.add("search-morphing");
- let h = t.animate(bFe(f, p, s, r ? a : e ? d : l, e ? l : d, m.easing, innerWidth), {
+ let h = t.animate(LFe(f, p, s, r ? a : e ? d : l, e ? l : d, m.easing, innerWidth), {
duration: m.duration,
easing: "linear",
fill: "both"
@@ -79866,16 +79979,16 @@ function M9(e) {
k9.searchMorph === h && j9();
});
}
-function SFe() {
+function zFe() {
return n9.immerseOpen() ? s8().activeVideo() : i8()?.activeVideo() || null;
}
-function CFe(e) {
+function BFe(e) {
return !!e && (e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable);
}
-function wFe() {
+function VFe() {
k9.searchControl = null, k9.searchActions = {
search: (e) => {
- X.rememberSearchValue(), a9(!1), U.q = e, yu(), Q.route(U.jav === "1" ? g7() : U.q ? "/?q=" + encodeURIComponent(U.q) : "/", !0);
+ X.rememberSearchValue(), a9(!1), U.q = e, Nu(), Q.route(U.jav === "1" ? g7() : U.q ? "/?q=" + encodeURIComponent(U.q) : "/", !0);
},
openItem: (e) => l9(e),
openEntity: (e, t) => y5(e, t),
@@ -79884,12 +79997,12 @@ function wFe() {
$.followMediaView = t, O9(e, !0, n);
}
}, k9.searchHelpers = {
- pool: () => M_e(U, on),
- recommendations: () => yFe(on),
- coverHtml: (e) => `<span class="pic">${e?.thumb_url ? `<img src="${z(e.thumb_url)}" width="640" height="360" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">` : e?.sourceWork ? W8(e) : xFe(e)}</span>`,
- present: (e) => Uo(e),
- dismiss: (e) => Wo(e),
- wireScroller: (e) => lc(e),
+ pool: () => J_e(U, xn),
+ recommendations: () => IFe(xn),
+ coverHtml: (e) => `<span class="pic">${e?.thumb_url ? `<img src="${z(e.thumb_url)}" width="640" height="360" alt="" loading="lazy" referrerpolicy="no-referrer" data-drop="self">` : e?.sourceWork ? W8(e) : RFe(e)}</span>`,
+ present: (e) => is(e),
+ dismiss: (e) => as(e),
+ wireScroller: (e) => wc(e),
typed: (e) => {
let t = e.value;
!t && X.searchValueSnapshot.text ? X.clearSearchField(X.searchValueSnapshot) : (t && (X.cancelSearchDissolve(), X.cancelSearchDissolve = () => {}), X.rememberSearchValue(e));
@@ -79901,7 +80014,7 @@ function wFe() {
text: e.value,
scrollLeft: e.scrollLeft || X.searchValueSnapshot.scrollLeft
})
- }, HV("search", {
+ }, JV("search", {
input: L("#q"),
historyLimit: Z.appSettings.searchHistoryLimit,
actions: k9.searchActions,
@@ -79920,7 +80033,7 @@ function wFe() {
e.currentTarget.value && X.rememberSearchValue(e.currentTarget);
});
}
-function TFe() {
+function HFe() {
k9.searchMorph = null, k9.searchMorphViewport = innerWidth, J.listen.bind(J, window)("resize", () => {
innerWidth !== k9.searchMorphViewport && (k9.searchMorphViewport = innerWidth, j9());
}, { passive: !0 }), J.listen(matchMedia("(prefers-reduced-motion:reduce)"), "change", j9), J.handler(L("#searchBtn"), "onclick", () => {
@@ -79956,13 +80069,13 @@ function TFe() {
J5(!1);
return;
}
- if (Jl || Kl.size || ql.size) {
+ if (lu || su.size || cu.size) {
k5(!1, !0);
return;
}
return;
}
- if (CFe(e.target) || e.ctrlKey || e.metaKey || e.altKey) return;
+ if (BFe(e.target) || e.ctrlKey || e.metaKey || e.altKey) return;
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
let t = document.querySelector(`#stage[open] [data-media-carousel]:not([data-carousel-video-active]) [data-follow-image-step="${e.key === "ArrowRight" ? 1 : -1}"]`);
if (t) {
@@ -79970,26 +80083,26 @@ function TFe() {
return;
}
}
- let t = SFe();
+ let t = zFe();
if (t) {
if (e.key === "t" || e.key === "T") {
e.preventDefault(), i8()?.toggleTheater();
return;
}
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
- e.preventDefault(), AM(t, Z.appSettings.seekSeconds * (e.key === "ArrowRight" ? 1 : -1));
+ e.preventDefault(), LM(t, Z.appSettings.seekSeconds * (e.key === "ArrowRight" ? 1 : -1));
return;
}
if (e.key === " " || e.key === "k" || e.key === "K") {
- e.preventDefault(), kM(t);
+ e.preventDefault(), IM(t);
return;
}
if (e.key === "m" || e.key === "M") {
- e.preventDefault(), Rj(t, ".vjs-mute-control");
+ e.preventDefault(), Kj(t, ".vjs-mute-control");
return;
}
if (e.key === "f" || e.key === "F") {
- e.preventDefault(), Rj(t, ".vjs-fullscreen-control");
+ e.preventDefault(), Kj(t, ".vjs-fullscreen-control");
return;
}
if (e.key === "i" || e.key === "I") {
@@ -80000,7 +80113,7 @@ function TFe() {
});
}
// src/history/links.ts
-function EFe(e) {
+function UFe(e) {
if (e.defaultPrevented || e.button !== 0 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return null;
let t = e.target instanceof Element ? e.target.closest("a[href]") : null;
if (!t || t.hasAttribute("download") || t.target && t.target.toLowerCase() !== "_self") return null;
@@ -80014,41 +80127,41 @@ function EFe(e) {
} catch {
return null;
}
- if (i.origin !== window.location.origin || n.startsWith("#") && bV(i.pathname)) return null;
- let a = AV(i.pathname);
- return n.startsWith("#") && !a?.section || !yV(i.pathname, i.search) && !a ? null : i.pathname + i.search + i.hash;
+ if (i.origin !== window.location.origin || n.startsWith("#") && EV(i.pathname)) return null;
+ let a = IV(i.pathname);
+ return n.startsWith("#") && !a?.section || !TV(i.pathname, i.search) && !a ? null : i.pathname + i.search + i.hash;
}
// src/application/composition.js
var N9 = {
shellActions: void 0,
routing: void 0
};
-function DFe() {
+function WFe() {
let e = J, t = (e) => {
e.kind === "item" ? l9(e.id, !1) : e.kind === "jav" ? d9(e.code, !1) : e.kind === "follow" ? O9(e.id, !1) : o9(e.queue, e.key, e.item, !1);
};
- if (hNe(), I5.entityShapesReady = G8(), rPe(), location.pathname === "/") {
+ if (MNe(), I5.entityShapesReady = G8(), bPe(), location.pathname === "/") {
let e = new URLSearchParams(location.search);
!e.has("state") && e.get("jav") !== "1" && (L("#catalogPageHeading").hidden = !1);
}
- Z8(decodeURIComponent(location.pathname)) && J8(L("#feedNew")), fPe(), N9.shellActions = {
+ Z8(decodeURIComponent(location.pathname)) && J8(L("#feedNew")), kPe(), N9.shellActions = {
openSettings: (e) => Y5(e, !0),
closeSettings: () => u8()?.close(!1),
openItem: (e) => void l9(e),
openEntity: (e, t) => void y5(e, t),
openTag: (e) => {
- sPe(), F7(e);
+ wPe(), F7(e);
},
- openTasteSignal: jNe,
+ openTasteSignal: JNe,
navigate: (e) => {
- let n = new URL(e, location.href), r = yV(n.pathname, n.search);
+ let n = new URL(e, location.href), r = TV(n.pathname, n.search);
if (r) {
let e = r.kind === "queue" ? "item" : r.kind;
y9(n.pathname + n.search + n.hash, e, () => t(r));
- } else if (n.hash && n.pathname === location.pathname && n.search === location.search && !bV(location.pathname)) {
+ } else if (n.hash && n.pathname === location.pathname && n.search === location.search && !EV(location.pathname)) {
Q.route(e);
- let t = $V.navigation.seq;
- l6(n.hash, () => $V.navigation.seq === t);
+ let t = aH.navigation.seq;
+ l6(n.hash, () => aH.navigation.seq === t);
} else Q.navigatePath(e);
},
openManage: e7,
@@ -80058,9 +80171,9 @@ function DFe() {
toast: (e, t) => C8.toast(e, t),
failure: C8.actionFailure,
revealSource: m5,
- reopenTutorial: nFe,
- routeReview: PNe,
- routeFollowManage: XNe,
+ reopenTutorial: yFe,
+ routeReview: ZNe,
+ routeFollowManage: pPe,
saveFollowPreference: (e) => {
e.pageSize !== void 0 && (Z.appSettings.followPageSize = e.pageSize), e.layout !== void 0 && (Z.appSettings.followLayout = e.layout), Z.saveSettings();
},
@@ -80071,17 +80184,17 @@ function DFe() {
},
exitSelectMode: () => k5(!1, !1),
personAvatar: (e, t, n) => M5.personAvatar(e, t, n),
- authorAvatar: (e) => QNe(e),
- showIndexTags: $Ne,
+ authorAvatar: (e) => hPe(e),
+ showIndexTags: gPe,
openFollowAuthor: F5,
- openFollowTag: ePe,
+ openFollowTag: _Pe,
openPlaylist: (e, t) => void s9(e, t, !0),
- canFlip: () => !Jl && !$7() && !window.__scrolling && !X.reduceMotion(),
+ canFlip: () => !lu && !$7() && !window.__scrolling && !X.reduceMotion(),
surfaceChanged: (e, t) => {
- e === "entity" ? (kl(), vu({ barsContext: {
+ e === "entity" ? (Wl(), W({ barsContext: {
type: "home",
filters: U
- } }), W5(), document.body.classList.add("entity-open"), w7(), P5()) : e === "index" ? (kl(), document.body.classList.remove("entity-open"), Q.claimSurface(t), W5(), document.body.classList.add("index-open"), w7(), P5()) : (kl(), Q.claimSurface(t), e === "catalog" ? W5() : (U5(), H5({ manage: e === "management" })));
+ } }), W5(), document.body.classList.add("entity-open"), w7(), P5()) : e === "index" ? (Wl(), document.body.classList.remove("entity-open"), Q.claimSurface(t), W5(), document.body.classList.add("index-open"), w7(), P5()) : (Wl(), Q.claimSurface(t), e === "catalog" ? W5() : (U5(), H5({ manage: e === "management" })));
},
clearSearch: () => X.clearSearchField(),
openImmerse: (e) => {
@@ -80094,7 +80207,7 @@ function DFe() {
},
openOverlay: (e) => {
let n = Q.requestedOverlay;
- Q.requestedOverlay = null, $V.navigation.claimed && (!tH() || Q.initialOverlayOpened) ? n?.path === location.pathname + location.search + location.hash && n.open() : (tH() && (Q.initialOverlayOpened = !0), t(e));
+ Q.requestedOverlay = null, aH.navigation.claimed && (!sH() || Q.initialOverlayOpened) ? n?.path === location.pathname + location.search + location.hash && n.open() : (sH() && (Q.initialOverlayOpened = !0), t(e));
},
closeStage: () => {
n9.stageOpen() && a9(!1);
@@ -80103,7 +80216,7 @@ function DFe() {
helpers: X.gridHelpers,
actions: X.gridActions
},
- configurable: () => !!su,
+ configurable: () => !!Su,
surfaceShown: (e) => {
e === "index" ? (_9(), d7()) : N7();
},
@@ -80130,7 +80243,7 @@ function DFe() {
Z.handOff(R7());
},
fill: () => {
- if (U7() || !tH() && !L("#grid").querySelector(".catalog-skeleton")) return;
+ if (U7() || !sH() && !L("#grid").querySelector(".catalog-skeleton")) return;
let e = L("#count");
e.removeAttribute("aria-busy"), e.removeAttribute("aria-label"), V7(Q.surfaceToken(Q.surfacePath()));
},
@@ -80139,23 +80252,23 @@ function DFe() {
}
}
}, N9.routing = !1, e.listen(document, "click", (e) => {
- let t = EFe(e);
+ let t = UFe(e);
t && (e.preventDefault(), N9.shellActions.navigate(t));
- }), J.own($V.listen((e) => {
- Q.queueOpenRequest && e.seq !== Q.queueOpenRequest.seq && !bV(e.location.pathname) && a9(!1), N9.routing && !e.claimed && b9();
- })), NMe(N9.shellActions).catch((e) => console.error("客户端导航装载失败", e)), hPe(), WNe(), Z5(), Promise.all([
+ }), J.own(aH.listen((e) => {
+ Q.queueOpenRequest && e.seq !== Q.queueOpenRequest.seq && !EV(e.location.pathname) && a9(!1), N9.routing && !e.claimed && b9();
+ })), XMe(N9.shellActions).catch((e) => console.error("客户端导航装载失败", e)), MPe(), sPe(), Z5(), Promise.all([
X7(),
- pPe(),
+ APe(),
I5.entityShapesReady
]).then(() => {
- e.isActive && (I5.wantsDiscoveryBars() && N7().catch((e) => console.error("首页横条装载失败", e)), _9(), KPe(), N9.routing = !0, vu({ pageOpens: 1 }), b9(), d7());
+ e.isActive && (I5.wantsDiscoveryBars() && N7().catch((e) => console.error("首页横条装载失败", e)), _9(), lFe(), N9.routing = !0, W({ pageOpens: 1 }), b9(), d7());
}).catch((t) => {
e.isActive && console.error("应用启动失败", t);
});
}
// src/theme-transition.ts
var P9 = !1;
-async function OFe(e, t) {
+async function GFe(e, t) {
if (P9) return;
if (!document.startViewTransition || matchMedia("(prefers-reduced-motion: reduce)").matches) {
t();
@@ -80177,7 +80290,7 @@ async function OFe(e, t) {
}
}
// src/application/chrome.js
-function kFe() {
+function KFe() {
(() => {
let e = J, t = [
"#brandHome",
@@ -80215,7 +80328,7 @@ function kFe() {
e.handler(c, "onclick", (e) => {
e.preventDefault();
});
- let u = qo(document.querySelector("#drawer"), c, l, { side: !0 });
+ let u = cs(document.querySelector("#drawer"), c, l, { side: !0 });
e.own(u.dispose);
let d = null, f = null;
function p(e, t) {
@@ -80231,15 +80344,15 @@ function kFe() {
w: r.offsetWidth,
h: r.offsetHeight
}, a = f;
- f = i, Cc(d, e ? a : null, i, "y");
+ f = i, Rc(d, e ? a : null, i, "y");
}
e.listen(l, "toggle", (e) => {
e.newState === "open" && (l.querySelector("button")?.focus(), p(!1));
}), e.listen(l, "keydown", (e) => {
e.key === "Escape" && (e.stopPropagation(), u.setOpen(!1), c.focus());
- }), on("/api/libraries", { signal: e.signal }).then((t) => {
+ }), xn("/api/libraries", { signal: e.signal }).then((t) => {
if (!e.isActive) return;
- YW(t.libraries);
+ iG(t.libraries);
let n = [[
"",
"全部媒体库",
@@ -80256,7 +80369,7 @@ function kFe() {
}
let i = sessionStorage.getItem("peach.library") || "", a = n.find((e) => e[0] === i)?.[1] || "全部媒体库";
sessionStorage.setItem("peach.library-label", a), c.querySelector("h1").textContent = a;
- let o = (e) => Qo[e]?.startsWith("data:") ? `<img src="${Qo[e]}" alt="">` : R(Qo[e] || e), s = document.createElement("span");
+ let o = (e) => ps[e]?.startsWith("data:") ? `<img src="${ps[e]}" alt="">` : R(ps[e] || e), s = document.createElement("span");
s.className = "mark", s.setAttribute("aria-hidden", "true"), s.innerHTML = o(n.find((e) => e[0] === i)?.[2] || "database"), c.querySelector(".mark").replaceWith(s), l.innerHTML = `<p>媒体库</p><div class="board-library-rows">${n.map(([e, t, n]) => `<button type="button" data-library="${z(e)}" aria-pressed="${e === i}"><span class="board-library-avatar">${o(n)}</span><span>${z(t)}</span></button>`).join("")}</div><footer><button type="button" class="geist-button primary" data-library-manage>管理媒体库</button></footer>`, l.querySelectorAll("[data-library]").forEach((t) => e.handler(t, "onclick", () => {
sessionStorage.setItem("peach.library", t.dataset.library), sessionStorage.setItem("peach.library-label", n.find((e) => e[0] === t.dataset.library)?.[1] || "全部媒体库"), location.assign("/");
})), e.handler(l.querySelector("[data-library-manage]"), "onclick", () => {
@@ -80277,14 +80390,14 @@ function kFe() {
(document.querySelector(".top") || m.closest("header")).prepend(h), e.own(() => h.remove());
let g = document.createElement("div");
g.className = "board-sidebar-foot", e.own(() => g.remove()), g.innerHTML = `<div class="board-theme-toggle" role="group" aria-label="明暗主题"><span class="board-theme-thumb" aria-hidden="true"></span><button type="button" data-board-theme="light" aria-label="浅色主题">${R("sun")}</button><button type="button" data-board-theme="dark" aria-label="深色主题">${R("moon")}</button></div>`, g.insertAdjacentHTML("beforeend", "<div class=\"board-foot-actions\"><button type=\"button\" class=\"board-glow-toggle\" id=\"boardGlowBtn\" aria-label=\"光晕配色\" aria-haspopup=\"dialog\" aria-expanded=\"false\" aria-controls=\"boardGlowMenu\"><svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><use href=\"#ri-palette-line\"/></svg><span class=\"board-glow-mark\" aria-hidden=\"true\"><span class=\"board-glow-mark-glow\"></span><span class=\"board-glow-mark-accent\"></span></span></button></div>"), g.querySelector(".board-foot-actions").append(document.querySelector("#settingsBtn")), document.querySelector("#drawer").append(g), g.querySelectorAll("[data-board-theme]").forEach((t) => e.handler(t, "onclick", () => {
- t.getAttribute("aria-pressed") !== "true" && OFe(t, () => {
- Z.appSettings.theme = t.dataset.boardTheme, Z.saveSettings(), SA();
+ t.getAttribute("aria-pressed") !== "true" && GFe(t, () => {
+ Z.appSettings.theme = t.dataset.boardTheme, Z.saveSettings(), OA();
});
- })), SA();
+ })), OA();
let _ = document.createElement("div");
_.className = "popmenu board-glow-menu", _.id = "boardGlowMenu", _.hidden = !0, _.setAttribute("popover", "manual"), _.setAttribute("role", "dialog"), _.setAttribute("aria-label", "配色"), document.body.append(_), e.own(() => _.remove());
- let v = g.querySelector("#boardGlowBtn"), y = qo(g, v, _);
- e.own(y.dispose), e.own(Ese(v)), BMe({
+ let v = g.querySelector("#boardGlowBtn"), y = cs(g, v, _);
+ e.own(y.dispose), e.own(uj(v)), rNe({
root: _,
store: Z.settingsStore,
openDetails: () => {
@@ -80427,12 +80540,12 @@ function kFe() {
})(), J5(!q5() && sessionStorage.getItem("board.sidebar") !== "closed");
}
// src/application/initialize.js
-function AFe() {
- vFe(), iFe(), iPe(), aFe(), JPe(), HMe(), zPe(), rFe(), ONe(), eFe(), GNe(), BPe(), xNe(), FNe(), gFe(), tPe(), kNe(), _Fe(), nPe(), ANe(), xPe(), VPe(), wFe(), tFe(), TFe(), YPe(), DFe(), kFe(), J.own(B7), J.own(v9);
+function qFe() {
+ FFe(), xFe(), xPe(), SFe(), dFe(), aNe(), nFe(), bFe(), GNe(), _Fe(), cPe(), rFe(), RNe(), QNe(), NFe(), vPe(), KNe(), PFe(), yPe(), qNe(), RPe(), iFe(), VFe(), vFe(), HFe(), fFe(), WFe(), KFe(), J.own(B7), J.own(v9);
}
// src/ui-kit/middle-truncate.ts
var F9 = "…", I9 = typeof Intl.Segmenter == "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null, L9 = /* @__PURE__ */ new WeakMap(), R9 = /* @__PURE__ */ new WeakSet(), z9 = null, B9 = null, V9 = /* @__PURE__ */ new Set(), H9 = (e) => I9 ? [...I9.segment(String(e ?? ""))].map((e) => e.segment) : Array.from(String(e ?? ""));
-function jFe(e, t) {
+function JFe(e, t) {
let n = H9(e);
if (!n.length || t(e)) return String(e ?? "");
let r = 0, i = Math.max(0, n.length - 1), a = F9;
@@ -80450,7 +80563,7 @@ var U9 = Object.assign((e, t) => {
Number.isFinite(a) && (i += Math.max(0, H9(t).length - 1) * a);
let o = parseFloat(n.wordSpacing);
return Number.isFinite(o) && (i += (t.match(/\s/g) || []).length * o), i;
-}, { canvas: null }), MFe = (e) => {
+}, { canvas: null }), YFe = (e) => {
if (e.dataset.middleTruncateWithin === void 0) return e.clientWidth;
let t = e.parentElement;
if (!t) return e.clientWidth;
@@ -80460,17 +80573,17 @@ var U9 = Object.assign((e, t) => {
n === e ? a++ : t > 0 && (i += t, a++);
}
return t.getBoundingClientRect().width - (parseFloat(n.paddingLeft) || 0) - (parseFloat(n.paddingRight) || 0) - i - r * Math.max(0, a - 1);
-}, NFe = (e) => {
+}, XFe = (e) => {
let t = L9.get(e);
if (!t || !e.isConnected) return;
- let n = MFe(e), r = n > 0 ? jFe(t.full, (t) => U9(e, t) <= n) : t.full;
+ let n = YFe(e), r = n > 0 ? JFe(t.full, (t) => U9(e, t) <= n) : t.full;
t.rendered = r, e.textContent !== r && (e.textContent = r);
let i = r !== t.full;
e.classList.toggle("middle-truncated", i), e.setAttribute("aria-label", t.full), e.hasAttribute("title") && e.dataset.middleTitle !== "true" || (e.title = t.full, e.dataset.middleTitle = "true");
}, W9 = (e) => {
let t = L9.get(e);
t && !t.raf && (t.raf = requestAnimationFrame(() => {
- t.raf = 0, NFe(e);
+ t.raf = 0, XFe(e);
}));
}, G9 = (e) => {
e instanceof HTMLElement && (L9.has(e) || L9.set(e, {
@@ -80483,7 +80596,7 @@ var U9 = Object.assign((e, t) => {
let t = e;
t.matches("[data-middle-truncate]") && G9(t), t.querySelectorAll("[data-middle-truncate]").forEach(G9);
};
-function PFe(e = document) {
+function ZFe(e = document) {
B9?.(), R9 = /* @__PURE__ */ new WeakSet(), V9 = /* @__PURE__ */ new Set();
let t = V9, n = !0;
z9 = new ResizeObserver((e) => e.forEach((e) => {
@@ -80557,7 +80670,7 @@ var q9 = [
"jav-detail",
"wants",
"index"
-], FFe = {
+], QFe = {
catalog: [
...q9,
...J9,
@@ -80578,10 +80691,10 @@ var q9 = [
"avatar-choices"
]
};
-function IFe() {
+function $Fe() {
let e = /* @__PURE__ */ new Set(), t = null;
return (n, r) => {
- for (let t of Object.keys(r)) if (r[t] !== n[t]) for (let n of FFe[t] || []) e.add(n);
+ for (let t of Object.keys(r)) if (r[t] !== n[t]) for (let n of QFe[t] || []) e.add(n);
return !t && e.size && (t = (async () => {
for (; e.size;) {
let t = new Set(e);
@@ -80594,12 +80707,12 @@ function IFe() {
})), t || Promise.resolve();
};
}
-function LFe() {
+function eIe() {
let e = Pt({
- queryKey: yF,
- queryFn: ({ signal: e }) => xF(e),
- refetchInterval: (e) => bF(e.state.data)
- }), t = (0, P.useRef)(void 0), [n] = (0, P.useState)(IFe), r = e.data?.result_versions;
+ queryKey: EF,
+ queryFn: ({ signal: e }) => OF(e),
+ refetchInterval: (e) => DF(e.state.data)
+ }), t = (0, P.useRef)(void 0), [n] = (0, P.useState)($Fe), r = e.data?.result_versions;
return (0, P.useEffect)(() => {
r && (t.current && n(t.current, r), t.current = r);
}, [r, n]), null;
@@ -80609,52 +80722,52 @@ var X9 = null;
function Z9(e) {
X9 !== e || e.owners || (X9 = null, e.effects.dispose());
}
-function RFe() {
+function tIe() {
if (!X9) {
- let e = VMe();
+ let e = iNe();
X9 = {
effects: e,
owners: 0
- }, e.own(PFe(document)), e.own(() => {
- kl(), H.cancelQueries();
- }), e.own(PMe), e.own(whe), e.own(Vo);
+ }, e.own(ZFe(document)), e.own(() => {
+ Wl(), H.cancelQueries();
+ }), e.own(ZMe), e.own(Phe), e.own(ns);
}
return X9.owners += 1, X9.effects.resume(), X9;
}
-function zFe() {
+function nIe() {
let [e, t] = (0, P.useState)(null);
return (0, P.useLayoutEffect)(() => {
- let e = X9 === null, n = RFe(), r = MMe(t);
+ let e = X9 === null, n = tIe(), r = YMe(t);
if (e) try {
- AFe();
+ qFe();
} catch (e) {
throw r(), n.effects.dispose(), X9 = null, e;
}
return () => {
r(), --n.owners, !n.owners && (n.effects.pause(), queueMicrotask(() => Z9(n)));
};
- }, []), /* @__PURE__ */ (0, F.jsx)(f_e, {
+ }, []), /* @__PURE__ */ (0, F.jsx)(S_e, {
actions: e,
processing: !0,
- background: e ? /* @__PURE__ */ (0, F.jsx)(LFe, {}) : null
+ background: e ? /* @__PURE__ */ (0, F.jsx)(eIe, {}) : null
});
}
var Q9 = /* @__PURE__ */ new WeakMap();
-function BFe(e) {
+function rIe(e) {
let t = Q9.get(e);
if (t) return t;
- let n = (0, Rt.createRoot)(e, p_e);
+ let n = (0, Rt.createRoot)(e, C_e);
Q9.set(e, n);
let r = n.unmount.bind(n);
return n.unmount = () => {
Q9.get(e) === n && (Q9.delete(e), r(), X9 && Z9(X9));
- }, (0, Lt.flushSync)(() => n.render(/* @__PURE__ */ (0, F.jsx)(zFe, {}))), n;
+ }, (0, Lt.flushSync)(() => n.render(/* @__PURE__ */ (0, F.jsx)(nIe, {}))), n;
}
// src/react/bootstrap.tsx
O();
var $9 = document.getElementById("appRoot");
if (!$9) throw Error("主界面宿主缺失");
-BFe($9);
-export { FI as $2ec61d1d4f780267$export$a8a3e93435678ff9, UI as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, oR as $542a13ca2fa5b484$export$5b6b19405a83ff9d, FT as $72abaeab4d80592f$export$78efe591171d7d45, QR as $76d00c5a4edb230a$export$76ccd210b9029917, YR as $76d00c5a4edb230a$export$816b5d811295e6bc, tz as $76d00c5a4edb230a$export$b59bdbef9ce70de2, rz as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, JR as $76d00c5a4edb230a$export$f850895b287ef28e, Ufe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, Hfe as $b4f18e3395fe64d7$export$3e41faf802a29e71, zfe as $b4f18e3395fe64d7$export$b2539bed5023c21c, sz as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, Kfe as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, Sw as $ea3928288112382f$export$439d29a4e110a164, yR as $f2ff30fde7b014be$export$3ddf2d174ce01153, ER as $fe21c36db05242bb$export$a98f0dcb43a68a25, DR as $fe21c36db05242bb$export$d7b12c4107be0d61, Ope as $l, iA as ACCENTS, yEe as AMANE_BRIDGE_CHECK_URL, J$ as AMANE_BRIDGE_KEY, bEe as AMANE_BRIDGE_REBUILD_URL, Hn as ApiError, WW as ArtSlot, q as Button, pI as ButtonLink, Lpe as Bx, Qt as CLOUD_LOCATIONS, J1 as CLOUD_PROXY_HELP, Dr as COLUMN_SORT, o1 as CONFIGURATION_KEY, GY as CONFIGURATION_URL, xEe as COOKIE_TEXT_LIMIT, q$ as COVER_JOB_KEY, Ai as CREDENTIAL_STATE, U$ as CUSTOM_SOURCES_KEY, H$ as CUSTOM_SOURCES_URL, sV as Checkbox, oV as CheckboxGlyph, ZB as ChevronSortDown, aZ as Chip, q2 as CloudDownloadDialog, XH as CollapseChevron, YH as CollapseRegion, u$ as CollectionSummary, Qbe as DEFAULT_CATEGORY, Kn as DEFAULT_SORT, kQ as DIAGNOSTICS_KEY, Zxe as DIRECTORY_TEMPLATE_ERROR, A0 as DISCOVERY_SORTS, V2 as DOWNLOADS_KEY, B2 as DOWNLOADS_URL, dY as DUPLICATES_KEY, KJ as DataTableFooter, HJ as DataTableFrame, GJ as DataTableSort, nU as Disclosure, Ake as DownloadsPanel, ype as E3, $be as ENTITY_REVIEW_KINDS, K1 as ENTRY_LINKS_HELP, q1 as ENTRY_LINKS_HINT, jpe as Ea, Jpe as EmptyFocusButton, zz as EmptyState, eU as ErrorText, Age as ExternalLink, Sr as FEEDS_KEY, $Y as FEED_SCHEDULE_KEY, T$ as FIELDSET_FOOT, kje as FLOW_LABEL_X, z3 as FLOW_VIEWBOX, br as FOLLOW_CHECK_KEY, yr as FOLLOW_CREDENTIALS_KEY, P8 as FOLLOW_INITIAL_RANGE_OPTIONS, vr as FOLLOW_MANAGE_KEY, NZ as FOLLOW_MANAGE_NAV, xr as FOLLOW_RESOLVE_KEY, QY as FOLLOW_SCHEDULE_KEY, Nge as Fact, Mge as FactList, tU as FieldLabel, F$ as Fieldset, P$ as FieldsetTitle, rI as FilterGlass, iI as FilterGlassRows, nI as FilterIconButton, oI as FilterPill, kge as Footer, Cz as Gg, cI as GlassPill, $H as Help, Az as HintText, xje as IDLE_POLL_MS, Vbe as IDLE_REPAIR, ZF as IconButton, Fz as Input, Pz as InputBase, wA as JAV_LAYOUTS, M0 as JAV_RECOMMENDATION_GRID, SX as JUNK_KEY, Q3 as JavHeader, Fbe as KEEP_LABELS, wr as LAYOUTS, G1 as LIBRARY_FOLDER_HELP, mH as LIBRARY_PROCESSING_KEY, LY as LINKS_KEY, RY as LINK_CHECK_KEY, Cxe as LINK_KINDS, zY as LINK_PRUNE_KEY, Ln as LOC, kz as Label, R$ as LibraryProcessingCard, nB as LibraryShortcuts, AH as LinkButton, WH as LoadingDots, xpe as M6, Oxe as MEDIA_PROCESSING_KEY, tX as MEDIA_PROCESSING_URL, gY as MEDIA_REPAIR_KEY, hY as MEDIA_REPAIR_URL, er as MEDIA_SOURCES_KEY, Qo as MEDIA_SOURCE_ICONS, Xt as MEDIA_SOURCE_OPTIONS, tV as MENU_ITEM, nV as MENU_ITEM_INTERACTIVE, eV as MENU_POPOVER_SURFACE, PH as MenuDialog, BG as MixCard, Iz as ModalFrame, hy as MotionConfigContext, Oz as NR, Rz as Note, Wpe as OA, iX as ORGANIZE_KEY, sX as ORPHAN_RECORDS_KEY, Sz as OV, hz as P7, FTe as PHASES, KY as PICK_FOLDER_URL, B$ as PLAYLISTS_KEY, xDe as POLICY_COLUMNS, CDe as POLICY_COVER_NOTE, SDe as POLICY_MATRIX, W1 as POLICY_SUMMARY, WJ as Pagination, L$ as PathLine, uF as PillTabList, KH as Progress, xY as QUALITY_GOALS_KEY, O$ as REPAIR_CARD_TEXT, _Y as REPAIR_LIBRARIES_KEY, fX as RESOURCE_APPLY_KEY, dX as RESOURCE_SCAN_KEY, JTe as RESULT_PANEL, YTe as RESULT_SECTION, Zbe as REVIEW_CATEGORIES, xX as REVIEW_COUNTS_KEY, exe as REVIEW_DECISION_LABELS, wY as REVIEW_KEY, TY as REVIEW_LABELS, DY as REVIEW_QUEUES, OY as REVIEW_QUEUE_LABELS, UW as RetryNote, Upe as Rf, Ege as Rows, _Ee as SCRAPING_CHECK_URL, G$ as SCRAPING_COVER_URL, K$ as SCRAPING_KEY, gEe as SCRAPING_SETTINGS_URL, zU as SEGMENT, RU as SEGMENTED_TRACK, ZY as SETTINGS_KEY, qY as SETTINGS_URL, qn as SORT_DEFAULT_DIR, Gn as SORT_OPTIONS, $t as SOURCE_LABELS, u3 as STATS_KEY, Tge as Section, Oge as SectionSkeleton, LU as SegmentedRadioGroup, C_e as SegmentedTabList, xW as Segments, UJ as Select, AU as Select$1, u1 as SelectField, jU as SelectItem, $J as SelectionActions, Fk as SelectionDock, eY as SelectionPopover, ZH as SettingsCard, wge as SettingsRow, QH as SettingsSectionLabel, Lge as SiteLabel, WU as SortDirectionIcon, wW as SortKeys, fQ as SourceAvatar, oU as SourceLabel, rU as SourceMark, Dge as Stack, I$ as StatusLabel, P2 as Switch, yF as TASKS_KEY, uje as TASTE_REFRESH_KEY, dje as TASTE_WINDOWS, eX as THUMBNAIL_JOBS_KEY, wX as TRASH_KEY, Hue as TRIGGER_LABELS, NJ as Table, tY as TableColumnControls, nY as TableColumnResizer, iY as TableSelectionHeader, $Q as TagManager, jge as TaskCenterLink, qH as TaskProgress, Mz as TextField, jz as TextFieldContext, xz as Un, m$ as WANTS_KEY, r4 as WantMagnets, kp as WithPromise, gz as Wt, bz as Xc, Dz as Xf, Cpe as Xt, bpe as _8, o as __commonJSMin, s as __exportAll, l as __toESM, Hpe as aB, si as addAlias, oi as addSource, g$ as addWant, lb as animate, B as apiGet, V as apiSend, vA as appSettingsStore, gSe as applyConfirmText, bX as applyLeftovers, hSe as applyPlanText, vSe as applyText, SA as applyTheme, i_ as asNumber, iSe as attachOrphan, Ur as authorAvatar, Gr as authorGroups, Hr as authorInitial, Vr as authorName, xq as autoResetPageIndex, Za as avatarInner, g3 as bandRows, Qxe as baseName, Bbe as batchOperate, Vk as boundedPreference, Lbe as bulkCloudPreferences, Uz as busyProps, Vpe as cB, Bke as cachedMagnetStates, yp as calcGeneratorVelocity, sxe as canApprove, jf as cancelFrame, lSe as candidateText, UH as cardClass, LA as cardRatio, yz as cc, Ei as checkEvidenceGap, Ti as checkFailures, gi as checkFeeds, Dxe as checkLine, Ci as checkReceipt, wi as checkSummary, CEe as checkText, Di as checkedText, fG as clickedBlank, kbe as cloudLocations, T0 as cloudProxySkeleton, Gx as clsx, Ppe as cn, kh as collectMotionValues, Vq as columnVisibilityFeature, OJ as column_getCanSort, wJ as column_getSortFn, axe as commonReviewSources, dV as configurationSection, hje as configureTasteBrowser, Hc as confirmModal, rq as copyInstancePropertiesWithoutMemos, Wa as coverUrl, Mq as createColumnHelper, uEe as createPlaylist, ji as credentialDone, x0 as credentialsSkeleton, gxe as currentReviewRow, sF as cx, Tz as dZ, pxe as decisionPayload, mxe as decisionReceipt, fxe as defaultChoice, fEe as deletePlaylist, x as diagnosticHeaders, U1 as diagnosticsSkeleton, UTe as discoveryArtwork, x$ as discoveryKey, KDe as discoveryScore, Nbe as distinctName, xi as dropSources, Bpe as du, Rbe as duplicateVictims, LF as elapsedText, Xa as entityFaceImg, hn as entityPath, Ir as errorHeadline, Wn as errorMessage, z as esc, bq as expandRowModel, fz as f1, Fr as feedIntervalText, Z$ as fetchAmaneBridge, $r as fetchCheckJob, s1 as fetchConfiguration, X$ as fetchCoverJob, Qr as fetchCredentials, W$ as fetchCustomSources, AQ as fetchDiagnostics, S$ as fetchDiscoveries, pY as fetchDuplicates, Lue as fetchEarlier, jxe as fetchFeedSchedule, pi as fetchFeeds, Zr as fetchFollow, Axe as fetchFollowSchedule, EX as fetchJunkSummary, HY as fetchLinkCheck, UY as fetchLinkPrune, VY as fetchLinkStats, kxe as fetchMediaProcessing, vY as fetchMediaRepair, tr as fetchMediaSources, aX as fetchOrganize, Wxe as fetchOrganizeExample, cX as fetchOrphanRecords, fi as fetchPending, V$ as fetchPlaylists, SY as fetchQualityGoals, yY as fetchRepairLibraries, ei as fetchResolveJob, mX as fetchResourceApply, pX as fetchResourceScan, PY as fetchReview, TX as fetchReviewCounts, nX as fetchSettings, Y$ as fetchSources, d3 as fetchStats, ti as fetchSuggestions, xF as fetchTasks, I3 as fetchTaste, gje as fetchTasteJob, Mxe as fetchThumbnailJobs, DX as fetchTrashSummary, h$ as fetchWants, rxe as filterReviewRows, Fn as firstGrapheme, zK as flexRender, jje as flowGraph, Mje as flowLabel, AAe as fmtCount, kn as fmtDur, jn as fmtSize, Iue as foldByKind, NF as foldRoutine, vi as followFeedByName, Cr as followSuggestKey, IF as followupDetail, Fue as followupTally, Af as frame, upe as g4, Wq as getDefaultPaginationState, IA as gridLayout, Wr as groupByAuthor, MF as groupFollowups, jY as groupReviewRows, pSe as hasChanges, hX as hasResourceRoots, DF as hasResultProblems, Sje as historySpan, pz as i2, bje as importTasteExport, S0 as indexersSkeleton, dp as interpolate, v$ as invalidateWants, FF as isActive, Pr as isBroken, Or as isLayout, eg as isMotionValue, EY as isReviewCategory, PF as isRoutine, C0 as javBrowserSkeleton, P0 as javContentSkeleton, kA as javLayout, N0 as javTagSkeleton, CSe as junkBreakdown, pEe as keepPlaylist, ke as keepPreviousData, Jr as keepSelected, f3 as known, mpe as l7, jF as latestOfKind, HAe as lengthRows, ir as localTime, _i as lookupFeedActor, _pe as m7, wz as mM, cn as mapLimit, di as markItem, _3 as max, BAe as mediumRows, Rue as mergeFinished, v3 as min, xxe as mirrorText, Wbe as missingToolText, mY as mixedCloudPreferences, GF as momentText, fb as motion, jh as motionValue, eSe as organizeOutcome, Y0 as overlayHost, kr as pageSizeOf, qr as pageWindow, Xn as paginationRange, bi as patchSource, $V as peachHistory, $V as peachHistory$1, dxe as pendingGenres, MAe as percentText, qxe as pickOrganizeFolder, $xe as planSummary, p3 as playedFor, PAe as playedItemUrl, bF as pollInterval, As as popCount, lEe as posterUrl, cG as previewLibraryColor, Kxe as previewOrganize, qbe as previewUrl, AF as problemDestination, RF as progressText, aU as providerIcon, Exe as pruneText, _X as purgeCount, aSe as purgeOrphan, Ez as pv, zpe as qE, H as queryClient, mz as r2, Oje as radarRows, LAe as radialArc, RAe as radialBarSize, IAe as radialCeiling, FAe as radialSlices, tM as randomId, Eje as rankDetail, Dje as rankShares, h3 as reachedShare, BF as readableErrorHeadline, qDe as recommendationScore, _xe as recordGenre, sSe as recordsText, mEe as recreatePlaylist, sEe as refreshPlaylists, Sl as relayoutCovers, Si as reloadFollowManage, bxe as reloadReview, EDe as rememberShape, Yxe as rememberTemplates, ci as removeAlias, hi as removeFeed, ai as removeSource, yje as removeTasteSource, _$ as removeWants, li as renameAliasGroup, dEe as renamePlaylist, WAe as replayRows, ie as require_jsx_runtime, A as require_react, te as require_react_dom, $K as require_with_selector, RTe as resetWants, Yn as resolveFollowSort, Tp as resolveStartTime, cEe as resumeAssetId, nxe as reviewGroupingOptions, AY as reviewQueueData, kY as reviewQueueOf, SSe as reviewSummary, ixe as reviewWindow, lxe as rowEvidence, NY as rowFieldName, Zq as rowPaginationFeature, vJ as rowSelectionFeature, jJ as rowSortingFeature, MY as rowSubject, uxe as rowTags, cxe as rowTitle, dpe as s5, ui as saveCredential, mSe as scanLine, Lxe as schedulePollInterval, BTe as searchNote, oxe as selectReviewRange, Yr as selectionState, mi as setFeedEnabled, ii as setSourceEnabled, hV as settingsPath, yxe as settleReviewRows, Mbe as sharedNamePrefix, eH as shellNavigate, x8 as showToast, xn as siteMarkUrl, dq as skipFirstRun, cF as sortCx, jr as sortLabel, en as sourceDefaultCost, ki as sourceIconUrl, _Se as sourceMeta, xs as spinnerHtml, cp as spring, Vz as spriteGlyph, ni as startCheck, wxe as startLinkCheck, Txe as startLinkPrune, Jxe as startOrganize, ri as startResolve, dSe as startResourceApply, uSe as startResourceScan, vje as startTasteRefresh, CF as statusLabel, Ube as statusLine, Nr as statusText, RA as storeJavLayout, hxe as submitDecision, qF as summaryItems, Nq as tableFeatures, fq as tableMemo, Kr as tableRows, OF as taskIssues, L3 as tasteDate, wje as tasteDimensions, Cje as tasteHours, F3 as tasteKey, pje as tasteRefetchInterval, mje as tasteTime, mF as textLang, ud as time, Dpe as tl, Xr as toggleGroup, R3 as topScores, Ape as uo, jH as useAction, OZ as useBackgroundJob, CU as useClientUpdates, Su as useConstant, eI as useHorizontalScroller, Cu as useIsomorphicLayoutEffect, uG as useLibraryTints, Ft as useMutation, cV as useOverlayScrollbar, Pt as useQuery, oe as useQueryClient, Xy as useReducedMotion, Ixe as useRunSchedule, Pxe as useSaveFollowSchedule, rX as useSaveSettings, Rxe as useSaveThumbnailMode, MJ as useTable, YJ as useTablePreferences, dI as useViewGlide, zbe as victimBytes, zTe as wantName, NAe as watchNote, m3 as watchedShare, lc as wireHorizontalScroller, Xxe as withOrganizeJob };
+rIe($9);
+export { VI as $2ec61d1d4f780267$export$a8a3e93435678ff9, YI as $3a442827418ebe87$export$eb2fcfdbd7ba97d4, fR as $542a13ca2fa5b484$export$5b6b19405a83ff9d, HT as $72abaeab4d80592f$export$78efe591171d7d45, iz as $76d00c5a4edb230a$export$76ccd210b9029917, tz as $76d00c5a4edb230a$export$816b5d811295e6bc, sz as $76d00c5a4edb230a$export$b59bdbef9ce70de2, lz as $76d00c5a4edb230a$export$f6f0c3fe4ec306ea, ez as $76d00c5a4edb230a$export$f850895b287ef28e, $fe as $b4f18e3395fe64d7$export$3d96ec278d3efce4, Qfe as $b4f18e3395fe64d7$export$3e41faf802a29e71, Yfe as $b4f18e3395fe64d7$export$b2539bed5023c21c, pz as $b4f18e3395fe64d7$export$e51a686c67fdaa2d, npe as $bd263d78e9bf3c56$export$f5c9f3c2c4054eec, kw as $ea3928288112382f$export$439d29a4e110a164, TR as $f2ff30fde7b014be$export$3ddf2d174ce01153, MR as $fe21c36db05242bb$export$a98f0dcb43a68a25, NR as $fe21c36db05242bb$export$d7b12c4107be0d61, Rpe as $l, dA as ACCENTS, PEe as AMANE_BRIDGE_CHECK_URL, Y$ as AMANE_BRIDGE_KEY, FEe as AMANE_BRIDGE_REBUILD_URL, rr as ApiError, $W as ArtSlot, q as Button, yI as ButtonLink, qpe as Bx, mn as CLOUD_LOCATIONS, Y1 as CLOUD_PROXY_HELP, Hr as COLUMN_SORT, s1 as CONFIGURATION_KEY, GY as CONFIGURATION_URL, IEe as COOKIE_TEXT_LIMIT, J$ as COVER_JOB_KEY, Gi as CREDENTIAL_STATE, W$ as CUSTOM_SOURCES_KEY, U$ as CUSTOM_SOURCES_URL, pV as Checkbox, fV as CheckboxGlyph, rV as ChevronSortDown, oZ as Chip, q2 as CloudDownloadDialog, nU as CollapseChevron, tU as CollapseRegion, d$ as CollectionSummary, mxe as DEFAULT_CATEGORY, sr as DEFAULT_SORT, AQ as DIAGNOSTICS_KEY, pSe as DIRECTORY_TEMPLATE_ERROR, A0 as DISCOVERY_SORTS, V2 as DOWNLOADS_KEY, B2 as DOWNLOADS_URL, dY as DUPLICATES_KEY, KJ as DataTableFooter, HJ as DataTableFrame, GJ as DataTableSort, cU as Disclosure, qke as DownloadsPanel, kpe as E3, hxe as ENTITY_REVIEW_KINDS, q1 as ENTRY_LINKS_HELP, J1 as ENTRY_LINKS_HINT, Vpe as Ea, ime as EmptyFocusButton, Gz as EmptyState, oU as ErrorText, Bge as ExternalLink, Lr as FEEDS_KEY, $Y as FEED_SCHEDULE_KEY, E$ as FIELDSET_FOOT, Kje as FLOW_LABEL_X, z3 as FLOW_VIEWBOX, Fr as FOLLOW_CHECK_KEY, Pr as FOLLOW_CREDENTIALS_KEY, P8 as FOLLOW_INITIAL_RANGE_OPTIONS, Nr as FOLLOW_MANAGE_KEY, PZ as FOLLOW_MANAGE_NAV, Ir as FOLLOW_RESOLVE_KEY, QY as FOLLOW_SCHEDULE_KEY, Uge as Fact, Hge as FactList, sU as FieldLabel, I$ as Fieldset, F$ as FieldsetTitle, lI as FilterGlass, uI as FilterGlassRows, cI as FilterIconButton, fI as FilterPill, zge as Footer, kz as Gg, mI as GlassPill, aU as Help, Iz as HintText, Rje as IDLE_POLL_MS, rxe as IDLE_REPAIR, rI as IconButton, Vz as Input, Bz as InputBase, AA as JAV_LAYOUTS, M0 as JAV_RECOMMENDATION_GRID, CX as JUNK_KEY, Q3 as JavHeader, Zbe as KEEP_LABELS, zr as LAYOUTS, K1 as LIBRARY_FOLDER_HELP, bH as LIBRARY_PROCESSING_KEY, LY as LINKS_KEY, RY as LINK_CHECK_KEY, zxe as LINK_KINDS, zY as LINK_PRUNE_KEY, Qn as LOC, Fz as Label, z$ as LibraryProcessingCard, cB as LibraryShortcuts, IH as LinkButton, XH as LoadingDots, jpe as M6, Wxe as MEDIA_PROCESSING_KEY, tX as MEDIA_PROCESSING_URL, gY as MEDIA_REPAIR_KEY, hY as MEDIA_REPAIR_URL, hr as MEDIA_SOURCES_KEY, ps as MEDIA_SOURCE_ICONS, fn as MEDIA_SOURCE_OPTIONS, sV as MENU_ITEM, cV as MENU_ITEM_INTERACTIVE, oV as MENU_POPOVER_SURFACE, BH as MenuDialog, YG as MixCard, Hz as ModalFrame, by as MotionConfigContext, Pz as NR, Wz as Note, eme as OA, iX as ORGANIZE_KEY, sX as ORPHAN_RECORDS_KEY, Oz as OV, xz as P7, XTe as PHASES, KY as PICK_FOLDER_URL, V$ as PLAYLISTS_KEY, LDe as POLICY_COLUMNS, zDe as POLICY_COVER_NOTE, RDe as POLICY_MATRIX, G1 as POLICY_SUMMARY, WJ as Pagination, R$ as PathLine, _F as PillTabList, QH as Progress, xY as QUALITY_GOALS_KEY, k$ as REPAIR_CARD_TEXT, _Y as REPAIR_LIBRARIES_KEY, fX as RESOURCE_APPLY_KEY, dX as RESOURCE_SCAN_KEY, lEe as RESULT_PANEL, uEe as RESULT_SECTION, pxe as REVIEW_CATEGORIES, SX as REVIEW_COUNTS_KEY, gxe as REVIEW_DECISION_LABELS, wY as REVIEW_KEY, TY as REVIEW_LABELS, DY as REVIEW_QUEUES, OY as REVIEW_QUEUE_LABELS, QW as RetryNote, $pe as Rf, Ige as Rows, MEe as SCRAPING_CHECK_URL, K$ as SCRAPING_COVER_URL, q$ as SCRAPING_KEY, jEe as SCRAPING_SETTINGS_URL, GU as SEGMENT, WU as SEGMENTED_TRACK, ZY as SETTINGS_KEY, qY as SETTINGS_URL, cr as SORT_DEFAULT_DIR, or as SORT_OPTIONS, hn as SOURCE_LABELS, u3 as STATS_KEY, Fge as Section, Rge as SectionSkeleton, UU as SegmentedRadioGroup, N_e as SegmentedTabList, AW as Segments, UJ as Select, IU as Select$1, d1 as SelectField, LU as SelectItem, $J as SelectionActions, Hk as SelectionDock, eY as SelectionPopover, rU as SettingsCard, Pge as SettingsRow, iU as SettingsSectionLabel, qge as SiteLabel, XU as SortDirectionIcon, NW as SortKeys, pQ as SourceAvatar, fU as SourceLabel, lU as SourceMark, Lge as Stack, L$ as StatusLabel, P2 as Switch, EF as TASKS_KEY, Dje as TASTE_REFRESH_KEY, Oje as TASTE_WINDOWS, eX as THUMBNAIL_JOBS_KEY, TX as TRASH_KEY, Xue as TRIGGER_LABELS, NJ as Table, tY as TableColumnControls, nY as TableColumnResizer, iY as TableSelectionHeader, e$ as TagManager, Vge as TaskCenterLink, $H as TaskProgress, Rz as TextField, Lz as TextFieldContext, Dz as Un, h$ as WANTS_KEY, r4 as WantMagnets, Wp as WithPromise, Sz as Wt, Ez as Xc, Nz as Xf, Npe as Xt, Ape as _8, o as __commonJSMin, s as __exportAll, l as __toESM, Qpe as aB, Si as addAlias, xi as addSource, _$ as addWant, hb as animate, B as apiGet, V as apiSend, CA as appSettingsStore, jSe as applyConfirmText, xX as applyLeftovers, ASe as applyPlanText, NSe as applyText, OA as applyTheme, d_ as asNumber, bSe as attachOrphan, ii as authorAvatar, oi as authorGroups, ri as authorInitial, ni as authorName, xq as autoResetPageIndex, po as avatarInner, g3 as bandRows, mSe as baseName, nxe as batchOperate, qk as boundedPreference, $be as bulkCloudPreferences, Yz as busyProps, Zpe as cB, rAe as cachedMagnetStates, Pp as calcGeneratorVelocity, Cxe as canApprove, Kf as cancelFrame, TSe as candidateText, YH as cardClass, UA as cardRatio, Tz as cc, Vi as checkEvidenceGap, Bi as checkFailures, ji as checkFeeds, Uxe as checkLine, Ri as checkReceipt, zi as checkSummary, REe as checkText, Hi as checkedText, xG as clickedBlank, Gbe as cloudLocations, E0 as cloudProxySkeleton, Qx as clsx, Wpe as cn, Wh as collectMotionValues, Vq as columnVisibilityFeature, OJ as column_getCanSort, wJ as column_getSortFn, xxe as commonReviewSources, _V as configurationSection, Mje as configureTasteBrowser, rl as confirmModal, rq as copyInstancePropertiesWithoutMemos, ao as coverUrl, Mq as createColumnHelper, TEe as createPlaylist, Ki as credentialDone, S0 as credentialsSkeleton, Mxe as currentReviewRow, mF as cx, jz as dZ, kxe as decisionPayload, Axe as decisionReceipt, Oxe as defaultChoice, DEe as deletePlaylist, x as diagnosticHeaders, W1 as diagnosticsSkeleton, iEe as discoveryArtwork, S$ as discoveryKey, lOe as discoveryScore, Ybe as distinctName, Ii as dropSources, Xpe as du, exe as duplicateVictims, HF as elapsedText, fo as entityFaceImg, An as entityPath, Zr as errorHeadline, ar as errorMessage, z as esc, bq as expandRowModel, vz as f1, Xr as feedIntervalText, Q$ as fetchAmaneBridge, mi as fetchCheckJob, c1 as fetchConfiguration, Z$ as fetchCoverJob, pi as fetchCredentials, G$ as fetchCustomSources, jQ as fetchDiagnostics, C$ as fetchDiscoveries, pY as fetchDuplicates, Gue as fetchEarlier, qxe as fetchFeedSchedule, Oi as fetchFeeds, fi as fetchFollow, Kxe as fetchFollowSchedule, DX as fetchJunkSummary, HY as fetchLinkCheck, UY as fetchLinkPrune, VY as fetchLinkStats, Gxe as fetchMediaProcessing, vY as fetchMediaRepair, gr as fetchMediaSources, aX as fetchOrganize, oSe as fetchOrganizeExample, cX as fetchOrphanRecords, Di as fetchPending, H$ as fetchPlaylists, SY as fetchQualityGoals, yY as fetchRepairLibraries, hi as fetchResolveJob, mX as fetchResourceApply, pX as fetchResourceScan, PY as fetchReview, EX as fetchReviewCounts, nX as fetchSettings, X$ as fetchSources, d3 as fetchStats, gi as fetchSuggestions, OF as fetchTasks, I3 as fetchTaste, Nje as fetchTasteJob, Jxe as fetchThumbnailJobs, OX as fetchTrashSummary, g$ as fetchWants, yxe as filterReviewRows, Xn as firstGrapheme, zK as flexRender, Jje as flowGraph, Yje as flowLabel, qAe as fmtCount, Wn as fmtDur, Kn as fmtSize, Wue as foldByKind, RF as foldRoutine, Ni as followFeedByName, Rr as followSuggestKey, VF as followupDetail, Uue as followupTally, Gf as frame, bpe as g4, Wq as getDefaultPaginationState, HA as gridLayout, ai as groupByAuthor, LF as groupFollowups, jY as groupReviewRows, kSe as hasChanges, hX as hasResourceRoots, MF as hasResultProblems, zje as historySpan, yz as i2, Lje as importTasteExport, C0 as indexersSkeleton, Ep as interpolate, y$ as invalidateWants, BF as isActive, Yr as isBroken, Ur as isLayout, lg as isMotionValue, EY as isReviewCategory, zF as isRoutine, w0 as javBrowserSkeleton, P0 as javContentSkeleton, FA as javLayout, N0 as javTagSkeleton, RSe as junkBreakdown, OEe as keepPlaylist, ke as keepPreviousData, li as keepSelected, f3 as known, wpe as l7, IF as latestOfKind, aje as lengthRows, yr as localTime, Mi as lookupFeedActor, Dpe as m7, Az as mM, Cn as mapLimit, Ei as markItem, _3 as max, rje as mediumRows, Kue as mergeFinished, v3 as min, Lxe as mirrorText, oxe as missingToolText, mY as mixedCloudPreferences, XF as momentText, vb as motion, Kh as motionValue, gSe as organizeOutcome, Y0 as overlayHost, Wr as pageSizeOf, ci as pageWindow, dr as paginationRange, Fi as patchSource, aH as peachHistory, aH as peachHistory$1, Dxe as pendingGenres, YAe as percentText, lSe as pickOrganizeFolder, hSe as planSummary, p3 as playedFor, ZAe as playedItemUrl, DF as pollInterval, Gs as popCount, wEe as posterUrl, _G as previewLibraryColor, cSe as previewOrganize, lxe as previewUrl, FF as problemDestination, UF as progressText, dU as providerIcon, Hxe as pruneText, vX as purgeCount, xSe as purgeOrphan, Mz as pv, Ype as qE, H as queryClient, bz as r2, Gje as radarRows, eje as radialArc, tje as radialBarSize, $Ae as radialCeiling, QAe as radialSlices, lM as randomId, Uje as rankDetail, Wje as rankShares, h3 as reachedShare, GF as readableErrorHeadline, uOe as recommendationScore, Nxe as recordGenre, CSe as recordsText, kEe as recreatePlaylist, SEe as refreshPlaylists, Ll as relayoutCovers, Li as reloadFollowManage, Ixe as reloadReview, HDe as rememberShape, dSe as rememberTemplates, Ci as removeAlias, Ai as removeFeed, bi as removeSource, Ije as removeTasteSource, v$ as removeWants, wi as renameAliasGroup, EEe as renamePlaylist, sje as replayRows, ie as require_jsx_runtime, A as require_react, te as require_react_dom, $K as require_with_selector, $Te as resetWants, ur as resolveFollowSort, Bp as resolveStartTime, CEe as resumeAssetId, vxe as reviewGroupingOptions, AY as reviewQueueData, kY as reviewQueueOf, LSe as reviewSummary, bxe as reviewWindow, Txe as rowEvidence, NY as rowFieldName, Zq as rowPaginationFeature, vJ as rowSelectionFeature, jJ as rowSortingFeature, MY as rowSubject, Exe as rowTags, wxe as rowTitle, xpe as s5, Ti as saveCredential, _X as scanLine, $xe as schedulePollInterval, tEe as searchNote, Sxe as selectReviewRange, ui as selectionState, ki as setFeedEnabled, yi as setSourceEnabled, xV as settingsPath, Fxe as settleReviewRows, Jbe as sharedNamePrefix, oH as shellNavigate, x8 as showToast, In as siteMarkUrl, dq as skipFirstRun, hF as sortCx, Kr as sortLabel, gn as sourceDefaultCost, Wi as sourceIconUrl, MSe as sourceMeta, Is as spinnerHtml, Cp as spring, qz as spriteGlyph, _i as startCheck, Bxe as startLinkCheck, Vxe as startLinkPrune, uSe as startOrganize, vi as startResolve, DSe as startResourceApply, ESe as startResourceScan, Fje as startTasteRefresh, Que as statusLabel, axe as statusLine, Jr as statusText, WA as storeJavLayout, jxe as submitDecision, QF as summaryItems, Nq as tableFeatures, fq as tableMemo, si as tableRows, NF as taskIssues, L3 as tasteDate, Vje as tasteDimensions, Bje as tasteHours, F3 as tasteKey, Aje as tasteRefetchInterval, jje as tasteTime, xF as textLang, wd as time, Lpe as tl, di as toggleGroup, R3 as topScores, Bpe as uo, LH as useAction, kZ as useBackgroundJob, kU as useClientUpdates, Iu as useConstant, oI as useHorizontalScroller, Lu as useIsomorphicLayoutEffect, yG as useLibraryTints, Ft as useMutation, mV as useOverlayScrollbar, Pt as useQuery, oe as useQueryClient, nb as useReducedMotion, Qxe as useRunSchedule, Xxe as useSaveFollowSchedule, rX as useSaveSettings, eSe as useSaveThumbnailMode, MJ as useTable, YJ as useTablePreferences, _I as useViewGlide, txe as victimBytes, eEe as wantName, XAe as watchNote, m3 as watchedShare, wc as wireHorizontalScroller, fSe as withOrganizeJob };
-//# debugId=ed873e08-c65a-4a2c-99eb-e93a459bdf72
\ No newline at end of file
+//# debugId=b3da13ed-a657-4f4c-bab7-4844439e0ea5
\ No newline at end of file