diff --git a/app/schema.sql b/app/schema.sql index 0e22119..a8637fd 100644 --- a/app/schema.sql +++ b/app/schema.sql @@ -89,6 +89,7 @@ CREATE TABLE IF NOT EXISTS attachment ( size INTEGER NOT NULL DEFAULT 0, rel_path TEXT NOT NULL, sha256 TEXT, + thumb_rel_path TEXT, taken_at TEXT, deleted_at TEXT, origin TEXT, diff --git a/app/server/db.mjs b/app/server/db.mjs index 5ed63ba..2ede27e 100644 --- a/app/server/db.mjs +++ b/app/server/db.mjs @@ -125,7 +125,7 @@ function preMigrateColumns(d) { } }; for (const t of SYNC_TABLES) addCols(t, SYNC_COLS); - addCols('attachment', [['sha256', 'TEXT']]); + addCols('attachment', [['sha256', 'TEXT'], ['thumb_rel_path', 'TEXT']]); } export function migrateSync(d) { @@ -1011,13 +1011,25 @@ function listFootprints(d, query) { const abs = path.join(DATA_DIR, rel); fs.mkdirSync(path.dirname(abs), { recursive: true }); fs.writeFileSync(abs, buf); + // 服务端缩略图(上传时由客户端 canvas 生成 480px WebP;无则 NULL,读取时回退原图) + let thumbRel = null; + if (p.thumb_b64) { + const tb = Buffer.from(p.thumb_b64, 'base64'); + if (tb.length) { + thumbRel = path.join('attachments', String(p.owner_id), crypto.randomUUID() + '_thumb.webp'); + const tAbs = path.join(DATA_DIR, thumbRel); + fs.mkdirSync(path.dirname(tAbs), { recursive: true }); + fs.writeFileSync(tAbs, tb); + thumbRel = thumbRel.split(path.sep).join('/'); + } + } const uuid = uuidv7(); let item = null; withTx(d, () => { const h = hlcNext(d); const r = d.prepare( - "INSERT INTO attachment (owner_type, owner_id, kind, file_name, mime, size, rel_path, sha256, uuid, hlc, origin) VALUES ('footprint',?,?,?,?,?,?,?,?,?,?)" - ).run(p.owner_id, null, p.file_name, p.mime ?? null, buf.length, rel.split(path.sep).join('/'), sha, uuid, h, getDeviceId(d)); + "INSERT INTO attachment (owner_type, owner_id, kind, file_name, mime, size, rel_path, thumb_rel_path, sha256, uuid, hlc, origin) VALUES ('footprint',?,?,?,?,?,?,?,?,?,?,?)" + ).run(p.owner_id, null, p.file_name, p.mime ?? null, buf.length, rel.split(path.sep).join('/'), thumbRel, sha, uuid, h, getDeviceId(d)); item = d.prepare('SELECT * FROM attachment WHERE id=?').get(Number(r.lastInsertRowid)); touchOplog(d, 'attachment', uuid, 'upsert', h); }); @@ -1037,6 +1049,7 @@ function listFootprints(d, query) { withTx(d, () => softDelete(d, 'attachment', payload.id)); const abs = path.join(DATA_DIR, row.rel_path); try { fs.unlinkSync(abs); } catch {} + if (row.thumb_rel_path) { try { fs.unlinkSync(path.join(DATA_DIR, row.thumb_rel_path)); } catch {} } } return { ok: true }; } @@ -1048,6 +1061,15 @@ function listFootprints(d, query) { return { data_b64: data.toString('base64'), mime: row.mime, file_name: row.file_name }; } + case 'attachment_thumb': { + // 缩略图读取:有服务端缩略图用之(20KB 级 WebP),老附件回退原图 + const row = d.prepare('SELECT * FROM attachment WHERE id=?').get(payload.id); + if (!row) throw new Error('附件不存在'); + const rel = row.thumb_rel_path || row.rel_path; + const data = fs.readFileSync(path.join(DATA_DIR, rel)); + return { data_b64: data.toString('base64'), mime: row.thumb_rel_path ? 'image/webp' : row.mime, file_name: row.file_name }; + } + case 'view_list': return { items: d.prepare('SELECT * FROM saved_view WHERE deleted_at IS NULL ORDER BY id').all().map(v => ({ ...v, filter: JSON.parse(v.filter || '{}'), sort: JSON.parse(v.sort || '{}'), is_default: !!v.is_default diff --git a/app/src/components/common/AttachmentPicker.tsx b/app/src/components/common/AttachmentPicker.tsx index f1c554d..ea650fb 100644 --- a/app/src/components/common/AttachmentPicker.tsx +++ b/app/src/components/common/AttachmentPicker.tsx @@ -2,9 +2,10 @@ import { useRef } from 'react'; import { Paperclip, FileText, Image, Trash2 } from 'lucide-react'; import { Button } from '@/components/ui'; import { fmtSize } from '@/lib/format'; +import { makeThumb } from '@/lib/img'; import type { Attachment } from '@/lib/types'; -export interface PendingAtt { file_name: string; mime?: string; size: number; data_b64: string; preview?: string; } +export interface PendingAtt { file_name: string; mime?: string; size: number; data_b64: string; thumb_b64?: string; preview?: string; } export function AttachmentPicker({ items, pending, onPick, onDeleteSaved, onDeletePending, onOpenSaved, uploading }: { items: Attachment[]; @@ -81,23 +82,29 @@ export function AttachmentPicker({ items, pending, onPick, onDeleteSaved, onDele ); } -export function fileToPending(file: File): Promise { - return new Promise((resolve, reject) => { +export async function fileToPending(file: File): Promise { + const result = await new Promise((resolve, reject) => { const reader = new FileReader(); - reader.onload = () => { - const result = String(reader.result || ''); - const comma = result.indexOf(','); - // 图片用 objectURL 做轻量预览(不上 Base64 进 DOM) - const preview = file.type?.startsWith('image/') ? URL.createObjectURL(file) : undefined; - resolve({ - file_name: file.name, - mime: file.type || undefined, - size: file.size, - data_b64: comma >= 0 ? result.slice(comma + 1) : result, - preview - }); - }; + reader.onload = () => resolve(String(reader.result || '')); reader.onerror = () => reject(new Error('读取文件失败')); reader.readAsDataURL(file); }); + const comma = result.indexOf(','); + const data_b64 = comma >= 0 ? result.slice(comma + 1) : result; + // 上传前生成 480px WebP 缩略图(详情网格用它,原图仅在查看时读取) + let thumb_b64: string | undefined; + if (file.type?.startsWith('image/') && !file.type.includes('gif')) { + try { + const thumbUrl = await makeThumb(data_b64, file.type); + thumb_b64 = thumbUrl.split(',')[1] || undefined; + } catch { thumb_b64 = undefined; } + } + return { + file_name: file.name, + mime: file.type || undefined, + size: file.size, + data_b64, + thumb_b64, + preview: file.type?.startsWith('image/') ? URL.createObjectURL(file) : undefined + }; } diff --git a/app/src/components/records/RecordDetailDialog.tsx b/app/src/components/records/RecordDetailDialog.tsx index 96179a8..03a9142 100644 --- a/app/src/components/records/RecordDetailDialog.tsx +++ b/app/src/components/records/RecordDetailDialog.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { Pencil, Trash2, Paperclip, FileText } from 'lucide-react'; -import { attachmentRead, footprintGet, listDimensions, listTypes } from '@/lib/api'; +import { attachmentRead, attachmentThumb, footprintGet, listDimensions, listTypes } from '@/lib/api'; import type { Attachment, FormField } from '@/lib/types'; import { Badge, Button, Confirm, Dialog, useToast } from '@/components/ui'; import { StatusBadge, LevelBadge, GradeBadge, RoleBadge, NegativeBadge } from '@/components/common/badges'; @@ -9,6 +9,10 @@ import { openOrDownload } from '@/lib/file'; import { makeThumb } from '@/lib/img'; import { fmtRange, fmtDateTime, fmtSize } from '@/lib/format'; +// 缩略图/原图会话级缓存:同一附件一次会话只读一次 +const thumbCache = new Map(); +const fullCache = new Map(); + export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: { open: boolean; onClose: () => void; @@ -46,8 +50,13 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: { const openAtt = async (a: Attachment) => { try { - const r = await attachmentRead(a.id); - openOrDownload(r.file_name, r.mime ?? undefined, r.data_b64); + let b64 = fullCache.get(a.id); + if (!b64) { + const r = await attachmentRead(a.id); + b64 = r.data_b64; + if ((a.size ?? 0) <= 2 * 1024 * 1024) fullCache.set(a.id, b64); // 大原图不驻留内存 + } + openOrDownload(a.file_name, a.mime ?? undefined, b64); } catch (e) { toast('error', (e as Error).message); } @@ -60,25 +69,36 @@ export function RecordDetailDialog({ open, onClose, footprintId, onEdit }: { const docs = atts.filter(a => !a.mime?.startsWith('image/')); const attsKey = atts.map(a => a.id).join(','); useEffect(() => { - setImgMap({}); if (!open || !attsKey) return; let cancelled = false; + const list = atts.filter(a => a.mime?.startsWith('image/')); (async () => { - const map: Record = {}; - const list = atts.filter(a => a.mime?.startsWith('image/')); for (const a of list) { + if (cancelled) return; + if (thumbCache.has(a.id)) { setImgMap(m => ({ ...m, [a.id]: thumbCache.get(a.id)! })); continue; } try { - const r = await attachmentRead(a.id); - if (cancelled) return; - // 网格展示用缩略图(降采样至 480px WebP),原图仅在点击查看时读取 - map[a.id] = await makeThumb(r.data_b64, r.mime || 'image/png'); - setImgMap({ ...map }); + if (a.thumb_rel_path) { + // 新上传:服务端已存 480px WebP 缩略图,20KB 级,秒开 + const r = await attachmentThumb(a.id); + if (cancelled) return; + const url = 'data:' + (r.mime || 'image/webp') + ';base64,' + r.data_b64; + thumbCache.set(a.id, url); + setImgMap(m => ({ ...m, [a.id]: url })); + } else { + // 历史附件无缩略图:读原图 + 客户端降采样,结果进会话缓存 + const r = await attachmentRead(a.id); + if (cancelled) return; + const url = await makeThumb(r.data_b64, r.mime || 'image/png'); + thumbCache.set(a.id, url); + setImgMap(m => ({ ...m, [a.id]: url })); + } } catch { - // 解码失败则退回原图 try { const r = await attachmentRead(a.id); - map[a.id] = 'data:' + (r.mime || 'image/png') + ';base64,' + r.data_b64; - setImgMap({ ...map }); + if (cancelled) return; + const url = 'data:' + (r.mime || 'image/png') + ';base64,' + r.data_b64; + thumbCache.set(a.id, url); + setImgMap(m => ({ ...m, [a.id]: url })); } catch { /* 单张失败不影响其余 */ } } } diff --git a/app/src/components/records/RecordEditorDialog.tsx b/app/src/components/records/RecordEditorDialog.tsx index 640668f..1305cdd 100644 --- a/app/src/components/records/RecordEditorDialog.tsx +++ b/app/src/components/records/RecordEditorDialog.tsx @@ -156,7 +156,7 @@ export function RecordEditorDialog({ open, onClose, footprintId, onSaved }: { }; const saved = await footprintUpsert(input); for (const p of pendingAtts) { - await attachmentAdd({ owner_id: saved.id, file_name: p.file_name, mime: p.mime, size: p.size, data_b64: p.data_b64 }); + await attachmentAdd({ owner_id: saved.id, file_name: p.file_name, mime: p.mime, size: p.size, data_b64: p.data_b64, thumb_b64: p.thumb_b64 }); } return saved.id; }, @@ -347,7 +347,7 @@ export function RecordEditorDialog({ open, onClose, footprintId, onSaved }: { continue; } const p = await fileToPending(f); - await attachmentAdd({ owner_id: footprintId, file_name: p.file_name, mime: p.mime, size: p.size, data_b64: p.data_b64 }); + await attachmentAdd({ owner_id: footprintId, file_name: p.file_name, mime: p.mime, size: p.size, data_b64: p.data_b64, thumb_b64: p.thumb_b64 }); done++; } if (done > 0) { diff --git a/app/src/lib/api.ts b/app/src/lib/api.ts index 51d0d19..3ab94cb 100644 --- a/app/src/lib/api.ts +++ b/app/src/lib/api.ts @@ -129,12 +129,14 @@ export const bandUpsert = (p: GradeBand) => call<{ item: { id: number } }>('band export const bandDelete = (id: number) => call<{ ok: true }>('band_delete', { id }); // ---- attachment ---- -export const attachmentAdd = (p: { owner_id: number; file_name: string; mime?: string; size: number; data_b64: string }) => +export const attachmentAdd = (p: { owner_id: number; file_name: string; mime?: string; size: number; data_b64: string; thumb_b64?: string }) => call<{ item: Attachment }>('attachment_add', p); export const attachmentList = (owner_id: number) => call<{ items: Attachment[] }>('attachment_list', { owner_id }); export const attachmentDelete = (id: number) => call<{ ok: true }>('attachment_delete', { id }); export const attachmentRead = (id: number) => call<{ data_b64: string; mime?: string; file_name: string }>('attachment_read', { id }); +export const attachmentThumb = (id: number) => + call<{ data_b64: string; mime?: string; file_name: string }>('attachment_thumb', { id }); // ---- saved view ---- export interface SavedView { id: number; name: string; filter: Record; sort?: Record; is_default: boolean; } diff --git a/app/src/lib/types.ts b/app/src/lib/types.ts index 746e1fa..ae6d1ea 100644 --- a/app/src/lib/types.ts +++ b/app/src/lib/types.ts @@ -50,6 +50,7 @@ export interface Attachment { mime?: string | null; size: number; rel_path: string; + thumb_rel_path?: string | null; created_at: string; } diff --git a/scripts/test-integration.mjs b/scripts/test-integration.mjs index 6b2b87c..064882f 100644 --- a/scripts/test-integration.mjs +++ b/scripts/test-integration.mjs @@ -57,6 +57,20 @@ ok((tl.body?.data?.groups?.length ?? 0) >= 1, 'timeline 有分组'); const st = await api(A, 'POST', '/api/stats_overview', {}, T); ok(st.body?.ok === true, 'stats_overview 可用'); +// 附件缩略图:上传带 thumb → 列表标记 → thumb/原图分离读取 +const tl0 = await api(A, 'POST', '/api/type_list', {}, T); +const fpUp = await api(A, 'POST', '/api/footprint_upsert', { item: { type_id: (tl0.body?.data?.items || [])[0]?.id, title: '附件缩略图测试', status: 'finished' } }, T); +const fpId = fpUp.body?.data?.id; +ok(!!fpId, '创建附件测试足迹', fpUp.body); +const attAdd = await api(A, 'POST', '/api/attachment_add', { owner_id: fpId, file_name: 'photo.jpg', mime: 'image/jpeg', size: 8, data_b64: Buffer.from('ORIGDATA').toString('base64'), thumb_b64: Buffer.from('THUMBWEBPDATA').toString('base64') }, T); +ok(attAdd.body?.ok === true && !!attAdd.body?.data?.item?.thumb_rel_path, 'attachment_add 存储缩略图', attAdd.body); +const attList = await api(A, 'POST', '/api/attachment_list', { owner_id: fpId }, T); +ok(!!attList.body?.data?.items?.[0]?.thumb_rel_path, 'attachment_list 返回缩略图标记'); +const attThumb = await api(A, 'POST', '/api/attachment_thumb', { id: attAdd.body?.data?.item?.id }, T); +ok(attThumb.body?.data?.data_b64 === Buffer.from('THUMBWEBPDATA').toString('base64'), 'attachment_thumb 返回缩略图内容', attThumb.body); +const attRead2 = await api(A, 'POST', '/api/attachment_read', { id: attAdd.body?.data?.item?.id }, T); +ok(attRead2.body?.data?.data_b64 === Buffer.from('ORIGDATA').toString('base64'), 'attachment_read 原图不受影响', attRead2.body); + // 邀请码:增 const c1 = await api(A, 'POST', '/admin/invites/create', { code: 'xiong-friend-2025', remark: '给学弟的码' }, T); ok(c1.status === 200 && c1.body?.data?.code === 'XIONG-FRIEND-2025', '新建自定义码(大小写归一化)', c1.body); @@ -97,7 +111,7 @@ const login2 = await api(B, 'POST', '/auth/login', { username: 'demo', password: ok(login2.status === 200, '重启后 demo 可登录'); const T2 = login2.body.data.token; const fp2 = await api(B, 'POST', '/api/footprint_list', { query: { page: 1, page_size: 50 } }, T2); -ok(fp2.body?.data?.total === 16, '重启后仍是 16 条(无重复播种)', fp2.body?.data?.total); +ok(fp2.body?.data?.total === 17, '重启后仍是 17 条(无重复播种)', fp2.body?.data?.total); const list2 = (await api(B, 'GET', '/admin/invites', undefined, T2)).body.data.invites; ok(list2.some((i) => i.code === 'XIONG-FRIEND-2025'), '邀请码跨重启持久化'); diff --git a/sync-server/www/assets/AdminPage-CdVQYDMm.js b/sync-server/www/assets/AdminPage-CrUVnwRu.js similarity index 97% rename from sync-server/www/assets/AdminPage-CdVQYDMm.js rename to sync-server/www/assets/AdminPage-CrUVnwRu.js index ae5861b..701aeb1 100644 --- a/sync-server/www/assets/AdminPage-CdVQYDMm.js +++ b/sync-server/www/assets/AdminPage-CrUVnwRu.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C58ZhVdG.js","assets/index-zuv9BCiF.css"])))=>i.map(i=>d[i]); -import{c as o,u as Z,Y,e as _,Z as C,r as n,f as h,j as s,E as w,B as t,_ as U,P as J,I as z,i as ee,k as se,T as ae,A as p,$ as te,a0 as ne,a1 as ie,a2 as re,a3 as ce,a4 as de,a5 as le,a6 as oe}from"./index-C58ZhVdG.js";import{C as $,a as A,b as B}from"./card-DTW0IIxx.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DrwMmj76.js","assets/index-zuv9BCiF.css"])))=>i.map(i=>d[i]); +import{c as o,u as Z,Y,e as _,Z as C,r as n,f as h,j as s,E as w,B as t,_ as U,P as J,I as z,i as ee,k as se,T as ae,A as p,$ as te,a0 as ne,a1 as ie,a2 as re,a3 as ce,a4 as de,a5 as le,a6 as oe}from"./index-DrwMmj76.js";import{C as $,a as A,b as B}from"./card-DvRCiB1a.js";/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. @@ -24,5 +24,5 @@ import{c as o,u as Z,Y,e as _,Z as C,r as n,f as h,j as s,E as w,B as t,_ as U,P * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ye=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],ke=o("UsersRound",ye);function be({i:c}){return c.used_by?s.jsx(p,{color:"var(--text-3)",children:"已使用"}):c.valid?s.jsx(p,{color:"var(--success)",children:"可用"}):s.jsx(p,{color:"var(--warning)",children:"已停用"})}function Ne(){var Q,K,L;const c=Z(),i=Y(),E=_({queryKey:["me-admin"],queryFn:async()=>(await de(()=>import("./index-C58ZhVdG.js").then(a=>a.a7),__vite__mapDeps([0,1]))).serverMe(i),enabled:!!C()}),M=_({queryKey:["admin-users"],queryFn:()=>le(i),enabled:!!C()}),v=_({queryKey:["admin-invites"],queryFn:()=>oe(i),enabled:!!C()}),[I,r]=n.useState(""),[H,S]=n.useState(null),[V,j]=n.useState(!1),[x,y]=n.useState(""),[q,k]=n.useState(""),[G,d]=n.useState(null),[b,f]=n.useState(""),[l,W]=n.useState("all"),m=()=>{c.invalidateQueries({queryKey:["admin-invites"]})},u=e=>r(e.message||"操作失败"),F=h({mutationFn:()=>ne(5,i),onSuccess:e=>{m(),r(""),navigator.clipboard.writeText(e.codes.join(` + */const ye=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],ke=o("UsersRound",ye);function be({i:c}){return c.used_by?s.jsx(p,{color:"var(--text-3)",children:"已使用"}):c.valid?s.jsx(p,{color:"var(--success)",children:"可用"}):s.jsx(p,{color:"var(--warning)",children:"已停用"})}function Ne(){var Q,K,L;const c=Z(),i=Y(),E=_({queryKey:["me-admin"],queryFn:async()=>(await de(()=>import("./index-DrwMmj76.js").then(a=>a.a7),__vite__mapDeps([0,1]))).serverMe(i),enabled:!!C()}),M=_({queryKey:["admin-users"],queryFn:()=>le(i),enabled:!!C()}),v=_({queryKey:["admin-invites"],queryFn:()=>oe(i),enabled:!!C()}),[I,r]=n.useState(""),[H,S]=n.useState(null),[V,j]=n.useState(!1),[x,y]=n.useState(""),[q,k]=n.useState(""),[G,d]=n.useState(null),[b,f]=n.useState(""),[l,W]=n.useState("all"),m=()=>{c.invalidateQueries({queryKey:["admin-invites"]})},u=e=>r(e.message||"操作失败"),F=h({mutationFn:()=>ne(5,i),onSuccess:e=>{m(),r(""),navigator.clipboard.writeText(e.codes.join(` `)).catch(()=>{})},onError:u}),g=h({mutationFn:()=>ie(x.trim(),q.trim(),i),onSuccess:()=>{m(),j(!1),y(""),k(""),r("")},onError:u}),N=h({mutationFn:e=>re(e.id,e.patch,i),onSuccess:()=>{m(),d(null),r("")},onError:u}),X=h({mutationFn:e=>ce(e,i),onSuccess:()=>{m(),r("")},onError:u}),T=n.useMemo(()=>{var e;return((e=v.data)==null?void 0:e.invites)??[]},[v.data]),P=((Q=M.data)==null?void 0:Q.users)??[],R=n.useMemo(()=>T.filter(e=>l==="valid"?e.valid&&!e.used_by:l==="used"?!!e.used_by:l==="disabled"?!e.valid&&!e.used_by:!0),[T,l]);if(E.data&&!E.data.is_admin)return s.jsx(w,{title:"需要管理员账号",description:"当前登录账号不是管理员。"});const D=e=>{navigator.clipboard.writeText(e.code),S(e.id),setTimeout(()=>S(a=>a===e.id?null:a),1500)};return s.jsxs("div",{className:"mx-auto max-w-[1080px] px-6 py-5",children:[s.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[s.jsx("h2",{className:"text-[15px] font-semibold text-ink-1",children:"管理"}),s.jsxs(t,{variant:"secondary",onClick:()=>{c.invalidateQueries()},children:[s.jsx(pe,{size:13})," 刷新"]})]}),I&&s.jsxs("div",{className:"mb-3 flex items-center justify-between rounded-md border border-danger/30 bg-danger-subtle px-3 py-2 text-[12px] text-danger",children:[s.jsx("span",{children:I}),s.jsx("button",{className:"rounded p-0.5 hover:bg-surface-3",onClick:()=>r(""),"aria-label":"关闭",children:s.jsx(U,{size:13})})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[s.jsxs($,{children:[s.jsx(A,{title:"邀请码("+(((K=v.data)==null?void 0:K.total)??0)+")",extra:s.jsxs("div",{className:"flex gap-1.5",children:[s.jsxs(t,{size:"sm",variant:"secondary",onClick:()=>{j(e=>!e),r("")},children:[s.jsx(J,{size:13})," 新建"]}),s.jsx(t,{size:"sm",variant:"primary",disabled:F.isPending,onClick:()=>F.mutate(),children:"批量生成 5 个"})]})}),s.jsxs(B,{className:"p-0",children:[V&&s.jsxs("div",{className:"flex flex-wrap items-end gap-2 border-b border-line bg-surface-2 px-4 py-3",children:[s.jsxs("label",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-[11px] font-medium text-ink-3",children:"邀请码(4-32 位字母数字-_)"}),s.jsx(z,{className:"w-[210px]",value:x,placeholder:"如 XIONG-2025",onChange:e=>y(e.target.value)})]}),s.jsxs("label",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-[11px] font-medium text-ink-3",children:"备注(可选)"}),s.jsx(z,{className:"w-[180px]",value:q,placeholder:"发给谁 / 用途",onChange:e=>k(e.target.value),onKeyDown:e=>{e.key==="Enter"&&x.trim()&&g.mutate()}})]}),s.jsxs("div",{className:"flex gap-1.5 pb-0.5",children:[s.jsx(t,{size:"sm",variant:"primary",disabled:!x.trim()||g.isPending,onClick:()=>g.mutate(),children:"创建"}),s.jsx(t,{size:"sm",variant:"ghost",onClick:()=>{j(!1),y(""),k("")},children:"取消"})]})]}),s.jsx("div",{className:"flex gap-1 border-b border-line px-4 py-2 text-[12px]",children:[["all","全部"],["valid","可用"],["used","已使用"],["disabled","已停用"]].map(([e,a])=>s.jsx("button",{className:"rounded-md px-2.5 py-1 transition-colors "+(l===e?"bg-brand-subtle font-medium text-brand-text":"text-ink-3 hover:bg-surface-3"),onClick:()=>W(e),children:a},e))}),R.length?s.jsx("div",{className:"divide-y divide-line max-h-[430px] overflow-y-auto",children:R.map(e=>s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 text-[12.5px]",children:[s.jsx("button",{className:"num shrink-0 cursor-pointer rounded-sm bg-surface-3 px-1.5 py-0.5 font-mono text-[12px] text-ink-1 transition-colors hover:bg-brand-subtle hover:text-brand-text",title:"点击复制",onClick:()=>D(e),children:H===e.id?s.jsxs("span",{className:"inline-flex items-center gap-1 text-success",children:[s.jsx(O,{size:11}),"已复制"]}):e.code}),s.jsx(be,{i:e}),G===e.id?s.jsxs("span",{className:"ml-1 flex min-w-0 flex-1 items-center gap-1",children:[s.jsx(z,{className:"h-7 flex-1 text-[12px]",value:b,autoFocus:!0,placeholder:"备注(64 字以内)",onChange:a=>f(a.target.value),onKeyDown:a=>{a.key==="Enter"&&N.mutate({id:e.id,patch:{remark:b}}),a.key==="Escape"&&d(null)}}),s.jsx(t,{size:"icon-sm",variant:"ghost","aria-label":"保存备注",className:"text-success",onClick:()=>N.mutate({id:e.id,patch:{remark:b}}),children:s.jsx(O,{size:13})}),s.jsx(t,{size:"icon-sm",variant:"ghost","aria-label":"取消",className:"text-ink-3",onClick:()=>d(null),children:s.jsx(U,{size:13})})]}):s.jsx("button",{className:"min-w-0 flex-1 truncate text-left text-[12px] text-ink-3 hover:text-ink-2",title:e.remark?"点击编辑备注":e.created_by_name?"由 "+e.created_by_name+" 创建 · 点击添加备注":"点击添加备注",onClick:()=>{d(e.id),f(e.remark??"")},children:e.remark||(e.created_by_name?"由 "+e.created_by_name+" 创建":s.jsx("span",{className:"opacity-60",children:"添加备注…"}))}),e.used_by_name&&s.jsxs("span",{className:"shrink-0 text-ink-3",children:["被 ",e.used_by_name," 使用于 ",ee(e.used_at)]}),s.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[s.jsx(t,{size:"icon-sm",variant:"ghost","aria-label":"复制",className:"text-ink-3",onClick:()=>D(e),children:s.jsx(ue,{size:13})}),!e.used_by&&s.jsxs(s.Fragment,{children:[s.jsx(t,{size:"icon-sm",variant:"ghost","aria-label":"编辑备注",className:"text-ink-3",onClick:()=>{d(e.id),f(e.remark??"")},children:s.jsx(se,{size:13})}),s.jsx(t,{size:"sm",variant:"ghost",className:e.valid?"text-ink-3 hover:text-warning":"text-ink-3 hover:text-success",onClick:()=>N.mutate({id:e.id,patch:{valid:!e.valid}}),children:e.valid?"停用":"启用"})]}),s.jsx(t,{size:"icon-sm",variant:"ghost","aria-label":"删除",className:"text-ink-3 hover:text-danger",onClick:()=>{window.confirm("删除邀请码 "+e.code+"?此操作不可恢复。")&&X.mutate(e.id)},children:s.jsx(ae,{size:13})})]})]},e.id))}):s.jsx(w,{icon:s.jsx(je,{size:32,strokeWidth:1.5}),title:"暂无符合条件的邀请码",description:"新建自定义邀请码,或批量生成后发给需要注册的用户。"})]})]}),s.jsxs($,{children:[s.jsx(A,{title:"用户("+(((L=M.data)==null?void 0:L.total)??0)+")"}),s.jsx(B,{className:"p-0",children:P.length?s.jsx("div",{className:"divide-y divide-line max-h-[520px] overflow-y-auto",children:P.map(e=>s.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 text-[12.5px]",children:[s.jsx("span",{className:"font-medium text-ink-1",children:e.username}),e.is_admin&&s.jsx(p,{color:"var(--brand-text)",children:"管理员"}),s.jsxs("span",{className:"num ml-auto text-ink-3",children:[e.devices," 设备 · ",e.records," 记录 · ",te(e.attachment_bytes)]})]},e.id))}):s.jsx(w,{icon:s.jsx(ke,{size:32,strokeWidth:1.5}),title:"暂无用户"})})]})]})]})}export{Ne as AdminPage}; diff --git a/sync-server/www/assets/DashboardPage-Dy-fKGMF.js b/sync-server/www/assets/DashboardPage-Dv6k8rrZ.js similarity index 94% rename from sync-server/www/assets/DashboardPage-Dy-fKGMF.js rename to sync-server/www/assets/DashboardPage-Dv6k8rrZ.js index 557d9e1..3a0be18 100644 --- a/sync-server/www/assets/DashboardPage-Dy-fKGMF.js +++ b/sync-server/www/assets/DashboardPage-Dv6k8rrZ.js @@ -1 +1 @@ -import{r as g,e as v,j as t,S as j,s as S}from"./index-C58ZhVdG.js";import{C as c,a as d,b as x}from"./card-DTW0IIxx.js";import{u as N,i as u,a as m}from"./useChart-BSpPh9BI.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-6 py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage}; +import{r as g,e as v,j as t,S as j,s as S}from"./index-DrwMmj76.js";import{C as c,a as d,b as x}from"./card-DvRCiB1a.js";import{u as N,i as u,a as m}from"./useChart-BCLvza0E.js";import{u as k,i as w,a as C,b as L,c as R,d as $,e as z,f as T}from"./echarts-BIWefrIc.js";k([w,C,L,R,$,z,T]);function q(){const[l,n]=g.useState(""),i=N(),e=v({queryKey:["stats",l||void 0],queryFn:()=>S(l?Number(l):void 0)}).data,p=u("2"),r=u("3"),h=m(()=>({grid:{left:34,right:12,top:14,bottom:24},tooltip:{trigger:"axis"},xAxis:{type:"category",data:(e==null?void 0:e.monthly.map(a=>a.ym.slice(2)))??[],axisLine:{lineStyle:{color:r}},axisTick:{show:!1},axisLabel:{color:r,fontSize:10}},yAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},series:[{type:"bar",data:(e==null?void 0:e.monthly.map(a=>a.count))??[],barMaxWidth:18,itemStyle:{color:"#3056d3",borderRadius:[3,3,0,0]}}]}),[e,i]),b=m(()=>{const a=((e==null?void 0:e.by_type)??[]).filter(s=>s.count>0);return{tooltip:{trigger:"item"},legend:{orient:"vertical",right:4,top:"middle",textStyle:{color:p,fontSize:11},itemWidth:10,itemHeight:10},series:[{type:"pie",radius:["48%","72%"],center:["34%","50%"],label:{show:!1},data:a.map(s=>({name:s.label,value:s.count,itemStyle:{color:s.color||"#64748b"}}))}]}},[e,i]),y=m(()=>{const a=((e==null?void 0:e.by_level)??[]).filter(s=>s.count>0).slice().reverse();return{grid:{left:64,right:24,top:8,bottom:22},tooltip:{trigger:"axis"},xAxis:{type:"value",splitLine:{lineStyle:{color:"rgba(128,138,155,0.15)"}},axisLabel:{color:r,fontSize:10}},yAxis:{type:"category",data:a.map(s=>s.label),axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:p,fontSize:11}},series:[{type:"bar",data:a.map(s=>({value:s.count,itemStyle:{color:s.color||"#3056d3",borderRadius:[0,3,3,0]}})),barMaxWidth:14}]}},[e,i]),f=((e==null?void 0:e.metrics)??[]).slice(0,3);return t.jsxs("div",{className:"mx-auto max-w-[1080px] px-6 py-5",children:[t.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-wrap gap-3",children:[t.jsx(o,{label:"总记录",value:(e==null?void 0:e.total)??0}),t.jsx(o,{label:l?l+" 年新增":"本年新增",value:(e==null?void 0:e.total_this_year)??0}),t.jsx(o,{label:"附件总数",value:(e==null?void 0:e.attachment_total)??0}),f.map(a=>t.jsx(o,{label:a.label,value:a.value,unit:a.unit??""},a.key))]}),t.jsx(j,{className:"w-[120px]",value:l,onChange:a=>n(a.target.value),options:[{value:"",label:"全部年份"},...((e==null?void 0:e.years)??[]).map(a=>({value:String(a),label:a+" 年"}))]})]}),!(e!=null&&e.metrics.length)&&t.jsx("div",{className:"mb-4 rounded-md border border-dashed border-line px-4 py-2 text-[12px] text-ink-3",children:"提示:在「统计」配置中注册指标(如志愿时长、读书本数),带单位的数值字段即可在此量化展示。"}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[t.jsxs(c,{children:[t.jsx(d,{title:"近 12 个月活跃度"}),t.jsx(x,{children:t.jsx("div",{ref:h,className:"h-[220px]"})})]}),t.jsxs(c,{children:[t.jsx(d,{title:"类型分布"}),t.jsx(x,{children:t.jsx("div",{ref:b,className:"h-[220px]"})})]}),t.jsxs(c,{className:"col-span-2",children:[t.jsx(d,{title:"级别分布"}),t.jsx(x,{children:t.jsx("div",{ref:y,className:"h-[200px]"})})]})]})]})}function o({label:l,value:n,unit:i}){return t.jsxs("div",{className:"min-w-[120px] rounded-lg border border-line bg-surface px-4 py-3 shadow-card",children:[t.jsx("div",{className:"text-[12px] text-ink-3",children:l}),t.jsxs("div",{className:"num mt-0.5 text-[22px] font-semibold leading-tight text-ink-1",children:[n,i&&t.jsx("span",{className:"ml-1 text-[12px] font-normal text-ink-3",children:i})]})]})}export{q as DashboardPage}; diff --git a/sync-server/www/assets/GradesPage-3W18KBgT.js b/sync-server/www/assets/GradesPage-CWm5gsW9.js similarity index 99% rename from sync-server/www/assets/GradesPage-3W18KBgT.js rename to sync-server/www/assets/GradesPage-CWm5gsW9.js index b43a800..7b4eaa4 100644 --- a/sync-server/www/assets/GradesPage-3W18KBgT.js +++ b/sync-server/www/assets/GradesPage-CWm5gsW9.js @@ -1,4 +1,4 @@ -import{c as K,e as I,j as e,E as O,t as $,u as k,b as S,r as u,f as y,v as H,w as W,B as g,P as q,C as Q,x as J,y as T,z as U,A as N,k as G,T as E,I as j,D as Y,F as C,H as B,J as V}from"./index-C58ZhVdG.js";import{C as f,a as z,b as _}from"./card-DTW0IIxx.js";import{u as X,i as M,a as L}from"./useChart-BSpPh9BI.js";import{u as Z,i as ee,b as se,a as te,c as ae,d as re,e as ne,f as le}from"./echarts-BIWefrIc.js";/** +import{c as K,e as I,j as e,E as O,t as $,u as k,b as S,r as u,f as y,v as H,w as W,B as g,P as q,C as Q,x as J,y as T,z as U,A as N,k as G,T as E,I as j,D as Y,F as C,H as B,J as V}from"./index-DrwMmj76.js";import{C as f,a as z,b as _}from"./card-DvRCiB1a.js";import{u as X,i as M,a as L}from"./useChart-BCLvza0E.js";import{u as Z,i as ee,b as se,a as te,c as ae,d as re,e as ne,f as le}from"./echarts-BIWefrIc.js";/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. diff --git a/sync-server/www/assets/RecordsPage-DCcPHJLj.js b/sync-server/www/assets/RecordsPage-BN4jf1vQ.js similarity index 99% rename from sync-server/www/assets/RecordsPage-DCcPHJLj.js rename to sync-server/www/assets/RecordsPage-BN4jf1vQ.js index d8969db..00c1cb6 100644 --- a/sync-server/www/assets/RecordsPage-DCcPHJLj.js +++ b/sync-server/www/assets/RecordsPage-BN4jf1vQ.js @@ -1,4 +1,4 @@ -import{c as re,j as e,a as u,r as t,u as oe,b as ce,d as de,e as C,f as ue,I as xe,S as m,B as b,P as Y,g as pe,L as me,G as ve,R as he,h as je,i as ge,k as fe,T as ye,E as be,l as Ne,m as ke,C as Se,n as we,o as Ce,p as Ee,s as qe,q as _e}from"./index-C58ZhVdG.js";/** +import{c as re,j as e,a as u,r as t,u as oe,b as ce,d as de,e as C,f as ue,I as xe,S as m,B as b,P as Y,g as pe,L as me,G as ve,R as he,h as je,i as ge,k as fe,T as ye,E as be,l as Ne,m as ke,C as Se,n as we,o as Ce,p as Ee,s as qe,q as _e}from"./index-DrwMmj76.js";/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. diff --git a/sync-server/www/assets/TaxonomyPage-DcVYYRRF.js b/sync-server/www/assets/TaxonomyPage--zwAHhtt.js similarity index 97% rename from sync-server/www/assets/TaxonomyPage-DcVYYRRF.js rename to sync-server/www/assets/TaxonomyPage--zwAHhtt.js index a42cb59..b68516d 100644 --- a/sync-server/www/assets/TaxonomyPage-DcVYYRRF.js +++ b/sync-server/www/assets/TaxonomyPage--zwAHhtt.js @@ -1 +1 @@ -import{j as e,u as k,b as Q,e as q,r as g,f as h,Q as F,U as w,B as j,T as z,I as D,P as T,C as E,V as M,W as B,p as P,X as V}from"./index-C58ZhVdG.js";import{C as K,a as S}from"./card-DTW0IIxx.js";const f=["#3056d3","#7c3aed","#0891b2","#16a34a","#d97706","#dc2626","#db2777","#64748b"];function H(){return e.jsxs("div",{className:"mx-auto max-w-[1080px] px-6 py-5",children:[e.jsx("p",{className:"mb-4 text-[12px] text-ink-3",children:"字典驱动录入表单中的下拉选项;维度是自定义的成长分类轴,一条记录可挂多个维度。"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsx(C,{kind:"level",title:"级别字典",description:"国际级、国家级、省市级等,可按学校口径增改"}),e.jsx(C,{kind:"role",title:"角色字典",description:"主导、核心、参加等参与角色"}),e.jsx(I,{})]})]})}function C({kind:r,title:m,description:N}){var v;const l=k(),o=Q(),n=(((v=q({queryKey:["taxonomy-all"],queryFn:()=>P()}).data)==null?void 0:v.items)??[]).filter(s=>s.kind===r).sort((s,x)=>s.sort-x.sort),[a,c]=g.useState(""),[u,d]=g.useState(null),t=h({mutationFn:F,onSuccess:()=>void l.invalidateQueries({queryKey:["taxonomy-all"]})}),i=h({mutationFn:s=>w(s),onSuccess:()=>{l.invalidateQueries({queryKey:["taxonomy-all"]}),o("success","已删除"),d(null)},onError:s=>{o("error",s.message),d(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:m,extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:N})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[n.map((s,x)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("input",{type:"color",value:s.color??f[x%f.length],className:"size-5 cursor-pointer rounded border border-line bg-surface",onChange:y=>t.mutate({id:s.id,kind:r,value:s.value,color:y.target.value,sort:s.sort})}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",value:s.value,onChange:()=>{},onBlur:y=>{const b=y.target.value.trim();b&&b!==s.value&&t.mutate({id:s.id,kind:r,value:b,color:s.color,sort:s.sort})},defaultValue:s.value},s.value),e.jsxs("span",{className:"num w-14 text-right text-[11px] text-ink-3",children:["#",s.sort]}),s.is_builtin?e.jsx("span",{className:"w-7 text-center text-[11px] text-ink-3",children:"内置"}):e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>d({id:s.id,value:s.value}),children:e.jsx(z,{size:13})})]},s.id)),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(D,{className:"flex-1",placeholder:"新增条目,回车或点击按钮",value:a,onChange:s=>c(s.target.value),onKeyDown:s=>{var x;s.key==="Enter"&&a.trim()&&(t.mutate({kind:r,value:a.trim(),sort:(((x=n.at(-1))==null?void 0:x.sort)??0)+10}),c(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!a.trim(),onClick:()=>{var s;t.mutate({kind:r,value:a.trim(),sort:(((s=n.at(-1))==null?void 0:s.sort)??0)+10}),c("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!u,title:"删除字典条目",content:u?"确定删除「"+u.value+"」吗?":"",onCancel:()=>d(null),onOk:()=>u&&i.mutate(u.id)})]})}function I(){var d;const r=k(),m=Q(),l=[...((d=q({queryKey:["dimensions"],queryFn:V}).data)==null?void 0:d.items)??[]].sort((t,i)=>t.sort-i.sort),[o,p]=g.useState(""),[n,a]=g.useState(null),c=h({mutationFn:M,onSuccess:()=>void r.invalidateQueries({queryKey:["dimensions"]})}),u=h({mutationFn:t=>B(t),onSuccess:()=>{r.invalidateQueries({queryKey:["dimensions"]}),m("success","已删除"),a(null)},onError:t=>{m("error",t.message),a(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:"成长维度",extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:"如:学业深造 / 职业发展 / 兴趣生活"})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[l.map((t,i)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("span",{className:"size-3 rounded-full",style:{backgroundColor:t.color??f[i%f.length]}}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",defaultValue:t.name,onBlur:v=>{const s=v.target.value.trim();s&&s!==t.name&&c.mutate({id:t.id,name:s,color:t.color,sort:t.sort})}},t.name),e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>a({id:t.id,name:t.name}),children:e.jsx(z,{size:13})})]},t.id)),!l.length&&e.jsx("div",{className:"py-2 text-center text-[12px] text-ink-3",children:"尚未配置维度"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(D,{className:"flex-1",placeholder:"新增维度名称",value:o,onChange:t=>p(t.target.value),onKeyDown:t=>{var i;t.key==="Enter"&&o.trim()&&(c.mutate({name:o.trim(),sort:(((i=l.at(-1))==null?void 0:i.sort)??0)+10}),p(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!o.trim(),onClick:()=>{var t;c.mutate({name:o.trim(),sort:(((t=l.at(-1))==null?void 0:t.sort)??0)+10}),p("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!n,title:"删除维度",content:n?"确定删除「"+n.name+"」吗?记录与该维度的关联将一并移除。":"",onCancel:()=>a(null),onOk:()=>n&&u.mutate(n.id)})]})}export{H as TaxonomyPage}; +import{j as e,u as k,b as Q,e as q,r as g,f as h,Q as F,U as w,B as j,T as z,I as D,P as T,C as E,V as M,W as B,p as P,X as V}from"./index-DrwMmj76.js";import{C as K,a as S}from"./card-DvRCiB1a.js";const f=["#3056d3","#7c3aed","#0891b2","#16a34a","#d97706","#dc2626","#db2777","#64748b"];function H(){return e.jsxs("div",{className:"mx-auto max-w-[1080px] px-6 py-5",children:[e.jsx("p",{className:"mb-4 text-[12px] text-ink-3",children:"字典驱动录入表单中的下拉选项;维度是自定义的成长分类轴,一条记录可挂多个维度。"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsx(C,{kind:"level",title:"级别字典",description:"国际级、国家级、省市级等,可按学校口径增改"}),e.jsx(C,{kind:"role",title:"角色字典",description:"主导、核心、参加等参与角色"}),e.jsx(I,{})]})]})}function C({kind:r,title:m,description:N}){var v;const l=k(),o=Q(),n=(((v=q({queryKey:["taxonomy-all"],queryFn:()=>P()}).data)==null?void 0:v.items)??[]).filter(s=>s.kind===r).sort((s,x)=>s.sort-x.sort),[a,c]=g.useState(""),[u,d]=g.useState(null),t=h({mutationFn:F,onSuccess:()=>void l.invalidateQueries({queryKey:["taxonomy-all"]})}),i=h({mutationFn:s=>w(s),onSuccess:()=>{l.invalidateQueries({queryKey:["taxonomy-all"]}),o("success","已删除"),d(null)},onError:s=>{o("error",s.message),d(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:m,extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:N})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[n.map((s,x)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("input",{type:"color",value:s.color??f[x%f.length],className:"size-5 cursor-pointer rounded border border-line bg-surface",onChange:y=>t.mutate({id:s.id,kind:r,value:s.value,color:y.target.value,sort:s.sort})}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",value:s.value,onChange:()=>{},onBlur:y=>{const b=y.target.value.trim();b&&b!==s.value&&t.mutate({id:s.id,kind:r,value:b,color:s.color,sort:s.sort})},defaultValue:s.value},s.value),e.jsxs("span",{className:"num w-14 text-right text-[11px] text-ink-3",children:["#",s.sort]}),s.is_builtin?e.jsx("span",{className:"w-7 text-center text-[11px] text-ink-3",children:"内置"}):e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>d({id:s.id,value:s.value}),children:e.jsx(z,{size:13})})]},s.id)),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(D,{className:"flex-1",placeholder:"新增条目,回车或点击按钮",value:a,onChange:s=>c(s.target.value),onKeyDown:s=>{var x;s.key==="Enter"&&a.trim()&&(t.mutate({kind:r,value:a.trim(),sort:(((x=n.at(-1))==null?void 0:x.sort)??0)+10}),c(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!a.trim(),onClick:()=>{var s;t.mutate({kind:r,value:a.trim(),sort:(((s=n.at(-1))==null?void 0:s.sort)??0)+10}),c("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!u,title:"删除字典条目",content:u?"确定删除「"+u.value+"」吗?":"",onCancel:()=>d(null),onOk:()=>u&&i.mutate(u.id)})]})}function I(){var d;const r=k(),m=Q(),l=[...((d=q({queryKey:["dimensions"],queryFn:V}).data)==null?void 0:d.items)??[]].sort((t,i)=>t.sort-i.sort),[o,p]=g.useState(""),[n,a]=g.useState(null),c=h({mutationFn:M,onSuccess:()=>void r.invalidateQueries({queryKey:["dimensions"]})}),u=h({mutationFn:t=>B(t),onSuccess:()=>{r.invalidateQueries({queryKey:["dimensions"]}),m("success","已删除"),a(null)},onError:t=>{m("error",t.message),a(null)}});return e.jsxs(K,{children:[e.jsx(S,{title:"成长维度",extra:e.jsx("span",{className:"text-[11px] text-ink-3",children:"如:学业深造 / 职业发展 / 兴趣生活"})}),e.jsxs("div",{className:"flex flex-col gap-1 p-3",children:[l.map((t,i)=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md px-1 py-1 hover:bg-surface-2",children:[e.jsx("span",{className:"size-3 rounded-full",style:{backgroundColor:t.color??f[i%f.length]}}),e.jsx("input",{className:"h-7 flex-1 rounded border border-transparent bg-transparent px-1.5 text-[13px] text-ink-1 hover:border-line focus:border-brand focus:outline-none",defaultValue:t.name,onBlur:v=>{const s=v.target.value.trim();s&&s!==t.name&&c.mutate({id:t.id,name:s,color:t.color,sort:t.sort})}},t.name),e.jsx(j,{variant:"ghost",size:"icon-sm","aria-label":"删除",onClick:()=>a({id:t.id,name:t.name}),children:e.jsx(z,{size:13})})]},t.id)),!l.length&&e.jsx("div",{className:"py-2 text-center text-[12px] text-ink-3",children:"尚未配置维度"}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 border-t border-line pt-2",children:[e.jsx(D,{className:"flex-1",placeholder:"新增维度名称",value:o,onChange:t=>p(t.target.value),onKeyDown:t=>{var i;t.key==="Enter"&&o.trim()&&(c.mutate({name:o.trim(),sort:(((i=l.at(-1))==null?void 0:i.sort)??0)+10}),p(""))}}),e.jsxs(j,{size:"sm",variant:"secondary",disabled:!o.trim(),onClick:()=>{var t;c.mutate({name:o.trim(),sort:(((t=l.at(-1))==null?void 0:t.sort)??0)+10}),p("")},children:[e.jsx(T,{size:13})," 添加"]})]})]}),e.jsx(E,{open:!!n,title:"删除维度",content:n?"确定删除「"+n.name+"」吗?记录与该维度的关联将一并移除。":"",onCancel:()=>a(null),onOk:()=>n&&u.mutate(n.id)})]})}export{H as TaxonomyPage}; diff --git a/sync-server/www/assets/TypesPage-D0Kw12Sh.js b/sync-server/www/assets/TypesPage-DtmU1Vij.js similarity index 98% rename from sync-server/www/assets/TypesPage-D0Kw12Sh.js rename to sync-server/www/assets/TypesPage-DtmU1Vij.js index e2fd250..05e711e 100644 --- a/sync-server/www/assets/TypesPage-D0Kw12Sh.js +++ b/sync-server/www/assets/TypesPage-DtmU1Vij.js @@ -1,4 +1,4 @@ -import{c as P,u as Q,b as z,e as B,r as i,f as T,j as e,B as p,P as F,K as q,A as E,k as D,T as I,C as K,M as L,D as G,F as r,I as j,N as H,S as R,O as W,o as J}from"./index-C58ZhVdG.js";import{C as U}from"./card-DTW0IIxx.js";/** +import{c as P,u as Q,b as z,e as B,r as i,f as T,j as e,B as p,P as F,K as q,A as E,k as D,T as I,C as K,M as L,D as G,F as r,I as j,N as H,S as R,O as W,o as J}from"./index-DrwMmj76.js";import{C as U}from"./card-DvRCiB1a.js";/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. diff --git a/sync-server/www/assets/card-DTW0IIxx.js b/sync-server/www/assets/card-DvRCiB1a.js similarity index 89% rename from sync-server/www/assets/card-DTW0IIxx.js rename to sync-server/www/assets/card-DvRCiB1a.js index 7779df8..6dca787 100644 --- a/sync-server/www/assets/card-DTW0IIxx.js +++ b/sync-server/www/assets/card-DvRCiB1a.js @@ -1 +1 @@ -import{j as s,a}from"./index-C58ZhVdG.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b}; +import{j as s,a}from"./index-DrwMmj76.js";function i({className:r,...e}){return s.jsx("div",{className:a("rounded-lg border border-line bg-surface shadow-card",r),...e})}function t({title:r,extra:e,className:n}){return s.jsxs("div",{className:a("flex min-h-11 flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-1.5",n),children:[s.jsx("h3",{className:"text-[13px] font-semibold text-ink-1",children:r}),e&&s.jsx("div",{className:"flex flex-wrap items-center gap-2",children:e})]})}function c({className:r,...e}){return s.jsx("div",{className:a("p-4",r),...e})}export{i as C,t as a,c as b}; diff --git a/sync-server/www/assets/index-C58ZhVdG.js b/sync-server/www/assets/index-C58ZhVdG.js deleted file mode 100644 index 48ce03e..0000000 --- a/sync-server/www/assets/index-C58ZhVdG.js +++ /dev/null @@ -1,311 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-Dy-fKGMF.js","assets/card-DTW0IIxx.js","assets/useChart-BSpPh9BI.js","assets/echarts-BIWefrIc.js","assets/GradesPage-3W18KBgT.js","assets/TypesPage-D0Kw12Sh.js","assets/TaxonomyPage-DcVYYRRF.js","assets/AdminPage-CdVQYDMm.js"])))=>i.map(i=>d[i]); -var _0=n=>{throw TypeError(n)};var Gf=(n,r,s)=>r.has(n)||_0("Cannot "+s);var E=(n,r,s)=>(Gf(n,r,"read from private field"),s?s.call(n):r.get(n)),fe=(n,r,s)=>r.has(n)?_0("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,s),P=(n,r,s,c)=>(Gf(n,r,"write to private field"),c?c.call(n,s):r.set(n,s),s),Ee=(n,r,s)=>(Gf(n,r,"access private method"),s);var Gs=(n,r,s,c)=>({set _(f){P(n,r,f,s)},get _(){return E(n,r,c)}});(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const d of h.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&c(d)}).observe(document,{childList:!0,subtree:!0});function s(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function c(f){if(f.ep)return;f.ep=!0;const h=s(f);fetch(f.href,h)}})();function Cg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yf={exports:{}},Wu={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var T0;function Yx(){if(T0)return Wu;T0=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(c,f,h){var d=null;if(h!==void 0&&(d=""+h),f.key!==void 0&&(d=""+f.key),"key"in f){h={};for(var v in f)v!=="key"&&(h[v]=f[v])}else h=f;return f=h.ref,{$$typeof:n,type:c,key:d,ref:f!==void 0?f:null,props:h}}return Wu.Fragment=r,Wu.jsx=s,Wu.jsxs=s,Wu}var N0;function Vx(){return N0||(N0=1,Yf.exports=Yx()),Yf.exports}var m=Vx(),Vf={exports:{}},pe={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var C0;function Xx(){if(C0)return pe;C0=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),d=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),C=Symbol.for("react.view_transition"),L=Symbol.iterator;function K(N){return N===null||typeof N!="object"?null:(N=L&&N[L]||N["@@iterator"],typeof N=="function"?N:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,k={};function G(N,Q,te){this.props=N,this.context=Q,this.refs=k,this.updater=te||B}G.prototype.isReactComponent={},G.prototype.setState=function(N,Q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,Q,"setState")},G.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function Z(){}Z.prototype=G.prototype;function J(N,Q,te){this.props=N,this.context=Q,this.refs=k,this.updater=te||B}var X=J.prototype=new Z;X.constructor=J,D(X,G.prototype),X.isPureReactComponent=!0;var ce=Array.isArray;function V(){}var M={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function ge(N,Q,te){var se=te.ref;return{$$typeof:n,type:N,key:Q,ref:se!==void 0?se:null,props:te}}function I(N,Q){return ge(N.type,Q,N.props)}function he(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function Je(N){var Q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(te){return Q[te]})}var U=/\/+/g;function ee(N,Q){return typeof N=="object"&&N!==null&&N.key!=null?Je(""+N.key):Q.toString(36)}function Y(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(V,V):(N.status="pending",N.then(function(Q){N.status==="pending"&&(N.status="fulfilled",N.value=Q)},function(Q){N.status==="pending"&&(N.status="rejected",N.reason=Q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function W(N,Q,te,se,ze){var me=typeof N;(me==="undefined"||me==="boolean")&&(N=null);var je=!1;if(N===null)je=!0;else switch(me){case"bigint":case"string":case"number":je=!0;break;case"object":switch(N.$$typeof){case n:case r:je=!0;break;case x:return je=N._init,W(je(N._payload),Q,te,se,ze)}}if(je)return ze=ze(N),je=se===""?"."+ee(N,0):se,ce(ze)?(te="",je!=null&&(te=je.replace(U,"$&/")+"/"),W(ze,Q,te,"",function(Gt){return Gt})):ze!=null&&(he(ze)&&(ze=I(ze,te+(ze.key==null||N&&N.key===ze.key?"":(""+ze.key).replace(U,"$&/")+"/")+je)),Q.push(ze)),1;je=0;var ue=se===""?".":se+":";if(ce(N))for(var ye=0;ye>>1,F=Y[ke];if(0>>1;kef(Ol,de))Nf(Q,Ol)?(Y[ke]=Q,Y[N]=de,ke=N):(Y[ke]=Ol,Y[ll]=de,ke=ll);else if(Nf(Q,de))Y[ke]=Q,Y[N]=de,ke=N;else break e}}return W}function f(Y,W){var de=Y.sortIndex-W.sortIndex;return de!==0?de:Y.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var d=Date,v=d.now();n.unstable_now=function(){return d.now()-v}}var b=[],g=[],x=1,p=null,C=3,L=!1,K=!1,B=!1,D=!1,k=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function J(Y){for(var W=s(g);W!==null;){if(W.callback===null)c(g);else if(W.startTime<=Y)c(g),W.sortIndex=W.expirationTime,r(b,W);else break;W=s(g)}}function X(Y){if(B=!1,J(Y),!K)if(s(b)!==null)K=!0,ce||(ce=!0,he());else{var W=s(g);W!==null&&ee(X,W.startTime-Y)}}var ce=!1,V=-1,M=5,ae=-1;function ge(){return D?!0:!(n.unstable_now()-aeY&&ge());){var ke=p.callback;if(typeof ke=="function"){p.callback=null,C=p.priorityLevel;var F=ke(p.expirationTime<=Y);if(Y=n.unstable_now(),typeof F=="function"){p.callback=F,J(Y),W=!0;break t}p===s(b)&&c(b),J(Y)}else c(b);p=s(b)}if(p!==null)W=!0;else{var Dt=s(g);Dt!==null&&ee(X,Dt.startTime-Y),W=!1}}break e}finally{p=null,C=de,L=!1}W=void 0}}finally{W?he():ce=!1}}}var he;if(typeof Z=="function")he=function(){Z(I)};else if(typeof MessageChannel<"u"){var Je=new MessageChannel,U=Je.port2;Je.port1.onmessage=I,he=function(){U.postMessage(null)}}else he=function(){k(I,0)};function ee(Y,W){V=k(function(){Y(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125ke?(Y.sortIndex=de,r(g,Y),s(b)===null&&Y===s(g)&&(B?(G(V),V=-1):B=!0,ee(X,de-ke))):(Y.sortIndex=F,r(b,Y),K||L||(K=!0,ce||(ce=!0,he()))),Y},n.unstable_shouldYield=ge,n.unstable_wrapCallback=function(Y){var W=C;return function(){var de=C;C=W;try{return Y.apply(this,arguments)}finally{C=de}}}})(Zf)),Zf}var w0;function Jx(){return w0||(w0=1,Kf.exports=Zx()),Kf.exports}var Jf={exports:{}},_t={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var R0;function Fx(){if(R0)return _t;R0=1;var n=Td();function r(x){var p="https://react.dev/errors/"+x;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Jf.exports=Fx(),Jf.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var A0;function $x(){if(A0)return Pu;A0=1;var n=Jx(),r=Td(),s=zg();function c(e){var t="https://react.dev/errors/"+e;if(1Vn||(e.current=ya[Vn],ya[Vn]=null,Vn--)}function Xe(e,t){Vn++,ya[Vn]=e.current,e.current=t}var Rl=wl(null),au=wl(null),va=wl(null),dr=wl(null);function hr(e,t){switch(Xe(va,t),Xe(au,e),Xe(Rl,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Av(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Av(t),e=Mv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vt(Rl),Xe(Rl,e)}function Xn(){vt(Rl),vt(au),vt(va)}function uc(e){var t=e.memoizedState;t!==null&&(Ai._currentValue=t.memoizedState,Xe(dr,e)),t=Rl.current;var l=Mv(t,e.type);t!==l&&(Xe(au,e),Xe(Rl,l))}function mr(e){au.current===e&&(vt(Rl),vt(au)),dr.current===e&&(vt(dr),Ai._currentValue=Gt)}var rc,Id;function ga(e){if(rc===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);rc=t&&t[1]||"",Id=-1)":-1i||S[a]!==w[i]){var A=` -`+S[a].replace(" at new "," at ");return e.displayName&&A.includes("")&&(A=A.replace("",e.displayName)),A}while(1<=a&&0<=i);break}}}finally{sc=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ga(l):""}function Zp(e,t){switch(e.tag){case 26:case 27:case 5:return ga(e.type);case 16:return ga("Lazy");case 13:return e.child!==t&&t!==null?ga("Suspense Fallback"):ga("Suspense");case 19:return ga("SuspenseList");case 0:case 15:return cc(e.type,!1);case 11:return cc(e.type.render,!1);case 1:return cc(e.type,!0);case 31:return ga("Activity");case 30:return ga("ViewTransition");default:return""}}function eh(e){try{var t="",l=null;do t+=Zp(e,l),l=e,e=e.return;while(e);return t}catch(a){return` -Error generating stack: `+a.message+` -`+a.stack}}var oc=Object.prototype.hasOwnProperty,fc=n.unstable_scheduleCallback,dc=n.unstable_cancelCallback,Jp=n.unstable_shouldYield,Fp=n.unstable_requestPaint,Yt=n.unstable_now,$p=n.unstable_getCurrentPriorityLevel,th=n.unstable_ImmediatePriority,lh=n.unstable_UserBlockingPriority,yr=n.unstable_NormalPriority,Wp=n.unstable_LowPriority,ah=n.unstable_IdlePriority,Pp=n.log,Ip=n.unstable_setDisableYieldValue,nu=null,Vt=null;function pa(e){if(typeof Pp=="function"&&Ip(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(nu,e)}catch{}}var Xt=Math.clz32?Math.clz32:l1,e1=Math.log,t1=Math.LN2;function l1(e){return e>>>=0,e===0?32:31-(e1(e)/t1|0)|0}var vr=256,gr=262144,pr=4194304;function an(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function br(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var i=0,u=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var y=a&134217727;return y!==0?(a=y&~u,a!==0?i=an(a):(o&=y,o!==0?i=an(o):l||(l=y&~e,l!==0&&(i=an(l))))):(y=a&~u,y!==0?i=an(y):o!==0?i=an(o):l||(l=a&~e,l!==0&&(i=an(l)))),i===0?0:t!==0&&t!==i&&(t&u)===0&&(u=i&-i,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:i}function iu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function nh(e,t){(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0l;l++)t.push(e);return t}function uu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function n1(e,t,l,a,i,u){var o=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var y=e.entanglements,S=e.expirationTimes,w=e.hiddenUpdates;for(l=o&~l;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(Fl)try{var ou={};Object.defineProperty(ou,"passive",{get:function(){_c=!0}}),window.addEventListener("test",ou,ou),window.removeEventListener("test",ou,ou)}catch{_c=!1}var ba=null,Tc=null,Nr=null;function Oh(){if(Nr)return Nr;var e,t=Tc,l=t.length,a,i="value"in ba?ba.value:ba.textContent,u=i.length;for(e=0;e=hu),Dh=" ",Uh=!1;function kh(e,t){switch(e){case"keyup":return B1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ei=!1;function G1(e,t){switch(e){case"compositionend":return Hh(t);case"keypress":return t.which!==32?null:(Uh=!0,Dh);case"textInput":return e=t.data,e===Dh&&Uh?null:e;default:return null}}function Y1(e,t){if(ei)return e==="compositionend"||!wc&&kh(e,t)?(e=Oh(),Nr=Tc=ba=null,ei=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Kh(e,t){var l=Xh(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Xh(l)}}function Zh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ac(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ac(e.document)}return t}function Mc(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 W1=Fl&&"documentMode"in document&&11>=document.documentMode,ti=null,Dc=null,gu=null,Uc=!1;function Fh(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Uc||ti==null||ti!==Ac(a)||(a=ti,"selectionStart"in a&&Mc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),gu&&vu(gu,a)||(gu=a,a=Rs(Dc,"onSelect"),0>=o,i-=o,Al=1<<32-Xt(t)+i|l<ve?(ut=oe,oe=null):ut=oe.sibling;var Ae=z(O,oe,R[ve],H);if(Ae===null){oe===null&&(oe=ut);break}e&&oe&&Ae.alternate===null&&t(O,oe),T=u(Ae,T,ve),we===null?le=Ae:we.sibling=Ae,we=Ae,oe=ut}if(ve===R.length)return l(O,oe),_e&&Il(O,ve),le;if(oe===null){for(;veve?(ut=oe,oe=null):ut=oe.sibling;var Va=z(O,oe,Ae.value,H);if(Va===null){oe===null&&(oe=ut);break}e&&oe&&Va.alternate===null&&t(O,oe),T=u(Va,T,ve),we===null?le=Va:we.sibling=Va,we=Va,oe=ut}if(Ae.done)return l(O,oe),_e&&Il(O,ve),le;if(oe===null){for(;!Ae.done;ve++,Ae=R.next())Ae=q(O,Ae.value,H),Ae!==null&&(T=u(Ae,T,ve),we===null?le=Ae:we.sibling=Ae,we=Ae);return _e&&Il(O,ve),le}for(oe=a(oe);!Ae.done;ve++,Ae=R.next())Ae=j(oe,O,ve,Ae.value,H),Ae!==null&&(e&&(ut=Ae.alternate,ut!==null&&oe.delete(ut.key===null?ve:ut.key)),T=u(Ae,T,ve),we===null?le=Ae:we.sibling=Ae,we=Ae);return e&&oe.forEach(function(Gx){return t(O,Gx)}),_e&&Il(O,ve),le}function Se(O,T,R,H){if(typeof R=="object"&&R!==null&&R.type===I&&R.key===null&&R.props.ref===void 0&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case ae:e:{for(var le=R.key;T!==null;){if(T.key===le){if(le=R.type,le===I){if(T.tag===7){l(O,T.sibling),H=i(T,R.props.children),Na(H,R),H.return=O,O=H;break e}}else if(T.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===F&&gn(le)===T.type){l(O,T.sibling),H=i(T,R.props),Na(H,R),H.return=O,O=H;break e}l(O,T);break}else t(O,T);T=T.sibling}R.type===I?(H=on(R.props.children,O.mode,H,R.key),Na(H,R),H.return=O,O=H):(H=Ur(R.type,R.key,R.props,null,O.mode,H),Na(H,R),H.return=O,O=H)}return o(O);case ge:e:{for(le=R.key;T!==null;){if(T.key===le)if(T.tag===4&&T.stateNode.containerInfo===R.containerInfo&&T.stateNode.implementation===R.implementation){l(O,T.sibling),H=i(T,R.children||[]),H.return=O,O=H;break e}else{l(O,T);break}else t(O,T);T=T.sibling}H=Gc(R,O.mode,H),H.return=O,O=H}return o(O);case F:return R=gn(R),Se(O,T,R,H)}if(je(R))return $(O,T,R,H);if(se(R)){if(le=se(R),typeof le!="function")throw Error(c(150));return R=le.call(R),re(O,T,R,H)}if(typeof R.then=="function")return Se(O,T,Xr(R),H);if(R.$$typeof===ee)return Se(O,T,Qr(O,R),H);Kr(O,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,T!==null&&T.tag===6?(l(O,T.sibling),H=i(T,R),H.return=O,O=H):(l(O,T),H=Qc(R,O.mode,H),H.return=O,O=H),o(O)):l(O,T)}return function(O,T,R,H){try{_u=0;var le=Se(O,T,R,H);return oi=null,le}catch(oe){if(oe===ci||oe===Yr)throw oe;var we=kt(29,oe,null,O.mode);return we.lanes=H,we.return=O,we}finally{}}}var bn=bm(!0),xm=bm(!1),Ca=!1;function Pc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ic(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Oa(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(He&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=Dr(e),am(e,null,l),t}return Mr(e,a,t,l),Dr(e)}function Tu(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,rh(e,l)}}function eo(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var i=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?i=u=o:u=u.next=o,l=l.next}while(l!==null);u===null?i=u=t:u=u.next=t}else i=u=t;l={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var to=!1;function Nu(){if(to){var e=si;if(e!==null)throw e}}function Cu(e,t,l,a){to=!1;var i=e.updateQueue;Ca=!1;var u=i.firstBaseUpdate,o=i.lastBaseUpdate,y=i.shared.pending;if(y!==null){i.shared.pending=null;var S=y,w=S.next;S.next=null,o===null?u=w:o.next=w,o=S;var A=e.alternate;A!==null&&(A=A.updateQueue,y=A.lastBaseUpdate,y!==o&&(y===null?A.firstBaseUpdate=w:y.next=w,A.lastBaseUpdate=S))}if(u!==null){var q=i.baseState;o=0,A=w=S=null,y=u;do{var z=y.lane&-536870913,j=z!==y.lane;if(j?(Oe&z)===z:(a&z)===z){z!==0&&z===yn&&(to=!0),A!==null&&(A=A.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var $=e,re=y;z=t;var Se=l;switch(re.tag){case 1:if($=re.payload,typeof $=="function"){q=$.call(Se,q,z);break e}q=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=re.payload,z=typeof $=="function"?$.call(Se,q,z):$,z==null)break e;q=V({},q,z);break e;case 2:Ca=!0}}z=y.callback,z!==null&&(e.flags|=64,j&&(e.flags|=8192),j=i.callbacks,j===null?i.callbacks=[z]:j.push(z))}else j={lane:z,tag:y.tag,payload:y.payload,callback:y.callback,next:null},A===null?(w=A=j,S=q):A=A.next=j,o|=z;if(y=y.next,y===null){if(y=i.shared.pending,y===null)break;j=y,y=j.next,j.next=null,i.lastBaseUpdate=j,i.shared.pending=null}}while(!0);A===null&&(S=q),i.baseState=S,i.firstBaseUpdate=w,i.lastBaseUpdate=A,u===null&&(i.shared.lanes=0),Ua|=o,e.lanes=o,e.memoizedState=q}}function Sm(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Em(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;eu?u:8;var o=ue.T,y={};y.types=o!==null?o.types:null,ue.T=y,Eo(e,!1,t,l);try{var S=i(),w=ue.S;if(w!==null&&w(y,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var A=sb(S,a);Ru(e,t,A,Pt(e))}else Ru(e,t,a,Pt(e))}catch(q){Ru(e,t,{then:function(){},status:"rejected",reason:q},Pt())}finally{ye.p=u,o!==null&&y.types!==null&&(o.types=y.types),ue.T=o}}function mb(){}function xo(e,t,l,a){if(e.tag!==5)throw Error(c(476));var i=ey(e).queue;Im(e,i,t,Gt,l===null?mb:function(){return ty(e),l(a)})}function ey(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gt,baseState:Gt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:Gt},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ty(e){var t=ey(e);t.next===null&&(t=e.alternate.memoizedState),Ru(e,t.next.queue,{},Pt())}function So(){return pt(Ai)}function ly(){return lt().memoizedState}function ay(){return lt().memoizedState}function yb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Pt();e=za(l);var a=Oa(t,e,l);a!==null&&(Bt(a,t,l),Tu(a,t,l)),t={cache:Jc()},e.payload=t;return}t=t.return}}function vb(e,t,l){var a=Pt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ls(e)?iy(t,l):(l=Lc(e,t,l,a),l!==null&&(Bt(l,e,a),uy(l,t,a)))}function ny(e,t,l){var a=Pt();Ru(e,t,l,a)}function Ru(e,t,l,a){var i={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ls(e))iy(t,i);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var o=t.lastRenderedState,y=u(o,l);if(i.hasEagerState=!0,i.eagerState=y,Zt(y,o))return Mr(e,t,i,0),Ve===null&&Ar(),!1}catch{}finally{}if(l=Lc(e,t,i,a),l!==null)return Bt(l,e,a),uy(l,t,a),!0}return!1}function Eo(e,t,l,a){if(a={lane:2,revertLane:hf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(c(479))}else t=Lc(e,l,a,2),t!==null&&Bt(t,e,2)}function ls(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function iy(e,t){fi=Fr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function uy(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,rh(e,l)}}var as={readContext:pt,use:Pr,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et,useEffectEvent:et},ry={readContext:pt,use:Pr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:pt,useEffect:Vm,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,es(4194308,4,Jm.bind(null,t,e),l)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var l=Ot();t=t===void 0?null:t;var a=e();if(xn){pa(!0);try{e()}finally{pa(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Ot();if(l!==void 0){var i=l(t);if(xn){pa(!0);try{l(t)}finally{pa(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=vb.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=yo(e);var t=e.queue,l=ny.bind(null,xe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:po,useDeferredValue:function(e,t){var l=Ot();return bo(l,e,t)},useTransition:function(){var e=yo(!1);return e=Im.bind(null,xe,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=xe,i=Ot();if(_e){if(l===void 0)throw Error(c(407));l=l()}else{if(l=t(),Ve===null)throw Error(c(349));(Oe&127)!==0||Om(a,t,l)}i.memoizedState=l;var u={value:l,getSnapshot:t};return i.queue=u,Vm(Rm.bind(null,a,u,e),[e]),a.flags|=2048,hi(9,{destroy:void 0},wm.bind(null,a,u,l,t),null),l},useId:function(){var e=Ot(),t=Ve.identifierPrefix;if(_e){var l=Ml,a=Al;l=(a&~(1<<32-Xt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=$r++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?o.createElement(i,{is:a.is}):o.createElement(i)}}u[gt]=t,u[Ut]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)u.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=u;e:switch(Et(u,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ia(t)}}return Ze(t),t.subtreeFlags&=-33554433,Uo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ia(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=va.current,ri(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,i=ht,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[gt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Rv(e.nodeValue,l)),e||_a(t,!0)}else e=Yu(e).createTextNode(a),e[gt]=t,t.stateNode=e}return Ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ri(t),l!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[gt]=t}else fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else l=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ri(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(c(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(c(317));i[gt]=t}else fn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),i=!1}else i=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==i&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),cs(t,t.updateQueue),Ze(t),null);case 4:return Xn(),e===null&&gf(t.stateNode.containerInfo),t.flags|=67108864,Ze(t),null;case 10:return ta(t.type),Ze(t),null;case 19:if(io(t),a=t.memoizedState,a===null)return Ze(t),null;if(i=(t.flags&128)!==0,u=a.rendering,u===null)if(i)Au(a,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Jr(e),u!==null){for(t.flags|=128,Au(a,!1),e=u.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)nm(l,e),l=l.sibling;return zu(t,xt.current&1|2),_e&&Il(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Yt()>Ss&&(t.flags|=128,i=!0,Au(a,!1),t.lanes=4194304)}else{if(!i)if(e=Jr(u),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),Au(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!u.alternate&&!_e)return Ze(t),null}else 2*Yt()-a.renderingStartTime>Ss&&l!==536870912&&(t.flags|=128,i=!0,Au(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}if(a.tail!==null){e=a.tail;e:{for(l=e;l!==null;){if(l.alternate!==null){l=!1;break e}l=l.sibling}l=!0}return a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Yt(),e.sibling=null,u=xt.current,u=i?u&1|2:u&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!l||_e?zu(t,u):(l=u,Xe(bt,t),Xe(xt,l),Tt===null&&(Tt=t)),_e&&Il(t,a.treeForkCount),e}return Ze(t),null;case 22:case 23:return Jt(t),ao(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),l=t.updateQueue,l!==null&&cs(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&vt(vn),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ta(at),Ze(t),null;case 25:return null;case 30:return t.flags|=33554432,Ze(t),null}throw Error(c(156,t.tag))}function _b(e,t){switch(Yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(at),Xn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return mr(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(c(340));fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));fn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return io(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Xn(),null;case 10:return ta(t.type),null;case 22:case 23:return Jt(t),ao(),e!==null&&vt(vn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(at),null;case 25:return null;default:return null}}function Ay(e,t){switch(Yc(t),t.tag){case 3:ta(at),Xn();break;case 26:case 27:case 5:mr(t);break;case 4:Xn();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:io(t);break;case 10:ta(t.type);break;case 22:case 23:Jt(t),ao(),e!==null&&vt(vn);break;case 24:ta(at)}}function Mu(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){a=void 0;var u=l.create,o=l.inst;a=u(),o.destroy=a}l=l.next}while(l!==i)}}catch(y){Qe(t,t.return,y)}}function Aa(e,t,l){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){var o=a.inst,y=o.destroy;if(y!==void 0){o.destroy=void 0,i=t;var S=l,w=y;try{w()}catch(A){Qe(i,S,A)}}}a=a.next}while(a!==u)}}catch(A){Qe(t,t.return,A)}}function My(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Em(t,l)}catch(a){Qe(e,e.return,a)}}}function Dy(e,t,l){l.props=Sn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Qe(e,t,a)}}function Dl(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:var i=e.stateNode,u=$l(e.memoizedProps,i);(i.ref===null||i.ref.name!==u)&&(i.ref=Qv(u)),a=i.ref;break;case 7:if(e.stateNode===null){var o=new It(e);p(e.child,!1,hx,o,void 0,void 0),e.stateNode=o}a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(y){Qe(e,t,y)}}function St(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(i){Qe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(i){Qe(e,t,i)}else l.current=null}function os(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var l=0;l title"))),Et(a,t,l),a[gt]=e,dt(a),t=a;break e;case"link":if(u=n0("link","href",i).get(t+(l.href||""))){for(o=0;oSe&&(o=Se,Se=re,re=o);var O=Kh(y,re),T=Kh(y,Se);if(O&&T&&(j.rangeCount!==1||j.anchorNode!==O.node||j.anchorOffset!==O.offset||j.focusNode!==T.node||j.focusOffset!==T.offset)){var R=q.createRange();R.setStart(O.node,O.offset),j.removeAllRanges(),re>Se?(j.addRange(R),j.extend(T.node,T.offset)):(R.setEnd(T.node,T.offset),j.addRange(R))}}}}for(q=[],j=y;j=j.parentNode;)j.nodeType===1&&q.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;yl?32:l,ue.T=null,l=lf,lf=null;var u=Sl,o=Bl;if(Pe=0,Nn=Sl=null,Bl=0,(He&6)!==0)throw Error(c(331));var y=He;if(He|=4,av(u.current),ev(u,u.current,o,l),He=y,Bu(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(nu,u)}catch{}return!0}finally{ye.p=i,ue.T=a,pv(e,t)}}function bv(e,t,l){t=il(l,t),t=No(e.stateNode,t,2),e=Oa(e,t,2),e!==null&&(uu(e,2),Ql(e))}function Qe(e,t,l){if(e.tag===3)bv(e,e,l);else for(;t!==null;){if(t.tag===3){bv(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ka===null||!ka.has(a))){e=il(l,e),l=yy(2),a=Oa(t,l,2),a!==null&&(vy(l,a,t,e),uu(a,2),Ql(a));break}}t=t.return}}function of(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new zb;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(l)||(Io=!0,i.add(l),e=Ub.bind(null,e,t,l),t.then(e,e))}function Ub(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ve===e&&(Oe&l)===l&&((tt===4||tt===3&&(Oe&62914560)===Oe&&300>Yt()-xs)&&(He&2)===0?Ti(e,0):bs|=l,bi===Oe&&(bi=0)),Ql(e)}function xv(e,t){t===0&&(t=ih()),e=cn(e,t),e!==null&&(uu(e,t),Ql(e))}function kb(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),xv(e,l)}function Hb(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(l=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),xv(e,l)}function qb(e,t){return fc(e,t)}var Ci=null,zi=null,ff=!1,Os=!1,df=!1,qa=0;function Ql(e){e!==zi&&e.next===null&&(zi===null?Ci=zi=e:zi=zi.next=e),Os=!0,ff||(ff=!0,Bb())}function Bu(e,t){if(!df&&Os){df=!0;do for(var l=!1,a=Ci;a!==null;){if(e!==0){var i=a.pendingLanes;if(i===0)var u=0;else{var o=a.suspendedLanes,y=a.pingedLanes;u=(1<<31-Xt(42|e)+1)-1,u&=i&~(o&~y),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,Tv(a,u))}else u=Oe,u=br(a,a===Ve?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||iu(a,u)||(l=!0,Tv(a,u));a=a.next}while(l);df=!1}}function Lb(){Sv()}function Sv(){Os=ff=!1;var e=0;qa!==0&&Wb()&&(e=qa);for(var t=Yt(),l=null,a=Ci;a!==null;){var i=a.next,u=Ev(a,t);u===0?(a.next=null,l===null?Ci=i:l.next=i,i===null&&(zi=l)):(l=a,(e!==0||(u&3)!==0)&&(Os=!0)),a=i}Pe!==0&&Pe!==5||Bu(e),qa!==0&&(qa=0)}function Ev(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes&-62914561;0y)break;var A=S.transferSize,q=S.initiatorType;A&&jv(q)&&(S=S.responseEnd,o+=A*(SMs){re.length=$;break}R=new Promise(ax.bind(R)),re.push(R)}}}if(0"u"?null:document;function e0(e,t,l){var a=wi;if(a&&typeof t=="string"&&t){var i=al(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof l=="string"&&(i+='[crossorigin="'+l+'"]'),Iv.has(i)||(Iv.add(i),e={rel:e,crossOrigin:l,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),Et(t,"link",e),dt(t),a.head.appendChild(t)))}}function Ex(e){ra.D(e),e0("dns-prefetch",e,null)}function _x(e,t){ra.C(e,t),e0("preconnect",e,t)}function Tx(e,t,l){ra.L(e,t,l);var a=wi;if(a&&e&&t){var i='link[rel="preload"][as="'+al(t)+'"]';t==="image"&&l&&l.imageSrcSet?(i+='[imagesrcset="'+al(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(i+='[imagesizes="'+al(l.imageSizes)+'"]')):i+='[href="'+al(e)+'"]';var u=i;switch(t){case"style":u=Ri(e);break;case"script":u=ji(e)}if(!(fl.has(u)||(e=V({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),fl.set(u,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Xu(u))||t==="script"&&a.querySelector(Ku(u))))){var o=a.createElement("link");Et(o,"link",e),t==="style"&&(o[xr]=!0,o.onload=o.onerror=function(){hh(o)}),dt(o),a.head.appendChild(o)}}}function Nx(e,t){ra.m(e,t);var l=wi;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+al(a)+'"][href="'+al(e)+'"]',u=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ji(e)}if(!fl.has(u)&&(e=V({rel:"modulepreload",href:e},t),fl.set(u,e),l.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ku(u)))return}a=l.createElement("link"),Et(a,"link",e),dt(a),l.head.appendChild(a)}}}function Cx(e,t,l){ra.S(e,t,l);var a=wi;if(a&&e){var i=Jn(a).hoistableStyles,u=Ri(e);t=t||"default";var o=i.get(u);if(!o){var y={loading:0,preload:null};if(o=a.querySelector(Xu(u)))y.loading=5;else{e=V({rel:"stylesheet",href:e,"data-precedence":t},l),(l=fl.get(u))&&Mf(e,l);var S=o=a.createElement("link");dt(S),Et(S,"link",e),S._p=new Promise(function(w,A){S.onload=w,S.onerror=A}),S.addEventListener("load",function(){y.loading|=1}),S.addEventListener("error",function(){y.loading|=2}),y.loading|=4,js(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:y},i.set(u,o)}}}function zx(e,t){ra.X(e,t);var l=wi;if(l&&e){var a=Jn(l).hoistableScripts,i=ji(e),u=a.get(i);u||(u=l.querySelector(Ku(i)),u||(e=V({src:e,async:!0},t),(t=fl.get(i))&&Df(e,t),u=l.createElement("script"),dt(u),Et(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function Ox(e,t){ra.M(e,t);var l=wi;if(l&&e){var a=Jn(l).hoistableScripts,i=ji(e),u=a.get(i);u||(u=l.querySelector(Ku(i)),u||(e=V({src:e,async:!0,type:"module"},t),(t=fl.get(i))&&Df(e,t),u=l.createElement("script"),dt(u),Et(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(i,u))}}function t0(e,t,l,a){var i=(i=va.current)?Vu(i):null;if(!i)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(l=Ri(l.href),t=Jn(i).hoistableStyles,a=t.get(l),a||(a={type:"style",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Ri(l.href);var u=Jn(i).hoistableStyles,o=u.get(e);if(o||(i=i.ownerDocument||i,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,o),(u=i.querySelector(Xu(e)))?u._p||(o.instance=u,o.state.loading=5):(u=fl.get(e),u||(u={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fl.set(e,u)),wx(i,e,u,o.state))),t&&a===null)throw Error(c(528,""));return o}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(l=ji(l),t=Jn(i).hoistableScripts,a=t.get(l),a||(a={type:"script",instance:null,count:0,state:null},t.set(l,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Ri(e){return'href="'+al(e)+'"'}function Xu(e){return'link[rel="stylesheet"]['+e+"]"}function l0(e){return V({},e,{"data-precedence":e.precedence,precedence:null})}function wx(e,t,l,a){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[xr]!==!0){a.loading=1;return}}else t=e.createElement("link"),t[xr]=!0,t.onload=t.onerror=hh.bind(null,t),Et(t,"link",l),dt(t),e.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function ji(e){return'[src="'+al(e)+'"]'}function Ku(e){return"script[async]"+e}function a0(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+al(l.href)+'"]');if(a)return t.instance=a,dt(a),a;var i=V({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),dt(a),Et(a,"style",i),js(a,l.precedence,e),t.instance=a;case"stylesheet":i=Ri(l.href);var u=e.querySelector(Xu(i));if(u)return t.state.loading|=4,t.instance=u,dt(u),u;a=l0(l),(i=fl.get(i))&&Mf(a,i),u=(e.ownerDocument||e).createElement("link"),dt(u);var o=u;return o._p=new Promise(function(y,S){o.onload=y,o.onerror=S}),Et(u,"link",a),t.state.loading|=4,js(u,l.precedence,e),t.instance=u;case"script":return u=ji(l.src),(i=e.querySelector(Ku(u)))?(t.instance=i,dt(i),i):(a=l,(i=fl.get(u))&&(a=V({},l),Df(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),dt(i),Et(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,js(a,l.precedence,e));return t.instance}function js(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,u=i,o=0;o title"):null)}function Rx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function i0(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function u0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r0(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function s0(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=r0(t),e.suspenseyImages.push(t)),e=Mx.bind(e),t.decode().then(e,e))}function jx(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var i=Ri(a.href),u=t.querySelector(Xu(i));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,dt(u);return}u=t.ownerDocument||t,a=l0(a),(i=fl.get(i))&&Mf(a,i),u=u.createElement("link"),dt(u);var o=u;o._p=new Promise(function(y,S){o.onload=y,o.onerror=S}),Et(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Zu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ms=0;function Ax(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0Ms?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function c0(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)Us(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Zu(){this.count--,c0(this)}function Mx(){this.imgCount--,c0(this)}var Ds=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ds=new Map,t.forEach(Dx,e),Ds=null,Zu.call(e))}function Dx(e,t){if(!(t.state.loading&4)){var l=Ds.get(e);if(l)var a=l.get(null);else{l=new Map,Ds.set(e,l);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Xf.exports=$x(),Xf.exports}var Px=Wx();const Ix=Cg(Px);/** - * react-router v7.18.4 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */var Nd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Og=/^[\\/]{2}/;function e2(n,r){return r+n.replace(/\\/g,"/")}var D0="popstate";function U0(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function t2(n={}){function r(f,h){let{pathname:d="/",search:v="",hash:b=""}=Qn(f.location.hash.substring(1));return!d.startsWith("/")&&!d.startsWith(".")&&(d="/"+d),ed("",{pathname:d,search:v,hash:b},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function s(f,h){let d=f.document.querySelector("base"),v="";if(d&&d.getAttribute("href")){let b=f.location.href,g=b.indexOf("#");v=g===-1?b:b.slice(0,g)}return v+"#"+(typeof h=="string"?h:Ln(h))}function c(f,h){el(f.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(h)})`)}return a2(r,s,c,n)}function We(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function el(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function l2(){return Math.random().toString(36).substring(2,10)}function k0(n,r){return{usr:n.state,key:n.key,idx:r,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function ed(n,r,s=null,c,f){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Qn(r):r,state:s,key:r&&r.key||c||l2(),mask:f}}function Ln({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function Qn(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let c=n.indexOf("?");c>=0&&(r.search=n.substring(c),n=n.substring(0,c)),n&&(r.pathname=n)}return r}function a2(n,r,s,c={}){let{window:f=document.defaultView,v5Compat:h=!1}=c,d=f.history,v="POP",b=null,g=x();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function x(){return(d.state||{idx:null}).idx}function p(){v="POP";let D=x(),k=D==null?null:D-g;g=D,b&&b({action:v,location:B.location,delta:k})}function C(D,k){v="PUSH";let G=U0(D)?D:ed(B.location,D,k);s&&s(G,D),g=x()+1;let Z=k0(G,g),J=B.createHref(G.mask||G);try{d.pushState(Z,"",J)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;f.location.assign(J)}h&&b&&b({action:v,location:B.location,delta:1})}function L(D,k){v="REPLACE";let G=U0(D)?D:ed(B.location,D,k);s&&s(G,D),g=x();let Z=k0(G,g),J=B.createHref(G.mask||G);d.replaceState(Z,"",J),h&&b&&b({action:v,location:B.location,delta:0})}function K(D){return n2(f,D)}let B={get action(){return v},get location(){return n(f,d)},listen(D){if(b)throw new Error("A history only accepts one active listener");return f.addEventListener(D0,p),b=D,()=>{f.removeEventListener(D0,p),b=null}},createHref(D){return r(f,D)},createURL:K,encodeLocation(D){let k=K(D);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:C,replace:L,go(D){return d.go(D)}};return B}function n2(n,r,s=!1){let c="http://localhost";n&&(c=n.location.origin!=="null"?n.location.origin:n.location.href),We(c,"No window.location.(origin|href) available to create URL");let f=typeof r=="string"?r:Ln(r);return f=f.replace(/ $/,"%20"),!s&&Og.test(f)&&(f=c+f),new URL(f,c)}function wg(n,r,s="/"){return i2(n,r,s,!1)}function i2(n,r,s,c,f){let h=typeof r=="string"?Qn(r):r,d=ma(h.pathname||"/",s);if(d==null)return null;let v=u2(n),b=null,g=g2(d);for(let x=0;b==null&&x{let x={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:v,route:d};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(c)&&b)return;We(x.relativePath.startsWith(c),`Absolute route path "${x.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(c.length)}let p=Cl([c,x.relativePath]),C=s.concat(x);d.children&&d.children.length>0&&(We(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Rg(d.children,r,C,p,b)),!(d.path==null&&!d.index)&&r.push({path:p,score:m2(p,d.index),routesMeta:C.map((L,K)=>{let[B,D]=Mg(L.relativePath,L.caseSensitive,K===C.length-1);return{...L,matcher:B,compiledParams:D}})})};return n.forEach((d,v)=>{var b;if(d.path===""||!((b=d.path)!=null&&b.includes("?")))h(d,v);else for(let g of jg(d.path))h(d,v,!0,g)}),r}function jg(n){let r=n.split("/");if(r.length===0)return[];let[s,...c]=r,f=s.endsWith("?"),h=s.replace(/\?$/,"");if(c.length===0)return f?[h,""]:[h];let d=jg(c.join("/")),v=[];return v.push(...d.map(b=>b===""?h:[h,b].join("/"))),f&&v.push(...d),v.map(b=>n.startsWith("/")&&b===""?"/":b)}function r2(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:y2(r.routesMeta.map(c=>c.childrenIndex),s.routesMeta.map(c=>c.childrenIndex)))}var s2=/^:[\w-]+$/,c2=3,o2=2,f2=1,d2=10,h2=-2,H0=n=>n==="*";function m2(n,r){let s=n.split("/"),c=s.length;return s.some(H0)&&(c+=h2),r&&(c+=o2),s.filter(f=>!H0(f)).reduce((f,h)=>f+(s2.test(h)?c2:h===""?f2:d2),c)}function y2(n,r){return n.length===r.length&&n.slice(0,-1).every((c,f)=>c===r[f])?n[n.length-1]-r[r.length-1]:0}function v2(n,r,s=!1){let{routesMeta:c}=n,f={},h="/",d=[];for(let v=0;v{if(x==="*"){let K=v[C]||"";d=$i(h.slice(0,h.length-K.length),1)}const L=v[C];return p&&!L?g[x]=void 0:g[x]=(L||"").replace(/%2F/g,"/"),g},{}),pathname:h,pathnameBase:d,pattern:n}}function Mg(n,r=!1,s=!0){el(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],f="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,v,b,g,x)=>{if(c.push({paramName:v,isOptional:b!=null}),b){let p=x.charAt(g+d.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),f+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":n!==""&&n!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),c]}function g2(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return el(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function ma(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,c=n.charAt(s);return c&&c!=="/"?null:n.slice(s)||"/"}function p2(n,r="/"){let{pathname:s,search:c="",hash:f=""}=typeof n=="string"?Qn(n):n,h;return s?(s=Dg(s),s.startsWith("/")||s.startsWith("\\")?h=q0(s.substring(1),"/"):h=q0(s,r)):h=r,{pathname:h,search:S2(c),hash:E2(f)}}function q0(n,r){let s=$i(r).split("/");return n.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function Ff(n,r,s,c){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function b2(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function Cd(n){let r=b2(n);return r.map((s,c)=>c===r.length-1?s.pathname:s.pathnameBase)}function Is(n,r,s,c=!1){let f;typeof n=="string"?f=Qn(n):(f={...n},We(!f.pathname||!f.pathname.includes("?"),Ff("?","pathname","search",f)),We(!f.pathname||!f.pathname.includes("#"),Ff("#","pathname","hash",f)),We(!f.search||!f.search.includes("#"),Ff("#","search","hash",f)));let h=n===""||f.pathname==="",d=h?"/":f.pathname,v;if(d==null)v=s;else{let p=r.length-1;if(!c&&d.startsWith("..")){let C=d.split("/");for(;C[0]==="..";)C.shift(),p-=1;f.pathname=C.join("/")}v=p>=0?r[p]:"/"}let b=p2(f,v),g=d&&d!=="/"&&d.endsWith("/"),x=(h||d===".")&&s.endsWith("/");return!b.pathname.endsWith("/")&&(g||x)&&(b.pathname+="/"),b}var Dg=n=>n.replace(/[\\/]{2,}/g,"/"),Cl=n=>Dg(n.join("/"));function $i(n,r=0){let s=n.length;for(;s>r&&n.charCodeAt(s-1)===47;)s--;return s===n.length?n:n.slice(0,s)}var x2=n=>$i(n).replace(/^\/*/,"/"),S2=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,E2=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,_2=class{constructor(n,r,s,c=!1){this.status=n,this.statusText=r||"",this.internal=c,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function T2(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function N2(n){let r=n.map(s=>s.route.path).filter(Boolean);return Cl(r)||"/"}var Ug=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function kg(n,r){let s=n;if(typeof s!="string"||!Nd.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let c=s,f=!1;if(Ug)try{let h=new URL(window.location.href),d=Og.test(s)?new URL(e2(s,h.protocol)):new URL(s),v=ma(d.pathname,r);d.origin===h.origin&&v!=null?s=v+d.search+d.hash:f=!0}catch{el(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:f,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var L0=new URL("http://localhost");function zd(n){if(n.createURL)return n.createURL("/");try{return new URL(n.createHref("/"),L0)}catch{return L0}}function $f(n,r){return n.origin===r.origin&&(n.origin!=="null"||n.protocol===r.protocol&&n.host===r.host)}function C2(n,r){if(n.startsWith("//"))return!0;let s=r.protocol.toLowerCase();return n.toLowerCase().startsWith(s)?r.host===""||n.slice(s.length).startsWith("//"):!1}function Od(n,r,s,c){let f=null;try{f=n==null?null:new URL(n,s)}catch{}let h=new URL(r,s),d=f!=null&&!$f(f,s),v=!$f(h,s);if(c==="reject"){if(d||v)throw new Error("External navigation is not allowed")}else if(v&&(f==null||!C2(n,f)||!$f(f,h)))throw new Error("External navigation is not allowed")}var Hg=["POST","PUT","PATCH","DELETE"];new Set(Hg);var z2=["GET",...Hg];new Set(z2);var O2=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function w2(n){try{return O2.includes(new URL(n).protocol)}catch{return!1}}var Ii=_.createContext(null);Ii.displayName="DataRouter";var ec=_.createContext(null);ec.displayName="DataRouterState";var qg=_.createContext(!1);function R2(){return _.useContext(qg)}var Lg=_.createContext({isTransitioning:!1});Lg.displayName="ViewTransition";var j2=_.createContext(new Map);j2.displayName="Fetchers";var A2=_.createContext(null);A2.displayName="Await";var tl=_.createContext(null);tl.displayName="Navigation";var or=_.createContext(null);or.displayName="Location";var zl=_.createContext({outlet:null,matches:[],isDataRoute:!1});zl.displayName="Route";var wd=_.createContext(null);wd.displayName="RouteError";var Bg="REACT_ROUTER_ERROR",M2="REDIRECT",D2="ROUTE_ERROR_RESPONSE";function U2(n){if(n.startsWith(`${Bg}:${M2}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function k2(n){if(n.startsWith(`${Bg}:${D2}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new _2(r.status,r.statusText,r.data)}catch{}}function H2(n,{relative:r}={}){We(eu(),"useHref() may be used only in the context of a component.");let{basename:s,navigator:c}=_.useContext(tl),{hash:f,pathname:h,search:d}=fr(n,{relative:r}),v=h;return s!=="/"&&(v=h==="/"?s:Cl([s,h])),c.createHref({pathname:v,search:d,hash:f})}function eu(){return _.useContext(or)!=null}function vl(){return We(eu(),"useLocation() may be used only in the context of a component."),_.useContext(or).location}var Qg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Gg(n){_.useContext(tl).static||_.useLayoutEffect(n)}function tc(){let{isDataRoute:n}=_.useContext(zl);return n?P2():q2()}function q2(){We(eu(),"useNavigate() may be used only in the context of a component.");let n=_.useContext(Ii),{basename:r,navigator:s}=_.useContext(tl),{matches:c}=_.useContext(zl),{pathname:f}=vl(),h=JSON.stringify(Cd(c)),d=_.useRef(!1);return Gg(()=>{d.current=!0}),_.useCallback((b,g={})=>{if(el(d.current,Qg),!d.current)return;if(typeof b=="number"){s.go(b);return}let x=Is(b,JSON.parse(h),f,g.relative==="path");n==null&&r!=="/"&&(x.pathname=x.pathname==="/"?r:Cl([r,x.pathname])),Od(typeof b=="string"?b:Ln(b),s.createHref(x),zd(s),"reject"),(g.replace?s.replace:s.push)(x,g.state,g)},[r,s,h,f,n])}var L2=_.createContext(null);function B2(n){let r=_.useContext(zl).outlet;return _.useMemo(()=>r&&_.createElement(L2.Provider,{value:n},r),[r,n])}function fr(n,{relative:r}={}){let{matches:s}=_.useContext(zl),{pathname:c}=vl(),f=JSON.stringify(Cd(s));return _.useMemo(()=>Is(n,JSON.parse(f),c,r==="path"),[n,f,c,r])}function Q2(n,r){return Yg(n,r)}function Yg(n,r,s){var D;We(eu(),"useRoutes() may be used only in the context of a component.");let{navigator:c}=_.useContext(tl),{matches:f}=_.useContext(zl),h=f[f.length-1],d=h?h.params:{},v=h?h.pathname:"/",b=h?h.pathnameBase:"/",g=h&&h.route;{let k=g&&g.path||"";Xg(v,!g||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${v}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let x=vl(),p;if(r){let k=typeof r=="string"?Qn(r):r;We(b==="/"||((D=k.pathname)==null?void 0:D.startsWith(b)),`When overriding the location using \`\` 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 "${b}" but pathname "${k.pathname}" was given in the \`location\` prop.`),p=k}else p=x;let C=p.pathname||"/",L=C;if(b!=="/"){let k=b.replace(/^\//,"").split("/");L="/"+C.replace(/^\//,"").split("/").slice(k.length).join("/")}let K=s&&s.state.matches.length?s.state.matches.map(k=>Object.assign(k,{route:s.manifest[k.route.id]||k.route})):wg(n,{pathname:L});el(g||K!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),el(K==null||K[K.length-1].route.element!==void 0||K[K.length-1].route.Component!==void 0||K[K.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let B=K2(K&&K.map(k=>Object.assign({},k,{params:Object.assign({},d,k.params),pathname:Cl([b,c.encodeLocation?c.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?b:Cl([b,c.encodeLocation?c.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),f,s);return r&&B?_.createElement(or.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},B):B}function G2(){let n=W2(),r=T2(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},h={padding:"2px 4px",backgroundColor:c},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=_.createElement(_.Fragment,null,_.createElement("p",null,"💿 Hey developer 👋"),_.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",_.createElement("code",{style:h},"ErrorBoundary")," or"," ",_.createElement("code",{style:h},"errorElement")," prop on your route.")),_.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},r),s?_.createElement("pre",{style:f},s):null,d)}var Y2=_.createElement(G2,null),Vg=class extends _.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=k2(n.digest);s&&(n=s)}let r=n!==void 0?_.createElement(zl.Provider,{value:this.props.routeContext},_.createElement(wd.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?_.createElement(V2,{error:n},r):r}};Vg.contextType=qg;var Wf=new WeakMap;function V2({children:n,error:r}){let{basename:s,navigator:c}=_.useContext(tl);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let f=U2(r.digest);if(f){let h=Wf.get(r);if(h)throw h;let d=kg(f.location,s),v=d.absoluteURL||d.to;if(Od(f.location,v,zd(c),"allow-explicit"),w2(v))throw new Error("Invalid redirect location");if(Ug&&!Wf.get(r))if(d.isExternal||f.reloadDocument)window.location.href=v;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:f.replace}));throw Wf.set(r,b),b}return _.createElement("meta",{httpEquiv:"refresh",content:`0;url=${v}`})}}return n}function X2({routeContext:n,match:r,children:s}){let c=_.useContext(Ii);return c&&c.static&&c.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=r.route.id),_.createElement(zl.Provider,{value:n},s)}function K2(n,r=[],s){let c=s==null?void 0:s.state;if(n==null){if(!c)return null;if(c.errors)n=c.matches;else if(r.length===0&&!c.initialized&&c.matches.length>0)n=c.matches;else return null}let f=n,h=c==null?void 0:c.errors;if(h!=null){let x=f.findIndex(p=>p.route.id&&(h==null?void 0:h[p.route.id])!==void 0);We(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,x+1))}let d=!1,v=-1;if(s&&c){d=c.renderFallback;for(let x=0;x=0?f=f.slice(0,v+1):f=[f[0]];break}}}}let b=s==null?void 0:s.onError,g=c&&b?(x,p)=>{var C,L;b(x,{location:c.location,params:((L=(C=c.matches)==null?void 0:C[0])==null?void 0:L.params)??{},pattern:N2(c.matches),errorInfo:p})}:void 0;return f.reduceRight((x,p,C)=>{let L,K=!1,B=null,D=null;c&&(L=h&&p.route.id?h[p.route.id]:void 0,B=p.route.errorElement||Y2,d&&(v<0&&C===0?(Xg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),K=!0,D=null):v===C&&(K=!0,D=p.route.hydrateFallbackElement||null)));let k=r.concat(f.slice(0,C+1)),G=()=>{let Z;return L?Z=B:K?Z=D:p.route.Component?Z=_.createElement(p.route.Component,null):p.route.element?Z=p.route.element:Z=x,_.createElement(X2,{match:p,routeContext:{outlet:x,matches:k,isDataRoute:c!=null},children:Z})};return c&&(p.route.ErrorBoundary||p.route.errorElement||C===0)?_.createElement(Vg,{location:c.location,revalidation:c.revalidation,component:B,error:L,children:G(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:g}):G()},null)}function Rd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Z2(n){let r=_.useContext(Ii);return We(r,Rd(n)),r}function J2(n){let r=_.useContext(ec);return We(r,Rd(n)),r}function F2(n){let r=_.useContext(zl);return We(r,Rd(n)),r}function jd(n){let r=F2(n),s=r.matches[r.matches.length-1];return We(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function $2(){return jd("useRouteId")}function W2(){var c;let n=_.useContext(wd),r=J2("useRouteError"),s=jd("useRouteError");return n!==void 0?n:(c=r.errors)==null?void 0:c[s]}function P2(){let{router:n}=Z2("useNavigate"),r=jd("useNavigate"),s=_.useRef(!1);return Gg(()=>{s.current=!0}),_.useCallback(async(f,h={})=>{el(s.current,Qg),s.current&&(typeof f=="number"?await n.navigate(f):await n.navigate(f,{fromRouteId:r,...h}))},[n,r])}var B0={};function Xg(n,r,s){!r&&!B0[n]&&(B0[n]=!0,el(!1,s))}_.memo(I2);function I2({routes:n,manifest:r,future:s,state:c,isStatic:f,onError:h}){return Yg(n,void 0,{manifest:r,state:c,isStatic:f,onError:h})}function Q0({to:n,replace:r,state:s,relative:c}){We(eu()," may be used only in the context of a component.");let{static:f,navigator:h}=_.useContext(tl);el(!f," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=_.useContext(zl),{pathname:v}=vl(),b=tc(),g=Is(n,Cd(d),v,c==="path");Od(typeof n=="string"?n:Ln(n),h.createHref(g),zd(h),"reject");let x=JSON.stringify(g);return _.useEffect(()=>{b(JSON.parse(x),{replace:r,state:s,relative:c})},[b,x,c,r,s]),null}function eS(n){return B2(n.context)}function _l(n){We(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function tS({basename:n="/",children:r=null,location:s,navigationType:c="POP",navigator:f,static:h=!1,useTransitions:d}){We(!eu(),"You cannot render a inside another . You should never have more than one in your app.");let v=n.replace(/^\/*/,"/"),b=_.useMemo(()=>({basename:v,navigator:f,static:h,useTransitions:d,future:{}}),[v,f,h,d]);typeof s=="string"&&(s=Qn(s));let{pathname:g="/",search:x="",hash:p="",state:C=null,key:L="default",mask:K}=s,B=_.useMemo(()=>{let D=ma(g,v);return D==null?null:{location:{pathname:D,search:x,hash:p,state:C,key:L,mask:K},navigationType:c}},[v,g,x,p,C,L,c,K]);return el(B!=null,` is not able to match the URL "${g}${x}${p}" because it does not start with the basename, so the won't render anything.`),B==null?null:_.createElement(tl.Provider,{value:b},_.createElement(or.Provider,{children:r,value:B}))}function lS({children:n,location:r}){return Q2(td(n),r)}function td(n,r=[]){let s=[];return _.Children.forEach(n,(c,f)=>{if(!_.isValidElement(c))return;let h=[...r,f];if(c.type===_.Fragment){s.push.apply(s,td(c.props.children,h));return}We(c.type===_l,`[${typeof c.type=="string"?c.type:c.type.name}] is not a component. All component children of must be a or `),We(!c.props.index||!c.props.children,"An index route cannot have child routes.");let d={id:c.props.id||h.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(d.children=td(c.props.children,h)),s.push(d)}),s}var Zs="get",Js="application/x-www-form-urlencoded";function lc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function aS(n){return lc(n)&&n.tagName.toLowerCase()==="button"}function nS(n){return lc(n)&&n.tagName.toLowerCase()==="form"}function iS(n){return lc(n)&&n.tagName.toLowerCase()==="input"}function uS(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function rS(n,r){return n.button===0&&(!r||r==="_self")&&!uS(n)}function ld(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((r,s)=>{let c=n[s];return r.concat(Array.isArray(c)?c.map(f=>[s,f]):[[s,c]])},[]))}function sS(n,r){let s=ld(n);return r&&r.forEach((c,f)=>{s.has(f)||r.getAll(f).forEach(h=>{s.append(f,h)})}),s}var Ys=null;function cS(){if(Ys===null)try{new FormData(document.createElement("form"),0),Ys=!1}catch{Ys=!0}return Ys}var oS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pf(n){return n!=null&&!oS.has(n)?(el(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Js}"`),null):n}function fS(n,r){let s,c,f,h,d;if(nS(n)){let v=n.getAttribute("action");c=v?ma(v,r):null,s=n.getAttribute("method")||Zs,f=Pf(n.getAttribute("enctype"))||Js,h=new FormData(n)}else if(aS(n)||iS(n)&&(n.type==="submit"||n.type==="image")){let v=n.form;if(v==null)throw new Error('Cannot submit a