From cfa960221e4ec9a2dde13ce013e648bb8269d55d Mon Sep 17 00:00:00 2001 From: study-tool Date: Sat, 31 Oct 2026 16:01:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(web):=20=E6=8F=92=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=B9=E7=AA=97=EF=BC=88=E5=90=AF=E5=81=9C=20/=20?= =?UTF-8?q?=E9=87=8D=E8=BD=BD=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 顶栏新增「插件管理」图标按钮,打开 PluginsDialog - 弹窗列出 pugins/ 下的插件:标题 / 目录名 / 是否启用与已加载 / 平台 label / 能力清单 - 每个插件可启用、停用、重载,底部有「全部重载」 - 启停成功后重新拉 /api/platforms,「添加账号」的平台下拉同步刷新 - types.ts 新增 PluginInfo;App.tsx 把平台列表加载提成 loadPlatforms 复用 - static/ 重新构建(pnpm typecheck + pnpm build 均通过) - 顺带把 .vscode/ 纳入跟踪 --- .vscode/settings.json | 31 ++++ docs/OPTIMIZATION.md | 5 +- docs/pugin.md | 1 + static/assets/index-BubgUKHl.css | 1 - static/assets/index-Cl1ZyI7J.css | 1 + static/assets/index-DrnB8PWg.js | 233 +++++++++++++++++++++++++++ static/assets/index-DsTLd63E.js | 228 -------------------------- static/index.html | 4 +- web/src/App.tsx | 35 ++-- web/src/components/PluginsDialog.tsx | 153 ++++++++++++++++++ web/src/components/TopBar.tsx | 13 +- web/src/types.ts | 10 ++ 12 files changed, 471 insertions(+), 244 deletions(-) create mode 100644 .vscode/settings.json delete mode 100644 static/assets/index-BubgUKHl.css create mode 100644 static/assets/index-Cl1ZyI7J.css create mode 100644 static/assets/index-DrnB8PWg.js delete mode 100644 static/assets/index-DsTLd63E.js create mode 100644 web/src/components/PluginsDialog.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e56cc91 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,31 @@ +{ + "files.exclude": { + "**/__pycache__": true, + "**/*.pyc": true, + "**/.venv": true, + "**/venv": true, + "**/env": true, + "**/.mypy_cache": true, + "**/.pytest_cache": true, + "**/.ruff_cache": true + }, + "search.exclude": { + "**/__pycache__": true, + "**/*.pyc": true, + "**/.venv": true, + "**/venv": true, + "**/env": true, + "**/.mypy_cache": true, + "**/.pytest_cache": true, + "**/.ruff_cache": true + }, + "files.watcherExclude": { + "**/__pycache__/**": true, + "**/.venv/**": true, + "**/venv/**": true, + "**/env/**": true, + "**/.mypy_cache/**": true, + "**/.pytest_cache/**": true, + "**/.ruff_cache/**": true + } +} \ No newline at end of file diff --git a/docs/OPTIMIZATION.md b/docs/OPTIMIZATION.md index aa048bd..7126a79 100644 --- a/docs/OPTIMIZATION.md +++ b/docs/OPTIMIZATION.md @@ -16,7 +16,9 @@ - `platforms/registry.py` 新增 `unregister(pid)`。 - 新增接口:`GET /api/plugins`、`POST /api/plugins/{name}/enable|disable`、 `POST /api/plugins/reload`、`POST /api/plugins/{name}/reload`;失败返回 `{"ok": false, "error": ...}`。 -- 引擎 / 路由 / 前端 / 平台实现均未改动。 +- 前端顶栏新增「插件管理」弹窗(`web/src/components/PluginsDialog.tsx`):列出插件与状态, + 支持启停 / 单个重载 / 全部重载;启停后会重新拉 `/api/platforms`,「添加账号」的平台下拉同步变化。 +- 引擎 / 路由 / 平台实现均未改动。 ### 怎么测 @@ -25,6 +27,7 @@ 3. 改 `pugins/gdgxk/main.py` 里一句日志文案 → `POST /api/plugins/gdgxk/reload` → 不重启服务再跑一次学习,日志应变成新文案。 4. 重启服务:停用状态应被记住(设置项 `plugins`)。 +5. 前端顶栏「插件管理」:停用 gdgxk → 「添加账号」的平台下拉立刻少一项;重新启用后恢复。 ## 平台契约改为子类实现(注册方式调整) diff --git a/docs/pugin.md b/docs/pugin.md index 78a5dda..0d85734 100644 --- a/docs/pugin.md +++ b/docs/pugin.md @@ -108,6 +108,7 @@ src/study_tool/pugins/ 启用清单存在设置项 `plugins`(`{"disabled": [...]}`):没列进去的默认启用,新丢进目录的插件自动生效。 停用的插件会 `registry.unregister()`,从 `/api/platforms` 消失,账号的平台下拉里也不会出现。 热重载先把旧实现从注册表摘掉再 import;正在跑的学习任务持有的是旧实例,跑到结束不受影响。 +前端顶栏的「插件管理」弹窗(`web/src/components/PluginsDialog.tsx`)就是这几个接口的界面。 ## 槽位契约 diff --git a/static/assets/index-BubgUKHl.css b/static/assets/index-BubgUKHl.css deleted file mode 100644 index f0841f3..0000000 --- a/static/assets/index-BubgUKHl.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-xl:36rem;--container-3xl:48rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-50:#eef4ff;--color-brand-100:#dbe7ff;--color-brand-200:#bfd4ff;--color-brand-500:#2f6bff;--color-brand-600:#1f55e0;--color-brand-700:#1a46bd;--color-line:#e6eaf2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{color-scheme:light;scroll-behavior:smooth}body{min-height:100vh;color:var(--color-slate-900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-sans);background-color:#f5f7fb}::selection{background:#2f6bff2e}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.top-1\/2{top:50%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-2\.5{right:calc(var(--spacing) * 2.5)}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.bottom-7{bottom:calc(var(--spacing) * 7)}.bottom-10{bottom:calc(var(--spacing) * 10)}.left-1\/2{left:50%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.-mr-1{margin-right:calc(var(--spacing) * -1)}.mr-1{margin-right:var(--spacing)}.mr-auto{margin-right:auto}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-\[60vh\]{height:60vh}.h-full{height:100%}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-\[196px\]{max-height:196px}.max-h-\[calc\(100vh-2rem\)\]{max-height:calc(100vh - 2rem)}.min-h-0{min-height:0}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\[70px\]{min-height:70px}.min-h-screen{min-height:100vh}.w-9{width:calc(var(--spacing) * 9)}.w-40{width:calc(var(--spacing) * 40)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[50\%\]{max-width:50%}.max-w-\[85vw\]{max-width:85vw}.max-w-\[320px\]{max-width:320px}.max-w-\[1320px\]{max-width:1320px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.scrollbar-thin{scrollbar-width:thin}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-brand-100{border-color:var(--color-brand-100)}.border-brand-500{border-color:var(--color-brand-500)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-line{border-color:var(--color-line)}.border-line\/70{border-color:#e6eaf2b3}@supports (color:color-mix(in lab,red,red)){.border-line\/70{border-color:color-mix(in oklab,var(--color-line) 70%,transparent)}}.border-line\/80{border-color:#e6eaf2cc}@supports (color:color-mix(in lab,red,red)){.border-line\/80{border-color:color-mix(in oklab,var(--color-line) 80%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500{background-color:var(--color-brand-500)}.bg-current{background-color:currentColor}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/80{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/80{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/70{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/70{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/40{background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-slate-950\/95{background-color:#020618f2}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/95{background-color:color-mix(in oklab,var(--color-slate-950) 95%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-brand-50{--tw-gradient-from:var(--color-brand-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-brand-500{--tw-gradient-from:var(--color-brand-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-50{--tw-gradient-to:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-400{--tw-gradient-to:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-0{padding:0}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[17px\]{font-size:17px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-brand-500{color:var(--color-brand-500)}.text-brand-600{color:var(--color-brand-600)}.text-brand-700{color:var(--color-brand-700)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.accent-brand-500{accent-color:var(--color-brand-500)}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-brand-500\/25{--tw-shadow-color:#2f6bff40}@supports (color:color-mix(in lab,red,red)){.shadow-brand-500\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-brand-500) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-brand-500\/30{--tw-shadow-color:#2f6bff4d}@supports (color:color-mix(in lab,red,red)){.shadow-brand-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-brand-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/10{--tw-shadow-color:#0f172b1a}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/20{--tw-shadow-color:#0f172b33}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-100{--tw-ring-color:var(--color-amber-100)}.ring-brand-100{--tw-ring-color:var(--color-brand-100)}.ring-emerald-100{--tw-ring-color:var(--color-emerald-100)}.ring-line{--tw-ring-color:var(--color-line)}.ring-red-100{--tw-ring-color:var(--color-red-100)}.ring-sky-100{--tw-ring-color:var(--color-sky-100)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}@media(hover:hover){.hover\:border-brand-200:hover{border-color:var(--color-brand-200)}.hover\:border-brand-600:hover{border-color:var(--color-brand-600)}.hover\:border-line:hover{border-color:var(--color-line)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:border-slate-300\/80:hover{border-color:#cad5e2cc}@supports (color:color-mix(in lab,red,red)){.hover\:border-slate-300\/80:hover{border-color:color-mix(in oklab,var(--color-slate-300) 80%,transparent)}}.hover\:bg-brand-50:hover{background-color:var(--color-brand-50)}.hover\:bg-brand-100:hover{background-color:var(--color-brand-100)}.hover\:bg-brand-600:hover{background-color:var(--color-brand-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}}.focus\:border-brand-500:focus{border-color:var(--color-brand-500)}.focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-brand-500\/15:focus{--tw-ring-color:#2f6bff26}@supports (color:color-mix(in lab,red,red)){.focus\:ring-brand-500\/15:focus{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 15%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-brand-500\/20:focus-visible{--tw-ring-color:#2f6bff33}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-brand-500\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 20%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-50:disabled{background-color:var(--color-slate-50)}.disabled\:text-slate-400:disabled{color:var(--color-slate-400)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#c9d2e3 transparent}.scrollbar-thin::-webkit-scrollbar{width:6px;height:6px}.scrollbar-thin::-webkit-scrollbar-thumb{background:#c9d2e3;border-radius:999px}.card-shadow{box-shadow:0 1px 2px #1018280a,0 18px 36px -24px #10182838}.animate-toast-in{animation:.24s cubic-bezier(.2,.8,.2,1) toast-in}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/static/assets/index-Cl1ZyI7J.css b/static/assets/index-Cl1ZyI7J.css new file mode 100644 index 0000000..6f80ef2 --- /dev/null +++ b/static/assets/index-Cl1ZyI7J.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-xl:36rem;--container-3xl:48rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-50:#eef4ff;--color-brand-100:#dbe7ff;--color-brand-200:#bfd4ff;--color-brand-500:#2f6bff;--color-brand-600:#1f55e0;--color-brand-700:#1a46bd;--color-line:#e6eaf2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{color-scheme:light;scroll-behavior:smooth}body{min-height:100vh;color:var(--color-slate-900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-sans);background-color:#f5f7fb}::selection{background:#2f6bff2e}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.top-0{top:0}.top-1\/2{top:50%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.right-0{right:0}.right-2\.5{right:calc(var(--spacing) * 2.5)}.-bottom-0\.5{bottom:calc(var(--spacing) * -.5)}.bottom-7{bottom:calc(var(--spacing) * 7)}.bottom-10{bottom:calc(var(--spacing) * 10)}.left-1\/2{left:50%}.left-2\.5{left:calc(var(--spacing) * 2.5)}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-\[60\]{z-index:60}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.-mr-1{margin-right:calc(var(--spacing) * -1)}.mr-1{margin-right:var(--spacing)}.mr-auto{margin-right:auto}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-16{height:calc(var(--spacing) * 16)}.h-\[60vh\]{height:60vh}.h-full{height:100%}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-\[196px\]{max-height:196px}.max-h-\[calc\(100vh-2rem\)\]{max-height:calc(100vh - 2rem)}.min-h-0{min-height:0}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\[70px\]{min-height:70px}.min-h-screen{min-height:100vh}.w-9{width:calc(var(--spacing) * 9)}.w-40{width:calc(var(--spacing) * 40)}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[50\%\]{max-width:50%}.max-w-\[85vw\]{max-width:85vw}.max-w-\[320px\]{max-width:320px}.max-w-\[1320px\]{max-width:1320px}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.scrollbar-thin{scrollbar-width:thin}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-brand-100{border-color:var(--color-brand-100)}.border-brand-500{border-color:var(--color-brand-500)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-line{border-color:var(--color-line)}.border-line\/70{border-color:#e6eaf2b3}@supports (color:color-mix(in lab,red,red)){.border-line\/70{border-color:color-mix(in oklab,var(--color-line) 70%,transparent)}}.border-line\/80{border-color:#e6eaf2cc}@supports (color:color-mix(in lab,red,red)){.border-line\/80{border-color:color-mix(in oklab,var(--color-line) 80%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500{background-color:var(--color-brand-500)}.bg-current{background-color:currentColor}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/80{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/80{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/70{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/70{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/40{background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-slate-950\/95{background-color:#020618f2}@supports (color:color-mix(in lab,red,red)){.bg-slate-950\/95{background-color:color-mix(in oklab,var(--color-slate-950) 95%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-brand-50{--tw-gradient-from:var(--color-brand-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-brand-500{--tw-gradient-from:var(--color-brand-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-50{--tw-gradient-to:var(--color-sky-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-400{--tw-gradient-to:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-0{padding:0}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pr-0\.5{padding-right:calc(var(--spacing) * .5)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[17px\]{font-size:17px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-words{overflow-wrap:break-word}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-brand-500{color:var(--color-brand-500)}.text-brand-600{color:var(--color-brand-600)}.text-brand-700{color:var(--color-brand-700)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.accent-brand-500{accent-color:var(--color-brand-500)}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-brand-500\/25{--tw-shadow-color:#2f6bff40}@supports (color:color-mix(in lab,red,red)){.shadow-brand-500\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-brand-500) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-brand-500\/30{--tw-shadow-color:#2f6bff4d}@supports (color:color-mix(in lab,red,red)){.shadow-brand-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-brand-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/10{--tw-shadow-color:#0f172b1a}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/20{--tw-shadow-color:#0f172b33}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber-100{--tw-ring-color:var(--color-amber-100)}.ring-brand-100{--tw-ring-color:var(--color-brand-100)}.ring-emerald-100{--tw-ring-color:var(--color-emerald-100)}.ring-line{--tw-ring-color:var(--color-line)}.ring-red-100{--tw-ring-color:var(--color-red-100)}.ring-sky-100{--tw-ring-color:var(--color-sky-100)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-500{--tw-duration:.5s;transition-duration:.5s}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}@media(hover:hover){.hover\:border-brand-200:hover{border-color:var(--color-brand-200)}.hover\:border-brand-600:hover{border-color:var(--color-brand-600)}.hover\:border-line:hover{border-color:var(--color-line)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:border-slate-300\/80:hover{border-color:#cad5e2cc}@supports (color:color-mix(in lab,red,red)){.hover\:border-slate-300\/80:hover{border-color:color-mix(in oklab,var(--color-slate-300) 80%,transparent)}}.hover\:bg-brand-50:hover{background-color:var(--color-brand-50)}.hover\:bg-brand-100:hover{background-color:var(--color-brand-100)}.hover\:bg-brand-600:hover{background-color:var(--color-brand-600)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}}.focus\:border-brand-500:focus{border-color:var(--color-brand-500)}.focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-brand-500\/15:focus{--tw-ring-color:#2f6bff26}@supports (color:color-mix(in lab,red,red)){.focus\:ring-brand-500\/15:focus{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 15%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-3:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-brand-500\/20:focus-visible{--tw-ring-color:#2f6bff33}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-brand-500\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 20%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-50:disabled{background-color:var(--color-slate-50)}.disabled\:text-slate-400:disabled{color:var(--color-slate-400)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}}@media(min-width:48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:64rem){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.scrollbar-thin{scrollbar-width:thin;scrollbar-color:#c9d2e3 transparent}.scrollbar-thin::-webkit-scrollbar{width:6px;height:6px}.scrollbar-thin::-webkit-scrollbar-thumb{background:#c9d2e3;border-radius:999px}.card-shadow{box-shadow:0 1px 2px #1018280a,0 18px 36px -24px #10182838}.animate-toast-in{animation:.24s cubic-bezier(.2,.8,.2,1) toast-in}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/static/assets/index-DrnB8PWg.js b/static/assets/index-DrnB8PWg.js new file mode 100644 index 0000000..3252a36 --- /dev/null +++ b/static/assets/index-DrnB8PWg.js @@ -0,0 +1,233 @@ +var zy=Object.defineProperty;var Ey=(r,z,T)=>z in r?zy(r,z,{enumerable:!0,configurable:!0,writable:!0,value:T}):r[z]=T;var Ji=(r,z,T)=>Ey(r,typeof z!="symbol"?z+"":z,T);(function(){const z=document.createElement("link").relList;if(z&&z.supports&&z.supports("modulepreload"))return;for(const C of document.querySelectorAll('link[rel="modulepreload"]'))d(C);new MutationObserver(C=>{for(const w of C)if(w.type==="childList")for(const M of w.addedNodes)M.tagName==="LINK"&&M.rel==="modulepreload"&&d(M)}).observe(document,{childList:!0,subtree:!0});function T(C){const w={};return C.integrity&&(w.integrity=C.integrity),C.referrerPolicy&&(w.referrerPolicy=C.referrerPolicy),C.crossOrigin==="use-credentials"?w.credentials="include":C.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function d(C){if(C.ep)return;C.ep=!0;const w=T(C);fetch(C.href,w)}})();var Ms={exports:{}},du={};/** + * @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 sm;function _y(){if(sm)return du;sm=1;var r=Symbol.for("react.transitional.element"),z=Symbol.for("react.fragment");function T(d,C,w){var M=null;if(w!==void 0&&(M=""+w),C.key!==void 0&&(M=""+C.key),"key"in C){w={};for(var nt in C)nt!=="key"&&(w[nt]=C[nt])}else w=C;return C=w.ref,{$$typeof:r,type:d,key:M,ref:C!==void 0?C:null,props:w}}return du.Fragment=z,du.jsx=T,du.jsxs=T,du}var rm;function Oy(){return rm||(rm=1,Ms.exports=_y()),Ms.exports}var f=Oy(),Cs={exports:{}},it={};/** + * @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 om;function jy(){if(om)return it;om=1;var r=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),M=Symbol.for("react.context"),nt=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),X=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),A=Symbol.for("react.view_transition"),ct=Symbol.iterator;function wt(o){return o===null||typeof o!="object"?null:(o=ct&&o[ct]||o["@@iterator"],typeof o=="function"?o:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},U=Object.assign,ht={};function et(o,N,Q){this.props=o,this.context=N,this.refs=ht,this.updater=Q||$}et.prototype.isReactComponent={},et.prototype.setState=function(o,N){if(typeof o!="object"&&typeof o!="function"&&o!=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,o,N,"setState")},et.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function Nt(){}Nt.prototype=et.prototype;function Ft(o,N,Q){this.props=o,this.context=N,this.refs=ht,this.updater=Q||$}var Ct=Ft.prototype=new Nt;Ct.constructor=Ft,U(Ct,et.prototype),Ct.isPureReactComponent=!0;var Ht=Array.isArray;function tt(){}var D={H:null,A:null,T:null,S:null},jt=Object.prototype.hasOwnProperty;function _t(o,N,Q){var Z=Q.ref;return{$$typeof:r,type:o,key:N,ref:Z!==void 0?Z:null,props:Q}}function Tt(o,N){return _t(o.type,N,o.props)}function qt(o){return typeof o=="object"&&o!==null&&o.$$typeof===r}function Kt(o){var N={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(Q){return N[Q]})}var al=/\/+/g;function At(o,N){return typeof o=="object"&&o!==null&&o.key!=null?Kt(""+o.key):N.toString(36)}function R(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(tt,tt):(o.status="pending",o.then(function(N){o.status==="pending"&&(o.status="fulfilled",o.value=N)},function(N){o.status==="pending"&&(o.status="rejected",o.reason=N)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function F(o,N,Q,Z,ot){var yt=typeof o;(yt==="undefined"||yt==="boolean")&&(o=null);var dt=!1;if(o===null)dt=!0;else switch(yt){case"bigint":case"string":case"number":dt=!0;break;case"object":switch(o.$$typeof){case r:case z:dt=!0;break;case q:return dt=o._init,F(dt(o._payload),N,Q,Z,ot)}}if(dt)return ot=ot(o),dt=Z===""?"."+At(o,0):Z,Ht(ot)?(Q="",dt!=null&&(Q=dt.replace(al,"$&/")+"/"),F(ot,N,Q,"",function(B){return B})):ot!=null&&(qt(ot)&&(ot=Tt(ot,Q+(ot.key==null||o&&o.key===ot.key?"":(""+ot.key).replace(al,"$&/")+"/")+dt)),N.push(ot)),1;dt=0;var K=Z===""?".":Z+":";if(Ht(o))for(var g=0;g>>1,G=R[pt];if(0>>1;ptC(Bt,lt))oC(N,Bt)?(R[pt]=N,R[o]=lt,pt=o):(R[pt]=Bt,R[rt]=lt,pt=rt);else if(oC(N,lt))R[pt]=N,R[o]=lt,pt=o;else break t}}return F}function C(R,F){var lt=R.sortIndex-F.sortIndex;return lt!==0?lt:R.id-F.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var w=performance;r.unstable_now=function(){return w.now()}}else{var M=Date,nt=M.now();r.unstable_now=function(){return M.now()-nt}}var I=[],X=[],q=1,S=null,A=3,ct=!1,wt=!1,$=!1,U=!1,ht=typeof setTimeout=="function"?setTimeout:null,et=typeof clearTimeout=="function"?clearTimeout:null,Nt=typeof setImmediate<"u"?setImmediate:null;function Ft(R){for(var F=T(X);F!==null;){if(F.callback===null)d(X);else if(F.startTime<=R)d(X),F.sortIndex=F.expirationTime,z(I,F);else break;F=T(X)}}function Ct(R){if($=!1,Ft(R),!wt)if(T(I)!==null)wt=!0,Ht||(Ht=!0,qt());else{var F=T(X);F!==null&&At(Ct,F.startTime-R)}}var Ht=!1,tt=-1,D=5,jt=-1;function _t(){return U?!0:!(r.unstable_now()-jtR&&_t());){var pt=S.callback;if(typeof pt=="function"){S.callback=null,A=S.priorityLevel;var G=pt(S.expirationTime<=R);if(R=r.unstable_now(),typeof G=="function"){S.callback=G,Ft(R),F=!0;break l}S===T(I)&&d(I),Ft(R)}else d(I);S=T(I)}if(S!==null)F=!0;else{var ut=T(X);ut!==null&&At(Ct,ut.startTime-R),F=!1}}break t}finally{S=null,A=lt,ct=!1}F=void 0}}finally{F?qt():Ht=!1}}}var qt;if(typeof Nt=="function")qt=function(){Nt(Tt)};else if(typeof MessageChannel<"u"){var Kt=new MessageChannel,al=Kt.port2;Kt.port1.onmessage=Tt,qt=function(){al.postMessage(null)}}else qt=function(){ht(Tt,0)};function At(R,F){tt=ht(function(){R(r.unstable_now())},F)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(R){R.callback=null},r.unstable_forceFrameRate=function(R){0>R||125pt?(R.sortIndex=lt,z(X,R),T(I)===null&&R===T(X)&&($?(et(tt),tt=-1):$=!0,At(Ct,lt-pt))):(R.sortIndex=G,z(I,R),wt||ct||(wt=!0,Ht||(Ht=!0,qt()))),R},r.unstable_shouldYield=_t,r.unstable_wrapCallback=function(R){var F=A;return function(){var lt=A;A=F;try{return R.apply(this,arguments)}finally{A=lt}}}})(Rs)),Rs}var hm;function My(){return hm||(hm=1,Us.exports=Ay()),Us.exports}var Hs={exports:{}},yl={};/** + * @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 ym;function Cy(){if(ym)return yl;ym=1;var r=Bs();function z(q){var S="https://react.dev/errors/"+q;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(z){console.error(z)}}return r(),Hs.exports=Cy(),Hs.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 gm;function Uy(){if(gm)return mu;gm=1;var r=My(),z=Bs(),T=Dy();function d(t){var l="https://react.dev/errors/"+t;if(1j||(t.current=O[j],O[j]=null,j--)}function k(t,l){j++,O[j]=t.current,t.current=l}var It=P(null),Gl=P(null),jl=P(null),gu=P(null);function bu(t,l){switch(k(jl,l),k(Gl,t),k(It,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?b0(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=b0(l),t=x0(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}L(It),k(It,t)}function ja(){L(It),L(Gl),L(jl)}function $i(t){var l=t.memoizedState;l!==null&&(vn._currentValue=l.memoizedState,k(gu,t)),l=It.current;var e=x0(l,t.type);l!==e&&(k(Gl,t),k(It,e))}function xu(t){Gl.current===t&&(L(It),L(Gl)),gu.current===t&&(L(gu),vn._currentValue=B)}var Fi,Ys;function Ce(t){if(Fi===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);Fi=l&&l[1]||"",Ys=-1)":-1n||s[a]!==v[n]){var p=` +`+s[a].replace(" at new "," at ");return t.displayName&&p.includes("")&&(p=p.replace("",t.displayName)),p}while(1<=a&&0<=n);break}}}finally{Wi=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?Ce(e):""}function jm(t,l){switch(t.tag){case 26:case 27:case 5:return Ce(t.type);case 16:return Ce("Lazy");case 13:return t.child!==l&&l!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Ii(t.type,!1);case 11:return Ii(t.type.render,!1);case 1:return Ii(t.type,!0);case 31:return Ce("Activity");case 30:return Ce("ViewTransition");default:return""}}function ws(t){try{var l="",e=null;do l+=jm(t,e),e=t,t=t.return;while(t);return l}catch(a){return` +Error generating stack: `+a.message+` +`+a.stack}}var Pi=Object.prototype.hasOwnProperty,tc=r.unstable_scheduleCallback,lc=r.unstable_cancelCallback,Am=r.unstable_shouldYield,Mm=r.unstable_requestPaint,Al=r.unstable_now,Cm=r.unstable_getCurrentPriorityLevel,Gs=r.unstable_ImmediatePriority,Qs=r.unstable_UserBlockingPriority,pu=r.unstable_NormalPriority,Dm=r.unstable_LowPriority,Xs=r.unstable_IdlePriority,Um=r.log,Rm=r.unstable_setDisableYieldValue,xn=null,Ml=null;function De(t){if(typeof Um=="function"&&Rm(t),Ml&&typeof Ml.setStrictMode=="function")try{Ml.setStrictMode(xn,t)}catch{}}var Cl=Math.clz32?Math.clz32:Bm,Hm=Math.log,qm=Math.LN2;function Bm(t){return t>>>=0,t===0?32:31-(Hm(t)/qm|0)|0}var Su=256,Nu=262144,Tu=4194304;function ua(t){var l=t&42;if(l!==0)return l;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function zu(t,l,e){var a=t.pendingLanes;if(a===0)return 0;var n=0,u=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=ua(a):(i&=c,i!==0?n=ua(i):e||(e=c&~t,e!==0&&(n=ua(e))))):(c=a&~u,c!==0?n=ua(c):i!==0?n=ua(i):e||(e=a&~t,e!==0&&(n=ua(e)))),n===0?0:l!==0&&l!==n&&(l&u)===0&&(u=n&-n,e=l&-l,u>=e||u===32&&(e&4194048)!==0)?l:n}function pn(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Vs(t,l){(l&8)!==0&&(l|=l&32);var e=t.entangledLanes;if(e!==0)for(t=t.entanglements,e&=l;0e;e++)l.push(t);return l}function Sn(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function wm(t,l,e,a,n,u){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var c=t.entanglements,s=t.expirationTimes,v=t.hiddenUpdates;for(e=i&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dc=!1;if(ge)try{var En={};Object.defineProperty(En,"passive",{get:function(){dc=!0}}),window.addEventListener("test",En,En),window.removeEventListener("test",En,En)}catch{dc=!1}var Ue=null,mc=null,Mu=null;function mr(){if(Mu)return Mu;var t,l=mc,e=l.length,a,n="value"in Ue?Ue.value:Ue.textContent,u=n.length;for(t=0;t=jn),xr=" ",pr=!1;function Sr(t,l){switch(t){case"keyup":return S1.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ba=!1;function T1(t,l){switch(t){case"compositionend":return Nr(l);case"keypress":return l.which!==32?null:(pr=!0,xr);case"textInput":return t=l.data,t===xr&&pr?null:t;default:return null}}function z1(t,l){if(Ba)return t==="compositionend"||!bc&&Sr(t,l)?(t=mr(),Mu=mc=Ue=null,Ba=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Mr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cr(t,l){var e=Mr(t);t=0;for(var a;e;){if(e.nodeType===3){if(a=t+e.textContent.length,t<=l&&a>=l)return{node:e,offset:l-t};t=a}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=Mr(e)}}function Dr(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?Dr(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function Ur(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=Sc(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=Sc(t.document)}return l}function Nc(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var D1=ge&&"documentMode"in document&&11>=document.documentMode,Ya=null,Tc=null,Dn=null,zc=!1;function Rr(t,l,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;zc||Ya==null||Ya!==Sc(a)||(a=Ya,"selectionStart"in a&&Nc(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}),Dn&&Cn(Dn,a)||(Dn=a,a=Hi(Tc,"onSelect"),0>=i,n-=i,ue=1<<32-Cl(l)+n|e<at?(el=W,W=null):el=W.sibling;var St=h(y,W,b[at],E);if(St===null){W===null&&(W=el);break}t&&W&&St.alternate===null&&l(y,W),m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St,W=el}if(at===b.length)return e(y,W),mt&&Se(y,at),V;if(W===null){for(;atat?(el=W,W=null):el=W.sibling;var na=h(y,W,St.value,E);if(na===null){W===null&&(W=el);break}t&&W&&na.alternate===null&&l(y,W),m=u(na,m,at),xt===null?V=na:xt.sibling=na,xt=na,W=el}if(St.done)return e(y,W),mt&&Se(y,at),V;if(W===null){for(;!St.done;at++,St=b.next())St=_(y,St.value,E),St!==null&&(m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St);return mt&&Se(y,at),V}for(W=a(W);!St.done;at++,St=b.next())St=x(W,y,at,St.value,E),St!==null&&(t&&(el=St.alternate,el!==null&&W.delete(el.key===null?at:el.key)),m=u(St,m,at),xt===null?V=St:xt.sibling=St,xt=St);return t&&W.forEach(function(Ty){return l(y,Ty)}),mt&&Se(y,at),V}function st(y,m,b,E){if(typeof b=="object"&&b!==null&&b.type===Tt&&b.key===null&&b.props.ref===void 0&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case jt:t:{for(var V=b.key;m!==null;){if(m.key===V){if(V=b.type,V===Tt){if(m.tag===7){e(y,m.sibling),E=n(m,b.props.children),we(E,b),E.return=y,y=E;break t}}else if(m.elementType===V||typeof V=="object"&&V!==null&&V.$$typeof===G&&ba(V)===m.type){e(y,m.sibling),E=n(m,b.props),we(E,b),E.return=y,y=E;break t}e(y,m);break}else l(y,m);m=m.sibling}b.type===Tt?(E=oa(b.props.children,y.mode,E,b.key),we(E,b),E.return=y,y=E):(E=Gu(b.type,b.key,b.props,null,y.mode,E),we(E,b),E.return=y,y=E)}return i(y);case _t:t:{for(V=b.key;m!==null;){if(m.key===V)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){e(y,m.sibling),E=n(m,b.children||[]),E.return=y,y=E;break t}else{e(y,m);break}else l(y,m);m=m.sibling}E=Cc(b,y.mode,E),E.return=y,y=E}return i(y);case G:return b=ba(b),st(y,m,b,E)}if(dt(b))return H(y,m,b,E);if(Z(b)){if(V=Z(b),typeof V!="function")throw Error(d(150));return b=V.call(b),J(y,m,b,E)}if(typeof b.then=="function")return st(y,m,Fu(b),E);if(b.$$typeof===At)return st(y,m,Ku(y,b),E);Wu(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(e(y,m.sibling),E=n(m,b),E.return=y,y=E):(e(y,m),E=Mc(b,y.mode,E),E.return=y,y=E),i(y)):e(y,m)}return function(y,m,b,E){try{Yn=0;var V=st(y,m,b,E);return Ja=null,V}catch(W){if(W===Ka||W===ku)throw W;var xt=Tl(29,W,null,y.mode);return xt.lanes=E,xt.return=y,xt}finally{}}}var pa=no(!0),uo=no(!1),Ge=!1;function Qc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Qe(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xe(t,l,e){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(Ot&2)!==0){var n=a.pending;return n===null?l.next=l:(l.next=n.next,n.next=l),a.pending=l,l=wu(t),Xr(t,null,e),l}return Yu(t,a,l,e),wu(t)}function wn(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}function Vc(t,l){var e=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var n=null,u=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,e=e.next}while(e!==null);u===null?n=u=l:u=u.next=l}else n=u=l;e={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var Zc=!1;function Gn(){if(Zc){var t=La;if(t!==null)throw t}}function Qn(t,l,e,a){Zc=!1;var n=t.updateQueue;Ge=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var s=c,v=s.next;s.next=null,i===null?u=v:i.next=v,i=s;var p=t.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==i&&(c===null?p.firstBaseUpdate=v:c.next=v,p.lastBaseUpdate=s))}if(u!==null){var _=n.baseState;i=0,p=v=s=null,c=u;do{var h=c.lane&-536870913,x=h!==c.lane;if(x?(bt&h)===h:(a&h)===h){h!==0&&h===va&&(Zc=!0),p!==null&&(p=p.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});t:{var H=t,J=c;h=l;var st=e;switch(J.tag){case 1:if(H=J.payload,typeof H=="function"){_=H.call(st,_,h);break t}_=H;break t;case 3:H.flags=H.flags&-65537|128;case 0:if(H=J.payload,h=typeof H=="function"?H.call(st,_,h):H,h==null)break t;_=tt({},_,h);break t;case 2:Ge=!0}}h=c.callback,h!==null&&(t.flags|=64,x&&(t.flags|=8192),x=n.callbacks,x===null?n.callbacks=[h]:x.push(h))}else x={lane:h,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(v=p=x,s=_):p=p.next=x,i|=h;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;x=c,c=x.next,x.next=null,n.lastBaseUpdate=x,n.shared.pending=null}}while(!0);p===null&&(s=_),n.baseState=s,n.firstBaseUpdate=v,n.lastBaseUpdate=p,u===null&&(n.shared.lanes=0),$e|=i,t.lanes=i,t.memoizedState=_}}function io(t,l){if(typeof t!="function")throw Error(d(191,t));t.call(l)}function co(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tu?u:8;var i=K.T,c={};c.types=i!==null?i.types:null,K.T=c,of(t,!1,l,e);try{var s=n(),v=K.S;if(v!==null&&v(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var p=V1(s,a);Ln(t,l,p,Yl(t))}else Ln(t,l,a,Yl(t))}catch(_){Ln(t,l,{then:function(){},status:"rejected",reason:_},Yl())}finally{g.p=u,i!==null&&c.types!==null&&(i.types=c.types),K.T=i}}function $1(){}function sf(t,l,e,a){if(t.tag!==5)throw Error(d(476));var n=Go(t).queue;wo(t,n,l,B,e===null?$1:function(){return Qo(t),e(a)})}function Go(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:B},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function Qo(t){var l=Go(t);l.next===null&&(l=t.alternate.memoizedState),Ln(t,l.next.queue,{},Yl())}function rf(){return rl(vn)}function Xo(){return Wt().memoizedState}function Vo(){return Wt().memoizedState}function F1(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Yl();t=Qe(e);var a=Xe(l,t,e);a!==null&&(Ol(a,l,e),wn(a,l,e)),l={cache:Bc()},t.payload=l;return}l=l.return}}function W1(t,l,e){var a=Yl();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},ci(t)?Lo(l,e):(e=jc(t,l,e,a),e!==null&&(Ol(e,t,a),Ko(e,l,a)))}function Zo(t,l,e){var a=Yl();Ln(t,l,e,a)}function Ln(t,l,e,a){var n={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(ci(t))Lo(l,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=l.lastRenderedReducer,u!==null))try{var i=l.lastRenderedState,c=u(i,e);if(n.hasEagerState=!0,n.eagerState=c,Ul(c,i))return Yu(t,l,n,0),Gt===null&&Bu(),!1}catch{}finally{}if(e=jc(t,l,n,a),e!==null)return Ol(e,t,a),Ko(e,l,a),!0}return!1}function of(t,l,e,a){if(a={lane:2,revertLane:ls(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ci(t)){if(l)throw Error(d(479))}else l=jc(t,e,a,2),l!==null&&Ol(l,t,2)}function ci(t){var l=t.alternate;return t===ft||l!==null&&l===ft}function Lo(t,l){ka=ti=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function Ko(t,l,e){if((e&4194048)!==0){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}var fi={readContext:rl,use:ai,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt,useEffectEvent:kt},Jo={readContext:rl,use:ai,useCallback:function(t,l){return xl().memoizedState=[t,l===void 0?null:l],t},useContext:rl,useEffect:Mo,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,ui(4194308,4,Ro.bind(null,l,t),e)},useLayoutEffect:function(t,l){return ui(4194308,4,t,l)},useInsertionEffect:function(t,l){ui(4,2,t,l)},useMemo:function(t,l){var e=xl();l=l===void 0?null:l;var a=t();if(Sa){De(!0);try{t()}finally{De(!1)}}return e.memoizedState=[a,l],a},useReducer:function(t,l,e){var a=xl();if(e!==void 0){var n=e(l);if(Sa){De(!0);try{e(l)}finally{De(!1)}}}else n=l;return a.memoizedState=a.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},a.queue=t,t=t.dispatch=W1.bind(null,ft,t),[a.memoizedState,t]},useRef:function(t){var l=xl();return t={current:t},l.memoizedState=t},useState:function(t){t=af(t);var l=t.queue,e=Zo.bind(null,ft,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:cf,useDeferredValue:function(t,l){var e=xl();return ff(e,t,l)},useTransition:function(){var t=af(!1);return t=wo.bind(null,ft,t.queue,!0,!1),xl().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var a=ft,n=xl();if(mt){if(e===void 0)throw Error(d(407));e=e()}else{if(e=l(),Gt===null)throw Error(d(349));(bt&127)!==0||ho(a,l,e)}n.memoizedState=e;var u={value:e,getSnapshot:l};return n.queue=u,Mo(vo.bind(null,a,u,t),[t]),a.flags|=2048,Fa(9,{destroy:void 0},yo.bind(null,a,u,e,l),null),e},useId:function(){var t=xl(),l=Gt.identifierPrefix;if(mt){var e=ie,a=ue;e=(a&~(1<<32-Cl(a)-1)).toString(32)+e,l="_"+l+"R_"+e,e=li++,0<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[sl]=l,u[Nl]=a;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=u;t:switch(hl(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&Oe(l)}}return Vt(l),l.subtreeFlags&=-33554433,zf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==a&&Oe(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(d(166));if(t=jl.current,Za(l)){if(t=l.stateNode,e=l.memoizedProps,a=null,n=il,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}t[sl]=l,t=!!(t.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||v0(t.nodeValue,e)),t||Be(l,!0)}else t=nu(t).createTextNode(a),t[sl]=l,l.stateNode=t}return Vt(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(a=Za(l),e!==null){if(t===null){if(!a)throw Error(d(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(d(557));t[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Vt(l),t=!1}else e=Rc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Rl(l),l):(Rl(l),null);if((l.flags&128)!==0)throw Error(d(558))}return Vt(l),null;case 13:if(a=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=Za(l),a!==null&&a.dehydrated!==null){if(t===null){if(!n)throw Error(d(318));if(n=l.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(d(317));n[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Vt(l),n=!1}else n=Rc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),n=!0;if(!n)return l.flags&256?(Rl(l),l):(Rl(l),null)}return Rl(l),(l.flags&128)!==0?(l.lanes=e,l):(e=a!==null,t=t!==null&&t.memoizedState!==null,e&&(a=l.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),hi(l,l.updateQueue),Vt(l),null);case 4:return ja(),t===null&&us(l.stateNode.containerInfo),l.flags|=67108864,Vt(l),null;case 10:return Te(l.type),Vt(l),null;case 19:if(kc(l),a=l.memoizedState,a===null)return Vt(l),null;if(n=(l.flags&128)!==0,u=a.rendering,u===null)if(n)Jn(a,!1);else{if($t!==0||t!==null&&(t.flags&128)!==0)for(t=l.child;t!==null;){if(u=Pu(t),u!==null){for(l.flags|=128,Jn(a,!1),t=u.updateQueue,l.updateQueue=t,hi(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)Vr(e,t),e=e.sibling;return Xn(l,dl.current&1|2),mt&&Se(l,a.treeForkCount),l.child}t=t.sibling}a.tail!==null&&Al()>_i&&(l.flags|=128,n=!0,Jn(a,!1),l.lanes=4194304)}else{if(!n)if(t=Pu(u),t!==null){if(l.flags|=128,n=!0,t=t.updateQueue,l.updateQueue=t,hi(l,t),Jn(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!u.alternate&&!mt)return Vt(l),null}else 2*Al()-a.renderingStartTime>_i&&e!==536870912&&(l.flags|=128,n=!0,Jn(a,!1),l.lanes=4194304);a.isBackwards?(u.sibling=l.child,l.child=u):(t=a.last,t!==null?t.sibling=u:l.child=u,a.last=u)}if(a.tail!==null){t=a.tail;t:{for(e=t;e!==null;){if(e.alternate!==null){e=!1;break t}e=e.sibling}e=!0}return a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Al(),t.sibling=null,u=dl.current,u=n?u&1|2:u&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||mt?Xn(l,u):(e=u,k(ol,l),k(dl,e),vl===null&&(vl=l)),mt&&Se(l,a.treeForkCount),t}return Vt(l),null;case 22:case 23:return Rl(l),Kc(),a=l.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(e&536870912)!==0&&(l.flags&128)===0&&(Vt(l),l.subtreeFlags&6&&(l.flags|=8192)):Vt(l),e=l.updateQueue,e!==null&&hi(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==e&&(l.flags|=2048),t!==null&&L(ga),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),Te(Pt),Vt(l),null;case 25:return null;case 30:return l.flags|=33554432,Vt(l),null}throw Error(d(156,l.tag))}function nh(t,l){switch(Dc(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return Te(Pt),ja(),t=l.flags,(t&65536)!==0&&(t&128)===0?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return xu(l),null;case 31:if(l.memoizedState!==null){if(Rl(l),l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Rl(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return kc(l),t=l.flags,t&65536?(l.flags=t&-65537|128,t=l.memoizedState,t!==null&&(t.rendering=null,t.tail=null),l.flags|=4,l):null;case 4:return ja(),null;case 10:return Te(l.type),null;case 22:case 23:return Rl(l),Kc(),t!==null&&L(ga),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return Te(Pt),null;case 25:return null;default:return null}}function bd(t,l){switch(Dc(l),l.tag){case 3:Te(Pt),ja();break;case 26:case 27:case 5:xu(l);break;case 4:ja();break;case 31:l.memoizedState!==null&&Rl(l);break;case 13:Rl(l);break;case 19:kc(l);break;case 10:Te(l.type);break;case 22:case 23:Rl(l),Kc(),t!==null&&L(ga);break;case 24:Te(Pt)}}function kn(t,l){try{var e=l.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var n=a.next;e=n;do{if((e.tag&t)===t){a=void 0;var u=e.create,i=e.inst;a=u(),i.destroy=a}e=e.next}while(e!==n)}}catch(c){Ut(l,l.return,c)}}function Ke(t,l,e){try{var a=l.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&t)===t){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,n=l;var s=e,v=c;try{v()}catch(p){Ut(n,s,p)}}}a=a.next}while(a!==u)}}catch(p){Ut(l,l.return,p)}}function xd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{co(l,e)}catch(a){Ut(t,t.return,a)}}}function pd(t,l,e){e.props=Na(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(a){Ut(t,l,a)}}function ce(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:var n=t.stateNode,u=be(t.memoizedProps,n);(n.ref===null||n.ref.name!==u)&&(n.ref=O0(u)),a=n.ref;break;case 7:if(t.stateNode===null){var i=new wl(t);S(t.child,!1,kh,i,void 0,void 0),t.stateNode=i}a=t.stateNode;break;default:a=t.stateNode}typeof e=="function"?t.refCleanup=e(a):e.current=a}}catch(c){Ut(t,l,c)}}function ml(t,l){var e=t.ref,a=t.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(n){Ut(t,l,n)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(n){Ut(t,l,n)}else e.current=null}function yi(t,l){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&l!==null)for(var e=0;e title"))),hl(a,l,e),a[sl]=t,ul(a),l=a;break t;case"link":if(u=Z0("link","href",n).get(l+(e.href||""))){for(i=0;ist&&(i=st,st=J,J=i);var y=Cr(c,J),m=Cr(c,st);if(y&&m&&(x.rangeCount!==1||x.anchorNode!==y.node||x.anchorOffset!==y.offset||x.focusNode!==m.node||x.focusOffset!==m.offset)){var b=_.createRange();b.setStart(y.node,y.offset),x.removeAllRanges(),J>st?(x.addRange(b),x.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),x.addRange(b))}}}}for(_=[],x=c;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<_.length;c++){var E=_[c];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}gn=!!fs,ss=fs=null}finally{Ot=u,g.p=n,K.T=a}}t.current=l,Jt=2}}function $f(){if(Jt===2){Jt=0;var t=ee,l=_a,e=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||e){e=K.T,K.T=null;var a=g.p;g.p=2;var n=Ot;Ot|=4;try{Cd(t,l.alternate,l)}finally{Ot=n,g.p=a,K.T=e}}Jt=3}}function Ff(){if(Jt===4||Jt===3){Jt=0;var t=an;an=null,Mm();var l=ee,e=_a,a=me,n=Kd,u=(a&335544064)===a?10262:10256;if((e.subtreeFlags&u)!==0||(e.flags&u)!==0?Jt=5:(Jt=0,_a=ee=null,n0(l,l.pendingLanes)),u=l.pendingLanes,u===0&&(Fe=null),nc(a),e=e.stateNode,Ml&&typeof Ml.onCommitFiberRoot=="function")try{Ml.onCommitFiberRoot(xn,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=K.T,u=g.p,g.p=2,K.T=null;try{for(var i=l.onRecoverableError,c=0;ce?32:e,K.T=null,e=Lf,Lf=null;var u=ee,i=me;if(Jt=0,_a=ee=null,me=0,(Ot&6)!==0)throw Error(d(331));var c=Ot;if(Ot|=4,Vd(u.current),Gd(u,u.current,i,e),Ot=c,lu(0,!1),Ml&&typeof Ml.onPostCommitFiberRoot=="function")try{Ml.onPostCommitFiberRoot(xn,u)}catch{}return!0}finally{g.p=n,K.T=a,n0(t,l)}}function u0(t,l,e){l=Vl(e,l),l=hf(t.stateNode,l,2),t=Xe(t,l,2),t!==null&&(Sn(t,2),he(t))}function Ut(t,l,e){if(t.tag===3)u0(t,t,e);else for(;l!==null;){if(l.tag===3){u0(l,t,e);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Fe===null||!Fe.has(a))){t=Vl(e,t),e=ld(2),a=Xe(l,e,2),a!==null&&(ed(e,a,l,t),Sn(a,2),he(a));break}}l=l.return}}function If(t,l,e){var a=t.pingCache;if(a===null){a=t.pingCache=new fh;var n=new Set;a.set(l,n)}else n=a.get(l),n===void 0&&(n=new Set,a.set(l,n));n.has(e)||(Xf=!0,n.add(e),t=vh.bind(null,t,l,e),l.then(t,t))}function vh(t,l,e){var a=t.pingCache;a!==null&&a.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,Gt===t&&(bt&e)===e&&(($t===4||$t===3&&(bt&62914560)===bt&&300>Al()-Ei)&&(Ot&2)===0?fn(t,0):zi|=e,en===bt&&(en=0)),he(t)}function i0(t,l){l===0&&(l=Zs()),t=ra(t,l),t!==null&&(Sn(t,l),he(t))}function gh(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),i0(t,e)}function bh(t,l){var e=0;switch(t.tag){case 31:case 13:var a=t.stateNode,n=t.memoizedState;n!==null&&(e=n.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(l),i0(t,e)}function xh(t,l){return tc(t,l)}var rn=null,on=null,Pf=!1,Ui=!1,ts=!1,Ie=0;function he(t){t!==on&&t.next===null&&(on===null?rn=on=t:on=on.next=t),Ui=!0,Pf||(Pf=!0,Sh())}function lu(t,l){if(!ts&&Ui){ts=!0;do for(var e=!1,a=rn;a!==null;){if(t!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,c=a.pingedLanes;u=(1<<31-Cl(42|t)+1)-1,u&=n&~(i&~c),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(e=!0,r0(a,u))}else u=bt,u=zu(a,a===Gt?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||pn(a,u)||(e=!0,r0(a,u));a=a.next}while(e);ts=!1}}function ph(){c0()}function c0(){Ui=Pf=!1;var t=0;Ie!==0&&Dh()&&(t=Ie);for(var l=Al(),e=null,a=rn;a!==null;){var n=a.next,u=f0(a,l);u===0?(a.next=null,e===null?rn=n:e.next=n,n===null&&(on=e)):(e=a,(t!==0||(u&3)!==0)&&(Ui=!0)),a=n}Jt!==0&&Jt!==5||lu(t),Ie!==0&&(Ie=0)}function f0(t,l){for(var e=t.suspendedLanes,a=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0c)break;var p=s.transferSize,_=s.initiatorType;p&&g0(_)&&(s=s.responseEnd,i+=p*(sYi){J.length=H;break}b=new Promise(Yh.bind(b)),J.push(b)}}}if(0"u"?null:document;function G0(t,l,e){var a=mn;if(a&&typeof l=="string"&&l){var n=Ql(l);n='link[rel="'+t+'"][href="'+n+'"]',typeof e=="string"&&(n+='[crossorigin="'+e+'"]'),w0.has(n)||(w0.add(n),t={rel:t,crossOrigin:e,href:l},a.querySelector(n)===null&&(l=a.createElement("link"),hl(l,"link",t),ul(l),a.head.appendChild(l)))}}function ay(t){Ae.D(t),G0("dns-prefetch",t,null)}function ny(t,l){Ae.C(t,l),G0("preconnect",t,l)}function uy(t,l,e){Ae.L(t,l,e);var a=mn;if(a&&t&&l){var n='link[rel="preload"][as="'+Ql(l)+'"]';l==="image"&&e&&e.imageSrcSet?(n+='[imagesrcset="'+Ql(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(n+='[imagesizes="'+Ql(e.imageSizes)+'"]')):n+='[href="'+Ql(t)+'"]';var u=n;switch(l){case"style":u=hn(t);break;case"script":u=yn(t)}if(!($l.has(u)||(t=tt({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),$l.set(u,t),a.querySelector(n)!==null||l==="style"&&a.querySelector(iu(u))||l==="script"&&a.querySelector(cu(u))))){var i=a.createElement("link");hl(i,"link",t),l==="style"&&(i[Eu]=!0,i.onload=i.onerror=function(){Is(i)}),ul(i),a.head.appendChild(i)}}}function iy(t,l){Ae.m(t,l);var e=mn;if(e&&t){var a=l&&typeof l.as=="string"?l.as:"script",n='link[rel="modulepreload"][as="'+Ql(a)+'"][href="'+Ql(t)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=yn(t)}if(!$l.has(u)&&(t=tt({rel:"modulepreload",href:t},l),$l.set(u,t),e.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(cu(u)))return}a=e.createElement("link"),hl(a,"link",t),ul(a),e.head.appendChild(a)}}}function cy(t,l,e){Ae.S(t,l,e);var a=mn;if(a&&t){var n=Ca(a).hoistableStyles,u=hn(t);l=l||"default";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(iu(u)))c.loading=5;else{t=tt({rel:"stylesheet",href:t,"data-precedence":l},e),(e=$l.get(u))&&Ss(t,e);var s=i=a.createElement("link");ul(s),hl(s,"link",t),s._p=new Promise(function(v,p){s.onload=v,s.onerror=p}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,qi(i,l,a)}i={type:"stylesheet",instance:i,count:1,state:c},n.set(u,i)}}}function fy(t,l){Ae.X(t,l);var e=mn;if(e&&t){var a=Ca(e).hoistableScripts,n=yn(t),u=a.get(n);u||(u=e.querySelector(cu(n)),u||(t=tt({src:t,async:!0},l),(l=$l.get(n))&&Ns(t,l),u=e.createElement("script"),ul(u),hl(u,"link",t),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function sy(t,l){Ae.M(t,l);var e=mn;if(e&&t){var a=Ca(e).hoistableScripts,n=yn(t),u=a.get(n);u||(u=e.querySelector(cu(n)),u||(t=tt({src:t,async:!0,type:"module"},l),(l=$l.get(n))&&Ns(t,l),u=e.createElement("script"),ul(u),hl(u,"link",t),e.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Q0(t,l,e,a){var n=(n=jl.current)?uu(n):null;if(!n)throw Error(d(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=hn(e.href),l=Ca(n).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=hn(e.href);var u=Ca(n).hoistableStyles,i=u.get(t);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,i),(u=n.querySelector(iu(t)))?u._p||(i.instance=u,i.state.loading=5):(u=$l.get(t),u||(u={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},$l.set(t,u)),ry(n,t,u,i.state))),l&&a===null)throw Error(d(528,""));return i}if(l&&a!==null)throw Error(d(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(e=yn(e),l=Ca(n).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,t))}}function hn(t){return'href="'+Ql(t)+'"'}function iu(t){return'link[rel="stylesheet"]['+t+"]"}function X0(t){return tt({},t,{"data-precedence":t.precedence,precedence:null})}function ry(t,l,e,a){if(l=t.querySelector('link[rel="preload"][as="style"]['+l+"]")){if(l[Eu]!==!0){a.loading=1;return}}else l=t.createElement("link"),l[Eu]=!0,l.onload=l.onerror=Is.bind(null,l),hl(l,"link",e),ul(l),t.head.appendChild(l);a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2})}function yn(t){return'[src="'+Ql(t)+'"]'}function cu(t){return"script[async]"+t}function V0(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var a=t.querySelector('style[data-href~="'+Ql(e.href)+'"]');if(a)return l.instance=a,ul(a),a;var n=tt({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),ul(a),hl(a,"style",n),qi(a,e.precedence,t),l.instance=a;case"stylesheet":n=hn(e.href);var u=t.querySelector(iu(n));if(u)return l.state.loading|=4,l.instance=u,ul(u),u;a=X0(e),(n=$l.get(n))&&Ss(a,n),u=(t.ownerDocument||t).createElement("link"),ul(u);var i=u;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),hl(u,"link",a),l.state.loading|=4,qi(u,e.precedence,t),l.instance=u;case"script":return u=yn(e.src),(n=t.querySelector(cu(u)))?(l.instance=n,ul(n),n):(a=e,(n=$l.get(u))&&(a=tt({},e),Ns(a,n)),t=t.ownerDocument||t,n=t.createElement("script"),ul(n),hl(n,"link",a),t.head.appendChild(n),l.instance=n);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,qi(a,e.precedence,t));return l.instance}function qi(t,l,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title"):null)}function oy(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function L0(t,l){return t==="img"&&l.src!=null&&l.src!==""&&l.onLoad==null&&l.loading!=="lazy"}function K0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function J0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function k0(t,l){typeof l.decode=="function"&&(t.imgCount++,l.complete||(t.imgBytes+=J0(l),t.suspenseyImages.push(l)),t=hy.bind(t),l.decode().then(t,t))}function dy(t,l,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var n=hn(a.href),u=l.querySelector(iu(n));if(u){l=u._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=fu.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=u,ul(u);return}u=l.ownerDocument||l,a=X0(a),(n=$l.get(n))&&Ss(a,n),u=u.createElement("link"),ul(u);var i=u;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),hl(u,"link",a),e.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&(e.state.loading&3)===0&&(t.count++,e=fu.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var Yi=0;function my(t,l){return t.stylesheets&&t.count===0&&Gi(t,t.stylesheets),0Yi?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function $0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Gi(t,t.stylesheets);else if(t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}}}function fu(){this.count--,$0(this)}function hy(){this.imgCount--,$0(this)}var wi=null;function Gi(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,wi=new Map,l.forEach(yy,t),wi=null,fu.call(t))}function yy(t,l){if(!(l.state.loading&4)){var e=wi.get(t);if(e)var a=e.get(null);else{e=new Map,wi.set(t,e);for(var n=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(z){console.error(z)}}return r(),Ds.exports=Uy(),Ds.exports}var Hy=Ry();/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qy=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pm=(...r)=>r.filter((z,T,d)=>!!z&&z.trim()!==""&&d.indexOf(z)===T).join(" ").trim();/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var By={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Yy=Y.forwardRef(({color:r="currentColor",size:z=24,strokeWidth:T=2,absoluteStrokeWidth:d,className:C="",children:w,iconNode:M,...nt},I)=>Y.createElement("svg",{ref:I,...By,width:z,height:z,stroke:r,strokeWidth:d?Number(T)*24/Number(z):T,className:pm("lucide",C),...nt},[...M.map(([X,q])=>Y.createElement(X,q)),...Array.isArray(w)?w:[w]]));/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Et=(r,z)=>{const T=Y.forwardRef(({className:d,...C},w)=>Y.createElement(Yy,{ref:w,iconNode:z,className:pm(`lucide-${qy(r)}`,d),...C}));return T.displayName=`${r}`,T};/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wy=Et("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Gy=Et("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sm=Et("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Qy=Et("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xy=Et("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Vy=Et("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zy=Et("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ly=Et("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ky=Et("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Jy=Et("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nm=Et("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ky=Et("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $y=Et("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fy=Et("ListVideo",[["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}],["path",{d:"m16 12 5 3-5 3v-6Z",key:"zpskkp"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wy=Et("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Iy=Et("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Py=Et("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tm=Et("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zm=Et("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ki=Et("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tv=Et("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lv=Et("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ev=Et("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const av=Et("ServerCog",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m15.7 13.4-.9-.3",key:"1jwmzr"}],["path",{d:"m9.2 10.9-.9-.3",key:"qapnim"}],["path",{d:"m10.6 15.7.3-.9",key:"quwk0k"}],["path",{d:"m13.6 15.7-.4-1",key:"cb9xp7"}],["path",{d:"m10.8 9.3-.4-1",key:"1uaiz5"}],["path",{d:"m8.3 13.6 1-.4",key:"s6srou"}],["path",{d:"m14.7 10.8 1-.4",key:"4d31cq"}],["path",{d:"m13.4 8.3-.3.9",key:"1bm987"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nv=Et("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uv=Et("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iv=Et("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cv=Et("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Em=Et("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fv=Et("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sv=Et("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.468.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rv=Et("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function _m(r){var z,T,d="";if(typeof r=="string"||typeof r=="number")d+=r;else if(typeof r=="object")if(Array.isArray(r)){var C=r.length;for(z=0;zov(r),Wl="w-full rounded-lg border border-line bg-white px-3 py-2 text-[13px] text-slate-900 placeholder:text-slate-400 transition focus:border-brand-500 focus:outline-none focus:ring-3 focus:ring-brand-500/15 disabled:cursor-not-allowed disabled:bg-slate-50";function xm(r){if(!r)return"—";const z=Math.floor((Date.now()-r)/6e4);return z<1?"刚刚":z<60?`${z} 分钟前`:`${Math.floor(z/60)} 小时前`}function qs(r=[]){return{total:r.length,studyable:r.filter(z=>z.in_study!==!1).length}}function hu(r){return String(r||"").split("#").filter(Boolean)}const dv={"01":"单选","02":"多选","03":"判断","04":"问答"};function Fl(r){return r instanceof Error?r.message:String(r)}const mv={neutral:"bg-slate-100 text-slate-600 ring-slate-200",brand:"bg-brand-50 text-brand-700 ring-brand-100",success:"bg-emerald-50 text-emerald-700 ring-emerald-100",warning:"bg-amber-50 text-amber-700 ring-amber-100",danger:"bg-red-50 text-red-700 ring-red-100",running:"bg-sky-50 text-sky-700 ring-sky-100"};function yu({tone:r="neutral",children:z,dot:T=!1,className:d}){return f.jsxs("span",{className:gl("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium ring-1 ring-inset",mv[r],d),children:[T&&f.jsx("span",{className:"size-1.5 rounded-full bg-current opacity-70"}),z]})}const hv={primary:"border-brand-500 bg-brand-500 text-white shadow-sm shadow-brand-500/25 hover:border-brand-600 hover:bg-brand-600",secondary:"border-line bg-white text-slate-700 hover:border-slate-300 hover:bg-slate-50",ghost:"border-transparent bg-transparent text-slate-600 hover:bg-slate-100",danger:"border-transparent bg-transparent text-red-600 hover:bg-red-50",soft:"border-brand-100 bg-brand-50 text-brand-700 hover:border-brand-200 hover:bg-brand-100"},yv={sm:"h-8 gap-1.5 rounded-lg px-2.5 text-xs",md:"h-9 gap-1.5 rounded-lg px-3.5 text-[13px]",icon:"h-9 w-9 rounded-lg"};function Qt({variant:r="secondary",size:z="md",loading:T=!1,icon:d,className:C,children:w,disabled:M,type:nt="button",...I}){return f.jsxs("button",{type:nt,disabled:M||T,className:gl("inline-flex shrink-0 items-center justify-center border font-medium transition","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/20","disabled:cursor-not-allowed disabled:opacity-50",hv[r],yv[z],C),...I,children:[T?f.jsx(Wy,{className:"size-3.5 animate-spin"}):d,w]})}function vv(r,z){var w,M;const T=z==="login"||r.status==="logging"||((w=r.run)==null?void 0:w.status)==="logging"?"logging":((M=r.run)==null?void 0:M.status)||r.status||"idle",C={discovering:{label:"发现课程中",tone:"running",pulse:!0},studying:{label:"学习中",tone:"running",pulse:!0},finished:{label:"已完成",tone:"success"},stopped:{label:"已停止",tone:"warning"},error:{label:"出错",tone:"danger"},interrupted:{label:"已中断",tone:"warning"},logging:{label:"登录中",tone:"running",pulse:!0},logged_in:{label:"已登录",tone:"success"},login_failed:{label:"登录失败",tone:"danger"},idle:{label:"未登录",tone:"neutral"}}[T]||{label:T,tone:"neutral"};return{label:C.label,tone:C.tone,pulse:!!C.pulse}}function gv({account:r,course:z,disabled:T,onToggle:d}){var w;const C=(w=r.selected)==null?void 0:w.includes(z.plan_id);return f.jsxs("label",{className:gl("flex cursor-pointer items-start gap-2.5 rounded-lg border border-transparent px-2 py-1.5 transition","hover:border-line hover:bg-slate-50",T&&"pointer-events-none opacity-60"),children:[f.jsx("input",{type:"checkbox",className:"mt-0.5 size-3.5 shrink-0 accent-brand-500",checked:!!C,disabled:T,onChange:M=>d(z.plan_id,M.target.checked)}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12.5px] font-medium text-slate-700",children:z.name||z.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[11px] text-slate-400",children:[z.section,z.status_label,z.info].filter(Boolean).join(" · ")||"—"})]}),f.jsx("span",{className:"shrink-0 pt-0.5 text-[11px] tabular-nums text-slate-500",children:z.progress||""})]})}function bv({account:r,platformLabel:z,pending:T,openLog:d,logLines:C,onToggleLog:w,onLogin:M,onRefresh:nt,onStudy:I,onStop:X,onCapture:q,onStopCapture:S,onQuiz:A,onDelete:ct,onToggleCourse:wt,onSelectAll:$,onClearSelection:U,onToggleOption:ht}){var pt,G,ut,rt,Bt,o,N,Q,Z,ot,yt,dt,K,g,B,O;const[et,Nt]=Y.useState(!1),Ft=Y.useRef(null),Ct=Y.useRef(null),Ht=Y.useRef(!0);Y.useEffect(()=>{if(!et)return;const j=P=>{var L;(L=Ft.current)!=null&&L.contains(P.target)||Nt(!1)};return document.addEventListener("pointerdown",j),()=>document.removeEventListener("pointerdown",j)},[et]),Y.useEffect(()=>{const j=Ct.current;j&&Ht.current&&(j.scrollTop=j.scrollHeight)},[C,d]);const tt=vv(r,T),D=!!T||r.status==="logging"||((pt=r.run)==null?void 0:pt.status)==="logging",jt=r.courses||[],_t=jt.filter(j=>j.in_study!==!1),Tt=jt.filter(j=>j.in_study===!1),qt=qs(jt),Kt=((G=r.run)==null?void 0:G.done)||0,al=((ut=r.run)==null?void 0:ut.total)||0,At=al?Math.round(Kt/al*100):0,R=["discovering","studying"].includes(((rt=r.run)==null?void 0:rt.status)||""),F=((Bt=r.selected)==null?void 0:Bt.length)||0,lt=F>0&&(((o=r.cookies)==null?void 0:o.length)||0)>0;return f.jsxs("article",{"data-id":r.id,className:"card-shadow flex min-w-0 flex-col rounded-2xl border border-line bg-white transition-colors hover:border-slate-300/80",children:[f.jsxs("header",{className:"flex items-start gap-3 px-4 pt-4",children:[f.jsxs("div",{className:"relative mt-0.5 grid size-10 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-50 to-sky-50 text-[13px] font-semibold text-brand-700 ring-1 ring-brand-100",children:[(r.user||r.username||"?").slice(0,1).toUpperCase(),f.jsx("span",{className:gl("absolute -bottom-0.5 -right-0.5 size-3 rounded-full border-2 border-white",tt.tone==="success"?"bg-emerald-500":tt.tone==="danger"?"bg-red-500":tt.tone==="running"?"bg-sky-500":tt.tone==="warning"?"bg-amber-500":"bg-slate-300",tt.pulse&&"animate-pulse")})]}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h2",{className:"truncate text-[13.5px] font-semibold text-slate-900",children:r.user||r.username}),f.jsx(yu,{tone:tt.tone,dot:!0,children:tt.label})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"truncate",children:r.username}),r.note&&f.jsxs("span",{className:"truncate",children:["· ",r.note]}),f.jsxs("span",{children:["· ",xm(r.updated||r.loginAt)]})]})]}),f.jsx(yu,{tone:"brand",className:"mt-0.5 shrink-0",children:z})]}),f.jsxs("div",{className:"px-4 pt-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"text-[11.5px] text-slate-500",children:["共 ",f.jsx("b",{className:"font-semibold text-slate-700",children:qt.total})," 门 · 可学"," ",f.jsx("b",{className:"font-semibold text-slate-700",children:qt.studyable}),Tt.length>0&&f.jsxs("span",{className:"text-slate-400",children:[" · 已完成 ",Tt.length]})]}),_t.length>0&&f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{type:"button",disabled:D,className:"rounded px-1.5 py-0.5 text-[11px] text-brand-600 transition hover:bg-brand-50 disabled:opacity-40",onClick:$,children:"全选"}),f.jsx("button",{type:"button",disabled:D||F===0,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100 disabled:opacity-40",onClick:U,children:"清空"})]})]}),f.jsx("div",{className:"scrollbar-thin mt-1.5 max-h-[196px] min-h-[70px] overflow-y-auto pr-0.5",children:jt.length===0?f.jsx("div",{className:"grid min-h-[70px] place-items-center rounded-lg border border-dashed border-line text-[12px] text-slate-400",children:"还没有课程,先登录或刷新课程"}):f.jsxs(f.Fragment,{children:[_t.map(j=>f.jsx(gv,{account:r,course:j,disabled:D,onToggle:wt},j.plan_id)),Tt.length>0&&f.jsx("div",{className:"mt-1 border-t border-dashed border-line pt-1",children:Tt.map(j=>f.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg px-2 py-1.5 text-slate-400",children:[f.jsx("span",{className:"mt-0.5 grid size-3.5 shrink-0 place-items-center rounded-full bg-emerald-50 text-[9px] text-emerald-600",children:"✓"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12px]",children:j.name||j.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[10.5px] opacity-80",children:[j.section,j.info].filter(Boolean).join(" · ")})]}),f.jsx("span",{className:"shrink-0 text-[10.5px]",children:j.status_label||"已结束"})]},j.plan_id))})]})})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 border-t border-line/70 px-4 py-2.5",children:[f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optQuiz===!0,disabled:D,onChange:j=>ht("quiz",j.target.checked)}),"自动交测验"]}),f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optFeedback!==!1,disabled:D,onChange:j=>ht("feedback",j.target.checked)}),"自动交反馈表"]}),f.jsx("div",{className:"flex-1"}),f.jsx("span",{className:"text-[11px] tabular-nums text-slate-400",children:F>0?`已选 ${F} 门`:"未选择课程"})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-line/70 px-4 py-2.5",children:[f.jsx(Qt,{size:"sm",variant:"soft",loading:T==="login"||r.status==="logging"||((N=r.run)==null?void 0:N.status)==="logging",disabled:D,icon:f.jsx(Iy,{className:"size-3.5"}),onClick:M,children:(Q=r.cookies)!=null&&Q.length?"重新登录":"登录"}),f.jsx(Qt,{size:"sm",loading:T==="refresh",disabled:D||!((Z=r.cookies)!=null&&Z.length),icon:f.jsx(ki,{className:"size-3.5"}),onClick:nt,children:"刷新课程"}),f.jsx(Qt,{size:"sm",variant:"primary",loading:T==="study",disabled:D||!lt,icon:f.jsx(Py,{className:"size-3.5"}),onClick:I,children:"开始学习"}),f.jsx("div",{className:"flex-1"}),R&&f.jsx(Qt,{size:"icon",variant:"danger",loading:T==="stop",onClick:X,title:"停止学习","aria-label":"停止学习",children:f.jsx(Vy,{className:"size-4"})}),f.jsxs("div",{className:"relative",ref:Ft,children:[f.jsx(Qt,{size:"icon",variant:"ghost",onClick:()=>Nt(j=>!j),"aria-label":"更多操作",title:"更多操作",children:f.jsx(Ky,{className:"size-4"})}),et&&f.jsx("div",{className:"absolute bottom-10 right-0 z-20 w-40 overflow-hidden rounded-xl border border-line bg-white py-1 shadow-xl shadow-slate-900/10",children:[{label:"课程日志",icon:Fy,action:w},{label:"打开测验",icon:Zy,action:A},(ot=r.run)!=null&&ot.capturing?{label:"停止抓包",icon:iv,action:S}:{label:"抓包 10 分钟",icon:fv,action:q},{label:"删除账号",icon:cv,action:ct,danger:!0}].map(j=>f.jsxs("button",{type:"button",className:gl("flex w-full items-center gap-2 px-3 py-2 text-left text-[12px] transition hover:bg-slate-50",j.danger?"text-red-600":"text-slate-700"),onClick:()=>{Nt(!1),j.action()},children:[f.jsx(j.icon,{className:"size-3.5 opacity-70"}),j.label]},j.label))})]})]}),(al>0||((yt=r.run)==null?void 0:yt.error))&&f.jsxs("div",{className:"border-t border-line/70 px-4 py-3",children:[f.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-2 text-[11px] text-slate-500",children:[f.jsx("span",{className:"truncate",children:((dt=r.run)==null?void 0:dt.course)||((K=r.run)==null?void 0:K.status)||"学习进度"}),f.jsxs("span",{className:"shrink-0 tabular-nums",children:[Kt," / ",al,al>0&&f.jsxs("span",{className:"ml-1 text-slate-400",children:["(",At,"%)"]})]})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-slate-100",children:f.jsx("div",{className:gl("h-full rounded-full transition-all duration-500",((g=r.run)==null?void 0:g.status)==="error"?"bg-red-500":((B=r.run)==null?void 0:B.status)==="finished"?"bg-emerald-500":"bg-gradient-to-r from-brand-500 to-sky-400"),style:{width:`${Math.min(100,At)}%`}})}),((O=r.run)==null?void 0:O.error)&&f.jsx("p",{className:"mt-2 rounded-lg bg-red-50 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:r.run.error})]}),r.lastError&&f.jsx("div",{className:"border-t border-line/70 px-4 py-2.5",children:f.jsxs("p",{className:"rounded-lg bg-red-50/80 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:[r.lastError,r.lastErrorAt?f.jsxs("span",{className:"ml-1 text-red-400",children:["· ",xm(r.lastErrorAt)]}):null]})}),f.jsxs("div",{className:gl("border-t border-line/70",d?"block":"hidden"),children:[f.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"font-medium text-slate-500",children:"课程日志"}),f.jsxs("span",{className:"tabular-nums",children:["(",C.length,")"]}),f.jsx("div",{className:"flex-1"}),f.jsx("button",{type:"button",onClick:w,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100",children:"收起"})]}),f.jsx("pre",{ref:Ct,onScroll:j=>{const P=j.currentTarget;Ht.current=P.scrollHeight-P.scrollTop-P.clientHeight<24},className:gl("scrollbar-thin mx-4 mb-3 mt-2 max-h-56 overflow-auto rounded-lg bg-slate-950/95 p-3","font-mono text-[11px] leading-relaxed text-slate-300",C.length===0&&"text-slate-500"),children:C.length?C.join(` +`):"暂无日志 · 开始学习后这里会实时显示"})]}),f.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-center gap-1 border-t border-line/70 py-1.5 text-[10.5px] text-slate-400 transition hover:bg-slate-50 hover:text-slate-600","aria-expanded":d,children:[f.jsx(Sm,{className:gl("size-3 transition-transform",d&&"rotate-180")}),d?"收起课程日志":"展开课程日志"]})]})}const xv={md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-6xl"};function vu({open:r,onClose:z,title:T,subtitle:d,size:C="md",footer:w,children:M,bodyClassName:nt}){return Y.useEffect(()=>{if(!r)return;const I=q=>{q.key==="Escape"&&z()};window.addEventListener("keydown",I);const X=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",I),document.body.style.overflow=X}},[r,z]),r?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-[2px]",onClick:z}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:gl("relative flex max-h-[calc(100vh-2rem)] w-full flex-col overflow-hidden rounded-2xl","border border-line bg-white shadow-2xl shadow-slate-900/20",xv[C]),children:[f.jsxs("header",{className:"flex items-start gap-3 border-b border-line px-5 py-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h2",{className:"truncate text-[15px] font-semibold text-slate-900",children:T}),d&&f.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:d})]}),f.jsx("button",{type:"button",onClick:z,className:"-mr-1 rounded-lg p-1.5 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"关闭",children:f.jsx(rv,{className:"size-4"})})]}),f.jsx("div",{className:gl("min-h-0 flex-1 overflow-auto px-5 py-4",nt),children:M}),w&&f.jsx("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line bg-slate-50/70 px-5 py-3",children:w})]})]}):null}function pv({open:r,platforms:z,onClose:T,onSubmit:d}){var ht;const[C,w]=Y.useState(""),[M,nt]=Y.useState(""),[I,X]=Y.useState(""),[q,S]=Y.useState(((ht=z[0])==null?void 0:ht.id)||"guanyixue"),[A,ct]=Y.useState(!1),[wt,$]=Y.useState("");Y.useEffect(()=>{var et;r&&(w(""),nt(""),X(""),S(((et=z[0])==null?void 0:et.id)||"guanyixue"),$(""),ct(!1))},[r,z]);async function U(){if(!C.trim()||!M){$("请填写账号和密码");return}ct(!0),$("");try{await d({username:C.trim(),password:M,note:I.trim(),platform:q}),T()}catch(et){$(et instanceof Error?et.message:String(et))}finally{ct(!1)}}return f.jsx(vu,{open:r,onClose:T,title:"添加账号",subtitle:"账号密码保存在本机 SQLite,用于会话失效时自动重新登录",footer:f.jsxs(f.Fragment,{children:[f.jsx(Qt,{onClick:T,disabled:A,children:"取消"}),f.jsx(Qt,{variant:"primary",loading:A,onClick:U,children:"保存并登录"})]}),children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"学习平台"}),f.jsxs("div",{className:"relative",children:[f.jsx(Nm,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("select",{className:`${Wl} appearance-none pl-8 pr-8`,value:q,onChange:et=>S(et.target.value),children:z.map(et=>f.jsx("option",{value:et.id,children:et.label},et.id))}),f.jsx(Sm,{className:"pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"})]}),f.jsx("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-400",children:"选「莞易学」后,后台会自动识别旧版 / 新版课程页并按对应实现学习;后续新增的平台会出现在这里。"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"登录账号"}),f.jsx("input",{className:Wl,value:C,autoFocus:!0,placeholder:"手机号 / 身份证号 / 教师账号",onChange:et=>w(et.target.value),onKeyDown:et=>et.key==="Enter"&&U()})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"密码"}),f.jsx("input",{className:Wl,type:"password",value:M,autoComplete:"off",placeholder:"平台登录密码",onChange:et=>nt(et.target.value),onKeyDown:et=>et.key==="Enter"&&U()})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:["备注 ",f.jsx("span",{className:"font-normal text-slate-400",children:"(可选)"})]}),f.jsx("input",{className:Wl,value:I,placeholder:"例如:张三 · 语文",onChange:et=>X(et.target.value)})]}),f.jsx("p",{className:"rounded-lg border border-line bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:"保存后会自动尝试登录一次。若密码错误或需要验证码,卡片上会保留「登录」按钮,可手动重试。"}),wt&&f.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:wt})]})})}class Me extends Error{constructor(T,d={}){super(T);Ji(this,"offline",!1);Ji(this,"status");Ji(this,"code");this.name="ApiError",Object.assign(this,d)}}async function Zt(r,z={}){let T;try{T=await fetch(r,{...z,headers:{"Content-Type":"application/json",...z.headers||{}}})}catch{throw new Me("后端未连接",{offline:!0})}if(T.status===401)throw new Me("需要访问令牌:请用 /?token= 打开一次",{status:401});if(!T.ok)throw new Me(`HTTP ${T.status}`,{status:T.status});return await T.json()}async function Sv(r,z,T){let d;try{d=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z)})}catch{throw new Me("后端未连接",{offline:!0})}if(d.status===401)throw new Me("需要访问令牌:请用 /?token= 打开一次");if(!d.ok)throw new Me(`HTTP ${d.status}`);if(!d.body)throw new Me("浏览器不支持流式响应");const C=d.body.getReader(),w=new TextDecoder;let M="";for(;;){const{value:nt,done:I}=await C.read();if(I)break;M+=w.decode(nt,{stream:!0});const X=M.split(` + +`);M=X.pop()||"";for(const q of X){const S=q.trim();if(S.startsWith("data:"))try{T(JSON.parse(S.slice(5).trim()))}catch{}}}}function Nv({open:r,onClose:z,notify:T,onChanged:d}){const[C,w]=Y.useState([]),[M,nt]=Y.useState(""),[I,X]=Y.useState(!1),q=Y.useCallback(async()=>{X(!0);try{const A=await Zt("/api/plugins");w(A.plugins||[])}catch(A){T({message:Fl(A),tone:"error"})}finally{X(!1)}},[T]);Y.useEffect(()=>{r&&q()},[r,q]);async function S(A,ct,wt){nt(A);try{const $=await Zt(ct,{method:"POST"});$.plugins&&w($.plugins),$.ok===!1?T({message:$.error||"插件操作失败",tone:"error"}):(T({message:wt,tone:"success"}),d())}catch($){T({message:Fl($),tone:"error"})}finally{nt("")}}return f.jsx(vu,{open:r,onClose:z,title:"插件管理",subtitle:"pugins/<名字>/ 下的平台插件:启停立即生效,改完代码重载即可,不用重启服务",size:"lg",footer:f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",C.length," 个 · 停用后该平台会从「添加账号」的平台下拉里消失"]}),f.jsx(Qt,{variant:"soft",size:"sm",icon:f.jsx(ki,{className:"size-3.5"}),loading:M==="*",onClick:()=>void S("*","/api/plugins/reload","全部插件已重载"),children:"全部重载"})]}),children:f.jsxs("div",{className:"space-y-2.5",children:[C.map(A=>f.jsxs("div",{className:"rounded-xl border border-line bg-slate-50/70 px-3.5 py-3",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsx(zm,{className:"size-4 shrink-0 text-brand-600"}),f.jsx("span",{className:"text-[13px] font-semibold text-slate-900",children:A.title||A.name}),f.jsx("span",{className:"text-[11px] text-slate-400",children:A.name}),f.jsx(yu,{tone:A.enabled?"success":"neutral",dot:!0,children:A.enabled?"已启用":"已停用"}),A.enabled&&f.jsx(yu,{tone:A.loaded?"brand":"warning",children:A.loaded?"已加载":"未加载"})]}),f.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-slate-500",children:[f.jsxs("span",{children:["平台 ",A.label||"—"]}),f.jsxs("span",{children:["id ",A.id||"—"]}),f.jsxs("span",{children:["能力 ",A.capabilities.length?A.capabilities.join(" / "):"无"]})]}),f.jsxs("div",{className:"mt-2.5 flex items-center gap-2",children:[f.jsx(Qt,{size:"sm",variant:A.enabled?"secondary":"primary",loading:M===A.name,onClick:()=>void S(A.name,`/api/plugins/${A.name}/${A.enabled?"disable":"enable"}`,A.enabled?`${A.name} 已停用`:`${A.name} 已启用`),children:A.enabled?"停用":"启用"}),f.jsx(Qt,{size:"sm",variant:"ghost",disabled:!A.enabled,loading:M===A.name,onClick:()=>void S(A.name,`/api/plugins/${A.name}/reload`,`${A.name} 已重载`),children:"重载"})]})]},A.name)),!C.length&&!I&&f.jsx("p",{className:"py-8 text-center text-[12.5px] text-slate-400",children:"pugins/ 下还没有插件。建一个含 pugin.json + main.py 的目录丢进去,刷新即可看到。"})]})})}function Tv(r){const z=String((r==null?void 0:r.text)||"").replace(/\s+/g," ").trim();return z.length>24?`${z.slice(0,24)}…`:z}function zv({open:r,account:z,course:T,onClose:d,notify:C,onSubmitted:w}){const[M,nt]=Y.useState(null),[I,X]=Y.useState({}),[q,S]=Y.useState(!1),[A,ct]=Y.useState(!1),[wt,$]=Y.useState(!1),[U,ht]=Y.useState(!1),[et,Nt]=Y.useState(""),[Ft,Ct]=Y.useState("info"),Ht=Y.useRef(0);async function tt(G=!1){if(!z||!T)return!1;S(!0),Nt(G?"正在生成新答卷…":"取题中…"),Ct("info");try{const ut={cookies:z.cookies,platform:z.platform||"guanyixue",plan_id:T.plan_id,project_id:T.project_id,name:T.name||""};G&&(ut.retake=!0,ut.period_id=(M==null?void 0:M.period_id)||"");const rt=await Zt("/api/quiz",{method:"POST",body:JSON.stringify(ut)});if(!rt.ok)return nt(null),Nt(rt.error||"取题失败"),Ct("error"),!1;nt(rt),X(Object.fromEntries((rt.questions||[]).map(o=>[o.no,o.picked||""])));const Bt=[];if(rt.done){const o=rt.surplus_exam_count;o!=null?Bt.push(`剩 ${o} 次`):rt.allow_exam_count&&Bt.push(`共 ${rt.allow_exam_count} 次`),rt.show_answers?Bt.push("已显示标准答案"):rt.exam_after_watch_answer==="0"&&Bt.push("本测验不开放答案"),Nt(`已交卷${Bt.length?` · ${Bt.join(" · ")}`:""}`),Ct("success")}else Nt(rt.started?"已自动创建答卷(限时考试已开始计时)":""),Ct("info");return!0}catch(ut){return Nt(ut instanceof Error?ut.message:"取题失败"),Ct("error"),!1}finally{S(!1)}}if(Y.useEffect(()=>{!r||!z||!T||(nt(null),X({}),ht(!1),tt(!1))},[r,z==null?void 0:z.id,T==null?void 0:T.plan_id]),!z||!T)return null;const D=(M==null?void 0:M.questions)||[],jt=!!(M!=null&&M.done),_t=!!(M!=null&&M.show_answers),Tt=!!(M!=null&&M.can_retake),qt=M==null?void 0:M.surplus_exam_count,Kt=jt||q||A||U;function al(G,ut){X(rt=>({...rt,[G]:ut}))}function At(G,ut,rt){X(Bt=>{const o=hu(Bt[G]),N=rt?[...o,ut]:o.filter(Q=>Q!==ut);return N.sort(),{...Bt,[G]:N.join("#")}})}async function R(){if(!M||!z)return;const G=D.filter(ut=>!I[ut.no]).length;if(!(G&&!window.confirm(`还有 ${G} 题没作答,确定提交?`))){ct(!0),Nt("提交中…"),Ct("info");try{const ut=await Zt("/api/quiz/submit",{method:"POST",body:JSON.stringify({cookies:z.cookies,plan_id:M.plan_id,object_id:M.object_id,generation:M.generation||"legacy",result_id:M.result_id||"",answers:I})});if(!ut.ok){ut.code==="already_finished"&&await tt(),Nt(ut.error||"提交失败"),Ct("error");return}C({message:`测验已提交${ut.score?`,得分 ${ut.score}`:""}`,tone:"success"}),await tt(),w()}catch(ut){Nt(ut instanceof Error?ut.message:"提交失败"),Ct("error")}finally{ct(!1)}}}async function F(){if(!M)return;if(!M.can_retake){C({message:"没有剩余考试机会",tone:"error"});return}const G=qt!=null?`(剩余 ${qt} 次)`:"";if(window.confirm(`再考一次会消耗 1 次机会${G};限时考试会立即开始计时,确定?`)){$(!0);try{await tt(!0)&&C({message:"已生成新答卷,可以重新答题了",tone:"success"})}finally{$(!1)}}}async function lt(){if(!M||!z)return;if(M.done){C({message:"已交卷,点「再考一次」生成新答卷后再 AI 答题",tone:"error"});return}ht(!0),Ht.current=0;const G=Date.now();let ut=0,rt="";const Bt=window.setInterval(()=>{Nt(`AI 答题中… ${Math.round((Date.now()-G)/1e3)}s · 已填 ${Ht.current}/${D.length} 题`),Ct("info")},1e3);Nt(`AI 答题中… 已填 0/${D.length} 题`);try{await Sv("/api/quiz/answer",{questions:M.questions,account_id:z.id},o=>{const N=o.answers;if(N&&typeof N=="object"){const Q=Object.keys(N).length;Q&&(Ht.current+=Q,X(Z=>({...Z,...N})))}o.error&&(rt=String(o.error)),o.done&&typeof o.failed=="number"&&(ut=o.failed)}),Ht.current?ut?(Nt(`AI 已填 ${Ht.current} 题,${ut} 题失败${rt?`:${rt}`:""}`),Ct("error")):(Nt(`AI 已填 ${Ht.current} 题`),Ct("success")):(Nt(rt?`AI 答题失败:${rt}`:"AI 没有返回答案"),Ct("error"))}catch(o){Nt(o instanceof Error?o.message:"AI 答题失败"),Ct("error")}finally{window.clearInterval(Bt),ht(!1)}}const pt=Tt?`再考一次${qt!=null?`(剩 ${qt} 次)`:""}`:qt===0?"考试机会已用完":"再考一次";return f.jsx(vu,{open:r,onClose:d,title:`测验 · ${T.name||T.plan_id}`,subtitle:et||"取题后可手动作答,或让大模型逐批填写",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsx("span",{className:gl("mr-auto max-w-[50%] truncate text-[11.5px]",Ft==="error"?"text-red-600":Ft==="success"?"text-emerald-600":"text-slate-500"),children:et}),jt&&f.jsx(Qt,{size:"sm",loading:wt,disabled:q||!Tt,icon:f.jsx(tv,{className:"size-3.5"}),onClick:F,children:pt}),f.jsx(Qt,{size:"sm",onClick:d,children:"关闭"}),f.jsx(Qt,{size:"sm",variant:"soft",loading:U,disabled:Kt||!D.length,icon:f.jsx(Gy,{className:"size-3.5"}),onClick:lt,children:"AI 答题"}),f.jsx(Qt,{size:"sm",variant:"primary",loading:A,disabled:Kt||!D.length,icon:f.jsx(ev,{className:"size-3.5"}),onClick:R,children:"提交"})]}),children:q&&!D.length?f.jsx("div",{className:"py-16 text-center text-[13px] text-slate-400",children:"正在打开课程页取题…"}):D.length?f.jsx("div",{className:"space-y-2.5",children:D.map(G=>{const ut=G.options||[],rt=I[G.no]||"",Bt=G.type==="02",o=ut.length>0;return f.jsxs("div",{className:"rounded-xl border border-line px-3.5 py-3",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-md bg-slate-100 text-[10.5px] font-semibold tabular-nums text-slate-500",children:G.no}),f.jsx(yu,{tone:"neutral",className:"mt-0.5 shrink-0",children:dv[G.type||""]||"题目"}),f.jsx("p",{className:"min-w-0 flex-1 text-[13px] leading-relaxed text-slate-800",children:G.title||`第 ${G.no} 题`}),_t&&G.is_correct!==void 0&&f.jsx("span",{className:gl("shrink-0 text-[12px] font-semibold",G.is_correct?"text-emerald-600":"text-red-500"),children:G.is_correct?"✓":"✗"})]}),o&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5 pl-7",children:ut.map(N=>{const Q=_t&&hu(G.correct).includes(N.key),Z=_t&&hu(G.picked).includes(N.key)&&!hu(G.correct).includes(N.key);return f.jsxs("span",{className:gl("max-w-full rounded-lg border px-2 py-1 text-[11.5px] leading-snug",Q?"border-emerald-200 bg-emerald-50 text-emerald-800":Z?"border-red-200 bg-red-50 text-red-700":"border-line bg-slate-50/70 text-slate-600"),children:[f.jsx("b",{className:"mr-1 font-semibold",children:N.key}),Tv(N)]},N.key)})}),f.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-2 pl-7",children:[Bt?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:ut.map(N=>{const Q=hu(rt);return f.jsxs("label",{title:`${N.key}. ${N.text||""}`,className:gl("flex cursor-pointer items-center gap-1 rounded-lg border px-2 py-1 text-[11.5px] transition",Q.includes(N.key)?"border-brand-300 bg-brand-50 text-brand-700":"border-line text-slate-600 hover:border-slate-300",Kt&&"pointer-events-none opacity-60"),children:[f.jsx("input",{type:"checkbox",className:"size-3 accent-brand-500",checked:Q.includes(N.key),disabled:Kt,onChange:Z=>At(G.no,N.key,Z.target.checked)}),N.key]},N.key)})}):o?f.jsxs("select",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:rt,disabled:Kt,onChange:N=>al(G.no,N.target.value),children:[f.jsx("option",{value:"",children:"未选"}),ut.map(N=>f.jsxs("option",{value:N.key,children:[N.key,". ",N.text||""]},N.key))]}):f.jsx("input",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:rt,placeholder:"填写答案",disabled:Kt,onChange:N=>al(G.no,N.target.value)}),_t&&G.correct&&f.jsxs("span",{className:"text-[11.5px] text-slate-500",children:["标准答案:",f.jsx("b",{className:"font-semibold text-slate-700",children:G.correct})]})]}),_t&&G.analysis&&f.jsxs("p",{className:"mt-2 rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] leading-relaxed text-slate-500",children:["解析:",G.analysis]})]},G.no)})}):f.jsx("div",{className:"py-16 text-center text-[13px] text-red-600",children:et||"没有题目"})})}function Ev({open:r,onClose:z,notify:T}){const[d,C]=Y.useState(!1),[w,M]=Y.useState(!1),[nt,I]=Y.useState(!1),[X,q]=Y.useState({base_url:"",api_key:"",model:"",temperature:"0.2",timeout:"120",prompt:"",study_mode:"fast",study_parallel:"2"}),[S,A]=Y.useState("sk-...");Y.useEffect(()=>{r&&(C(!0),Zt("/api/settings").then(U=>{const ht=U.llm||{},et=U.study||{};q({base_url:ht.base_url||"",api_key:"",model:ht.model||"",temperature:String(ht.temperature??.2),timeout:String(ht.timeout??120),prompt:ht.prompt||"",study_mode:et.mode||"fast",study_parallel:String(et.parallel||2)}),A(ht.has_key?`已保存 ${ht.key_hint||""},留空不修改`:"sk-...")}).catch(U=>T({message:`读取设置失败:${U.message}`,tone:"error"})).finally(()=>C(!1)))},[r,T]);function ct(U,ht){q(et=>({...et,[U]:ht}))}async function wt(){M(!0);try{await Zt("/api/settings",{method:"POST",body:JSON.stringify({base_url:X.base_url.trim(),api_key:X.api_key.trim(),model:X.model.trim(),temperature:Number.parseFloat(X.temperature)||.2,timeout:Number.parseInt(X.timeout,10)||120,prompt:X.prompt,study_mode:X.study_mode,study_parallel:Number.parseInt(X.study_parallel,10)||0})}),T({message:"设置已保存",tone:"success"}),z()}catch(U){T({message:`保存失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{M(!1)}}async function $(){I(!0);try{const U=await Zt("/api/llm/test",{method:"POST",body:JSON.stringify({base_url:X.base_url.trim(),api_key:X.api_key.trim(),model:X.model.trim()})});T({message:U.ok?`连接正常(${U.ms} ms):${U.reply||""}`:`连接失败:${U.error||"未知错误"}`,tone:U.ok?"success":"error"})}catch(U){T({message:`连接失败:${U instanceof Error?U.message:U}`,tone:"error"})}finally{I(!1)}}return f.jsx(vu,{open:r,onClose:z,title:"系统设置",subtitle:"大模型接口、答题提示词与学习模式",size:"lg",footer:f.jsxs(f.Fragment,{children:[f.jsx(Qt,{loading:nt,onClick:$,icon:f.jsx(Ly,{className:"size-3.5"}),children:"测试连接"}),f.jsx(Qt,{onClick:z,disabled:w,children:"取消"}),f.jsx(Qt,{variant:"primary",loading:w,onClick:wt,disabled:d,children:"保存"})]}),children:d?f.jsx("div",{className:"py-10 text-center text-[12.5px] text-slate-400",children:"读取设置…"}):f.jsxs("div",{className:"space-y-6",children:[f.jsxs("section",{children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(av,{className:"size-4 text-brand-500"}),"大模型(OpenAI 兼容)"]}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["接口地址 ",f.jsx("span",{className:"text-slate-400",children:"(写到 /v1 为止)"})]}),f.jsx("input",{className:Wl,value:X.base_url,placeholder:"https://api.openai.com/v1",onChange:U=>ct("base_url",U.target.value)})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"API Key"}),f.jsxs("div",{className:"relative",children:[f.jsx($y,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("input",{className:`${Wl} pl-8`,type:"password",autoComplete:"off",value:X.api_key,placeholder:S,onChange:U=>ct("api_key",U.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模型"}),f.jsx("input",{className:Wl,value:X.model,placeholder:"gpt-4o-mini / deepseek-chat / qwen-plus",onChange:U=>ct("model",U.target.value)})]})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"温度"}),f.jsx("input",{className:Wl,type:"number",min:0,max:2,step:.1,value:X.temperature,onChange:U=>ct("temperature",U.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"超时(秒)"}),f.jsx("input",{className:Wl,type:"number",min:10,max:600,value:X.timeout,onChange:U=>ct("timeout",U.target.value)})]})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["答题提示词 ",f.jsx("span",{className:"text-slate-400",children:"(留空使用内置)"})]}),f.jsx("textarea",{className:`${Wl} min-h-24 resize-y`,value:X.prompt,placeholder:'只输出 JSON {"answers":{"题号":"答案"}}',onChange:U=>ct("prompt",U.target.value)})]})]})]}),f.jsxs("section",{className:"border-t border-line pt-5",children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(Jy,{className:"size-4 text-brand-500"}),"学习模式"]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模式"}),f.jsxs("select",{className:Wl,value:X.study_mode,onChange:U=>ct("study_mode",U.target.value),children:[f.jsx("option",{value:"fast",children:"快速学习(只调接口上报)"}),f.jsx("option",{value:"normal",children:"常规学习(真实播放视频)"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"常规模式并发数"}),f.jsx("input",{className:Wl,type:"number",min:1,max:5,value:X.study_parallel,onChange:U=>ct("study_parallel",U.target.value)})]})]}),f.jsxs("p",{className:"mt-3 rounded-lg bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:["常规学习会开多个无头浏览器同时播视频;平台若按课节顺序放行,会被弹回并自动降为 1 路。快速学习只调用 ",f.jsx("code",{className:"rounded bg-white px-1 ring-1 ring-line",children:"period/study/log"}),",不启动浏览器。"]})]})]})})}function _v({accounts:r}){const z=r.filter(M=>{var nt;return((nt=M.cookies)==null?void 0:nt.length)>0||["logged_in","studying"].includes(M.status||"")}).length,T=r.filter(M=>{var nt;return["discovering","studying"].includes(((nt=M.run)==null?void 0:nt.status)||"")}).length,d=r.reduce((M,nt)=>{var I;return M+(((I=nt.run)==null?void 0:I.done)||0)},0),C=r.reduce((M,nt)=>{var I;return M+(((I=nt.run)==null?void 0:I.total)||0)},0),w=[{label:"账号",value:r.length,hint:"已添加",icon:Em,tone:"text-brand-600 bg-brand-50"},{label:"已登录",value:z,hint:r.length?`共 ${r.length} 个`:"等待添加",icon:uv,tone:"text-emerald-600 bg-emerald-50"},{label:"学习中",value:T,hint:T?"正在跑课":"空闲",icon:wy,tone:"text-sky-600 bg-sky-50"},{label:"课程进度",value:C?`${d}/${C}`:"—",hint:C?`${Math.round(d/C*100)}%`:"暂无任务",icon:Nm,tone:"text-amber-600 bg-amber-50"}];return f.jsx("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:w.map(M=>f.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-line bg-white px-4 py-3",children:[f.jsx("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg ${M.tone}`,children:f.jsx(M.icon,{className:"size-4"})}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-[11px] text-slate-400",children:M.label}),f.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f.jsx("span",{className:"text-[17px] font-semibold tabular-nums leading-tight text-slate-900",children:M.value}),f.jsx("span",{className:"truncate text-[10.5px] text-slate-400",children:M.hint})]})]})]},M.label))})}function Ov({open:r,onClose:z}){const[T,d]=Y.useState([]),[C,w]=Y.useState(!1),M=Y.useRef(null),nt=Y.useRef(!0);Y.useEffect(()=>{if(!r)return;let X=!0;const q=async()=>{try{const A=await Zt("/api/log/history?key=system&tail=500");X&&d(A.lines||[])}catch{}};d([]),q();const S=window.setInterval(()=>{document.hidden||q()},2500);return()=>{X=!1,window.clearInterval(S)}},[r]),Y.useEffect(()=>{const X=M.current;X&&nt.current&&(X.scrollTop=X.scrollHeight)},[T,r]);async function I(){w(!0);try{await Zt("/api/log/history?key=system",{method:"DELETE"}),d([])}finally{w(!1)}}return f.jsx(vu,{open:r,onClose:z,title:"系统日志",subtitle:"全局事件与系统级错误,实时刷新",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",T.length," 行 · 保留最近 500 行"]}),f.jsx(Qt,{variant:"danger",size:"sm",loading:C,onClick:I,children:"清空"}),f.jsx(Qt,{size:"sm",onClick:z,children:"关闭"})]}),bodyClassName:"bg-slate-950 p-0",children:f.jsx("pre",{ref:M,onScroll:X=>{const q=X.currentTarget;nt.current=q.scrollHeight-q.scrollTop-q.clientHeight<24},className:"scrollbar-thin h-[60vh] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-[11.5px] leading-relaxed text-slate-300",children:T.length?T.join(` +`):"暂无系统日志"})})}function jv({toast:r}){if(!r)return null;const z=r.tone||"info",T=z==="error"?Qy:z==="success"?Xy:ky;return f.jsxs("div",{role:"status",className:gl("animate-toast-in fixed bottom-7 left-1/2 z-[60] flex max-w-[85vw] -translate-x-1/2 items-center gap-2","rounded-xl px-4 py-2.5 text-[12.5px] font-medium shadow-xl shadow-slate-900/20",z==="error"?"bg-red-600 text-white":z==="success"?"bg-emerald-600 text-white":"bg-slate-900 text-white"),children:[f.jsx(T,{className:"size-4 shrink-0 opacity-90"}),f.jsx("span",{className:"break-words",children:r.message})]})}function Av({refreshing:r,onRefresh:z,onSettings:T,onSystemLog:d,onPlugins:C,onAdd:w}){return f.jsx("header",{className:"sticky top-0 z-30 border-b border-line/80 bg-white/85 backdrop-blur-xl",children:f.jsxs("div",{className:"mx-auto flex h-16 max-w-[1320px] items-center gap-3 px-4 sm:px-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("div",{className:"grid size-9 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-500 to-sky-400 text-[15px] font-bold text-white shadow-md shadow-brand-500/30",children:"学"}),f.jsxs("div",{className:"min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h1",{className:"truncate text-[15px] font-semibold tracking-tight text-slate-900",children:"莞易学"}),f.jsx("span",{className:"hidden rounded-md bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 sm:inline",children:"多账号学习控制台"})]}),f.jsx("p",{className:"truncate text-[11.5px] text-slate-500",children:"东莞市教师培训平台 · 新旧版课程自动识别"})]})]}),f.jsx("div",{className:"flex-1"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(Qt,{variant:"ghost",size:"icon",onClick:z,loading:r,title:"刷新列表","aria-label":"刷新列表",children:f.jsx(ki,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:C,title:"插件管理","aria-label":"插件管理",children:f.jsx(zm,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:d,title:"系统日志","aria-label":"系统日志",children:f.jsx(lv,{className:"size-4"})}),f.jsx(Qt,{variant:"ghost",size:"icon",onClick:T,title:"系统设置","aria-label":"系统设置",children:f.jsx(nv,{className:"size-4"})}),f.jsx(Qt,{variant:"primary",className:"ml-1",icon:f.jsx(Tm,{className:"size-4"}),onClick:w,children:f.jsx("span",{className:"hidden sm:inline",children:"添加账号"})})]})]})})}const Om="guanyixue.inlineLogsOpen";function Mv(){try{const r=JSON.parse(localStorage.getItem(Om)||"[]");return new Set(Array.isArray(r)?r.filter(z=>typeof z=="string"):[])}catch{return new Set}}function Cv(r){try{localStorage.setItem(Om,JSON.stringify([...r]))}catch{}}function Dv(r){return{id:r.id,username:r.username,platform:r.platform||"guanyixue",note:r.note||"",user:r.user||"",cookies:r.cookies||[],courses:r.courses||[],selected:r.selected||[],status:r.status||"idle",lastError:r.lastError||"",lastErrorAt:r.lastErrorAt||0,optQuiz:r.optQuiz===!0,optFeedback:r.optFeedback!==!1,loginAt:r.loginAt||0}}function Uv(){const[r,z]=Y.useState([]),T=Y.useRef(r),[d,C]=Y.useState({guanyixue:"莞易学"}),[w,M]=Y.useState([{id:"guanyixue",label:"莞易学"}]),[nt,I]=Y.useState(!1),[X,q]=Y.useState(null),[S,A]=Y.useState({}),[ct,wt]=Y.useState(!1),[$,U]=Y.useState(null),[ht,et]=Y.useState(()=>Mv()),Nt=Y.useRef(ht),[Ft,Ct]=Y.useState({}),Ht=Y.useRef(Ft),tt=Y.useRef(void 0);Y.useEffect(()=>{T.current=r},[r]),Y.useEffect(()=>{Ht.current=Ft},[Ft]),Y.useEffect(()=>{Nt.current=ht,Cv(ht)},[ht]),Y.useEffect(()=>()=>window.clearTimeout(tt.current),[]);const D=Y.useCallback(g=>{q(g),window.clearTimeout(tt.current),tt.current=window.setTimeout(()=>q(null),3800)},[]),jt=Y.useCallback(async g=>{const B=await Zt("/api/accounts",{method:"POST",body:JSON.stringify(Dv(g))});if(B.ok===!1)throw new Error(B.error||"保存失败");return B},[]),_t=Y.useCallback(g=>{z(B=>{const j=B.some(P=>P.id===g.id)?B.map(P=>P.id===g.id?g:P):[...B,g];return T.current=j,j})},[]),Tt=Y.useCallback(async(g=!0)=>{var B;try{const[O,j]=await Promise.all([Zt("/api/runs"),Zt("/api/accounts")]),P=(j.accounts||[]).map(L=>({...L,run:O[L.id]||null})).sort((L,k)=>(L.created||0)-(k.created||0));z(P),T.current=P,I(!1);for(const L of P){const k=(B=L.run)==null?void 0:B.cookies;if(k&&k.length&&JSON.stringify(k)!==JSON.stringify(L.cookies||[])){const It={...L,cookies:k};L.cookies=k,jt(It).catch(()=>{})}}}catch(O){O instanceof Me&&O.offline?I(!0):g||D({message:`读取账号失败:${Fl(O)}`,tone:"error"})}},[D,jt]);Y.useEffect(()=>{Tt();const g=window.setInterval(()=>{document.hidden||Tt()},5e3);return()=>window.clearInterval(g)},[Tt]);const qt=Y.useCallback(async()=>{try{const B=(await Zt("/api/platforms")).platforms||[];M(B);const O={};for(const j of B)O[j.id]=j.label;C(O)}catch{}},[]);Y.useEffect(()=>{qt()},[qt]);const Kt=Y.useCallback(async g=>{var P;const B=Ht.current[g]||{lines:[],since:0,busy:!1,historyTried:!1};if(B.busy)return;const O={...B,busy:!0},j=L=>{Ht.current={...Ht.current,[g]:L},Ct(k=>({...k,[g]:L}))};j(O);try{let L=await Zt(`/api/log?key=${encodeURIComponent(g)}&since=${O.since}`);typeof L.next=="number"&&L.nextjl.id===g);if(Gl&&JSON.stringify(Gl.cookies||[])!==JSON.stringify(It)){const jl={...Gl,cookies:It};_t(jl),jt(jl).catch(()=>{})}}}catch{}finally{O.busy=!1,j(O)}},[_t,jt]);Y.useEffect(()=>{const g=window.setInterval(()=>{document.hidden||Nt.current.forEach(B=>void Kt(B))},1500);return()=>window.clearInterval(g)},[Kt]);const al=Y.useCallback((g,B)=>{const O=B===void 0?!Nt.current.has(g):B,j=new Set(Nt.current);O?j.add(g):j.delete(g),Nt.current=j,et(j),O&&Kt(g)},[Kt]);async function At(g,B,O){A(j=>({...j,[g]:B}));try{return await O()}finally{A(j=>{const P={...j};return delete P[g],P})}}async function R(g,B=!1){return At(g.id,"login",async()=>{_t({...g,status:"logging",lastError:""});try{await jt({...g,status:"logging",lastError:""});const O=await Zt("/api/login",{method:"POST",body:JSON.stringify({account_id:g.id})});if(!O.ok){const L={...g,status:"login_failed",lastError:O.error||`HTTP ${O.code||"失败"}`,lastErrorAt:Date.now(),run:null};return _t(L),await jt(L).catch(()=>{}),B||D({message:`登录失败:${L.lastError}`,tone:"error"}),!1}const j=O.courses||[],P={...g,status:"logged_in",cookies:O.cookies||[],user:O.user||g.user||"",courses:j,selected:(g.selected||[]).filter(L=>j.some(k=>k.plan_id===L)),loginAt:Date.now(),updated:Date.now(),lastError:"",lastErrorAt:0,run:null};return _t(P),await jt(P).catch(()=>{}),B||D({message:O.warn?`登录成功,但课程读取异常:${O.warn}`:`登录成功:${P.user||P.username},读到 ${qs(j).total} 门`,tone:O.warn?"info":"success"}),Tt(),!0}catch(O){const j={...g,status:"login_failed",lastError:Fl(O),lastErrorAt:Date.now()};return _t(j),await jt(j).catch(()=>{}),B||D({message:`登录失败:${j.lastError}`,tone:"error"}),O instanceof Me&&O.offline&&I(!0),!1}})}async function F(g){return At(g.id,"refresh",async()=>{var B;try{let O=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:g.cookies,platform:g.platform||"guanyixue"})});if(!O.ok&&O.code==="session_expired"){if(D({message:"会话已失效,正在自动重新登录…"}),!await R(g,!0))return;const L=T.current.find(k=>k.id===g.id);if(!L)return;O=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:L.cookies})})}if(!O.ok){D({message:`读取失败:${O.error||O.code||"未知错误"}`,tone:"error"});return}const j=T.current.find(L=>L.id===g.id)||g,P={...j,courses:O.courses||[],user:O.user||j.user,cookies:(B=O.cookies)!=null&&B.length?O.cookies:j.cookies,status:"logged_in",updated:Date.now(),lastError:"",lastErrorAt:0};_t(P),await jt(P).catch(()=>{}),D({message:`已刷新,读到 ${qs(P.courses).total} 门`,tone:"success"})}catch(O){D({message:`读取失败:${Fl(O)}`,tone:"error"})}})}async function lt(g){var j;const B=g.selected||[],O=(g.courses||[]).filter(P=>B.includes(P.plan_id)&&P.in_study!==!1);if(!O.length){D({message:"请先勾选要学习的课程",tone:"error"});return}if(!((j=g.cookies)!=null&&j.length)){D({message:"请先登录",tone:"error"});return}return At(g.id,"study",async()=>{var P,L;try{const k=await Zt("/api/study",{method:"POST",body:JSON.stringify({key:g.id,username:g.user||g.username,cookies:g.cookies,courses:O,workers:40,cap_minutes:90,enable_quiz:g.optQuiz===!0,enable_feedback:g.optFeedback!==!1})});if(!k.ok){D({message:`启动失败:${k.error||"未知错误"}`,tone:"error"});return}const It=((P=k.study)==null?void 0:P.mode)==="normal"?`常规真播 ${((L=k.study)==null?void 0:L.parallel)||1} 路并发`:"快速模式(只调接口)";D({message:`已开始 ${O.length} 门课程 · ${It}${g.optQuiz?" · 含自动答题":" · 测验需手动作答"}`,tone:"success"}),al(g.id,!0),Tt()}catch(k){D({message:`启动失败:${Fl(k)}`,tone:"error"})}})}async function pt(g){return At(g.id,"stop",async()=>{try{await Zt("/api/stop",{method:"POST",body:JSON.stringify({key:g.id})}),D({message:"已请求停止"}),Tt()}catch(B){D({message:`停止失败:${Fl(B)}`,tone:"error"})}})}async function G(g){var B;if(!((B=g.cookies)!=null&&B.length)){D({message:"请先登录",tone:"error"});return}return At(g.id,"capture",async()=>{try{const O=await Zt("/api/capture",{method:"POST",body:JSON.stringify({key:g.id,cookies:g.cookies,minutes:10})});if(!O.ok){D({message:`抓包失败:${O.error||"未知错误"}`,tone:"error"});return}D({message:"已打开浏览器,请手动走一遍课程页;最多记录 10 分钟",tone:"success"})}catch(O){D({message:`抓包失败:${Fl(O)}`,tone:"error"})}})}async function ut(g){return At(g.id,"capture",async()=>{try{await Zt("/api/capture/stop",{method:"POST",body:JSON.stringify({key:g.id})}),D({message:"已请求停止抓包"}),Tt()}catch(B){D({message:`停止抓包失败:${Fl(B)}`,tone:"error"})}})}async function rt(g){if(window.confirm(`删除账号「${g.user||g.username}」?课程缓存和日志不会自动清理。`))try{await Zt(`/api/accounts/${encodeURIComponent(g.id)}`,{method:"DELETE"}),z(B=>{const O=B.filter(j=>j.id!==g.id);return T.current=O,O}),D({message:"账号已删除"})}catch(B){D({message:`删除失败:${Fl(B)}`,tone:"error"})}}async function Bt(g,B){const O={...g,selected:B};_t(O);try{await jt(O)}catch(j){D({message:`保存勾选失败:${Fl(j)}`,tone:"error"})}}function o(g,B,O){const j=g.selected||[];Bt(g,O?[...new Set([...j,B])]:j.filter(P=>P!==B))}function N(g){const B=(g.courses||[]).filter(O=>O.in_study!==!1).map(O=>O.plan_id);Bt(g,[...new Set([...g.selected||[],...B])])}async function Q(g,B,O){const j=B==="quiz"?{...g,optQuiz:O}:{...g,optFeedback:O};_t(j);try{await jt(j),D({message:B==="quiz"?O?"已开启自动交测验(注意正确率)":"已关闭自动交测验":O?"已开启自动交反馈表":"已关闭自动交反馈表"})}catch(P){D({message:`保存失败:${Fl(P)}`,tone:"error"})}}async function Z(g){const B=await Zt("/api/accounts",{method:"POST",body:JSON.stringify({username:g.username,platform:g.platform,password:g.password,note:g.note,cookies:[],courses:[],selected:[],status:"idle",created:Date.now()})});if(B.ok===!1)throw new Error(B.error||"保存失败");const O=await Zt("/api/accounts"),j=B.account||(O.accounts||[]).find(k=>k.username===g.username);if(!j){D({message:"已保存,但列表里没有找到新账号,请刷新页面",tone:"error"}),await Tt();return}D({message:"已保存,正在尝试首次登录…"});const P=await R(j,!0),L=T.current.find(k=>k.id===j.id);D(P?{message:`登录成功:${(L==null?void 0:L.user)||g.username}`,tone:"success"}:{message:`登录失败:${(L==null?void 0:L.lastError)||"未知原因"}(请手动点击「登录」重试)`,tone:"error"}),await Tt()}async function ot(){wt(!0);try{await Tt(!1)}finally{wt(!1)}}function yt(g){var O;const B=g.platform||((O=(g.courses||[]).find(j=>j.platform))==null?void 0:O.platform);return B&&d[B]||"莞易学"}const dt=($==null?void 0:$.type)==="quiz"&&r.find(g=>g.id===$.accountId)||null,K=($==null?void 0:$.type)==="quiz"?(dt==null?void 0:dt.courses.find(g=>g.plan_id===$.course.plan_id))||$.course:null;return f.jsxs("div",{className:"min-h-screen",children:[f.jsx(Av,{refreshing:ct,onRefresh:()=>void ot(),onSettings:()=>U({type:"settings"}),onSystemLog:()=>U({type:"system"}),onPlugins:()=>U({type:"plugins"}),onAdd:()=>U({type:"add"})}),f.jsxs("main",{className:"mx-auto max-w-[1320px] px-4 pb-16 pt-5 sm:px-6",children:[nt&&f.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2.5 rounded-xl border border-red-200 bg-red-50 px-4 py-2.5 text-[12.5px] text-red-700",children:[f.jsx(sv,{className:"size-4 shrink-0"}),f.jsx("span",{className:"font-medium",children:"后端未连接"}),f.jsx("span",{className:"text-red-500",children:"页面显示的是上一次数据,请确认服务已启动、端口没有变化。"}),f.jsx("div",{className:"flex-1"}),f.jsx(Qt,{size:"sm",variant:"secondary",loading:ct,onClick:()=>void ot(),children:"重试"})]}),f.jsx(_v,{accounts:r}),f.jsxs("div",{className:"mb-3 mt-6 flex items-end justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-[14px] font-semibold text-slate-900",children:"账号列表"}),f.jsx("p",{className:"mt-0.5 text-[11.5px] text-slate-400",children:"新旧版课程自动识别为「莞易学」,每 5 秒自动刷新状态"})]}),r.length>0&&f.jsx(Qt,{size:"sm",variant:"secondary",icon:f.jsx(ki,{className:"size-3.5"}),loading:ct,onClick:()=>void ot(),children:"刷新"})]}),r.length===0?f.jsxs("div",{className:"card-shadow grid place-items-center rounded-2xl border border-dashed border-slate-300 bg-white px-6 py-16 text-center",children:[f.jsx("div",{className:"grid size-12 place-items-center rounded-2xl bg-brand-50 text-brand-600",children:f.jsx(Em,{className:"size-6"})}),f.jsx("h3",{className:"mt-4 text-[14px] font-semibold text-slate-800",children:"还没有账号"}),f.jsx("p",{className:"mt-1.5 max-w-md text-[12.5px] leading-relaxed text-slate-500",children:"添加东莞市教师培训平台账号后,可自动读取课程、勾选学习、提交反馈表与测验。 新旧版课程页会统一识别为「莞易学」。"}),f.jsx(Qt,{variant:"primary",className:"mt-5",icon:f.jsx(Tm,{className:"size-4"}),onClick:()=>U({type:"add"}),children:"添加第一个账号"})]}):f.jsx("div",{className:"grid items-start gap-4 md:grid-cols-2 xl:grid-cols-3",children:r.map(g=>{var B;return f.jsx(bv,{account:g,platformLabel:yt(g),pending:S[g.id],openLog:ht.has(g.id),logLines:((B=Ft[g.id])==null?void 0:B.lines)||[],onToggleLog:()=>al(g.id),onLogin:()=>void R(g),onRefresh:()=>void F(g),onStudy:()=>void lt(g),onStop:()=>void pt(g),onCapture:()=>void G(g),onStopCapture:()=>void ut(g),onDelete:()=>void rt(g),onQuiz:()=>{var P;const O=(g.courses||[]).filter(L=>L.in_study!==!1),j=O.find(L=>{var k;return(k=g.selected)==null?void 0:k.includes(L.plan_id)})||O[0];if(!j){D({message:"这门课还没有课程数据,先点「刷新课程」",tone:"error"});return}if(!((P=g.cookies)!=null&&P.length)){D({message:"请先登录",tone:"error"});return}U({type:"quiz",accountId:g.id,course:j})},onToggleCourse:(O,j)=>o(g,O,j),onSelectAll:()=>N(g),onClearSelection:()=>void Bt(g,[]),onToggleOption:(O,j)=>void Q(g,O,j)},g.id)})})]}),f.jsx("footer",{className:"border-t border-line/70 py-5 text-center text-[11px] text-slate-400",children:"莞易学 · 多账号学习控制台 · 数据保存在本机"}),f.jsx(pv,{open:($==null?void 0:$.type)==="add",platforms:w,onClose:()=>U(null),onSubmit:Z}),f.jsx(Ev,{open:($==null?void 0:$.type)==="settings",onClose:()=>U(null),notify:D}),f.jsx(Ov,{open:($==null?void 0:$.type)==="system",onClose:()=>U(null)}),f.jsx(Nv,{open:($==null?void 0:$.type)==="plugins",onClose:()=>U(null),notify:D,onChanged:()=>void qt()}),f.jsx(zv,{open:($==null?void 0:$.type)==="quiz"&&!!dt,account:dt,course:K,onClose:()=>U(null),notify:D,onSubmitted:()=>void Tt()}),f.jsx(jv,{toast:X})]})}Hy.createRoot(document.getElementById("root")).render(f.jsx(Y.StrictMode,{children:f.jsx(Uv,{})})); diff --git a/static/assets/index-DsTLd63E.js b/static/assets/index-DsTLd63E.js deleted file mode 100644 index c5b535e..0000000 --- a/static/assets/index-DsTLd63E.js +++ /dev/null @@ -1,228 +0,0 @@ -var Nh=Object.defineProperty;var Eh=(r,N,E)=>N in r?Nh(r,N,{enumerable:!0,configurable:!0,writable:!0,value:E}):r[N]=E;var Li=(r,N,E)=>Eh(r,typeof N!="symbol"?N+"":N,E);(function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const M of document.querySelectorAll('link[rel="modulepreload"]'))d(M);new MutationObserver(M=>{for(const w of M)if(w.type==="childList")for(const j of w.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&d(j)}).observe(document,{childList:!0,subtree:!0});function E(M){const w={};return M.integrity&&(w.integrity=M.integrity),M.referrerPolicy&&(w.referrerPolicy=M.referrerPolicy),M.crossOrigin==="use-credentials"?w.credentials="include":M.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function d(M){if(M.ep)return;M.ep=!0;const w=E(M);fetch(M.href,w)}})();var As={exports:{}},dn={};/** - * @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 sm;function zh(){if(sm)return dn;sm=1;var r=Symbol.for("react.transitional.element"),N=Symbol.for("react.fragment");function E(d,M,w){var j=null;if(w!==void 0&&(j=""+w),M.key!==void 0&&(j=""+M.key),"key"in M){w={};for(var ut in M)ut!=="key"&&(w[ut]=M[ut])}else w=M;return M=w.ref,{$$typeof:r,type:d,key:j,ref:M!==void 0?M:null,props:w}}return dn.Fragment=N,dn.jsx=E,dn.jsxs=E,dn}var rm;function _h(){return rm||(rm=1,As.exports=zh()),As.exports}var f=_h(),js={exports:{}},nt={};/** - * @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 om;function Oh(){if(om)return nt;om=1;var r=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),j=Symbol.for("react.context"),ut=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),V=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),Z=Symbol.for("react.view_transition"),rt=Symbol.iterator;function Xt(o){return o===null||typeof o!="object"?null:(o=rt&&o[rt]||o["@@iterator"],typeof o=="function"?o:null)}var et={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,dt={};function tt(o,T,Y){this.props=o,this.context=T,this.refs=dt,this.updater=Y||et}tt.prototype.isReactComponent={},tt.prototype.setState=function(o,T){if(typeof o!="object"&&typeof o!="function"&&o!=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,o,T,"setState")},tt.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function Tt(){}Tt.prototype=tt.prototype;function Ft(o,T,Y){this.props=o,this.context=T,this.refs=dt,this.updater=Y||et}var Mt=Ft.prototype=new Tt;Mt.constructor=Ft,D(Mt,tt.prototype),Mt.isPureReactComponent=!0;var Ht=Array.isArray;function F(){}var C={H:null,A:null,T:null,S:null},At=Object.prototype.hasOwnProperty;function zt(o,T,Y){var Q=Y.ref;return{$$typeof:r,type:o,key:T,ref:Q!==void 0?Q:null,props:Y}}function Nt(o,T){return zt(o.type,T,o.props)}function Ct(o){return typeof o=="object"&&o!==null&&o.$$typeof===r}function Wt(o){var T={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(Y){return T[Y]})}var Lt=/\/+/g;function Bt(o,T){return typeof o=="object"&&o!==null&&o.key!=null?Wt(""+o.key):T.toString(36)}function H(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(F,F):(o.status="pending",o.then(function(T){o.status==="pending"&&(o.status="fulfilled",o.value=T)},function(T){o.status==="pending"&&(o.status="rejected",o.reason=T)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function k(o,T,Y,Q,mt){var st=typeof o;(st==="undefined"||st==="boolean")&&(o=null);var vt=!1;if(o===null)vt=!0;else switch(st){case"bigint":case"string":case"number":vt=!0;break;case"object":switch(o.$$typeof){case r:case N:vt=!0;break;case q:return vt=o._init,k(vt(o._payload),T,Y,Q,mt)}}if(vt)return mt=mt(o),vt=Q===""?"."+Bt(o,0):Q,Ht(mt)?(Y="",vt!=null&&(Y=vt.replace(Lt,"$&/")+"/"),k(mt,T,Y,"",function(A){return A})):mt!=null&&(Ct(mt)&&(mt=Nt(mt,Y+(mt.key==null||o&&o.key===mt.key?"":(""+mt.key).replace(Lt,"$&/")+"/")+vt)),T.push(mt)),1;vt=0;var y=Q===""?".":Q+":";if(Ht(o))for(var O=0;O>>1,B=H[pt];if(0>>1;ptM(wt,I))oM(T,wt)?(H[pt]=T,H[o]=I,pt=o):(H[pt]=wt,H[it]=I,pt=it);else if(oM(T,I))H[pt]=T,H[o]=I,pt=o;else break t}}return k}function M(H,k){var I=H.sortIndex-k.sortIndex;return I!==0?I:H.id-k.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var w=performance;r.unstable_now=function(){return w.now()}}else{var j=Date,ut=j.now();r.unstable_now=function(){return j.now()-ut}}var W=[],V=[],q=1,S=null,Z=3,rt=!1,Xt=!1,et=!1,D=!1,dt=typeof setTimeout=="function"?setTimeout:null,tt=typeof clearTimeout=="function"?clearTimeout:null,Tt=typeof setImmediate<"u"?setImmediate:null;function Ft(H){for(var k=E(V);k!==null;){if(k.callback===null)d(V);else if(k.startTime<=H)d(V),k.sortIndex=k.expirationTime,N(W,k);else break;k=E(V)}}function Mt(H){if(et=!1,Ft(H),!Xt)if(E(W)!==null)Xt=!0,Ht||(Ht=!0,Ct());else{var k=E(V);k!==null&&Bt(Mt,k.startTime-H)}}var Ht=!1,F=-1,C=5,At=-1;function zt(){return D?!0:!(r.unstable_now()-AtH&&zt());){var pt=S.callback;if(typeof pt=="function"){S.callback=null,Z=S.priorityLevel;var B=pt(S.expirationTime<=H);if(H=r.unstable_now(),typeof B=="function"){S.callback=B,Ft(H),k=!0;break l}S===E(W)&&d(W),Ft(H)}else d(W);S=E(W)}if(S!==null)k=!0;else{var at=E(V);at!==null&&Bt(Mt,at.startTime-H),k=!1}}break t}finally{S=null,Z=I,rt=!1}k=void 0}}finally{k?Ct():Ht=!1}}}var Ct;if(typeof Tt=="function")Ct=function(){Tt(Nt)};else if(typeof MessageChannel<"u"){var Wt=new MessageChannel,Lt=Wt.port2;Wt.port1.onmessage=Nt,Ct=function(){Lt.postMessage(null)}}else Ct=function(){dt(Nt,0)};function Bt(H,k){F=dt(function(){H(r.unstable_now())},k)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(H){H.callback=null},r.unstable_forceFrameRate=function(H){0>H||125pt?(H.sortIndex=I,N(V,H),E(W)===null&&H===E(V)&&(et?(tt(F),F=-1):et=!0,Bt(Mt,I-pt))):(H.sortIndex=B,N(W,H),Xt||rt||(Xt=!0,Ht||(Ht=!0,Ct()))),H},r.unstable_shouldYield=zt,r.unstable_wrapCallback=function(H){var k=Z;return function(){var I=Z;Z=k;try{return H.apply(this,arguments)}finally{Z=I}}}})(Ds)),Ds}var ym;function jh(){return ym||(ym=1,Cs.exports=Ah()),Cs.exports}var Us={exports:{}},hl={};/** - * @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 hm;function Mh(){if(hm)return hl;hm=1;var r=qs();function N(q){var S="https://react.dev/errors/"+q;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(N){console.error(N)}}return r(),Us.exports=Mh(),Us.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 gm;function Dh(){if(gm)return mn;gm=1;var r=jh(),N=qs(),E=Ch();function d(t){var l="https://react.dev/errors/"+t;if(1U||(t.current=L[U],L[U]=null,U--)}function gt(t,l){U++,L[U]=t.current,t.current=l}var fl=J(null),le=J(null),Me=J(null),hn=J(null);function vn(t,l){switch(gt(Me,l),gt(le,t),gt(fl,null),l.nodeType){case 9:case 11:t=(t=l.documentElement)&&(t=t.namespaceURI)?b0(t):0;break;default:if(t=l.tagName,l=l.namespaceURI)l=b0(l),t=x0(l,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}P(fl),gt(fl,t)}function Aa(){P(fl),P(le),P(Me)}function Ji(t){var l=t.memoizedState;l!==null&&(hu._currentValue=l.memoizedState,gt(hn,t)),l=fl.current;var e=x0(l,t.type);l!==e&&(gt(le,t),gt(fl,e))}function gn(t){le.current===t&&(P(fl),P(le)),hn.current===t&&(P(hn),hu._currentValue=A)}var ki,Ys;function Ce(t){if(ki===void 0)try{throw Error()}catch(e){var l=e.stack.trim().match(/\n( *(at )?)/);ki=l&&l[1]||"",Ys=-1)":-1u||s[a]!==g[u]){var p=` -`+s[a].replace(" at new "," at ");return t.displayName&&p.includes("")&&(p=p.replace("",t.displayName)),p}while(1<=a&&0<=u);break}}}finally{$i=!1,Error.prepareStackTrace=e}return(e=t?t.displayName||t.name:"")?Ce(e):""}function Om(t,l){switch(t.tag){case 26:case 27:case 5:return Ce(t.type);case 16:return Ce("Lazy");case 13:return t.child!==l&&l!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Fi(t.type,!1);case 11:return Fi(t.type.render,!1);case 1:return Fi(t.type,!0);case 31:return Ce("Activity");case 30:return Ce("ViewTransition");default:return""}}function ws(t){try{var l="",e=null;do l+=Om(t,e),e=t,t=t.return;while(t);return l}catch(a){return` -Error generating stack: `+a.message+` -`+a.stack}}var Wi=Object.prototype.hasOwnProperty,Ii=r.unstable_scheduleCallback,Pi=r.unstable_cancelCallback,Am=r.unstable_shouldYield,jm=r.unstable_requestPaint,Al=r.unstable_now,Mm=r.unstable_getCurrentPriorityLevel,Gs=r.unstable_ImmediatePriority,Qs=r.unstable_UserBlockingPriority,bn=r.unstable_NormalPriority,Cm=r.unstable_LowPriority,Xs=r.unstable_IdlePriority,Dm=r.log,Um=r.unstable_setDisableYieldValue,bu=null,jl=null;function De(t){if(typeof Dm=="function"&&Um(t),jl&&typeof jl.setStrictMode=="function")try{jl.setStrictMode(bu,t)}catch{}}var Ml=Math.clz32?Math.clz32:qm,Rm=Math.log,Hm=Math.LN2;function qm(t){return t>>>=0,t===0?32:31-(Rm(t)/Hm|0)|0}var xn=256,pn=262144,Sn=4194304;function na(t){var l=t&42;if(l!==0)return l;switch(t&-t){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 t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Tn(t,l,e){var a=t.pendingLanes;if(a===0)return 0;var u=0,n=t.suspendedLanes,i=t.pingedLanes;t=t.warmLanes;var c=a&134217727;return c!==0?(a=c&~n,a!==0?u=na(a):(i&=c,i!==0?u=na(i):e||(e=c&~t,e!==0&&(u=na(e))))):(c=a&~n,c!==0?u=na(c):i!==0?u=na(i):e||(e=a&~t,e!==0&&(u=na(e)))),u===0?0:l!==0&&l!==u&&(l&n)===0&&(n=u&-u,e=l&-l,n>=e||n===32&&(e&4194048)!==0)?l:u}function xu(t,l){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&l)===0}function Vs(t,l){(l&8)!==0&&(l|=l&32);var e=t.entangledLanes;if(e!==0)for(t=t.entanglements,e&=l;0e;e++)l.push(t);return l}function pu(t,l){t.pendingLanes|=l,l!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Ym(t,l,e,a,u,n){var i=t.pendingLanes;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=e,t.entangledLanes&=e,t.errorRecoveryDisabledLanes&=e,t.shellSuspendCounter=0;var c=t.entanglements,s=t.expirationTimes,g=t.hiddenUpdates;for(e=i&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rc=!1;if(ve)try{var Eu={};Object.defineProperty(Eu,"passive",{get:function(){rc=!0}}),window.addEventListener("test",Eu,Eu),window.removeEventListener("test",Eu,Eu)}catch{rc=!1}var Ue=null,oc=null,An=null;function mr(){if(An)return An;var t,l=oc,e=l.length,a,u="value"in Ue?Ue.value:Ue.textContent,n=u.length;for(t=0;t=Ou),xr=" ",pr=!1;function Sr(t,l){switch(t){case"keyup":return p1.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tr(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ba=!1;function T1(t,l){switch(t){case"compositionend":return Tr(l);case"keypress":return l.which!==32?null:(pr=!0,xr);case"textInput":return t=l.data,t===xr&&pr?null:t;default:return null}}function N1(t,l){if(Ba)return t==="compositionend"||!vc&&Sr(t,l)?(t=mr(),An=oc=Ue=null,Ba=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Mr(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cr(t,l){var e=Mr(t);t=0;for(var a;e;){if(e.nodeType===3){if(a=t+e.textContent.length,t<=l&&a>=l)return{node:e,offset:l-t};t=a}t:{for(;e;){if(e.nextSibling){e=e.nextSibling;break t}e=e.parentNode}e=void 0}e=Mr(e)}}function Dr(t,l){return t&&l?t===l?!0:t&&t.nodeType===3?!1:l&&l.nodeType===3?Dr(t,l.parentNode):"contains"in t?t.contains(l):t.compareDocumentPosition?!!(t.compareDocumentPosition(l)&16):!1:!1}function Ur(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var l=xc(t.document);l instanceof t.HTMLIFrameElement;){try{var e=typeof l.contentWindow.location.href=="string"}catch{e=!1}if(e)t=l.contentWindow;else break;l=xc(t.document)}return l}function pc(t){var l=t&&t.nodeName&&t.nodeName.toLowerCase();return l&&(l==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||l==="textarea"||t.contentEditable==="true")}var C1=ve&&"documentMode"in document&&11>=document.documentMode,Ya=null,Sc=null,Cu=null,Tc=!1;function Rr(t,l,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Tc||Ya==null||Ya!==xc(a)||(a=Ya,"selectionStart"in a&&pc(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}),Cu&&Mu(Cu,a)||(Cu=a,a=Ui(Sc,"onSelect"),0>=i,u-=i,ae=1<<32-Ml(l)+u|e<lt?(el=$,$=null):el=$.sibling;var St=h(v,$,b[lt],z);if(St===null){$===null&&($=el);break}t&&$&&St.alternate===null&&l(v,$),m=n(St,m,lt),xt===null?X=St:xt.sibling=St,xt=St,$=el}if(lt===b.length)return e(v,$),ot&&pe(v,lt),X;if($===null){for(;ltlt?(el=$,$=null):el=$.sibling;var ua=h(v,$,St.value,z);if(ua===null){$===null&&($=el);break}t&&$&&ua.alternate===null&&l(v,$),m=n(ua,m,lt),xt===null?X=ua:xt.sibling=ua,xt=ua,$=el}if(St.done)return e(v,$),ot&&pe(v,lt),X;if($===null){for(;!St.done;lt++,St=b.next())St=_(v,St.value,z),St!==null&&(m=n(St,m,lt),xt===null?X=St:xt.sibling=St,xt=St);return ot&&pe(v,lt),X}for($=a($);!St.done;lt++,St=b.next())St=x($,v,lt,St.value,z),St!==null&&(t&&(el=St.alternate,el!==null&&$.delete(el.key===null?lt:el.key)),m=n(St,m,lt),xt===null?X=St:xt.sibling=St,xt=St);return t&&$.forEach(function(Th){return l(v,Th)}),ot&&pe(v,lt),X}function ft(v,m,b,z){if(typeof b=="object"&&b!==null&&b.type===Nt&&b.key===null&&b.props.ref===void 0&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case At:t:{for(var X=b.key;m!==null;){if(m.key===X){if(X=b.type,X===Nt){if(m.tag===7){e(v,m.sibling),z=u(m,b.props.children),we(z,b),z.return=v,v=z;break t}}else if(m.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===B&&ba(X)===m.type){e(v,m.sibling),z=u(m,b.props),we(z,b),z.return=v,v=z;break t}e(v,m);break}else l(v,m);m=m.sibling}b.type===Nt?(z=oa(b.props.children,v.mode,z,b.key),we(z,b),z.return=v,v=z):(z=Yn(b.type,b.key,b.props,null,v.mode,z),we(z,b),z.return=v,v=z)}return i(v);case zt:t:{for(X=b.key;m!==null;){if(m.key===X)if(m.tag===4&&m.stateNode.containerInfo===b.containerInfo&&m.stateNode.implementation===b.implementation){e(v,m.sibling),z=u(m,b.children||[]),z.return=v,v=z;break t}else{e(v,m);break}else l(v,m);m=m.sibling}z=jc(b,v.mode,z),z.return=v,v=z}return i(v);case B:return b=ba(b),ft(v,m,b,z)}if(vt(b))return R(v,m,b,z);if(Q(b)){if(X=Q(b),typeof X!="function")throw Error(d(150));return b=X.call(b),K(v,m,b,z)}if(typeof b.then=="function")return ft(v,m,kn(b),z);if(b.$$typeof===Bt)return ft(v,m,Zn(v,b),z);$n(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,m!==null&&m.tag===6?(e(v,m.sibling),z=u(m,b),z.return=v,v=z):(e(v,m),z=Ac(b,v.mode,z),z.return=v,v=z),i(v)):e(v,m)}return function(v,m,b,z){try{Bu=0;var X=ft(v,m,b,z);return Ja=null,X}catch($){if($===Ka||$===Kn)throw $;var xt=Nl(29,$,null,v.mode);return xt.lanes=z,xt.return=v,xt}finally{}}}var pa=uo(!0),no=uo(!1),Ge=!1;function wc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gc(t,l){t=t.updateQueue,l.updateQueue===t&&(l.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Qe(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Xe(t,l,e){var a=t.updateQueue;if(a===null)return null;if(a=a.shared,(_t&2)!==0){var u=a.pending;return u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l,l=Bn(t),Xr(t,null,e),l}return qn(t,a,l,e),Bn(t)}function Yu(t,l,e){if(l=l.updateQueue,l!==null&&(l=l.shared,(e&4194048)!==0)){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}function Qc(t,l){var e=t.updateQueue,a=t.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var u=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?u=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?u=n=l:n=n.next=l}else u=n=l;e={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:a.shared,callbacks:a.callbacks},t.updateQueue=e;return}t=e.lastBaseUpdate,t===null?e.firstBaseUpdate=l:t.next=l,e.lastBaseUpdate=l}var Xc=!1;function wu(){if(Xc){var t=La;if(t!==null)throw t}}function Gu(t,l,e,a){Xc=!1;var u=t.updateQueue;Ge=!1;var n=u.firstBaseUpdate,i=u.lastBaseUpdate,c=u.shared.pending;if(c!==null){u.shared.pending=null;var s=c,g=s.next;s.next=null,i===null?n=g:i.next=g,i=s;var p=t.alternate;p!==null&&(p=p.updateQueue,c=p.lastBaseUpdate,c!==i&&(c===null?p.firstBaseUpdate=g:c.next=g,p.lastBaseUpdate=s))}if(n!==null){var _=u.baseState;i=0,p=g=s=null,c=n;do{var h=c.lane&-536870913,x=h!==c.lane;if(x?(bt&h)===h:(a&h)===h){h!==0&&h===va&&(Xc=!0),p!==null&&(p=p.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});t:{var R=t,K=c;h=l;var ft=e;switch(K.tag){case 1:if(R=K.payload,typeof R=="function"){_=R.call(ft,_,h);break t}_=R;break t;case 3:R.flags=R.flags&-65537|128;case 0:if(R=K.payload,h=typeof R=="function"?R.call(ft,_,h):R,h==null)break t;_=F({},_,h);break t;case 2:Ge=!0}}h=c.callback,h!==null&&(t.flags|=64,x&&(t.flags|=8192),x=u.callbacks,x===null?u.callbacks=[h]:x.push(h))}else x={lane:h,tag:c.tag,payload:c.payload,callback:c.callback,next:null},p===null?(g=p=x,s=_):p=p.next=x,i|=h;if(c=c.next,c===null){if(c=u.shared.pending,c===null)break;x=c,c=x.next,x.next=null,u.lastBaseUpdate=x,u.shared.pending=null}}while(!0);p===null&&(s=_),u.baseState=s,u.firstBaseUpdate=g,u.lastBaseUpdate=p,n===null&&(u.shared.lanes=0),$e|=i,t.lanes=i,t.memoizedState=_}}function io(t,l){if(typeof t!="function")throw Error(d(191,t));t.call(l)}function co(t,l){var e=t.callbacks;if(e!==null)for(t.callbacks=null,t=0;tn?n:8;var i=y.T,c={};c.types=i!==null?i.types:null,y.T=c,sf(t,!1,l,e);try{var s=u(),g=y.S;if(g!==null&&g(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var p=X1(s,a);Zu(t,l,p,Bl(t))}else Zu(t,l,a,Bl(t))}catch(_){Zu(t,l,{then:function(){},status:"rejected",reason:_},Bl())}finally{O.p=n,i!==null&&c.types!==null&&(i.types=c.types),y.T=i}}function k1(){}function cf(t,l,e,a){if(t.tag!==5)throw Error(d(476));var u=Go(t).queue;wo(t,u,l,A,e===null?k1:function(){return Qo(t),e(a)})}function Go(t){var l=t.memoizedState;if(l!==null)return l;l={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:A},next:null};var e={};return l.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ee,lastRenderedState:e},next:null},t.memoizedState=l,t=t.alternate,t!==null&&(t.memoizedState=l),l}function Qo(t){var l=Go(t);l.next===null&&(l=t.alternate.memoizedState),Zu(t,l.next.queue,{},Bl())}function ff(){return rl(hu)}function Xo(){return It().memoizedState}function Vo(){return It().memoizedState}function $1(t){for(var l=t.return;l!==null;){switch(l.tag){case 24:case 3:var e=Bl();t=Qe(e);var a=Xe(l,t,e);a!==null&&(Ol(a,l,e),Yu(a,l,e)),l={cache:Hc()},t.payload=l;return}l=l.return}}function F1(t,l,e){var a=Bl();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},ni(t)?Lo(l,e):(e=_c(t,l,e,a),e!==null&&(Ol(e,t,a),Ko(e,l,a)))}function Zo(t,l,e){var a=Bl();Zu(t,l,e,a)}function Zu(t,l,e,a){var u={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(ni(t))Lo(l,u);else{var n=t.alternate;if(t.lanes===0&&(n===null||n.lanes===0)&&(n=l.lastRenderedReducer,n!==null))try{var i=l.lastRenderedState,c=n(i,e);if(u.hasEagerState=!0,u.eagerState=c,Dl(c,i))return qn(t,l,u,0),Yt===null&&Hn(),!1}catch{}finally{}if(e=_c(t,l,u,a),e!==null)return Ol(e,t,a),Ko(e,l,a),!0}return!1}function sf(t,l,e,a){if(a={lane:2,revertLane:Pf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ni(t)){if(l)throw Error(d(479))}else l=_c(t,e,a,2),l!==null&&Ol(l,t,2)}function ni(t){var l=t.alternate;return t===ct||l!==null&&l===ct}function Lo(t,l){ka=In=!0;var e=t.pending;e===null?l.next=l:(l.next=e.next,e.next=l),t.pending=l}function Ko(t,l,e){if((e&4194048)!==0){var a=l.lanes;a&=t.pendingLanes,e|=a,l.lanes=e,Ks(t,e)}}var ii={readContext:rl,use:li,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt,useEffectEvent:kt},Jo={readContext:rl,use:li,useCallback:function(t,l){return xl().memoizedState=[t,l===void 0?null:l],t},useContext:rl,useEffect:Mo,useImperativeHandle:function(t,l,e){e=e!=null?e.concat([t]):null,ai(4194308,4,Ro.bind(null,l,t),e)},useLayoutEffect:function(t,l){return ai(4194308,4,t,l)},useInsertionEffect:function(t,l){ai(4,2,t,l)},useMemo:function(t,l){var e=xl();l=l===void 0?null:l;var a=t();if(Sa){De(!0);try{t()}finally{De(!1)}}return e.memoizedState=[a,l],a},useReducer:function(t,l,e){var a=xl();if(e!==void 0){var u=e(l);if(Sa){De(!0);try{e(l)}finally{De(!1)}}}else u=l;return a.memoizedState=a.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},a.queue=t,t=t.dispatch=F1.bind(null,ct,t),[a.memoizedState,t]},useRef:function(t){var l=xl();return t={current:t},l.memoizedState=t},useState:function(t){t=lf(t);var l=t.queue,e=Zo.bind(null,ct,l);return l.dispatch=e,[t.memoizedState,e]},useDebugValue:uf,useDeferredValue:function(t,l){var e=xl();return nf(e,t,l)},useTransition:function(){var t=lf(!1);return t=wo.bind(null,ct,t.queue,!0,!1),xl().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,l,e){var a=ct,u=xl();if(ot){if(e===void 0)throw Error(d(407));e=e()}else{if(e=l(),Yt===null)throw Error(d(349));(bt&127)!==0||yo(a,l,e)}u.memoizedState=e;var n={value:e,getSnapshot:l};return u.queue=n,Mo(vo.bind(null,a,n,t),[t]),a.flags|=2048,Fa(9,{destroy:void 0},ho.bind(null,a,n,e,l),null),e},useId:function(){var t=xl(),l=Yt.identifierPrefix;if(ot){var e=ue,a=ae;e=(a&~(1<<32-Ml(a)-1)).toString(32)+e,l="_"+l+"R_"+e,e=Pn++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?n.multiple=!0:a.size&&(n.size=a.size);break;default:n=typeof a.is=="string"?i.createElement(u,{is:a.is}):i.createElement(u)}}n[sl]=l,n[Tl]=a;t:for(i=l.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break t;for(;i.sibling===null;){if(i.return===null||i.return===l)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}l.stateNode=n;t:switch(yl(n,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break t;case"img":a=!0;break t;default:a=!1}a&&_e(l)}}return Qt(l),l.subtreeFlags&=-33554433,Tf(l,l.type,t===null?null:t.memoizedProps,l.pendingProps,e),null;case 6:if(t&&l.stateNode!=null)t.memoizedProps!==a&&_e(l);else{if(typeof a!="string"&&l.stateNode===null)throw Error(d(166));if(t=Me.current,Za(l)){if(t=l.stateNode,e=l.memoizedProps,a=null,u=nl,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}t[sl]=l,t=!!(t.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||v0(t.nodeValue,e)),t||Be(l,!0)}else t=an(t).createTextNode(a),t[sl]=l,l.stateNode=t}return Qt(l),null;case 31:if(e=l.memoizedState,t===null||t.memoizedState!==null){if(a=Za(l),e!==null){if(t===null){if(!a)throw Error(d(318));if(t=l.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(d(557));t[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),t=!1}else e=Dc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=e),t=!0;if(!t)return l.flags&256?(Ul(l),l):(Ul(l),null);if((l.flags&128)!==0)throw Error(d(558))}return Qt(l),null;case 13:if(a=l.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=Za(l),a!==null&&a.dehydrated!==null){if(t===null){if(!u)throw Error(d(318));if(u=l.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(d(317));u[sl]=l}else da(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qt(l),u=!1}else u=Dc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return l.flags&256?(Ul(l),l):(Ul(l),null)}return Ul(l),(l.flags&128)!==0?(l.lanes=e,l):(e=a!==null,t=t!==null&&t.memoizedState!==null,e&&(a=l.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==u&&(a.flags|=2048)),e!==t&&e&&(l.child.flags|=8192),di(l,l.updateQueue),Qt(l),null);case 4:return Aa(),t===null&&as(l.stateNode.containerInfo),l.flags|=67108864,Qt(l),null;case 10:return Te(l.type),Qt(l),null;case 19:if(Kc(l),a=l.memoizedState,a===null)return Qt(l),null;if(u=(l.flags&128)!==0,n=a.rendering,n===null)if(u)Ku(a,!1);else{if($t!==0||t!==null&&(t.flags&128)!==0)for(t=l.child;t!==null;){if(n=Wn(t),n!==null){for(l.flags|=128,Ku(a,!1),t=n.updateQueue,l.updateQueue=t,di(l,t),l.subtreeFlags=0,t=e,e=l.child;e!==null;)Vr(e,t),e=e.sibling;return Qu(l,dl.current&1|2),ot&&pe(l,a.treeForkCount),l.child}t=t.sibling}a.tail!==null&&Al()>Ei&&(l.flags|=128,u=!0,Ku(a,!1),l.lanes=4194304)}else{if(!u)if(t=Wn(n),t!==null){if(l.flags|=128,u=!0,t=t.updateQueue,l.updateQueue=t,di(l,t),Ku(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!n.alternate&&!ot)return Qt(l),null}else 2*Al()-a.renderingStartTime>Ei&&e!==536870912&&(l.flags|=128,u=!0,Ku(a,!1),l.lanes=4194304);a.isBackwards?(n.sibling=l.child,l.child=n):(t=a.last,t!==null?t.sibling=n:l.child=n,a.last=n)}if(a.tail!==null){t=a.tail;t:{for(e=t;e!==null;){if(e.alternate!==null){e=!1;break t}e=e.sibling}e=!0}return a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Al(),t.sibling=null,n=dl.current,n=u?n&1|2:n&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||ot?Qu(l,n):(e=n,gt(ol,l),gt(dl,e),vl===null&&(vl=l)),ot&&pe(l,a.treeForkCount),t}return Qt(l),null;case 22:case 23:return Ul(l),Zc(),a=l.memoizedState!==null,t!==null?t.memoizedState!==null!==a&&(l.flags|=8192):a&&(l.flags|=8192),a?(e&536870912)!==0&&(l.flags&128)===0&&(Qt(l),l.subtreeFlags&6&&(l.flags|=8192)):Qt(l),e=l.updateQueue,e!==null&&di(l,e.retryQueue),e=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),a=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(a=l.memoizedState.cachePool.pool),a!==e&&(l.flags|=2048),t!==null&&P(ga),null;case 24:return e=null,t!==null&&(e=t.memoizedState.cache),l.memoizedState.cache!==e&&(l.flags|=2048),Te(Pt),Qt(l),null;case 25:return null;case 30:return l.flags|=33554432,Qt(l),null}throw Error(d(156,l.tag))}function ay(t,l){switch(Mc(l),l.tag){case 1:return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 3:return Te(Pt),Aa(),t=l.flags,(t&65536)!==0&&(t&128)===0?(l.flags=t&-65537|128,l):null;case 26:case 27:case 5:return gn(l),null;case 31:if(l.memoizedState!==null){if(Ul(l),l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 13:if(Ul(l),t=l.memoizedState,t!==null&&t.dehydrated!==null){if(l.alternate===null)throw Error(d(340));da()}return t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 19:return Kc(l),t=l.flags,t&65536?(l.flags=t&-65537|128,t=l.memoizedState,t!==null&&(t.rendering=null,t.tail=null),l.flags|=4,l):null;case 4:return Aa(),null;case 10:return Te(l.type),null;case 22:case 23:return Ul(l),Zc(),t!==null&&P(ga),t=l.flags,t&65536?(l.flags=t&-65537|128,l):null;case 24:return Te(Pt),null;case 25:return null;default:return null}}function bd(t,l){switch(Mc(l),l.tag){case 3:Te(Pt),Aa();break;case 26:case 27:case 5:gn(l);break;case 4:Aa();break;case 31:l.memoizedState!==null&&Ul(l);break;case 13:Ul(l);break;case 19:Kc(l);break;case 10:Te(l.type);break;case 22:case 23:Ul(l),Zc(),t!==null&&P(ga);break;case 24:Te(Pt)}}function Ju(t,l){try{var e=l.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var u=a.next;e=u;do{if((e.tag&t)===t){a=void 0;var n=e.create,i=e.inst;a=n(),i.destroy=a}e=e.next}while(e!==u)}}catch(c){Ut(l,l.return,c)}}function Ke(t,l,e){try{var a=l.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var n=u.next;a=n;do{if((a.tag&t)===t){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,u=l;var s=e,g=c;try{g()}catch(p){Ut(u,s,p)}}}a=a.next}while(a!==n)}}catch(p){Ut(l,l.return,p)}}function xd(t){var l=t.updateQueue;if(l!==null){var e=t.stateNode;try{co(l,e)}catch(a){Ut(t,t.return,a)}}}function pd(t,l,e){e.props=Ta(t.type,t.memoizedProps),e.state=t.memoizedState;try{e.componentWillUnmount()}catch(a){Ut(t,l,a)}}function ne(t,l){try{var e=t.ref;if(e!==null){switch(t.tag){case 26:case 27:case 5:var a=t.stateNode;break;case 30:var u=t.stateNode,n=ge(t.memoizedProps,u);(u.ref===null||u.ref.name!==n)&&(u.ref=O0(n)),a=u.ref;break;case 7:if(t.stateNode===null){var i=new Yl(t);S(t.child,!1,Jy,i,void 0,void 0),t.stateNode=i}a=t.stateNode;break;default:a=t.stateNode}typeof e=="function"?t.refCleanup=e(a):e.current=a}}catch(c){Ut(t,l,c)}}function ml(t,l){var e=t.ref,a=t.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(u){Ut(t,l,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(u){Ut(t,l,u)}else e.current=null}function mi(t,l){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&l!==null)for(var e=0;e title"))),yl(a,l,e),a[sl]=t,ul(a),l=a;break t;case"link":if(n=Z0("link","href",u).get(l+(e.href||""))){for(i=0;ift&&(i=ft,ft=K,K=i);var v=Cr(c,K),m=Cr(c,ft);if(v&&m&&(x.rangeCount!==1||x.anchorNode!==v.node||x.anchorOffset!==v.offset||x.focusNode!==m.node||x.focusOffset!==m.offset)){var b=_.createRange();b.setStart(v.node,v.offset),x.removeAllRanges(),K>ft?(x.addRange(b),x.extend(m.node,m.offset)):(b.setEnd(m.node,m.offset),x.addRange(b))}}}}for(_=[],x=c;x=x.parentNode;)x.nodeType===1&&_.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<_.length;c++){var z=_[c];z.element.scrollLeft=z.left,z.element.scrollTop=z.top}}vu=!!is,cs=is=null}finally{_t=n,O.p=u,y.T=a}}t.current=l,Kt=2}}function Jf(){if(Kt===2){Kt=0;var t=Pl,l=_a,e=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||e){e=y.T,y.T=null;var a=O.p;O.p=2;var u=_t;_t|=4;try{Cd(t,l.alternate,l)}finally{_t=u,O.p=a,y.T=e}}Kt=3}}function kf(){if(Kt===4||Kt===3){Kt=0;var t=au;au=null,jm();var l=Pl,e=_a,a=oe,u=Kd,n=(a&335544064)===a?10262:10256;if((e.subtreeFlags&n)!==0||(e.flags&n)!==0?Kt=5:(Kt=0,_a=Pl=null,u0(l,l.pendingLanes)),n=l.pendingLanes,n===0&&(Fe=null),ec(a),e=e.stateNode,jl&&typeof jl.onCommitFiberRoot=="function")try{jl.onCommitFiberRoot(bu,e,void 0,(e.current.flags&128)===128)}catch{}if(u!==null){e=y.T,n=O.p,O.p=2,y.T=null;try{for(var i=l.onRecoverableError,c=0;ce?32:e,y.T=null,e=Vf,Vf=null;var n=Pl,i=oe;if(Kt=0,_a=Pl=null,oe=0,(_t&6)!==0)throw Error(d(331));var c=_t;if(_t|=4,Vd(n.current),Gd(n,n.current,i,e),_t=c,tn(0,!1),jl&&typeof jl.onPostCommitFiberRoot=="function")try{jl.onPostCommitFiberRoot(bu,n)}catch{}return!0}finally{O.p=u,y.T=a,u0(t,l)}}function n0(t,l,e){l=Ql(e,l),l=df(t.stateNode,l,2),t=Xe(t,l,2),t!==null&&(pu(t,2),de(t))}function Ut(t,l,e){if(t.tag===3)n0(t,t,e);else for(;l!==null;){if(l.tag===3){n0(l,t,e);break}else if(l.tag===1){var a=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Fe===null||!Fe.has(a))){t=Ql(e,t),e=ld(2),a=Xe(l,e,2),a!==null&&(ed(e,a,l,t),pu(a,2),de(a));break}}l=l.return}}function Ff(t,l,e){var a=t.pingCache;if(a===null){a=t.pingCache=new cy;var u=new Set;a.set(l,u)}else u=a.get(l),u===void 0&&(u=new Set,a.set(l,u));u.has(e)||(Gf=!0,u.add(e),t=hy.bind(null,t,l,e),l.then(t,t))}function hy(t,l,e){var a=t.pingCache;a!==null&&a.delete(l),t.pingedLanes|=t.suspendedLanes&e,t.warmLanes&=~e,Yt===t&&(bt&e)===e&&(($t===4||$t===3&&(bt&62914560)===bt&&300>Al()-Ni)&&(_t&2)===0?cu(t,0):Ti|=e,eu===bt&&(eu=0)),de(t)}function i0(t,l){l===0&&(l=Zs()),t=ra(t,l),t!==null&&(pu(t,l),de(t))}function vy(t){var l=t.memoizedState,e=0;l!==null&&(e=l.retryLane),i0(t,e)}function gy(t,l){var e=0;switch(t.tag){case 31:case 13:var a=t.stateNode,u=t.memoizedState;u!==null&&(e=u.retryLane);break;case 19:a=t.stateNode;break;case 22:a=t.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(l),i0(t,e)}function by(t,l){return Ii(t,l)}var su=null,ru=null,Wf=!1,Ci=!1,If=!1,Ie=0;function de(t){t!==ru&&t.next===null&&(ru===null?su=ru=t:ru=ru.next=t),Ci=!0,Wf||(Wf=!0,py())}function tn(t,l){if(!If&&Ci){If=!0;do for(var e=!1,a=su;a!==null;){if(t!==0){var u=a.pendingLanes;if(u===0)var n=0;else{var i=a.suspendedLanes,c=a.pingedLanes;n=(1<<31-Ml(42|t)+1)-1,n&=u&~(i&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,r0(a,n))}else n=bt,n=Tn(a,a===Yt?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(n&3)===0||xu(a,n)||(e=!0,r0(a,n));a=a.next}while(e);If=!1}}function xy(){c0()}function c0(){Ci=Wf=!1;var t=0;Ie!==0&&Cy()&&(t=Ie);for(var l=Al(),e=null,a=su;a!==null;){var u=a.next,n=f0(a,l);n===0?(a.next=null,e===null?su=u:e.next=u,u===null&&(ru=e)):(e=a,(t!==0||(n&3)!==0)&&(Ci=!0)),a=u}Kt!==0&&Kt!==5||tn(t),Ie!==0&&(Ie=0)}function f0(t,l){for(var e=t.suspendedLanes,a=t.pingedLanes,u=t.expirationTimes,n=t.pendingLanes&-62914561;0c)break;var p=s.transferSize,_=s.initiatorType;p&&g0(_)&&(s=s.responseEnd,i+=p*(sqi){K.length=R;break}b=new Promise(By.bind(b)),K.push(b)}}}if(0"u"?null:document;function G0(t,l,e){var a=du;if(a&&typeof l=="string"&&l){var u=wl(l);u='link[rel="'+t+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),w0.has(u)||(w0.add(u),t={rel:t,crossOrigin:e,href:l},a.querySelector(u)===null&&(l=a.createElement("link"),yl(l,"link",t),ul(l),a.head.appendChild(l)))}}function eh(t){Ae.D(t),G0("dns-prefetch",t,null)}function ah(t,l){Ae.C(t,l),G0("preconnect",t,l)}function uh(t,l,e){Ae.L(t,l,e);var a=du;if(a&&t&&l){var u='link[rel="preload"][as="'+wl(l)+'"]';l==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+wl(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+wl(e.imageSizes)+'"]')):u+='[href="'+wl(t)+'"]';var n=u;switch(l){case"style":n=mu(t);break;case"script":n=yu(t)}if(!(Jl.has(n)||(t=F({rel:"preload",href:l==="image"&&e&&e.imageSrcSet?void 0:t,as:l},e),Jl.set(n,t),a.querySelector(u)!==null||l==="style"&&a.querySelector(nn(n))||l==="script"&&a.querySelector(cn(n))))){var i=a.createElement("link");yl(i,"link",t),l==="style"&&(i[Nn]=!0,i.onload=i.onerror=function(){Is(i)}),ul(i),a.head.appendChild(i)}}}function nh(t,l){Ae.m(t,l);var e=du;if(e&&t){var a=l&&typeof l.as=="string"?l.as:"script",u='link[rel="modulepreload"][as="'+wl(a)+'"][href="'+wl(t)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=yu(t)}if(!Jl.has(n)&&(t=F({rel:"modulepreload",href:t},l),Jl.set(n,t),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(cn(n)))return}a=e.createElement("link"),yl(a,"link",t),ul(a),e.head.appendChild(a)}}}function ih(t,l,e){Ae.S(t,l,e);var a=du;if(a&&t){var u=Ca(a).hoistableStyles,n=mu(t);l=l||"default";var i=u.get(n);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(nn(n)))c.loading=5;else{t=F({rel:"stylesheet",href:t,"data-precedence":l},e),(e=Jl.get(n))&&xs(t,e);var s=i=a.createElement("link");ul(s),yl(s,"link",t),s._p=new Promise(function(g,p){s.onload=g,s.onerror=p}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Ri(i,l,a)}i={type:"stylesheet",instance:i,count:1,state:c},u.set(n,i)}}}function ch(t,l){Ae.X(t,l);var e=du;if(e&&t){var a=Ca(e).hoistableScripts,u=yu(t),n=a.get(u);n||(n=e.querySelector(cn(u)),n||(t=F({src:t,async:!0},l),(l=Jl.get(u))&&ps(t,l),n=e.createElement("script"),ul(n),yl(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function fh(t,l){Ae.M(t,l);var e=du;if(e&&t){var a=Ca(e).hoistableScripts,u=yu(t),n=a.get(u);n||(n=e.querySelector(cn(u)),n||(t=F({src:t,async:!0,type:"module"},l),(l=Jl.get(u))&&ps(t,l),n=e.createElement("script"),ul(n),yl(n,"link",t),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Q0(t,l,e,a){var u=(u=Me.current)?un(u):null;if(!u)throw Error(d(446));switch(t){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=mu(e.href),l=Ca(u).hoistableStyles,a=l.get(e),a||(a={type:"style",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){t=mu(e.href);var n=Ca(u).hoistableStyles,i=n.get(t);if(i||(u=u.ownerDocument||u,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(t,i),(n=u.querySelector(nn(t)))?n._p||(i.instance=n,i.state.loading=5):(n=Jl.get(t),n||(n={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},Jl.set(t,n)),sh(u,t,n,i.state))),l&&a===null)throw Error(d(528,""));return i}if(l&&a!==null)throw Error(d(529,""));return null;case"script":return l=e.async,e=e.src,typeof e=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(e=yu(e),l=Ca(u).hoistableScripts,a=l.get(e),a||(a={type:"script",instance:null,count:0,state:null},l.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,t))}}function mu(t){return'href="'+wl(t)+'"'}function nn(t){return'link[rel="stylesheet"]['+t+"]"}function X0(t){return F({},t,{"data-precedence":t.precedence,precedence:null})}function sh(t,l,e,a){if(l=t.querySelector('link[rel="preload"][as="style"]['+l+"]")){if(l[Nn]!==!0){a.loading=1;return}}else l=t.createElement("link"),l[Nn]=!0,l.onload=l.onerror=Is.bind(null,l),yl(l,"link",e),ul(l),t.head.appendChild(l);a.preload=l,l.addEventListener("load",function(){return a.loading|=1}),l.addEventListener("error",function(){return a.loading|=2})}function yu(t){return'[src="'+wl(t)+'"]'}function cn(t){return"script[async]"+t}function V0(t,l,e){if(l.count++,l.instance===null)switch(l.type){case"style":var a=t.querySelector('style[data-href~="'+wl(e.href)+'"]');if(a)return l.instance=a,ul(a),a;var u=F({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(t.ownerDocument||t).createElement("style"),ul(a),yl(a,"style",u),Ri(a,e.precedence,t),l.instance=a;case"stylesheet":u=mu(e.href);var n=t.querySelector(nn(u));if(n)return l.state.loading|=4,l.instance=n,ul(n),n;a=X0(e),(u=Jl.get(u))&&xs(a,u),n=(t.ownerDocument||t).createElement("link"),ul(n);var i=n;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),yl(n,"link",a),l.state.loading|=4,Ri(n,e.precedence,t),l.instance=n;case"script":return n=yu(e.src),(u=t.querySelector(cn(n)))?(l.instance=u,ul(u),u):(a=e,(u=Jl.get(n))&&(a=F({},e),ps(a,u)),t=t.ownerDocument||t,u=t.createElement("script"),ul(u),yl(u,"link",a),t.head.appendChild(u),l.instance=u);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(a=l.instance,l.state.loading|=4,Ri(a,e.precedence,t));return l.instance}function Ri(t,l,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,i=0;i title"):null)}function rh(t,l,e){if(e===1||l.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return t=l.disabled,typeof l.precedence=="string"&&t==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function L0(t,l){return t==="img"&&l.src!=null&&l.src!==""&&l.onLoad==null&&l.loading!=="lazy"}function K0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function J0(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function k0(t,l){typeof l.decode=="function"&&(t.imgCount++,l.complete||(t.imgBytes+=J0(l),t.suspenseyImages.push(l)),t=mh.bind(t),l.decode().then(t,t))}function oh(t,l,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=mu(a.href),n=l.querySelector(nn(u));if(n){l=n._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(t.count++,t=fn.bind(t),l.then(t,t)),e.state.loading|=4,e.instance=n,ul(n);return}n=l.ownerDocument||l,a=X0(a),(u=Jl.get(u))&&xs(a,u),n=n.createElement("link"),ul(n);var i=n;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),yl(n,"link",a),e.instance=n}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(e,l),(l=e.state.preload)&&(e.state.loading&3)===0&&(t.count++,e=fn.bind(t),l.addEventListener("load",e),l.addEventListener("error",e))}}var qi=0;function dh(t,l){return t.stylesheets&&t.count===0&&Yi(t,t.stylesheets),0qi?50:800)+l);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function $0(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Yi(t,t.stylesheets);else if(t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}}}function fn(){this.count--,$0(this)}function mh(){this.imgCount--,$0(this)}var Bi=null;function Yi(t,l){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Bi=new Map,l.forEach(yh,t),Bi=null,fn.call(t))}function yh(t,l){if(!(l.state.loading&4)){var e=Bi.get(t);if(e)var a=e.get(null);else{e=new Map,Bi.set(t,e);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(N){console.error(N)}}return r(),Ms.exports=Dh(),Ms.exports}var Rh=Uh();/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hh=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pm=(...r)=>r.filter((N,E,d)=>!!N&&N.trim()!==""&&d.indexOf(N)===E).join(" ").trim();/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var qh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bh=G.forwardRef(({color:r="currentColor",size:N=24,strokeWidth:E=2,absoluteStrokeWidth:d,className:M="",children:w,iconNode:j,...ut},W)=>G.createElement("svg",{ref:W,...qh,width:N,height:N,stroke:r,strokeWidth:d?Number(E)*24/Number(N):E,className:pm("lucide",M),...ut},[...j.map(([V,q])=>G.createElement(V,q)),...Array.isArray(w)?w:[w]]));/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ot=(r,N)=>{const E=G.forwardRef(({className:d,...M},w)=>G.createElement(Bh,{ref:w,iconNode:N,className:pm(`lucide-${Hh(r)}`,d),...M}));return E.displayName=`${r}`,E};/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yh=Ot("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wh=Ot("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sm=Ot("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gh=Ot("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qh=Ot("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xh=Ot("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vh=Ot("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zh=Ot("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lh=Ot("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Kh=Ot("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tm=Ot("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jh=Ot("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kh=Ot("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $h=Ot("ListVideo",[["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}],["path",{d:"m16 12 5 3-5 3v-6Z",key:"zpskkp"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fh=Ot("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wh=Ot("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ih=Ot("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Nm=Ot("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bs=Ot("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ph=Ot("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tv=Ot("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lv=Ot("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ev=Ot("ServerCog",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"m15.7 13.4-.9-.3",key:"1jwmzr"}],["path",{d:"m9.2 10.9-.9-.3",key:"qapnim"}],["path",{d:"m10.6 15.7.3-.9",key:"quwk0k"}],["path",{d:"m13.6 15.7-.4-1",key:"cb9xp7"}],["path",{d:"m10.8 9.3-.4-1",key:"1uaiz5"}],["path",{d:"m8.3 13.6 1-.4",key:"s6srou"}],["path",{d:"m14.7 10.8 1-.4",key:"4d31cq"}],["path",{d:"m13.4 8.3-.3.9",key:"1bm987"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const av=Ot("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uv=Ot("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nv=Ot("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iv=Ot("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Em=Ot("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cv=Ot("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fv=Ot("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.468.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sv=Ot("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zm(r){var N,E,d="";if(typeof r=="string"||typeof r=="number")d+=r;else if(typeof r=="object")if(Array.isArray(r)){var M=r.length;for(N=0;Nrv(r),kl="w-full rounded-lg border border-line bg-white px-3 py-2 text-[13px] text-slate-900 placeholder:text-slate-400 transition focus:border-brand-500 focus:outline-none focus:ring-3 focus:ring-brand-500/15 disabled:cursor-not-allowed disabled:bg-slate-50";function xm(r){if(!r)return"—";const N=Math.floor((Date.now()-r)/6e4);return N<1?"刚刚":N<60?`${N} 分钟前`:`${Math.floor(N/60)} 小时前`}function Rs(r=[]){return{total:r.length,studyable:r.filter(N=>N.in_study!==!1).length}}function yn(r){return String(r||"").split("#").filter(Boolean)}const ov={"01":"单选","02":"多选","03":"判断","04":"问答"};function me(r){return r instanceof Error?r.message:String(r)}const dv={neutral:"bg-slate-100 text-slate-600 ring-slate-200",brand:"bg-brand-50 text-brand-700 ring-brand-100",success:"bg-emerald-50 text-emerald-700 ring-emerald-100",warning:"bg-amber-50 text-amber-700 ring-amber-100",danger:"bg-red-50 text-red-700 ring-red-100",running:"bg-sky-50 text-sky-700 ring-sky-100"};function Hs({tone:r="neutral",children:N,dot:E=!1,className:d}){return f.jsxs("span",{className:gl("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium ring-1 ring-inset",dv[r],d),children:[E&&f.jsx("span",{className:"size-1.5 rounded-full bg-current opacity-70"}),N]})}const mv={primary:"border-brand-500 bg-brand-500 text-white shadow-sm shadow-brand-500/25 hover:border-brand-600 hover:bg-brand-600",secondary:"border-line bg-white text-slate-700 hover:border-slate-300 hover:bg-slate-50",ghost:"border-transparent bg-transparent text-slate-600 hover:bg-slate-100",danger:"border-transparent bg-transparent text-red-600 hover:bg-red-50",soft:"border-brand-100 bg-brand-50 text-brand-700 hover:border-brand-200 hover:bg-brand-100"},yv={sm:"h-8 gap-1.5 rounded-lg px-2.5 text-xs",md:"h-9 gap-1.5 rounded-lg px-3.5 text-[13px]",icon:"h-9 w-9 rounded-lg"};function Jt({variant:r="secondary",size:N="md",loading:E=!1,icon:d,className:M,children:w,disabled:j,type:ut="button",...W}){return f.jsxs("button",{type:ut,disabled:j||E,className:gl("inline-flex shrink-0 items-center justify-center border font-medium transition","focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-brand-500/20","disabled:cursor-not-allowed disabled:opacity-50",mv[r],yv[N],M),...W,children:[E?f.jsx(Fh,{className:"size-3.5 animate-spin"}):d,w]})}function hv(r,N){var w,j;const E=N==="login"||r.status==="logging"||((w=r.run)==null?void 0:w.status)==="logging"?"logging":((j=r.run)==null?void 0:j.status)||r.status||"idle",M={discovering:{label:"发现课程中",tone:"running",pulse:!0},studying:{label:"学习中",tone:"running",pulse:!0},finished:{label:"已完成",tone:"success"},stopped:{label:"已停止",tone:"warning"},error:{label:"出错",tone:"danger"},interrupted:{label:"已中断",tone:"warning"},logging:{label:"登录中",tone:"running",pulse:!0},logged_in:{label:"已登录",tone:"success"},login_failed:{label:"登录失败",tone:"danger"},idle:{label:"未登录",tone:"neutral"}}[E]||{label:E,tone:"neutral"};return{label:M.label,tone:M.tone,pulse:!!M.pulse}}function vv({account:r,course:N,disabled:E,onToggle:d}){var w;const M=(w=r.selected)==null?void 0:w.includes(N.plan_id);return f.jsxs("label",{className:gl("flex cursor-pointer items-start gap-2.5 rounded-lg border border-transparent px-2 py-1.5 transition","hover:border-line hover:bg-slate-50",E&&"pointer-events-none opacity-60"),children:[f.jsx("input",{type:"checkbox",className:"mt-0.5 size-3.5 shrink-0 accent-brand-500",checked:!!M,disabled:E,onChange:j=>d(N.plan_id,j.target.checked)}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12.5px] font-medium text-slate-700",children:N.name||N.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[11px] text-slate-400",children:[N.section,N.status_label,N.info].filter(Boolean).join(" · ")||"—"})]}),f.jsx("span",{className:"shrink-0 pt-0.5 text-[11px] tabular-nums text-slate-500",children:N.progress||""})]})}function gv({account:r,platformLabel:N,pending:E,openLog:d,logLines:M,onToggleLog:w,onLogin:j,onRefresh:ut,onStudy:W,onStop:V,onCapture:q,onStopCapture:S,onQuiz:Z,onDelete:rt,onToggleCourse:Xt,onSelectAll:et,onClearSelection:D,onToggleOption:dt}){var pt,B,at,it,wt,o,T,Y,Q,mt,st,vt,y,O,A,L;const[tt,Tt]=G.useState(!1),Ft=G.useRef(null),Mt=G.useRef(null),Ht=G.useRef(!0);G.useEffect(()=>{if(!tt)return;const U=J=>{var P;(P=Ft.current)!=null&&P.contains(J.target)||Tt(!1)};return document.addEventListener("pointerdown",U),()=>document.removeEventListener("pointerdown",U)},[tt]),G.useEffect(()=>{const U=Mt.current;U&&Ht.current&&(U.scrollTop=U.scrollHeight)},[M,d]);const F=hv(r,E),C=!!E||r.status==="logging"||((pt=r.run)==null?void 0:pt.status)==="logging",At=r.courses||[],zt=At.filter(U=>U.in_study!==!1),Nt=At.filter(U=>U.in_study===!1),Ct=Rs(At),Wt=((B=r.run)==null?void 0:B.done)||0,Lt=((at=r.run)==null?void 0:at.total)||0,Bt=Lt?Math.round(Wt/Lt*100):0,H=["discovering","studying"].includes(((it=r.run)==null?void 0:it.status)||""),k=((wt=r.selected)==null?void 0:wt.length)||0,I=k>0&&(((o=r.cookies)==null?void 0:o.length)||0)>0;return f.jsxs("article",{"data-id":r.id,className:"card-shadow flex min-w-0 flex-col rounded-2xl border border-line bg-white transition-colors hover:border-slate-300/80",children:[f.jsxs("header",{className:"flex items-start gap-3 px-4 pt-4",children:[f.jsxs("div",{className:"relative mt-0.5 grid size-10 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-50 to-sky-50 text-[13px] font-semibold text-brand-700 ring-1 ring-brand-100",children:[(r.user||r.username||"?").slice(0,1).toUpperCase(),f.jsx("span",{className:gl("absolute -bottom-0.5 -right-0.5 size-3 rounded-full border-2 border-white",F.tone==="success"?"bg-emerald-500":F.tone==="danger"?"bg-red-500":F.tone==="running"?"bg-sky-500":F.tone==="warning"?"bg-amber-500":"bg-slate-300",F.pulse&&"animate-pulse")})]}),f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h2",{className:"truncate text-[13.5px] font-semibold text-slate-900",children:r.user||r.username}),f.jsx(Hs,{tone:F.tone,dot:!0,children:F.label})]}),f.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"truncate",children:r.username}),r.note&&f.jsxs("span",{className:"truncate",children:["· ",r.note]}),f.jsxs("span",{children:["· ",xm(r.updated||r.loginAt)]})]})]}),f.jsx(Hs,{tone:"brand",className:"mt-0.5 shrink-0",children:N})]}),f.jsxs("div",{className:"px-4 pt-3",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"text-[11.5px] text-slate-500",children:["共 ",f.jsx("b",{className:"font-semibold text-slate-700",children:Ct.total})," 门 · 可学"," ",f.jsx("b",{className:"font-semibold text-slate-700",children:Ct.studyable}),Nt.length>0&&f.jsxs("span",{className:"text-slate-400",children:[" · 已完成 ",Nt.length]})]}),zt.length>0&&f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{type:"button",disabled:C,className:"rounded px-1.5 py-0.5 text-[11px] text-brand-600 transition hover:bg-brand-50 disabled:opacity-40",onClick:et,children:"全选"}),f.jsx("button",{type:"button",disabled:C||k===0,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100 disabled:opacity-40",onClick:D,children:"清空"})]})]}),f.jsx("div",{className:"scrollbar-thin mt-1.5 max-h-[196px] min-h-[70px] overflow-y-auto pr-0.5",children:At.length===0?f.jsx("div",{className:"grid min-h-[70px] place-items-center rounded-lg border border-dashed border-line text-[12px] text-slate-400",children:"还没有课程,先登录或刷新课程"}):f.jsxs(f.Fragment,{children:[zt.map(U=>f.jsx(vv,{account:r,course:U,disabled:C,onToggle:Xt},U.plan_id)),Nt.length>0&&f.jsx("div",{className:"mt-1 border-t border-dashed border-line pt-1",children:Nt.map(U=>f.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg px-2 py-1.5 text-slate-400",children:[f.jsx("span",{className:"mt-0.5 grid size-3.5 shrink-0 place-items-center rounded-full bg-emerald-50 text-[9px] text-emerald-600",children:"✓"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[12px]",children:U.name||U.plan_id}),f.jsx("span",{className:"mt-0.5 block truncate text-[10.5px] opacity-80",children:[U.section,U.info].filter(Boolean).join(" · ")})]}),f.jsx("span",{className:"shrink-0 text-[10.5px]",children:U.status_label||"已结束"})]},U.plan_id))})]})})]}),f.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 border-t border-line/70 px-4 py-2.5",children:[f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optQuiz===!0,disabled:C,onChange:U=>dt("quiz",U.target.checked)}),"自动交测验"]}),f.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-[11.5px] text-slate-600",children:[f.jsx("input",{type:"checkbox",className:"size-3.5 accent-brand-500",checked:r.optFeedback!==!1,disabled:C,onChange:U=>dt("feedback",U.target.checked)}),"自动交反馈表"]}),f.jsx("div",{className:"flex-1"}),f.jsx("span",{className:"text-[11px] tabular-nums text-slate-400",children:k>0?`已选 ${k} 门`:"未选择课程"})]}),f.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-line/70 px-4 py-2.5",children:[f.jsx(Jt,{size:"sm",variant:"soft",loading:E==="login"||r.status==="logging"||((T=r.run)==null?void 0:T.status)==="logging",disabled:C,icon:f.jsx(Wh,{className:"size-3.5"}),onClick:j,children:(Y=r.cookies)!=null&&Y.length?"重新登录":"登录"}),f.jsx(Jt,{size:"sm",loading:E==="refresh",disabled:C||!((Q=r.cookies)!=null&&Q.length),icon:f.jsx(Bs,{className:"size-3.5"}),onClick:ut,children:"刷新课程"}),f.jsx(Jt,{size:"sm",variant:"primary",loading:E==="study",disabled:C||!I,icon:f.jsx(Ih,{className:"size-3.5"}),onClick:W,children:"开始学习"}),f.jsx("div",{className:"flex-1"}),H&&f.jsx(Jt,{size:"icon",variant:"danger",loading:E==="stop",onClick:V,title:"停止学习","aria-label":"停止学习",children:f.jsx(Xh,{className:"size-4"})}),f.jsxs("div",{className:"relative",ref:Ft,children:[f.jsx(Jt,{size:"icon",variant:"ghost",onClick:()=>Tt(U=>!U),"aria-label":"更多操作",title:"更多操作",children:f.jsx(Lh,{className:"size-4"})}),tt&&f.jsx("div",{className:"absolute bottom-10 right-0 z-20 w-40 overflow-hidden rounded-xl border border-line bg-white py-1 shadow-xl shadow-slate-900/10",children:[{label:"课程日志",icon:$h,action:w},{label:"打开测验",icon:Vh,action:Z},(mt=r.run)!=null&&mt.capturing?{label:"停止抓包",icon:nv,action:S}:{label:"抓包 10 分钟",icon:cv,action:q},{label:"删除账号",icon:iv,action:rt,danger:!0}].map(U=>f.jsxs("button",{type:"button",className:gl("flex w-full items-center gap-2 px-3 py-2 text-left text-[12px] transition hover:bg-slate-50",U.danger?"text-red-600":"text-slate-700"),onClick:()=>{Tt(!1),U.action()},children:[f.jsx(U.icon,{className:"size-3.5 opacity-70"}),U.label]},U.label))})]})]}),(Lt>0||((st=r.run)==null?void 0:st.error))&&f.jsxs("div",{className:"border-t border-line/70 px-4 py-3",children:[f.jsxs("div",{className:"mb-1.5 flex items-center justify-between gap-2 text-[11px] text-slate-500",children:[f.jsx("span",{className:"truncate",children:((vt=r.run)==null?void 0:vt.course)||((y=r.run)==null?void 0:y.status)||"学习进度"}),f.jsxs("span",{className:"shrink-0 tabular-nums",children:[Wt," / ",Lt,Lt>0&&f.jsxs("span",{className:"ml-1 text-slate-400",children:["(",Bt,"%)"]})]})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-slate-100",children:f.jsx("div",{className:gl("h-full rounded-full transition-all duration-500",((O=r.run)==null?void 0:O.status)==="error"?"bg-red-500":((A=r.run)==null?void 0:A.status)==="finished"?"bg-emerald-500":"bg-gradient-to-r from-brand-500 to-sky-400"),style:{width:`${Math.min(100,Bt)}%`}})}),((L=r.run)==null?void 0:L.error)&&f.jsx("p",{className:"mt-2 rounded-lg bg-red-50 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:r.run.error})]}),r.lastError&&f.jsx("div",{className:"border-t border-line/70 px-4 py-2.5",children:f.jsxs("p",{className:"rounded-lg bg-red-50/80 px-2.5 py-1.5 text-[11px] leading-relaxed text-red-700",children:[r.lastError,r.lastErrorAt?f.jsxs("span",{className:"ml-1 text-red-400",children:["· ",xm(r.lastErrorAt)]}):null]})}),f.jsxs("div",{className:gl("border-t border-line/70",d?"block":"hidden"),children:[f.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2.5 text-[11px] text-slate-400",children:[f.jsx("span",{className:"font-medium text-slate-500",children:"课程日志"}),f.jsxs("span",{className:"tabular-nums",children:["(",M.length,")"]}),f.jsx("div",{className:"flex-1"}),f.jsx("button",{type:"button",onClick:w,className:"rounded px-1.5 py-0.5 text-[11px] text-slate-500 transition hover:bg-slate-100",children:"收起"})]}),f.jsx("pre",{ref:Mt,onScroll:U=>{const J=U.currentTarget;Ht.current=J.scrollHeight-J.scrollTop-J.clientHeight<24},className:gl("scrollbar-thin mx-4 mb-3 mt-2 max-h-56 overflow-auto rounded-lg bg-slate-950/95 p-3","font-mono text-[11px] leading-relaxed text-slate-300",M.length===0&&"text-slate-500"),children:M.length?M.join(` -`):"暂无日志 · 开始学习后这里会实时显示"})]}),f.jsxs("button",{type:"button",onClick:w,className:"flex items-center justify-center gap-1 border-t border-line/70 py-1.5 text-[10.5px] text-slate-400 transition hover:bg-slate-50 hover:text-slate-600","aria-expanded":d,children:[f.jsx(Sm,{className:gl("size-3 transition-transform",d&&"rotate-180")}),d?"收起课程日志":"展开课程日志"]})]})}const bv={md:"max-w-xl",lg:"max-w-3xl",xl:"max-w-6xl"};function Ki({open:r,onClose:N,title:E,subtitle:d,size:M="md",footer:w,children:j,bodyClassName:ut}){return G.useEffect(()=>{if(!r)return;const W=q=>{q.key==="Escape"&&N()};window.addEventListener("keydown",W);const V=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",W),document.body.style.overflow=V}},[r,N]),r?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("div",{className:"absolute inset-0 bg-slate-900/40 backdrop-blur-[2px]",onClick:N}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:gl("relative flex max-h-[calc(100vh-2rem)] w-full flex-col overflow-hidden rounded-2xl","border border-line bg-white shadow-2xl shadow-slate-900/20",bv[M]),children:[f.jsxs("header",{className:"flex items-start gap-3 border-b border-line px-5 py-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("h2",{className:"truncate text-[15px] font-semibold text-slate-900",children:E}),d&&f.jsx("p",{className:"mt-0.5 truncate text-xs text-slate-500",children:d})]}),f.jsx("button",{type:"button",onClick:N,className:"-mr-1 rounded-lg p-1.5 text-slate-400 transition hover:bg-slate-100 hover:text-slate-600","aria-label":"关闭",children:f.jsx(sv,{className:"size-4"})})]}),f.jsx("div",{className:gl("min-h-0 flex-1 overflow-auto px-5 py-4",ut),children:j}),w&&f.jsx("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line bg-slate-50/70 px-5 py-3",children:w})]})]}):null}function xv({open:r,platforms:N,onClose:E,onSubmit:d}){var dt;const[M,w]=G.useState(""),[j,ut]=G.useState(""),[W,V]=G.useState(""),[q,S]=G.useState(((dt=N[0])==null?void 0:dt.id)||"guanyixue"),[Z,rt]=G.useState(!1),[Xt,et]=G.useState("");G.useEffect(()=>{var tt;r&&(w(""),ut(""),V(""),S(((tt=N[0])==null?void 0:tt.id)||"guanyixue"),et(""),rt(!1))},[r,N]);async function D(){if(!M.trim()||!j){et("请填写账号和密码");return}rt(!0),et("");try{await d({username:M.trim(),password:j,note:W.trim(),platform:q}),E()}catch(tt){et(tt instanceof Error?tt.message:String(tt))}finally{rt(!1)}}return f.jsx(Ki,{open:r,onClose:E,title:"添加账号",subtitle:"账号密码保存在本机 SQLite,用于会话失效时自动重新登录",footer:f.jsxs(f.Fragment,{children:[f.jsx(Jt,{onClick:E,disabled:Z,children:"取消"}),f.jsx(Jt,{variant:"primary",loading:Z,onClick:D,children:"保存并登录"})]}),children:f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"学习平台"}),f.jsxs("div",{className:"relative",children:[f.jsx(Tm,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("select",{className:`${kl} appearance-none pl-8 pr-8`,value:q,onChange:tt=>S(tt.target.value),children:N.map(tt=>f.jsx("option",{value:tt.id,children:tt.label},tt.id))}),f.jsx(Sm,{className:"pointer-events-none absolute right-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"})]}),f.jsx("p",{className:"mt-1.5 text-[11px] leading-relaxed text-slate-400",children:"选「莞易学」后,后台会自动识别旧版 / 新版课程页并按对应实现学习;后续新增的平台会出现在这里。"})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"登录账号"}),f.jsx("input",{className:kl,value:M,autoFocus:!0,placeholder:"手机号 / 身份证号 / 教师账号",onChange:tt=>w(tt.target.value),onKeyDown:tt=>tt.key==="Enter"&&D()})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:"密码"}),f.jsx("input",{className:kl,type:"password",value:j,autoComplete:"off",placeholder:"平台登录密码",onChange:tt=>ut(tt.target.value),onKeyDown:tt=>tt.key==="Enter"&&D()})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] font-medium text-slate-600",children:["备注 ",f.jsx("span",{className:"font-normal text-slate-400",children:"(可选)"})]}),f.jsx("input",{className:kl,value:W,placeholder:"例如:张三 · 语文",onChange:tt=>V(tt.target.value)})]}),f.jsx("p",{className:"rounded-lg border border-line bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:"保存后会自动尝试登录一次。若密码错误或需要验证码,卡片上会保留「登录」按钮,可手动重试。"}),Xt&&f.jsx("p",{className:"rounded-lg bg-red-50 px-3 py-2 text-[12px] text-red-700",children:Xt})]})})}class je extends Error{constructor(E,d={}){super(E);Li(this,"offline",!1);Li(this,"status");Li(this,"code");this.name="ApiError",Object.assign(this,d)}}async function Zt(r,N={}){let E;try{E=await fetch(r,{...N,headers:{"Content-Type":"application/json",...N.headers||{}}})}catch{throw new je("后端未连接",{offline:!0})}if(E.status===401)throw new je("需要访问令牌:请用 /?token= 打开一次",{status:401});if(!E.ok)throw new je(`HTTP ${E.status}`,{status:E.status});return await E.json()}async function pv(r,N,E){let d;try{d=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)})}catch{throw new je("后端未连接",{offline:!0})}if(d.status===401)throw new je("需要访问令牌:请用 /?token= 打开一次");if(!d.ok)throw new je(`HTTP ${d.status}`);if(!d.body)throw new je("浏览器不支持流式响应");const M=d.body.getReader(),w=new TextDecoder;let j="";for(;;){const{value:ut,done:W}=await M.read();if(W)break;j+=w.decode(ut,{stream:!0});const V=j.split(` - -`);j=V.pop()||"";for(const q of V){const S=q.trim();if(S.startsWith("data:"))try{E(JSON.parse(S.slice(5).trim()))}catch{}}}}function Sv(r){const N=String((r==null?void 0:r.text)||"").replace(/\s+/g," ").trim();return N.length>24?`${N.slice(0,24)}…`:N}function Tv({open:r,account:N,course:E,onClose:d,notify:M,onSubmitted:w}){const[j,ut]=G.useState(null),[W,V]=G.useState({}),[q,S]=G.useState(!1),[Z,rt]=G.useState(!1),[Xt,et]=G.useState(!1),[D,dt]=G.useState(!1),[tt,Tt]=G.useState(""),[Ft,Mt]=G.useState("info"),Ht=G.useRef(0);async function F(B=!1){if(!N||!E)return!1;S(!0),Tt(B?"正在生成新答卷…":"取题中…"),Mt("info");try{const at={cookies:N.cookies,platform:N.platform||"guanyixue",plan_id:E.plan_id,project_id:E.project_id,name:E.name||""};B&&(at.retake=!0,at.period_id=(j==null?void 0:j.period_id)||"");const it=await Zt("/api/quiz",{method:"POST",body:JSON.stringify(at)});if(!it.ok)return ut(null),Tt(it.error||"取题失败"),Mt("error"),!1;ut(it),V(Object.fromEntries((it.questions||[]).map(o=>[o.no,o.picked||""])));const wt=[];if(it.done){const o=it.surplus_exam_count;o!=null?wt.push(`剩 ${o} 次`):it.allow_exam_count&&wt.push(`共 ${it.allow_exam_count} 次`),it.show_answers?wt.push("已显示标准答案"):it.exam_after_watch_answer==="0"&&wt.push("本测验不开放答案"),Tt(`已交卷${wt.length?` · ${wt.join(" · ")}`:""}`),Mt("success")}else Tt(it.started?"已自动创建答卷(限时考试已开始计时)":""),Mt("info");return!0}catch(at){return Tt(at instanceof Error?at.message:"取题失败"),Mt("error"),!1}finally{S(!1)}}if(G.useEffect(()=>{!r||!N||!E||(ut(null),V({}),dt(!1),F(!1))},[r,N==null?void 0:N.id,E==null?void 0:E.plan_id]),!N||!E)return null;const C=(j==null?void 0:j.questions)||[],At=!!(j!=null&&j.done),zt=!!(j!=null&&j.show_answers),Nt=!!(j!=null&&j.can_retake),Ct=j==null?void 0:j.surplus_exam_count,Wt=At||q||Z||D;function Lt(B,at){V(it=>({...it,[B]:at}))}function Bt(B,at,it){V(wt=>{const o=yn(wt[B]),T=it?[...o,at]:o.filter(Y=>Y!==at);return T.sort(),{...wt,[B]:T.join("#")}})}async function H(){if(!j||!N)return;const B=C.filter(at=>!W[at.no]).length;if(!(B&&!window.confirm(`还有 ${B} 题没作答,确定提交?`))){rt(!0),Tt("提交中…"),Mt("info");try{const at=await Zt("/api/quiz/submit",{method:"POST",body:JSON.stringify({cookies:N.cookies,plan_id:j.plan_id,object_id:j.object_id,generation:j.generation||"legacy",result_id:j.result_id||"",answers:W})});if(!at.ok){at.code==="already_finished"&&await F(),Tt(at.error||"提交失败"),Mt("error");return}M({message:`测验已提交${at.score?`,得分 ${at.score}`:""}`,tone:"success"}),await F(),w()}catch(at){Tt(at instanceof Error?at.message:"提交失败"),Mt("error")}finally{rt(!1)}}}async function k(){if(!j)return;if(!j.can_retake){M({message:"没有剩余考试机会",tone:"error"});return}const B=Ct!=null?`(剩余 ${Ct} 次)`:"";if(window.confirm(`再考一次会消耗 1 次机会${B};限时考试会立即开始计时,确定?`)){et(!0);try{await F(!0)&&M({message:"已生成新答卷,可以重新答题了",tone:"success"})}finally{et(!1)}}}async function I(){if(!j||!N)return;if(j.done){M({message:"已交卷,点「再考一次」生成新答卷后再 AI 答题",tone:"error"});return}dt(!0),Ht.current=0;const B=Date.now();let at=0,it="";const wt=window.setInterval(()=>{Tt(`AI 答题中… ${Math.round((Date.now()-B)/1e3)}s · 已填 ${Ht.current}/${C.length} 题`),Mt("info")},1e3);Tt(`AI 答题中… 已填 0/${C.length} 题`);try{await pv("/api/quiz/answer",{questions:j.questions,account_id:N.id},o=>{const T=o.answers;if(T&&typeof T=="object"){const Y=Object.keys(T).length;Y&&(Ht.current+=Y,V(Q=>({...Q,...T})))}o.error&&(it=String(o.error)),o.done&&typeof o.failed=="number"&&(at=o.failed)}),Ht.current?at?(Tt(`AI 已填 ${Ht.current} 题,${at} 题失败${it?`:${it}`:""}`),Mt("error")):(Tt(`AI 已填 ${Ht.current} 题`),Mt("success")):(Tt(it?`AI 答题失败:${it}`:"AI 没有返回答案"),Mt("error"))}catch(o){Tt(o instanceof Error?o.message:"AI 答题失败"),Mt("error")}finally{window.clearInterval(wt),dt(!1)}}const pt=Nt?`再考一次${Ct!=null?`(剩 ${Ct} 次)`:""}`:Ct===0?"考试机会已用完":"再考一次";return f.jsx(Ki,{open:r,onClose:d,title:`测验 · ${E.name||E.plan_id}`,subtitle:tt||"取题后可手动作答,或让大模型逐批填写",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsx("span",{className:gl("mr-auto max-w-[50%] truncate text-[11.5px]",Ft==="error"?"text-red-600":Ft==="success"?"text-emerald-600":"text-slate-500"),children:tt}),At&&f.jsx(Jt,{size:"sm",loading:Xt,disabled:q||!Nt,icon:f.jsx(Ph,{className:"size-3.5"}),onClick:k,children:pt}),f.jsx(Jt,{size:"sm",onClick:d,children:"关闭"}),f.jsx(Jt,{size:"sm",variant:"soft",loading:D,disabled:Wt||!C.length,icon:f.jsx(wh,{className:"size-3.5"}),onClick:I,children:"AI 答题"}),f.jsx(Jt,{size:"sm",variant:"primary",loading:Z,disabled:Wt||!C.length,icon:f.jsx(lv,{className:"size-3.5"}),onClick:H,children:"提交"})]}),children:q&&!C.length?f.jsx("div",{className:"py-16 text-center text-[13px] text-slate-400",children:"正在打开课程页取题…"}):C.length?f.jsx("div",{className:"space-y-2.5",children:C.map(B=>{const at=B.options||[],it=W[B.no]||"",wt=B.type==="02",o=at.length>0;return f.jsxs("div",{className:"rounded-xl border border-line px-3.5 py-3",children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"mt-0.5 grid size-5 shrink-0 place-items-center rounded-md bg-slate-100 text-[10.5px] font-semibold tabular-nums text-slate-500",children:B.no}),f.jsx(Hs,{tone:"neutral",className:"mt-0.5 shrink-0",children:ov[B.type||""]||"题目"}),f.jsx("p",{className:"min-w-0 flex-1 text-[13px] leading-relaxed text-slate-800",children:B.title||`第 ${B.no} 题`}),zt&&B.is_correct!==void 0&&f.jsx("span",{className:gl("shrink-0 text-[12px] font-semibold",B.is_correct?"text-emerald-600":"text-red-500"),children:B.is_correct?"✓":"✗"})]}),o&&f.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5 pl-7",children:at.map(T=>{const Y=zt&&yn(B.correct).includes(T.key),Q=zt&&yn(B.picked).includes(T.key)&&!yn(B.correct).includes(T.key);return f.jsxs("span",{className:gl("max-w-full rounded-lg border px-2 py-1 text-[11.5px] leading-snug",Y?"border-emerald-200 bg-emerald-50 text-emerald-800":Q?"border-red-200 bg-red-50 text-red-700":"border-line bg-slate-50/70 text-slate-600"),children:[f.jsx("b",{className:"mr-1 font-semibold",children:T.key}),Sv(T)]},T.key)})}),f.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-2 pl-7",children:[wt?f.jsx("div",{className:"flex flex-wrap gap-1.5",children:at.map(T=>{const Y=yn(it);return f.jsxs("label",{title:`${T.key}. ${T.text||""}`,className:gl("flex cursor-pointer items-center gap-1 rounded-lg border px-2 py-1 text-[11.5px] transition",Y.includes(T.key)?"border-brand-300 bg-brand-50 text-brand-700":"border-line text-slate-600 hover:border-slate-300",Wt&&"pointer-events-none opacity-60"),children:[f.jsx("input",{type:"checkbox",className:"size-3 accent-brand-500",checked:Y.includes(T.key),disabled:Wt,onChange:Q=>Bt(B.no,T.key,Q.target.checked)}),T.key]},T.key)})}):o?f.jsxs("select",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:it,disabled:Wt,onChange:T=>Lt(B.no,T.target.value),children:[f.jsx("option",{value:"",children:"未选"}),at.map(T=>f.jsxs("option",{value:T.key,children:[T.key,". ",T.text||""]},T.key))]}):f.jsx("input",{className:"h-8 w-full max-w-[320px] rounded-lg border border-line bg-white px-2 text-[12px] text-slate-700 focus:border-brand-500 focus:outline-none disabled:bg-slate-50 disabled:text-slate-400",value:it,placeholder:"填写答案",disabled:Wt,onChange:T=>Lt(B.no,T.target.value)}),zt&&B.correct&&f.jsxs("span",{className:"text-[11.5px] text-slate-500",children:["标准答案:",f.jsx("b",{className:"font-semibold text-slate-700",children:B.correct})]})]}),zt&&B.analysis&&f.jsxs("p",{className:"mt-2 rounded-lg bg-slate-50 px-2.5 py-1.5 text-[11.5px] leading-relaxed text-slate-500",children:["解析:",B.analysis]})]},B.no)})}):f.jsx("div",{className:"py-16 text-center text-[13px] text-red-600",children:tt||"没有题目"})})}function Nv({open:r,onClose:N,notify:E}){const[d,M]=G.useState(!1),[w,j]=G.useState(!1),[ut,W]=G.useState(!1),[V,q]=G.useState({base_url:"",api_key:"",model:"",temperature:"0.2",timeout:"120",prompt:"",study_mode:"fast",study_parallel:"2"}),[S,Z]=G.useState("sk-...");G.useEffect(()=>{r&&(M(!0),Zt("/api/settings").then(D=>{const dt=D.llm||{},tt=D.study||{};q({base_url:dt.base_url||"",api_key:"",model:dt.model||"",temperature:String(dt.temperature??.2),timeout:String(dt.timeout??120),prompt:dt.prompt||"",study_mode:tt.mode||"fast",study_parallel:String(tt.parallel||2)}),Z(dt.has_key?`已保存 ${dt.key_hint||""},留空不修改`:"sk-...")}).catch(D=>E({message:`读取设置失败:${D.message}`,tone:"error"})).finally(()=>M(!1)))},[r,E]);function rt(D,dt){q(tt=>({...tt,[D]:dt}))}async function Xt(){j(!0);try{await Zt("/api/settings",{method:"POST",body:JSON.stringify({base_url:V.base_url.trim(),api_key:V.api_key.trim(),model:V.model.trim(),temperature:Number.parseFloat(V.temperature)||.2,timeout:Number.parseInt(V.timeout,10)||120,prompt:V.prompt,study_mode:V.study_mode,study_parallel:Number.parseInt(V.study_parallel,10)||0})}),E({message:"设置已保存",tone:"success"}),N()}catch(D){E({message:`保存失败:${D instanceof Error?D.message:D}`,tone:"error"})}finally{j(!1)}}async function et(){W(!0);try{const D=await Zt("/api/llm/test",{method:"POST",body:JSON.stringify({base_url:V.base_url.trim(),api_key:V.api_key.trim(),model:V.model.trim()})});E({message:D.ok?`连接正常(${D.ms} ms):${D.reply||""}`:`连接失败:${D.error||"未知错误"}`,tone:D.ok?"success":"error"})}catch(D){E({message:`连接失败:${D instanceof Error?D.message:D}`,tone:"error"})}finally{W(!1)}}return f.jsx(Ki,{open:r,onClose:N,title:"系统设置",subtitle:"大模型接口、答题提示词与学习模式",size:"lg",footer:f.jsxs(f.Fragment,{children:[f.jsx(Jt,{loading:ut,onClick:et,icon:f.jsx(Zh,{className:"size-3.5"}),children:"测试连接"}),f.jsx(Jt,{onClick:N,disabled:w,children:"取消"}),f.jsx(Jt,{variant:"primary",loading:w,onClick:Xt,disabled:d,children:"保存"})]}),children:d?f.jsx("div",{className:"py-10 text-center text-[12.5px] text-slate-400",children:"读取设置…"}):f.jsxs("div",{className:"space-y-6",children:[f.jsxs("section",{children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(ev,{className:"size-4 text-brand-500"}),"大模型(OpenAI 兼容)"]}),f.jsxs("div",{className:"space-y-3",children:[f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["接口地址 ",f.jsx("span",{className:"text-slate-400",children:"(写到 /v1 为止)"})]}),f.jsx("input",{className:kl,value:V.base_url,placeholder:"https://api.openai.com/v1",onChange:D=>rt("base_url",D.target.value)})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"API Key"}),f.jsxs("div",{className:"relative",children:[f.jsx(kh,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-slate-400"}),f.jsx("input",{className:`${kl} pl-8`,type:"password",autoComplete:"off",value:V.api_key,placeholder:S,onChange:D=>rt("api_key",D.target.value)})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模型"}),f.jsx("input",{className:kl,value:V.model,placeholder:"gpt-4o-mini / deepseek-chat / qwen-plus",onChange:D=>rt("model",D.target.value)})]})]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"温度"}),f.jsx("input",{className:kl,type:"number",min:0,max:2,step:.1,value:V.temperature,onChange:D=>rt("temperature",D.target.value)})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"超时(秒)"}),f.jsx("input",{className:kl,type:"number",min:10,max:600,value:V.timeout,onChange:D=>rt("timeout",D.target.value)})]})]}),f.jsxs("div",{children:[f.jsxs("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:["答题提示词 ",f.jsx("span",{className:"text-slate-400",children:"(留空使用内置)"})]}),f.jsx("textarea",{className:`${kl} min-h-24 resize-y`,value:V.prompt,placeholder:'只输出 JSON {"answers":{"题号":"答案"}}',onChange:D=>rt("prompt",D.target.value)})]})]})]}),f.jsxs("section",{className:"border-t border-line pt-5",children:[f.jsxs("div",{className:"mb-3 flex items-center gap-2 text-[12.5px] font-semibold text-slate-700",children:[f.jsx(Kh,{className:"size-4 text-brand-500"}),"学习模式"]}),f.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"模式"}),f.jsxs("select",{className:kl,value:V.study_mode,onChange:D=>rt("study_mode",D.target.value),children:[f.jsx("option",{value:"fast",children:"快速学习(只调接口上报)"}),f.jsx("option",{value:"normal",children:"常规学习(真实播放视频)"})]})]}),f.jsxs("div",{children:[f.jsx("label",{className:"mb-1.5 block text-[12px] text-slate-600",children:"常规模式并发数"}),f.jsx("input",{className:kl,type:"number",min:1,max:5,value:V.study_parallel,onChange:D=>rt("study_parallel",D.target.value)})]})]}),f.jsxs("p",{className:"mt-3 rounded-lg bg-slate-50 px-3 py-2 text-[11.5px] leading-relaxed text-slate-500",children:["常规学习会开多个无头浏览器同时播视频;平台若按课节顺序放行,会被弹回并自动降为 1 路。快速学习只调用 ",f.jsx("code",{className:"rounded bg-white px-1 ring-1 ring-line",children:"period/study/log"}),",不启动浏览器。"]})]})]})})}function Ev({accounts:r}){const N=r.filter(j=>{var ut;return((ut=j.cookies)==null?void 0:ut.length)>0||["logged_in","studying"].includes(j.status||"")}).length,E=r.filter(j=>{var ut;return["discovering","studying"].includes(((ut=j.run)==null?void 0:ut.status)||"")}).length,d=r.reduce((j,ut)=>{var W;return j+(((W=ut.run)==null?void 0:W.done)||0)},0),M=r.reduce((j,ut)=>{var W;return j+(((W=ut.run)==null?void 0:W.total)||0)},0),w=[{label:"账号",value:r.length,hint:"已添加",icon:Em,tone:"text-brand-600 bg-brand-50"},{label:"已登录",value:N,hint:r.length?`共 ${r.length} 个`:"等待添加",icon:uv,tone:"text-emerald-600 bg-emerald-50"},{label:"学习中",value:E,hint:E?"正在跑课":"空闲",icon:Yh,tone:"text-sky-600 bg-sky-50"},{label:"课程进度",value:M?`${d}/${M}`:"—",hint:M?`${Math.round(d/M*100)}%`:"暂无任务",icon:Tm,tone:"text-amber-600 bg-amber-50"}];return f.jsx("section",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:w.map(j=>f.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-line bg-white px-4 py-3",children:[f.jsx("span",{className:`grid size-9 shrink-0 place-items-center rounded-lg ${j.tone}`,children:f.jsx(j.icon,{className:"size-4"})}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("div",{className:"text-[11px] text-slate-400",children:j.label}),f.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f.jsx("span",{className:"text-[17px] font-semibold tabular-nums leading-tight text-slate-900",children:j.value}),f.jsx("span",{className:"truncate text-[10.5px] text-slate-400",children:j.hint})]})]})]},j.label))})}function zv({open:r,onClose:N}){const[E,d]=G.useState([]),[M,w]=G.useState(!1),j=G.useRef(null),ut=G.useRef(!0);G.useEffect(()=>{if(!r)return;let V=!0;const q=async()=>{try{const Z=await Zt("/api/log/history?key=system&tail=500");V&&d(Z.lines||[])}catch{}};d([]),q();const S=window.setInterval(()=>{document.hidden||q()},2500);return()=>{V=!1,window.clearInterval(S)}},[r]),G.useEffect(()=>{const V=j.current;V&&ut.current&&(V.scrollTop=V.scrollHeight)},[E,r]);async function W(){w(!0);try{await Zt("/api/log/history?key=system",{method:"DELETE"}),d([])}finally{w(!1)}}return f.jsx(Ki,{open:r,onClose:N,title:"系统日志",subtitle:"全局事件与系统级错误,实时刷新",size:"xl",footer:f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:"mr-auto text-[11px] text-slate-400",children:["共 ",E.length," 行 · 保留最近 500 行"]}),f.jsx(Jt,{variant:"danger",size:"sm",loading:M,onClick:W,children:"清空"}),f.jsx(Jt,{size:"sm",onClick:N,children:"关闭"})]}),bodyClassName:"bg-slate-950 p-0",children:f.jsx("pre",{ref:j,onScroll:V=>{const q=V.currentTarget;ut.current=q.scrollHeight-q.scrollTop-q.clientHeight<24},className:"scrollbar-thin h-[60vh] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-[11.5px] leading-relaxed text-slate-300",children:E.length?E.join(` -`):"暂无系统日志"})})}function _v({toast:r}){if(!r)return null;const N=r.tone||"info",E=N==="error"?Gh:N==="success"?Qh:Jh;return f.jsxs("div",{role:"status",className:gl("animate-toast-in fixed bottom-7 left-1/2 z-[60] flex max-w-[85vw] -translate-x-1/2 items-center gap-2","rounded-xl px-4 py-2.5 text-[12.5px] font-medium shadow-xl shadow-slate-900/20",N==="error"?"bg-red-600 text-white":N==="success"?"bg-emerald-600 text-white":"bg-slate-900 text-white"),children:[f.jsx(E,{className:"size-4 shrink-0 opacity-90"}),f.jsx("span",{className:"break-words",children:r.message})]})}function Ov({refreshing:r,onRefresh:N,onSettings:E,onSystemLog:d,onAdd:M}){return f.jsx("header",{className:"sticky top-0 z-30 border-b border-line/80 bg-white/85 backdrop-blur-xl",children:f.jsxs("div",{className:"mx-auto flex h-16 max-w-[1320px] items-center gap-3 px-4 sm:px-6",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx("div",{className:"grid size-9 shrink-0 place-items-center rounded-xl bg-gradient-to-br from-brand-500 to-sky-400 text-[15px] font-bold text-white shadow-md shadow-brand-500/30",children:"学"}),f.jsxs("div",{className:"min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h1",{className:"truncate text-[15px] font-semibold tracking-tight text-slate-900",children:"莞易学"}),f.jsx("span",{className:"hidden rounded-md bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500 sm:inline",children:"多账号学习控制台"})]}),f.jsx("p",{className:"truncate text-[11.5px] text-slate-500",children:"东莞市教师培训平台 · 新旧版课程自动识别"})]})]}),f.jsx("div",{className:"flex-1"}),f.jsxs("div",{className:"flex items-center gap-1.5",children:[f.jsx(Jt,{variant:"ghost",size:"icon",onClick:N,loading:r,title:"刷新列表","aria-label":"刷新列表",children:f.jsx(Bs,{className:"size-4"})}),f.jsx(Jt,{variant:"ghost",size:"icon",onClick:d,title:"系统日志","aria-label":"系统日志",children:f.jsx(tv,{className:"size-4"})}),f.jsx(Jt,{variant:"ghost",size:"icon",onClick:E,title:"系统设置","aria-label":"系统设置",children:f.jsx(av,{className:"size-4"})}),f.jsx(Jt,{variant:"primary",className:"ml-1",icon:f.jsx(Nm,{className:"size-4"}),onClick:M,children:f.jsx("span",{className:"hidden sm:inline",children:"添加账号"})})]})]})})}const _m="guanyixue.inlineLogsOpen";function Av(){try{const r=JSON.parse(localStorage.getItem(_m)||"[]");return new Set(Array.isArray(r)?r.filter(N=>typeof N=="string"):[])}catch{return new Set}}function jv(r){try{localStorage.setItem(_m,JSON.stringify([...r]))}catch{}}function Mv(r){return{id:r.id,username:r.username,platform:r.platform||"guanyixue",note:r.note||"",user:r.user||"",cookies:r.cookies||[],courses:r.courses||[],selected:r.selected||[],status:r.status||"idle",lastError:r.lastError||"",lastErrorAt:r.lastErrorAt||0,optQuiz:r.optQuiz===!0,optFeedback:r.optFeedback!==!1,loginAt:r.loginAt||0}}function Cv(){const[r,N]=G.useState([]),E=G.useRef(r),[d,M]=G.useState({guanyixue:"莞易学"}),[w,j]=G.useState([{id:"guanyixue",label:"莞易学"}]),[ut,W]=G.useState(!1),[V,q]=G.useState(null),[S,Z]=G.useState({}),[rt,Xt]=G.useState(!1),[et,D]=G.useState(null),[dt,tt]=G.useState(()=>Av()),Tt=G.useRef(dt),[Ft,Mt]=G.useState({}),Ht=G.useRef(Ft),F=G.useRef(void 0);G.useEffect(()=>{E.current=r},[r]),G.useEffect(()=>{Ht.current=Ft},[Ft]),G.useEffect(()=>{Tt.current=dt,jv(dt)},[dt]),G.useEffect(()=>()=>window.clearTimeout(F.current),[]);const C=G.useCallback(y=>{q(y),window.clearTimeout(F.current),F.current=window.setTimeout(()=>q(null),3800)},[]),At=G.useCallback(async y=>{const O=await Zt("/api/accounts",{method:"POST",body:JSON.stringify(Mv(y))});if(O.ok===!1)throw new Error(O.error||"保存失败");return O},[]),zt=G.useCallback(y=>{N(O=>{const L=O.some(U=>U.id===y.id)?O.map(U=>U.id===y.id?y:U):[...O,y];return E.current=L,L})},[]),Nt=G.useCallback(async(y=!0)=>{var O;try{const[A,L]=await Promise.all([Zt("/api/runs"),Zt("/api/accounts")]),U=(L.accounts||[]).map(J=>({...J,run:A[J.id]||null})).sort((J,P)=>(J.created||0)-(P.created||0));N(U),E.current=U,W(!1);for(const J of U){const P=(O=J.run)==null?void 0:O.cookies;if(P&&P.length&&JSON.stringify(P)!==JSON.stringify(J.cookies||[])){const gt={...J,cookies:P};J.cookies=P,At(gt).catch(()=>{})}}}catch(A){A instanceof je&&A.offline?W(!0):y||C({message:`读取账号失败:${me(A)}`,tone:"error"})}},[C,At]);G.useEffect(()=>{Nt();const y=window.setInterval(()=>{document.hidden||Nt()},5e3);return()=>window.clearInterval(y)},[Nt]),G.useEffect(()=>{Zt("/api/platforms").then(y=>{const O=y.platforms||[];if(!O.length)return;j(O);const A={};for(const L of O)A[L.id]=L.label;M(A)}).catch(()=>{})},[]);const Ct=G.useCallback(async y=>{var U;const O=Ht.current[y]||{lines:[],since:0,busy:!1,historyTried:!1};if(O.busy)return;const A={...O,busy:!0},L=J=>{Ht.current={...Ht.current,[y]:J},Mt(P=>({...P,[y]:J}))};L(A);try{let J=await Zt(`/api/log?key=${encodeURIComponent(y)}&since=${A.since}`);typeof J.next=="number"&&J.nextle.id===y);if(fl&&JSON.stringify(fl.cookies||[])!==JSON.stringify(gt)){const le={...fl,cookies:gt};zt(le),At(le).catch(()=>{})}}}catch{}finally{A.busy=!1,L(A)}},[zt,At]);G.useEffect(()=>{const y=window.setInterval(()=>{document.hidden||Tt.current.forEach(O=>void Ct(O))},1500);return()=>window.clearInterval(y)},[Ct]);const Wt=G.useCallback((y,O)=>{const A=O===void 0?!Tt.current.has(y):O,L=new Set(Tt.current);A?L.add(y):L.delete(y),Tt.current=L,tt(L),A&&Ct(y)},[Ct]);async function Lt(y,O,A){Z(L=>({...L,[y]:O}));try{return await A()}finally{Z(L=>{const U={...L};return delete U[y],U})}}async function Bt(y,O=!1){return Lt(y.id,"login",async()=>{zt({...y,status:"logging",lastError:""});try{await At({...y,status:"logging",lastError:""});const A=await Zt("/api/login",{method:"POST",body:JSON.stringify({account_id:y.id})});if(!A.ok){const J={...y,status:"login_failed",lastError:A.error||`HTTP ${A.code||"失败"}`,lastErrorAt:Date.now(),run:null};return zt(J),await At(J).catch(()=>{}),O||C({message:`登录失败:${J.lastError}`,tone:"error"}),!1}const L=A.courses||[],U={...y,status:"logged_in",cookies:A.cookies||[],user:A.user||y.user||"",courses:L,selected:(y.selected||[]).filter(J=>L.some(P=>P.plan_id===J)),loginAt:Date.now(),updated:Date.now(),lastError:"",lastErrorAt:0,run:null};return zt(U),await At(U).catch(()=>{}),O||C({message:A.warn?`登录成功,但课程读取异常:${A.warn}`:`登录成功:${U.user||U.username},读到 ${Rs(L).total} 门`,tone:A.warn?"info":"success"}),Nt(),!0}catch(A){const L={...y,status:"login_failed",lastError:me(A),lastErrorAt:Date.now()};return zt(L),await At(L).catch(()=>{}),O||C({message:`登录失败:${L.lastError}`,tone:"error"}),A instanceof je&&A.offline&&W(!0),!1}})}async function H(y){return Lt(y.id,"refresh",async()=>{var O;try{let A=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:y.cookies,platform:y.platform||"guanyixue"})});if(!A.ok&&A.code==="session_expired"){if(C({message:"会话已失效,正在自动重新登录…"}),!await Bt(y,!0))return;const J=E.current.find(P=>P.id===y.id);if(!J)return;A=await Zt("/api/courses",{method:"POST",body:JSON.stringify({cookies:J.cookies})})}if(!A.ok){C({message:`读取失败:${A.error||A.code||"未知错误"}`,tone:"error"});return}const L=E.current.find(J=>J.id===y.id)||y,U={...L,courses:A.courses||[],user:A.user||L.user,cookies:(O=A.cookies)!=null&&O.length?A.cookies:L.cookies,status:"logged_in",updated:Date.now(),lastError:"",lastErrorAt:0};zt(U),await At(U).catch(()=>{}),C({message:`已刷新,读到 ${Rs(U.courses).total} 门`,tone:"success"})}catch(A){C({message:`读取失败:${me(A)}`,tone:"error"})}})}async function k(y){var L;const O=y.selected||[],A=(y.courses||[]).filter(U=>O.includes(U.plan_id)&&U.in_study!==!1);if(!A.length){C({message:"请先勾选要学习的课程",tone:"error"});return}if(!((L=y.cookies)!=null&&L.length)){C({message:"请先登录",tone:"error"});return}return Lt(y.id,"study",async()=>{var U,J;try{const P=await Zt("/api/study",{method:"POST",body:JSON.stringify({key:y.id,username:y.user||y.username,cookies:y.cookies,courses:A,workers:40,cap_minutes:90,enable_quiz:y.optQuiz===!0,enable_feedback:y.optFeedback!==!1})});if(!P.ok){C({message:`启动失败:${P.error||"未知错误"}`,tone:"error"});return}const gt=((U=P.study)==null?void 0:U.mode)==="normal"?`常规真播 ${((J=P.study)==null?void 0:J.parallel)||1} 路并发`:"快速模式(只调接口)";C({message:`已开始 ${A.length} 门课程 · ${gt}${y.optQuiz?" · 含自动答题":" · 测验需手动作答"}`,tone:"success"}),Wt(y.id,!0),Nt()}catch(P){C({message:`启动失败:${me(P)}`,tone:"error"})}})}async function I(y){return Lt(y.id,"stop",async()=>{try{await Zt("/api/stop",{method:"POST",body:JSON.stringify({key:y.id})}),C({message:"已请求停止"}),Nt()}catch(O){C({message:`停止失败:${me(O)}`,tone:"error"})}})}async function pt(y){var O;if(!((O=y.cookies)!=null&&O.length)){C({message:"请先登录",tone:"error"});return}return Lt(y.id,"capture",async()=>{try{const A=await Zt("/api/capture",{method:"POST",body:JSON.stringify({key:y.id,cookies:y.cookies,minutes:10})});if(!A.ok){C({message:`抓包失败:${A.error||"未知错误"}`,tone:"error"});return}C({message:"已打开浏览器,请手动走一遍课程页;最多记录 10 分钟",tone:"success"})}catch(A){C({message:`抓包失败:${me(A)}`,tone:"error"})}})}async function B(y){return Lt(y.id,"capture",async()=>{try{await Zt("/api/capture/stop",{method:"POST",body:JSON.stringify({key:y.id})}),C({message:"已请求停止抓包"}),Nt()}catch(O){C({message:`停止抓包失败:${me(O)}`,tone:"error"})}})}async function at(y){if(window.confirm(`删除账号「${y.user||y.username}」?课程缓存和日志不会自动清理。`))try{await Zt(`/api/accounts/${encodeURIComponent(y.id)}`,{method:"DELETE"}),N(O=>{const A=O.filter(L=>L.id!==y.id);return E.current=A,A}),C({message:"账号已删除"})}catch(O){C({message:`删除失败:${me(O)}`,tone:"error"})}}async function it(y,O){const A={...y,selected:O};zt(A);try{await At(A)}catch(L){C({message:`保存勾选失败:${me(L)}`,tone:"error"})}}function wt(y,O,A){const L=y.selected||[];it(y,A?[...new Set([...L,O])]:L.filter(U=>U!==O))}function o(y){const O=(y.courses||[]).filter(A=>A.in_study!==!1).map(A=>A.plan_id);it(y,[...new Set([...y.selected||[],...O])])}async function T(y,O,A){const L=O==="quiz"?{...y,optQuiz:A}:{...y,optFeedback:A};zt(L);try{await At(L),C({message:O==="quiz"?A?"已开启自动交测验(注意正确率)":"已关闭自动交测验":A?"已开启自动交反馈表":"已关闭自动交反馈表"})}catch(U){C({message:`保存失败:${me(U)}`,tone:"error"})}}async function Y(y){const O=await Zt("/api/accounts",{method:"POST",body:JSON.stringify({username:y.username,platform:y.platform,password:y.password,note:y.note,cookies:[],courses:[],selected:[],status:"idle",created:Date.now()})});if(O.ok===!1)throw new Error(O.error||"保存失败");const A=await Zt("/api/accounts"),L=O.account||(A.accounts||[]).find(P=>P.username===y.username);if(!L){C({message:"已保存,但列表里没有找到新账号,请刷新页面",tone:"error"}),await Nt();return}C({message:"已保存,正在尝试首次登录…"});const U=await Bt(L,!0),J=E.current.find(P=>P.id===L.id);C(U?{message:`登录成功:${(J==null?void 0:J.user)||y.username}`,tone:"success"}:{message:`登录失败:${(J==null?void 0:J.lastError)||"未知原因"}(请手动点击「登录」重试)`,tone:"error"}),await Nt()}async function Q(){Xt(!0);try{await Nt(!1)}finally{Xt(!1)}}function mt(y){var A;const O=y.platform||((A=(y.courses||[]).find(L=>L.platform))==null?void 0:A.platform);return O&&d[O]||"莞易学"}const st=(et==null?void 0:et.type)==="quiz"&&r.find(y=>y.id===et.accountId)||null,vt=(et==null?void 0:et.type)==="quiz"?(st==null?void 0:st.courses.find(y=>y.plan_id===et.course.plan_id))||et.course:null;return f.jsxs("div",{className:"min-h-screen",children:[f.jsx(Ov,{refreshing:rt,onRefresh:()=>void Q(),onSettings:()=>D({type:"settings"}),onSystemLog:()=>D({type:"system"}),onAdd:()=>D({type:"add"})}),f.jsxs("main",{className:"mx-auto max-w-[1320px] px-4 pb-16 pt-5 sm:px-6",children:[ut&&f.jsxs("div",{className:"mb-4 flex flex-wrap items-center gap-2.5 rounded-xl border border-red-200 bg-red-50 px-4 py-2.5 text-[12.5px] text-red-700",children:[f.jsx(fv,{className:"size-4 shrink-0"}),f.jsx("span",{className:"font-medium",children:"后端未连接"}),f.jsx("span",{className:"text-red-500",children:"页面显示的是上一次数据,请确认服务已启动、端口没有变化。"}),f.jsx("div",{className:"flex-1"}),f.jsx(Jt,{size:"sm",variant:"secondary",loading:rt,onClick:()=>void Q(),children:"重试"})]}),f.jsx(Ev,{accounts:r}),f.jsxs("div",{className:"mb-3 mt-6 flex items-end justify-between gap-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"text-[14px] font-semibold text-slate-900",children:"账号列表"}),f.jsx("p",{className:"mt-0.5 text-[11.5px] text-slate-400",children:"新旧版课程自动识别为「莞易学」,每 5 秒自动刷新状态"})]}),r.length>0&&f.jsx(Jt,{size:"sm",variant:"secondary",icon:f.jsx(Bs,{className:"size-3.5"}),loading:rt,onClick:()=>void Q(),children:"刷新"})]}),r.length===0?f.jsxs("div",{className:"card-shadow grid place-items-center rounded-2xl border border-dashed border-slate-300 bg-white px-6 py-16 text-center",children:[f.jsx("div",{className:"grid size-12 place-items-center rounded-2xl bg-brand-50 text-brand-600",children:f.jsx(Em,{className:"size-6"})}),f.jsx("h3",{className:"mt-4 text-[14px] font-semibold text-slate-800",children:"还没有账号"}),f.jsx("p",{className:"mt-1.5 max-w-md text-[12.5px] leading-relaxed text-slate-500",children:"添加东莞市教师培训平台账号后,可自动读取课程、勾选学习、提交反馈表与测验。 新旧版课程页会统一识别为「莞易学」。"}),f.jsx(Jt,{variant:"primary",className:"mt-5",icon:f.jsx(Nm,{className:"size-4"}),onClick:()=>D({type:"add"}),children:"添加第一个账号"})]}):f.jsx("div",{className:"grid items-start gap-4 md:grid-cols-2 xl:grid-cols-3",children:r.map(y=>{var O;return f.jsx(gv,{account:y,platformLabel:mt(y),pending:S[y.id],openLog:dt.has(y.id),logLines:((O=Ft[y.id])==null?void 0:O.lines)||[],onToggleLog:()=>Wt(y.id),onLogin:()=>void Bt(y),onRefresh:()=>void H(y),onStudy:()=>void k(y),onStop:()=>void I(y),onCapture:()=>void pt(y),onStopCapture:()=>void B(y),onDelete:()=>void at(y),onQuiz:()=>{var U;const A=(y.courses||[]).filter(J=>J.in_study!==!1),L=A.find(J=>{var P;return(P=y.selected)==null?void 0:P.includes(J.plan_id)})||A[0];if(!L){C({message:"这门课还没有课程数据,先点「刷新课程」",tone:"error"});return}if(!((U=y.cookies)!=null&&U.length)){C({message:"请先登录",tone:"error"});return}D({type:"quiz",accountId:y.id,course:L})},onToggleCourse:(A,L)=>wt(y,A,L),onSelectAll:()=>o(y),onClearSelection:()=>void it(y,[]),onToggleOption:(A,L)=>void T(y,A,L)},y.id)})})]}),f.jsx("footer",{className:"border-t border-line/70 py-5 text-center text-[11px] text-slate-400",children:"莞易学 · 多账号学习控制台 · 数据保存在本机"}),f.jsx(xv,{open:(et==null?void 0:et.type)==="add",platforms:w,onClose:()=>D(null),onSubmit:Y}),f.jsx(Nv,{open:(et==null?void 0:et.type)==="settings",onClose:()=>D(null),notify:C}),f.jsx(zv,{open:(et==null?void 0:et.type)==="system",onClose:()=>D(null)}),f.jsx(Tv,{open:(et==null?void 0:et.type)==="quiz"&&!!st,account:st,course:vt,onClose:()=>D(null),notify:C,onSubmitted:()=>void Nt()}),f.jsx(_v,{toast:V})]})}Rh.createRoot(document.getElementById("root")).render(f.jsx(G.StrictMode,{children:f.jsx(Cv,{})})); diff --git a/static/index.html b/static/index.html index 0349dfc..96c9fa8 100644 --- a/static/index.html +++ b/static/index.html @@ -6,8 +6,8 @@ 莞易学 · 多账号学习控制台 - - + +
diff --git a/web/src/App.tsx b/web/src/App.tsx index 8e73304..7983e4b 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -3,6 +3,7 @@ import { Plus, RefreshCw, Users, WifiOff } from 'lucide-react' import { AccountCard } from './components/AccountCard' import { AddAccountDialog, type NewAccount } from './components/AddAccountDialog' +import { PluginsDialog } from './components/PluginsDialog' import { QuizDialog } from './components/QuizDialog' import { SettingsDialog } from './components/SettingsDialog' import { StatBar } from './components/StatBar' @@ -48,6 +49,7 @@ interface InlineLog { type DialogState = | { type: 'add' } | { type: 'settings' } + | { type: 'plugins' } | { type: 'system' } | { type: 'quiz'; accountId: string; course: Course } | null @@ -194,19 +196,23 @@ export default function App() { return () => window.clearInterval(timer) }, [load]) - useEffect(() => { - api<{ platforms: PlatformInfo[] }>('/api/platforms') - .then((response) => { - const list = response.platforms || [] - if (!list.length) return - setPlatformList(list) - const map: Record = {} - for (const platform of list) map[platform.id] = platform.label - setPlatforms(map) - }) - .catch(() => {}) + const loadPlatforms = useCallback(async () => { + try { + const response = await api<{ platforms: PlatformInfo[] }>('/api/platforms') + const list = response.platforms || [] + setPlatformList(list) + const map: Record = {} + for (const platform of list) map[platform.id] = platform.label + setPlatforms(map) + } catch { + // 后端未连接时保留上一次的平台列表 + } }, []) + useEffect(() => { + void loadPlatforms() + }, [loadPlatforms]) + const pullLog = useCallback( async (id: string) => { const current = logsRef.current[id] || { @@ -656,6 +662,7 @@ export default function App() { onRefresh={() => void refreshNow()} onSettings={() => setDialog({ type: 'settings' })} onSystemLog={() => setDialog({ type: 'system' })} + onPlugins={() => setDialog({ type: 'plugins' })} onAdd={() => setDialog({ type: 'add' })} /> @@ -773,6 +780,12 @@ export default function App() { notify={notify} /> setDialog(null)} /> + setDialog(null)} + notify={notify} + onChanged={() => void loadPlatforms()} + /> void + notify: (toast: { message: string; tone?: 'info' | 'success' | 'error' }) => void + onChanged: () => void +}) { + const [plugins, setPlugins] = useState([]) + const [busy, setBusy] = useState('') + const [loading, setLoading] = useState(false) + + const pull = useCallback(async () => { + setLoading(true) + try { + const response = await api('/api/plugins') + setPlugins(response.plugins || []) + } catch (error) { + notify({ message: toastMessage(error), tone: 'error' }) + } finally { + setLoading(false) + } + }, [notify]) + + useEffect(() => { + if (open) void pull() + }, [open, pull]) + + async function run(name: string, path: string, okText: string) { + setBusy(name) + try { + const response = await api(path, { method: 'POST' }) + if (response.plugins) setPlugins(response.plugins) + if (response.ok === false) { + notify({ message: response.error || '插件操作失败', tone: 'error' }) + } else { + notify({ message: okText, tone: 'success' }) + onChanged() + } + } catch (error) { + notify({ message: toastMessage(error), tone: 'error' }) + } finally { + setBusy('') + } + } + + return ( + + + 共 {plugins.length} 个 · 停用后该平台会从「添加账号」的平台下拉里消失 + + + + } + > +
+ {plugins.map((plugin) => ( +
+
+ + + {plugin.title || plugin.name} + + {plugin.name} + + {plugin.enabled ? '已启用' : '已停用'} + + {plugin.enabled && ( + + {plugin.loaded ? '已加载' : '未加载'} + + )} +
+ +
+ 平台 {plugin.label || '—'} + id {plugin.id || '—'} + 能力 {plugin.capabilities.length ? plugin.capabilities.join(' / ') : '无'} +
+ +
+ + +
+
+ ))} + + {!plugins.length && !loading && ( +

+ pugins/ 下还没有插件。建一个含 pugin.json + main.py 的目录丢进去,刷新即可看到。 +

+ )} +
+
+ ) +} diff --git a/web/src/components/TopBar.tsx b/web/src/components/TopBar.tsx index e86c964..1bdaed6 100644 --- a/web/src/components/TopBar.tsx +++ b/web/src/components/TopBar.tsx @@ -1,4 +1,4 @@ -import { Plus, RefreshCw, ScrollText, Settings2 } from 'lucide-react' +import { Plus, Puzzle, RefreshCw, ScrollText, Settings2 } from 'lucide-react' import { Button } from './ui/Button' @@ -7,12 +7,14 @@ export function TopBar({ onRefresh, onSettings, onSystemLog, + onPlugins, onAdd, }: { refreshing: boolean onRefresh: () => void onSettings: () => void onSystemLog: () => void + onPlugins: () => void onAdd: () => void }) { return ( @@ -50,6 +52,15 @@ export function TopBar({ > +