wrong-notebook 2026.11.4-2 → 2026.11.4-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js +8 -6
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +16 -14
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js +7 -6
- package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/route.js +6 -5
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js +5 -3
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js +5 -5
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +16 -14
- package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/route.js +7 -5
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js +8 -7
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +15 -14
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +16 -13
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +15 -14
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +20 -18
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js +5 -5
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +20 -18
- package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js +18 -16
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/geogebra/route.js +20 -17
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/image/route.js +6 -5
- package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/notes/route.js +8 -5
- package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/practice-records/route.js +5 -4
- package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +18 -15
- package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/retag/route.js +18 -16
- package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/route.js +13 -9
- package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +18 -15
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js +18 -15
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/answer-space/route.js +6 -6
- package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-delete/route.js +8 -5
- package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/clear/route.js +5 -5
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/error-items/export-questions/route/build-manifest.json +12 -0
- package/.next/server/app/api/error-items/export-questions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/error-items/export-questions/route.js +17 -0
- package/.next/server/app/api/error-items/export-questions/route.js.map +5 -0
- package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -0
- package/.next/server/app/api/error-items/export-questions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/error-items/list/route.js +8 -7
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +22 -21
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js +5 -4
- package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/similarity/route.js +4 -3
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +20 -18
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/results/route.js +19 -18
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +18 -17
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +21 -19
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +20 -19
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js +9 -7
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +18 -16
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +22 -20
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +25 -22
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js +19 -18
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/read/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/retry/route.js +25 -22
- package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/start/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +27 -24
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/read/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +27 -24
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js +6 -4
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +6 -5
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js +6 -5
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +7 -6
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +18 -17
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js +8 -4
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js +8 -6
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +21 -19
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js +5 -4
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js +4 -3
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +18 -16
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +15 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +18 -16
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +16 -14
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +19 -17
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js +5 -5
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js +5 -5
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js +5 -4
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +17 -15
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +8 -7
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +7 -6
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js +7 -6
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js +5 -5
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js +7 -6
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +17 -16
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +17 -16
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js +7 -4
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +5 -4
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js +9 -8
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +10 -9
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +11 -10
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +11 -10
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +16 -15
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/1oeh_server_app_api_error-items_export-questions_route_actions_02nsquej76mp1.js +3 -0
- package/.next/server/chunks/[externals]__1j5vgk-wr4vpe._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__001wdwos9fkgg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00cl_lnn-40t3._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05tyrbfzivoeq._.js → [root-of-the-server]__00w9qhjl8kvr4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__01-14hxale6jz._.js → [root-of-the-server]__00w_kxg7h-9_p._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00x5ad3w5zwfp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__01rm65xnqj0z-._.js → [root-of-the-server]__01jxyfokd6l4_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__02nbzp-n9g9_o._.js → [root-of-the-server]__025dluj5es8w4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09pkxauucdf_0._.js → [root-of-the-server]__02fu_lp66613e._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__04w57bdna9ax0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0z0knsep33lsx._.js → [root-of-the-server]__05a4j8yu5_bg1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__006u92h_madgn._.js → [root-of-the-server]__05pxdy586nh8a._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0n5l60oyv1n-1._.js → [root-of-the-server]__06i2kswg2zb80._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__07i32k2sv285o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0k4cyyyh6z6_p._.js → [root-of-the-server]__0855dkhk7zs77._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0lqv0n5j2fg24._.js → [root-of-the-server]__08iizowhy6p3l._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1eu_g0k_nr3i-._.js → [root-of-the-server]__094ybs6y_fmt5._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__09aolocrwucnt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_le78e9b2yno._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_uup9ppknahw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0b8rxaox_x2n1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bvf731upd2_w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cgpuhmu87blm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dqy62vnjwvwp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0bmczgpuggwki._.js → [root-of-the-server]__0ef-17j7yp2n5._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ej9lsrmus5m4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__0fdkyswheen4o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0eba9rni-2_tw._.js → [root-of-the-server]__0fhi9g3nqu6k3._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0fx0s5_6sjw-d._.js → [root-of-the-server]__0g3w0_9__ljck._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0g848ha1gy56h._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ig1r6paxqzt0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0j7ua4rsijb4c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0jh610iscvrmp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0imuc7gi1ii-e._.js → [root-of-the-server]__0l3io0vyav4if._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0l7jho_lr2z5g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0llbkrw8l2ib9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0mfr1ne23y4yo._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0geynfn2xmdle._.js → [root-of-the-server]__0mslax132s9jp._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0nin5p-dwlpf9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0nye-53zadylr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0p8cwd_go8pid._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pojh2d6n1kp6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rspref34j958._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tsi6_qmtro9q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0u1fu9dvxmlxd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ujhx0glgcxja._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__029n0r2v92pcc._.js → [root-of-the-server]__0v8mfczhz1ax1._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0vf3rgatj1f3u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vt48u-0ebzdv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0w9f5-xtpane-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wea836zkhvlj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wex3czgya39o._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0x8ehtaj_x2pf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xobqdj2u2s67._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0y3ui5-k9baec._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yq7jm5ja3r6t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zrg03ldx65tk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-1ld657rjip5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-6r_3pmgkz13._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10ngcci8pf29l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11-fk0-4iuf_k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11x5u4zg5i2c6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__120o1w9mcwgta._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12f6t_ozjtn42._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13a3izu1xb4m4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1kiolpvl5u4e-._.js → [root-of-the-server]__14e45mqzb1vjt._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__14jf33wwjqbw1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14n0eki4tdk02._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15a3t94ps7jx2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15dipxocczlvx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15r55xy6cyrg3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17ed9rw-rhun-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19kic_glbz32b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ae5zzeo8_c2s._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1b-acwmm5hhg0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d6ftxzea6h0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dovdb1wrr_0e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e7_e83zxstdw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e81i8l09skcp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f0zocrmsd5p8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f5_yaclxhuvj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gf_vv57qtjh0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hn69stngi4kc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hnyj47zdzrxo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1k0fuhrt1iiad._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kxecl8v-_px5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1l6v9x8xm11pl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1m8m5io-tr21e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1pfhgjwnx_--j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1r5lj-ffov9r0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1rxi33p9h8zrj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1uqnotrppylmw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1utvl-1o6mb8y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vc89u7_xxhyf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1x_kq-6h3utmo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xqcu4ft3d7id._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xuw793xxu29t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yaf9vp_o6cro._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ybmwcbaqk63j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yyezurgy7e3k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z4-5hlzq34fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z9hl9qdokxpu._.js +3 -0
- package/.next/server/chunks/_0-ne-bwuvd_6w._.js +1 -1
- package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
- package/.next/server/chunks/_01bayc6kg7upi._.js +1 -1
- package/.next/server/chunks/_029zt0rilrwvt._.js +1 -1
- package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/_04vbgvl2gl5bc._.js +3 -0
- package/.next/server/chunks/_055vhdh_7iydn._.js +3 -0
- package/.next/server/chunks/_05ans30vcd4s-._.js +1 -1
- package/.next/server/chunks/{_04rjm4ctjqrba._.js → _06pseal2zu-71._.js} +2 -2
- package/.next/server/chunks/_076-jjzrfdsdk._.js +1 -1
- package/.next/server/chunks/_07amw8ha9rney._.js +1 -1
- package/.next/server/chunks/{_1fki7pamd4s-7._.js → _087uva8dkvxwz._.js} +2 -2
- package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
- package/.next/server/chunks/_09o9zamz75n5d._.js +1 -1
- package/.next/server/chunks/_0_3_65z6ak-5i._.js +1 -1
- package/.next/server/chunks/_0_5s2mrhxb3-u._.js +3 -0
- package/.next/server/chunks/_0_e736ff6uhew._.js +1 -1
- package/.next/server/chunks/_0anbzuivml30d._.js +1 -1
- package/.next/server/chunks/{_0edfmbz_jbxsu._.js → _0b9gke5b17vzh._.js} +2 -2
- package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
- package/.next/server/chunks/_0gxi3zrkhyvx_._.js +1 -1
- package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
- package/.next/server/chunks/_0hk9z9rqga4x-._.js +1 -1
- package/.next/server/chunks/_0i58-g30ox5-8._.js +3 -0
- package/.next/server/chunks/_0kjatc7pcrkvz._.js +1 -1
- package/.next/server/chunks/_0kreo-8xn80hb._.js +1 -1
- package/.next/server/chunks/_0l2j3br2g32zp._.js +1 -1
- package/.next/server/chunks/_0lepv-j_r8kfv._.js +3 -0
- package/.next/server/chunks/_0lmh33cdt_1fr._.js +1 -1
- package/.next/server/chunks/_0lob14xk0ko5z._.js +1 -1
- package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
- package/.next/server/chunks/_0numcpxd_n25x._.js +3 -0
- package/.next/server/chunks/_0p-sas2zxy3iv._.js +1 -1
- package/.next/server/chunks/_0po48rvqz03dg._.js +1 -1
- package/.next/server/chunks/_0pzdohc1mz5ts._.js +1 -1
- package/.next/server/chunks/_0qaoat396e0_3._.js +1 -1
- package/.next/server/chunks/_0r8u30vd4lix4._.js +3 -0
- package/.next/server/chunks/_0r9ejvgz0l0-0._.js +1 -1
- package/.next/server/chunks/_0s8v0xiwcw6od._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +1 -1
- package/.next/server/chunks/_0ta62b-tktnk8._.js +3 -0
- package/.next/server/chunks/{_03dn7v_h3d-v8._.js → _0tkov27xr068i._.js} +11 -7
- package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
- package/.next/server/chunks/_0tz5wpjdgntj3._.js +1 -1
- package/.next/server/chunks/_0wegi_sv1s4wx._.js +1 -1
- package/.next/server/chunks/_0xv7-7d6dyo9-._.js +1 -1
- package/.next/server/chunks/_0xx4y9tk1qclc._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_11w6ynlxuzl55._.js +1 -1
- package/.next/server/chunks/_12fz_vwm9jemi._.js +3 -0
- package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +3 -0
- package/.next/server/chunks/_13ffmxv8qrwi0._.js +1 -1
- package/.next/server/chunks/_14w9nrdlajz24._.js +1 -1
- package/.next/server/chunks/_15fpgekhvv214._.js +1 -1
- package/.next/server/chunks/{_043-r529chcri._.js → _1638xaazsmf2m._.js} +11 -7
- package/.next/server/chunks/_1647rfjflw_iq._.js +1 -1
- package/.next/server/chunks/_16jdov0rxh99d._.js +1 -1
- package/.next/server/chunks/_17zw8m241gfs3._.js +1 -1
- package/.next/server/chunks/_18amra5328v90._.js +1 -1
- package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
- package/.next/server/chunks/_1_273cgnpyl9j._.js +1 -1
- package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1ab7h8-how0le._.js +3 -0
- package/.next/server/chunks/_1ahi8466v1b3l._.js +1 -1
- package/.next/server/chunks/_1almac7c09mp4._.js +3 -0
- package/.next/server/chunks/_1b-7g4thtxfnp._.js +3 -0
- package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
- package/.next/server/chunks/_1b7qjlv0nxovi._.js +1 -1
- package/.next/server/chunks/_1be-y660a8z-q._.js +1 -1
- package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
- package/.next/server/chunks/_1e8w9uuebtrcb._.js +1 -1
- package/.next/server/chunks/_1ev3hw7jrpp8r._.js +3 -0
- package/.next/server/chunks/_1gdet1v2zk2gy._.js +1 -1
- package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
- package/.next/server/chunks/_1hp9mnz19v199._.js +1 -1
- package/.next/server/chunks/_1j10upti9l6da._.js +1 -1
- package/.next/server/chunks/_1j8kqz21_i728._.js +1 -1
- package/.next/server/chunks/_1lesklvhr_pfq._.js +3 -0
- package/.next/server/chunks/_1muwmr6j76v3m._.js +1 -1
- package/.next/server/chunks/_1pvqo-qnv-nqm._.js +1 -1
- package/.next/server/chunks/_1q65ai1_dwgjp._.js +1 -1
- package/.next/server/chunks/_1qcv4muwnx82-._.js +3 -0
- package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
- package/.next/server/chunks/_1s55l1bx-1cxp._.js +1 -1
- package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
- package/.next/server/chunks/_1srq5kxah38r6._.js +1 -1
- package/.next/server/chunks/_1t632kndbc0tj._.js +3 -0
- package/.next/server/chunks/_1tahh9ric8la3._.js +1 -1
- package/.next/server/chunks/_1tvl0cm629nyc._.js +1 -1
- package/.next/server/chunks/_1u6r2cuueltfn._.js +3 -0
- package/.next/server/chunks/{_1-6i59jd1zhly._.js → _1vddun9dxzaqo._.js} +11 -7
- package/.next/server/chunks/_1xpj9uk-9zhl8._.js +1 -1
- package/.next/server/chunks/_1xx5l4x084brt._.js +3 -0
- package/.next/server/chunks/_1z_ujac_e_65s._.js +1 -1
- package/.next/server/chunks/_1zbkha-v5mkk0._.js +3 -0
- package/.next/server/chunks/_1zvf_gki7-g0n._.js +1 -1
- package/.next/server/chunks/{_0r0hnbjdq-k9-._.js → _20snsd6f1xc63._.js} +2 -2
- package/.next/server/chunks/_20tjujotvor53._.js +1 -1
- package/.next/server/chunks/node_modules_zod_v4_classic_external_0qoqh-q5drsgn.js +4 -4
- package/.next/server/chunks/node_modules_zod_v4_classic_external_14kwlambv9opd.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_17gmk506tz413.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1b_q1zc0x8d76.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1exeae-p81c94.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1giv406od1whf.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1wq100x5o7-hi.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1x8fhte3frhrw.js +3 -0
- package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +3 -0
- package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +3 -0
- package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +3 -0
- package/.next/server/chunks/src_lib_0osgsup3n2ypg._.js +3 -0
- package/.next/server/chunks/src_lib_0so-2topfosjo._.js +3 -0
- package/.next/server/chunks/src_lib_0whd_w99i5vmm._.js +3 -0
- package/.next/server/chunks/src_lib_0z4je8wchtdws._.js +3 -0
- package/.next/server/chunks/src_lib_0zeksho3data7._.js +3 -0
- package/.next/server/chunks/src_lib_15op6xa369-51._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +143 -131
- package/.next/server/chunks/src_lib_1d0nldjpxxl8t._.js +3 -0
- package/.next/server/chunks/src_lib_1d99xj4d-pofa._.js +3 -0
- package/.next/server/chunks/src_lib_1v7rk87xys5cb._.js +3 -0
- package/.next/server/chunks/src_lib_1w0niu4i8hnaq._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- package/.next/server/chunks/src_lib_exam_1vzmn90_kh7eg._.js +3 -0
- package/.next/server/chunks/src_lib_exam_exam_ts_18c3t7bnr1z5k._.js +3 -0
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +5 -0
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +3 -0
- package/.next/server/chunks/src_lib_mastery-status_ts_0e9jnp-14tby5._.js +3 -0
- package/.next/server/chunks/src_lib_minimax-code_checkin_ts_1j1mpuxc1vgoz._.js +1 -1
- package/.next/server/chunks/src_lib_notebook-scope_ts_06eipvr6xztlf._.js +3 -0
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +3 -0
- package/.next/server/chunks/src_lib_recoverable-response_ts_00y54idhlj_0e._.js +3 -0
- package/.next/server/chunks/src_lib_schemas_error-items_ts_0vdof4417rd3y._.js +3 -0
- package/.next/server/chunks/src_lib_short-id_0adg7-htn2dq_._.js +3 -0
- package/.next/server/chunks/src_lib_svg-animation_ts_0-noskwg6sysg._.js +3 -0
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +3 -0
- package/.next/server/chunks/src_lib_tags_seed_1_ej3w-2450a0._.js +3 -0
- package/.next/server/chunks/src_lib_tts_19zri-v8-l_4u._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__032-uso7x2eqk._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ks-9bza_y-tn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0te5kr0_7nmrv._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uezowk-9l0x4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0x4us8rfvt68s._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0mqo18mv_ooyq._.js → [root-of-the-server]__0xjcdrflb40xr._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0x_ihemma9171._.js → [root-of-the-server]__0z7upqzuqtse6._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__10y8dor72926b._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12jk2bmesr4gc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rrcp_77jpv98._.js +3 -0
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +3 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/_0fp_p60hb9ex8._.js +3 -0
- package/.next/server/chunks/ssr/_0gsk7ce3mjc-h._.js +3 -0
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +32 -0
- package/.next/server/chunks/ssr/{_01qu892bisrf0._.js → _0j-r3zhz2ucmg._.js} +2 -2
- package/.next/server/chunks/ssr/_0m1jjbrzk71io._.js +3 -0
- package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +1 -1
- package/.next/server/chunks/ssr/_0rd-teluypcd2._.js +1 -1
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +3 -0
- package/.next/server/chunks/ssr/{_186fwf-hcr_ua._.js → _101w__e2w9gr0._.js} +2 -2
- package/.next/server/chunks/ssr/_126p5i1ynlykc._.js +3 -0
- package/.next/server/chunks/ssr/_127aw5h992s9d._.js +4 -0
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +1 -1
- package/.next/server/chunks/ssr/_1bhvzfiuz3s7j._.js +3 -0
- package/.next/server/chunks/ssr/_1d3pxsso6zv_w._.js +3 -0
- package/.next/server/chunks/ssr/_1hp3fw-gk2r-3._.js +3 -0
- package/.next/server/chunks/ssr/_1k45xb7mu-emd._.js +3 -0
- package/.next/server/chunks/ssr/_1lltqgoq4vqfe._.js +3 -0
- package/.next/server/chunks/ssr/_1ore70w45768b._.js +3 -0
- package/.next/server/chunks/ssr/{_1xv0q8o3g3r5d._.js → _1s3gqrczubor-._.js} +2 -2
- package/.next/server/chunks/ssr/_1t-o815u40ng2._.js +3 -0
- package/.next/server/chunks/ssr/{_1pdnzaad7hk0d._.js → _1x_zn17exkc4t._.js} +2 -2
- package/.next/server/chunks/ssr/_1yclgq1umgl4p._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_08vtqzu_wfcb5._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0y-9u3ez_29oz._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_109z-y1z_gtxg._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_docx_dist_index_mjs_07znba89yz2vi._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_0byqh-lbfcigr.js → node_modules_heic-to_dist_csp_heic-to_1_jdv4y0yz52i.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_19_dv9gdzg_e7.js → node_modules_heic-to_dist_csp_heic-to_1zqrtb3kykd7q.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_printer_mjs_0jbt269gi19_7._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pdfjs-dist_build_pdf_mjs_0z37jkkqfce7_._.js +47 -0
- package/.next/server/chunks/ssr/node_modules_read-excel-file_universal_index_0ayslfrutmja5.js +3 -0
- package/.next/server/chunks/ssr/node_modules_write-excel-file_browser_index_0l2-di6rcng1b.js +3 -0
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0veaboc415l0m.js +3 -3
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +3 -0
- package/.next/server/chunks/ssr/src_130ww76krpws_._.js +1 -1
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/src_1nbi4yrww3r1m._.js +3 -0
- package/.next/server/chunks/ssr/{src_1jhctayt9gxoc._.js → src_1o5f_wr8vv-x0._.js} +2 -2
- package/.next/server/chunks/ssr/src_1rmus42s388dk._.js +3 -0
- package/.next/server/chunks/ssr/src_1seqsa8jiwu83._.js +3 -0
- package/.next/server/chunks/ssr/src_1xvnkkhvub372._.js +1 -1
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_page_tsx_0xcjflkgkwzgd._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +11 -6
- package/.next/server/chunks/ssr/src_app_exams_page_tsx_17_d4_gy2i1ds._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-tasks_[id]_page_tsx_0_grj11-jdqqc._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-tasks_page_tsx_01983hytm-x08._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_page_tsx_08njm-5-txm8_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_page_tsx_1p9src5gnz_40._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +6 -1
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +3 -3
- package/.next/server/chunks/ssr/src_components_error-list_error-item-card_tsx_1zsiqsrj-jjd7._.js +1 -1
- package/.next/server/chunks/ssr/src_components_exam_exam-figure-scale-bar_tsx_1dxk6lzvp_d28._.js +1 -1
- package/.next/server/chunks/ssr/src_components_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +15 -10
- package/.next/server/chunks/ssr/src_components_ui_switch_tsx_054tyo61pehla._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_short-id_short-id-client_ts_03nnd3s0tat3l._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/01zokrwums-fz.js +55 -0
- package/.next/static/chunks/{1pdlii0oox0-7.js → 037g92rz3qjm_.js} +1 -1
- package/.next/static/chunks/040et8v6_v-s6.js +1 -0
- package/.next/static/chunks/{2cfz0fumc6ghe.js → 045cs_rolnmjd.js} +1 -1
- package/.next/static/chunks/079f88y9j6sf-.js +45 -0
- package/.next/static/chunks/0g1lk2opoyqly.js +1 -0
- package/.next/static/chunks/0ge9zqd21b4xd.js +15 -0
- package/.next/static/chunks/0gu34v572tj7o.js +1 -0
- package/.next/static/chunks/0mnb66hvp3czv.js +2 -0
- package/.next/static/chunks/0mun2h4uaj4eh.js +1 -0
- package/.next/static/chunks/{02wft51kf3t9f.js → 0ovv_fq59i4y4.js} +1 -1
- package/.next/static/chunks/0sl4wa-ghh5g7.js +2 -0
- package/.next/static/chunks/0xbohpfp7x9jn.js +1 -0
- package/.next/static/chunks/{31-r0kqqw-wfd.js → 0xwz3h9d_e7kb.js} +1 -1
- package/.next/static/chunks/{0_xcjg47jv3ur.js → 1-qu_z3i5b8ul.js} +1 -1
- package/.next/static/chunks/10hk15u8jc7o1.js +38 -0
- package/.next/static/chunks/113lhm-f9le_y.js +2 -0
- package/.next/static/chunks/{42rupczfyygo1.js → 15zro21ycjjle.js} +1 -1
- package/.next/static/chunks/{3difxy8vzqlxn.js → 1fmrzsulv-ddd.js} +1 -1
- package/.next/static/chunks/{3fh32b9da9l_5.js → 1k2m_f0nu22fb.js} +1 -1
- package/.next/static/chunks/1uso50ewx5j8v.js +1 -0
- package/.next/static/chunks/1vtq_er8xir3c.css +3 -0
- package/.next/static/chunks/1y0cjudvnz4la.js +6 -0
- package/.next/static/chunks/20f7m1txoey_w.js +1 -0
- package/.next/static/chunks/21ghhv1twe4or.js +12 -0
- package/.next/static/chunks/23h8i_poncr7i.js +1 -0
- package/.next/static/chunks/28bc-wd48lcls.js +1 -0
- package/.next/static/chunks/2acga0__tn9yl.js +1 -0
- package/.next/static/chunks/2j3bisradcgfv.js +1 -0
- package/.next/static/chunks/2lhxk-8dpncxq.js +1 -0
- package/.next/static/chunks/2xww3vrggzkc3.js +15 -0
- package/.next/static/chunks/3-5otbeiq86n5.js +1 -0
- package/.next/static/chunks/31uxxyexyu66p.js +198 -0
- package/.next/static/chunks/33z7oz1790x50.js +1 -0
- package/.next/static/chunks/37309r9ttt-oa.js +1 -0
- package/.next/static/chunks/3_w-p8241f5rv.js +1 -0
- package/.next/static/chunks/{1uaqnxl-xshw6.js → 3f9t8cne6yfyl.js} +1 -1
- package/.next/static/chunks/{3wch6vphcivq5.js → 3j92h-4k4_o_f.js} +1 -1
- package/.next/static/chunks/3jkntcd5fwsid.js +1 -0
- package/.next/static/chunks/3ldaxwwj8i1r_.js +9 -0
- package/.next/static/chunks/3nq-bgq8lumv9.js +1 -0
- package/.next/static/chunks/{4441xuc3i-yb7.js → 3rnbnqcge4lza.js} +1 -1
- package/.next/static/chunks/3t9tbm4atwmw8.js +1 -0
- package/.next/static/chunks/3u-qpv02dkpmu.js +1 -0
- package/.next/static/chunks/438pvifm_o4g_.js +1 -0
- package/.next/static/media/pdf.worker.min.0zcq5mj7t-qsr.mjs +28 -0
- package/dist-scripts/scripts/rebuild-system-tags.js +11 -107
- package/dist-scripts/scripts/seed-chinese-primary.js +1 -1
- package/dist-scripts/src/lib/logger.js +1 -0
- package/dist-scripts/src/lib/tags/seed/rebuild.js +103 -0
- package/dist-scripts/src/lib/{seed-chinese-tags.js → tags/seed/seed-chinese-tags.js} +2 -1
- package/package.json +1 -1
- package/prisma/migrations/20261104033404_add_question_type/migration.sql +2 -0
- package/prisma/migrations/20261104040208_exam_question_score/migration.sql +2 -0
- package/prisma/migrations/20261104044246_exam_group_by_question_type/migration.sql +29 -0
- package/prisma/schema.prisma +7 -0
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__012pau7crikop._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01jc87mm42cex._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01newhoirvvb2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02oqd6w58wymi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__057qz9ucs7lib._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06_pvs6rg70ri._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06jad9cnzeci-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0_uvtfu0yr-na._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0_vinl1oembls._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ahni9caaouya._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0aq01totjzgkp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5mh_vi6e246._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5qyqwq6mk5v._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b79cd6lae7ep._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b_zf20owrv7l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cel4yig3zcho._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cu5jz9b3f0i1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0d818ux928r5h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0dclcdg0hwxxj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0e13o3ny66zb3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fg20m1i6x4y9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fhy87hr0_glw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fnte1x8xdn5o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0glupa52ge074._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gphporvvjc0d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gs7-3gi0pdws._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0i2mt6zjxbq--._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ijq_d0gr5zo8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0iqp1f0-yvbhw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jk-9m6ra-_um._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jvusk64khb-a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0k0c90ih7n0te._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0maxg52nxqrzi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ml-m3il4unb6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nkrql6or-tf_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nujsu6qbn-8o._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0ovdiut1h8kkt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p5_lv_pjxr5f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p8wlug4uvmvi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ptn9j1rleieh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0r7f34_38kmvk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0u3m78xhq8b3l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ualui9b50ufh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ujfft7untkmq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0vw7u-y__gk7p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0w53aflmo1keg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wdjzoxwwh6bn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wx65sza19ou-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xj_313186tqc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yv_kznxz5qzn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zldj8zxo-hvc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-djdd7tnb-n7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__109pj952qxtan._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10gp75p89v9a2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__111jxitdjhuoj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__112w8xm57okk5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12h4ckd6f76pb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12ig6-5hpb7s-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13_k7w8nrx7ie._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14c50fhuh_abo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14jpfgwnpc9gl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14m8fewwq1xs6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15qkqztuygnfg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__166997w1su5wq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16xl11-irmhu3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19i64i9v32y8o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19jqc7tzna13p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1asgy7sah0mo6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1av1l48rnghpa._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1azaa45m60iqm._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1d159cxbdta68._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dmp3ynxbcyjz._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dom1le7wqh7d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1e5tjfwab0exu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1f-7-l2abs15s._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fe2v2mv5-rgo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fepss7g57apj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ff3h7ockrpdf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g11271g0z55n._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g6jrwm72xr8a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1he8kk4382-0h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hk5kgctlp2wn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1j44_t992y-1-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4f33-z95_7c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4pnhbw4rgzs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kx3a0dm7l2wl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lea5m7hl1n7f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m7pja8jp27eh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m_y4afrn94oy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ruzcenko2gi1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1sf2oa2wkqf_0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t6aypqxgjkg_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1tffqae521gxo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1to25zgnk7xk-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1u5c7agj_phnb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vbof6uu4he_-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1wfhdwfdvc6j3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1y0n2tg-0l636._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zc0bmdyn1lg4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zqfz2rc4i280._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__207c97dbcdb0z._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20cdqectwle3j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20dy4zclqbnw8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__212aaltyh6kc2._.js +0 -3
- package/.next/server/chunks/_01y7-j4vx6cu5._.js +0 -3
- package/.next/server/chunks/_0_rhee7wb6tcg._.js +0 -3
- package/.next/server/chunks/_0at03z7sgwdv3._.js +0 -3
- package/.next/server/chunks/_0ge95_bkwrkmc._.js +0 -3
- package/.next/server/chunks/_0lj59y-ytysr5._.js +0 -3
- package/.next/server/chunks/_0v762_h-sp94d._.js +0 -3
- package/.next/server/chunks/_0vshwghrjetxu._.js +0 -3
- package/.next/server/chunks/_0z0zrluul2idw._.js +0 -3
- package/.next/server/chunks/_1a1oatugfke1p._.js +0 -3
- package/.next/server/chunks/_1ex6ovo_j2jzv._.js +0 -3
- package/.next/server/chunks/_1fgb9ve_nfat4._.js +0 -3
- package/.next/server/chunks/_1fsfy4c3rj36b._.js +0 -3
- package/.next/server/chunks/_1hc_es1a3cl6a._.js +0 -3
- package/.next/server/chunks/_1m-yyz-pl9-03._.js +0 -3
- package/.next/server/chunks/_1ns6y6y2tq8sh._.js +0 -3
- package/.next/server/chunks/_1yujnc0thk8ab._.js +0 -3
- package/.next/server/chunks/_211va-dk9519v._.js +0 -3
- package/.next/server/chunks/src_lib_0_g_0q-n01g-x._.js +0 -3
- package/.next/server/chunks/src_lib_0au5a9-5rxkab._.js +0 -3
- package/.next/server/chunks/src_lib_0d7kmnt7v2np8._.js +0 -3
- package/.next/server/chunks/src_lib_0fedb0fkc3km1._.js +0 -3
- package/.next/server/chunks/src_lib_0okewfjk6p2ci._.js +0 -3
- package/.next/server/chunks/src_lib_0ptvn4_15zxu0._.js +0 -3
- package/.next/server/chunks/src_lib_0rb6u4i7kn30r._.js +0 -3
- package/.next/server/chunks/src_lib_0svj7bkzyw9oc._.js +0 -3
- package/.next/server/chunks/src_lib_10is5pyogge95._.js +0 -3
- package/.next/server/chunks/src_lib_12j7n__96zd0q._.js +0 -3
- package/.next/server/chunks/src_lib_13hd5uoi-53hn._.js +0 -3
- package/.next/server/chunks/src_lib_1chbt4n9_vpoj._.js +0 -3
- package/.next/server/chunks/src_lib_1geq39r7va9gy._.js +0 -3
- package/.next/server/chunks/src_lib_1h4xeb9lyx31r._.js +0 -3
- package/.next/server/chunks/src_lib_1mno8g5cqmaet._.js +0 -3
- package/.next/server/chunks/src_lib_1qvj-3jt4jbq7._.js +0 -3
- package/.next/server/chunks/src_lib_1smlosz37xitx._.js +0 -3
- package/.next/server/chunks/src_lib_1squodf4swo_a._.js +0 -3
- package/.next/server/chunks/src_lib_1uei_xjjj3g7_._.js +0 -3
- package/.next/server/chunks/src_lib_1vt5vsj108u_q._.js +0 -3
- package/.next/server/chunks/src_lib_api-errors_ts_1gfd4ojz7efro._.js +0 -3
- package/.next/server/chunks/src_lib_exam_ts_0d3a4q4r41hcf._.js +0 -3
- package/.next/server/chunks/src_lib_figure-scale_ts_215n0ebzz7mr7._.js +0 -3
- package/.next/server/chunks/src_lib_import-batches_ts_0aekmggdwo_9-._.js +0 -3
- package/.next/server/chunks/src_lib_import-tasks_ts_1f4ejsy00-v1t._.js +0 -3
- package/.next/server/chunks/src_lib_question-analysis_ts_15_8r_pxmtd06._.js +0 -3
- package/.next/server/chunks/src_lib_question-deduplication_ts_1p1bik-vwl9ue._.js +0 -3
- package/.next/server/chunks/src_lib_retag_ts_0eu8ld_86kt3a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__00_c9kpvx5075._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__03208_liub81h._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__08j-3_6cl3898._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0ht0nkzazbnl9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0r18qmblwuijm._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0sb3jhytba2xr._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1o5pa8m50qyqa._.js +0 -3
- package/.next/server/chunks/ssr/_01rfvhncgnpvl._.js +0 -3
- package/.next/server/chunks/ssr/_0qgs--x99c558._.js +0 -3
- package/.next/server/chunks/ssr/_0w83jztp72o20._.js +0 -3
- package/.next/server/chunks/ssr/_0zacgi5-qgqwr._.js +0 -3
- package/.next/server/chunks/ssr/_11820i-k62560._.js +0 -3
- package/.next/server/chunks/ssr/_1a4u3f5sc05kb._.js +0 -3
- package/.next/server/chunks/ssr/_1j3yr2arbxd6a._.js +0 -3
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +0 -3
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +0 -32
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_02k42jp0_uoqr._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_17lx40fyvpom3._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_react-image-crop_dist_index_0khmp4mv3j9zr.js +0 -3
- package/.next/server/chunks/ssr/src_0z149pjrheeb7._.js +0 -3
- package/.next/server/chunks/ssr/src_1vhiktxz2_jj3._.js +0 -3
- package/.next/server/chunks/ssr/src_components_exam_exam-status-badge_tsx_0rozdbhlqsq71._.js +0 -3
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +0 -3
- package/.next/server/chunks/ssr/src_lib_0-wirad5ziskp._.js +0 -6
- package/.next/server/chunks/ssr/src_lib_1vv0-aje_e-zh._.js +0 -6
- package/.next/server/chunks/ssr/src_lib_short-id-client_ts_1v7n6pg50kguj._.js +0 -3
- package/.next/static/chunks/0-hqh6zs3hidn.js +0 -12
- package/.next/static/chunks/02xikk3wlibg1.js +0 -1
- package/.next/static/chunks/0e6ximjg-pqgt.js +0 -1
- package/.next/static/chunks/0wcwopwk4us6h.js +0 -9
- package/.next/static/chunks/0x9-b30mhne-_.js +0 -1
- package/.next/static/chunks/0y5zywo-ll2w3.js +0 -1
- package/.next/static/chunks/17-num1x7o1m2.js +0 -1
- package/.next/static/chunks/1746y345zti-9.js +0 -33
- package/.next/static/chunks/17dk_oppf9-hv.js +0 -12
- package/.next/static/chunks/1egd1e1483_lj.js +0 -1
- package/.next/static/chunks/1o_q928xcfjs3.js +0 -1
- package/.next/static/chunks/25flylmb_qz91.js +0 -1
- package/.next/static/chunks/2924d0kl-68z7.js +0 -193
- package/.next/static/chunks/2cpsg6e2vg7fx.css +0 -3
- package/.next/static/chunks/2ebh36q8lvor_.js +0 -1
- package/.next/static/chunks/2j0linvpqza7u.js +0 -55
- package/.next/static/chunks/2qqyq-iqkv_oa.js +0 -9
- package/.next/static/chunks/2r5aeenvfl93p.js +0 -1
- package/.next/static/chunks/38vt_4ntvy02e.js +0 -1
- package/.next/static/chunks/3c3cp7uzfhnyr.js +0 -1
- package/.next/static/chunks/3gy-_kb72v5lr.js +0 -1
- package/.next/static/chunks/3oz37kz8n7y3b.js +0 -1
- package/.next/static/chunks/3s_fq__cff-ps.js +0 -2
- package/.next/static/chunks/3tv07cyoo_hat.js +0 -1
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_buildManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_ssgManifest.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/biology.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chemistry.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chinese.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/english.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/geography.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/history.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/index.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math-gaosi.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/physics.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/politics.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[[879675,a=>{var b=a.i(164831);let c={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],879675)},986708,a=>{var b=a.i(164831);let c={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],986708)},506376,a=>{var b=a.i(187924),c=a.i(875160);a.s(["f",0,function({label:a}){return(0,b.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,b.jsx)(c.f,{className:"h-7 w-7 animate-spin text-primary"}),a&&(0,b.jsx)("p",{className:"text-sm",children:a})]})}])},557999,a=>{var b=a.i(572131),c=a.i(550194);a.s(["f",0,function(...a){let{t:d}=(0,c.b)(),e=[d.pageTitle.base,...a.map(a=>"string"==typeof a?a.trim():"").filter(a=>a.length>0)].join("-");(0,b.useEffect)(()=>{document.title=e},[e])}])},391020,a=>{let b={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};a.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(a){if("string"!=typeof a)return null;let c=a.trim().toLowerCase();return c?b[c]??null:null}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0uezowk-9l0x4._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[[97546,a=>{var b=a.i(164831);let c={name:"circle-alert",size:24,node:[["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"}]],aliases:["alert-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],97546)},879675,a=>{var b=a.i(164831);let c={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],879675)},391020,a=>{let b={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};a.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(a){if("string"!=typeof a)return null;let c=a.trim().toLowerCase();return c?b[c]??null:null}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0x4us8rfvt68s._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[[308311,a=>{var b=a.i(164831);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],308311)},526634,a=>{var b=a.i(164831);let c={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],526634)},131368,a=>{var b=a.i(187924),c=a.i(526634),d=a.i(550194),e=a.i(368114);let f=[1,2,3,4,5];a.s(["f",0,function({value:a,onChange:g,disabled:h,size:i="sm",showUnrated:j=!0,className:k}){let{t:l}=(0,d.b)(),m=a??0,n="sm"===i?"h-3.5 w-3.5":"h-5 w-5",o=m?l.difficulty.starsLabel.replace("{n}",String(m)):l.difficulty.unrated;return g?(0,b.jsxs)("span",{className:(0,e.f)("inline-flex items-center gap-0.5",k),role:"group","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:l.difficulty.clearHint,children:[f.map(a=>(0,b.jsx)("button",{type:"button",disabled:h,onClick:()=>g(a===m?null:a),"aria-label":l.difficulty.setStars.replace("{n}",String(a)),"aria-pressed":a<=m,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,b.jsx)(c.f,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},a)),!m&&j&&(0,b.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:l.difficulty.unrated})]}):m?(0,b.jsx)("span",{className:(0,e.f)("inline-flex items-center",k),role:"img","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:o,children:f.map(a=>(0,b.jsx)(c.f,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},a))}):j?(0,b.jsx)("span",{className:(0,e.f)("text-xs text-muted-foreground",k),children:l.difficulty.unrated}):null}])},622418,a=>{var b=a.i(187924),c=a.i(79362),d=a.i(308311),e=a.i(519783),f=a.i(786304),g=a.i(550194);let h={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:d.f},reviewing:{className:"bg-primary/10 text-primary",icon:e.f},mastered:{className:"bg-success/15 text-success",icon:c.f}};a.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:a,className:c=""}){let{t:d}=(0,g.b)(),{className:e,icon:i}=h[a],j="mastered"===a?d.notebook.mastered:"reviewing"===a?d.notebook.reviewing:d.notebook.review;return(0,b.jsx)(f.f,{variant:"secondary",className:`${e} ${c}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(i,{className:"h-3 w-3"})," ",j]})})}])},
|
|
1
|
+
module.exports=[[308311,a=>{var b=a.i(164831);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],308311)},526634,a=>{var b=a.i(164831);let c={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],526634)},131368,a=>{var b=a.i(187924),c=a.i(526634),d=a.i(550194),e=a.i(368114);let f=[1,2,3,4,5];a.s(["f",0,function({value:a,onChange:g,disabled:h,size:i="sm",showUnrated:j=!0,className:k}){let{t:l}=(0,d.b)(),m=a??0,n="sm"===i?"h-3.5 w-3.5":"h-5 w-5",o=m?l.difficulty.starsLabel.replace("{n}",String(m)):l.difficulty.unrated;return g?(0,b.jsxs)("span",{className:(0,e.f)("inline-flex items-center gap-0.5",k),role:"group","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:l.difficulty.clearHint,children:[f.map(a=>(0,b.jsx)("button",{type:"button",disabled:h,onClick:()=>g(a===m?null:a),"aria-label":l.difficulty.setStars.replace("{n}",String(a)),"aria-pressed":a<=m,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,b.jsx)(c.f,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},a)),!m&&j&&(0,b.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:l.difficulty.unrated})]}):m?(0,b.jsx)("span",{className:(0,e.f)("inline-flex items-center",k),role:"img","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:o,children:f.map(a=>(0,b.jsx)(c.f,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},a))}):j?(0,b.jsx)("span",{className:(0,e.f)("text-xs text-muted-foreground",k),children:l.difficulty.unrated}):null}])},622418,a=>{var b=a.i(187924),c=a.i(79362),d=a.i(308311),e=a.i(519783),f=a.i(786304),g=a.i(550194);let h={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:d.f},reviewing:{className:"bg-primary/10 text-primary",icon:e.f},mastered:{className:"bg-success/15 text-success",icon:c.f}};a.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:a,className:c=""}){let{t:d}=(0,g.b)(),{className:e,icon:i}=h[a],j="mastered"===a?d.notebook.mastered:"reviewing"===a?d.notebook.reviewing:d.notebook.review;return(0,b.jsx)(f.f,{variant:"secondary",className:`${e} ${c}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(i,{className:"h-3 w-3"})," ",j]})})}])},738912,a=>{function b(a){return"not_attempted"===a||"wrong_attempt"===a||"unknown"===a?a:"unknown"}a.s(["i",0,function(a,c="zh"){return("en"===c?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[b(a)]},"h",0,b,"x",0,function(a,c){return(c||"").trim()?"wrong_attempt":b(a)}])},843326,a=>{a.s(["f",0,function(a){if(a.tags&&a.tags.length>0)return a.tags.map(a=>a.name);if(!a.knowledgePoints)return[];try{let b=JSON.parse(a.knowledgePoints);return Array.isArray(b)?b.filter(a=>"string"==typeof a):[]}catch{return[]}}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0xjcdrflb40xr._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[[342602,(a,b,c)=>{b.exports=a.r(918622)},909270,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.AppRouterContext},736313,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.HooksClientContext},818341,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.ServerInsertedHtml},935112,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactDOM},187924,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactJsxRuntime},738783,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactServerDOMTurbopackClient},572131,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].React}],918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(a,b,c)=>{b.exports=a.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))}];
|
|
1
|
+
module.exports=[[342602,(a,b,c)=>{b.exports=a.r(918622)},909270,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.AppRouterContext},736313,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.HooksClientContext},818341,(a,b,c)=>{b.exports=a.r(342602).vendored.contexts.ServerInsertedHtml},935112,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactDOM},187924,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactJsxRuntime},738783,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].ReactServerDOMTurbopackClient},572131,(a,b,c)=>{b.exports=a.r(342602).vendored["react-ssr"].React}],918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},120635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},324725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},556704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},559043,(a,b,c)=>{b.exports=a.x("next/dist/server/runtime-reacts.external.js",()=>require("next/dist/server/runtime-reacts.external.js"))},469892,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js"].map(b=>a.l(b))).then(()=>b(550364)))}];
|
|
2
2
|
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__0z7upqzuqtse6._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[[986708,a=>{var b=a.i(164831);let c={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],986708)},487410,a=>{var b=a.i(187924),c=a.i(368114);a.s(["f",0,function({options:a,value:d,onChange:e,className:f}){return(0,b.jsx)("div",{className:(0,c.f)("grid gap-1 rounded-xl bg-muted p-1",f),style:{gridTemplateColumns:`repeat(${a.length}, minmax(0, 1fr))`},role:"tablist",children:a.map(({value:a,label:f,icon:g})=>{let h=a===d;return(0,b.jsxs)("button",{type:"button",role:"tab","aria-selected":h,className:(0,c.f)("flex items-center justify-center gap-1.5 rounded-lg px-2 py-2.5 text-sm font-medium transition-all",h?"bg-card text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>e(a),children:[g&&(0,b.jsx)(g,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:f})]},a)})})}])},391020,a=>{let b={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};a.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(a){if("string"!=typeof a)return null;let c=a.trim().toLowerCase();return c?b[c]??null:null}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__10y8dor72926b._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[[879675,a=>{var b=a.i(164831);let c={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],879675)},986708,a=>{var b=a.i(164831);let c={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],986708)},487410,a=>{var b=a.i(187924),c=a.i(368114);a.s(["f",0,function({options:a,value:d,onChange:e,className:f}){return(0,b.jsx)("div",{className:(0,c.f)("grid gap-1 rounded-xl bg-muted p-1",f),style:{gridTemplateColumns:`repeat(${a.length}, minmax(0, 1fr))`},role:"tablist",children:a.map(({value:a,label:f,icon:g})=>{let h=a===d;return(0,b.jsxs)("button",{type:"button",role:"tab","aria-selected":h,className:(0,c.f)("flex items-center justify-center gap-1.5 rounded-lg px-2 py-2.5 text-sm font-medium transition-all",h?"bg-card text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>e(a),children:[g&&(0,b.jsx)(g,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:f})]},a)})})}])},391020,a=>{let b={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};a.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(a){if("string"!=typeof a)return null;let c=a.trim().toLowerCase();return c?b[c]??null:null}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__12jk2bmesr4gc._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[[219107,a=>{var b=a.i(164831);let c={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],219107)},88444,a=>{var b=a.i(164831);let c={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],88444)},726319,a=>{var b=a.i(187924),c=a.i(786304),d=a.i(550194);let e={generating:"bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-900",ready:"bg-indigo-100 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-300 border-indigo-200 dark:border-indigo-900",partial:"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-900",failed:"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300 border-red-200 dark:border-red-900",completed:"bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-300 border-green-200 dark:border-green-900"};a.s(["f",0,function({status:a,recorded:f}){let{t:g}=(0,d.b)(),h=f&&("ready"===a||"partial"===a)?"completed":a;return(0,b.jsx)(c.f,{variant:"outline",className:e[h],children:g.exam.status[h]})}])},695001,a=>{var b=a.i(187924),c=a.i(50944),d=a.i(699570),e=a.i(219107);a.s(["f",0,function({fallbackUrl:a,className:f}){let g=(0,c.useRouter)();return(0,b.jsx)(d.f,{variant:"ghost",size:"icon",onClick:()=>{g.push(a)},className:f,children:(0,b.jsx)(e.f,{className:"h-5 w-5"})})}])},557999,a=>{var b=a.i(572131),c=a.i(550194);a.s(["f",0,function(...a){let{t:d}=(0,c.b)(),e=[d.pageTitle.base,...a.map(a=>"string"==typeof a?a.trim():"").filter(a=>a.length>0)].join("-");(0,b.useEffect)(()=>{document.title=e},[e])}])}],750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},857764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__1rrcp_77jpv98._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[795304,a=>{var b=a.i(164831);let c={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],795304)},526637,642021,a=>{var b=a.i(164831);let c={name:"pen-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],aliases:["edit-3"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],642021),a.s(["f",0,d],526637)},469808,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(238246),e=a.i(79362),f=a.i(875160),g=a.i(533838),h=a.i(211134),i=a.i(699570),j=a.i(591119),k=a.i(550194),l=a.i(630534),m=a.i(397339);let n=a=>new Promise(b=>setTimeout(b,a));async function o(a,b){for(;;){if("hidden"!==document.visibilityState){let c=await (0,m.h)(a);if(b(c),"analyzing"!==c.status&&"saving"!==c.status)return c}await n(2500)}}async function p(a,b,c){let d=[...a],e=async()=>{for(;d.length>0;)await c(d.shift())};await Promise.all(Array.from({length:Math.min(b,d.length)},e))}function q({item:a}){let{t:c}=(0,k.b)(),d=c.batchImport.status[a.status];return"success"===a.status?(0,b.jsxs)("span",{className:"flex items-start gap-1 text-green-700 dark:text-green-300",children:[(0,b.jsx)(e.f,{className:"h-4 w-4 shrink-0 mt-0.5"}),a.imported?.duplicate?c.importFlow.duplicate:d]}):"failed"===a.status?(0,b.jsxs)("span",{className:"flex items-center gap-1 text-destructive",children:[(0,b.jsx)(h.f,{className:"h-4 w-4"}),d]}):(0,b.jsxs)("span",{className:"flex items-center gap-1 text-muted-foreground",children:["pending"!==a.status&&(0,b.jsx)(f.f,{className:"h-4 w-4 animate-spin"}),d]})}a.s(["f",0,function({images:a,subjectId:e,onClose:f}){let{t:h,language:n}=(0,k.b)(),[r,s]=(0,c.useState)(()=>a.map(()=>({status:"pending"}))),t=(0,c.useRef)(!1),u=(0,c.useRef)([]),v=(0,c.useCallback)((a,b)=>{s(c=>c.map((c,d)=>d===a?{...c,...b}:c))},[]),w=(0,c.useCallback)((a,b)=>{let c=b?.data,d=c?.message||(b instanceof Error?b.message:String(b)),e=h.errors[d];v(a,{status:"failed",error:"string"==typeof e?e:d}),l.V.error("[BatchImport]","Question import failed",{index:a,error:d})},[h.errors,v]),x=(0,c.useCallback)(async b=>{v(b,{status:"uploading",error:void 0});try{let c=u.current[b];if(c)await (0,m.R)(c);else{let c=a[b],d=await (0,m.S)({imageBase64:c.dataUrl,language:n,subjectId:e,targetSubjectId:e,mode:"auto",clientTimings:c.timings,imageInfo:c.info});u.current[b]=d.id,v(b,{taskId:d.id})}return v(b,{status:"analyzing"}),!0}catch(a){return w(b,a),!1}},[a,n,e,v,w]),y=(0,c.useCallback)(async a=>{let b=u.current[a];if(b)try{let c=await o(b,b=>v(a,{status:"saving"===b.status?"saving":"analyzing"}));if("saved"!==c.status||!c.errorItemId)throw{data:{message:c.error||"QUESTION_SAVE_FAILED"}};(0,m.N)(b).catch(()=>void 0),v(a,{status:"success",imported:{id:c.errorItemId,shortId:c.errorItemShortId,subjectId:e??null,notebookName:c.notebookName,duplicate:c.duplicate}})}catch(b){w(a,b)}},[e,v,w]),z=(0,c.useCallback)(async a=>{let b=[];await p(a,2,async a=>{await x(a)&&b.push(a)}),await Promise.all(b.map(y))},[x,y]),A=(0,c.useCallback)(async a=>{await x(a)&&await y(a)},[x,y]);(0,c.useEffect)(()=>{t.current||(t.current=!0,z(a.map((a,b)=>b)))},[a,z]);let B=r.filter(a=>"success"===a.status).length,C=r.flatMap((a,b)=>"failed"===a.status?[b]:[]),D=r.some(a=>"pending"===a.status||"uploading"===a.status||"analyzing"===a.status||"saving"===a.status),E=r.some(a=>"pending"===a.status||"uploading"===a.status),F=r.filter(a=>a.taskId&&"uploading"!==a.status).length;return(0,b.jsxs)(j.N,{children:[(0,b.jsxs)(j.Y,{className:"flex flex-row items-center justify-between gap-2 space-y-0",children:[(0,b.jsx)(j.v,{className:"text-base",children:h.batchImport.title}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:h.batchImport.summary.replace("{done}",String(B)).replace("{total}",String(r.length)).replace("{failed}",String(C.length))})]}),(0,b.jsxs)(j.O,{className:"space-y-4",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"batch-upload-progress",children:E?h.batchImport.uploaded.replace("{done}",String(F)).replace("{total}",String(r.length)):D?h.importTasks.uploadedHint:null}),(0,b.jsx)("ul",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:r.map((c,e)=>(0,b.jsxs)("li",{className:"flex gap-3 rounded-lg border p-3",children:[(0,b.jsx)("img",{src:a[e].dataUrl,alt:"",className:"h-20 w-20 shrink-0 rounded object-contain bg-muted"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-1 text-sm",children:[(0,b.jsx)("div",{className:"font-medium",children:h.batchImport.question.replace("{index}",String(e+1))}),(0,b.jsx)(q,{item:c}),"success"===c.status&&c.imported&&(0,b.jsxs)(d.default,{href:`/error-items/${c.imported.id}`,className:"block truncate text-xs text-primary hover:underline",children:[c.imported.notebookName," · ",c.imported.shortId]}),"failed"===c.status&&(0,b.jsxs)(b.Fragment,{children:[c.error&&(0,b.jsx)("p",{className:"line-clamp-2 text-xs text-destructive",children:c.error}),(0,b.jsxs)(i.f,{size:"sm",variant:"outline",className:"h-7",onClick:()=>A(e),children:[(0,b.jsx)(g.f,{className:"mr-1 h-3 w-3"}),h.batchImport.retry]})]})]})]},e))}),(0,b.jsxs)("div",{className:"flex flex-col-reverse sm:flex-row sm:justify-end gap-2",children:[C.length>1&&!D&&(0,b.jsxs)(i.f,{variant:"outline",onClick:()=>z(C),children:[(0,b.jsx)(g.f,{className:"mr-2 h-4 w-4"}),h.batchImport.retryFailed]}),(0,b.jsx)(i.f,{onClick:f,disabled:E,children:h.batchImport.finish})]})]})]})}])},769826,844561,582800,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(164831);let e={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};e.node;let f=(0,d.f)(e);a.s(["f",0,f],844561);var g=a.i(699570),h=a.i(550194),i=a.i(710302);a.s(["f",0,function({types:a,onFile:d,disabled:e=!1,inputRef:j,className:k}){let{t:l}=(0,h.b)(),m=(0,c.useRef)(null),n=j??m,o=Array.from(new Set(a.flatMap(a=>[...a.extensions,...a.mimeTypes]))).join(",");return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(g.f,{type:"button",variant:"outline",onClick:()=>n.current?.click(),disabled:e,className:k,children:[(0,b.jsx)(f,{className:"mr-2 h-4 w-4"}),l.importFile.button]}),(0,b.jsx)("input",{ref:n,type:"file",accept:o,className:"hidden",onChange:b=>{let c=b.target,e=c.files?.[0];if(c.value="",!e)return;let f=a.find(a=>a.extensions.some(a=>e.name.toLowerCase().endsWith(a))||e.type&&a.mimeTypes.includes(e.type.toLowerCase()));f?e.size>f.maxBytes?i.c.error(l.importFile.tooLarge.replace("{max}",String(Math.round(f.maxBytes/1024/1024)))):d(e,f):i.c.error(l.importFile.unsupportedType)},"data-testid":"import-file-input","aria-label":l.importFile.button})]})}],769826);let j=[{key:"text",extensions:[".txt",".md",".markdown"],mimeTypes:["text/plain","text/markdown"],maxBytes:2097152,category:"text"},{key:"docx",extensions:[".docx",".doc"],mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/msword"],maxBytes:0x3200000,category:"doc"},{key:"xlsx",extensions:[".xlsx"],mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],maxBytes:0x1400000,category:"sheet"},{key:"csv",extensions:[".csv"],mimeTypes:["text/csv"],maxBytes:0xa00000,category:"sheet"},{key:"json",extensions:[".json"],mimeTypes:["application/json"],maxBytes:0x3200000,category:"data"},{key:"pdf",extensions:[".pdf"],mimeTypes:["application/pdf"],maxBytes:0x3200000,category:"pdf"}];j.filter(a=>"text"===a.key);let k=j.filter(a=>"text"!==a.key),l=[239,187,191],m=[255,254],n=[254,255];function o(a,b,c=0){return!(a.length<b.length+c)&&b.every((b,d)=>a[c+d]===b)}function p(a){let b=a;return 65279===b.charCodeAt(0)&&(b=b.slice(1)),b.includes("\0")&&(b=b.replace(/\0/g,"")),b.replace(/\r\n/g,"\n").replace(/\r/g,"\n")}a.s(["b",0,k,"u",0,j,"n",0,function(a){let b=new Uint8Array(a);if(o(b,l))return{text:p(new TextDecoder("utf-8").decode(b.subarray(l.length))),encoding:"utf-8"};if(o(b,m))return{text:p(new TextDecoder("utf-16le").decode(b.subarray(m.length))),encoding:"utf-16le"};if(o(b,n))return{text:p(new TextDecoder("utf-16be").decode(b.subarray(n.length))),encoding:"utf-16be"};try{let a=new TextDecoder("utf-8",{fatal:!0}).decode(b);return{text:p(a),encoding:"utf-8"}}catch{return{text:p(new TextDecoder("gb18030").decode(b)),encoding:"gb18030"}}},"G",0,function(a,b){let c=a.toLowerCase(),d=b.toLowerCase().trim();for(let a of j)if(a.extensions.some(a=>c.endsWith(a)))return a;if(d){for(let a of j)if(a.mimeTypes.includes(d))return a}return null}],582800)},84535,606104,145666,a=>{var b=a.i(187924),c=a.i(238246),d=a.i(79362),e=a.i(474215),f=a.i(699570),g=a.i(550194);a.s(["f",0,function({imported:a,onDismiss:h}){let{t:i}=(0,g.b)(),j=(a.duplicate?i.importFlow.duplicate:i.importFlow.imported).replace("{notebook}",a.notebookName||"-").replace("{id}",a.shortId||"-");return(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 rounded-lg border border-green-300 dark:border-green-800 bg-green-50 dark:bg-green-950/40 p-3 text-sm text-green-800 dark:text-green-200",role:"status",children:[(0,b.jsxs)("span",{className:"flex items-start gap-2 flex-1",children:[(0,b.jsx)(d.f,{className:"h-4 w-4 mt-0.5 shrink-0"}),j]}),(0,b.jsxs)("div",{className:"flex gap-2 shrink-0",children:[(0,b.jsx)(c.default,{href:`/error-items/${a.id}`,children:(0,b.jsx)(f.f,{size:"sm",variant:"outline",className:"bg-background",children:i.importFlow.viewItem})}),(0,b.jsx)(f.f,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:h,"aria-label":i.detail.close,children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})}],84535);var h=a.i(869128),i=a.i(111643),j=a.i(253043);a.s(["f",0,function({task:a,onRefresh:d,onDismiss:k}){let{t:l}=(0,g.b)(),m=(0,i.f)(d),n=(0,j.f)("analyzing"===a.status||"saving"===a.status);return(0,b.jsxs)("div",{className:"space-y-2 rounded-xl border bg-card p-3",role:"status","data-testid":"pending-import-task",children:[(0,b.jsxs)("div",{className:"flex items-start gap-2",children:[(0,b.jsx)("p",{className:"flex-1 text-sm text-muted-foreground",children:l.importTasks.uploadedHint}),(0,b.jsx)(f.f,{size:"icon",variant:"ghost",className:"h-7 w-7",onClick:k,"aria-label":l.common.close,children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]}),(0,b.jsx)(h.f,{task:a,now:n,onReview:()=>m.openReview(a),onViewItem:()=>m.viewItem(a),onRetry:()=>m.retry(a),onDiscard:async()=>{await m.discard(a)&&k()}}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.importTasks.stageEstimate," ·"," ",(0,b.jsx)(c.default,{href:"/import-tasks",className:"text-primary hover:underline",children:l.importTasks.viewTasks})]})]})}],606104);var k=a.i(308658),l=a.i(875160);a.s(["f",0,function({parts:a,busy:c,onFinish:d,onDiscard:h}){let{t:i}=(0,g.b)();return(0,b.jsxs)("section",{className:"space-y-3 rounded-2xl border border-primary/40 bg-primary/5 p-4","data-testid":"question-parts",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[(0,b.jsx)(k.f,{className:"h-4 w-4 text-primary"}),i.upload.parts.title.replace("{count}",String(a.length))]}),(0,b.jsx)("ol",{className:"flex gap-2 overflow-x-auto pb-1",children:a.map((a,c)=>(0,b.jsxs)("li",{className:"shrink-0 text-center text-xs text-muted-foreground",children:[(0,b.jsx)("img",{src:a,alt:i.upload.parts.part.replace("{n}",String(c+1)),className:"h-20 max-w-[8rem] rounded border bg-white object-contain"}),i.upload.parts.part.replace("{n}",String(c+1))]},c))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i.upload.parts.hint}),(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,b.jsxs)(f.f,{onClick:d,disabled:c,className:"sm:flex-1",children:[c?(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(k.f,{className:"mr-2 h-4 w-4"}),i.upload.parts.finish.replace("{count}",String(a.length))]}),(0,b.jsxs)(f.f,{variant:"ghost",onClick:h,disabled:c,children:[(0,b.jsx)(e.X,{className:"mr-1 h-4 w-4"}),i.upload.parts.discard]})]})]})}],145666)},825320,344774,748106,671602,965877,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(308658),e=a.i(875160),f=a.i(526637),g=a.i(986708),h=a.i(699570),i=a.i(591119),j=a.i(769826),k=a.i(870430),l=a.i(429246),m=a.i(550194),n=a.i(710302),o=a.i(582800),p=a.i(630534),q=a.i(960927),r=a.i(629137);a.s(["f",0,function({onSubmit:a,isAnalyzing:s,defaultNotebookName:t,onCreateBatch:u,creatingBatch:v=!1,onSwitchToFileImport:w}){let{t:x}=(0,m.b)(),[y,z]=(0,c.useState)(""),A=(0,c.useDeferredValue)(y),B=(0,c.useMemo)(()=>u&&A.trim()?(0,r.J)(A):null,[A,u]),C=B?.detected?B.candidateCount:0,D=B?.ambiguous?B.candidateCount:0,E=y.length>r.i,F=s||v,G=y.trim(),H=async()=>{G&&await a(G)},I=async(a,b=!1)=>{G&&u&&("ai"===a&&E||await u(y,a,b))},J=async a=>{let b,c=(0,o.G)(a.name,a.type);if(c&&"text"!==c.key)return void(w?await (0,n.u)(x.importFile.bankFileHint,{confirmText:x.importFile.bankFileSwitch,cancelText:x.importFile.bankFileStay})&&w():n.c.info(x.importFile.bankFileHint));try{let c=await a.arrayBuffer();b=(0,o.n)(c).text}catch(a){p.V.error("text-input-zone","Failed to read import file",{error:(0,q.Z)(a)}),n.c.error(x.importFile.readFailed);return}y.trim()?z(await (0,n.u)(x.app.importFileReplaceConfirm,{confirmText:x.app.importFileReplace,cancelText:x.app.importFileAppend})?b:y+"\n"+b):z(b)},K=a=>u&&G?(0,b.jsxs)("div",{className:"text-center",children:[(0,b.jsxs)(h.f,{variant:"link",size:"sm",onClick:()=>I("ai"),disabled:F||E,className:"h-auto whitespace-normal",children:[v?(0,b.jsx)(e.f,{className:"mr-1 h-3 w-3 animate-spin"}):(0,b.jsx)(d.f,{className:"mr-1 h-3 w-3"}),v?x.app.creatingBatch:a]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:x.app.aiSplitHint})]}):null;return(0,b.jsx)(i.N,{className:"rounded-2xl",children:(0,b.jsxs)(i.O,{className:"space-y-4 p-6",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-muted-foreground",children:[(0,b.jsx)(f.f,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"text-sm font-medium",children:x.app?.textInputHint||"Enter question text"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(k.f,{htmlFor:"question-text",children:x.editor?.question||"Question Text"}),(0,b.jsx)(j.f,{types:o.u,onFile:J,disabled:F})]}),(0,b.jsx)(l.f,{id:"question-text",value:y,onChange:a=>z(a.target.value),onKeyDown:a=>{(a.ctrlKey||a.metaKey)&&"Enter"===a.key&&(a.preventDefault(),G&&!F&&(C>1&&!E?I("local"):H()))},placeholder:x.app?.textInputPlaceholder||"Paste or type question text here...",className:"min-h-[200px] resize-y font-mono text-sm",disabled:F})]}),t&&(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[x.notebooks?.title||"My Notebooks",": ",t]}),u&&E&&(0,b.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:x.app.textTooLong}),C>1?(0,b.jsxs)("div",{className:"space-y-2","data-testid":"multi-detected",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:[(0,b.jsx)(d.f,{className:"h-4 w-4"}),x.app.multiDetected.replace("{count}",String(C))]}),(B?.overflow??0)>0&&(0,b.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:x.app.overflowHint.replace("{count}",String(B?.overflow))}),(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,b.jsxs)(h.f,{onClick:()=>I("local"),disabled:F,size:"lg",className:"flex-1 bg-gradient-to-r from-indigo-600 to-violet-500 font-medium text-white hover:from-indigo-700 hover:to-violet-600",children:[v?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(d.f,{className:"mr-2 h-4 w-4"}),v?x.app.creatingBatch:x.app.splitPreview.replace("{count}",String(Math.min(C,60)))]}),(0,b.jsxs)(h.f,{onClick:H,disabled:F,size:"lg",variant:"outline",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(g.f,{className:"mr-2 h-4 w-4"}),s?x.editor?.reanswering||"AI solving...":x.app.solveAsOne]})]}),K(x.app.aiSplitMulti)]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.f,{onClick:H,disabled:!G||F,className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 font-medium text-white hover:from-indigo-700 hover:to-violet-600",size:"lg",children:s?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}),x.editor?.reanswering||"AI solving..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.f,{className:"mr-2 h-4 w-4"}),x.app?.aiSolve||"AI Solve"]})}),D>1&&(0,b.jsxs)("div",{className:"space-y-1 rounded-lg bg-muted/60 p-3 text-center","data-testid":"sub-questions-hint",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:x.app.subQuestionsHint.replace("{count}",String(D))}),(0,b.jsxs)(h.f,{variant:"outline",size:"sm",onClick:()=>I("local",!0),disabled:F||E,children:[(0,b.jsx)(d.f,{className:"mr-1 h-3 w-3"}),x.app.splitAnyway.replace("{count}",String(D))]})]}),K(x.app.aiSplit)]}),(0,b.jsx)("p",{className:"text-center text-xs text-muted-foreground",children:x.app?.textInputTip||"After entering the question, AI will automatically solve and generate analysis"})]})})}],825320);let s=new Map([["avif","image/avif"],["bmp","image/bmp"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["gif","image/gif"],["gz","application/gzip"],["htm","text/html"],["html","text/html"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","application/javascript"],["json","application/json"],["md","text/markdown"],["mjs","application/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["ogg","audio/ogg"],["pdf","application/pdf"],["png","image/png"],["ppt","application/powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["svg","image/svg+xml"],["tif","image/tiff"],["tiff","image/tiff"],["txt","text/plain"],["wasm","application/wasm"],["wav","audio/x-wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["zip","application/zip"]]);var t=class extends Error{constructor(a){super("DataTransferItem is not a file"),this.item=a,this.name="UnexpectedObjectError"}};function u(a,b,c){let{webkitRelativePath:d}=a,e="string"==typeof b?b:"string"==typeof d&&d.length>0?d:`./${a.name}`;return"string"!=typeof a.path&&v(a,"path",e),void 0!==c&&Object.defineProperty(a,"handle",{value:c,writable:!1,configurable:!1,enumerable:!0}),v(a,"relativePath",e),a}function v(a,b,c){Object.defineProperty(a,b,{value:c,writable:!1,configurable:!1,enumerable:!0})}let w=[".DS_Store","Thumbs.db"];async function x(a,{mimeTypes:b=s}={}){return(await y(a)).map(a=>"path"in a?function(a,b=s){let{name:c}=a;if(c&&-1!==c.lastIndexOf(".")&&!a.type){let d=c.split(".").pop().toLowerCase(),e=b.get(d);e&&Object.defineProperty(a,"type",{value:e,writable:!1,configurable:!1,enumerable:!0})}return a}(a,b):a)}async function y(a){var b,c,d;if(z(a)&&z(a.dataTransfer))return B(a.dataTransfer,a.type);if(z(b=a)&&z(b.clipboardData)){let b;return C(((b=D((c=a.clipboardData).items).filter(a=>"file"===a.kind).map(a=>a.getAsFile()).filter(a=>null!==a)).length>0?b:D(c.files)).map(a=>u(a)))}if(z(d=a)&&z(d.target))return D(a.target.files).map(a=>u(a));return Array.isArray(a)&&a.every(a=>"getFile"in a&&"function"==typeof a.getFile)?A(a):[]}function z(a){return"object"==typeof a&&null!==a}async function A(a){return(await Promise.all(a.map(a=>a.getFile()))).map(a=>u(a))}async function B(a,b){let c=D(a.items).filter(a=>"file"===a.kind);return"drop"!==b?c:C(function a(b){let c=[];for(let d of b)Array.isArray(d)?c.push(...a(d)):c.push(d);return c}(await Promise.all(c.map(E))))}function C(a){return a.filter(a=>-1===w.indexOf(a.name))}function D(a){return null===a?[]:Array.from(a)}async function E(a){if("function"!=typeof a.webkitGetAsEntry)return F(a);let b=a.webkitGetAsEntry();if(b?.isDirectory){let c=await G(a);return c?.kind==="directory"?H(c,`/${c.name}`):J(b)}return F(a,b)}async function F(a,b){let c=a.getAsFile(),d=await G(a);if(null!=d){let a=c??await d.getFile();return a.handle=d,u(a)}if(!c)throw new t(a);return u(c,b?.fullPath??void 0)}async function G(a){if(globalThis.isSecureContext&&"function"==typeof a.getAsFileSystemHandle)return a.getAsFileSystemHandle()}async function H(a,b){let c=[];for await(let d of a.values()){let a=`${b}/${d.name}`;if("directory"===d.kind)c.push(...await H(d,a));else{let b=await d.getFile();c.push(u(b,a,d))}}return c}async function I(a){return a.isDirectory?J(a):K(a)}function J(a){let b=a.createReader();return new Promise((a,c)=>{let d=[];!function e(){b.readEntries(async b=>{if(b.length){let a=Promise.all(b.map(I));d.push(a),e()}else try{a(await Promise.all(d))}catch(a){c(a)}},a=>{c(a)})}()})}async function K(a){return new Promise((b,c)=>{a.file(c=>{b(u(c,a.fullPath))},a=>{c(a)})})}let L=function(a,b){if(a&&b){let c=(Array.isArray(b)?b:b.split(",")).filter(a=>""!==a.trim());if(0===c.length)return!0;let d=a.name||"",e=(a.type||"").toLowerCase(),f=e.replace(/\/.*$/,"");return c.some(a=>{let b=a.trim().toLowerCase();return"."===b.charAt(0)?d.toLowerCase().endsWith(b):b.endsWith("/*")?f===b.replace(/\/.*$/,""):e===b})}return!0},M=["KB","MB","GB","TB","PB"];function N(a){if(a<1024)return`${a} ${1===a?"byte":"bytes"}`;let b=a/1024,c=0;for(;b>=1024&&c<M.length-1;)b/=1024,c++;return`${Number(b.toFixed(2))} ${M[c]}`}function O(a){return{code:"file-too-large",message:`File is larger than ${N(a)}`}}function P(a){return{code:"file-too-small",message:`File is smaller than ${N(a)}`}}let Q={code:"too-many-files",message:"Too many files"};function R(a,b){let c="application/x-moz-file"===a.type||L(a,b??"")||""===a.type&&"function"==typeof a.getAsFile;return[c,c?null:function(a=""){let b=a.split(","),c=b.length>1?`one of ${b.join(", ")}`:b[0];return{code:"file-invalid-type",message:`File type must be ${c}`}}(b)]}function S(a,b,c){if(T(a.size)){if(T(b)&&T(c)){if(a.size>c)return[!1,O(c)];if(a.size<b)return[!1,P(b)]}else if(T(b)&&a.size<b)return[!1,P(b)];else if(T(c)&&a.size>c)return[!1,O(c)]}return[!0,null]}function T(a){return null!=a}function U(a){return"function"==typeof a.isPropagationStopped?a.isPropagationStopped():void 0!==a.cancelBubble&&a.cancelBubble}function V(a){let b=a.dataTransfer??a.clipboardData;return b?Array.prototype.some.call(b.types,a=>"Files"===a||"application/x-moz-file"===a)||Array.prototype.some.call(b.items??[],W):!!a.target&&!!a.target.files}function W(a){return"object"==typeof a&&null!==a&&"file"===a.kind}function X(a){a.preventDefault()}function Y(...a){return(b,...c)=>a.some(a=>(!U(b)&&a&&a(b,...c),U(b)))}function Z(a){return Array.isArray(a)?a:"string"==typeof a?[a]:[]}function $(a){if(T(a))return Array.isArray(a)?a.filter(a=>T(a)&&T(a.accept)):[{accept:a}]}function _(a,{omitWildcardMimeTypesWithExtensions:b=!1}={}){if(T(a))return Object.entries(a).reduce((a,[c,d])=>{let e=Z(d);return b&&c.endsWith("/*")&&e.some(ab)?a.push(...e):a.push(c,...e),a},[]).filter(a=>aa(a)||ab(a)).join(",")}function aa(a){return"audio/*"===a||"video/*"===a||"image/*"===a||"text/*"===a||"application/*"===a||/\w+\/[-+.\w]+/g.test(a)}function ab(a){return/^.*\.[\w]+$/.test(a)}(0,c.forwardRef)(({children:a,...d},e)=>{let{open:f,...g}=ad(d);return(0,c.useImperativeHandle)(e,()=>({open:f}),[f]),(0,b.jsx)(b.Fragment,{children:a?.({...g,open:f})})}).displayName="Dropzone";let ac={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,isDragGlobal:!1,isProcessing:!1,acceptedFiles:[],fileRejections:[],dragFileRejections:[]};function ad(a={}){let{accept:b,disabled:d=!1,getFilesFromEvent:e=x,maxSize:f=1/0,minSize:g=0,multiple:h=!0,maxFiles:i=0,onDragEnter:j,onDragLeave:k,onDragOver:l,onDrop:m,onDropAccepted:n,onDropRejected:o,onFileDialogCancel:p,onFileDialogOpen:q,useFsAccessApi:r=!1,autoFocus:s=!1,preventDropOnDocument:t=!0,noClick:u=!1,noKeyboard:v=!1,noDrag:w=!1,noDragEventsBubbling:y=!1,noPaste:z=!1,onError:A,validator:B,getErrorMessage:C}=a,D=(0,c.useMemo)(()=>(function(a){let b=$(a);if(!T(b))return;let c={};for(let a of b)for(let[b,d]of Object.entries(a.accept)){let a=c[b]??(c[b]=[]);for(let b of Z(d))a.includes(b)||a.push(b)}return c})(b),[b]),E=(0,c.useMemo)(()=>_(D),[D]),F=(0,c.useMemo)(()=>_(D,{omitWildcardMimeTypesWithExtensions:!0}),[D]),G=(0,c.useMemo)(()=>(function(a){let b=$(a);if(!T(b))return;let c=b.map(a=>{let b=Object.entries(a.accept).filter(([a,b])=>{let c=!0;return aa(a)||(console.warn(`Skipped "${a}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),c=!1),(Array.isArray(b)||"string"==typeof b)&&Z(b).every(ab)||(console.warn(`Skipped "${a}" because an invalid file extension was provided.`),c=!1),c}).reduce((a,[b,c])=>(a[b]=Z(c),a),{});return{description:T(a.description)&&""!==a.description?a.description:function(a){let b=[],c=Object.keys(a);for(let c of Object.values(a))for(let a of Z(c))b.includes(a)||b.push(a);return b.length>0?b.join(", "):c.length>0?c.join(", "):"Files"}(b),accept:b}}).filter(a=>Object.keys(a.accept).length>0);return c.length>0?c:void 0})(b),[b]),H=(0,c.useMemo)(()=>"function"==typeof q?q:af,[q]),I=(0,c.useMemo)(()=>"function"==typeof p?p:af,[p]),J=(0,c.useRef)(null),K=(0,c.useRef)(null),[L,M]=(0,c.useReducer)(ae,ac),{isFocused:N,isFileDialogActive:O}=L,P=(0,c.useRef)(O);P.current=O;let W=(0,c.useRef)(null),ag=(0,c.useCallback)(()=>{W.current?.abort();let a=new AbortController;return W.current=a,M({type:"setProcessing",isProcessing:!0}),a.signal},[]),ah=(0,c.useCallback)(a=>{a.aborted||M({type:"setProcessing",isProcessing:!1})},[]);(0,c.useEffect)(()=>()=>W.current?.abort(),[]);let ai=(0,c.useRef)(!1),aj=()=>{!ai.current&&O&&setTimeout(()=>{if(K.current){let{files:a}=K.current;a?.length||(M({type:"closeDialog"}),I())}},300)};(0,c.useEffect)(()=>(window.addEventListener("focus",aj,!1),()=>{window.removeEventListener("focus",aj,!1)}),[K,O,I,ai]);let ak=(0,c.useRef)([]),al=(0,c.useRef)([]),am=a=>{J.current&&a.target&&J.current.contains(a.target)&&a.defaultPrevented||(a.preventDefault(),ak.current=[])};(0,c.useEffect)(()=>(t&&(document.addEventListener("dragover",X,!1),document.addEventListener("drop",am,!1)),()=>{t&&(document.removeEventListener("dragover",X),document.removeEventListener("drop",am))}),[J,t]),(0,c.useEffect)(()=>{let a=a=>{a.target&&(al.current=[...al.current,a.target]),V(a)&&M({isDragGlobal:!0,type:"setDragGlobal"})},b=a=>{al.current=al.current.filter(b=>b!==a.target&&null!==b),al.current.length>0||M({isDragGlobal:!1,type:"setDragGlobal"})},c=()=>{al.current=[],M({isDragGlobal:!1,type:"setDragGlobal"})},d=()=>{al.current=[],M({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",a,!1),document.addEventListener("dragleave",b,!1),document.addEventListener("dragend",c,!1),document.addEventListener("drop",d,!1),()=>{document.removeEventListener("dragenter",a),document.removeEventListener("dragleave",b),document.removeEventListener("dragend",c),document.removeEventListener("drop",d)}},[J]),(0,c.useEffect)(()=>(!d&&s&&J.current&&J.current.focus(),()=>{}),[J,s,d]);let an=(0,c.useCallback)(a=>{A?A(a):console.error(a)},[A]),ao=(0,c.useCallback)(a=>{a.preventDefault(),a.persist?.(),aC(a),!P.current&&(ak.current=[...ak.current,a.target],V(a)&&Promise.resolve(e(a)).then(b=>{if(U(a)&&!y)return;let c=b.length>0?function({files:a,accept:b,minSize:c,maxSize:d,multiple:e,maxFiles:f=0,validator:g,getErrorMessage:h}){let i=[],j=[],k=(a,b)=>h&&"u">typeof File&&b instanceof File?{...a,message:h(a,b)}:a;a.forEach(a=>{let[e,f]=R(a,b),[g,h]=S(a,c,d);e&&g?i.push(a):j.push({file:a,errors:[f,h].filter(a=>null!=a).map(b=>k(b,a))})});let l=e?f>=1?f:1/0:1;return(i.length>l&&i.slice(l).forEach(a=>{j.push({file:a,errors:[k(Q,a)]})}),j.length>0)?{verdict:"reject",rejections:j}:{verdict:g?"unknown":"accept",rejections:j}}({files:b,accept:E,minSize:g,maxSize:f,multiple:h,maxFiles:i,validator:B,getErrorMessage:C}):null;M({isDragAccept:c?.verdict==="accept",isDragReject:c?.verdict==="reject",isDragUnknown:c?.verdict==="unknown",isDragActive:!0,dragFileRejections:c?.rejections??[],type:"setDraggedFiles"}),j&&j(a)}).catch(a=>an(a)))},[e,j,an,y,E,g,f,h,i,B,C]),ap=(0,c.useCallback)(a=>{if(a.preventDefault(),a.persist?.(),aC(a),P.current)return!1;let b=V(a);if(b&&a.dataTransfer)try{a.dataTransfer.dropEffect="copy"}catch{}return b&&l&&l(a),!1},[l,y]),aq=(0,c.useCallback)(a=>{a.preventDefault(),a.persist?.(),aC(a);let b=ak.current.filter(a=>J.current?.contains(a)),c=b.indexOf(a.target);-1!==c&&b.splice(c,1),ak.current=b,!(b.length>0)&&(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragUnknown:!1,dragFileRejections:[]}),V(a)&&k&&k(a))},[J,k,y]),ar=(0,c.useCallback)(async(a,b,c)=>{let d,e=(a,b)=>C?{...a,message:C(a,b)}:a,j=a=>{let c=[],d=[];a.forEach(({file:a,accepted:b,acceptError:f,sizeMatch:g,sizeError:h,customErrors:i})=>{let j=!i||Array.isArray(i)&&0===i.length;if(b&&g&&j)c.push(a);else{let b=[f,h];i&&(b=b.concat(i)),d.push({file:a,errors:b.filter(a=>null!=a).map(b=>e(b,a))})}});let f=h?i>=1?i:1/0:1;c.length>f&&c.splice(f).forEach(a=>{d.push({file:a,errors:[e(Q,a)]})}),M({acceptedFiles:c,fileRejections:d,type:"setFiles"}),m&&m(c,d,b),d.length>0&&o&&o(d,b),c.length>0&&n&&n(c,b)},k=a.map(a=>{let[b,c]=R(a,F),[d,e]=S(a,g,f);return{file:a,accepted:b,acceptError:c,sizeMatch:d,sizeError:e,customErrors:B?B(a):null}});if(!k.some(({customErrors:a})=>null!=a&&"function"==typeof a.then))return void j(k);try{d=await Promise.all(k.map(async({customErrors:a,...b})=>({...b,customErrors:await a})))}catch(a){c.aborted||(ah(c),an(a));return}c.aborted||j(d)},[M,h,F,g,f,i,m,n,o,B,C,an,ah]),as=(0,c.useCallback)(a=>{if(a.preventDefault(),a.persist?.(),aC(a),ak.current=[],(!P.current||!a.dataTransfer)&&(M({type:"reset"}),V(a))){let b=ag();Promise.resolve(e(a)).then(c=>{if(!b.aborted)return U(a)&&!y?void ah(b):ar(c,a,b)}).catch(a=>{b.aborted||(ah(b),an(a))})}},[e,ar,an,y,ag,ah]),at=(0,c.useCallback)(a=>{if(!V(a))return;a.preventDefault(),a.persist?.(),aC(a);let b=ag();Promise.resolve(e(a)).then(c=>{if(!b.aborted)return U(a)&&!y?void ah(b):ar(c,a,b)}).catch(a=>{b.aborted||(ah(b),an(a))})},[e,ar,an,y,ag,ah]),au=(0,c.useCallback)(()=>{if(ai.current){let a;M({type:"openDialog"}),H(),window.showOpenFilePicker({multiple:h,types:G}).then(b=>(a=ag(),e(b))).then(b=>{if(M({type:"closeDialog"}),!a.aborted)return ar(b,null,a)}).catch(b=>{(a&&ah(a),b instanceof DOMException&&("AbortError"===b.name||b.code===b.ABORT_ERR))?(I(b),M({type:"closeDialog"})):b instanceof DOMException&&("SecurityError"===b.name||b.code===b.SECURITY_ERR)||b instanceof DOMException&&"NotAllowedError"===b.name?(ai.current=!1,K.current?(K.current.value="",K.current.click()):an(Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):an(b)});return}K.current&&(M({type:"openDialog"}),H(),K.current.value="",K.current.click())},[M,H,I,r,ar,an,G,h,ag,ah]),av=(0,c.useCallback)(a=>{J.current?.isEqualNode(a.target)&&(" "===a.key||"Enter"===a.key||32===a.keyCode||13===a.keyCode)&&(a.preventDefault(),au())},[J,au]),aw=(0,c.useCallback)(()=>{M({type:"focus"})},[]),ax=(0,c.useCallback)(()=>{M({type:"blur"})},[]),ay=(0,c.useCallback)(()=>{u||(function(a=window.navigator.userAgent){return -1!==a.indexOf("MSIE")||-1!==a.indexOf("Trident/")||-1!==a.indexOf("Edge/")}()?setTimeout(au,0):au())},[u,au]),az=a=>d?null:a,aA=a=>v?null:az(a),aB=a=>w?null:az(a),aC=a=>{y&&a.stopPropagation()},aD=(0,c.useMemo)(()=>({refKey:a="ref",role:b,onKeyDown:c,onFocus:e,onBlur:f,onClick:g,onDragEnter:h,onDragOver:i,onDragLeave:j,onDrop:k,onPaste:l,...m}={})=>{let n;return{onKeyDown:aA(Y(c,av)),onFocus:aA(Y(e,aw)),onBlur:aA(Y(f,ax)),onClick:az(Y(g,ay)),onDragEnter:aB(Y(h,ao)),onDragOver:aB(Y(i,ap)),onDragLeave:aB(Y(j,aq)),onDrop:aB(Y(k,as)),onPaste:(n=Y(l,at),z?null:az(n)),role:"string"==typeof b&&""!==b?b:"presentation",[a]:J,...!d&&!v?{tabIndex:0}:{},...d?{"aria-disabled":!0}:{},...m}},[J,av,aw,ax,ay,ao,ap,aq,as,at,v,w,z,d]),aE=(0,c.useCallback)(a=>{a.stopPropagation()},[]),aF=(0,c.useMemo)(()=>({refKey:a="ref",onChange:b,onClick:c,...d}={})=>({accept:F,multiple:h,type:"file","aria-label":"file upload",style:{border:0,display:"block",height:0,margin:0,maxWidth:0,opacity:0,overflow:"hidden",padding:0,width:0},onChange:az(Y(b,as)),onClick:az(Y(c,aE)),tabIndex:-1,[a]:K,...d}),[K,b,h,as,d]);return{...L,isFocused:N&&!d,getRootProps:aD,getInputProps:aF,rootRef:J,inputRef:K,open:az(au)}}function ae(a,b){switch(b.type){case"focus":return{...a,isFocused:!0};case"blur":return{...a,isFocused:!1};case"openDialog":return{...ac,isFileDialogActive:!0};case"closeDialog":return{...a,isFileDialogActive:!1};case"setDraggedFiles":return{...a,isDragActive:b.isDragActive,isDragAccept:b.isDragAccept,isDragReject:b.isDragReject,isDragUnknown:b.isDragUnknown,dragFileRejections:b.dragFileRejections};case"setProcessing":return{...a,isProcessing:b.isProcessing};case"setFiles":return{...a,acceptedFiles:b.acceptedFiles,fileRejections:b.fileRejections,dragFileRejections:[],isProcessing:!1,isDragReject:!1,isDragUnknown:!1};case"setDragGlobal":return{...a,isDragGlobal:b.isDragGlobal};case"reset":return{...ac};default:return a}}function af(){}var ag=a.i(540553);let ah=()=>()=>{};function ai(){return(0,c.useSyncExternalStore)(ah,()=>!0,()=>!1)}let aj={"image/*":[".jpg",".jpeg",".png",".webp",".gif",".bmp",".heic",".heif"]};function ak(a){return a&&"u">typeof navigator&&"mediaDevices"in navigator&&"getDisplayMedia"in navigator.mediaDevices}var al=a.i(164831);let am={name:"cloud-upload",size:24,node:[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],aliases:["upload-cloud"]};am.node;let an=(0,al.f)(am);function ao({getRootProps:a,getInputProps:c,isDragActive:d,isAnalyzing:f}){let{t:g}=(0,m.b)();return(0,b.jsx)(i.N,{...a(),className:`group cursor-pointer rounded-2xl border-2 border-dashed shadow-none transition-all hover:border-primary/60 hover:bg-accent/40 ${d?"border-primary bg-accent/60":"border-border bg-card"}`,children:(0,b.jsxs)(i.O,{className:"flex min-h-[260px] flex-col items-center justify-center space-y-4 py-10 text-center md:min-h-[300px]",children:[(0,b.jsx)("input",{...c()}),(0,b.jsx)("div",{className:"rounded-2xl bg-accent p-4 text-primary transition-transform group-hover:scale-105",children:f?(0,b.jsx)(e.f,{className:"h-10 w-10 animate-spin"}):(0,b.jsx)(an,{className:"h-10 w-10"})}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold",children:f?g.app.analyzing:g.upload.analyze}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:f?g.app.analyzing:g.app.dragDrop}),(0,b.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:g.upload.support})]})]})})}var ap=a.i(795304),aq=a.i(844561);let ar={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};ar.node;let as=(0,al.f)(ar);function at({openSource:a,isAnalyzing:c}){let{t:d}=(0,m.b)(),e=[{key:"camera",icon:ap.f,label:d.upload.camera,desc:d.upload.cameraDesc},{key:"album",icon:as,label:d.upload.album,desc:d.upload.albumDesc},{key:"file",icon:aq.f,label:d.upload.file,desc:d.upload.fileDesc}];return(0,b.jsx)("div",{className:"hidden grid-cols-3 gap-2 pointer-coarse:grid","data-testid":"image-sources",children:e.map(d=>(0,b.jsxs)(h.f,{type:"button",variant:"outline",onClick:()=>a(d.key),disabled:c,className:"flex h-auto flex-col gap-1 py-3","aria-description":d.desc,children:[(0,b.jsx)(d.icon,{className:"h-6 w-6"}),(0,b.jsx)("span",{className:"text-sm font-medium",children:d.label})]},d.key))})}function au({cameraInput:a,albumInput:c,fileInput:d,handlePicked:e}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:a,type:"file",accept:"image/*",capture:"environment",className:"hidden",onChange:e,"data-testid":"camera-input"}),(0,b.jsx)("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e,"data-testid":"album-input"}),(0,b.jsx)("input",{ref:d,type:"file",className:"hidden",onChange:e,"data-testid":"file-input"})]})}let av={name:"clipboard-paste",size:24,node:[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]};av.node;let aw=(0,al.f)(av);var ax=a.i(505004);function ay({onPaste:a,isAnalyzing:c}){let{t:d}=(0,m.b)();return(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,b.jsxs)(h.f,{variant:"outline",onClick:a,disabled:c,className:"flex items-center gap-2 w-full sm:w-auto",children:[(0,b.jsx)(aw,{className:"h-4 w-4"}),d.upload.paste]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:d.upload.pasteDesc})]})}function az({onScreenshot:a,isAnalyzing:c,isScreenshotting:d}){let{t:f}=(0,m.b)();return(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,b.jsxs)(h.f,{variant:"outline",onClick:a,disabled:c||d,className:"flex items-center gap-2 w-full sm:w-auto",children:[d?(0,b.jsx)(e.f,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(ax.f,{className:"h-4 w-4"}),d?f.common.pleaseWait:f.upload.screenshot]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:f.upload.screenshotDesc})]})}a.s(["f",0,function({onImageSelect:a,isAnalyzing:d}){let e=function({onImageSelect:a,isAnalyzing:b}){let{t:d}=(0,m.b)(),[e,f]=(0,c.useState)(!1),g=ai();(0,c.useEffect)(()=>{"Notification"in window&&"default"===Notification.permission&&Notification.requestPermission()},[]);let{getRootProps:h,getInputProps:i,isDragActive:j}=ad({onDrop:(0,c.useCallback)(b=>{let c=b[0];c&&a(c)},[a]),accept:aj,maxFiles:1,disabled:b}),k=function(){let[a,b]=(0,c.useState)(null);return(0,c.useEffect)(()=>{if((0,ag.f)()||"u"<typeof navigator||!navigator.mediaDevices?.enumerateDevices)return;let a=!1;return navigator.mediaDevices.enumerateDevices().then(c=>{a||b(c.some(a=>"videoinput"===a.kind))}).catch(()=>void 0),()=>{a=!0}},[]),a}(),l=(0,c.useRef)(null),o=(0,c.useRef)(null),q=(0,c.useRef)(null),r=(0,c.useCallback)(b=>{let c,d;a((d=(c=b.type||"image/png").split("/")[1]||"png",b instanceof File&&b.name?b:new File([b],`clipboard-${Date.now()}.${d}`,{type:c})))},[a]);(0,c.useEffect)(()=>{let a=a=>{if(b)return;let c=function(a){let b=a.target;if(b&&(b.isContentEditable||["INPUT","TEXTAREA"].includes(b.tagName)))return null;let c=Array.from(a.clipboardData?.items??[]).find(a=>"file"===a.kind&&a.type.startsWith("image/"));return c?.getAsFile()??null}(a);c&&(a.preventDefault(),r(c))};return window.addEventListener("paste",a),()=>window.removeEventListener("paste",a)},[b,r]);let s=async()=>{if(!(g&&"u">typeof navigator&&navigator.clipboard&&"function"==typeof navigator.clipboard.read))return void n.c.warning(d.upload.pasteNotSupported);try{for(let a of(await navigator.clipboard.read())){let b=a.types.find(a=>a.startsWith("image/"));if(b){let c=await a.getType(b);r(c);return}}n.c.warning(d.upload.pasteNoImage)}catch(a){p.V.warn("[UploadZone]","Clipboard read failed",{error:a instanceof Error?a.message:String(a)}),a instanceof Error&&"NotAllowedError"===a.name?n.c.warning(d.upload.pastePermissionDenied):n.c.error(d.upload.pasteFailed)}},t=async()=>{if(!ak(g))return void n.c.warning(d.upload.screenshotNotSupported);f(!0);try{let b;"CaptureController"in window&&(b=new window.CaptureController);let c={video:!0,audio:!1,preferCurrentTab:!1};b&&(c.controller=b);let d=await navigator.mediaDevices.getDisplayMedia(c),[e]=d.getVideoTracks(),f=e.getSettings().displaySurface;if(b&&("browser"===f||"window"===f))try{b.setFocusBehavior("no-focus-change"),p.V.info("[UploadZone]","Screenshot focus behavior set to no-change",void 0,{sendToBackend:!1})}catch(a){p.V.warn("[UploadZone]","Unable to set screenshot focus behavior",{error:a})}let g=document.createElement("video");if(g.srcObject=d,g.muted=!0,g.autoplay=!0,g.playsInline=!0,await new Promise((a,b)=>{g.onloadedmetadata=()=>{g.play().then(()=>{a()}).catch(b)},g.onerror=b}),await new Promise(a=>setTimeout(a,500)),0===g.videoWidth||0===g.videoHeight)throw Error("视频没有有效尺寸");let h=document.createElement("canvas");h.width=g.videoWidth,h.height=g.videoHeight;let i=h.getContext("2d");if(!i)throw Error("无法获取canvas上下文");i.drawImage(g,0,0),d.getTracks().forEach(a=>a.stop()),h.toBlob(b=>{b?(a(new File([b],`screenshot-${Date.now()}.png`,{type:"image/png"})),p.V.info("[UploadZone]","Screenshot captured",void 0,{sendToBackend:!1})):n.c.error("截图转换失败")},"image/png",1)}catch(a){p.V.error("[UploadZone]","Screenshot failed",{error:a}),a instanceof Error&&("NotAllowedError"===a.name?n.c.warning(d.upload.screenshotPermissionDenied):n.c.error(`${d.upload.screenshotFailed}: ${a.message}`))}finally{f(!1)}};return{t:d,isClient:g,isAnalyzing:b,isDragActive:j,isScreenshotting:e,hasCamera:k,getRootProps:h,getInputProps:i,cameraInput:l,albumInput:o,fileInput:q,handlePicked:b=>{let c=b.target.files?.[0];b.target.value="",c&&a(c)},openSource:a=>{"camera"===a&&!1===k?n.c.warning(d.upload.noCamera):({camera:l,album:o,file:q})[a].current?.click()},handleClipboardRead:s,handleScreenshot:t}}({onImageSelect:a,isAnalyzing:d});return(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)(au,{cameraInput:e.cameraInput,albumInput:e.albumInput,fileInput:e.fileInput,handlePicked:e.handlePicked}),e.isClient&&(0,b.jsx)(at,{openSource:e.openSource,isAnalyzing:e.isAnalyzing}),(0,b.jsx)(ao,{getRootProps:e.getRootProps,getInputProps:e.getInputProps,isDragActive:e.isDragActive,isAnalyzing:e.isAnalyzing}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:flex-wrap items-stretch sm:items-start justify-center gap-4",children:[e.isClient&&(0,b.jsx)(ay,{onPaste:()=>{e.handleClipboardRead()},isAnalyzing:e.isAnalyzing}),e.isClient&&ak(e.isClient)&&(0,b.jsx)(az,{onScreenshot:()=>{e.handleScreenshot()},isAnalyzing:e.isAnalyzing,isScreenshotting:e.isScreenshotting})]})]})}],344774);var aA=a.i(173390),aB=a.i(368114);let aC={reading:3,converting:6,compressing:10,uploading:20,analyzing:50,processing:85,saving:95};function aD({status:a,message:d,className:f,completed:g}){let h,{t:i}=(0,m.b)(),[j]=(0,c.useState)(()=>Date.now()),[k,l]=(0,c.useState)(0);(0,c.useEffect)(()=>{let a=setInterval(()=>{l(Math.max(0,Math.floor((Date.now()-j)/1e3)))},1e3);return()=>clearInterval(a)},[j]);let n=aC[a],o=i.common.progress.estimated.replace("{percent}",String(n));return(0,b.jsx)("div",{className:(0,aB.f)("fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",f),children:(0,b.jsx)("div",{className:"w-full max-w-md p-6 space-y-6 bg-card rounded-lg border shadow-lg mx-4",children:(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-4 text-center",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(e.f,{className:"h-12 w-12 animate-spin text-primary"}),(0,b.jsx)("div",{className:"absolute inset-0 flex items-center justify-center"})]}),(0,b.jsxs)("div",{className:"space-y-2 w-full",children:[(0,b.jsx)("h3",{className:"text-lg font-semibold tracking-tight","aria-live":"polite",children:d||i.common.progress[a]}),(0,b.jsx)(aA.f,{value:n,"aria-label":o,"aria-valuetext":o,className:"h-2 w-full"})]}),(0,b.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 text-sm text-muted-foreground tabular-nums",children:[(0,b.jsx)("span",{children:o}),(0,b.jsx)("span",{role:"timer","aria-live":"off",children:i.common.progress.elapsed.replace("{time}",(h=[Math.floor(k/60)%60,k%60],k>=3600&&h.unshift(Math.floor(k/3600)),h.map(a=>String(a).padStart(2,"0")).join(":")))})]}),g&&g.length>0&&(0,b.jsx)("ul",{className:"flex w-full flex-wrap justify-center gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums","data-testid":"progress-stages",children:g.map(a=>{var c;return(0,b.jsxs)("li",{children:[a.label," ",(c=a.ms)<1e3?`${Math.round(c)}ms`:`${(c/1e3).toFixed(1)}s`]},a.label)})}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i.common.progress.estimateHint})]})})})}a.s(["f",0,function({status:a,message:c,className:d,completed:e}){return ai()&&"idle"!==a?(0,b.jsx)(aD,{status:a,message:c,className:d,completed:e}):null}],748106);var aE=a.i(50944),aF=a.i(718626),aG=a.i(565821),aH=a.i(397339),aI=a.i(560554),aJ=a.i(643898),aK=a.i(738912);function aL(a){return a.fixedSubjectId??(a.confirmBeforeImport?null:a.importSubjectId??null)}function aM(a,b){return[{label:b.upload.stages.read,ms:a.read??0},...void 0!==a.convert?[{label:b.upload.stages.convert,ms:a.convert}]:[],...void 0!==a.compress?[{label:b.upload.stages.compress,ms:(a.crop??0)+a.compress}]:[]]}async function aN(a,b){let c=[];for(let d of b){let b=await (0,aI.X)(a,d);c.push({dataUrl:b.dataUrl,info:(0,aI.N)(a,b),timings:{...a.timings,...b.timings}})}return c}function aO(a,b){let c=b=>a.reduce((a,c)=>a+c.timings[b],0);return{dataUrl:b.dataUrl,info:{sourceType:`stacked-${a.length}`,sourceBytes:a.reduce((a,b)=>a+(b.info.sourceBytes??0),0),outputWidth:b.width,outputHeight:b.height,outputBytes:b.bytes,quality:b.quality},timings:{read:c("read"),convert:c("convert"),crop:c("crop")+b.timings.crop,compress:c("compress")+b.timings.compress}}}function aP(a,b){return{imageBase64:a.dataUrl,language:b.language,subjectId:b.analyzeSubjectId,targetSubjectId:aL(b),clientTimings:a.timings,imageInfo:a.info}}function aQ(a,b){return{source:"image",imageBase64:a.dataUrl,imageInfo:a.info,language:b.language,subjectId:b.analyzeSubjectId,targetSubjectId:aL(b)}}a.s(["u",0,4,"m",0,aP,"w",0,aQ,"c",0,aM,"b",0,function(a,b){return{source:"text",splitter:a.splitter,forceNumbered:a.forceNumbered||void 0,text:a.text,language:a.language,subjectId:a.analyzeSubjectId??a.textNotebookId,targetSubjectId:aL(b)}},"G",0,function({questionText:a,language:b,textNotebook:c}){return{questionText:a,language:b,forImport:!0,subject:c?.name,subjectId:c?.id}},"d",0,function(a,b){return{questionText:b,answerText:a.answerText,analysis:a.analysis,knowledgePoints:a.knowledgePoints||[],wrongAnswerText:a.wrongAnswerText||"",mistakeAnalysis:a.mistakeAnalysis||"",mistakeStatus:(0,aK.h)(a.mistakeStatus),subject:a.subject||"其他",requiresImage:!1,difficultyStars:a.difficultyStars??null,questionType:a.questionType??null,gradeSemester:a.gradeSemester??null}},"l",0,aN,"H",0,aO],671602),a.s(["f",0,function(a){let{logPrefix:b,t:d,language:e,analyzeSubjectId:f,fixedSubjectId:g,confirmBeforeImport:h,importSubjectId:i}=a,j=(0,aE.useRouter)(),[k,l]=(0,c.useState)(null),[m,o]=(0,c.useState)(!1),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)([]),[v,w]=(0,c.useState)([]),x=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>x.current?.dispose(),[]);let y={fixedSubjectId:g,confirmBeforeImport:h,importSubjectId:i},z=async c=>{a.clearLastImported(),a.clearSaveError(),w([]),a.setAnalysisStep("reading");try{let d=await (0,aI.p)(c,()=>a.setAnalysisStep("converting"));x.current?.dispose(),x.current=d,p.V.info(b,"Image decoded",{format:d.format,sourceType:d.sourceType,sourceBytes:d.sourceBytes,width:d.width,height:d.height,decoder:d.decoder,...d.timings}),l(d.previewUrl),o(!0)}catch(e){let a=e instanceof aI.o?d.upload.decodeErrors[e.code].replace("{format}",e.format.toUpperCase()):(0,q.Z)(e);p.V.warn(b,"Image decode failed",{code:e instanceof aI.o?e.code:"UNKNOWN",format:e instanceof aI.o?e.format:"unknown",sourceType:c.type,sourceBytes:c.size}),n.c.error(a)}finally{a.setAnalysisStep("idle")}},A=async c=>{let g=Date.now();w(aM(c.timings,d));try{a.setAnalysisStep("uploading");let d=await (0,aH.S)(aP(c,{...y,language:e,analyzeSubjectId:f})),h=Date.now()-g;p.V.info(b,"Import task created",{taskId:d.id,...c.info,...c.timings,uploadMs:h}),a.setPendingTaskId(d.id),a.setTask(d)}catch(a){p.V.error(b,"Upload failed",{errorDuration:Date.now()-g,error:(0,q.Z)(a)}),n.c.error((0,aF.f)(a,d))}finally{a.setAnalysisStep("idle"),w([])}},B=async c=>{let e;a.setAnalysisStep("compressing");try{let a=await (0,aJ.v)(c.map(a=>a.dataUrl));e=aO(c,a)}catch(e){p.V.error(b,"Stack parts failed",{parts:c.length,error:(0,q.Z)(e)}),n.c.error((0,aF.f)(e,d)),a.setAnalysisStep("idle");return}p.V.info(b,"Question parts stacked",{parts:c.length,width:e.info.outputWidth,height:e.info.outputHeight}),u([]),await A(e)},C=async c=>{let e=x.current;if(e&&!(t.length>=3)){o(!1),a.setAnalysisStep("compressing");try{let[a]=await aN(e,[c]);u(b=>[...b,a]),n.c.info(d.upload.parts.added.replace("{n}",String(t.length+1)))}catch(a){p.V.error(b,"Crop part failed",{error:(0,q.Z)(a)}),n.c.error((0,aF.f)(a,d))}finally{a.setAnalysisStep("idle")}}},D=async(c,e)=>{let f,g=x.current;if(g&&0!==c.length){o(!1),w(aM(g.timings,d)),a.setAnalysisStep("compressing");try{f=await aN(g,c)}catch(c){p.V.error(b,"Crop failed",{error:(0,q.Z)(c)}),n.c.error((0,aF.f)(c,d)),a.setAnalysisStep("idle");return}if(e){a.setAnalysisStep("idle"),w([]),a.clearLastImported(),a.clearSaveError(),s(f);return}if(t.length>0)return void await B([...t,f[0]]);await A(f[0])}},E=async c=>{let g=x.current;if(g){o(!1),w(aM(g.timings,d)),a.setAnalysisStep("compressing");try{let[h]=await aN(g,[c]);w(aM(h.timings,d)),a.setAnalysisStep("uploading");let i=await (0,aG.v)(aQ(h,{...y,language:e,analyzeSubjectId:f}));p.V.info(b,"Image batch created",{batchId:i.id,...h.info}),j.push(`/import-batches/${i.id}`)}catch(a){p.V.error(b,"Image batch failed",{error:(0,q.Z)(a)}),n.c.error((0,aF.f)(a,d))}finally{a.setAnalysisStep("idle"),w([])}}};return{croppingImage:k,isCropperOpen:m,setIsCropperOpen:o,batchImages:r,setBatchImages:s,parts:t,setParts:u,completedStages:v,preparedRef:x,selectImage:z,cropRegions:D,addPart:C,uploadImage:A,uploadParts:B,autoSplitImage:E,finishParts:()=>B(t),discardParts:()=>u([]),closeBatch:()=>s(null),closeCropper:()=>o(!1)}}],965877)},575835,a=>{var b=a.i(572131),c=a.i(291938),d=a.i(630534),e=a.i(65322),f=a.i(550194),g=a.i(965877),h=a.i(50944),i=a.i(718626),j=a.i(960927),k=a.i(710302),l=a.i(565821),m=a.i(991554),n=a.i(629137),o=a.i(671602),p=a.i(682338),q=a.i(313231);a.s(["f",0,function({logPrefix:a,analyzeSubjectId:r,importSubjectId:s,textNotebook:t,fixedSubjectId:u}){let{t:v,language:w}=(0,f.b)(),x=(0,q.f)(a),[y,z]=(0,b.useState)("idle"),[A,B]=(0,b.useState)(null),[C,D]=(0,b.useState)(!1),[E,F]=(0,b.useState)(null),G=(0,p.a)(E),H=A?.timeouts?.analyze||18e4,I=H+1e4,J=function(a){let{logPrefix:f,t:g,language:p,analyzeSubjectId:q,importSubjectId:r,textNotebook:s,fixedSubjectId:t,confirmBeforeImport:u,aiTimeout:v}=a,w=(0,h.useRouter)(),[x,y]=(0,b.useState)(!1),[z,A]=(0,b.useState)("upload"),[B,C]=(0,b.useState)(null),[D,E]=(0,b.useState)(null),[F,G]=(0,b.useState)(null),H={fixedSubjectId:t,confirmBeforeImport:u,importSubjectId:r},I=async b=>{if(!u){a.setAnalysisStep("saving");let c=await (0,e.a)(b,{subjectId:r,imageUrl:null});G(c),E(null),d.V.info(f,"Imported without review",{id:c.id});return}E(null),C(b),A("review")};return{step:z,setStep:A,cancelReview:()=>{A("upload"),a.clearSaveError()},parsedData:B,setParsedData:C,currentImage:D,setCurrentImage:E,lastImported:F,dismissImported:()=>G(null),creatingBatch:x,submitText:async b=>{a.clearSaveError();let e=Date.now();d.V.info(f,"Starting text-based analysis",{textLength:b.length});try{a.setAnalysisStep("analyzing");let g=await c.k.post("/api/reanswer",(0,o.G)({questionText:b,language:p,textNotebook:s}),{timeout:v,recoverable:!0});a.setAnalysisStep("processing"),await I((0,o.d)(g,b)),d.V.info(f,"Text analysis completed",{totalDuration:Date.now()-e})}catch(a){d.V.error(f,"Text analysis failed",{errorDuration:Date.now()-e,error:(0,j.Z)(a)}),k.c.error((0,i.f)(a,g))}finally{a.setAnalysisStep("idle")}},createTextBatch:async(b,c,e=!1)=>{a.clearSaveError(),y(!0);try{if("local"===c){let a=(0,n.J)(b,{forceNumbered:e});if((0,m.X)(a)){let c;d.V.info(f,"Auto-splitting long text",{candidateCount:a.candidateCount,overflow:a.overflow,tooLong:a.tooLong});try{c=(0,m.U)(b,{forceNumbered:e})}catch(a){d.V.error(f,"Auto-split failed",{error:(0,j.Z)(a)}),k.c.error((0,j.Z)(a));return}let{batches:h,failures:i}=await (0,m.r)(c,{language:p,subjectId:q??s?.id,targetSubjectId:H.fixedSubjectId??(H.confirmBeforeImport?null:H.importSubjectId??null)});for(let a of(d.V.info(f,"Auto-split batches created",{count:h.length,failures:i.length}),h.length>0&&(k.c.success(g.app.autoSplitHint.replace("{count}",String(h.length)).replace("{max}",String(n.S))),w.push(`/import-batches/${h[0].id}`)),i))k.c.error(g.app.autoSplitFailed.replace("{index}",String(a.index+1)).replace("{error}",(0,j.Z)(a.error)));return}}let a=await (0,l.v)((0,o.b)({text:b,splitter:c,forceNumbered:e,language:p,analyzeSubjectId:q,textNotebookId:s?.id},H));d.V.info(f,"Text batch created",{batchId:a.id,splitter:c,questions:a.itemCount}),w.push(`/import-batches/${a.id}`)}catch(a){d.V.error(f,"Text batch failed",{error:(0,j.Z)(a)}),k.c.error((0,i.f)(a,g))}finally{y(!1)}}}}({logPrefix:a,t:v,language:w,analyzeSubjectId:r,importSubjectId:s,textNotebook:t,fixedSubjectId:u,confirmBeforeImport:C,aiTimeout:H,setAnalysisStep:z,clearSaveError:()=>x.setSaveError(null)}),K=(0,g.f)({logPrefix:a,t:v,language:w,analyzeSubjectId:r,fixedSubjectId:u,confirmBeforeImport:C,importSubjectId:s,setAnalysisStep:z,setPendingTaskId:F,setTask:G.setTask,clearLastImported:J.dismissImported,clearSaveError:()=>x.setSaveError(null)});(0,b.useEffect)(()=>{(0,e.x)().then(D),c.k.get("/api/settings").then(B).catch(b=>d.V.error(a,"Failed to fetch config",{error:b}))},[a]),(0,b.useEffect)(()=>{if("idle"===y)return;let a=setTimeout(()=>{d.V.warn("[Progress]","处理超时,关闭进度提示",{analysisStep:y,safetyTimeout:I}),z("idle")},I);return()=>clearTimeout(a)},[y,I]);let L=a=>x.run(()=>c.k.post("/api/error-items",a),a.subjectId),M=async a=>{await L({...a,originalImageUrl:J.currentImage||"",...u?{subjectId:u}:{}})&&(J.setStep("upload"),J.setParsedData(null),J.setCurrentImage(null))};return{step:J.step,cancelReview:J.cancelReview,saveError:x.saveError,dismissSaveError:x.dismissSaveError,analysisStep:y,setAnalysisStep:z,isBusy:"idle"!==y,parsedData:J.parsedData,currentImage:J.currentImage,aiTimeout:H,croppingImage:K.croppingImage,isCropperOpen:K.isCropperOpen,closeCropper:K.closeCropper,lastImported:J.lastImported,dismissImported:J.dismissImported,batchImages:K.batchImages,closeBatch:K.closeBatch,completedStages:K.completedStages,pendingTask:E?G.task:null,refreshPendingTask:G.refresh,dismissPendingTask:()=>F(null),selectImage:K.selectImage,cropRegions:K.cropRegions,submitText:J.submitText,saveQuestion:L,saveReviewed:M,createTextBatch:J.createTextBatch,autoSplitImage:K.autoSplitImage,creatingBatch:J.creatingBatch,parts:K.parts,addPart:K.addPart,finishParts:K.finishParts,discardParts:K.discardParts}}],575835)},991554,a=>{var b=a.i(629137),c=a.i(565821);let d=b.k;function e(a){let b=a=>a?.trim()?a.trim().slice(0,2e4):void 0;return{text:a.text,material:b(a.material),section:a.section?.trim()?a.section.trim().slice(0,500):void 0,label:a.label?.trim()?a.label.trim().slice(0,20):void 0,answer:b(a.answer),analysis:b(a.analysis),knowledgePoints:a.knowledgePoints?.length?a.knowledgePoints.slice(0,100):void 0,difficultyStars:a.difficultyStars??void 0,wrongAnswer:b(a.wrongAnswer),questionType:a.questionType?.trim()?a.questionType.trim().slice(0,100):void 0,image:a.image??void 0}}async function f(a,f){if(0===a.length)throw Error("STRUCTURED_ITEMS_EMPTY");if(a.length>d)throw Error("STRUCTURED_ITEMS_TOO_MANY");let g=f.clientRequestIdPrefix??`sb-${Math.random().toString(36).slice(2,10)}`,h=function(a,c=b.S,d=8388608){let e=[],f=[],g=0;for(let b of a){let a=b.image?.length??0;f.length>0&&(f.length>=c||g+a>d)&&(e.push(f),f=[],g=0),f.push(b),g+=a}return f.length>0&&e.push(f),e}(a),i=[],j=[];for(let a=0;a<h.length;a++){let b=h[a],d={source:"text",splitter:"local",items:b.map(e),language:f.language,subjectId:f.subjectId??void 0,targetSubjectId:f.targetSubjectId??void 0,paperLevel:f.paperLevel??void 0};0===a&&f.origin&&(d.origin=f.origin);try{let b=await (0,c.v)(d,`${g}-${a}`);i.push(b)}catch(c){j.push({index:a,items:b,error:c})}}return{batches:i,clientRequestIdPrefix:g,failures:j}}a.s(["e",0,d,"r",0,f,"X",0,function(a){return a.candidateCount>b.S||a.overflow>0||a.tooLong},"U",0,function(a,c={}){if(a.length>b.f)throw Error("TEXT_TOO_LONG_FOR_AUTO_SPLIT");let d=(0,b.J)(a,{forceNumbered:c.forceNumbered,maxLength:b.f,maxQuestions:b.k});if(d.tooLong)throw Error("TEXT_TOO_LONG_FOR_AUTO_SPLIT");if(d.overflow>0)throw Error("TOO_MANY_QUESTIONS_FOR_AUTO_SPLIT");return d.questions.map(a=>({text:a.text,material:a.material??null,section:a.section??null,label:a.label??null,answer:a.answer??null,analysis:a.analysis??null,knowledgePoints:a.knowledgePoints??null,difficultyStars:a.difficultyStars??null,wrongAnswer:a.wrongAnswer??null,questionType:a.questionType??null}))}])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_05k02824g2tpo._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[557230,563658,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230);var e=a.i(187924),f=a.i(572131),g=a.i(507554),h=a.i(470121),i=a.i(750104),j=a.i(225152),k=a.i(3688),l=a.i(30553),m=Object.defineProperty,n=(a,b)=>m(a,"name",{value:b,configurable:!0}),o="Switch",[p,q]=(0,i.f)(o),[r,s]=p(o);function t(a){let{__scopeSwitch:b,checked:c,children:d,defaultChecked:g,disabled:h,form:i,name:k,onCheckedChange:l,required:m,value:n="on",internal_do_not_use_render:p}=a,[q,s]=(0,j.f)({prop:c,defaultProp:g??!1,onChange:l,caller:o}),[t,u]=f.useState(null),[v,w]=f.useState(null),[x,z]=f.useState(null),A=!t||!!i||!!t.closest("form"),B={checked:q,setChecked:s,disabled:h,control:t,setControl:u,name:k,form:i,value:n,userClick:x,onUserClick:z,required:m,defaultChecked:g,isFormControl:A,bubbleInput:v,setBubbleInput:w};return(0,e.jsx)(r,{scope:b,...B,children:y(p)?p(B):d})}n(t,"SwitchProvider");var u=f.forwardRef(n(function({__scopeSwitch:a,onClick:b,...c},d){let{control:i,form:j,value:k,disabled:m,checked:o,required:p,setControl:q,setChecked:r,onUserClick:t,isFormControl:u,bubbleInput:v}=s("SwitchTrigger",a),w=(0,h.f)(d,q),x=f.useRef(o);return f.useEffect(()=>{let a=j?i?.ownerDocument.getElementById(j):i?.form;if(a instanceof HTMLFormElement){let b=n(()=>r(x.current),"reset");return a.addEventListener("reset",b),()=>a.removeEventListener("reset",b)}},[i,j,r]),(0,e.jsx)(l.V.button,{type:"button",role:"switch","aria-checked":o,"aria-required":p,"data-state":z(o),"data-disabled":m?"":void 0,disabled:m,value:k,...c,ref:w,onClick:(0,g.f)(b,a=>{let b=a.isPropagationStopped();t({requestedChecked:!o,hasConsumerStoppedPropagation:b}),r(a=>!a),v&&u&&!b&&a.stopPropagation()})})},"SwitchTrigger")),v=f.forwardRef(n(function(a,b){let{__scopeSwitch:c,name:d,checked:f,defaultChecked:g,required:h,disabled:i,value:j,onCheckedChange:k,form:l,...m}=a;return(0,e.jsx)(t,{__scopeSwitch:c,checked:f,defaultChecked:g,disabled:i,required:h,onCheckedChange:k,name:d,form:l,value:j,internal_do_not_use_render:({isFormControl:a})=>(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(u,{...m,ref:b,__scopeSwitch:c}),a&&(0,e.jsx)(x,{__scopeSwitch:c})]})})},"Switch")),w=f.forwardRef(n(function(a,b){let{__scopeSwitch:c,...d}=a,f=s("SwitchThumb",c);return(0,e.jsx)(l.V.span,{"data-state":z(f.checked),"data-disabled":f.disabled?"":void 0,...d,ref:b})},"SwitchThumb")),x=f.forwardRef(n(function({__scopeSwitch:a,onClick:b,...c},d){let{control:i,userClick:j,checked:m,defaultChecked:n,required:o,disabled:p,name:q,value:r,form:t,bubbleInput:u,setBubbleInput:v}=s("SwitchBubbleInput",a),w=(0,h.f)(d,v),x=(0,k.f)(i),y=f.useRef(!1),z=f.useRef(m),A=f.useRef(j),B=f.useRef(null);f.useEffect(()=>{if(!u)return;let a=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!a)return;let b=z.current!==m;z.current=m;let c=null!==j&&j!==A.current;if(A.current=j,c)B.current=b?null:j,b&&a.call(u,m),u.dispatchEvent(new Event("click",{bubbles:!j.hasConsumerStoppedPropagation}));else if(b){let b=B.current;B.current=null;let c=b?.requestedChecked===m;y.current=!0,a.call(u,m),u.dispatchEvent(new Event("click",{bubbles:!(c&&b.hasConsumerStoppedPropagation)})),y.current=!1}},[u,m,j]);let C=f.useRef(m);return(0,e.jsx)(l.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:n??C.current,required:o,disabled:p,name:q,value:r,form:t,...c,tabIndex:-1,ref:w,onClick:(0,g.f)(b,a=>{y.current&&a.stopPropagation()}),style:{...c.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"SwitchBubbleInput"));function y(a){return"function"==typeof a}function z(a){return a?"checked":"unchecked"}n(y,"isFunction"),n(z,"getState");var A=a.i(368114);let B=f.forwardRef(({className:a,...b},c)=>(0,e.jsx)(v,{className:(0,A.f)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",a),...b,ref:c,children:(0,e.jsx)(w,{className:(0,A.f)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));B.displayName=v.displayName,a.s(["f",0,B],563658)},144952,206194,190622,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);let m={minimax:{name:"MiniMax",nameEn:"MiniMax",baseUrl:"https://api.minimax.cn/v1",model:"MiniMax-M3.1-Flash",envPrefix:"MINIMAX",consoleUrl:"https://platform.minimax.cn",docs:{cn:"https://platform.minimax.cn/docs/api-reference/api-overview",intl:"https://platform.minimax.io/docs/api-reference/api-overview",apiKey:"https://platform.minimax.cn/docs/guides/quickstart-preparation",models:"https://platform.minimax.cn/docs/guides/models-intro"}},glm:{name:"智谱 GLM",nameEn:"Zhipu GLM",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-5.3-flash",envPrefix:"GLM",consoleUrl:"https://open.bigmodel.cn",docs:{cn:"https://docs.bigmodel.cn/cn/guide/start/quick-start",intl:"https://docs.z.ai/guides/overview/quick-start",apiKey:"https://docs.bigmodel.cn/cn/guide/start/quick-start",models:"https://docs.bigmodel.cn/cn/guide/start/model-overview"}},deepseek:{name:"DeepSeek",nameEn:"DeepSeek",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",envPrefix:"DEEPSEEK",consoleUrl:"https://platform.deepseek.com",docs:{cn:"https://api-docs.deepseek.com/zh-cn/",apiKey:"https://api-docs.deepseek.com/zh-cn/",models:"https://api-docs.deepseek.com/zh-cn/quick_start/pricing"}},kimi:{name:"Kimi",nameEn:"Kimi",baseUrl:"https://api.moonshot.cn/v1",model:"kimi-k3.1-pro",envPrefix:"KIMI",consoleUrl:"https://platform.kimi.com",docs:{cn:"https://platform.moonshot.cn/docs/introduction",intl:"https://platform.moonshot.ai/docs/introduction",apiKey:"https://platform.moonshot.cn/docs/introduction",models:"https://platform.moonshot.cn/docs/pricing/chat"}},qwen:{name:"千问 Qwen",nameEn:"Qwen",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",model:"qwen3.8-max",envPrefix:"QWEN",consoleUrl:"https://bailian.console.aliyun.com",docs:{cn:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",intl:"https://www.alibabacloud.com/help/en/model-studio/token-plan-personal-quick-start",apiKey:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",models:"https://help.aliyun.com/zh/model-studio/models"}},stepfun:{name:"阶跃星辰 StepFun",nameEn:"StepFun",baseUrl:"https://api.stepfun.com/step_plan/v1",model:"step-5-preview",envPrefix:"STEPFUN",consoleUrl:"https://platform.stepfun.com",docs:{cn:"https://platform.stepfun.com/docs/zh/guides/developer/openai",intl:"https://platform.stepfun.ai/docs/en/guides/developer/openai",apiKey:"https://platform.stepfun.com/docs/zh/guides/developer/openai",models:"https://platform.stepfun.com/docs/zh/guides/models/list"}},volcengine:{name:"火山引擎 豆包",nameEn:"Volcengine Doubao",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1330626",intl:"https://docs.byteplus.com/en/docs/ModelArk/1330626",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}},"volcengine-agent":{name:"火山引擎 Agent Plan",nameEn:"Volcengine Agent Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/plan/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_AGENT",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",apiKey:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",models:"https://www.volcengine.com/docs/82379/2366394"}},"volcengine-coding":{name:"火山引擎 Coding Plan",nameEn:"Volcengine Coding Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_CODING",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1928261",apiKey:"https://www.volcengine.com/docs/82379/1928261",models:"https://www.volcengine.com/docs/82379/1928261"}},"volcengine-free":{name:"火山引擎(免费试用)",nameEn:"Volcengine (free trial)",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_FREE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1399514",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}}},n=Object.keys(m);function o(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(m,a)}a.s(["$",0,m,"U",0,n,"z",0,function(a,b){let c=m[a];return"zh"===b?c.name:c.nameEn},"j",0,o,"k",0,function(a,b){let c=m[a];return{apiKey:b?.apiKey||"",baseUrl:b?.baseUrl||c.baseUrl,model:b?.model||c.model}}],190622);var p=a.i(291938),q=a.i(960927),r=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:m,language:n}=(0,k.b)(),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=a=>m.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),x=async()=>{let b=function(a,b){let c=a.aiProvider;if("openai"===c){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===c){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:c,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:b}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===c)return{ok:!0,body:{provider:c,model:a.minimaxCode?.model,language:b}};if("gemini"===c||"anthropic"===c||o(c)){let d=a[c];return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,n);if(!b.ok){if("UNSUPPORTED_PROVIDER"===b.error)return;v({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===b.error?m.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":m.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}t(!0),v(null);try{v(await p.k.post("/api/ai/test",b.body))}catch(a){r.V.error("[AiConnectionTest]","AI connection test failed",{error:a}),v({success:!1,textSupport:!1,visionSupport:!1,textError:(0,q.Z)(a)})}finally{t(!1)}};return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:x,disabled:s||g,className:"flex-1",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),s?m.settings?.ai?.testing||"Testing...":m.settings?.ai?.testConnection||"Test Connection"]}),h]}),u&&(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${u.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[(0,b.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:u.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}),(0,b.jsx)("span",{className:"text-green-700 dark:text-green-300",children:m.settings?.ai?.testSuccess||"Connection Successful"}),u.modelInfo&&(0,b.jsxs)("span",{className:"text-green-600 text-xs",children:["(",u.modelInfo,")"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),(0,b.jsx)("span",{className:"text-red-700 dark:text-red-300",children:m.settings?.ai?.testFailed||"Connection Failed"})]})}),u.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),u.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",u.visionError?w(u.visionError):m.settings?.ai?.notSupported||"Not Supported"]})]}),!u.visionSupport&&(0,b.jsx)(l,{detail:u.visionErrorDetail}),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:m.settings?.ai?.testNetworkNote})]}),!u.success&&u.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:w(u.textError)}),!u.success&&(0,b.jsx)(l,{detail:u.textErrorDetail})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(492710),i=a.i(612416),j=a.i(340898),k=a.i(168370),l=a.i(474896),m=a.i(557230),n=a.i(519783),o=a.i(786304),p=a.i(866718),q=a.i(895605),r=a.i(563658),s=a.i(550194),t=a.i(529759),u=a.i(986705);function v({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:h,onCheckin:i}){let j,{t:k}=(0,s.b)(),{timeZone:l}=(0,t.M)(),m=k.settings?.ai?.minimaxCode,{today:n,last:p}=a,w=p&&"failed"!==p.status?p:null,x=!!(n?.checkedToday||w),y=String(w?.points??(n?n.points+n.bonusPoints:0)),z=String(w?.streakDays??n?.streakDays??0);return j=w?.trigger==="auto"&&"checked-in"===w.status?(m?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,u.r)(w.at,"HH:mm",l)).replace("{points}",y).replace("{days}",z):x?(m?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(m?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?m?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":m?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:m?.checkinToday||"Today's check-in"}),(0,b.jsxs)(o.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(q.f,{className:"mr-1 h-3 w-3"}),x?m?.checkinSuccess||"Checked in":m?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:i,disabled:h,children:[h&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:j}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:m?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?.autoCheckinHint})]}),(0,b.jsx)(r.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let w=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var x=a.i(572131),y=a.i(291938),z=a.i(960927),A=a.i(710302),B=a.i(630534);function C({value:a,onChange:f}){let{t:g}=(0,s.b)(),h=g.settings?.ai?.minimaxCode,{status:i,loading:j,pending:q,busy:r,refresh:t,login:u,logout:D,checkin:E}=function(){let{t:a}=(0,s.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,x.useState)(null),[e,f]=(0,x.useState)(!0),[g,h]=(0,x.useState)(null),[i,j]=(0,x.useState)(!1),k=(0,x.useRef)(null),l=(0,x.useCallback)(async()=>{f(!0);try{let a=await y.k.get("/api/minimax-code");d(a),a.pendingLogin&&h(a.pendingLogin)}catch(a){B.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,x.useEffect)(()=>{l()},[l]),(0,x.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await y.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){k.current=setTimeout(c,g.intervalMs);return}h(null),"ok"===d.status?A.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?A.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&A.c.error(b?.loginDenied||"Authorization declined"),l()}catch(c){if(a)return;h(null),A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(c)}`)}};return k.current=setTimeout(c,g.intervalMs),()=>{a=!0,k.current&&clearTimeout(k.current)}},[g,l,b]);let m=async()=>{j(!0);try{await y.k.delete("/api/minimax-code"),h(null),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}},n=async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/checkin",{});"failed"===a.status?A.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):A.c.success(b?.checkinSuccess||"Checked in"),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}};return{status:c,loading:e,pending:g,busy:i,refresh:l,login:async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/login",{});h(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(a)}`)}finally{j(!1)}},logout:m,checkin:n}}(),F=i?.login??"none",G=i?.account,H=i?.credits,I={none:h?.statusNone||"Not signed in",active:h?.statusActive||"Signed in",expired:h?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":h?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:h?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:j,"aria-label":h?.refresh||"Refresh",children:(0,b.jsx)(n.f,{className:`h-4 w-4 ${j?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(o.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(h?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:h?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&i&&(0,b.jsx)(v,{checkin:i.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:r,onCheckin:()=>void E()}),q?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),h?.waiting]}),q.userCode&&(0,b.jsxs)("p",{children:[h?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:q.userCode})]}),(0,b.jsxs)("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[h?.openLink||"Open the authorization page"," ",(0,b.jsx)(k.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:r,children:[r?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4"}),"none"===F?h?.login||"Sign in with browser":h?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:r,children:[(0,b.jsx)(m.f,{className:"mr-2 h-4 w-4"}),h?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:h?.model||"Model"}),(0,b.jsx)(p.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:w.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.risk})]})}var D=a.i(403512),E=a.i(951675),F=a.i(175592),G=a.i(676330),H=a.i(152679),I=a.i(148463);function J({value:a,onChange:c}){let{t:g}=(0,s.b)(),h=(0,I.f)("openai"),i=a?.instances||[],j=a?.activeInstanceId,k=i.find(a=>a.id===j),l=(b,d)=>{c({...a,instances:i.map(a=>a.id===j?{...a,[b]:d}:a)})},m=async()=>{if(!j||!await (0,A.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=i.filter(a=>a.id!==j);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(i.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${i.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...i,a],activeInstanceId:a.id})},disabled:i.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(D.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),i.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:j||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:i.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),i.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:m,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(E.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),i.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),k&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.name||"",onChange:a=>l("name",a.target.value),placeholder:"e.g. GLM-4V",className:k.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:k.apiKey||"",onChange:a=>l("apiKey",a.target.value),placeholder:"sk-...",className:k.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.baseUrl||"",onChange:a=>l("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:k.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(F.f,{provider:"openai",apiKey:k.apiKey,baseUrl:k.baseUrl,currentModel:k.model,onModelChange:a=>l("model",a),docsHref:h?.models})]})]})}function K({provider:a}){let{t:c}=(0,s.b)(),d=c.settings.ai.providerDocs,e=(0,I.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(k.f,{className:"h-3 w-3"})]},a.href))]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,s.b)(),g=L.$[a],h=(a,b)=>d({...c,[a]:b}),i={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.jsxs)("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-xs text-green-800 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",children:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:c?.apiKey||"",onChange:a=>h("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(p.f,{value:c?.baseUrl||"",onChange:a=>h("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(F.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>h("model",a),docsHref:g.docs.models})]})}a.s(["f",0,function({config:a,setConfig:k,loading:l,saving:m,onSave:n}){let{t:o,language:p}=(0,s.b)();return l?(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:o.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>k(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:"minimax",children:(0,L.z)("minimax",p)}),(0,b.jsx)(f.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),L.U.filter(a=>"minimax"!==a).map(a=>(0,b.jsx)(f.T,{value:a,children:(0,L.z)(a,p)},a)),(0,b.jsx)(f.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,b.jsx)(f.T,{value:"azure",children:"Azure OpenAI"}),(0,b.jsx)(f.T,{value:"openai",children:"OpenAI / Compatible"}),(0,b.jsx)(f.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,b.jsx)(K,{provider:a.aiProvider})]}),"openai"===a.aiProvider&&(0,b.jsx)(J,{value:a.openai,onChange:a=>k(b=>({...b,openai:a}))}),"gemini"===a.aiProvider&&(0,b.jsx)(j.f,{value:a.gemini,onChange:a=>k(b=>({...b,gemini:a}))}),"minimax-code"===a.aiProvider&&(0,b.jsx)(C,{value:a.minimaxCode,onChange:a=>k(b=>({...b,minimaxCode:a}))}),"anthropic"===a.aiProvider&&(0,b.jsx)(h.f,{value:a.anthropic,onChange:a=>k(b=>({...b,anthropic:a}))}),(0,L.j)(a.aiProvider)&&(0,b.jsx)(M,{provider:a.aiProvider,value:a[a.aiProvider],onChange:a=>k(b=>({...b,[b.aiProvider]:a}))},a.aiProvider),"azure"===a.aiProvider&&(0,b.jsx)(i.f,{value:a.azure,onChange:a=>k(b=>({...b,azure:a}))}),(0,b.jsx)(g.f,{config:a,saving:m,saveButton:(0,b.jsxs)(d.f,{onClick:n,disabled:m,className:"flex-1",children:[m&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),o.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,u.L)(a.timeZone??u.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
|
|
1
|
+
(()=>{"use strict";module.exports=[557230,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230)},144952,206194,190622,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);let m={minimax:{name:"MiniMax",nameEn:"MiniMax",baseUrl:"https://api.minimax.cn/v1",model:"MiniMax-M3.1-Flash",envPrefix:"MINIMAX",consoleUrl:"https://platform.minimax.cn",docs:{cn:"https://platform.minimax.cn/docs/api-reference/api-overview",intl:"https://platform.minimax.io/docs/api-reference/api-overview",apiKey:"https://platform.minimax.cn/docs/guides/quickstart-preparation",models:"https://platform.minimax.cn/docs/guides/models-intro"}},glm:{name:"智谱 GLM",nameEn:"Zhipu GLM",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-5.3-flash",envPrefix:"GLM",consoleUrl:"https://open.bigmodel.cn",docs:{cn:"https://docs.bigmodel.cn/cn/guide/start/quick-start",intl:"https://docs.z.ai/guides/overview/quick-start",apiKey:"https://docs.bigmodel.cn/cn/guide/start/quick-start",models:"https://docs.bigmodel.cn/cn/guide/start/model-overview"}},deepseek:{name:"DeepSeek",nameEn:"DeepSeek",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",envPrefix:"DEEPSEEK",consoleUrl:"https://platform.deepseek.com",docs:{cn:"https://api-docs.deepseek.com/zh-cn/",apiKey:"https://api-docs.deepseek.com/zh-cn/",models:"https://api-docs.deepseek.com/zh-cn/quick_start/pricing"}},kimi:{name:"Kimi",nameEn:"Kimi",baseUrl:"https://api.moonshot.cn/v1",model:"kimi-k3.1-pro",envPrefix:"KIMI",consoleUrl:"https://platform.kimi.com",docs:{cn:"https://platform.moonshot.cn/docs/introduction",intl:"https://platform.moonshot.ai/docs/introduction",apiKey:"https://platform.moonshot.cn/docs/introduction",models:"https://platform.moonshot.cn/docs/pricing/chat"}},qwen:{name:"千问 Qwen",nameEn:"Qwen",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",model:"qwen3.8-max",envPrefix:"QWEN",consoleUrl:"https://bailian.console.aliyun.com",docs:{cn:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",intl:"https://www.alibabacloud.com/help/en/model-studio/token-plan-personal-quick-start",apiKey:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",models:"https://help.aliyun.com/zh/model-studio/models"}},stepfun:{name:"阶跃星辰 StepFun",nameEn:"StepFun",baseUrl:"https://api.stepfun.com/step_plan/v1",model:"step-5-preview",envPrefix:"STEPFUN",consoleUrl:"https://platform.stepfun.com",docs:{cn:"https://platform.stepfun.com/docs/zh/guides/developer/openai",intl:"https://platform.stepfun.ai/docs/en/guides/developer/openai",apiKey:"https://platform.stepfun.com/docs/zh/guides/developer/openai",models:"https://platform.stepfun.com/docs/zh/guides/models/list"}},volcengine:{name:"火山引擎 豆包",nameEn:"Volcengine Doubao",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1330626",intl:"https://docs.byteplus.com/en/docs/ModelArk/1330626",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}},"volcengine-agent":{name:"火山引擎 Agent Plan",nameEn:"Volcengine Agent Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/plan/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_AGENT",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",apiKey:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",models:"https://www.volcengine.com/docs/82379/2366394"}},"volcengine-coding":{name:"火山引擎 Coding Plan",nameEn:"Volcengine Coding Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_CODING",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1928261",apiKey:"https://www.volcengine.com/docs/82379/1928261",models:"https://www.volcengine.com/docs/82379/1928261"}},"volcengine-free":{name:"火山引擎(免费试用)",nameEn:"Volcengine (free trial)",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_FREE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1399514",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}}},n=Object.keys(m);function o(a){return"string"==typeof a&&Object.prototype.hasOwnProperty.call(m,a)}a.s(["$",0,m,"U",0,n,"z",0,function(a,b){let c=m[a];return"zh"===b?c.name:c.nameEn},"j",0,o,"k",0,function(a,b){let c=m[a];return{apiKey:b?.apiKey||"",baseUrl:b?.baseUrl||c.baseUrl,model:b?.model||c.model}}],190622);var p=a.i(291938),q=a.i(960927),r=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:m,language:n}=(0,k.b)(),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=a=>m.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),x=async()=>{let b=function(a,b){let c=a.aiProvider;if("openai"===c){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===c){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:c,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:b}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===c)return{ok:!0,body:{provider:c,model:a.minimaxCode?.model,language:b}};if("gemini"===c||"anthropic"===c||o(c)){let d=a[c];return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,n);if(!b.ok){if("UNSUPPORTED_PROVIDER"===b.error)return;v({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===b.error?m.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":m.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}t(!0),v(null);try{v(await p.k.post("/api/ai/test",b.body))}catch(a){r.V.error("[AiConnectionTest]","AI connection test failed",{error:a}),v({success:!1,textSupport:!1,visionSupport:!1,textError:(0,q.Z)(a)})}finally{t(!1)}};return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:x,disabled:s||g,className:"flex-1",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),s?m.settings?.ai?.testing||"Testing...":m.settings?.ai?.testConnection||"Test Connection"]}),h]}),u&&(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${u.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[(0,b.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:u.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}),(0,b.jsx)("span",{className:"text-green-700 dark:text-green-300",children:m.settings?.ai?.testSuccess||"Connection Successful"}),u.modelInfo&&(0,b.jsxs)("span",{className:"text-green-600 text-xs",children:["(",u.modelInfo,")"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),(0,b.jsx)("span",{className:"text-red-700 dark:text-red-300",children:m.settings?.ai?.testFailed||"Connection Failed"})]})}),u.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[m.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),u.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",m.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",u.visionError?w(u.visionError):m.settings?.ai?.notSupported||"Not Supported"]})]}),!u.visionSupport&&(0,b.jsx)(l,{detail:u.visionErrorDetail}),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:m.settings?.ai?.testNetworkNote})]}),!u.success&&u.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:w(u.textError)}),!u.success&&(0,b.jsx)(l,{detail:u.textErrorDetail})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(492710),i=a.i(612416),j=a.i(340898),k=a.i(168370),l=a.i(474896),m=a.i(557230),n=a.i(519783),o=a.i(786304),p=a.i(866718),q=a.i(895605),r=a.i(563658),s=a.i(550194),t=a.i(529759),u=a.i(986705);function v({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:h,onCheckin:i}){let j,{t:k}=(0,s.b)(),{timeZone:l}=(0,t.M)(),m=k.settings?.ai?.minimaxCode,{today:n,last:p}=a,w=p&&"failed"!==p.status?p:null,x=!!(n?.checkedToday||w),y=String(w?.points??(n?n.points+n.bonusPoints:0)),z=String(w?.streakDays??n?.streakDays??0);return j=w?.trigger==="auto"&&"checked-in"===w.status?(m?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,u.r)(w.at,"HH:mm",l)).replace("{points}",y).replace("{days}",z):x?(m?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(m?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?m?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":m?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:m?.checkinToday||"Today's check-in"}),(0,b.jsxs)(o.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(q.f,{className:"mr-1 h-3 w-3"}),x?m?.checkinSuccess||"Checked in":m?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:i,disabled:h,children:[h&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:j}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:m?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?.autoCheckinHint})]}),(0,b.jsx)(r.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let w=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var x=a.i(572131),y=a.i(291938),z=a.i(960927),A=a.i(710302),B=a.i(630534);function C({value:a,onChange:f}){let{t:g}=(0,s.b)(),h=g.settings?.ai?.minimaxCode,{status:i,loading:j,pending:q,busy:r,refresh:t,login:u,logout:D,checkin:E}=function(){let{t:a}=(0,s.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,x.useState)(null),[e,f]=(0,x.useState)(!0),[g,h]=(0,x.useState)(null),[i,j]=(0,x.useState)(!1),k=(0,x.useRef)(null),l=(0,x.useCallback)(async()=>{f(!0);try{let a=await y.k.get("/api/minimax-code");d(a),a.pendingLogin&&h(a.pendingLogin)}catch(a){B.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,x.useEffect)(()=>{l()},[l]),(0,x.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await y.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){k.current=setTimeout(c,g.intervalMs);return}h(null),"ok"===d.status?A.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?A.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&A.c.error(b?.loginDenied||"Authorization declined"),l()}catch(c){if(a)return;h(null),A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(c)}`)}};return k.current=setTimeout(c,g.intervalMs),()=>{a=!0,k.current&&clearTimeout(k.current)}},[g,l,b]);let m=async()=>{j(!0);try{await y.k.delete("/api/minimax-code"),h(null),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}},n=async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/checkin",{});"failed"===a.status?A.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):A.c.success(b?.checkinSuccess||"Checked in"),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}};return{status:c,loading:e,pending:g,busy:i,refresh:l,login:async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/login",{});h(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(a)}`)}finally{j(!1)}},logout:m,checkin:n}}(),F=i?.login??"none",G=i?.account,H=i?.credits,I={none:h?.statusNone||"Not signed in",active:h?.statusActive||"Signed in",expired:h?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":h?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:h?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:j,"aria-label":h?.refresh||"Refresh",children:(0,b.jsx)(n.f,{className:`h-4 w-4 ${j?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(o.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(h?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:h?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&i&&(0,b.jsx)(v,{checkin:i.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:r,onCheckin:()=>void E()}),q?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),h?.waiting]}),q.userCode&&(0,b.jsxs)("p",{children:[h?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:q.userCode})]}),(0,b.jsxs)("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[h?.openLink||"Open the authorization page"," ",(0,b.jsx)(k.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:r,children:[r?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4"}),"none"===F?h?.login||"Sign in with browser":h?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:r,children:[(0,b.jsx)(m.f,{className:"mr-2 h-4 w-4"}),h?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:h?.model||"Model"}),(0,b.jsx)(p.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:w.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.risk})]})}var D=a.i(403512),E=a.i(951675),F=a.i(175592),G=a.i(676330),H=a.i(152679),I=a.i(148463);function J({value:a,onChange:c}){let{t:g}=(0,s.b)(),h=(0,I.f)("openai"),i=a?.instances||[],j=a?.activeInstanceId,k=i.find(a=>a.id===j),l=(b,d)=>{c({...a,instances:i.map(a=>a.id===j?{...a,[b]:d}:a)})},m=async()=>{if(!j||!await (0,A.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=i.filter(a=>a.id!==j);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(i.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${i.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...i,a],activeInstanceId:a.id})},disabled:i.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(D.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),i.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:j||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:i.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),i.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:m,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(E.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),i.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),k&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.name||"",onChange:a=>l("name",a.target.value),placeholder:"e.g. GLM-4V",className:k.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:k.apiKey||"",onChange:a=>l("apiKey",a.target.value),placeholder:"sk-...",className:k.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.baseUrl||"",onChange:a=>l("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:k.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(F.f,{provider:"openai",apiKey:k.apiKey,baseUrl:k.baseUrl,currentModel:k.model,onModelChange:a=>l("model",a),docsHref:h?.models})]})]})}function K({provider:a}){let{t:c}=(0,s.b)(),d=c.settings.ai.providerDocs,e=(0,I.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(k.f,{className:"h-3 w-3"})]},a.href))]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,s.b)(),g=L.$[a],h=(a,b)=>d({...c,[a]:b}),i={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.jsxs)("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-xs text-green-800 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",children:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:c?.apiKey||"",onChange:a=>h("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(p.f,{value:c?.baseUrl||"",onChange:a=>h("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(F.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>h("model",a),docsHref:g.docs.models})]})}a.s(["f",0,function({config:a,setConfig:k,loading:l,saving:m,onSave:n}){let{t:o,language:p}=(0,s.b)();return l?(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:o.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>k(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:"minimax",children:(0,L.z)("minimax",p)}),(0,b.jsx)(f.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),L.U.filter(a=>"minimax"!==a).map(a=>(0,b.jsx)(f.T,{value:a,children:(0,L.z)(a,p)},a)),(0,b.jsx)(f.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,b.jsx)(f.T,{value:"azure",children:"Azure OpenAI"}),(0,b.jsx)(f.T,{value:"openai",children:"OpenAI / Compatible"}),(0,b.jsx)(f.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,b.jsx)(K,{provider:a.aiProvider})]}),"openai"===a.aiProvider&&(0,b.jsx)(J,{value:a.openai,onChange:a=>k(b=>({...b,openai:a}))}),"gemini"===a.aiProvider&&(0,b.jsx)(j.f,{value:a.gemini,onChange:a=>k(b=>({...b,gemini:a}))}),"minimax-code"===a.aiProvider&&(0,b.jsx)(C,{value:a.minimaxCode,onChange:a=>k(b=>({...b,minimaxCode:a}))}),"anthropic"===a.aiProvider&&(0,b.jsx)(h.f,{value:a.anthropic,onChange:a=>k(b=>({...b,anthropic:a}))}),(0,L.j)(a.aiProvider)&&(0,b.jsx)(M,{provider:a.aiProvider,value:a[a.aiProvider],onChange:a=>k(b=>({...b,[b.aiProvider]:a}))},a.aiProvider),"azure"===a.aiProvider&&(0,b.jsx)(i.f,{value:a.azure,onChange:a=>k(b=>({...b,azure:a}))}),(0,b.jsx)(g.f,{config:a,saving:m,saveButton:(0,b.jsxs)(d.f,{onClick:n,disabled:m,className:"flex-1",children:[m&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),o.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,u.L)(a.timeZone??u.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0cmd1ubdlo_by._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[118688,a=>{var b=a.i(164831);let c={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],118688)},589027,113608,a=>{var b=a.i(164831);let c={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],589027);let e={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};e.node;let f=(0,b.f)(e);a.s(["f",0,f],113608)},79362,a=>{var b=a.i(164831);let c={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],79362)},211134,a=>{var b=a.i(164831);let c={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],211134)},755681,a=>{var b=a.i(164831);let c={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],755681)},519783,a=>{var b=a.i(164831);let c={name:"refresh-cw",size:24,node:[["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"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],519783)},951675,a=>{var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],951675)},474215,a=>{var b=a.i(164831);let c={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};c.node;let d=(0,b.f)(c);a.s(["X",0,d],474215)},786304,a=>{var b=a.i(187924),c=a.i(811011),d=a.i(400187),e=a.i(368114);let f=(0,d.f)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});a.s(["f",0,function({className:a,variant:d,asChild:g=!1,...h}){let i=g?c.M:"span";return(0,b.jsx)(i,{"data-slot":"badge",className:(0,e.f)(f({variant:d}),a),...h})}])},529759,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(986705);let e=(0,c.createContext)({timeZone:d.J,setTimeZone:()=>void 0});a.s(["n",0,function({children:a,initialTimeZone:f=d.J}){let[g,h]=(0,c.useState)(f);return(0,b.jsx)(e.Provider,{value:{timeZone:g,setTimeZone:h},children:a})},"M",0,function(){return(0,c.useContext)(e)}])},481132,a=>{var b=a.i(572131),c=a.i(291938),d=a.i(630534);let e=null,f=0,g=new Set;a.s(["f",0,function(){let[a,h]=(0,b.useState)(e??[]),[i,j]=(0,b.useState)(!e),[k,l]=(0,b.useState)(null),m=(0,b.useCallback)(async(a=!1)=>{let b=Date.now();if(!a&&e&&b-f<3e4){h(e),j(!1);return}try{j(!0);let a=await c.k.get("/api/paper-groups");e=a,f=b,g.forEach(b=>b(a)),l(null)}catch(a){d.V.error("[usePaperGroups]","Failed to fetch paper groups",{error:a}),l("Failed to load paper groups")}finally{j(!1)}},[]);return(0,b.useEffect)(()=>(g.add(h),m(),()=>{g.delete(h)}),[m]),{groups:a,loading:i,error:k,refetch:(0,b.useCallback)(()=>(e=null,f=0,m(!0)),[m])}}])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0fp_p60hb9ex8._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[613412,a=>{var b=a.i(164831);let c={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],613412)},682338,a=>{var b=a.i(572131),c=a.i(397339);a.s(["a",0,function(a,d){var e;let[f,g]=(0,b.useState)(null),[h,i]=(0,b.useState)(!1),j=(0,b.useRef)(a),k=(0,b.useRef)(d);(0,b.useEffect)(()=>{j.current=a,k.current=d},[a,d]);let l=(0,b.useCallback)(async()=>{let a=j.current;if(a&&("u"<typeof document||"hidden"!==document.visibilityState))try{let b=await (0,c.h)(a);j.current===a&&(g(b),i(!1),k.current?.(b))}catch(b){b?.status===404&&j.current===a&&i(!0)}},[]);(0,b.useEffect)(()=>{if(!a)return;let b=setTimeout(l,0),d=(0,c.E)(l);return()=>{clearTimeout(b),d()}},[a,l]);let m="analyzing"===(e=f?.status)||"saving"===e;return(0,b.useEffect)(()=>{if(!a||!m)return;let b=setInterval(l,2500);return()=>clearInterval(b)},[a,m,l]),{task:f&&f.id===a?f:null,notFound:h,refresh:l,setTask:g}},"b",0,function(a=!0){let[d,e]=(0,b.useState)(null),[f,g]=(0,b.useState)(!1),h=(0,b.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{e(await (0,c.B)()),g(!1)}catch{g(!0)}},[]);(0,b.useEffect)(()=>{if(!a)return;let b=setTimeout(h,0),d=(0,c.E)(h);return window.addEventListener(c.y,h),()=>{clearTimeout(b),d(),window.removeEventListener(c.y,h)}},[a,h]);let i=(d?.activeCount??0)>0;return(0,b.useEffect)(()=>{if(!a)return;let b=setInterval(h,i?2500:3e4);return()=>clearInterval(b)},[a,i,h]),{data:d,error:f,refresh:h}}])},397339,a=>{var b=a.i(291938);function c(){}function d(){let a=new Uint8Array(16);return crypto.getRandomValues(a),Array.from(a,a=>a.toString(16).padStart(2,"0")).join("")}async function e(a,f=d()){let g;for(let d=0;d<3;d++)try{let{task:d}=await b.k.post("/api/import-tasks",{...a,clientRequestId:f,subjectId:a.subjectId||void 0,targetSubjectId:a.targetSubjectId||void 0,paperLevel:a.paperLevel||void 0},{timeout:12e4});return c(),d}catch(a){if(g=a,!function(a){let b=a?.status;return void 0===b||408===b||502===b||503===b||504===b}(a)||2===d)break;await new Promise(a=>setTimeout(a,1e3*(d+1)))}throw g}async function f(a,c={}){let d=c.image?"?include=image":"",{task:e}=await b.k.get(`/api/import-tasks/${encodeURIComponent(a)}${d}`);return e}async function g(a,d){let e=await b.k.post(`/api/import-tasks/${encodeURIComponent(a)}/confirm`,d);return c(),e}async function h(a){let{task:d}=await b.k.post(`/api/import-tasks/${encodeURIComponent(a)}/retry`,{});return c(),d}async function i(a){await b.k.post(`/api/import-tasks/${encodeURIComponent(a)}/read`,{}),c()}async function j(a){await b.k.delete(`/api/import-tasks/${encodeURIComponent(a)}`),c()}a.s(["y",0,"wrong-notebook:import-tasks-changed","I",0,g,"S",0,e,"x",0,j,"h",0,f,"B",0,function(){return b.k.get("/api/import-tasks")},"N",0,i,"c",0,d,"P",0,c,"E",0,function(a){let b=()=>{"visible"===document.visibilityState&&a()},c=b=>{b.persisted&&a()};return document.addEventListener("visibilitychange",b),window.addEventListener("focus",a),window.addEventListener("pageshow",c),window.addEventListener("online",a),()=>{document.removeEventListener("visibilitychange",b),window.removeEventListener("focus",a),window.removeEventListener("pageshow",c),window.removeEventListener("online",a)}},"R",0,h])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0gsk7ce3mjc-h._.js.map
|