wrong-notebook 2026.11.4-2 → 2026.11.4-3
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/build-manifest.json +3 -3
- 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 +14 -13
- 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 +14 -13
- 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 +14 -13
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +15 -13
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +16 -16
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +18 -17
- package/.next/server/app/api/analyze/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 +13 -12
- 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 +14 -13
- 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 -18
- 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 +16 -14
- 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 +19 -18
- 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 +9 -6
- 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 +16 -14
- 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 +16 -14
- 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/list/route.js +8 -8
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +20 -20
- 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 +18 -17
- 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 +17 -17
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +17 -17
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +18 -17
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +17 -17
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js +9 -8
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +17 -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 +23 -22
- 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 -24
- 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 -19
- 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 +24 -23
- 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 -24
- 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 +24 -23
- 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 +24 -23
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +24 -23
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +23 -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 +23 -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 +24 -23
- 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 +23 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +24 -23
- 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 +16 -16
- 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 +19 -18
- 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 -17
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +14 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +15 -14
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +17 -16
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +18 -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 +15 -14
- 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 +16 -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 +16 -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/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 +9 -8
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +9 -9
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +15 -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/chunks/[externals]__1j5vgk-wr4vpe._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +3 -0
- package/.next/server/chunks/[externals]_fs_1d5jh8vp8y6zt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05tyrbfzivoeq._.js → [root-of-the-server]__0-5ex-1jwf2so._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__01-14hxale6jz._.js → [root-of-the-server]__000xbr1s0pxwr._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00_59ioz3-clx._.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]__01rm65xnqj0z-._.js → [root-of-the-server]__00cvwb7xtihiy._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00g0do0mkiaol._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__02nbzp-n9g9_o._.js → [root-of-the-server]__00u81uwtn433h._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09pkxauucdf_0._.js → [root-of-the-server]__02osgjesv2sc1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0z0knsep33lsx._.js → [root-of-the-server]__02rd5j6up78m2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__02t-_4nuz92ls._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0384w26qgo9xm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04ofq5esp33on._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04rit3x7n87ku._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__006u92h_madgn._.js → [root-of-the-server]__05d81asaxsts8._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__06dvthqk5vh87._.js +3 -0
- 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]__1eu_g0k_nr3i-._.js → [root-of-the-server]__0702vmlo8jrsa._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__075pb7_pb654o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0k4cyyyh6z6_p._.js → [root-of-the-server]__08wi504al-t3f._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0bmczgpuggwki._.js → [root-of-the-server]__0_gf1ay3sa41e._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_zz_zj6cp7hy._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bgi7pc7dogwe._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cjj_9c_1d-eb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0d315c1v02ny0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0eba9rni-2_tw._.js → [root-of-the-server]__0dyqmjzl1b_1f._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ehph__dmu6pf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__0fdvaccw9slrb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fr_y2a0149cd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fscx2v333vm8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g9zoc0653-fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0h-qm7nop9330._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0hsl0y0knqi-1._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__029n0r2v92pcc._.js → [root-of-the-server]__0htnw-q6r_ple._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0lqv0n5j2fg24._.js → [root-of-the-server]__0i3k26mx8ndsy._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ifmgp3wd_za_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0joi1yae2ehm4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0imuc7gi1ii-e._.js → [root-of-the-server]__0k0dc64mmh6m3._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0l104gjwyuf1b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0l5ybk_p285gl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lm6l50r5n5di._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lsvd81f6kf59._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0oh43a4yzv1os._.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]__0fx0s5_6sjw-d._.js → [root-of-the-server]__0tn4z733mbm06._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0torie7kq-_7m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0geynfn2xmdle._.js → [root-of-the-server]__0tzkw11a1tdju._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0uhfq-cs0r44u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0unr-g_-8kx90._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0v6kysx0rq-1m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrs8pd3vzslw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wfpx1grz3ds6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0x-02x70-ewqa._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ya2x1q-h3scx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zhm5smhb-gdm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zmnn5ww2etgw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10_9ca38kz5au._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1kiolpvl5u4e-._.js → [root-of-the-server]__10gw_yrtllol4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__11d2q9o0f28s0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11oto6h82pnhn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12wn_ef3w7f8l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__132-2tja1hzjw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13aq01o_yamyz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13x167nrb3y6w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1438_x9vkg2ow._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14qqa5fifm2rn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16jaf2eom1mlc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16pezaw35f9j1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16qwprn5u6gjt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__180yz6lfwyg1x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__197qvpegys2sj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19cfobnhf4rgh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19r0-5tk-zh9i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_sr40zcjsx6y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1c_nbrrytj02e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dgb5al4upb9v._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dkmclmcfr_o2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__1fmsngpmgt-p-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1frkpeaqco77c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gfpzuz6qe78x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gvappei6o8kd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hc_s6bb3tqn2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hy_enkxk2q7n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1icr5yq0kmxsk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1j92hfszx6_cs._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jd9zchusdb14._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jey4pj050ie1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ji7iwt_w00lv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1okwln3g2ifvb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1oy49h1nfcsne._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1p4_cgasfcy73._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1s21nmek1dpsc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sk7ctcxmkco3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sl3foar6w087._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ui10_ypv4qrw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1v5o1ch2vz7iw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vm13gnfyoh6u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vrtsz6125q__._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wnuzqkneu1ws._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xv0q7bppzr-w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yzqi7jexvvzc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1zq5g6-uodrek._.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/_03wxfgqq6wpf_._.js +3 -0
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- 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/_0819wmh2_bgt-._.js +3 -0
- 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/_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/_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/_0rnn090b4_3pb._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +1 -1
- package/.next/server/chunks/{_03dn7v_h3d-v8._.js → _0tkov27xr068i._.js} +8 -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} +8 -7
- package/.next/server/chunks/_1647rfjflw_iq._.js +1 -1
- package/.next/server/chunks/_1654ui1ph-3x8._.js +3 -0
- 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/_1ahefh9733vmk._.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/_1ex6ovo_j2jzv._.js +1 -1
- 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/_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/_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} +8 -7
- package/.next/server/chunks/_1xpj9uk-9zhl8._.js +1 -1
- 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_@anthropic-ai_sdk_1ulo822751toa._.js +3 -0
- 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_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_0cmg152v4yi6o._.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_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 +131 -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_1v5vdsc8-zp2z._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- package/.next/server/chunks/{src_lib_exam_ts_0d3a4q4r41hcf._.js → src_lib_exam_exam_ts_18c3t7bnr1z5k._.js} +2 -2
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +3 -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_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]__0sb3jhytba2xr._.js → [root-of-the-server]__01epe_65_8e8r._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0ht0nkzazbnl9._.js → [root-of-the-server]__0iqnvufl6qrve._.js} +2 -2
- 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]__03208_liub81h._.js → [root-of-the-server]__1babe6vdwxbtq._.js} +2 -2
- 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/{_0zacgi5-qgqwr._.js → _0mfy8kk0_omxw._.js} +1 -1
- 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/_0svbyo-zufys9._.js +3 -0
- package/.next/server/chunks/ssr/{_186fwf-hcr_ua._.js → _101w__e2w9gr0._.js} +2 -2
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +1 -1
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +1 -1
- package/.next/server/chunks/ssr/{_1xv0q8o3g3r5d._.js → _1s3gqrczubor-._.js} +2 -2
- package/.next/server/chunks/ssr/{_1a4u3f5sc05kb._.js → _1th-xa6ci3ryc._.js} +2 -2
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +1 -1
- package/.next/server/chunks/ssr/{_1pdnzaad7hk0d._.js → _1x_zn17exkc4t._.js} +2 -2
- package/.next/server/chunks/ssr/{_0w83jztp72o20._.js → _20593q3u-y025._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_02k42jp0_uoqr._.js → node_modules_16_nl7nawmp3n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_0byqh-lbfcigr.js → node_modules_heic-to_dist_csp_heic-to_0i0ydbk94w-r3.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_1h62imz_ct0w_.js} +1 -1
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +3 -0
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/{src_0z149pjrheeb7._.js → src_1iewbwi2267a1._.js} +2 -2
- package/.next/server/chunks/ssr/{src_1jhctayt9gxoc._.js → src_1o5f_wr8vv-x0._.js} +2 -2
- 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]_print_page_tsx_1i-xvhk8ul1l1._.js +1 -1
- 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 +1 -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 +2 -2
- 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_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +10 -10
- package/.next/server/chunks/ssr/{src_lib_1vv0-aje_e-zh._.js → src_lib_0773v8b5gb93o._.js} +2 -2
- package/.next/server/chunks/ssr/{src_lib_0-wirad5ziskp._.js → src_lib_1qhs590-z9xnh._.js} +2 -2
- 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/{1pdlii0oox0-7.js → 037g92rz3qjm_.js} +1 -1
- package/.next/static/chunks/{2cfz0fumc6ghe.js → 045cs_rolnmjd.js} +1 -1
- package/.next/static/chunks/077y4nms_vzwe.js +1 -0
- package/.next/static/chunks/{1746y345zti-9.js → 0eize8lf2hp4i.js} +2 -2
- package/.next/static/chunks/{3tv07cyoo_hat.js → 0gxr8rcvy4zzg.js} +1 -1
- package/.next/static/chunks/0njrl9jn2yde_.js +1 -0
- package/.next/static/chunks/{02wft51kf3t9f.js → 0ovv_fq59i4y4.js} +1 -1
- package/.next/static/chunks/{1uaqnxl-xshw6.js → 0uay0bmznf3g-.js} +1 -1
- package/.next/static/chunks/{0wcwopwk4us6h.js → 0vlsab1wxbcnl.js} +2 -2
- package/.next/static/chunks/{31-r0kqqw-wfd.js → 0xwz3h9d_e7kb.js} +1 -1
- package/.next/static/chunks/{17-num1x7o1m2.js → 1-dh1gads_tda.js} +1 -1
- package/.next/static/chunks/{0_xcjg47jv3ur.js → 1-qu_z3i5b8ul.js} +1 -1
- package/.next/static/chunks/164mvykuvwd-0.js +1 -0
- package/.next/static/chunks/{3oz37kz8n7y3b.js → 18bumc8ezaiy4.js} +1 -1
- package/.next/static/chunks/{42rupczfyygo1.js → 1ado9no6s8r2t.js} +1 -1
- package/.next/static/chunks/{2r5aeenvfl93p.js → 1j8eduwold2uf.js} +1 -1
- package/.next/static/chunks/{3fh32b9da9l_5.js → 1k2m_f0nu22fb.js} +1 -1
- package/.next/static/chunks/{3s_fq__cff-ps.js → 1pw6djqafgpo7.js} +2 -2
- package/.next/static/chunks/{2ebh36q8lvor_.js → 1xpxy-ja2ym0o.js} +1 -1
- package/.next/static/chunks/2jt0139jd2-i3.js +12 -0
- package/.next/static/chunks/2qjb14pd2n3x_.js +1 -0
- package/.next/static/chunks/2s6ae7khf13mi.js +12 -0
- package/.next/static/chunks/33fakli20_bmk.js +1 -0
- package/.next/static/chunks/{1egd1e1483_lj.js → 34dstd5pyqifj.js} +1 -1
- package/.next/static/chunks/{2924d0kl-68z7.js → 39lbv0arntrnf.js} +10 -10
- package/.next/static/chunks/3_w-p8241f5rv.js +1 -0
- package/.next/static/chunks/{3wch6vphcivq5.js → 3j92h-4k4_o_f.js} +1 -1
- package/.next/static/chunks/{4441xuc3i-yb7.js → 3rnbnqcge4lza.js} +1 -1
- package/.next/static/chunks/{2qqyq-iqkv_oa.js → 3snn9aaz5n95k.js} +2 -2
- package/.next/static/chunks/{1o_q928xcfjs3.js → 43btem6mtf_gh.js} +1 -1
- 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/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/_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_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_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/_01rfvhncgnpvl._.js +0 -3
- package/.next/server/chunks/ssr/_11820i-k62560._.js +0 -3
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +0 -32
- package/.next/server/chunks/ssr/src_1vhiktxz2_jj3._.js +0 -3
- 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/0y5zywo-ll2w3.js +0 -1
- package/.next/static/chunks/17dk_oppf9-hv.js +0 -12
- package/.next/static/chunks/38vt_4ntvy02e.js +0 -1
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_buildManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → P3mJPGERki1060-s7tC9h}/_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
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[218964,e=>{var t=e.i(456420);let s={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],218964)},328623,e=>{var t=e.i(456420);let s={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"]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],328623)},697886,e=>{var t=e.i(456420);let s={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],697886)},952683,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(618566),i=e.i(518515),n=e.i(325597),r=e.i(328623),l=e.i(747819),o=e.i(866531),d=e.i(515288),c=e.i(519455),m=e.i(624687),u=e.i(110204),h=e.i(856522),x=e.i(632781),p=e.i(772382),g=e.i(7891),g=g,f=e.i(395925),v=e.i(111110),j=e.i(511445),y=e.i(574041),k=e.i(438465),w=e.i(674166),b=e.i(967489),N=e.i(952122),S=e.i(294114);function A({onSubmit:e,defaultNotebookId:a,defaultNotebookName:i,isSaving:r}){let{t:l}=(0,v.b)(),[o,C]=(0,s.useState)(null),[T,P]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,H]=(0,s.useState)(""),[M,q]=(0,s.useState)(""),[B,D]=(0,s.useState)(""),[F,R]=(0,s.useState)("unknown"),[K,U]=(0,s.useState)([]),[$,O]=(0,s.useState)(a||""),[L,V]=(0,s.useState)(""),[W,_]=(0,s.useState)(""),Q=async()=>{if(T.trim()){if(!$)return void S.c.warning(l.editor.messages?.selectNotebook||"Please select a notebook");await e({questionText:T.trim(),answerText:E.trim(),analysis:z.trim(),wrongAnswerText:M.trim(),mistakeAnalysis:B.trim(),mistakeStatus:F,knowledgePoints:K,subjectId:$,gradeSemester:L||void 0,paperLevel:W||void 0})}},G=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),T.trim()&&$&&!r&&Q())},J=[{key:"question",label:l.editor?.question||"Question Text",value:T,setter:P,placeholder:l.directEntry.questionPlaceholder,minHeight:"min-h-[180px]",required:!0},{key:"answer",label:l.editor?.answer||"Answer",value:E,setter:I,placeholder:l.directEntry.answerPlaceholder,minHeight:"min-h-[120px]"},{key:"analysis",label:l.editor?.analysis||"Analysis / Explanation",value:z,setter:H,placeholder:l.directEntry.analysisPlaceholder,minHeight:"min-h-[150px]"},{key:"wrongAnswer",label:l.editor?.wrongAnswerText||"Wrong Answer / Work",value:M,setter:q,placeholder:l.directEntry.wrongAnswerPlaceholder,minHeight:"min-h-[100px]"},{key:"mistakeAnalysis",label:l.editor?.mistakeAnalysis||"Mistake Cause Analysis",value:B,setter:D,placeholder:l.directEntry.mistakeAnalysisPlaceholder,minHeight:"min-h-[100px]"}];return(0,t.jsx)(d.N,{className:"rounded-2xl",children:(0,t.jsxs)(d.O,{className:"p-6 space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(n.f,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l.directEntry.title})]}),(0,t.jsxs)(c.f,{variant:"ghost",size:"sm",onClick:()=>{P(""),I(""),H(""),q(""),D(""),R("unknown"),U([]),V(""),_("")},disabled:r,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(f.f,{className:"h-4 w-4 mr-1"}),l.directEntry.reset]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(u.f,{children:[l.editor?.selectNotebook||"Select Notebook"," *"]}),(0,t.jsx)(k.f,{value:$,onChange:O})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.gradeSemester||"Grade/Semester"}),(0,t.jsx)("input",{type:"text",value:L,onChange:e=>V(e.target.value),placeholder:l.directEntry.gradeSemesterPlaceholder,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.paperLevel||"Paper Level"}),(0,t.jsx)(w.f,{value:W,onChange:_})]})]}),J.map(e=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(u.f,{className:e.required?"text-primary font-semibold":"",children:[e.label," ",e.required&&"*"]}),(0,t.jsx)(c.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>C(o===e.key?null:e.key),disabled:!e.value,children:o===e.key?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.f,{className:"h-3 w-3 mr-1"}),l.directEntry.edit]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.f,{className:"h-3 w-3 mr-1"}),l.directEntry.preview]})})]}),o===e.key?(0,t.jsx)("div",{className:`rounded-md border bg-muted/30 p-4 ${e.minHeight} overflow-auto cursor-pointer`,onClick:()=>C(null),children:(0,t.jsx)(j.f,{content:e.value})}):(0,t.jsx)(m.f,{value:e.value,onChange:t=>e.setter(t.target.value),onKeyDown:G,placeholder:e.placeholder,className:`${e.minHeight} font-mono text-sm resize-y`,disabled:r})]},e.key)),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(b.d,{value:F,onValueChange:e=>R(e),children:[(0,t.jsx)(b.P,{className:"w-[200px]",children:(0,t.jsx)(b.U,{})}),(0,t.jsxs)(b.r,{children:[(0,t.jsx)(b.T,{value:"not_attempted",children:l.editor?.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(b.T,{value:"wrong_attempt",children:l.editor?.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(b.T,{value:"unknown",children:l.editor?.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.tags||"Knowledge Points (Press Enter to add)"}),(0,t.jsx)(y.f,{value:K,onChange:U,placeholder:l.editor?.tagsPlaceholder||"Enter knowledge tags, select from suggestions...",enterHint:l.editor?.createTagHint,subject:(0,N.f)(i||null)||void 0}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l.editor?.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 pt-2",children:[(0,t.jsx)(c.f,{onClick:Q,disabled:!T.trim()||!$||r,className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",size:"lg",children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.f,{className:"mr-2 h-4 w-4 animate-spin"}),l.directEntry.saving]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.f,{className:"mr-2 h-4 w-4"}),l.directEntry.save]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:l.directEntry.hint})]})]})})}var C=e.i(522016),T=e.i(217255),P=e.i(856423),E=e.i(975153),I=e.i(218964),z=e.i(697886);let H=()=>()=>{};function M({href:e,icon:s,label:a,value:i}){return(0,t.jsxs)(C.default,{href:e,className:"rounded-xl bg-white/15 px-4 py-3 backdrop-blur-sm transition-colors hover:bg-white/20",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-white/75",children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsx)("div",{className:"mt-1 text-2xl font-bold tabular-nums",children:i??"–"})]})}function q({notebookCount:e,itemCount:a,dueCount:i,targetNotebook:n}){let{t:r,language:l}=(0,v.b)(),{data:o}=(0,T.useSession)(),d=(0,s.useSyncExternalStore)(H,()=>new Date().getHours(),()=>null),c=null===d?r.common.welcome.replace(/[,,\s]+$/,""):d<12?r.home.greetingMorning:d<18?r.home.greetingAfternoon:r.home.greetingEvening,m=o?.user?.name||o?.user?.email||"";return(0,t.jsxs)("section",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-indigo-600 via-indigo-500 to-violet-500 p-5 text-white shadow-lg shadow-indigo-500/20 md:p-7",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-10 -top-12 h-44 w-44 rounded-full bg-white/10 blur-2xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-16 right-24 h-40 w-40 rounded-full bg-fuchsia-300/20 blur-2xl"}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("h1",{className:"text-xl font-bold tracking-tight md:text-2xl",children:[c,m&&`${"zh"===l?",":", "}${m}`]}),(0,t.jsx)("p",{className:"max-w-md text-sm text-white/80",children:r.home.heroSubtitle}),n&&(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-xs font-medium",children:[(0,t.jsx)(z.f,{className:"h-3.5 w-3.5"}),r.home.targetNotebook.replace("{name}",n)]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 md:w-96",children:[(0,t.jsx)(M,{href:"/notebooks",icon:P.f,label:r.home.notebookCount,value:e}),(0,t.jsx)(M,{href:"/notebooks",icon:I.f,label:r.home.itemCount,value:a}),(0,t.jsx)(M,{href:"/review",icon:E.f,label:r.home.dueCount,value:i})]})]})]})}var B=e.i(12130),D=e.i(430634),F=e.i(576019),R=e.i(847483),K=e.i(497346),U=e.i(717448),$=e.i(798469),O=e.i(86963),L=e.i(956738),V=e.i(185592),W=e.i(41931),_=e.i(201276),Q=e.i(35209),G=e.i(267275);function J(){let{t:e}=(0,v.b)();(0,Q.f)(e.pageTitle.home);let d=(0,a.useSearchParams)().get("notebook"),[c,m]=(0,s.useState)([]),[u,h]=(0,s.useState)(null),[x,p]=(0,s.useState)("image"),g=d?c.find(e=>e.id===d):void 0,f=(0,G.w)({logPrefix:"[Home]",analyzeSubjectId:d,importSubjectId:d,textNotebook:g&&{id:g.id,name:g.name}});(0,s.useEffect)(()=>{W.k.get("/api/notebooks").then(e=>m(e)).catch(e=>_.V.error("[Home]","Failed to fetch notebooks",{error:e})),W.k.get("/api/review/due?pageSize=1").then(e=>h(e.total)).catch(e=>_.V.error("[Home]","Failed to fetch due reviews",{error:e}))},[]);let j=async e=>{f.setAnalysisStep("saving"),await f.saveQuestion({...e,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",originalImageUrl:""}),f.setAnalysisStep("idle")},y=c.reduce((e,t)=>e+(t._count?.errorItems||0),0),k=[{value:"image",icon:i.f,label:e.app?.uploadImage||"Take Photo"},{value:"text",icon:r.f,label:e.app?.manualInput||"Manual Input"},{value:"direct",icon:n.f,label:e.app?.directInput||"Manual Entry"}];return(0,t.jsxs)("main",{className:"min-h-screen",children:[(0,t.jsx)(L.f,{status:f.analysisStep,completed:f.completedStages}),(0,t.jsxs)("div",{className:`mx-auto space-y-6 px-4 py-6 md:px-8 md:py-8 ${"review"===f.step?"max-w-6xl":"max-w-4xl"}`,children:[(0,t.jsx)(K.f,{message:f.saveError,onDismiss:f.dismissSaveError}),"upload"===f.step&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{notebookCount:c.length,itemCount:y,dueCount:u,targetNotebook:d?g?.name:void 0}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(V.f,{options:k,value:x,onChange:p}),f.pendingTask&&(0,t.jsx)(F.f,{task:f.pendingTask,onRefresh:f.refreshPendingTask,onDismiss:f.dismissPendingTask}),f.lastImported&&(0,t.jsx)(D.f,{imported:f.lastImported,onDismiss:f.dismissImported}),f.batchImages?(0,t.jsx)(l.f,{images:f.batchImages,subjectId:d,onClose:f.closeBatch}):"image"===x?(0,t.jsxs)(t.Fragment,{children:[f.parts.length>0&&(0,t.jsx)(R.f,{parts:f.parts.map(e=>e.dataUrl),busy:f.isBusy,onFinish:()=>void f.finishParts(),onDiscard:f.discardParts}),(0,t.jsx)($.f,{onImageSelect:f.selectImage,isAnalyzing:f.isBusy})]}):"text"===x?(0,t.jsx)(U.f,{onSubmit:f.submitText,isAnalyzing:f.isBusy,defaultNotebookName:g?.name,onCreateBatch:f.createTextBatch,creatingBatch:f.creatingBatch}):(0,t.jsx)(A,{onSubmit:j,defaultNotebookId:d||void 0,defaultNotebookName:g?.name,isSaving:"saving"===f.analysisStep})]})]}),f.croppingImage&&(0,t.jsx)(B.f,{imageSrc:f.croppingImage,open:f.isCropperOpen,onClose:f.closeCropper,onRegionsSelected:f.cropRegions,allowMulti:0===f.parts.length,onAutoSplit:0===f.parts.length?f.autoSplitImage:void 0,onAddPart:f.parts.length<G.u-1?f.addPart:void 0,partCount:f.parts.length}),"review"===f.step&&f.parsedData&&(0,t.jsx)(o.f,{initialData:f.parsedData,onSave:f.saveReviewed,onCancel:f.cancelReview,imagePreview:f.currentImage,initialSubjectId:d||void 0,aiTimeout:f.aiTimeout})]})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(O.f,{}),children:(0,t.jsx)(J,{})})}],952683)},86963,e=>{var t=e.i(843476),s=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])}],462684,e=>{e.v(t=>Promise.all(["static/chunks/2hh64gi4pmlk2.js"].map(t=>e.l(t))).then(()=>t(506175)))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[218964,e=>{var t=e.i(456420);let s={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],218964)},328623,e=>{var t=e.i(456420);let s={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"]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],328623)},697886,e=>{var t=e.i(456420);let s={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],697886)},952683,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(618566),i=e.i(518515),n=e.i(325597),r=e.i(328623),l=e.i(747819),o=e.i(866531),d=e.i(515288),c=e.i(519455),m=e.i(624687),u=e.i(110204),h=e.i(856522),x=e.i(632781),p=e.i(772382),g=e.i(7891),g=g,f=e.i(395925),v=e.i(111110),j=e.i(511445),y=e.i(574041),k=e.i(438465),w=e.i(674166),b=e.i(967489),N=e.i(597138),S=e.i(294114);function A({onSubmit:e,defaultNotebookId:a,defaultNotebookName:i,isSaving:r}){let{t:l}=(0,v.b)(),[o,C]=(0,s.useState)(null),[T,P]=(0,s.useState)(""),[E,I]=(0,s.useState)(""),[z,H]=(0,s.useState)(""),[M,q]=(0,s.useState)(""),[B,D]=(0,s.useState)(""),[F,R]=(0,s.useState)("unknown"),[K,U]=(0,s.useState)([]),[$,O]=(0,s.useState)(a||""),[L,V]=(0,s.useState)(""),[W,_]=(0,s.useState)(""),Q=async()=>{if(T.trim()){if(!$)return void S.c.warning(l.editor.messages?.selectNotebook||"Please select a notebook");await e({questionText:T.trim(),answerText:E.trim(),analysis:z.trim(),wrongAnswerText:M.trim(),mistakeAnalysis:B.trim(),mistakeStatus:F,knowledgePoints:K,subjectId:$,gradeSemester:L||void 0,paperLevel:W||void 0})}},G=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),T.trim()&&$&&!r&&Q())},J=[{key:"question",label:l.editor?.question||"Question Text",value:T,setter:P,placeholder:l.directEntry.questionPlaceholder,minHeight:"min-h-[180px]",required:!0},{key:"answer",label:l.editor?.answer||"Answer",value:E,setter:I,placeholder:l.directEntry.answerPlaceholder,minHeight:"min-h-[120px]"},{key:"analysis",label:l.editor?.analysis||"Analysis / Explanation",value:z,setter:H,placeholder:l.directEntry.analysisPlaceholder,minHeight:"min-h-[150px]"},{key:"wrongAnswer",label:l.editor?.wrongAnswerText||"Wrong Answer / Work",value:M,setter:q,placeholder:l.directEntry.wrongAnswerPlaceholder,minHeight:"min-h-[100px]"},{key:"mistakeAnalysis",label:l.editor?.mistakeAnalysis||"Mistake Cause Analysis",value:B,setter:D,placeholder:l.directEntry.mistakeAnalysisPlaceholder,minHeight:"min-h-[100px]"}];return(0,t.jsx)(d.N,{className:"rounded-2xl",children:(0,t.jsxs)(d.O,{className:"p-6 space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(n.f,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l.directEntry.title})]}),(0,t.jsxs)(c.f,{variant:"ghost",size:"sm",onClick:()=>{P(""),I(""),H(""),q(""),D(""),R("unknown"),U([]),V(""),_("")},disabled:r,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(f.f,{className:"h-4 w-4 mr-1"}),l.directEntry.reset]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(u.f,{children:[l.editor?.selectNotebook||"Select Notebook"," *"]}),(0,t.jsx)(k.f,{value:$,onChange:O})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.gradeSemester||"Grade/Semester"}),(0,t.jsx)("input",{type:"text",value:L,onChange:e=>V(e.target.value),placeholder:l.directEntry.gradeSemesterPlaceholder,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.paperLevel||"Paper Level"}),(0,t.jsx)(w.f,{value:W,onChange:_})]})]}),J.map(e=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(u.f,{className:e.required?"text-primary font-semibold":"",children:[e.label," ",e.required&&"*"]}),(0,t.jsx)(c.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>C(o===e.key?null:e.key),disabled:!e.value,children:o===e.key?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.f,{className:"h-3 w-3 mr-1"}),l.directEntry.edit]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.f,{className:"h-3 w-3 mr-1"}),l.directEntry.preview]})})]}),o===e.key?(0,t.jsx)("div",{className:`rounded-md border bg-muted/30 p-4 ${e.minHeight} overflow-auto cursor-pointer`,onClick:()=>C(null),children:(0,t.jsx)(j.f,{content:e.value})}):(0,t.jsx)(m.f,{value:e.value,onChange:t=>e.setter(t.target.value),onKeyDown:G,placeholder:e.placeholder,className:`${e.minHeight} font-mono text-sm resize-y`,disabled:r})]},e.key)),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(b.d,{value:F,onValueChange:e=>R(e),children:[(0,t.jsx)(b.P,{className:"w-[200px]",children:(0,t.jsx)(b.U,{})}),(0,t.jsxs)(b.r,{children:[(0,t.jsx)(b.T,{value:"not_attempted",children:l.editor?.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(b.T,{value:"wrong_attempt",children:l.editor?.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(b.T,{value:"unknown",children:l.editor?.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(u.f,{children:l.editor?.tags||"Knowledge Points (Press Enter to add)"}),(0,t.jsx)(y.f,{value:K,onChange:U,placeholder:l.editor?.tagsPlaceholder||"Enter knowledge tags, select from suggestions...",enterHint:l.editor?.createTagHint,subject:(0,N.f)(i||null)||void 0}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l.editor?.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 pt-2",children:[(0,t.jsx)(c.f,{onClick:Q,disabled:!T.trim()||!$||r,className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",size:"lg",children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.f,{className:"mr-2 h-4 w-4 animate-spin"}),l.directEntry.saving]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.f,{className:"mr-2 h-4 w-4"}),l.directEntry.save]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:l.directEntry.hint})]})]})})}var C=e.i(522016),T=e.i(217255),P=e.i(856423),E=e.i(975153),I=e.i(218964),z=e.i(697886);let H=()=>()=>{};function M({href:e,icon:s,label:a,value:i}){return(0,t.jsxs)(C.default,{href:e,className:"rounded-xl bg-white/15 px-4 py-3 backdrop-blur-sm transition-colors hover:bg-white/20",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-white/75",children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsx)("div",{className:"mt-1 text-2xl font-bold tabular-nums",children:i??"–"})]})}function q({notebookCount:e,itemCount:a,dueCount:i,targetNotebook:n}){let{t:r,language:l}=(0,v.b)(),{data:o}=(0,T.useSession)(),d=(0,s.useSyncExternalStore)(H,()=>new Date().getHours(),()=>null),c=null===d?r.common.welcome.replace(/[,,\s]+$/,""):d<12?r.home.greetingMorning:d<18?r.home.greetingAfternoon:r.home.greetingEvening,m=o?.user?.name||o?.user?.email||"";return(0,t.jsxs)("section",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-indigo-600 via-indigo-500 to-violet-500 p-5 text-white shadow-lg shadow-indigo-500/20 md:p-7",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-10 -top-12 h-44 w-44 rounded-full bg-white/10 blur-2xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-16 right-24 h-40 w-40 rounded-full bg-fuchsia-300/20 blur-2xl"}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("h1",{className:"text-xl font-bold tracking-tight md:text-2xl",children:[c,m&&`${"zh"===l?",":", "}${m}`]}),(0,t.jsx)("p",{className:"max-w-md text-sm text-white/80",children:r.home.heroSubtitle}),n&&(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-xs font-medium",children:[(0,t.jsx)(z.f,{className:"h-3.5 w-3.5"}),r.home.targetNotebook.replace("{name}",n)]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 md:w-96",children:[(0,t.jsx)(M,{href:"/notebooks",icon:P.f,label:r.home.notebookCount,value:e}),(0,t.jsx)(M,{href:"/notebooks",icon:I.f,label:r.home.itemCount,value:a}),(0,t.jsx)(M,{href:"/review",icon:E.f,label:r.home.dueCount,value:i})]})]})]})}var B=e.i(12130),D=e.i(430634),F=e.i(576019),R=e.i(847483),K=e.i(497346),U=e.i(717448),$=e.i(798469),O=e.i(86963),L=e.i(956738),V=e.i(185592),W=e.i(41931),_=e.i(201276),Q=e.i(35209),G=e.i(598053),J=e.i(315092);function X(){let{t:e}=(0,v.b)();(0,Q.f)(e.pageTitle.home);let d=(0,a.useSearchParams)().get("notebook"),[c,m]=(0,s.useState)([]),[u,h]=(0,s.useState)(null),[x,p]=(0,s.useState)("image"),g=d?c.find(e=>e.id===d):void 0,f=(0,G.f)({logPrefix:"[Home]",analyzeSubjectId:d,importSubjectId:d,textNotebook:g&&{id:g.id,name:g.name}});(0,s.useEffect)(()=>{W.k.get("/api/notebooks").then(e=>m(e)).catch(e=>_.V.error("[Home]","Failed to fetch notebooks",{error:e})),W.k.get("/api/review/due?pageSize=1").then(e=>h(e.total)).catch(e=>_.V.error("[Home]","Failed to fetch due reviews",{error:e}))},[]);let j=async e=>{f.setAnalysisStep("saving"),await f.saveQuestion({...e,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",originalImageUrl:""}),f.setAnalysisStep("idle")},y=c.reduce((e,t)=>e+(t._count?.errorItems||0),0),k=[{value:"image",icon:i.f,label:e.app?.uploadImage||"Take Photo"},{value:"text",icon:r.f,label:e.app?.manualInput||"Manual Input"},{value:"direct",icon:n.f,label:e.app?.directInput||"Manual Entry"}];return(0,t.jsxs)("main",{className:"min-h-screen",children:[(0,t.jsx)(L.f,{status:f.analysisStep,completed:f.completedStages}),(0,t.jsxs)("div",{className:`mx-auto space-y-6 px-4 py-6 md:px-8 md:py-8 ${"review"===f.step?"max-w-6xl":"max-w-4xl"}`,children:[(0,t.jsx)(K.f,{message:f.saveError,onDismiss:f.dismissSaveError}),"upload"===f.step&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q,{notebookCount:c.length,itemCount:y,dueCount:u,targetNotebook:d?g?.name:void 0}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(V.f,{options:k,value:x,onChange:p}),f.pendingTask&&(0,t.jsx)(F.f,{task:f.pendingTask,onRefresh:f.refreshPendingTask,onDismiss:f.dismissPendingTask}),f.lastImported&&(0,t.jsx)(D.f,{imported:f.lastImported,onDismiss:f.dismissImported}),f.batchImages?(0,t.jsx)(l.f,{images:f.batchImages,subjectId:d,onClose:f.closeBatch}):"image"===x?(0,t.jsxs)(t.Fragment,{children:[f.parts.length>0&&(0,t.jsx)(R.f,{parts:f.parts.map(e=>e.dataUrl),busy:f.isBusy,onFinish:()=>void f.finishParts(),onDiscard:f.discardParts}),(0,t.jsx)($.f,{onImageSelect:f.selectImage,isAnalyzing:f.isBusy})]}):"text"===x?(0,t.jsx)(U.f,{onSubmit:f.submitText,isAnalyzing:f.isBusy,defaultNotebookName:g?.name,onCreateBatch:f.createTextBatch,creatingBatch:f.creatingBatch}):(0,t.jsx)(A,{onSubmit:j,defaultNotebookId:d||void 0,defaultNotebookName:g?.name,isSaving:"saving"===f.analysisStep})]})]}),f.croppingImage&&(0,t.jsx)(B.f,{imageSrc:f.croppingImage,open:f.isCropperOpen,onClose:f.closeCropper,onRegionsSelected:f.cropRegions,allowMulti:0===f.parts.length,onAutoSplit:0===f.parts.length?f.autoSplitImage:void 0,onAddPart:f.parts.length<J.u-1?f.addPart:void 0,partCount:f.parts.length}),"review"===f.step&&f.parsedData&&(0,t.jsx)(o.f,{initialData:f.parsedData,onSave:f.saveReviewed,onCancel:f.cancelReview,imagePreview:f.currentImage,initialSubjectId:d||void 0,aiTimeout:f.aiTimeout})]})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(O.f,{}),children:(0,t.jsx)(X,{})})}],952683)},86963,e=>{var t=e.i(843476),s=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])}],462684,e=>{e.v(t=>Promise.all(["static/chunks/2hh64gi4pmlk2.js"].map(t=>e.l(t))).then(()=>t(506175)))}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],711241)},566595,e=>{var t=e.i(456420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],566595)},666944,e=>{var t=e.i(843476),s=e.i(271645),r=e.i(618566),n=e.i(519455),a=e.i(590546),i=e.i(716327),l=e.i(456539),o=e.i(566595),c=e.i(793479),m=e.i(111110);function u(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);try{let t=JSON.parse(e.knowledgePoints||"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}async function d(e){let t=[];for(let s=1;;s+=1){let r=await e(s);if(t.push(...r.items),0===r.items.length||s>=r.totalPages)return t}}function p({items:e,selectedIds:r,selectedCount:a,printNumbers:d,onToggle:x,onSelectionChange:h}){let{t:g}=(0,m.b)(),[f,w]=(0,s.useState)(e.length<=20),[v,b]=(0,s.useState)(""),j=(0,s.useMemo)(()=>e.filter(e=>{let t;return!(t=v.trim().toLowerCase())||[e.questionText??"",e.shortId??"",...u(e)].some(e=>e.toLowerCase().includes(t))}),[e,v]),y=v.trim().length>0,S=e=>h(function(e,t,s){let r=new Set(e);for(let n of t)"select"!==s&&("invert"!==s||e.has(n))?r.delete(n):r.add(n);return r}(r,j.map(e=>e.id),e));return(0,t.jsxs)("div",{className:"rounded-md border bg-muted/20 p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1 text-sm font-medium hover:text-primary","aria-expanded":f,onClick:()=>w(e=>!e),children:[f?(0,t.jsx)(l.f,{className:"h-4 w-4"}):(0,t.jsx)(i.f,{className:"h-4 w-4"}),g.printPreview.selectItems," (",a,"/",e.length,")"]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("select"),children:y?g.printPreview.selectFiltered:g.printPreview.selectAll}),(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("clear"),children:y?g.printPreview.clearFiltered:g.printPreview.clearSelection}),(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("invert"),children:g.printPreview.invertSelection})]})]}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(o.f,{className:"absolute left-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(c.f,{type:"search",value:v,onChange:e=>b(e.target.value),placeholder:g.printPreview.searchPlaceholder,"aria-label":g.printPreview.searchPlaceholder,className:"h-8 pl-8 text-sm"})]}),(0,t.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3 max-h-[40vh] overflow-y-auto pr-1",children:[j.map(e=>{let s=d.get(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-2 rounded border bg-background p-2 text-xs cursor-pointer hover:border-primary/50",children:[(0,t.jsx)("input",{type:"checkbox",checked:r.has(e.id),onChange:()=>x(e.id),className:"mt-0.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,t.jsxs)("span",{className:"line-clamp-2",children:[void 0!==s&&(0,t.jsxs)("span",{className:"font-semibold",children:[g.printPreview.questionNumber.replace("{num}",String(s)),g.common.colon]}),e.shortId&&(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:[e.shortId," "]}),e.questionText]})]},e.id)}),0===j.length&&(0,t.jsx)("p",{className:"col-span-full py-2 text-center text-xs text-muted-foreground",children:g.printPreview.noSearchResult})]})]})]})}var x=e.i(995677);function h({checked:e,onChange:s,label:r}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-xs sm:text-sm cursor-pointer whitespace-nowrap hover:text-primary transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:e,onChange:e=>s(e.target.checked),className:"rounded border-gray-300 text-primary focus:ring-primary w-3.5 h-3.5 sm:w-4 sm:h-4"}),r]})}function g({options:e,onChange:s,hasCustomSpaces:r,onResetCustomSpaces:a}){let{t:i}=(0,m.b)(),l=e.answerSpace??"auto";return(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm bg-muted/50 px-2 sm:px-3 py-1 rounded-md",children:[(0,t.jsxs)("span",{className:"whitespace-nowrap text-xs sm:text-sm",children:[i.printPreview?.imageScale||"Image Scale",": ",e.imageScale,"%"]}),(0,t.jsx)("input",{type:"range",min:"30",max:"100",value:e.imageScale,onChange:e=>s({imageScale:Number(e.target.value)}),className:"w-16 sm:w-20 accent-primary"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs sm:text-sm bg-muted/50 px-2 sm:px-3 py-1 rounded-md",children:[(0,t.jsxs)("label",{htmlFor:"print-preview-answer-space",className:"whitespace-nowrap",children:[i.exam.answerSpace,":"]}),(0,t.jsxs)("select",{id:"print-preview-answer-space",value:l,onChange:e=>{(0,x.I)(e.target.value)&&s({answerSpace:e.target.value})},className:"bg-background border rounded px-2 py-0.5 text-xs sm:text-sm",children:[(0,t.jsx)("option",{value:"auto",children:i.exam.answerSpaceAuto}),(0,t.jsx)("option",{value:"none",children:i.exam.answerSpaceNone}),(0,t.jsx)("option",{value:"small",children:i.exam.answerSpaceSmall}),(0,t.jsx)("option",{value:"medium",children:i.exam.answerSpaceMedium}),(0,t.jsx)("option",{value:"large",children:i.exam.answerSpaceLarge})]}),r&&a&&(0,t.jsx)(n.f,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:a,children:i.exam.resetAllQuestionAnswerSpaces})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 sm:gap-4",children:[(0,t.jsx)(h,{checked:e.showQuestionText,onChange:e=>s({showQuestionText:e}),label:i.printPreview?.showQuestionText||"Question Text"}),(0,t.jsx)(h,{checked:e.showAnswers,onChange:e=>s({showAnswers:e}),label:i.printPreview?.showAnswers||"Show Answers"}),(0,t.jsx)(h,{checked:e.showAnalysis,onChange:e=>s({showAnalysis:e}),label:i.printPreview?.showAnalysis||"Show Analysis"}),(0,t.jsx)(h,{checked:e.showTags,onChange:e=>s({showTags:e}),label:i.printPreview?.showTags||"Show Tags"})]})]})}var f=e.i(263676),w=e.i(511445),v=e.i(84583),b=e.i(149704);let j=(0,s.memo)(function({item:e,index:s,options:r,reserveAnswerSpace:n,customAnswerSpacePx:a,onCustomAnswerSpaceChange:i,paperGroupName:l,onRemove:o}){let{t:c}=(0,m.b)(),d=u(e),p=n?(0,x.z)(r.answerSpace??"auto",e.questionText||"",a):0;return(0,t.jsxs)("div",{className:`mb-4 border-b last:border-b-0 print:break-inside-avoid [content-visibility:auto] [contain-intrinsic-size:auto_480px] print:[content-visibility:visible] ${n?"pb-4":"pb-6"}`,children:[(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-x-4 gap-y-2 leading-7",children:[(0,t.jsx)("span",{className:"text-lg font-bold",children:c.printPreview?.questionNumber?.replace("{num}",String(s+1))||`Question ${s+1}`}),e.shortId&&(0,t.jsx)("span",{className:"font-mono text-sm text-muted-foreground whitespace-nowrap",children:c.printPreview.source.replace("{id}",e.shortId)}),e.subject&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.subject.name}),e.gradeSemester&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.gradeSemester}),l&&(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[c.printPreview?.paperLevel||"Paper Level",": ",l]}),r.showTags&&d.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"font-semibold",children:[c.printPreview?.knowledgePoints||"Knowledge Points",":"]}),d.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-muted rounded text-sm",children:e},`${e}-${s}`))]}),o&&(0,t.jsxs)("button",{type:"button",className:"print:hidden ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-destructive",onClick:()=>o(e.id),children:[(0,t.jsx)(f.X,{className:"h-3.5 w-3.5"}),c.printPreview.removeFromPrint]})]}),r.showQuestionText&&e.questionText?(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(w.f,{content:e.questionText}),(0,t.jsx)(b.f,{svg:e.figureSvg,scale:e.figureScale,align:e.figureAlign})]}):e.originalImageUrl&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("img",{src:e.originalImageUrl,alt:c.detail?.originalProblem||"Question Image",loading:"lazy",decoding:"async",className:"h-auto border rounded",style:{maxWidth:`${r.imageScale}%`}})}),r.showAnswers&&e.answerText&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"font-semibold mb-2",children:[c.printPreview?.referenceAnswer||"Reference Answer",":"]}),(0,t.jsx)(w.f,{content:e.answerText})]}),r.showAnalysis&&e.analysis&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"font-semibold mb-2",children:[c.printPreview?.analysis||"Analysis",":"]}),(0,t.jsx)(w.f,{content:e.analysis})]}),n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"print-answer-space",style:{minHeight:`${p}px`}}),i&&(0,t.jsx)(v.f,{effectivePx:p,isCustom:"number"==typeof a,onChange:t=>i(e.id,t),onReset:()=>i(e.id,null)})]})]})});var y=e.i(41931),S=e.i(35209),N=e.i(192635),P=e.i(469817),A=e.i(201276);async function k(e,{timeoutMs:t=3e4,onProgress:s}={}){let r,n=Array.from(e.querySelectorAll("img")),a=0;s?.(a,n.length);let i=Promise.all(n.map(async e=>{e.loading="eager",await (e.complete?Promise.resolve():new Promise(t=>{e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0})})),a+=1,s?.(a,n.length)})),l=new Promise(e=>{r=setTimeout(e,t)});await Promise.race([i,l]),clearTimeout(r)}let C="print-preview-options",T={showQuestionText:!1,showAnswers:!1,showAnalysis:!1,showTags:!1,imageScale:70,answerSpace:"auto"},z=["showQuestionText","showAnswers","showAnalysis","showTags"];var I=e.i(664030);async function M(e){for(let t of function(e,t){let s=[];for(let r=0;r<e.length;r+=t)s.push(e.slice(r,r+t));return s}(e,P.A))await y.k.put("/api/error-items/answer-space",{items:t})}function R(){var e,i,l,o,c,u;let h=(0,r.useSearchParams)(),{t:f}=(0,m.b)(),[w,v]=(0,s.useState)([]);(0,S.f)(f.printPreview.title);let[b,R]=(0,s.useState)(!0),[F,L]=(0,s.useState)(T);(0,s.useEffect)(()=>{L(function(){try{return function(e){let t,s={...T};if(!e)return s;try{t=JSON.parse(e)}catch{return s}if(!t||"object"!=typeof t)return s;let r=t;for(let e of z)"boolean"==typeof r[e]&&(s[e]=r[e]);return"number"==typeof r.imageScale&&Number.isFinite(r.imageScale)&&(s.imageScale=Math.min(100,Math.max(30,Math.round(r.imageScale)))),(0,x.I)(r.answerSpace)&&(s.answerSpace=r.answerSpace),s}(localStorage.getItem(C))}catch{return{...T}}}())},[]);let[$,q]=(0,s.useState)(new Set),{customSpaces:Q,setSpace:E,resetAll:O,saveFailed:U}=(0,N.f)(w,M),_=(0,s.useCallback)(async()=>{try{let e=await d(e=>{let t=new URLSearchParams(h.toString());return t.set("page",String(e)),t.set("pageSize",String(P.A)),t.set("view","print"),y.k.get(`/api/error-items/list?${t.toString()}`)});v(e),q(new Set(e.map(e=>e.id)))}catch(e){A.V.error("[PrintPreview]","Failed to fetch items",{error:e})}finally{R(!1)}},[h]);(0,s.useEffect)(()=>{_()},[_]);let B=(0,s.useRef)(null),[D,V]=(0,s.useState)(null),H=async()=>{B.current&&await k(B.current,{onProgress:(e,t)=>V({loaded:e,total:t})}),V(null),window.print()},{groups:J}=(0,I.f)(),K=(0,s.useMemo)(()=>new Map(J.map(e=>[e.id,e.name])),[J]),W=(0,s.useMemo)(()=>w.filter(e=>$.has(e.id)),[w,$]),G=(0,s.useMemo)(()=>new Map(W.map((e,t)=>[e.id,t+1])),[W]),X=(e=F.showAnswers,i=F.showAnalysis,!e&&!i),Z=(l=w.length,(o=W.length)===l?String(l):`${o}/${l}`),Y=(c=w.length,u=W.length,0===c?"noItems":0===u?"noSelection":null),ee=(0,s.useCallback)(e=>{q(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),et=(0,s.useCallback)(e=>{q(t=>{let s=new Set(t);return s.delete(e),s})},[]);return b?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,t.jsx)("p",{className:"text-muted-foreground",children:f.common.loading})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"print:hidden sticky top-0 z-10 bg-background border-b p-3 sm:p-4 shadow-sm",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(a.f,{fallbackUrl:"/notebooks"}),(0,t.jsxs)("h1",{className:"text-lg sm:text-xl font-bold flex-1",children:[f.printPreview?.title||"Print Preview"," (",Z," ",f.notebooks?.items||"items",")"]}),(0,t.jsx)(n.f,{onClick:H,size:"sm",className:"whitespace-nowrap",disabled:0===W.length||null!==D,children:D?f.printPreview.loadingImages.replace("{loaded}",String(D.loaded)).replace("{total}",String(D.total)):f.printPreview?.printButton||"Print / Save PDF"})]}),(0,t.jsx)(g,{options:F,onChange:e=>L(t=>{let s={...t,...e};try{localStorage.setItem(C,JSON.stringify(s))}catch{}return s}),hasCustomSpaces:Object.keys(Q).length>0,onResetCustomSpaces:O}),U&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:f.exam.answerSpaceSaveFailed})]})}),(0,t.jsx)("div",{className:"print:hidden border-b p-3 sm:p-4",children:(0,t.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,t.jsx)(p,{items:w,selectedIds:$,selectedCount:W.length,printNumbers:G,onToggle:ee,onSelectionChange:q})})}),(0,t.jsxs)("div",{ref:B,className:"max-w-4xl mx-auto p-8 print:p-0",children:[W.map((e,s)=>(0,t.jsx)(j,{item:e,index:s,options:F,reserveAnswerSpace:X,customAnswerSpacePx:Q[e.id],onCustomAnswerSpaceChange:E,paperGroupName:e.paperLevel?K.get(e.paperLevel)??e.paperLevel:null,onRemove:et},e.id)),Y&&(0,t.jsx)("div",{className:"text-center py-12 text-muted-foreground",children:"noSelection"===Y?f.printPreview?.noSelection||"No items selected":f.printPreview?.noItems||"No matching error items"})]})]})}e.s(["default",0,function(){let{t:e}=(0,m.b)();return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:e.common.loading}),children:(0,t.jsx)(R,{})})}],666944)},84583,995677,192635,e=>{var t=e.i(843476),s=e.i(519455),r=e.i(111110);let n=["auto","none","small","medium","large"],a={none:0,small:60,medium:120,large:240},i={choice:12,judgment:12,fill:16,solution:240};function l(e){return Number.isFinite(e)?Math.min(600,Math.max(0,Math.round(e))):0}function o(e){return"number"!=typeof e||!Number.isInteger(e)||e<0||e>600?null:e}let c=/(?:(?:^|[\s*+\-))::。??;;,,_])([A-D])\s*[..::]|(?:^|\s{2,}|[))::。??])([A-D])\s*、|[((]([A-D])[))])/gm,m=/判断(?:下列|以下|正误|对错|题)|对的(?:打|画)|错的(?:打|画)|true\s*(?:or|\/)\s*false/i,u=/_{2,}|(?:\\_){2,}|\\underline|\\rule\b|\\hspace\b|(\s*)|【\s*】|\[\s+\]|(?<![A-Za-z0-9_])\(\s*\)|[==]\s*[。??]?\s*$|填空/,d=/求证|证明[::,,]|写出(?:解题|计算|推导|推理)?过程|解答下列|试说明理由|请说明理由/,p=/(\s*(\d{1,2})\s*)/g,x=/(?:^|[\n。;;::??!!]\s*)\(\s*(\d{1,2})\s*\)/g;function h(e){let t=new Set;for(let s of e.matchAll(p))t.add(s[1]);for(let s of e.matchAll(x))t.add(s[1]);return Math.max(1,t.size)}e.s(["p",0,"exam-print-answer-space","W",0,20,"q",0,"auto","R",0,600,"r",0,0,"O",0,l,"I",0,function(e){return"string"==typeof e&&n.includes(e)},"T",0,o,"z",0,function(e,t,s){let r;if("number"==typeof s&&Number.isFinite(s))return l(s);if("auto"!==e)return a[e];let n=(r=new Set(Array.from(t.matchAll(c),e=>e[1]??e[2]??e[3]))).has("A")&&r.has("B")&&r.has("C")?"choice":m.test(t)?"judgment":h(t)>1||d.test(t)?"solution":u.test(t)?"fill":"solution";if("solution"!==n)return i[n];let o=(h(t)-1)*120;return Math.min(560,i.solution+o)}],995677),e.s(["f",0,function({effectivePx:e,isCustom:n,onChange:a,onReset:i}){let{t:o}=(0,r.b)(),c=l(e);return(0,t.jsxs)("div",{className:"answer-space-controls print:hidden flex flex-wrap items-center gap-2 text-xs text-muted-foreground mt-2 pt-1",children:[(0,t.jsxs)("span",{children:[o.exam.questionAnswerSpace,": ",c,"px"]}),(0,t.jsx)(s.f,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-xs","aria-label":o.exam.decreaseAnswerSpace,disabled:c<=0,onClick:()=>a(l(c-20)),children:"-"}),(0,t.jsx)("input",{type:"range",min:0,max:600,step:10,value:c,"aria-label":o.exam.questionAnswerSpaceSlider,onChange:e=>a(l(Number(e.target.value))),className:"w-24 sm:w-32 accent-primary"}),(0,t.jsx)(s.f,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-xs","aria-label":o.exam.increaseAnswerSpace,disabled:c>=600,onClick:()=>a(l(c+20)),children:"+"}),n&&(0,t.jsx)(s.f,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:i,children:o.exam.resetQuestionAnswerSpace})]})}],84583);var g=e.i(271645),f=e.i(201276);e.s(["f",0,function(e,t){let[s,r]=(0,g.useState)({}),[n,a]=(0,g.useState)(!1),i=(0,g.useRef)(new Map),l=(0,g.useRef)(null),c=(0,g.useRef)(t);(0,g.useEffect)(()=>{c.current=t},[t]);let m=(0,g.useMemo)(()=>{let t={};for(let r of e){let e=r.id in s?s[r.id]:o(r.answerSpacePx);"number"==typeof e&&(t[r.id]=e)}return t},[e,s]),u=(0,g.useCallback)(()=>{if(l.current&&(clearTimeout(l.current),l.current=null),0===i.current.size)return;let e=Array.from(i.current,([e,t])=>({id:e,answerSpacePx:t}));i.current.clear(),c.current(e).then(()=>a(!1)).catch(e=>{a(!0),f.V.error("[AnswerSpace]","Failed to save answer space",{error:e})})},[]);(0,g.useEffect)(()=>u,[u]);let d=(0,g.useCallback)((e,t)=>{if(0!==e.length){for(let{id:t,answerSpacePx:s}of(r(t=>{let s={...t};for(let{id:t,answerSpacePx:r}of e)s[t]=r;return s}),e))i.current.set(t,s);if(t)return void u();l.current&&clearTimeout(l.current),l.current=setTimeout(u,600)}},[u]),p=(0,g.useCallback)((e,t)=>{d([{id:e,answerSpacePx:t}],null===t)},[d]),x=(0,g.useCallback)(()=>{d(Object.keys(m).map(e=>({id:e,answerSpacePx:null})),!0)},[m,d]);return{customSpaces:m,setSpace:p,resetAll:x,saveFailed:n}}],192635)},149704,e=>{var t=e.i(843476),s=e.i(111110),r=e.i(398019),n=e.i(184110),a=e.i(975157);let i={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:l,align:o,className:c}){let{t:m}=(0,s.b)();if(!e)return null;let u=(0,n.V)(l),d=(0,n.o)(o);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",c),children:(0,t.jsx)("img",{src:(0,r.f)(e),alt:m.figure.alt,className:(0,a.f)(i[d],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===d?{marginLeft:0,marginRight:"auto"}:"right"===d?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:u/100,maxWidth:`${Math.min(u,100)}%`}})})}])},590546,e=>{var t=e.i(843476),s=e.i(618566),r=e.i(519455),n=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:a}){let i=(0,s.useRouter)();return(0,t.jsx)(r.f,{variant:"ghost",size:"icon",onClick:()=>{i.push(e)},className:a,children:(0,t.jsx)(n.f,{className:"h-5 w-5"})})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},184110,e=>{let t=["left","center","right"],s="center";function r(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,s,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,r,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:s},"V",0,function(e){return r(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:r}=(0,s.b)(),n=[r.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=n},[n])}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],711241)},566595,e=>{var t=e.i(456420);let s={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],566595)},666944,e=>{var t=e.i(843476),s=e.i(271645),r=e.i(618566),n=e.i(519455),a=e.i(590546),i=e.i(716327),l=e.i(456539),o=e.i(566595),c=e.i(793479),m=e.i(111110);function u(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);try{let t=JSON.parse(e.knowledgePoints||"[]");return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}async function d(e){let t=[];for(let s=1;;s+=1){let r=await e(s);if(t.push(...r.items),0===r.items.length||s>=r.totalPages)return t}}function p({items:e,selectedIds:r,selectedCount:a,printNumbers:d,onToggle:x,onSelectionChange:h}){let{t:g}=(0,m.b)(),[f,w]=(0,s.useState)(e.length<=20),[v,b]=(0,s.useState)(""),j=(0,s.useMemo)(()=>e.filter(e=>{let t;return!(t=v.trim().toLowerCase())||[e.questionText??"",e.shortId??"",...u(e)].some(e=>e.toLowerCase().includes(t))}),[e,v]),y=v.trim().length>0,S=e=>h(function(e,t,s){let r=new Set(e);for(let n of t)"select"!==s&&("invert"!==s||e.has(n))?r.delete(n):r.add(n);return r}(r,j.map(e=>e.id),e));return(0,t.jsxs)("div",{className:"rounded-md border bg-muted/20 p-3 space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex items-center gap-1 text-sm font-medium hover:text-primary","aria-expanded":f,onClick:()=>w(e=>!e),children:[f?(0,t.jsx)(l.f,{className:"h-4 w-4"}):(0,t.jsx)(i.f,{className:"h-4 w-4"}),g.printPreview.selectItems," (",a,"/",e.length,")"]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("select"),children:y?g.printPreview.selectFiltered:g.printPreview.selectAll}),(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("clear"),children:y?g.printPreview.clearFiltered:g.printPreview.clearSelection}),(0,t.jsx)(n.f,{variant:"outline",size:"sm",onClick:()=>S("invert"),children:g.printPreview.invertSelection})]})]}),f&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(o.f,{className:"absolute left-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(c.f,{type:"search",value:v,onChange:e=>b(e.target.value),placeholder:g.printPreview.searchPlaceholder,"aria-label":g.printPreview.searchPlaceholder,className:"h-8 pl-8 text-sm"})]}),(0,t.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3 max-h-[40vh] overflow-y-auto pr-1",children:[j.map(e=>{let s=d.get(e.id);return(0,t.jsxs)("label",{className:"flex items-start gap-2 rounded border bg-background p-2 text-xs cursor-pointer hover:border-primary/50",children:[(0,t.jsx)("input",{type:"checkbox",checked:r.has(e.id),onChange:()=>x(e.id),className:"mt-0.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,t.jsxs)("span",{className:"line-clamp-2",children:[void 0!==s&&(0,t.jsxs)("span",{className:"font-semibold",children:[g.printPreview.questionNumber.replace("{num}",String(s)),g.common.colon]}),e.shortId&&(0,t.jsxs)("span",{className:"font-mono text-muted-foreground",children:[e.shortId," "]}),e.questionText]})]},e.id)}),0===j.length&&(0,t.jsx)("p",{className:"col-span-full py-2 text-center text-xs text-muted-foreground",children:g.printPreview.noSearchResult})]})]})]})}var x=e.i(122330);function h({checked:e,onChange:s,label:r}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 text-xs sm:text-sm cursor-pointer whitespace-nowrap hover:text-primary transition-colors",children:[(0,t.jsx)("input",{type:"checkbox",checked:e,onChange:e=>s(e.target.checked),className:"rounded border-gray-300 text-primary focus:ring-primary w-3.5 h-3.5 sm:w-4 sm:h-4"}),r]})}function g({options:e,onChange:s,hasCustomSpaces:r,onResetCustomSpaces:a}){let{t:i}=(0,m.b)(),l=e.answerSpace??"auto";return(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm bg-muted/50 px-2 sm:px-3 py-1 rounded-md",children:[(0,t.jsxs)("span",{className:"whitespace-nowrap text-xs sm:text-sm",children:[i.printPreview?.imageScale||"Image Scale",": ",e.imageScale,"%"]}),(0,t.jsx)("input",{type:"range",min:"30",max:"100",value:e.imageScale,onChange:e=>s({imageScale:Number(e.target.value)}),className:"w-16 sm:w-20 accent-primary"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs sm:text-sm bg-muted/50 px-2 sm:px-3 py-1 rounded-md",children:[(0,t.jsxs)("label",{htmlFor:"print-preview-answer-space",className:"whitespace-nowrap",children:[i.exam.answerSpace,":"]}),(0,t.jsxs)("select",{id:"print-preview-answer-space",value:l,onChange:e=>{(0,x.I)(e.target.value)&&s({answerSpace:e.target.value})},className:"bg-background border rounded px-2 py-0.5 text-xs sm:text-sm",children:[(0,t.jsx)("option",{value:"auto",children:i.exam.answerSpaceAuto}),(0,t.jsx)("option",{value:"none",children:i.exam.answerSpaceNone}),(0,t.jsx)("option",{value:"small",children:i.exam.answerSpaceSmall}),(0,t.jsx)("option",{value:"medium",children:i.exam.answerSpaceMedium}),(0,t.jsx)("option",{value:"large",children:i.exam.answerSpaceLarge})]}),r&&a&&(0,t.jsx)(n.f,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:a,children:i.exam.resetAllQuestionAnswerSpaces})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 sm:gap-4",children:[(0,t.jsx)(h,{checked:e.showQuestionText,onChange:e=>s({showQuestionText:e}),label:i.printPreview?.showQuestionText||"Question Text"}),(0,t.jsx)(h,{checked:e.showAnswers,onChange:e=>s({showAnswers:e}),label:i.printPreview?.showAnswers||"Show Answers"}),(0,t.jsx)(h,{checked:e.showAnalysis,onChange:e=>s({showAnalysis:e}),label:i.printPreview?.showAnalysis||"Show Analysis"}),(0,t.jsx)(h,{checked:e.showTags,onChange:e=>s({showTags:e}),label:i.printPreview?.showTags||"Show Tags"})]})]})}var f=e.i(263676),w=e.i(511445),v=e.i(84583),b=e.i(149704);let j=(0,s.memo)(function({item:e,index:s,options:r,reserveAnswerSpace:n,customAnswerSpacePx:a,onCustomAnswerSpaceChange:i,paperGroupName:l,onRemove:o}){let{t:c}=(0,m.b)(),d=u(e),p=n?(0,x.z)(r.answerSpace??"auto",e.questionText||"",a):0;return(0,t.jsxs)("div",{className:`mb-4 border-b last:border-b-0 print:break-inside-avoid [content-visibility:auto] [contain-intrinsic-size:auto_480px] print:[content-visibility:visible] ${n?"pb-4":"pb-6"}`,children:[(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-x-4 gap-y-2 leading-7",children:[(0,t.jsx)("span",{className:"text-lg font-bold",children:c.printPreview?.questionNumber?.replace("{num}",String(s+1))||`Question ${s+1}`}),e.shortId&&(0,t.jsx)("span",{className:"font-mono text-sm text-muted-foreground whitespace-nowrap",children:c.printPreview.source.replace("{id}",e.shortId)}),e.subject&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.subject.name}),e.gradeSemester&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.gradeSemester}),l&&(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[c.printPreview?.paperLevel||"Paper Level",": ",l]}),r.showTags&&d.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"font-semibold",children:[c.printPreview?.knowledgePoints||"Knowledge Points",":"]}),d.map((e,s)=>(0,t.jsx)("span",{className:"px-2 py-1 bg-muted rounded text-sm",children:e},`${e}-${s}`))]}),o&&(0,t.jsxs)("button",{type:"button",className:"print:hidden ml-auto flex items-center gap-1 rounded px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-destructive",onClick:()=>o(e.id),children:[(0,t.jsx)(f.X,{className:"h-3.5 w-3.5"}),c.printPreview.removeFromPrint]})]}),r.showQuestionText&&e.questionText?(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsx)(w.f,{content:e.questionText}),(0,t.jsx)(b.f,{svg:e.figureSvg,scale:e.figureScale,align:e.figureAlign})]}):e.originalImageUrl&&(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)("img",{src:e.originalImageUrl,alt:c.detail?.originalProblem||"Question Image",loading:"lazy",decoding:"async",className:"h-auto border rounded",style:{maxWidth:`${r.imageScale}%`}})}),r.showAnswers&&e.answerText&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"font-semibold mb-2",children:[c.printPreview?.referenceAnswer||"Reference Answer",":"]}),(0,t.jsx)(w.f,{content:e.answerText})]}),r.showAnalysis&&e.analysis&&(0,t.jsxs)("div",{className:"mb-4",children:[(0,t.jsxs)("h3",{className:"font-semibold mb-2",children:[c.printPreview?.analysis||"Analysis",":"]}),(0,t.jsx)(w.f,{content:e.analysis})]}),n&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"print-answer-space",style:{minHeight:`${p}px`}}),i&&(0,t.jsx)(v.f,{effectivePx:p,isCustom:"number"==typeof a,onChange:t=>i(e.id,t),onReset:()=>i(e.id,null)})]})]})});var y=e.i(41931),S=e.i(35209),N=e.i(442861),P=e.i(469817),A=e.i(201276);async function k(e,{timeoutMs:t=3e4,onProgress:s}={}){let r,n=Array.from(e.querySelectorAll("img")),a=0;s?.(a,n.length);let i=Promise.all(n.map(async e=>{e.loading="eager",await (e.complete?Promise.resolve():new Promise(t=>{e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0})})),a+=1,s?.(a,n.length)})),l=new Promise(e=>{r=setTimeout(e,t)});await Promise.race([i,l]),clearTimeout(r)}let C="print-preview-options",T={showQuestionText:!1,showAnswers:!1,showAnalysis:!1,showTags:!1,imageScale:70,answerSpace:"auto"},z=["showQuestionText","showAnswers","showAnalysis","showTags"];var I=e.i(470279);async function M(e){for(let t of function(e,t){let s=[];for(let r=0;r<e.length;r+=t)s.push(e.slice(r,r+t));return s}(e,P.A))await y.k.put("/api/error-items/answer-space",{items:t})}function R(){var e,i,l,o,c,u;let h=(0,r.useSearchParams)(),{t:f}=(0,m.b)(),[w,v]=(0,s.useState)([]);(0,S.f)(f.printPreview.title);let[b,R]=(0,s.useState)(!0),[F,L]=(0,s.useState)(T);(0,s.useEffect)(()=>{L(function(){try{return function(e){let t,s={...T};if(!e)return s;try{t=JSON.parse(e)}catch{return s}if(!t||"object"!=typeof t)return s;let r=t;for(let e of z)"boolean"==typeof r[e]&&(s[e]=r[e]);return"number"==typeof r.imageScale&&Number.isFinite(r.imageScale)&&(s.imageScale=Math.min(100,Math.max(30,Math.round(r.imageScale)))),(0,x.I)(r.answerSpace)&&(s.answerSpace=r.answerSpace),s}(localStorage.getItem(C))}catch{return{...T}}}())},[]);let[$,q]=(0,s.useState)(new Set),{customSpaces:Q,setSpace:E,resetAll:O,saveFailed:U}=(0,N.f)(w,M),_=(0,s.useCallback)(async()=>{try{let e=await d(e=>{let t=new URLSearchParams(h.toString());return t.set("page",String(e)),t.set("pageSize",String(P.A)),t.set("view","print"),y.k.get(`/api/error-items/list?${t.toString()}`)});v(e),q(new Set(e.map(e=>e.id)))}catch(e){A.V.error("[PrintPreview]","Failed to fetch items",{error:e})}finally{R(!1)}},[h]);(0,s.useEffect)(()=>{_()},[_]);let B=(0,s.useRef)(null),[D,V]=(0,s.useState)(null),H=async()=>{B.current&&await k(B.current,{onProgress:(e,t)=>V({loaded:e,total:t})}),V(null),window.print()},{groups:J}=(0,I.f)(),K=(0,s.useMemo)(()=>new Map(J.map(e=>[e.id,e.name])),[J]),W=(0,s.useMemo)(()=>w.filter(e=>$.has(e.id)),[w,$]),G=(0,s.useMemo)(()=>new Map(W.map((e,t)=>[e.id,t+1])),[W]),X=(e=F.showAnswers,i=F.showAnalysis,!e&&!i),Z=(l=w.length,(o=W.length)===l?String(l):`${o}/${l}`),Y=(c=w.length,u=W.length,0===c?"noItems":0===u?"noSelection":null),ee=(0,s.useCallback)(e=>{q(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),et=(0,s.useCallback)(e=>{q(t=>{let s=new Set(t);return s.delete(e),s})},[]);return b?(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,t.jsx)("p",{className:"text-muted-foreground",children:f.common.loading})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"print:hidden sticky top-0 z-10 bg-background border-b p-3 sm:p-4 shadow-sm",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(a.f,{fallbackUrl:"/notebooks"}),(0,t.jsxs)("h1",{className:"text-lg sm:text-xl font-bold flex-1",children:[f.printPreview?.title||"Print Preview"," (",Z," ",f.notebooks?.items||"items",")"]}),(0,t.jsx)(n.f,{onClick:H,size:"sm",className:"whitespace-nowrap",disabled:0===W.length||null!==D,children:D?f.printPreview.loadingImages.replace("{loaded}",String(D.loaded)).replace("{total}",String(D.total)):f.printPreview?.printButton||"Print / Save PDF"})]}),(0,t.jsx)(g,{options:F,onChange:e=>L(t=>{let s={...t,...e};try{localStorage.setItem(C,JSON.stringify(s))}catch{}return s}),hasCustomSpaces:Object.keys(Q).length>0,onResetCustomSpaces:O}),U&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:f.exam.answerSpaceSaveFailed})]})}),(0,t.jsx)("div",{className:"print:hidden border-b p-3 sm:p-4",children:(0,t.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,t.jsx)(p,{items:w,selectedIds:$,selectedCount:W.length,printNumbers:G,onToggle:ee,onSelectionChange:q})})}),(0,t.jsxs)("div",{ref:B,className:"max-w-4xl mx-auto p-8 print:p-0",children:[W.map((e,s)=>(0,t.jsx)(j,{item:e,index:s,options:F,reserveAnswerSpace:X,customAnswerSpacePx:Q[e.id],onCustomAnswerSpaceChange:E,paperGroupName:e.paperLevel?K.get(e.paperLevel)??e.paperLevel:null,onRemove:et},e.id)),Y&&(0,t.jsx)("div",{className:"text-center py-12 text-muted-foreground",children:"noSelection"===Y?f.printPreview?.noSelection||"No items selected":f.printPreview?.noItems||"No matching error items"})]})]})}e.s(["default",0,function(){let{t:e}=(0,m.b)();return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:e.common.loading}),children:(0,t.jsx)(R,{})})}],666944)},84583,122330,442861,e=>{var t=e.i(843476),s=e.i(519455),r=e.i(111110);let n=["auto","none","small","medium","large"],a={none:0,small:60,medium:120,large:240},i={choice:12,judgment:12,fill:16,solution:240};function l(e){return Number.isFinite(e)?Math.min(600,Math.max(0,Math.round(e))):0}function o(e){return"number"!=typeof e||!Number.isInteger(e)||e<0||e>600?null:e}let c=/(?:(?:^|[\s*+\-))::。??;;,,_])([A-D])\s*[..::]|(?:^|\s{2,}|[))::。??])([A-D])\s*、|[((]([A-D])[))])/gm,m=/判断(?:下列|以下|正误|对错|题)|对的(?:打|画)|错的(?:打|画)|true\s*(?:or|\/)\s*false/i,u=/_{2,}|(?:\\_){2,}|\\underline|\\rule\b|\\hspace\b|(\s*)|【\s*】|\[\s+\]|(?<![A-Za-z0-9_])\(\s*\)|[==]\s*[。??]?\s*$|填空/,d=/求证|证明[::,,]|写出(?:解题|计算|推导|推理)?过程|解答下列|试说明理由|请说明理由/,p=/(\s*(\d{1,2})\s*)/g,x=/(?:^|[\n。;;::??!!]\s*)\(\s*(\d{1,2})\s*\)/g;function h(e){let t=new Set;for(let s of e.matchAll(p))t.add(s[1]);for(let s of e.matchAll(x))t.add(s[1]);return Math.max(1,t.size)}e.s(["p",0,"exam-print-answer-space","W",0,20,"q",0,"auto","R",0,600,"r",0,0,"O",0,l,"I",0,function(e){return"string"==typeof e&&n.includes(e)},"T",0,o,"z",0,function(e,t,s){let r;if("number"==typeof s&&Number.isFinite(s))return l(s);if("auto"!==e)return a[e];let n=(r=new Set(Array.from(t.matchAll(c),e=>e[1]??e[2]??e[3]))).has("A")&&r.has("B")&&r.has("C")?"choice":m.test(t)?"judgment":h(t)>1||d.test(t)?"solution":u.test(t)?"fill":"solution";if("solution"!==n)return i[n];let o=(h(t)-1)*120;return Math.min(560,i.solution+o)}],122330),e.s(["f",0,function({effectivePx:e,isCustom:n,onChange:a,onReset:i}){let{t:o}=(0,r.b)(),c=l(e);return(0,t.jsxs)("div",{className:"answer-space-controls print:hidden flex flex-wrap items-center gap-2 text-xs text-muted-foreground mt-2 pt-1",children:[(0,t.jsxs)("span",{children:[o.exam.questionAnswerSpace,": ",c,"px"]}),(0,t.jsx)(s.f,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-xs","aria-label":o.exam.decreaseAnswerSpace,disabled:c<=0,onClick:()=>a(l(c-20)),children:"-"}),(0,t.jsx)("input",{type:"range",min:0,max:600,step:10,value:c,"aria-label":o.exam.questionAnswerSpaceSlider,onChange:e=>a(l(Number(e.target.value))),className:"w-24 sm:w-32 accent-primary"}),(0,t.jsx)(s.f,{type:"button",variant:"outline",size:"sm",className:"h-6 px-2 text-xs","aria-label":o.exam.increaseAnswerSpace,disabled:c>=600,onClick:()=>a(l(c+20)),children:"+"}),n&&(0,t.jsx)(s.f,{type:"button",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:i,children:o.exam.resetQuestionAnswerSpace})]})}],84583);var g=e.i(271645),f=e.i(201276);e.s(["f",0,function(e,t){let[s,r]=(0,g.useState)({}),[n,a]=(0,g.useState)(!1),i=(0,g.useRef)(new Map),l=(0,g.useRef)(null),c=(0,g.useRef)(t);(0,g.useEffect)(()=>{c.current=t},[t]);let m=(0,g.useMemo)(()=>{let t={};for(let r of e){let e=r.id in s?s[r.id]:o(r.answerSpacePx);"number"==typeof e&&(t[r.id]=e)}return t},[e,s]),u=(0,g.useCallback)(()=>{if(l.current&&(clearTimeout(l.current),l.current=null),0===i.current.size)return;let e=Array.from(i.current,([e,t])=>({id:e,answerSpacePx:t}));i.current.clear(),c.current(e).then(()=>a(!1)).catch(e=>{a(!0),f.V.error("[AnswerSpace]","Failed to save answer space",{error:e})})},[]);(0,g.useEffect)(()=>u,[u]);let d=(0,g.useCallback)((e,t)=>{if(0!==e.length){for(let{id:t,answerSpacePx:s}of(r(t=>{let s={...t};for(let{id:t,answerSpacePx:r}of e)s[t]=r;return s}),e))i.current.set(t,s);if(t)return void u();l.current&&clearTimeout(l.current),l.current=setTimeout(u,600)}},[u]),p=(0,g.useCallback)((e,t)=>{d([{id:e,answerSpacePx:t}],null===t)},[d]),x=(0,g.useCallback)(()=>{d(Object.keys(m).map(e=>({id:e,answerSpacePx:null})),!0)},[m,d]);return{customSpaces:m,setSpace:p,resetAll:x,saveFailed:n}}],442861)},149704,e=>{var t=e.i(843476),s=e.i(111110),r=e.i(398019),n=e.i(184110),a=e.i(975157);let i={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:l,align:o,className:c}){let{t:m}=(0,s.b)();if(!e)return null;let u=(0,n.V)(l),d=(0,n.o)(o);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",c),children:(0,t.jsx)("img",{src:(0,r.f)(e),alt:m.figure.alt,className:(0,a.f)(i[d],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===d?{marginLeft:0,marginRight:"auto"}:"right"===d?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:u/100,maxWidth:`${Math.min(u,100)}%`}})})}])},590546,e=>{var t=e.i(843476),s=e.i(618566),r=e.i(519455),n=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:a}){let i=(0,s.useRouter)();return(0,t.jsx)(r.f,{variant:"ghost",size:"icon",onClick:()=>{i.push(e)},className:a,children:(0,t.jsx)(n.f,{className:"h-5 w-5"})})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},184110,e=>{let t=["left","center","right"],s="center";function r(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,s,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,r,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:s},"V",0,function(e){return r(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:r}=(0,s.b)(),n=[r.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=n},[n])}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let r={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],314381);var i=e.i(843476),a=e.i(271645),o=e.i(632781);let s={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};s.node;let l=(0,t.f)(s),h={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};h.node;let c=(0,t.f)(h);var d=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),w=e.i(201276),x=e.i(113381);let y=null;function b(e,t,r){let n=e?.firstElementChild;n&&(n.style.width="100%",n.style.height=`${r}px`,t?.setSize(e?.offsetWidth||n.offsetWidth||800,r))}function v(e,t){let r=(0,x.L)(e,t);for(let e of r)w.V.warn("[GGB]","命令执行失败",{...e});return r.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:r=!1,showAlgebraInput:n=!1,showMenuBar:s=!1,className:h="",onRegenerate:C,onDelete:j}){let{t:k}=(0,p.b)(),D=(0,a.useRef)(null),M=(0,a.useRef)(null),E=(0,a.useRef)(void 0),N=(0,a.useId)(),R=(0,a.useRef)(`ggb-${N.replace(/[^a-zA-Z0-9_-]/g,"")}`),[S,L]=(0,a.useState)(!0),[I,_]=(0,a.useState)(null),[P,$]=(0,a.useState)(!0),[H,A]=(0,a.useState)(!1),[z,B]=(0,a.useState)(!1),Y=(0,a.useMemo)(()=>(0,x.i)(e),[e]);(0,a.useEffect)(()=>{if(0===Y.length)return;let e=!1,i=R.current,a=D.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let r=document.createElement("script");r.src="https://www.geogebra.org/apps/deployggb.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(r)}))).then(()=>{if(e)return;let o=window.GGBApplet;if(!o){_(k.geogebra.notLoaded),L(!1);return}if(a){a.innerHTML=`<div id="${i}" style="width:100%;height:${t}px"></div>`;try{new o({appName:"classic",width:"100%",height:t,showToolBar:r,showAlgebraInput:n,showMenuBar:s,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:r=>{e||(M.current=r,b(a,r,t),E.current=v(r,Y),L(!1))}},!0).inject(i)}catch(t){w.V.error("[GGB]","Init failed",{error:t}),e||(_(k.geogebra.initFailed),L(!1))}}}).catch(t=>{w.V.error("[GGB]","Script load failed",{error:t}),e||(_(k.geogebra.scriptFailed),L(!1))}),()=>{e=!0;try{let e=M.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}M.current=null,a&&(a.innerHTML="")}},[Y,r,n,s]),(0,a.useEffect)(()=>{b(D.current,M.current,P?700:t)},[P,t]);let X=(0,a.useCallback)(()=>{let e=M.current;if(e)try{e.resetConstruction(),setTimeout(()=>{M.current&&(E.current=v(M.current,Y))},300)}catch(e){w.V.warn("[GGB]","Reset failed",{error:e})}},[Y]),O=(0,a.useCallback)(async()=>{if(C&&!H){A(!0);try{await C(E.current)}finally{A(!1)}}},[C,H]),U=(0,a.useCallback)(async()=>{if(j&&!z&&await (0,f.u)(k.geogebra.confirmDelete,{destructive:!0})){B(!0);try{await j()}catch{f.c.error(k.geogebra.deleteFailed)}finally{B(!1)}}},[j,z,k]);return 0===Y.length?null:(0,i.jsxs)("div",{className:`relative rounded-lg border bg-card ${h}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:k.geogebra.title}),S&&(0,i.jsx)(o.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[C&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:O,title:k.geogebra.regenerate,disabled:H||S,children:[H?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.regenerate})]}),j&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:U,title:k.geogebra.delete,disabled:z||H,children:[z?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.delete})]}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:X,title:k.geogebra.reset,disabled:S,children:(0,i.jsx)(d.f,{className:"h-3.5 w-3.5"})}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>$(e=>!e),title:P?k.geogebra.shrink:k.geogebra.enlarge,children:P?(0,i.jsx)(c,{className:"h-3.5 w-3.5"}):(0,i.jsx)(l,{className:"h-3.5 w-3.5"})})]})]}),(0,i.jsx)("div",{ref:D,style:{width:"100%"}}),S&&(0,i.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)(o.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:k.geogebra.loading})]})}),I&&(0,i.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:I})]})}],3198)},856522,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],856522)},328623,e=>{var t=e.i(456420);let r={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"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],328623)},786563,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},232660,213761,e=>{var t=e.i(271645),r={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,r)=>Math.min(Math.max(e,t),r),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,n){return"%"===e.unit?{...r,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function o(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...r,...e,unit:"px"}}function s(e,t,r,n,i,a=0,o=0,l=n,h=i){let c={...e},d=Math.min(a,n),u=Math.min(o,i),m=Math.min(l,n),g=Math.min(h,i);t&&(t>1?(u=(d=o?o*t:d)/t,m=l*t):(d=(u=a?a/t:u)*t,g=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,u),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,d),c.x=0);let p=n-(c.x+c.width);p<0&&(c.x=Math.min(c.x,n-d),c.width+=p);let f=i-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,i-u),c.height+=f),c.width<d&&(("sw"===r||"nw"==r)&&(c.x-=d-c.width),c.width=d),c.height<u&&(("nw"===r||"ne"==r)&&(c.y-=u-c.height),c.height=u),c.width>m&&(("sw"===r||"nw"==r)&&(c.x-=m-c.width),c.width=m),c.height>g&&(("nw"===r||"ne"==r)&&(c.y-=g-c.height),c.height=g),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,u);("nw"===r||"ne"==r)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,d);("sw"===r||"nw"==r)&&(c.x-=e-c.width),c.width=e}}return c}var l={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:r,width:n,height:i}=e.getBoundingClientRect();return{x:t,y:r,width:n,height:i}}componentDidUpdate(e){let{crop:t,onComplete:r}=this.props;if(r&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&r(o(t,e,n),a(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:r}=this.props,n=this.getBox();if(!t)return;let i=o(t,n.width,n.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,s=e.clientX,l=e.clientY,h=i.x,c=i.y;if(a){let t=e.clientX-n.x,r=e.clientY-n.y,o=0,d=0;"ne"===a||"e"==a?(o=t-(i.x+i.width),d=r-i.y,h=i.x,c=i.y+i.height):"se"===a||"s"===a?(o=t-(i.x+i.width),d=r-(i.y+i.height),h=i.x,c=i.y):"sw"===a||"w"==a?(o=t-i.x,d=r-(i.y+i.height),h=i.x+i.width,c=i.y):("nw"===a||"n"==a)&&(o=t-i.x,d=r-i.y,h=i.x+i.width,c=i.y+i.height),s=h+n.x+o,l=c+n.y+d}this.evData={startClientX:s,startClientY:l,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:r,locked:n,keepSelection:i,onChange:s}=this.props,l=this.getBox();if(r||n||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-l.x,c=e.clientY-l.y,d={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(o(d,l.width,l.height),a(d,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:r,disabled:n,onChange:s,onDragStart:l}=this.props,h=this.getBox();if(n||!r||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,i(r,t=c.isResize?this.resizeCrop():this.dragCrop())||s(o(t,h.width,h.height),a(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:r,disabled:i,onChange:s,onComplete:l}=this.props;if(i)return;let h=t.key,c=!1;if(!r)return;let d=this.getBox(),u=this.makePixelCrop(d),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=m,c=!0):"ArrowRight"===h?(u.x+=m,c=!0):"ArrowUp"===h?(u.y-=m,c=!0):"ArrowDown"===h&&(u.y+=m,c=!0),c){t.cancelable&&t.preventDefault(),u.x=n(u.x,0,d.width-u.width),u.y=n(u.y,0,d.height-u.height);let e=o(u,d.width,d.height),r=a(u,d.width,d.height);s(e,r),l&&l(e,r)}};onHandlerKeyDown=(t,r)=>{var n,l;let h,{aspect:c=0,crop:d,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:x}=this.props,y=this.getBox();if(u||!d||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=s((n=o(d,y.width,y.height),l=t.key,h={...n},"ArrowLeft"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===r?(h.x-=b,h.width+=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"e"===r?h.width-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowRight"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===r?(h.x+=b,h.width-=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"e"===r?h.width+=b:"se"===r&&(h.width+=b,h.height+=b)),"ArrowUp"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===r?(h.y-=b,h.height+=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"s"===r?h.height-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowDown"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===r?(h.y+=b,h.height-=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"s"===r?h.height+=b:"se"===r&&(h.width+=b,h.height+=b)),h),c,r,y.width,y.height,m,g,p,f);if(!i(d,v)){let e=a(v,y.width,y.height);w(v,e),x&&x(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:r,onComplete:n,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(r||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),n&&n(o(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),r=this.makePixelCrop(t),i=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return r.x=n(e.startCropX+i,0,t.width-r.width),r.y=n(e.startCropY+a,0,t.height-r.height),r}getPointRegion(e,t,r,n){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;return s=n&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(r&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t,r=0,n=0){let i=Math.min(r,e.width),a=Math.min(n,e.height);return t&&(i||a)?t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]:[i,a]}resizeCrop(){let{evData:t}=this,{aspect:r=0,maxWidth:i,maxHeight:a}=this.props,o=this.getBox(),[l,h]=this.resolveMinDimensions(o,r,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(o),d=this.getPointRegion(o,t.ord,l,h),u=t.ord||d,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-l)),(h&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-h));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(p.x=t.startCropX,p.width=m,r?p.height=p.width/r:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===d?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,r?p.height=p.width/r:p.height=g):"sw"===d?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),r?p.height=p.width/r:p.height=g):"nw"===d&&(p.x=t.startCropX+m,p.width=Math.abs(m),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=s(p,r,d,o.width,o.height,l,h,i,a);return r||e.xyOrds.indexOf(u)>-1?c=f:e.xOrds.indexOf(u)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(u)>-1&&(c.y=f.y,c.height=f.height),c.x=n(c.x,0,o.width-c.width),c.y=n(c.y,0,o.height-c.height),c}renderCropSelection(){let{ariaLabels:r=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:a,ruleOfThirds:o,crop:s}=this.props,l=this.getCropStyle();if(s)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),a&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},a(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...r,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:r,circularCrop:n,className:i,crop:a,disabled:o,locked:s,style:l,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:d}=this.state,u=a?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,c&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),a?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?t.default.createElement("ellipse",{cx:`${a.x+a.width/2}${a.unit}`,cy:`${a.y+a.height/2}${a.unit}`,rx:`${a.width/2}${a.unit}`,ry:`${a.height/2}${a.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${a.x}${a.unit}`,y:`${a.y}${a.unit}`,width:`${a.width}${a.unit}`,height:`${a.height}${a.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,c],232660);let d={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,r){super(e,void 0===r?void 0:{cause:r}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let m=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),g=new Set(["mif1","msf1","mif2"]),p=new Set(["avif","avis"]);function f(e,t,r=d){let n=Math.min(1,r.maxLongEdge/Math.max(e,t),Math.sqrt(r.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*n)),height:Math.max(1,Math.floor(t*n)),scale:n}}async function w(e){let t,r;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(r=new Image).decoding="async",new Promise((e,n)=>{r.onload=()=>e(r),r.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),r.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function x(t){let{heicTo:r}=await e.A(462684);return r({blob:t,type:"image/jpeg",quality:.95})}function y(e,t){return new Promise((r,n)=>{e.toBlob(e=>e?r(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function b(e,t,r,n,i,a,o){let s,l=((s=document.createElement("canvas")).width=a,s.height=o,s),h=l.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,a,o),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,r,n,i,0,0,a,o),l}async function v(e,t){var r;let n,i=performance.now(),a=await e.arrayBuffer(),o=performance.now()-i,s=function(e){let t=(t,r)=>String.fromCharCode(...e.subarray(t,r));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let r=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),n=[t(8,12)];for(let e=16;e+4<=r;e+=4)n.push(t(e,e+4));if(n.some(e=>m.has(e)))return"heic";if(n.some(e=>p.has(e)))return"avif";if(n.some(e=>g.has(e)))return"heic"}return"unknown"}(new Uint8Array(a,0,Math.min(a.byteLength,64))),l=e.type||"",h=performance.now(),c="native",d=new Blob([a],{type:l||"application/octet-stream"});try{n=await w(d)}catch(e){if("heic"!==s)throw new u("unknown"===s?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",s,e);t?.();try{n=await w(await x(d)),c="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",s,e)}}let{width:v,height:C}=(r=n)instanceof HTMLImageElement?{width:r.naturalWidth,height:r.naturalHeight}:{width:r.width,height:r.height};if(!v||!C)throw new u("IMAGE_DECODE_FAILED",s);let j=f(v,C,{maxLongEdge:1600,maxPixels:1/0}),k=await y(b(n,0,0,v,C,j.width,j.height),.85),D=URL.createObjectURL(k),M=performance.now()-h;return{source:n,width:v,height:C,format:s,decoder:c,previewUrl:D,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(M)},dispose:()=>{URL.revokeObjectURL(D),n instanceof HTMLImageElement||n.close()}}}let C={x:0,y:0,width:1,height:1};async function j(e,t=C,r=d){var n;let i=performance.now(),a=e=>Math.min(1,Math.max(0,e)),o=Math.round(a(t.x)*e.width),s=Math.round(a(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(a(t.width)*e.width))),h=Math.max(1,Math.min(e.height-s,Math.round(a(t.height)*e.height))),c=f(l,h,r),u=b(e.source,o,s,l,h,c.width,c.height),m=performance.now()-i,g=performance.now(),p=r.startQuality,w=await y(u,p);for(let t=0;w.size>r.maxBytes&&t<12;t++)p-.05>=r.minQuality-1e-9?p=Math.round((p-.05)*100)/100:(c={width:Math.max(1,Math.floor(.85*c.width)),height:Math.max(1,Math.floor(.85*c.height)),scale:.85*c.scale},u=b(e.source,o,s,l,h,c.width,c.height)),w=await y(u,p);return{dataUrl:await (n=w,new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>t(r.error??Error("READ_FAILED")),r.readAsDataURL(n)})),width:c.width,height:c.height,bytes:w.size,quality:p,timings:{crop:Math.round(m),compress:Math.round(performance.now()-g)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,v,"X",0,j],213761)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:o,disabled:s,size:l="sm",showUnrated:h=!0,className:c}){let{t:d}=(0,n.b)(),u=e??0,m="sm"===l?"h-3.5 w-3.5":"h-5 w-5",g=u?d.difficulty.starsLabel.replace("{n}",String(u)):d.difficulty.unrated;return o?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",c),role:"group","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:d.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:s,onClick:()=>o(e===u?null:e),"aria-label":d.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,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,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&h&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:d.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",c),role:"img","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:g,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):h?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",c),children:d.difficulty.unrated}):null}])},12130,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(232660),i=e.i(519455),a=e.i(776639),o=e.i(263676),s=e.i(111110);async function l(e,t){let{naturalWidth:r,naturalHeight:n}=e;return Promise.all(t.map(t=>new Promise((i,a)=>{let o=document.createElement("canvas"),s=Math.round(t.x*r),l=Math.round(t.y*n);o.width=Math.max(1,Math.round(t.width*r)),o.height=Math.max(1,Math.round(t.height*n));let h=o.getContext("2d");h?(h.drawImage(e,s,l,o.width,o.height,0,0,o.width,o.height),o.toBlob(e=>e?i(e):a(Error("Canvas is empty")),"image/jpeg",.95)):a(Error("Canvas is not supported"))})))}let h={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},c=(0,r.forwardRef)(function({imageSrc:e,regions:n,onChange:i,imageStyle:a=h,onImageLoad:l},c){let{t:d}=(0,s.b)(),u=(0,r.useRef)(null),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},w=()=>{g&&g.width>=.02&&g.height>=.02&&i([...n,g]),m.current=null,p(null)},x=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:c,src:e,alt:"",draggable:!1,style:a,onLoad:l,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,r,n,i;let a,o,s;if(!m.current)return;let l=f(e);p((t=m.current.x,r=m.current.y,n=l.x,i=l.y,o=(a=e=>Math.min(1,Math.max(0,e)))(Math.min(t,n)),s=a(Math.min(r,i)),{x:o,y:s,width:a(Math.max(t,n))-o,height:a(Math.max(r,i))-s}))},onPointerUp:w,onPointerCancel:w,children:[n.map((e,r)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:x(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:r+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":d.batchImport.removeRegion.replace("{index}",String(r+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>i(n.filter((e,t)=>t!==r)),children:(0,t.jsx)(o.X,{className:"h-3 w-3"})})]},r)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:x(g)})]})]})});var d=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,d.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,d.f)(g);function f({zoom:e,onZoomIn:r,onZoomOut:n,onReset:i}){let{t:a}=(0,s.b)(),o="outline-none focus-visible:ring-2 focus-visible:ring-white/70",l=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${o}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:l,onClick:n,disabled:e<=1,"aria-label":a.common.cropper.zoomOut,title:a.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${o}`,onClick:i,"aria-label":a.common.cropper.resetZoom,title:a.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:l,onClick:r,disabled:e>=5,"aria-label":a.common.cropper.zoomIn,title:a.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var w=e.i(201276);let x={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:o,onClose:h,onCropComplete:d,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p,onAddPart:y,partCount:b=0}){let{t:v}=(0,s.b)(),C=/^(blob:|data:image\/)/i.test(e)?e:void 0,[j,k]=(0,r.useState)(),D=(0,r.useRef)(null),[M,E]=(0,r.useState)("single"),{containerRef:N,zoom:R,imageStyle:S,measureImage:L,zoomIn:I,zoomOut:_,reset:P}=function(e){let[t,n]=(0,r.useState)(null),i=(0,r.useRef)(null),a=(0,r.useCallback)(e=>{i.current=e,n(e)},[]),[o,s]=(0,r.useState)(1),l=(0,r.useRef)(1),[h,c]=(0,r.useState)(null),d=(0,r.useRef)(null),u=(0,r.useRef)(!1),m=(0,r.useCallback)((e,t,r)=>{let n=i.current,a=l.current,o=Math.min(5,Math.max(1,e));if(!n||o===a)return;if(1===a){let e=n.querySelector("img");e&&c(e.clientWidth)}let h=n.getBoundingClientRect(),u=(t??h.left+h.width/2)-h.left,m=(r??h.top+h.height/2)-h.top;d.current={viewX:u,viewY:m,contentX:n.scrollLeft+u,contentY:n.scrollTop+m,ratio:o/a},l.current=o,s(o)},[]);(0,r.useLayoutEffect)(()=>{let e=i.current,t=d.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,d.current=null)},[o]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(l.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},r=null,n=e=>{let[t,r]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-r.clientX,t.clientY-r.clientY),centerX:(t.clientX+r.clientX)/2,centerY:(t.clientY+r.clientY)/2}},i=e=>{2===e.touches.length&&(r={distance:n(e.touches).distance,zoom:l.current},u.current=!0)},a=e=>{if(!r||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:i,centerY:a}=n(e.touches);r.distance>0&&m(r.zoom*(t/r.distance),i,a)},o=e=>{e.touches.length<2&&(r=null,u.current=!1)},s=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",i,{passive:!0}),t.addEventListener("touchmove",a,{passive:!1}),t.addEventListener("touchend",o),t.addEventListener("touchcancel",o),t.addEventListener("pointermove",s,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",o),t.removeEventListener("touchcancel",o),t.removeEventListener("pointermove",s,{capture:!0})}},[t,m]);let g=(0,r.useCallback)(e=>{e&&1===l.current&&c(e.clientWidth)},[]),p=(0,r.useCallback)(()=>m(1.25*l.current),[m]),f=(0,r.useCallback)(()=>m(l.current/1.25),[m]),w=(0,r.useCallback)(()=>{l.current=1,d.current=null,s(1)},[]),x=1!==o&&h?{...e,width:h*o,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:a,zoom:o,imageStyle:x,measureImage:g,zoomIn:p,zoomOut:f,reset:w}}(x[M]);(0,r.useEffect)(()=>{P()},[e,P]);let[$,H]=(0,r.useState)({src:e,regions:[]}),A=$.src===e?$.regions:[],z=t=>H({src:e,regions:t}),B=(0,r.useRef)(null),Y=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],X={single:v.batchImport.singleMode,auto:v.batchImport.autoMode,multi:v.batchImport.multiMode},O=async()=>{if(0!==A.length){if(m){m(A,!0),z([]);return}if(B.current&&u)try{u(await l(B.current,A)),z([])}catch(e){w.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},U=()=>j&&j.width>0&&j.height>0?{x:j.x/100,y:j.y/100,width:j.width/100,height:j.height/100}:{x:0,y:0,width:1,height:1},K=async()=>{let e=U();if("auto"===M&&p)return void p(e);if(m)return void m([e],!1);if(D.current&&d)try{let[t]=await l(D.current,[e]);d(t)}catch(e){w.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(a.N,{open:o,onOpenChange:e=>!e&&h(),children:(0,t.jsxs)(a.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(a.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(a.F,{children:v.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:N,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===M?(0,t.jsx)(c,{ref:B,imageSrc:C,regions:A,onChange:z,imageStyle:S,onImageLoad:e=>L(e.currentTarget)}):(0,t.jsx)(n.f,{crop:j,onChange:(e,t)=>k(t),children:(0,t.jsx)("img",{ref:D,alt:"Crop me",src:C,onLoad:function(e){k({unit:"%",x:0,y:0,width:100,height:100}),L(e.currentTarget)},style:S})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:R,onZoomIn:I,onZoomOut:_,onReset:P})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[Y.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===Y.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:Y.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":M===e,onClick:()=>{P(),E(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${M===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:X[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===M?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(A.length))}`:"auto"===M?v.batchImport.autoHint:b>0?v.upload.parts.cropHint.replace("{n}",String(b+1)):v.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 justify-end",children:["multi"===M&&A.length>0&&(0,t.jsx)(i.f,{variant:"ghost",onClick:()=>z([]),children:v.batchImport.clear}),(0,t.jsx)(i.f,{variant:"outline",onClick:h,children:v.common.cancel||"Cancel"}),"multi"===M?(0,t.jsx)(i.f,{onClick:O,disabled:0===A.length,children:v.batchImport.start.replace("{count}",String(A.length))}):(0,t.jsxs)(t.Fragment,{children:["single"===M&&y&&(0,t.jsx)(i.f,{variant:"secondary",onClick:()=>y(U()),"data-testid":"crop-add-part",children:v.upload.parts.addNext}),(0,t.jsx)(i.f,{onClick:K,children:"auto"===M?v.batchImport.autoStart:b>0?v.upload.parts.confirm.replace("{count}",String(b+1)):v.common.confirm||"Confirm"})]})]})]})]})]})})}],12130)},141176,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(456420);let i={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};i.node;let a=(0,n.f)(i);var o=e.i(772382),s=e.i(511445),l=e.i(624687),h=e.i(111110),c=e.i(975157);e.s(["f",0,function({value:e,onChange:n,className:i,...d}){let{t:u}=(0,h.b)(),[m,g]=(0,r.useState)("source"),p=(0,r.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:a},{mode:"preview",label:u.markdownEditor.preview,icon:o.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:r,icon:n})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,c.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(n,{className:"h-3.5 w-3.5"}),r]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(l.f,{value:e,onChange:e=>n(e.target.value),className:i,...d}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(s.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(967489),i=e.i(856423),a=e.i(41931),o=e.i(201276),s=e.i(111110);e.s(["f",0,function({value:e,onChange:l,className:h}){let[c,d]=(0,r.useState)([]),{t:u}=(0,s.b)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await a.k.get("/api/notebooks");d(e)}catch(e){o.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(n.d,{value:e,onValueChange:l,children:[(0,t.jsx)(n.P,{className:h,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(n.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(n.r,{children:0===c.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):c.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],438465);var l=e.i(664030);e.s(["f",0,function({value:e,onChange:r,disabled:i}){let{groups:a,loading:o}=(0,l.f)(),s=a.filter(e=>e.isActive);return(0,t.jsxs)(n.d,{value:e,onValueChange:r,disabled:i||o,children:[(0,t.jsx)(n.P,{children:(0,t.jsx)(n.U,{placeholder:"选择卷别"})}),(0,t.jsx)(n.r,{children:s.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),r=e.i(111110),n=e.i(398019),i=e.i(184110),a=e.i(975157);let o={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:s,align:l,className:h}){let{t:c}=(0,r.b)();if(!e)return null;let d=(0,i.V)(s),u=(0,i.o)(l);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",h),children:(0,t.jsx)("img",{src:(0,n.f)(e),alt:c.figure.alt,className:(0,a.f)(o[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:d/100,maxWidth:`${Math.min(d,100)}%`}})})}])},574041,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(263676),i=e.i(487486),a=e.i(793479),o=e.i(41931),s=e.i(201276);e.s(["f",0,function({value:e=[],onChange:l,placeholder:h="Enter tags...",className:c="",enterHint:d,subject:u,gradeStage:m}){let[g,p]=(0,r.useState)(""),[f,w]=(0,r.useState)([]),[x,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(0),C=(0,r.useRef)(null),j=(0,r.useRef)(null),k=(0,r.useCallback)(async t=>{try{let r=new URLSearchParams({q:t});u&&r.append("subject",u),m&&r.append("stage",m);let n=((await o.k.get(`/api/tags/suggestions?${r.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));w(n.slice(0,20)),y(n.length>0),v(0)}catch(e){s.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,r.useEffect)(()=>{g.trim()&&k(g)},[g,k]);let D=t=>{t.trim()&&!e.includes(t.trim())&&(l([...e,t.trim()]),p(""),w([]),y(!1),v(0))},M=t=>{l(e.filter(e=>e!==t))};return(0,r.useEffect)(()=>{let e=e=>{!j.current||j.current.contains(e.target)||C.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(i.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>M(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(n.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(a.f,{ref:C,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(w([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?D(f[b]):g.trim()&&D(g)):"ArrowDown"===t.key?(t.preventDefault(),v(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),v(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),v(0)):"Backspace"===t.key&&!g&&e.length>0&&M(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?h:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),x&&f.length>0&&(0,t.jsx)("div",{ref:j,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,r)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${r===b?"bg-accent":""}`,onClick:()=>D(e),onMouseEnter:()=>v(r),children:e},e))}),g&&!x&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:d?`${d} "${g}"`:`Press Enter to create "${g}"`})]})}])},184110,e=>{let t=["left","center","right"],r="center";function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,r,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,n,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:r},"V",0,function(e){return n(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},62825,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let r={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],314381);var i=e.i(843476),a=e.i(271645),o=e.i(632781);let s={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};s.node;let l=(0,t.f)(s),h={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};h.node;let c=(0,t.f)(h);var d=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),w=e.i(201276),x=e.i(113381);let y=null;function b(e,t,r){let n=e?.firstElementChild;n&&(n.style.width="100%",n.style.height=`${r}px`,t?.setSize(e?.offsetWidth||n.offsetWidth||800,r))}function v(e,t){let r=(0,x.L)(e,t);for(let e of r)w.V.warn("[GGB]","命令执行失败",{...e});return r.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:r=!1,showAlgebraInput:n=!1,showMenuBar:s=!1,className:h="",onRegenerate:C,onDelete:j}){let{t:k}=(0,p.b)(),D=(0,a.useRef)(null),M=(0,a.useRef)(null),E=(0,a.useRef)(void 0),N=(0,a.useId)(),R=(0,a.useRef)(`ggb-${N.replace(/[^a-zA-Z0-9_-]/g,"")}`),[S,L]=(0,a.useState)(!0),[I,_]=(0,a.useState)(null),[P,$]=(0,a.useState)(!0),[H,A]=(0,a.useState)(!1),[z,B]=(0,a.useState)(!1),Y=(0,a.useMemo)(()=>(0,x.i)(e),[e]);(0,a.useEffect)(()=>{if(0===Y.length)return;let e=!1,i=R.current,a=D.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let r=document.createElement("script");r.src="https://www.geogebra.org/apps/deployggb.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(r)}))).then(()=>{if(e)return;let o=window.GGBApplet;if(!o){_(k.geogebra.notLoaded),L(!1);return}if(a){a.innerHTML=`<div id="${i}" style="width:100%;height:${t}px"></div>`;try{new o({appName:"classic",width:"100%",height:t,showToolBar:r,showAlgebraInput:n,showMenuBar:s,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:r=>{e||(M.current=r,b(a,r,t),E.current=v(r,Y),L(!1))}},!0).inject(i)}catch(t){w.V.error("[GGB]","Init failed",{error:t}),e||(_(k.geogebra.initFailed),L(!1))}}}).catch(t=>{w.V.error("[GGB]","Script load failed",{error:t}),e||(_(k.geogebra.scriptFailed),L(!1))}),()=>{e=!0;try{let e=M.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}M.current=null,a&&(a.innerHTML="")}},[Y,r,n,s]),(0,a.useEffect)(()=>{b(D.current,M.current,P?700:t)},[P,t]);let X=(0,a.useCallback)(()=>{let e=M.current;if(e)try{e.resetConstruction(),setTimeout(()=>{M.current&&(E.current=v(M.current,Y))},300)}catch(e){w.V.warn("[GGB]","Reset failed",{error:e})}},[Y]),O=(0,a.useCallback)(async()=>{if(C&&!H){A(!0);try{await C(E.current)}finally{A(!1)}}},[C,H]),U=(0,a.useCallback)(async()=>{if(j&&!z&&await (0,f.u)(k.geogebra.confirmDelete,{destructive:!0})){B(!0);try{await j()}catch{f.c.error(k.geogebra.deleteFailed)}finally{B(!1)}}},[j,z,k]);return 0===Y.length?null:(0,i.jsxs)("div",{className:`relative rounded-lg border bg-card ${h}`,children:[(0,i.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:k.geogebra.title}),S&&(0,i.jsx)(o.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-1",children:[C&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:O,title:k.geogebra.regenerate,disabled:H||S,children:[H?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.regenerate})]}),j&&(0,i.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:U,title:k.geogebra.delete,disabled:z||H,children:[z?(0,i.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,i.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,i.jsx)("span",{children:k.geogebra.delete})]}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:X,title:k.geogebra.reset,disabled:S,children:(0,i.jsx)(d.f,{className:"h-3.5 w-3.5"})}),(0,i.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>$(e=>!e),title:P?k.geogebra.shrink:k.geogebra.enlarge,children:P?(0,i.jsx)(c,{className:"h-3.5 w-3.5"}):(0,i.jsx)(l,{className:"h-3.5 w-3.5"})})]})]}),(0,i.jsx)("div",{ref:D,style:{width:"100%"}}),S&&(0,i.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,i.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,i.jsx)(o.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,i.jsx)("span",{className:"text-sm text-muted-foreground",children:k.geogebra.loading})]})}),I&&(0,i.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:I})]})}],3198)},856522,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],856522)},328623,e=>{var t=e.i(456420);let r={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"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],328623)},786563,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},232660,213761,e=>{var t=e.i(271645),r={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,r)=>Math.min(Math.max(e,t),r),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,n){return"%"===e.unit?{...r,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function o(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...r,...e,unit:"px"}}function s(e,t,r,n,i,a=0,o=0,l=n,h=i){let c={...e},d=Math.min(a,n),u=Math.min(o,i),m=Math.min(l,n),g=Math.min(h,i);t&&(t>1?(u=(d=o?o*t:d)/t,m=l*t):(d=(u=a?a/t:u)*t,g=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,u),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,d),c.x=0);let p=n-(c.x+c.width);p<0&&(c.x=Math.min(c.x,n-d),c.width+=p);let f=i-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,i-u),c.height+=f),c.width<d&&(("sw"===r||"nw"==r)&&(c.x-=d-c.width),c.width=d),c.height<u&&(("nw"===r||"ne"==r)&&(c.y-=u-c.height),c.height=u),c.width>m&&(("sw"===r||"nw"==r)&&(c.x-=m-c.width),c.width=m),c.height>g&&(("nw"===r||"ne"==r)&&(c.y-=g-c.height),c.height=g),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,u);("nw"===r||"ne"==r)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,d);("sw"===r||"nw"==r)&&(c.x-=e-c.width),c.width=e}}return c}var l={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:r,width:n,height:i}=e.getBoundingClientRect();return{x:t,y:r,width:n,height:i}}componentDidUpdate(e){let{crop:t,onComplete:r}=this.props;if(r&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&r(o(t,e,n),a(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:r}=this.props,n=this.getBox();if(!t)return;let i=o(t,n.width,n.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,s=e.clientX,l=e.clientY,h=i.x,c=i.y;if(a){let t=e.clientX-n.x,r=e.clientY-n.y,o=0,d=0;"ne"===a||"e"==a?(o=t-(i.x+i.width),d=r-i.y,h=i.x,c=i.y+i.height):"se"===a||"s"===a?(o=t-(i.x+i.width),d=r-(i.y+i.height),h=i.x,c=i.y):"sw"===a||"w"==a?(o=t-i.x,d=r-(i.y+i.height),h=i.x+i.width,c=i.y):("nw"===a||"n"==a)&&(o=t-i.x,d=r-i.y,h=i.x+i.width,c=i.y+i.height),s=h+n.x+o,l=c+n.y+d}this.evData={startClientX:s,startClientY:l,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:r,locked:n,keepSelection:i,onChange:s}=this.props,l=this.getBox();if(r||n||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-l.x,c=e.clientY-l.y,d={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(o(d,l.width,l.height),a(d,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:r,disabled:n,onChange:s,onDragStart:l}=this.props,h=this.getBox();if(n||!r||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,i(r,t=c.isResize?this.resizeCrop():this.dragCrop())||s(o(t,h.width,h.height),a(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:r,disabled:i,onChange:s,onComplete:l}=this.props;if(i)return;let h=t.key,c=!1;if(!r)return;let d=this.getBox(),u=this.makePixelCrop(d),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=m,c=!0):"ArrowRight"===h?(u.x+=m,c=!0):"ArrowUp"===h?(u.y-=m,c=!0):"ArrowDown"===h&&(u.y+=m,c=!0),c){t.cancelable&&t.preventDefault(),u.x=n(u.x,0,d.width-u.width),u.y=n(u.y,0,d.height-u.height);let e=o(u,d.width,d.height),r=a(u,d.width,d.height);s(e,r),l&&l(e,r)}};onHandlerKeyDown=(t,r)=>{var n,l;let h,{aspect:c=0,crop:d,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:x}=this.props,y=this.getBox();if(u||!d||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=s((n=o(d,y.width,y.height),l=t.key,h={...n},"ArrowLeft"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===r?(h.x-=b,h.width+=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"e"===r?h.width-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowRight"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===r?(h.x+=b,h.width-=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"e"===r?h.width+=b:"se"===r&&(h.width+=b,h.height+=b)),"ArrowUp"===l?"nw"===r?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===r?(h.y-=b,h.height+=b):"ne"===r?(h.y-=b,h.width+=b,h.height+=b):"sw"===r?(h.x+=b,h.width-=b,h.height-=b):"s"===r?h.height-=b:"se"===r&&(h.width-=b,h.height-=b):"ArrowDown"===l&&("nw"===r?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===r?(h.y+=b,h.height-=b):"ne"===r?(h.y+=b,h.width-=b,h.height-=b):"sw"===r?(h.x-=b,h.width+=b,h.height+=b):"s"===r?h.height+=b:"se"===r&&(h.width+=b,h.height+=b)),h),c,r,y.width,y.height,m,g,p,f);if(!i(d,v)){let e=a(v,y.width,y.height);w(v,e),x&&x(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:r,onComplete:n,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(r||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),n&&n(o(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),r=this.makePixelCrop(t),i=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return r.x=n(e.startCropX+i,0,t.width-r.width),r.y=n(e.startCropY+a,0,t.height-r.height),r}getPointRegion(e,t,r,n){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;return s=n&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(r&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t,r=0,n=0){let i=Math.min(r,e.width),a=Math.min(n,e.height);return t&&(i||a)?t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]:[i,a]}resizeCrop(){let{evData:t}=this,{aspect:r=0,maxWidth:i,maxHeight:a}=this.props,o=this.getBox(),[l,h]=this.resolveMinDimensions(o,r,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(o),d=this.getPointRegion(o,t.ord,l,h),u=t.ord||d,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-l)),(h&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-h));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(p.x=t.startCropX,p.width=m,r?p.height=p.width/r:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===d?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,r?p.height=p.width/r:p.height=g):"sw"===d?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),r?p.height=p.width/r:p.height=g):"nw"===d&&(p.x=t.startCropX+m,p.width=Math.abs(m),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=s(p,r,d,o.width,o.height,l,h,i,a);return r||e.xyOrds.indexOf(u)>-1?c=f:e.xOrds.indexOf(u)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(u)>-1&&(c.y=f.y,c.height=f.height),c.x=n(c.x,0,o.width-c.width),c.y=n(c.y,0,o.height-c.height),c}renderCropSelection(){let{ariaLabels:r=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:a,ruleOfThirds:o,crop:s}=this.props,l=this.getCropStyle();if(s)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),a&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},a(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...r,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:r,circularCrop:n,className:i,crop:a,disabled:o,locked:s,style:l,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:d}=this.state,u=a?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,c&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),a?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?t.default.createElement("ellipse",{cx:`${a.x+a.width/2}${a.unit}`,cy:`${a.y+a.height/2}${a.unit}`,rx:`${a.width/2}${a.unit}`,ry:`${a.height/2}${a.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${a.x}${a.unit}`,y:`${a.y}${a.unit}`,width:`${a.width}${a.unit}`,height:`${a.height}${a.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,c],232660);let d={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,r){super(e,void 0===r?void 0:{cause:r}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let m=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),g=new Set(["mif1","msf1","mif2"]),p=new Set(["avif","avis"]);function f(e,t,r=d){let n=Math.min(1,r.maxLongEdge/Math.max(e,t),Math.sqrt(r.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*n)),height:Math.max(1,Math.floor(t*n)),scale:n}}async function w(e){let t,r;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(r=new Image).decoding="async",new Promise((e,n)=>{r.onload=()=>e(r),r.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),r.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function x(t){let{heicTo:r}=await e.A(462684);return r({blob:t,type:"image/jpeg",quality:.95})}function y(e,t){return new Promise((r,n)=>{e.toBlob(e=>e?r(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function b(e,t,r,n,i,a,o){let s,l=((s=document.createElement("canvas")).width=a,s.height=o,s),h=l.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,a,o),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,r,n,i,0,0,a,o),l}async function v(e,t){var r;let n,i=performance.now(),a=await e.arrayBuffer(),o=performance.now()-i,s=function(e){let t=(t,r)=>String.fromCharCode(...e.subarray(t,r));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let r=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),n=[t(8,12)];for(let e=16;e+4<=r;e+=4)n.push(t(e,e+4));if(n.some(e=>m.has(e)))return"heic";if(n.some(e=>p.has(e)))return"avif";if(n.some(e=>g.has(e)))return"heic"}return"unknown"}(new Uint8Array(a,0,Math.min(a.byteLength,64))),l=e.type||"",h=performance.now(),c="native",d=new Blob([a],{type:l||"application/octet-stream"});try{n=await w(d)}catch(e){if("heic"!==s)throw new u("unknown"===s?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",s,e);t?.();try{n=await w(await x(d)),c="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",s,e)}}let{width:v,height:C}=(r=n)instanceof HTMLImageElement?{width:r.naturalWidth,height:r.naturalHeight}:{width:r.width,height:r.height};if(!v||!C)throw new u("IMAGE_DECODE_FAILED",s);let j=f(v,C,{maxLongEdge:1600,maxPixels:1/0}),k=await y(b(n,0,0,v,C,j.width,j.height),.85),D=URL.createObjectURL(k),M=performance.now()-h;return{source:n,width:v,height:C,format:s,decoder:c,previewUrl:D,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(M)},dispose:()=>{URL.revokeObjectURL(D),n instanceof HTMLImageElement||n.close()}}}let C={x:0,y:0,width:1,height:1};async function j(e,t=C,r=d){var n;let i=performance.now(),a=e=>Math.min(1,Math.max(0,e)),o=Math.round(a(t.x)*e.width),s=Math.round(a(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(a(t.width)*e.width))),h=Math.max(1,Math.min(e.height-s,Math.round(a(t.height)*e.height))),c=f(l,h,r),u=b(e.source,o,s,l,h,c.width,c.height),m=performance.now()-i,g=performance.now(),p=r.startQuality,w=await y(u,p);for(let t=0;w.size>r.maxBytes&&t<12;t++)p-.05>=r.minQuality-1e-9?p=Math.round((p-.05)*100)/100:(c={width:Math.max(1,Math.floor(.85*c.width)),height:Math.max(1,Math.floor(.85*c.height)),scale:.85*c.scale},u=b(e.source,o,s,l,h,c.width,c.height)),w=await y(u,p);return{dataUrl:await (n=w,new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>t(r.error??Error("READ_FAILED")),r.readAsDataURL(n)})),width:c.width,height:c.height,bytes:w.size,quality:p,timings:{crop:Math.round(m),compress:Math.round(performance.now()-g)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,v,"X",0,j],213761)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:o,disabled:s,size:l="sm",showUnrated:h=!0,className:c}){let{t:d}=(0,n.b)(),u=e??0,m="sm"===l?"h-3.5 w-3.5":"h-5 w-5",g=u?d.difficulty.starsLabel.replace("{n}",String(u)):d.difficulty.unrated;return o?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",c),role:"group","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:d.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:s,onClick:()=>o(e===u?null:e),"aria-label":d.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,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,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&h&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:d.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",c),role:"img","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:g,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):h?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",c),children:d.difficulty.unrated}):null}])},12130,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(232660),i=e.i(519455),a=e.i(776639),o=e.i(263676),s=e.i(111110);async function l(e,t){let{naturalWidth:r,naturalHeight:n}=e;return Promise.all(t.map(t=>new Promise((i,a)=>{let o=document.createElement("canvas"),s=Math.round(t.x*r),l=Math.round(t.y*n);o.width=Math.max(1,Math.round(t.width*r)),o.height=Math.max(1,Math.round(t.height*n));let h=o.getContext("2d");h?(h.drawImage(e,s,l,o.width,o.height,0,0,o.width,o.height),o.toBlob(e=>e?i(e):a(Error("Canvas is empty")),"image/jpeg",.95)):a(Error("Canvas is not supported"))})))}let h={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},c=(0,r.forwardRef)(function({imageSrc:e,regions:n,onChange:i,imageStyle:a=h,onImageLoad:l},c){let{t:d}=(0,s.b)(),u=(0,r.useRef)(null),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},w=()=>{g&&g.width>=.02&&g.height>=.02&&i([...n,g]),m.current=null,p(null)},x=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:c,src:e,alt:"",draggable:!1,style:a,onLoad:l,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,r,n,i;let a,o,s;if(!m.current)return;let l=f(e);p((t=m.current.x,r=m.current.y,n=l.x,i=l.y,o=(a=e=>Math.min(1,Math.max(0,e)))(Math.min(t,n)),s=a(Math.min(r,i)),{x:o,y:s,width:a(Math.max(t,n))-o,height:a(Math.max(r,i))-s}))},onPointerUp:w,onPointerCancel:w,children:[n.map((e,r)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:x(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:r+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":d.batchImport.removeRegion.replace("{index}",String(r+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>i(n.filter((e,t)=>t!==r)),children:(0,t.jsx)(o.X,{className:"h-3 w-3"})})]},r)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:x(g)})]})]})});var d=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,d.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,d.f)(g);function f({zoom:e,onZoomIn:r,onZoomOut:n,onReset:i}){let{t:a}=(0,s.b)(),o="outline-none focus-visible:ring-2 focus-visible:ring-white/70",l=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${o}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:l,onClick:n,disabled:e<=1,"aria-label":a.common.cropper.zoomOut,title:a.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${o}`,onClick:i,"aria-label":a.common.cropper.resetZoom,title:a.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:l,onClick:r,disabled:e>=5,"aria-label":a.common.cropper.zoomIn,title:a.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var w=e.i(201276);let x={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:o,onClose:h,onCropComplete:d,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p,onAddPart:y,partCount:b=0}){let{t:v}=(0,s.b)(),C=/^(blob:|data:image\/)/i.test(e)?e:void 0,[j,k]=(0,r.useState)(),D=(0,r.useRef)(null),[M,E]=(0,r.useState)("single"),{containerRef:N,zoom:R,imageStyle:S,measureImage:L,zoomIn:I,zoomOut:_,reset:P}=function(e){let[t,n]=(0,r.useState)(null),i=(0,r.useRef)(null),a=(0,r.useCallback)(e=>{i.current=e,n(e)},[]),[o,s]=(0,r.useState)(1),l=(0,r.useRef)(1),[h,c]=(0,r.useState)(null),d=(0,r.useRef)(null),u=(0,r.useRef)(!1),m=(0,r.useCallback)((e,t,r)=>{let n=i.current,a=l.current,o=Math.min(5,Math.max(1,e));if(!n||o===a)return;if(1===a){let e=n.querySelector("img");e&&c(e.clientWidth)}let h=n.getBoundingClientRect(),u=(t??h.left+h.width/2)-h.left,m=(r??h.top+h.height/2)-h.top;d.current={viewX:u,viewY:m,contentX:n.scrollLeft+u,contentY:n.scrollTop+m,ratio:o/a},l.current=o,s(o)},[]);(0,r.useLayoutEffect)(()=>{let e=i.current,t=d.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,d.current=null)},[o]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(l.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},r=null,n=e=>{let[t,r]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-r.clientX,t.clientY-r.clientY),centerX:(t.clientX+r.clientX)/2,centerY:(t.clientY+r.clientY)/2}},i=e=>{2===e.touches.length&&(r={distance:n(e.touches).distance,zoom:l.current},u.current=!0)},a=e=>{if(!r||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:i,centerY:a}=n(e.touches);r.distance>0&&m(r.zoom*(t/r.distance),i,a)},o=e=>{e.touches.length<2&&(r=null,u.current=!1)},s=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",i,{passive:!0}),t.addEventListener("touchmove",a,{passive:!1}),t.addEventListener("touchend",o),t.addEventListener("touchcancel",o),t.addEventListener("pointermove",s,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",i),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",o),t.removeEventListener("touchcancel",o),t.removeEventListener("pointermove",s,{capture:!0})}},[t,m]);let g=(0,r.useCallback)(e=>{e&&1===l.current&&c(e.clientWidth)},[]),p=(0,r.useCallback)(()=>m(1.25*l.current),[m]),f=(0,r.useCallback)(()=>m(l.current/1.25),[m]),w=(0,r.useCallback)(()=>{l.current=1,d.current=null,s(1)},[]),x=1!==o&&h?{...e,width:h*o,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:a,zoom:o,imageStyle:x,measureImage:g,zoomIn:p,zoomOut:f,reset:w}}(x[M]);(0,r.useEffect)(()=>{P()},[e,P]);let[$,H]=(0,r.useState)({src:e,regions:[]}),A=$.src===e?$.regions:[],z=t=>H({src:e,regions:t}),B=(0,r.useRef)(null),Y=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],X={single:v.batchImport.singleMode,auto:v.batchImport.autoMode,multi:v.batchImport.multiMode},O=async()=>{if(0!==A.length){if(m){m(A,!0),z([]);return}if(B.current&&u)try{u(await l(B.current,A)),z([])}catch(e){w.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},U=()=>j&&j.width>0&&j.height>0?{x:j.x/100,y:j.y/100,width:j.width/100,height:j.height/100}:{x:0,y:0,width:1,height:1},K=async()=>{let e=U();if("auto"===M&&p)return void p(e);if(m)return void m([e],!1);if(D.current&&d)try{let[t]=await l(D.current,[e]);d(t)}catch(e){w.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(a.N,{open:o,onOpenChange:e=>!e&&h(),children:(0,t.jsxs)(a.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(a.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(a.F,{children:v.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:N,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===M?(0,t.jsx)(c,{ref:B,imageSrc:C,regions:A,onChange:z,imageStyle:S,onImageLoad:e=>L(e.currentTarget)}):(0,t.jsx)(n.f,{crop:j,onChange:(e,t)=>k(t),children:(0,t.jsx)("img",{ref:D,alt:"Crop me",src:C,onLoad:function(e){k({unit:"%",x:0,y:0,width:100,height:100}),L(e.currentTarget)},style:S})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:R,onZoomIn:I,onZoomOut:_,onReset:P})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[Y.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===Y.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:Y.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":M===e,onClick:()=>{P(),E(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${M===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:X[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===M?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(A.length))}`:"auto"===M?v.batchImport.autoHint:b>0?v.upload.parts.cropHint.replace("{n}",String(b+1)):v.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 justify-end",children:["multi"===M&&A.length>0&&(0,t.jsx)(i.f,{variant:"ghost",onClick:()=>z([]),children:v.batchImport.clear}),(0,t.jsx)(i.f,{variant:"outline",onClick:h,children:v.common.cancel||"Cancel"}),"multi"===M?(0,t.jsx)(i.f,{onClick:O,disabled:0===A.length,children:v.batchImport.start.replace("{count}",String(A.length))}):(0,t.jsxs)(t.Fragment,{children:["single"===M&&y&&(0,t.jsx)(i.f,{variant:"secondary",onClick:()=>y(U()),"data-testid":"crop-add-part",children:v.upload.parts.addNext}),(0,t.jsx)(i.f,{onClick:K,children:"auto"===M?v.batchImport.autoStart:b>0?v.upload.parts.confirm.replace("{count}",String(b+1)):v.common.confirm||"Confirm"})]})]})]})]})]})})}],12130)},141176,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(456420);let i={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};i.node;let a=(0,n.f)(i);var o=e.i(772382),s=e.i(511445),l=e.i(624687),h=e.i(111110),c=e.i(975157);e.s(["f",0,function({value:e,onChange:n,className:i,...d}){let{t:u}=(0,h.b)(),[m,g]=(0,r.useState)("source"),p=(0,r.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:a},{mode:"preview",label:u.markdownEditor.preview,icon:o.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:r,icon:n})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,c.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(n,{className:"h-3.5 w-3.5"}),r]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(l.f,{value:e,onChange:e=>n(e.target.value),className:i,...d}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(s.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(967489),i=e.i(856423),a=e.i(41931),o=e.i(201276),s=e.i(111110);e.s(["f",0,function({value:e,onChange:l,className:h}){let[c,d]=(0,r.useState)([]),{t:u}=(0,s.b)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await a.k.get("/api/notebooks");d(e)}catch(e){o.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(n.d,{value:e,onValueChange:l,children:[(0,t.jsx)(n.P,{className:h,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(n.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(n.r,{children:0===c.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):c.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],438465);var l=e.i(470279);e.s(["f",0,function({value:e,onChange:r,disabled:i}){let{groups:a,loading:o}=(0,l.f)(),s=a.filter(e=>e.isActive);return(0,t.jsxs)(n.d,{value:e,onValueChange:r,disabled:i||o,children:[(0,t.jsx)(n.P,{children:(0,t.jsx)(n.U,{placeholder:"选择卷别"})}),(0,t.jsx)(n.r,{children:s.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),r=e.i(111110),n=e.i(398019),i=e.i(184110),a=e.i(975157);let o={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:s,align:l,className:h}){let{t:c}=(0,r.b)();if(!e)return null;let d=(0,i.V)(s),u=(0,i.o)(l);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",h),children:(0,t.jsx)("img",{src:(0,n.f)(e),alt:c.figure.alt,className:(0,a.f)(o[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:d/100,maxWidth:`${Math.min(d,100)}%`}})})}])},574041,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(263676),i=e.i(487486),a=e.i(793479),o=e.i(41931),s=e.i(201276);e.s(["f",0,function({value:e=[],onChange:l,placeholder:h="Enter tags...",className:c="",enterHint:d,subject:u,gradeStage:m}){let[g,p]=(0,r.useState)(""),[f,w]=(0,r.useState)([]),[x,y]=(0,r.useState)(!1),[b,v]=(0,r.useState)(0),C=(0,r.useRef)(null),j=(0,r.useRef)(null),k=(0,r.useCallback)(async t=>{try{let r=new URLSearchParams({q:t});u&&r.append("subject",u),m&&r.append("stage",m);let n=((await o.k.get(`/api/tags/suggestions?${r.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));w(n.slice(0,20)),y(n.length>0),v(0)}catch(e){s.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,r.useEffect)(()=>{g.trim()&&k(g)},[g,k]);let D=t=>{t.trim()&&!e.includes(t.trim())&&(l([...e,t.trim()]),p(""),w([]),y(!1),v(0))},M=t=>{l(e.filter(e=>e!==t))};return(0,r.useEffect)(()=>{let e=e=>{!j.current||j.current.contains(e.target)||C.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(i.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>M(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(n.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(a.f,{ref:C,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(w([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?D(f[b]):g.trim()&&D(g)):"ArrowDown"===t.key?(t.preventDefault(),v(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),v(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),v(0)):"Backspace"===t.key&&!g&&e.length>0&&M(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?h:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),x&&f.length>0&&(0,t.jsx)("div",{ref:j,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,r)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${r===b?"bg-accent":""}`,onClick:()=>D(e),onMouseEnter:()=>v(r),children:e},e))}),g&&!x&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:d?`${d} "${g}"`:`Press Enter to create "${g}"`})]})}])},184110,e=>{let t=["left","center","right"],r="center";function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,r,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,n,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:r},"V",0,function(e){return n(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])},597138,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],711241)},474544,e=>{var t=e.i(456420);let r={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],474544)},786563,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},118924,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(522016),i=e.i(975153),a=e.i(741120),s=e.i(666696),l=e.i(519455),c=e.i(912505),o=e.i(393842),d=e.i(658512),u=e.i(111110),f=e.i(215519),m=e.i(41931),x=e.i(469817),p=e.i(306831),g=e.i(201276),h=e.i(35209);let b=[1,2,4,7,15,30];e.s(["default",0,function(){let{t:e}=(0,u.b)(),{timeZone:v}=(0,f.M)();(0,h.f)(e.review.title);let[w,y]=(0,r.useState)(null),[j,k]=(0,r.useState)(1),N=(0,r.useCallback)(async e=>{try{y(await m.k.get(`/api/review/due?page=${e}&pageSize=${x.$}`))}catch(e){g.V.error("[Review]","Failed to fetch due reviews",{error:e})}},[]);(0,r.useEffect)(()=>{N(j)},[j,N]);let C=(0,p.d)(new Date,v).start;return(0,t.jsxs)("main",{className:"mx-auto max-w-6xl space-y-6 px-4 py-6 md:px-8 md:py-8",children:[(0,t.jsx)(o.f,{title:e.review.title,description:e.review.desc,actions:w&&w.total>0&&(0,t.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-sm font-medium text-primary",children:e.review.dueCount.replace("{count}",String(w.total))})}),!w&&(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(e,r)=>(0,t.jsx)("div",{className:"h-52 animate-pulse rounded-2xl bg-muted"},r))}),w&&0===w.total&&(0,t.jsx)(c.f,{icon:i.f,title:e.review.empty,description:e.review.emptyHint}),w&&w.items.length>0&&(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:w.items.map(r=>{let i;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(s.f,{item:r,selectMode:!1,selected:!1,onToggleSelect:()=>{},selectedTag:null,onTagClick:()=>{}})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:[(i=(0,p.r)(r.nextReviewAt,"MM/dd",v),new Date(r.nextReviewAt)<C?e.review.overdue.replace("{date}",i):e.review.dueOn.replace("{date}",i))," · ",e.review.round.replace("{round}",String(r.reviewStage+1)).replace("{total}",String(b.length))]}),(0,t.jsx)(n.default,{href:`/practice?id=${r.id}`,children:(0,t.jsxs)(l.f,{variant:"outline",size:"sm",className:"h-8",children:[(0,t.jsx)(a.f,{className:"mr-1.5 h-3.5 w-3.5"}),e.review.practice]})})]})]},r.id)})}),w&&(0,t.jsx)(d.f,{page:j,totalPages:w.totalPages,total:w.total,pageSize:w.pageSize,onPageChange:k})]})}],118924)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:s,disabled:l,size:c="sm",showUnrated:o=!0,className:d}){let{t:u}=(0,n.b)(),f=e??0,m="sm"===c?"h-3.5 w-3.5":"h-5 w-5",x=f?u.difficulty.starsLabel.replace("{n}",String(f)):u.difficulty.unrated;return s?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:u.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>s(e===f?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=f,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,t.jsx)(r.f,{className:(0,i.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!f&&o&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):f?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:x,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):o?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",d),children:u.difficulty.unrated}):null}])},846968,e=>{var t=e.i(843476),r=e.i(548161),n=e.i(474544),i=e.i(741120),a=e.i(487486),s=e.i(111110);let l={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:n.f},reviewing:{className:"bg-primary/10 text-primary",icon:i.f},mastered:{className:"bg-success/15 text-success",icon:r.f}};e.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:e,className:r=""}){let{t:n}=(0,s.b)(),{className:i,icon:c}=l[e],o="mastered"===e?n.notebook.mastered:"reviewing"===e?n.notebook.reviewing:n.notebook.review;return(0,t.jsx)(a.f,{variant:"secondary",className:`${i} ${r}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c,{className:"h-3 w-3"})," ",o]})})}])},590546,e=>{var t=e.i(843476),r=e.i(618566),n=e.i(519455),i=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:a}){let s=(0,r.useRouter)();return(0,t.jsx)(n.f,{variant:"ghost",size:"icon",onClick:()=>{s.push(e)},className:a,children:(0,t.jsx)(i.f,{className:"h-5 w-5"})})}])},257428,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(820783),i=e.i(30030),a=e.i(981140),s=e.i(369340),l=e.i(635804),c=e.i(296626),o=e.i(248425),d=Object.defineProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),f="Checkbox",[m,x]=(0,i.f)(f),[p,g]=m(f);function h(e){let{__scopeCheckbox:n,checked:i,children:a,defaultChecked:l,disabled:c,form:o,name:d,onCheckedChange:u,required:m,value:x="on",internal_do_not_use_render:g}=e,[h,b]=(0,s.f)({prop:i,defaultProp:l??!1,onChange:u,caller:f}),[v,w]=r.useState(null),[y,N]=r.useState(null),[C,S]=r.useState(null),R=!v||!!o||!!v.closest("form"),P={checked:h,disabled:c,setChecked:b,control:v,setControl:w,name:d,form:o,value:x,userClick:C,onUserClick:S,required:m,defaultChecked:!k(l)&&l,isFormControl:R,bubbleInput:y,setBubbleInput:N};return(0,t.jsx)(p,{scope:n,...P,children:j(g)?g(P):a})}u(h,"CheckboxProvider");var b=r.forwardRef(u(function({__scopeCheckbox:e,onKeyDown:i,onClick:s,...l},c){let{control:d,value:f,disabled:m,checked:x,required:p,setControl:h,setChecked:b,onUserClick:v,isFormControl:w,bubbleInput:y}=g("CheckboxTrigger",e),j=(0,n.f)(c,h),C=r.useRef(x);return r.useEffect(()=>{let e=d?.form;if(e){let t=u(()=>b(C.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,b]),(0,t.jsx)(o.V.button,{type:"button",role:"checkbox","aria-checked":k(x)?"mixed":x,"aria-required":p,"data-state":N(x),"data-disabled":m?"":void 0,disabled:m,value:f,...l,ref:j,onKeyDown:(0,a.f)(i,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,a.f)(s,e=>{let t=e.isPropagationStopped();v({requestedChecked:!!k(x)||!x,hasConsumerStoppedPropagation:t}),b(e=>!!k(e)||!e),y&&w&&!t&&e.stopPropagation()})})},"CheckboxTrigger")),v=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,name:i,checked:a,defaultChecked:s,required:l,disabled:c,value:o,onCheckedChange:d,form:u,...f}=e;return(0,t.jsx)(h,{__scopeCheckbox:n,checked:a,defaultChecked:s,disabled:c,required:l,onCheckedChange:d,name:i,form:u,value:o,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{...f,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(y,{__scopeCheckbox:n})]})})},"Checkbox")),w=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,forceMount:i,...a}=e,s=g("CheckboxIndicator",n);return(0,t.jsx)(c.f,{present:i||k(s.checked)||!0===s.checked,children:(0,t.jsx)(o.V.span,{"data-state":N(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),y=r.forwardRef(u(function({__scopeCheckbox:e,onClick:i,...s},c){let{control:d,userClick:u,checked:f,defaultChecked:m,required:x,disabled:p,name:h,value:b,form:v,bubbleInput:w,setBubbleInput:y}=g("CheckboxBubbleInput",e),j=(0,n.f)(c,y),N=(0,l.f)(d),C=r.useRef(!1),S=r.useRef(f),R=r.useRef(u),P=r.useRef(null);r.useEffect(()=>{if(!w)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!e)return;let t=S.current!==f;S.current=f;let r=null!==u&&u!==R.current;if(R.current=u,r)P.current=t?null:u,t&&(w.indeterminate=k(f),e.call(w,!k(f)&&f)),w.dispatchEvent(new Event("click",{bubbles:!u.hasConsumerStoppedPropagation}));else if(t){let t=P.current;P.current=null;let r=t?.requestedChecked===f;C.current=!0,w.indeterminate=k(f),e.call(w,!k(f)&&f),w.dispatchEvent(new Event("click",{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),C.current=!1}},[w,f,u]);let E=r.useRef(!k(f)&&f);return(0,t.jsx)(o.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:m??E.current,required:x,disabled:p,name:h,value:b,form:v,...s,tabIndex:-1,ref:j,onClick:(0,a.f)(i,e=>{C.current&&e.stopPropagation()}),style:{...s.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function j(e){return"function"==typeof e}function k(e){return"indeterminate"===e}function N(e){return k(e)?"indeterminate":e?"checked":"unchecked"}u(j,"isFunction"),u(k,"isIndeterminate"),u(N,"getState");var C=e.i(689664),S=e.i(975157);let R=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(v,{ref:n,className:(0,S.f)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...r,children:(0,t.jsx)(w,{className:(0,S.f)("flex items-center justify-center text-current"),children:(0,t.jsx)(C.f,{className:"h-4 w-4"})})}));R.displayName=v.displayName,e.s(["f",0,R],257428)},912505,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({icon:e,title:n,description:i,action:a,className:s}){return(0,t.jsxs)("div",{className:(0,r.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",s),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:n}),i&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:i}),a&&(0,t.jsx)("div",{className:"mt-5",children:a})]})}])},393842,e=>{var t=e.i(843476),r=e.i(590546),n=e.i(975157);e.s(["f",0,function({title:e,description:i,backHref:a,actions:s,titleAddon:l,className:c}){return(0,t.jsxs)("div",{className:(0,n.f)("flex items-start gap-3",c),children:[a&&(0,t.jsx)(r.f,{fallbackUrl:a,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),i&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:i})]}),s&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},990745,e=>{e.s(["f",0,function(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);if(!e.knowledgePoints)return[];try{let t=JSON.parse(e.knowledgePoints);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}])},62825,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])},35209,e=>{var t=e.i(271645),r=e.i(111110);e.s(["f",0,function(...e){let{t:n}=(0,r.b)(),i=[n.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=i},[i])}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let r={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],711241)},474544,e=>{var t=e.i(456420);let r={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],474544)},786563,e=>{var t=e.i(456420);let r={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"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],786563)},118924,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(522016),i=e.i(975153),a=e.i(741120),s=e.i(666696),l=e.i(519455),c=e.i(912505),o=e.i(393842),d=e.i(658512),u=e.i(111110),f=e.i(215519),m=e.i(41931),x=e.i(469817),p=e.i(306831),g=e.i(201276),h=e.i(35209);let b=[1,2,4,7,15,30];e.s(["default",0,function(){let{t:e}=(0,u.b)(),{timeZone:v}=(0,f.M)();(0,h.f)(e.review.title);let[w,y]=(0,r.useState)(null),[j,k]=(0,r.useState)(1),N=(0,r.useCallback)(async e=>{try{y(await m.k.get(`/api/review/due?page=${e}&pageSize=${x.$}`))}catch(e){g.V.error("[Review]","Failed to fetch due reviews",{error:e})}},[]);(0,r.useEffect)(()=>{N(j)},[j,N]);let C=(0,p.d)(new Date,v).start;return(0,t.jsxs)("main",{className:"mx-auto max-w-6xl space-y-6 px-4 py-6 md:px-8 md:py-8",children:[(0,t.jsx)(o.f,{title:e.review.title,description:e.review.desc,actions:w&&w.total>0&&(0,t.jsx)("span",{className:"rounded-full bg-primary/10 px-3 py-1 text-sm font-medium text-primary",children:e.review.dueCount.replace("{count}",String(w.total))})}),!w&&(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(e,r)=>(0,t.jsx)("div",{className:"h-52 animate-pulse rounded-2xl bg-muted"},r))}),w&&0===w.total&&(0,t.jsx)(c.f,{icon:i.f,title:e.review.empty,description:e.review.emptyHint}),w&&w.items.length>0&&(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:w.items.map(r=>{let i;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex-1",children:(0,t.jsx)(s.f,{item:r,selectMode:!1,selected:!1,onToggleSelect:()=>{},selectedTag:null,onTagClick:()=>{}})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{children:[(i=(0,p.r)(r.nextReviewAt,"MM/dd",v),new Date(r.nextReviewAt)<C?e.review.overdue.replace("{date}",i):e.review.dueOn.replace("{date}",i))," · ",e.review.round.replace("{round}",String(r.reviewStage+1)).replace("{total}",String(b.length))]}),(0,t.jsx)(n.default,{href:`/practice?id=${r.id}`,children:(0,t.jsxs)(l.f,{variant:"outline",size:"sm",className:"h-8",children:[(0,t.jsx)(a.f,{className:"mr-1.5 h-3.5 w-3.5"}),e.review.practice]})})]})]},r.id)})}),w&&(0,t.jsx)(d.f,{page:j,totalPages:w.totalPages,total:w.total,pageSize:w.pageSize,onPageChange:k})]})}],118924)},469937,e=>{var t=e.i(843476),r=e.i(786563),n=e.i(111110),i=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:s,disabled:l,size:c="sm",showUnrated:o=!0,className:d}){let{t:u}=(0,n.b)(),f=e??0,m="sm"===c?"h-3.5 w-3.5":"h-5 w-5",x=f?u.difficulty.starsLabel.replace("{n}",String(f)):u.difficulty.unrated;return s?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:u.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>s(e===f?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=f,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,t.jsx)(r.f,{className:(0,i.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!f&&o&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):f?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:x,children:a.map(e=>(0,t.jsx)(r.f,{className:(0,i.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):o?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",d),children:u.difficulty.unrated}):null}])},846968,e=>{var t=e.i(843476),r=e.i(548161),n=e.i(474544),i=e.i(741120),a=e.i(487486),s=e.i(111110);let l={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:n.f},reviewing:{className:"bg-primary/10 text-primary",icon:i.f},mastered:{className:"bg-success/15 text-success",icon:r.f}};e.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:e,className:r=""}){let{t:n}=(0,s.b)(),{className:i,icon:c}=l[e],o="mastered"===e?n.notebook.mastered:"reviewing"===e?n.notebook.reviewing:n.notebook.review;return(0,t.jsx)(a.f,{variant:"secondary",className:`${i} ${r}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c,{className:"h-3 w-3"})," ",o]})})}])},590546,e=>{var t=e.i(843476),r=e.i(618566),n=e.i(519455),i=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:a}){let s=(0,r.useRouter)();return(0,t.jsx)(n.f,{variant:"ghost",size:"icon",onClick:()=>{s.push(e)},className:a,children:(0,t.jsx)(i.f,{className:"h-5 w-5"})})}])},257428,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(820783),i=e.i(30030),a=e.i(981140),s=e.i(369340),l=e.i(635804),c=e.i(296626),o=e.i(248425),d=Object.defineProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),f="Checkbox",[m,x]=(0,i.f)(f),[p,g]=m(f);function h(e){let{__scopeCheckbox:n,checked:i,children:a,defaultChecked:l,disabled:c,form:o,name:d,onCheckedChange:u,required:m,value:x="on",internal_do_not_use_render:g}=e,[h,b]=(0,s.f)({prop:i,defaultProp:l??!1,onChange:u,caller:f}),[v,w]=r.useState(null),[y,N]=r.useState(null),[C,S]=r.useState(null),R=!v||!!o||!!v.closest("form"),P={checked:h,disabled:c,setChecked:b,control:v,setControl:w,name:d,form:o,value:x,userClick:C,onUserClick:S,required:m,defaultChecked:!k(l)&&l,isFormControl:R,bubbleInput:y,setBubbleInput:N};return(0,t.jsx)(p,{scope:n,...P,children:j(g)?g(P):a})}u(h,"CheckboxProvider");var b=r.forwardRef(u(function({__scopeCheckbox:e,onKeyDown:i,onClick:s,...l},c){let{control:d,value:f,disabled:m,checked:x,required:p,setControl:h,setChecked:b,onUserClick:v,isFormControl:w,bubbleInput:y}=g("CheckboxTrigger",e),j=(0,n.f)(c,h),C=r.useRef(x);return r.useEffect(()=>{let e=d?.form;if(e){let t=u(()=>b(C.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,b]),(0,t.jsx)(o.V.button,{type:"button",role:"checkbox","aria-checked":k(x)?"mixed":x,"aria-required":p,"data-state":N(x),"data-disabled":m?"":void 0,disabled:m,value:f,...l,ref:j,onKeyDown:(0,a.f)(i,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,a.f)(s,e=>{let t=e.isPropagationStopped();v({requestedChecked:!!k(x)||!x,hasConsumerStoppedPropagation:t}),b(e=>!!k(e)||!e),y&&w&&!t&&e.stopPropagation()})})},"CheckboxTrigger")),v=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,name:i,checked:a,defaultChecked:s,required:l,disabled:c,value:o,onCheckedChange:d,form:u,...f}=e;return(0,t.jsx)(h,{__scopeCheckbox:n,checked:a,defaultChecked:s,disabled:c,required:l,onCheckedChange:d,name:i,form:u,value:o,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{...f,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(y,{__scopeCheckbox:n})]})})},"Checkbox")),w=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,forceMount:i,...a}=e,s=g("CheckboxIndicator",n);return(0,t.jsx)(c.f,{present:i||k(s.checked)||!0===s.checked,children:(0,t.jsx)(o.V.span,{"data-state":N(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),y=r.forwardRef(u(function({__scopeCheckbox:e,onClick:i,...s},c){let{control:d,userClick:u,checked:f,defaultChecked:m,required:x,disabled:p,name:h,value:b,form:v,bubbleInput:w,setBubbleInput:y}=g("CheckboxBubbleInput",e),j=(0,n.f)(c,y),N=(0,l.f)(d),C=r.useRef(!1),S=r.useRef(f),R=r.useRef(u),P=r.useRef(null);r.useEffect(()=>{if(!w)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!e)return;let t=S.current!==f;S.current=f;let r=null!==u&&u!==R.current;if(R.current=u,r)P.current=t?null:u,t&&(w.indeterminate=k(f),e.call(w,!k(f)&&f)),w.dispatchEvent(new Event("click",{bubbles:!u.hasConsumerStoppedPropagation}));else if(t){let t=P.current;P.current=null;let r=t?.requestedChecked===f;C.current=!0,w.indeterminate=k(f),e.call(w,!k(f)&&f),w.dispatchEvent(new Event("click",{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),C.current=!1}},[w,f,u]);let E=r.useRef(!k(f)&&f);return(0,t.jsx)(o.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:m??E.current,required:x,disabled:p,name:h,value:b,form:v,...s,tabIndex:-1,ref:j,onClick:(0,a.f)(i,e=>{C.current&&e.stopPropagation()}),style:{...s.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function j(e){return"function"==typeof e}function k(e){return"indeterminate"===e}function N(e){return k(e)?"indeterminate":e?"checked":"unchecked"}u(j,"isFunction"),u(k,"isIndeterminate"),u(N,"getState");var C=e.i(689664),S=e.i(975157);let R=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(v,{ref:n,className:(0,S.f)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...r,children:(0,t.jsx)(w,{className:(0,S.f)("flex items-center justify-center text-current"),children:(0,t.jsx)(C.f,{className:"h-4 w-4"})})}));R.displayName=v.displayName,e.s(["f",0,R],257428)},912505,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({icon:e,title:n,description:i,action:a,className:s}){return(0,t.jsxs)("div",{className:(0,r.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",s),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:n}),i&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:i}),a&&(0,t.jsx)("div",{className:"mt-5",children:a})]})}])},393842,e=>{var t=e.i(843476),r=e.i(590546),n=e.i(975157);e.s(["f",0,function({title:e,description:i,backHref:a,actions:s,titleAddon:l,className:c}){return(0,t.jsxs)("div",{className:(0,n.f)("flex items-start gap-3",c),children:[a&&(0,t.jsx)(r.f,{fallbackUrl:a,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),i&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:i})]}),s&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s})]})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},35209,e=>{var t=e.i(271645),r=e.i(111110);e.s(["f",0,function(...e){let{t:n}=(0,r.b)(),i=[n.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=i},[i])}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,r="zh"){return("en"===r?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,r){return(r||"").trim()?"wrong_attempt":t(e)}])},428602,e=>{e.s(["f",0,function(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);if(!e.knowledgePoints)return[];try{let t=JSON.parse(e.knowledgePoints);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}])}])})();
|