wrong-notebook 2026.11.4-3 → 2026.11.4-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +10 -9
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- 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 +10 -9
- 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.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +11 -11
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +13 -12
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +14 -13
- 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/auth/[...nextauth]/route.js.nft.json +1 -1
- 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 +15 -14
- 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 +18 -17
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/notes/route.js +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +18 -17
- package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/retag/route.js +18 -17
- 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 +8 -7
- package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +18 -17
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js +18 -17
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-delete/route.js +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/error-items/export-questions/route/build-manifest.json +12 -0
- package/.next/server/app/api/error-items/export-questions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/error-items/export-questions/route.js +17 -0
- package/.next/server/app/api/error-items/export-questions/route.js.map +5 -0
- package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -0
- package/.next/server/app/api/error-items/export-questions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/error-items/list/route.js +7 -6
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +18 -17
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +13 -12
- 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 +14 -13
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +14 -13
- 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 -16
- 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 +13 -12
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +22 -21
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +22 -20
- 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 +14 -13
- 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 +25 -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 +22 -20
- 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 +25 -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 +25 -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 +25 -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 -21
- 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 -21
- 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 +19 -17
- 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 -21
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +25 -23
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +15 -14
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +15 -14
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +17 -16
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +15 -14
- 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 +18 -17
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +13 -12
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +14 -13
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +13 -12
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +13 -12
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js +6 -6
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +8 -8
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +8 -8
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +9 -8
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +12 -11
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/1oeh_server_app_api_error-items_export-questions_route_actions_02nsquej76mp1.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__13x167nrb3y6w._.js → [root-of-the-server]__001wdwos9fkgg._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__00cvwb7xtihiy._.js → [root-of-the-server]__00w9qhjl8kvr4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0-5ex-1jwf2so._.js → [root-of-the-server]__00w_kxg7h-9_p._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00x5ad3w5zwfp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__000xbr1s0pxwr._.js → [root-of-the-server]__01jxyfokd6l4_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__00u81uwtn433h._.js → [root-of-the-server]__025dluj5es8w4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__02osgjesv2sc1._.js → [root-of-the-server]__02fu_lp66613e._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0zhm5smhb-gdm._.js → [root-of-the-server]__04w57bdna9ax0._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__02rd5j6up78m2._.js → [root-of-the-server]__05a4j8yu5_bg1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__05d81asaxsts8._.js → [root-of-the-server]__05pxdy586nh8a._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__07i32k2sv285o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0htnw-q6r_ple._.js → [root-of-the-server]__0855dkhk7zs77._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0i3k26mx8ndsy._.js → [root-of-the-server]__08iizowhy6p3l._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0702vmlo8jrsa._.js → [root-of-the-server]__094ybs6y_fmt5._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__09aolocrwucnt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_le78e9b2yno._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_uup9ppknahw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0b8rxaox_x2n1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bvf731upd2_w._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1okwln3g2ifvb._.js → [root-of-the-server]__0cgpuhmu87blm._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0dqy62vnjwvwp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0_gf1ay3sa41e._.js → [root-of-the-server]__0ef-17j7yp2n5._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__04ofq5esp33on._.js → [root-of-the-server]__0ej9lsrmus5m4._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1sl3foar6w087._.js → [root-of-the-server]__0fdkyswheen4o._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0dyqmjzl1b_1f._.js → [root-of-the-server]__0fhi9g3nqu6k3._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0tn4z733mbm06._.js → [root-of-the-server]__0g3w0_9__ljck._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__13aq01o_yamyz._.js → [root-of-the-server]__0g848ha1gy56h._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1dkmclmcfr_o2._.js → [root-of-the-server]__0ig1r6paxqzt0._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0fdvaccw9slrb._.js → [root-of-the-server]__0j7ua4rsijb4c._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0jh610iscvrmp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0k0dc64mmh6m3._.js → [root-of-the-server]__0l3io0vyav4if._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0uhfq-cs0r44u._.js → [root-of-the-server]__0l7jho_lr2z5g._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0llbkrw8l2ib9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0mfr1ne23y4yo._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0tzkw11a1tdju._.js → [root-of-the-server]__0mslax132s9jp._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0nin5p-dwlpf9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0nye-53zadylr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0p8cwd_go8pid._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pojh2d6n1kp6._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__11d2q9o0f28s0._.js → [root-of-the-server]__0rspref34j958._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1gvappei6o8kd._.js → [root-of-the-server]__0tsi6_qmtro9q._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0u1fu9dvxmlxd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ujhx0glgcxja._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__08wi504al-t3f._.js → [root-of-the-server]__0v8mfczhz1ax1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__02t-_4nuz92ls._.js → [root-of-the-server]__0vf3rgatj1f3u._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0vt48u-0ebzdv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0w9f5-xtpane-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wea836zkhvlj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wex3czgya39o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0384w26qgo9xm._.js → [root-of-the-server]__0x8ehtaj_x2pf._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0xobqdj2u2s67._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0y3ui5-k9baec._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yq7jm5ja3r6t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zrg03ldx65tk._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0ya2x1q-h3scx._.js → [root-of-the-server]__1-1ld657rjip5._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__00g0do0mkiaol._.js → [root-of-the-server]__1-6r_3pmgkz13._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__10ngcci8pf29l._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__075pb7_pb654o._.js → [root-of-the-server]__11-fk0-4iuf_k._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__11x5u4zg5i2c6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__120o1w9mcwgta._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12f6t_ozjtn42._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1p4_cgasfcy73._.js → [root-of-the-server]__13a3izu1xb4m4._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__10gw_yrtllol4._.js → [root-of-the-server]__14e45mqzb1vjt._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__14jf33wwjqbw1._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1wnuzqkneu1ws._.js → [root-of-the-server]__14n0eki4tdk02._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__16pezaw35f9j1._.js → [root-of-the-server]__15a3t94ps7jx2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__15dipxocczlvx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15r55xy6cyrg3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17ed9rw-rhun-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19kic_glbz32b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ae5zzeo8_c2s._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1b-acwmm5hhg0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d6ftxzea6h0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dovdb1wrr_0e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e7_e83zxstdw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e81i8l09skcp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f0zocrmsd5p8._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0ehph__dmu6pf._.js → [root-of-the-server]__1f5_yaclxhuvj._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1gf_vv57qtjh0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hn69stngi4kc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hnyj47zdzrxo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1k0fuhrt1iiad._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kxecl8v-_px5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1l6v9x8xm11pl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1m8m5io-tr21e._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1v5o1ch2vz7iw._.js → [root-of-the-server]__1pfhgjwnx_--j._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1r5lj-ffov9r0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1rxi33p9h8zrj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1uqnotrppylmw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1utvl-1o6mb8y._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0wfpx1grz3ds6._.js → [root-of-the-server]__1vc89u7_xxhyf._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1x_kq-6h3utmo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xqcu4ft3d7id._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0lm6l50r5n5di._.js → [root-of-the-server]__1xuw793xxu29t._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1yaf9vp_o6cro._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ybmwcbaqk63j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yyezurgy7e3k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z4-5hlzq34fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z9hl9qdokxpu._.js +3 -0
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/{_1654ui1ph-3x8._.js → _04vbgvl2gl5bc._.js} +1 -1
- package/.next/server/chunks/{node_modules_@anthropic-ai_sdk_1ulo822751toa._.js → _055vhdh_7iydn._.js} +2 -2
- package/.next/server/chunks/_0i58-g30ox5-8._.js +3 -0
- package/.next/server/chunks/_0numcpxd_n25x._.js +3 -0
- package/.next/server/chunks/_0r8u30vd4lix4._.js +1 -1
- package/.next/server/chunks/_0s8v0xiwcw6od._.js +3 -0
- package/.next/server/chunks/_0ta62b-tktnk8._.js +3 -0
- package/.next/server/chunks/_0tkov27xr068i._.js +6 -3
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +1 -1
- package/.next/server/chunks/_1638xaazsmf2m._.js +6 -3
- package/.next/server/chunks/_1b-7g4thtxfnp._.js +1 -1
- package/.next/server/chunks/_1lesklvhr_pfq._.js +3 -0
- package/.next/server/chunks/_1qcv4muwnx82-._.js +3 -0
- package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
- package/.next/server/chunks/_1vddun9dxzaqo._.js +6 -3
- package/.next/server/chunks/_1xx5l4x084brt._.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1b_q1zc0x8d76.js +3 -0
- package/.next/server/chunks/src_lib_0z4je8wchtdws._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +70 -58
- package/.next/server/chunks/src_lib_1v7rk87xys5cb._.js +3 -0
- package/.next/server/chunks/{src_lib_1v5vdsc8-zp2z._.js → src_lib_1w0niu4i8hnaq._.js} +1 -1
- package/.next/server/chunks/src_lib_exam_1vzmn90_kh7eg._.js +3 -0
- package/.next/server/chunks/src_lib_exam_exam_ts_18c3t7bnr1z5k._.js +1 -1
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +3 -1
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
- package/.next/server/chunks/src_lib_schemas_error-items_ts_0vdof4417rd3y._.js +1 -1
- package/.next/server/chunks/src_lib_svg-animation_ts_0-noskwg6sysg._.js +3 -0
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__032-uso7x2eqk._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ks-9bza_y-tn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0te5kr0_7nmrv._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uezowk-9l0x4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0x4us8rfvt68s._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__10y8dor72926b._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12jk2bmesr4gc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rrcp_77jpv98._.js +3 -0
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +3 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/_0fp_p60hb9ex8._.js +3 -0
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +1 -1
- package/.next/server/chunks/ssr/_0m1jjbrzk71io._.js +3 -0
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +3 -0
- package/.next/server/chunks/ssr/_126p5i1ynlykc._.js +3 -0
- package/.next/server/chunks/ssr/_127aw5h992s9d._.js +4 -0
- package/.next/server/chunks/ssr/_1bhvzfiuz3s7j._.js +3 -0
- package/.next/server/chunks/ssr/_1d3pxsso6zv_w._.js +3 -0
- package/.next/server/chunks/ssr/_1hp3fw-gk2r-3._.js +3 -0
- package/.next/server/chunks/ssr/_1k45xb7mu-emd._.js +3 -0
- package/.next/server/chunks/ssr/_1lltqgoq4vqfe._.js +3 -0
- package/.next/server/chunks/ssr/_1ore70w45768b._.js +3 -0
- package/.next/server/chunks/ssr/_1t-o815u40ng2._.js +3 -0
- package/.next/server/chunks/ssr/_1yclgq1umgl4p._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_08vtqzu_wfcb5._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0y-9u3ez_29oz._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_109z-y1z_gtxg._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_docx_dist_index_mjs_07znba89yz2vi._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_0i0ydbk94w-r3.js → node_modules_heic-to_dist_csp_heic-to_1_jdv4y0yz52i.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1h62imz_ct0w_.js → node_modules_heic-to_dist_csp_heic-to_1zqrtb3kykd7q.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_printer_mjs_0jbt269gi19_7._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pdfjs-dist_build_pdf_mjs_0z37jkkqfce7_._.js +47 -0
- package/.next/server/chunks/ssr/node_modules_read-excel-file_universal_index_0ayslfrutmja5.js +3 -0
- package/.next/server/chunks/ssr/node_modules_write-excel-file_browser_index_0l2-di6rcng1b.js +3 -0
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0veaboc415l0m.js +3 -3
- package/.next/server/chunks/ssr/src_130ww76krpws_._.js +1 -1
- package/.next/server/chunks/ssr/src_1nbi4yrww3r1m._.js +3 -0
- package/.next/server/chunks/ssr/src_1rmus42s388dk._.js +3 -0
- package/.next/server/chunks/ssr/src_1seqsa8jiwu83._.js +3 -0
- package/.next/server/chunks/ssr/src_1xvnkkhvub372._.js +1 -1
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_page_tsx_0xcjflkgkwzgd._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +11 -6
- package/.next/server/chunks/ssr/src_app_exams_page_tsx_17_d4_gy2i1ds._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_page_tsx_08njm-5-txm8_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +6 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +3 -3
- package/.next/server/chunks/ssr/src_components_error-list_error-item-card_tsx_1zsiqsrj-jjd7._.js +1 -1
- package/.next/server/chunks/ssr/src_components_exam_exam-figure-scale-bar_tsx_1dxk6lzvp_d28._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +7 -2
- package/.next/server/chunks/ssr/src_components_ui_switch_tsx_054tyo61pehla._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +6 -3
- package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +6 -3
- package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/01zokrwums-fz.js +55 -0
- package/.next/static/chunks/02lw0b8i38sj3.js +6 -0
- package/.next/static/chunks/040et8v6_v-s6.js +1 -0
- package/.next/static/chunks/079f88y9j6sf-.js +45 -0
- package/.next/static/chunks/0g1lk2opoyqly.js +1 -0
- package/.next/static/chunks/0ge9zqd21b4xd.js +15 -0
- package/.next/static/chunks/0gu34v572tj7o.js +1 -0
- package/.next/static/chunks/0mnb66hvp3czv.js +2 -0
- package/.next/static/chunks/0mun2h4uaj4eh.js +1 -0
- package/.next/static/chunks/0sl4wa-ghh5g7.js +2 -0
- package/.next/static/chunks/0xbohpfp7x9jn.js +1 -0
- package/.next/static/chunks/113lhm-f9le_y.js +2 -0
- package/.next/static/chunks/{1ado9no6s8r2t.js → 15zro21ycjjle.js} +1 -1
- package/.next/static/chunks/{3difxy8vzqlxn.js → 1fmrzsulv-ddd.js} +1 -1
- package/.next/static/chunks/1uso50ewx5j8v.js +1 -0
- package/.next/static/chunks/1vtq_er8xir3c.css +3 -0
- package/.next/static/chunks/1yg8trzska8uv.js +1 -0
- package/.next/static/chunks/20f7m1txoey_w.js +1 -0
- package/.next/static/chunks/21ghhv1twe4or.js +12 -0
- package/.next/static/chunks/23h8i_poncr7i.js +1 -0
- package/.next/static/chunks/28bc-wd48lcls.js +1 -0
- package/.next/static/chunks/2j3bisradcgfv.js +1 -0
- package/.next/static/chunks/2lhxk-8dpncxq.js +1 -0
- package/.next/static/chunks/2xww3vrggzkc3.js +15 -0
- package/.next/static/chunks/3-5otbeiq86n5.js +1 -0
- package/.next/static/chunks/{39lbv0arntrnf.js → 31uxxyexyu66p.js} +7 -2
- package/.next/static/chunks/33z7oz1790x50.js +1 -0
- package/.next/static/chunks/37309r9ttt-oa.js +1 -0
- package/.next/static/chunks/{0uay0bmznf3g-.js → 3f9t8cne6yfyl.js} +1 -1
- package/.next/static/chunks/3fj_icg91t5ar.js +38 -0
- package/.next/static/chunks/{0njrl9jn2yde_.js → 3jkntcd5fwsid.js} +1 -1
- package/.next/static/chunks/3ldaxwwj8i1r_.js +9 -0
- package/.next/static/chunks/3nq-bgq8lumv9.js +1 -0
- package/.next/static/chunks/3t9tbm4atwmw8.js +1 -0
- package/.next/static/chunks/3u-qpv02dkpmu.js +1 -0
- package/.next/static/chunks/438pvifm_o4g_.js +1 -0
- package/.next/static/media/pdf.worker.min.0zcq5mj7t-qsr.mjs +28 -0
- package/package.json +1 -1
- package/prisma/migrations/20261104033404_add_question_type/migration.sql +2 -0
- package/prisma/migrations/20261104040208_exam_question_score/migration.sql +2 -0
- package/prisma/migrations/20261104044246_exam_group_by_question_type/migration.sql +29 -0
- package/prisma/schema.prisma +7 -0
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[externals]_fs_1d5jh8vp8y6zt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__00_59ioz3-clx._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__04rit3x7n87ku._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06dvthqk5vh87._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0_zz_zj6cp7hy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0bgi7pc7dogwe._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cjj_9c_1d-eb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0d315c1v02ny0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fr_y2a0149cd._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fscx2v333vm8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0g9zoc0653-fw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0h-qm7nop9330._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0hsl0y0knqi-1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ifmgp3wd_za_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0joi1yae2ehm4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0l104gjwyuf1b._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0l5ybk_p285gl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0lsvd81f6kf59._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0oh43a4yzv1os._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0torie7kq-_7m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0unr-g_-8kx90._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0v6kysx0rq-1m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0vrs8pd3vzslw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0x-02x70-ewqa._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zmnn5ww2etgw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10_9ca38kz5au._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11oto6h82pnhn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12wn_ef3w7f8l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__132-2tja1hzjw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1438_x9vkg2ow._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14qqa5fifm2rn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16jaf2eom1mlc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16qwprn5u6gjt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__180yz6lfwyg1x._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__197qvpegys2sj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19cfobnhf4rgh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19r0-5tk-zh9i._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1_sr40zcjsx6y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1c_nbrrytj02e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dgb5al4upb9v._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fmsngpmgt-p-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1frkpeaqco77c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1gfpzuz6qe78x._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hc_s6bb3tqn2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hy_enkxk2q7n._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1icr5yq0kmxsk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1j92hfszx6_cs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1jd9zchusdb14._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1jey4pj050ie1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ji7iwt_w00lv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1oy49h1nfcsne._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1s21nmek1dpsc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1sk7ctcxmkco3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ui10_ypv4qrw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vm13gnfyoh6u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vrtsz6125q__._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1xv0q7bppzr-w._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yzqi7jexvvzc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zq5g6-uodrek._.js +0 -3
- package/.next/server/chunks/_03wxfgqq6wpf_._.js +0 -3
- package/.next/server/chunks/_0819wmh2_bgt-._.js +0 -3
- package/.next/server/chunks/_0rnn090b4_3pb._.js +0 -3
- package/.next/server/chunks/_1ahefh9733vmk._.js +0 -3
- package/.next/server/chunks/_1ex6ovo_j2jzv._.js +0 -3
- package/.next/server/chunks/src_lib_0cmg152v4yi6o._.js +0 -3
- package/.next/server/chunks/src_lib_1mno8g5cqmaet._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__00_c9kpvx5075._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__01epe_65_8e8r._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__08j-3_6cl3898._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0iqnvufl6qrve._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0r18qmblwuijm._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1babe6vdwxbtq._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1o5pa8m50qyqa._.js +0 -3
- package/.next/server/chunks/ssr/_0mfy8kk0_omxw._.js +0 -3
- package/.next/server/chunks/ssr/_0qgs--x99c558._.js +0 -3
- package/.next/server/chunks/ssr/_0svbyo-zufys9._.js +0 -3
- package/.next/server/chunks/ssr/_1j3yr2arbxd6a._.js +0 -3
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +0 -3
- package/.next/server/chunks/ssr/_1th-xa6ci3ryc._.js +0 -3
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +0 -3
- package/.next/server/chunks/ssr/_20593q3u-y025._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_16_nl7nawmp3n._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_17lx40fyvpom3._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_react-image-crop_dist_index_0khmp4mv3j9zr.js +0 -3
- package/.next/server/chunks/ssr/src_1iewbwi2267a1._.js +0 -3
- package/.next/server/chunks/ssr/src_components_exam_exam-status-badge_tsx_0rozdbhlqsq71._.js +0 -3
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +0 -3
- package/.next/static/chunks/077y4nms_vzwe.js +0 -1
- package/.next/static/chunks/0eize8lf2hp4i.js +0 -33
- package/.next/static/chunks/0gxr8rcvy4zzg.js +0 -1
- package/.next/static/chunks/0vlsab1wxbcnl.js +0 -9
- package/.next/static/chunks/0x9-b30mhne-_.js +0 -1
- package/.next/static/chunks/1-dh1gads_tda.js +0 -1
- package/.next/static/chunks/164mvykuvwd-0.js +0 -1
- package/.next/static/chunks/18bumc8ezaiy4.js +0 -1
- package/.next/static/chunks/1j8eduwold2uf.js +0 -1
- package/.next/static/chunks/1pw6djqafgpo7.js +0 -2
- package/.next/static/chunks/1xpxy-ja2ym0o.js +0 -1
- package/.next/static/chunks/25flylmb_qz91.js +0 -1
- package/.next/static/chunks/2cpsg6e2vg7fx.css +0 -3
- package/.next/static/chunks/2j0linvpqza7u.js +0 -55
- package/.next/static/chunks/2jt0139jd2-i3.js +0 -12
- package/.next/static/chunks/2qjb14pd2n3x_.js +0 -1
- package/.next/static/chunks/2s6ae7khf13mi.js +0 -12
- package/.next/static/chunks/33fakli20_bmk.js +0 -1
- package/.next/static/chunks/34dstd5pyqifj.js +0 -1
- package/.next/static/chunks/3c3cp7uzfhnyr.js +0 -1
- package/.next/static/chunks/3gy-_kb72v5lr.js +0 -1
- package/.next/static/chunks/3snn9aaz5n95k.js +0 -9
- package/.next/static/chunks/43btem6mtf_gh.js +0 -1
- /package/.next/static/{P3mJPGERki1060-s7tC9h → isKicFguXFifPUwKaqFfK}/_buildManifest.js +0 -0
- /package/.next/static/{P3mJPGERki1060-s7tC9h → isKicFguXFifPUwKaqFfK}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{P3mJPGERki1060-s7tC9h → isKicFguXFifPUwKaqFfK}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
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,2 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,842727,e=>{var t=e.i(271645),r=e.i(981140),n=e.i(75830),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(248425),l=e.i(30207),u=e.i(369340),f=e.i(586318),c=e.i(934620),d=Object.defineProperty,p=(e,t)=>d(e,"name",{value:t,configurable:!0}),h=!1;function g(){let[e,r]=t.useState(h);return t.useEffect(()=>{h||(h=!0,r(!0))},[]),e}p(g,"useIsHydrated");var m=t[" useSyncExternalStore ".trim().toString()];function y(){return()=>{}}function v(){return m(y,()=>!0,()=>!1)}p(y,"subscribe"),p(v,"useIsHydratedModern");var b="function"==typeof m?v:g,x=e.i(843476),w=Object.defineProperty,k=(e,t)=>w(e,"name",{value:t,configurable:!0}),j="rovingFocusGroup.onEntryFocus",M={bubbles:!1,cancelable:!0},R="RovingFocusGroup",[D,C,P]=(0,n.f)(R),[N,I]=(0,a.f)(R,[P]),[E,T]=N(R),A=t.forwardRef(k(function(e,t){return(0,x.jsx)(D.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(D.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(S,{...e,ref:t})})})},"RovingFocusGroup")),S=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:a,orientation:i,loop:c=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:y=!1,...v}=e,b=t.useRef(null),w=(0,o.f)(n,b),k=(0,f.f)(d),[D,P]=(0,u.f)({prop:p,defaultProp:h??null,onChange:g,caller:R}),[N,I]=t.useState(!1),T=(0,l.f)(m),A=C(a),S=t.useRef(!1),[F,z]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,T),()=>e.removeEventListener(j,T)},[T]),(0,x.jsx)(E,{scope:a,orientation:i,dir:k,loop:c,currentTabStopId:D,onItemFocus:t.useCallback(e=>P(e),[P]),onItemShiftTab:t.useCallback(()=>I(!0),[]),onFocusableItemAdd:t.useCallback(()=>z(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>z(e=>e-1),[]),children:(0,x.jsx)(s.V.div,{tabIndex:N||0===F?-1:0,"data-orientation":i,...v,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.f)(e.onMouseDown,()=>{S.current=!0}),onFocus:(0,r.f)(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(j,M);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);U([e.find(e=>e.active),e.find(e=>e.id===D),...e].filter(Boolean).map(e=>e.ref.current),y)}}S.current=!1}),onBlur:(0,r.f)(e.onBlur,()=>I(!1))})})},"RovingFocusGroupImpl")),F=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:o,focusable:a=!0,active:l=!1,tabStopId:u,children:f,...d}=e,p=(0,i.f)(),h=u||p,g=T("RovingFocusGroupItem",o),m=g.currentTabStopId===h,y=C(o),{onFocusableItemAdd:v,onFocusableItemRemove:w,currentTabStopId:k}=g,j=b();return(0,c.f)(()=>{if(j&&a)return v(),()=>w()},[j,a,v,w]),t.useEffect(()=>{if(!j&&a)return v(),()=>w()},[j,a,v,w]),(0,x.jsx)(D.ItemSlot,{scope:o,id:h,focusable:a,active:l,children:(0,x.jsx)(s.V.span,{tabIndex:m?0:-1,"data-orientation":g.orientation,...d,ref:n,onMouseDown:(0,r.f)(e.onMouseDown,e=>{a?g.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.f)(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:(0,r.f)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void g.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=_(e,g.orientation,g.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=y().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=g.loop?L(r,n+1):r.slice(n+1)}setTimeout(()=>U(r))}}),children:"function"==typeof f?f({isCurrentTabStop:m,hasTabStop:null!=k}):f})})},"RovingFocusGroupItem")),z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function _(e,t,r){let n=O(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return z[n]}function U(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function L(e,t){return e.map((r,n)=>e[(t+n)%e.length])}k(O,"getDirectionAwareKey"),k(_,"getFocusIntent"),k(U,"focusFirst"),k(L,"wrapArray"),e.s(["M",0,F,"F",0,A,"B",0,I],842727)},975153,e=>{var t=e.i(456420);let r={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],975153)},749803,e=>{var t=e.i(456420);let r={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],749803)},716327,456539,e=>{var t=e.i(456420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],716327);let o={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};o.node;let a=(0,t.f)(o);e.s(["f",0,a],456539)},867927,e=>{var t=e.i(456420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],867927)},548161,e=>{var t=e.i(456420);let r={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],548161)},583967,e=>{var t=e.i(456420);let r={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],583967)},762368,e=>{var t=e.i(456420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],762368)},580860,e=>{var t=e.i(456420);let r={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],580860)},226091,e=>{var t=e.i(456420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],226091)},999092,e=>{var t=e.i(456420);let r={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],999092)},21357,79058,e=>{var t=e.i(456420);let r={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],21357);var o=e.i(41931);let a=null,i=null,s=!1;function l(){return"u"<typeof Audio?null:i??=new Audio}let u=new Map,f=(e,t)=>`${t}
|
|
2
|
-
${e}`;function c(e,t,r,n){return o.k.post("/api/tts/batch",{texts:e,language:t,...r?{regenerate:r}:{},...n?{errorItemId:n}:{}},{timeout:6e5,recoverable:!0}).then(({items:e})=>e.map(({id:e,version:t})=>`/api/tts/${e}?v=${t}`))}async function d(e,t,r){let n=await c(e,t,!0,r);e.forEach((e,r)=>u.set(f(e,t),Promise.resolve(n[r])))}e.s(["l",0,l,"v",0,function(){return a??=o.k.get("/api/tts").then(e=>"cloud"===e.mode?"cloud":"browser").catch(()=>"browser")},"h",0,function(){return s},"z",0,function(e,t){return o.k.post("/api/tts/status",{texts:e,language:t}).then(e=>!0===e.ready).catch(()=>!1)},"w",0,function(e,t,r){let n=[...new Set(e)].filter(e=>!u.has(f(e,t)));if(!n.length)return Promise.resolve();let o=c(n,t,!1,r);return n.forEach((e,r)=>{let n=f(e,t),a=o.then(e=>e[r]);a.catch(()=>u.delete(n)),u.set(n,a)}),o.then(()=>void 0)},"H",0,d,"U",0,function(e,t){let r=f(e,t),n=u.get(r);!n&&((n=o.k.post("/api/tts",{text:e,language:t},{timeout:12e4,recoverable:!0}).then(({id:e,version:t})=>`/api/tts/${e}?v=${t}`)).catch(()=>u.delete(r)),u.set(r,n));return n},"p",0,function(){let e=l();if(e&&!s){let t,r,n;s=!0,t=new DataView(new ArrayBuffer(1644)),(r=(e,r)=>[...r].forEach((r,n)=>t.setUint8(e+n,r.charCodeAt(0))))(0,"RIFF"),t.setUint32(4,1636,!0),r(8,"WAVE"),r(12,"fmt "),t.setUint32(16,16,!0),t.setUint16(20,1,!0),t.setUint16(22,1,!0),t.setUint32(24,8e3,!0),t.setUint32(28,16e3,!0),t.setUint16(32,2,!0),t.setUint16(34,16,!0),r(36,"data"),t.setUint32(40,1600,!0),n="",new Uint8Array(t.buffer).forEach(e=>{n+=String.fromCharCode(e)}),e.src=`data:audio/wav;base64,${btoa(n)}`,e.play().catch(()=>{s=!1})}}],79058)},77071,e=>{var t=e.i(456420);let r={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],77071)},741120,e=>{var t=e.i(456420);let r={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],741120)},980105,e=>{var t=e.i(456420);let r={name:"scan-text",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],980105)},901279,e=>{var t=e.i(456420);let r={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],901279)},534693,e=>{var t=e.i(456420);let r={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n])},994533,e=>{var t=e.i(534693);e.s(["f",()=>t.f])},263676,e=>{var t=e.i(456420);let r={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};r.node;let n=(0,t.f)(r);e.s(["X",0,n],263676)},522016,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return y},useLinkStatus:function(){return b}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809),i=e.r(843476),s=a._(e.r(271645)),l=e.r(195057),u=e.r(8372),f=e.r(818581),c=e.r(718967),d=e.r(405550),p=e.r(388540),h=e.r(91949),g=e.r(573668),m=e.r(509396);function y(t){var r;let n,o,a,[y,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:k,children:j,prefetch:M=null,passHref:R,replace:D,shallow:C,scroll:P,onClick:N,onMouseEnter:I,onTouchStart:E,legacyBehavior:T=!1,onNavigate:A,transitionTypes:S,ref:F,unstable_dynamicOnHover:z,...O}=t;n=j,T&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let _=s.default.useContext(u.AppRouterContext),U=!1!==M,L=!1===M?"none":!0===M?"full":"auto",$="none"!==L?"auto"===L?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,V="string"==typeof(r=k||w)?r:(0,l.formatUrl)(r);if(T){if(n?.$$typeof===Symbol.for("react.lazy"))throw Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag.");o=s.default.Children.only(n)}let K=T?o&&"object"==typeof o&&o.ref:F,B,H=s.default.useCallback(e=>(null!==_&&(x.current=(0,h.mountLinkInstance)(e,V,_,$,U,b,B)),()=>{x.current&&((0,h.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,V,_,$,b,B]),q={ref:(0,f.useMergedRef)(H,K),onClick(t){T||"function"!=typeof N||N(t),T&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!_||t.defaultPrevented||function(t,r,n,o,a,i,s,l="none"){if("u">typeof window){let u,{nodeName:f}=t.currentTarget;if("A"===f.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,g.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:c}=e.r(132916);c(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s,l)}}(t,V,x,D,P,A,S,L)},onMouseEnter(e){T||"function"!=typeof I||I(e),T&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)},onTouchStart:function(e){T||"function"!=typeof E||E(e),T&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),_&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===z)}};return(0,c.isAbsoluteUrl)(V)?q.href=V:T&&!R&&("a"!==o.type||"href"in o.props)||(q.href=(0,d.addBasePath)(V)),a=T?s.default.cloneElement(o,q):(0,i.jsx)("a",{...O,...q,children:n}),(0,i.jsx)(v.Provider,{value:y,children:a})}let v=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},818581,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(271645);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},195057,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(190809)._(e.r(998183)),i=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let f=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),f&&"?"!==f[0]&&(f="?"+f),o=o.replace(/[?#]/g,encodeURIComponent),f=f.replace("#","%23"),`${n}${u}${o}${f}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},573668,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),o=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},718967,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return v},PageNotFoundError:function(){return b},SP:function(){return g},ST:function(){return m},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return c},getLocationOrigin:function(){return u},getURL:function(){return f},isAbsoluteUrl:function(){return l},isResSent:function(){return d},loadGetInitialProps:function(){return h},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return k}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function f(){let{href:e}=window.location,t=u();return e.substring(t.length)}function c(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function d(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function h(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await h(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&d(r))return n;if(!n)throw Error(`"${c(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let g="u">typeof performance,m=g&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class v extends Error{}class b extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class w extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function k(e){return JSON.stringify({message:e.message,stack:e.stack})}},772325,e=>{var t=e.i(722219);e.s(["z",0,t])},978056,e=>{var t=e.i(722219);e.s(["z",0,t])},411382,e=>{var t=e.i(722219);e.s(["z",0,t])},54105,e=>{var t=e.i(722219);e.s(["z",0,t])},515288,e=>{var t=e.i(843476),r=e.i(975157);e.s(["N",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,r.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...n})},"O",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,r.f)("px-6",e),...n})},"u",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,r.f)("text-muted-foreground text-sm",e),...n})},"Y",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,r.f)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...n})},"v",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,r.f)("leading-none font-semibold",e),...n})}])},776639,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(820783),a=e.i(30030),i=e.i(610772),s=e.i(369340),l=e.i(726330),u=e.i(765491),f=e.i(774606),c=e.i(296626),d=e.i(248425),p=e.i(303536),h=e.i(934620),g=e.i(985369),m=e.i(186312),y=e.i(991918),v=Object.defineProperty,b=(e,t)=>v(e,"name",{value:t,configurable:!0}),x="Dialog",[w,k]=(0,a.f)(x),[j,M]=w(x),R=b(e=>{let{__scopeDialog:n,children:o,open:a,defaultOpen:l,onOpenChange:f,modal:c=!0}=e,d=r.useRef(null),p=r.useRef(null),{nodes:h,registry:g}=(0,u.D)(),[m,y]=(0,s.f)({prop:a,defaultProp:l??!1,onChange:f,caller:x}),[v,b]=r.useState(0),[w,k]=r.useState(0);return(0,t.jsx)(j,{scope:n,triggerRef:d,contentRef:p,contentId:(0,i.f)(),titleId:(0,i.f)(),descriptionId:(0,i.f)(),titlePresent:v>0,descriptionPresent:w>0,setTitleCount:b,setDescriptionCount:k,open:m,onOpenChange:y,onOpenToggle:r.useCallback(()=>y(e=>!e),[y]),modal:c,branchNodes:h,branchRegistry:g,children:o})},"Dialog"),D=r.forwardRef(b(function(e,r){let{__scopeDialog:a,...i}=e,s=M("DialogTrigger",a),l=(0,o.f)(r,s.triggerRef);return(0,t.jsx)(d.V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":B(s.open),...i,ref:l,onClick:(0,n.f)(e.onClick,s.onOpenToggle)})},"DialogTrigger")),C="DialogPortal",[P,N]=w(C,{forceMount:void 0}),I=b(e=>{let{__scopeDialog:n,forceMount:o,children:a,container:i}=e,s=M(C,n);return(0,t.jsx)(P,{scope:n,forceMount:o,children:r.Children.map(a,e=>(0,t.jsx)(c.f,{present:o||s.open,children:(0,t.jsx)(f.f,{asChild:!0,container:i,children:e})}))})},"DialogPortal"),E="DialogOverlay",T=r.forwardRef(b(function(e,r){let n=N(E,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(E,e.__scopeDialog);return i.modal?(0,t.jsx)(c.f,{present:o||i.open,children:(0,t.jsx)(S,{...a,ref:r})}):null},"DialogOverlay")),A=(0,y.B)("DialogOverlay.RemoveScroll"),S=r.forwardRef(b(function(e,n){let{__scopeDialog:a,...i}=e,s=M(E,a),u=(0,l.y)(),f=(0,o.f)(n,u);return(0,t.jsx)(g.f,{as:A,allowPinchZoom:!0,shards:r.useMemo(()=>[s.contentRef,...s.branchNodes.map(e=>({current:e}))],[s.contentRef,s.branchNodes]),children:(0,t.jsx)(d.V.div,{"data-state":B(s.open),...i,ref:f,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),F="DialogContent",z=r.forwardRef(b(function(e,r){let n=N(F,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=M(F,e.__scopeDialog);return(0,t.jsx)(c.f,{present:o||i.open,children:i.modal?(0,t.jsx)(O,{...a,ref:r}):(0,t.jsx)(_,{...a,ref:r})})},"DialogContent")),O=r.forwardRef(b(function(e,a){let i=M(F,e.__scopeDialog),s=r.useRef(null),l=(0,o.f)(a,i.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,m.f)(e)},[]),(0,t.jsx)(U,{...e,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:(0,n.f)(e.onCloseAutoFocus,e=>{e.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.f)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,n.f)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),_=r.forwardRef(b(function(e,n){let o=M(F,e.__scopeDialog),a=r.useRef(!1),i=r.useRef(!1);return(0,t.jsx)(U,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(a.current||o.triggerRef.current?.focus(),t.preventDefault()),a.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(i.current=!0));let r=t.target;o.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}})},"DialogContentNonModal")),U=r.forwardRef(b(function(e,r){let{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,"aria-describedby":s,children:f,...c}=e,d=M(F,n);return(0,p.f)(),(0,t.jsx)(u.l,{registry:d.branchRegistry,children:(0,t.jsx)(u.v,{asChild:!0,loop:!0,trapped:o,branches:d.branchNodes,onMountAutoFocus:a,onUnmountAutoFocus:i,children:(0,t.jsx)(l.V,{role:"dialog",id:d.contentId,"aria-labelledby":d.titlePresent?d.titleId:void 0,"aria-describedby":d.descriptionPresent?K(s,d.descriptionId):s,"data-state":B(d.open),...c,ref:r,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1),children:f})})})},"DialogContentImpl")),L=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogTitle",n),{setTitleCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.h2,{id:a.titleId,...o,ref:r})},"DialogTitle")),$=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...o}=e,a=M("DialogDescription",n),{setDescriptionCount:i}=a;return(0,h.f)(()=>(i(e=>e+1),()=>i(e=>e-1)),[i]),(0,t.jsx)(d.V.p,{id:a.descriptionId,...o,ref:r})},"DialogDescription")),V=r.forwardRef(b(function(e,r){let{__scopeDialog:o,...a}=e,i=M("DialogClose",o);return(0,t.jsx)(d.V.button,{type:"button",...a,ref:r,onClick:(0,n.f)(e.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function K(...e){let t=new Set;for(let r of e)if("string"==typeof r)for(let e of String(r).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(" "):void 0}function B(e){return e?"open":"closed"}b(K,"concatAriaDescribedby"),b(B,"getState");var H=e.i(263676),q=e.i(975157);let G=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(T,{ref:n,className:(0,q.f)("fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));G.displayName=T.displayName;let W=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(I,{children:[(0,t.jsx)(G,{}),(0,t.jsxs)(z,{ref:o,onPointerDownOutside:e=>{e.preventDefault()},className:(0,q.f)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-card p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n,children:[r,(0,t.jsxs)(V,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(H.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));W.displayName=z.displayName;let X=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});X.displayName="DialogHeader";let Z=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});Z.displayName="DialogFooter";let J=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(L,{ref:n,className:(0,q.f)("text-lg font-semibold leading-none tracking-tight",e),...r}));J.displayName=L.displayName;let Q=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)($,{ref:n,className:(0,q.f)("text-sm text-muted-foreground",e),...r}));Q.displayName=$.displayName,e.s(["N",0,R,"d",0,W,"C",0,Q,"c",0,Z,"s",0,X,"F",0,J,"a",0,D],776639)},793479,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,type:n,...o}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.f)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...o})}])},677572,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),o=e.i(30030),a=e.i(842727),i=e.i(296626),s=e.i(248425),l=e.i(586318),u=e.i(369340),f=e.i(610772),c=Object.defineProperty,d=(e,t)=>c(e,"name",{value:t,configurable:!0}),p="Tabs",[h,g]=(0,o.f)(p,[a.B]),m=(0,a.B)(),[y,v]=h(p),b=r.forwardRef(d(function(e,r){let{__scopeTabs:n,value:o,onValueChange:a,defaultValue:i,orientation:c="horizontal",dir:d,activationMode:h="automatic",...g}=e,m=(0,l.f)(d),[v,b]=(0,u.f)({prop:o,onChange:a,defaultProp:i??"",caller:p});return(0,t.jsx)(y,{scope:n,baseId:(0,f.f)(),value:v,onValueChange:b,orientation:c,dir:m,activationMode:h,children:(0,t.jsx)(s.V.div,{dir:m,"data-orientation":c,...g,ref:r})})},"Tabs")),x=r.forwardRef(d(function(e,r){let{__scopeTabs:n,loop:o=!0,...i}=e,l=v("TabsList",n),u=m(n);return(0,t.jsx)(a.F,{asChild:!0,...u,orientation:l.orientation,dir:l.dir,loop:o,children:(0,t.jsx)(s.V.div,{role:"tablist","aria-orientation":l.orientation,...i,ref:r})})},"TabsList")),w=r.forwardRef(d(function(e,r){let{__scopeTabs:o,value:i,disabled:l=!1,...u}=e,f=v("TabsTrigger",o),c=m(o),d=j(f.baseId,i),p=M(f.baseId,i),h=i===f.value;return(0,t.jsx)(a.M,{asChild:!0,...c,focusable:!l,active:h,children:(0,t.jsx)(s.V.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":p,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:d,...u,ref:r,onMouseDown:(0,n.f)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():(e.currentTarget.focus(),f.onValueChange(i))}),onKeyDown:(0,n.f)(e.onKeyDown,e=>{!l&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&f.onValueChange(i)}),onFocus:(0,n.f)(e.onFocus,()=>{let e="manual"!==f.activationMode;h||l||!e||f.onValueChange(i)})})})},"TabsTrigger")),k=r.forwardRef(d(function(e,n){let{__scopeTabs:o,value:a,forceMount:l,children:u,...f}=e,c=v("TabsContent",o),d=j(c.baseId,a),p=M(c.baseId,a),h=a===c.value,g=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.f,{present:l||h,children:({present:r})=>(0,t.jsx)(s.V.div,{"data-state":h?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:p,tabIndex:0,...f,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&u})})},"TabsContent"));function j(e,t){return`${e}-trigger-${t}`}function M(e,t){return`${e}-content-${t}`}d(j,"makeTriggerId"),d(M,"makeContentId");var R=e.i(975157);let D=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(x,{ref:n,className:(0,R.f)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));D.displayName=x.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(w,{ref:n,className:(0,R.f)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...r}));C.displayName=w.displayName;let P=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(k,{ref:n,className:(0,R.f)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));P.displayName=k.displayName,e.s(["i",0,b,"S",0,P,"U",0,D,"k",0,C],677572)},81968,446513,e=>{e.s(["f",0,function(){return window.WrongNotebookAndroid??null}],81968);var t=e.i(456420);let r={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],446513)},637691,e=>{e.s(["f",0,"https://github.com/margrop/wrong-notebook"])},905110,e=>{let t=["new","reviewing","mastered"];e.s(["z",0,50,"o",0,100,"P",0,1,"m",0,function(e,t=50){return"number"==typeof e&&e>=t/100},"A",0,function(e){return"string"==typeof e&&t.includes(e)}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
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),E=(0,a.useRef)(null),M=(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||(E.current=r,b(a,r,t),M.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=E.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}E.current=null,a&&(a.innerHTML="")}},[Y,r,n,s]),(0,a.useEffect)(()=>{b(D.current,E.current,P?700:t)},[P,t]);let X=(0,a.useCallback)(()=>{let e=E.current;if(e)try{e.resetConstruction(),setTimeout(()=>{E.current&&(M.current=v(E.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(M.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)},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),E=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(E)},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),[E,M]=(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[E]);(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"===E&&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"===E?(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":E===e,onClick:()=>{P(),M(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${E===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"===E?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(A.length))}`:"auto"===E?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"===E&&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"===E?(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"===E&&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"===E?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))},E=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:()=>E(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&&E(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 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var a=e.i(456420);let t={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};t.node;let s=(0,a.f)(t);e.s(["f",0,s],711241)},576248,e=>{var a=e.i(456420);let t={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};t.node;let s=(0,a.f)(t);e.s(["f",0,s],576248)},77043,e=>{var a=e.i(456420);let t={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};t.node;let s=(0,a.f)(t);e.s(["f",0,s],77043)},856522,e=>{var a=e.i(456420);let t={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"}]]};t.node;let s=(0,a.f)(t);e.s(["f",0,s],856522)},328623,e=>{var a=e.i(456420);let t={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"]};t.node;let s=(0,a.f)(t);e.s(["f",0,s],328623)},591124,e=>{var a=e.i(843476),t=e.i(271645),s=e.i(522016),r=e.i(618566),i=e.i(215519),l=e.i(306831),n=e.i(456420);let d={name:"clipboard-check",size:24,node:[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]};d.node;let m=(0,n.f)(d);var c=e.i(632781),o=e.i(77043),u=e.i(395925),x=e.i(856522),f=e.i(759659),g=e.i(487486),h=e.i(519455),p=e.i(793479),b=e.i(590546),y=e.i(86963),j=e.i(339023),v=e.i(716327),N=e.i(456539),k=e.i(263676),w=e.i(515288),S=e.i(511445),C=e.i(991686),$=e.i(393733),q=e.i(149704),A=e.i(520732),z=e.i(741120),M=e.i(931454),R=e.i(111110),T=e.i(41931),F=e.i(201276),I=e.i(294114);function E({paperId:e,paperMode:s,question:r,onDone:i}){let{t:l,language:n}=(0,R.b)(),[d,m]=(0,t.useState)(null),o="original"!==s&&0===r.attempts.length&&!!r.errorItemId&&"pending"!==r.status,u="ready"===r.status&&!!r.questionText?.trim();if(!o&&!u)return null;let x=async a=>{let t="question"===a?l.exam.regenerateQuestionConfirm:l.exam.regenerateAnswerConfirm;if(await (0,I.u)(t)){m(a);try{let t=await T.k.post(`/api/exams/${e}/questions/${r.id}/regenerate`,{mode:a,language:n},{timeout:6e5,recoverable:!0});i(t)}catch(s){let e=s?.data?.message||"",t=l.errors[e];F.V.error("[ExamRegenerate]","Failed to regenerate exam question",{mode:a,code:e}),I.c.error("HAS_RESULTS"===e?l.exam.regenerateHasResults:"string"==typeof t?t:l.exam.regenerateFailed)}finally{m(null)}}};return(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[o&&(0,a.jsxs)(h.f,{variant:"ghost",size:"sm",onClick:()=>x("question"),disabled:null!==d,children:["question"===d?(0,a.jsx)(c.f,{className:"mr-1 h-4 w-4 animate-spin"}):(0,a.jsx)(z.f,{className:"mr-1 h-4 w-4"}),"question"===d?l.exam.regenerating:l.exam.regenerateQuestion]}),u&&(0,a.jsxs)(h.f,{variant:"ghost",size:"sm",onClick:()=>x("answer"),disabled:null!==d,children:["answer"===d?(0,a.jsx)(c.f,{className:"mr-1 h-4 w-4 animate-spin"}):(0,a.jsx)(M.f,{className:"mr-1 h-4 w-4"}),"answer"===d?l.exam.regenerating:l.exam.regenerateAnswer]})]})}function H({paperId:e,paperMode:r,question:n,editingResult:d,onResultChange:m,onDeleteAttempt:o,onRegenerated:u,previewFigureScale:x,previewFigureAlign:f,onSaveFigureScale:h}){let{t:p}=(0,R.b)(),{timeZone:b}=(0,i.M)(),[y,j]=(0,t.useState)(!1),z=void 0!==d,M=(()=>{if(!n.error)return"";if("SOURCE_DELETED"===n.error)return p.exam.sourceDeleted;let e=n.error.split(":")[0].trim(),a=p.errors[e];return"string"==typeof a?a:n.error})();return(0,a.jsx)(w.N,{children:(0,a.jsxs)(w.O,{className:"space-y-3 pt-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[n.order,"."]}),n.errorItemId?(0,a.jsxs)(s.default,{href:`/error-items/${n.errorItemId}`,className:"font-mono text-xs text-primary hover:underline",children:[p.exam.source," ",n.sourceShortId]}):(0,a.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:[n.sourceShortId," · ",p.exam.sourceDeleted]}),n.notebookName&&(0,a.jsx)(g.f,{variant:"secondary",children:n.notebookName})]}),n.attempts.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:n.attempts.map((e,t)=>(0,a.jsxs)(g.f,{variant:"outline",className:`gap-1 font-normal ${C.x[e.result]||""}`,children:[(0,a.jsx)("span",{children:p.exam.attemptLabel.replace("{n}",String(t+1))}),(0,a.jsx)("span",{className:"tabular-nums",children:(0,l.r)(e.createdAt,"MM-dd",b)}),(0,a.jsx)("span",{className:"font-semibold",children:p.mastery.results[e.result]}),z&&o&&(0,a.jsx)("button",{type:"button","aria-label":p.mastery.deleteRecord,className:"-mr-1 rounded hover:bg-black/10",onClick:()=>o(e.id),children:(0,a.jsx)(k.X,{className:"h-3 w-3"})})]},e.id))}),"pending"===n.status&&(0,a.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),p.exam.questionPending]}),"failed"===n.status&&(0,a.jsxs)("p",{className:"text-sm text-destructive",children:[p.exam.questionFailed,M?`${p.common.colon}${M}`:""]}),"ready"===n.status&&n.questionText&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.f,{content:n.questionText}),h?(0,a.jsx)(A.f,{svg:n.figureSvg,scale:n.figureScale,align:n.figureAlign,previewScaleOverride:x,previewAlignOverride:f,onSave:(e,a)=>h(n.id,e,a)},`${n.id}-${n.figureScale??100}-${n.figureAlign??"center"}`):(0,a.jsx)(q.f,{svg:n.figureSvg,scale:x??n.figureScale,align:f??n.figureAlign}),(0,a.jsxs)("button",{type:"button",className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",onClick:()=>j(!y),children:[y?(0,a.jsx)(N.f,{className:"h-3 w-3"}):(0,a.jsx)(v.f,{className:"h-3 w-3"}),p.exam.showAnswer]}),y&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md bg-muted/40 p-3",children:[n.answerText&&(0,a.jsx)(S.f,{content:n.answerText,className:"font-semibold"}),n.analysis&&(0,a.jsx)(S.f,{content:n.analysis})]})]}),!z&&u&&(0,a.jsx)(E,{paperId:e,paperMode:r,question:n,onDone:u}),z&&"ready"===n.status&&n.errorItemId&&m&&(0,a.jsx)($.f,{value:d,onChange:m,size:"sm"})]})})}var D=e.i(663661),V=e.i(35209);e.s(["default",0,function(){let{timeZone:e}=(0,i.M)(),n=(0,r.useParams)(),d=(0,r.useRouter)(),{t:v,language:N}=(0,R.b)(),k=n.id,[w,S]=(0,t.useState)(null);(0,V.f)(v.exam.title,w?.title);let[C,$]=(0,t.useState)(!1),[q,A]=(0,t.useState)(null),[z,M]=(0,t.useState)((0,l.r)(new Date,"yyyy-MM-dd",e)),[F,E]=(0,t.useState)(!1),[_,U]=(0,t.useState)(null),[O,P]=(0,t.useState)({scale:null,align:null}),L=(0,t.useCallback)(async()=>{try{S(await T.k.get(`/api/exams/${k}`))}catch{$(!0)}},[k]);if((0,t.useEffect)(()=>{L()},[L]),(0,t.useEffect)(()=>{if(w?.status!=="generating")return;let e=setTimeout(L,3e3);return()=>clearTimeout(e)},[w,L]),C)return(0,a.jsx)("div",{className:"p-8 text-center",children:v.exam.notFound});if(!w)return(0,a.jsx)(y.f,{label:v.common.loading});let K=w.questions.filter(e=>"ready"===e.status).length,B=w.questions.some(e=>e.attempts.length>0),Q=w.questions.some(e=>"failed"===e.status),W=w.questions.filter(e=>"ready"===e.status&&e.errorItemId),X=w.questions.filter(e=>"ready"===e.status&&!!e.figureSvg),Y=q?W.filter(e=>q[e.id]).length:0,G=async()=>{if(q&&0!==Y){E(!0),U(null);try{await T.k.post(`/api/exams/${w.id}/results`,{takenAt:(0,l.$)(z,e),results:W.filter(e=>q[e.id]).map(e=>({questionId:e.id,result:q[e.id]}))}),A(null),U(v.exam.resultsSaved),await L()}catch{U(v.exam.resultsSaveFailed)}finally{E(!1)}}},J=async e=>{if(await (0,I.u)(v.mastery.deleteRecordConfirm,{destructive:!0}))try{await T.k.delete(`/api/practice/record/${e}`),await L()}catch{U(v.mastery.deleteRecordFailed)}},Z=async()=>{await T.k.post(`/api/exams/${w.id}/retry`,{language:N}),await L()},ee=async()=>{await (0,I.u)(v.exam.deleteConfirm,{destructive:!0})&&(await T.k.delete(`/api/exams/${w.id}`),d.push("/exams"))},ea=async(e,a,t)=>{await T.k.patch(`/api/exams/${w.id}`,{questionId:e,figureScale:a,figureAlign:t}),S(s=>s?{...s,questions:s.questions.map(s=>s.id===e?{...s,figureScale:a,figureAlign:t}:s)}:s)},et=async e=>{await T.k.patch(`/api/exams/${w.id}`,e),S(a=>a?{...a,questions:a.questions.map(a=>({...a,...e}))}:a)};return(0,a.jsx)("main",{className:"mx-auto min-h-screen max-w-6xl px-4 py-6 md:px-8 md:py-8",children:(0,a.jsxs)("div",{className:"space-y-6 pb-24",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)(b.f,{fallbackUrl:"/exams",className:"-ml-2 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-2",children:[(0,a.jsx)("h1",{className:"text-xl sm:text-2xl font-bold tracking-tight break-words",children:w.title}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(D.f,{status:w.status,recorded:B}),"original"===w.mode&&(0,a.jsx)(g.f,{variant:"secondary",children:v.exam.modes.original}),(0,a.jsx)("span",{children:v.exam.progress.replace("{ready}",String(K)).replace("{total}",String(w.questions.length))}),(0,a.jsx)("span",{children:(0,l.r)(w.createdAt,"yyyy-MM-dd HH:mm",e)})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(s.default,{href:`/exams/${w.id}/print`,children:(0,a.jsxs)(h.f,{variant:"outline",size:"sm",disabled:0===K,children:[(0,a.jsx)(o.f,{className:"mr-2 h-4 w-4"}),v.exam.print]})}),!q&&W.length>0&&(0,a.jsxs)(h.f,{size:"sm",onClick:()=>{U(null),A({}),M((0,l.r)(new Date,"yyyy-MM-dd",e))},children:[(0,a.jsx)(m,{className:"mr-2 h-4 w-4"}),v.exam.recordResults]}),Q&&"generating"!==w.status&&(0,a.jsxs)(h.f,{variant:"outline",size:"sm",onClick:Z,children:[(0,a.jsx)(u.f,{className:"mr-2 h-4 w-4"}),v.exam.retryFailed]}),(0,a.jsxs)(h.f,{variant:"ghost",size:"sm",onClick:ee,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-950/40 sm:ml-auto",children:[(0,a.jsx)(f.f,{className:"mr-2 h-4 w-4"}),v.exam.delete]})]}),w.questions.length<w.requestedCount&&(0,a.jsx)("p",{className:"rounded-md border border-amber-200 dark:border-amber-900 bg-amber-50 dark:bg-amber-950/40 p-3 text-sm text-amber-800 dark:text-amber-200",children:v.exam.fewerThanRequested.replaceAll("{actual}",String(w.questions.length))}),_&&(0,a.jsx)("p",{className:"rounded-md border p-3 text-sm",children:_}),q&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md border bg-muted/30 p-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:"exam-taken-at",className:"text-sm font-medium",children:v.exam.takenAt}),(0,a.jsx)(p.f,{id:"exam-taken-at",type:"date",value:z,onChange:e=>M(e.target.value),className:"sm:w-48"})]}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:v.exam.recordHint})]}),X.length>0&&(0,a.jsx)(j.f,{scales:X.map(e=>e.figureScale),aligns:X.map(e=>e.figureAlign),onPreviewChange:P,onSave:et}),(0,a.jsx)("div",{className:"space-y-3",children:w.questions.map(e=>(0,a.jsx)(H,{paperId:w.id,paperMode:w.mode,question:e,editingResult:q?q[e.id]??null:void 0,onResultChange:a=>A(t=>t?{...t,[e.id]:a}:t),onDeleteAttempt:J,onRegenerated:L,previewFigureScale:O.scale,previewFigureAlign:O.align,onSaveFigureScale:ea},e.id))}),q&&(0,a.jsx)("div",{className:"fixed inset-x-0 bottom-16 z-30 border-t bg-background/95 p-3 backdrop-blur md:bottom-0",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto flex items-center justify-end gap-2",children:[0===Y&&(0,a.jsx)("span",{className:"mr-auto text-xs text-muted-foreground",children:v.exam.noResultSelected}),(0,a.jsx)(h.f,{variant:"outline",onClick:()=>A(null),disabled:F,children:v.exam.cancel}),(0,a.jsxs)(h.f,{onClick:G,disabled:F||!z||0===Y,children:[F?(0,a.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,a.jsx)(x.f,{className:"mr-2 h-4 w-4"}),v.exam.saveResults]})]})})]})})}],591124)},520732,e=>{var a=e.i(843476),t=e.i(271645),s=e.i(149704),r=e.i(519455),i=e.i(793479),l=e.i(111110),n=e.i(294114),d=e.i(184110),m=e.i(201276);e.s(["f",0,function({svg:e,scale:c,align:o,previewScaleOverride:u,previewAlignOverride:x,onSave:f}){let{t:g}=(0,l.b)(),h=(0,t.useId)(),p=(0,d.V)(c),b=(0,d.o)(o),[y,j]=(0,t.useState)(null),[v,N]=(0,t.useState)(null),[k,w]=(0,t.useState)(!1),S=y??String(p),C=""!==S.trim()&&(0,d.x)(Number(S)),$=C?Number(S):p,q=v??b,A=u??$,z=x??q,M=null!==y&&(!C||Number(S)!==p)||null!==v&&v!==b;if(!e)return null;let R=async e=>{if(e.preventDefault(),C&&M&&!k){w(!0);try{await f($,q),j(null),N(null),n.c.success(g.common.messages.saveSuccess)}catch(e){m.V.error("[FigureScale]","保存配图比例失败",{error:e}),n.c.error(g.common.messages.saveFailed)}finally{w(!1)}}};return(0,a.jsxs)("div",{children:[(0,a.jsx)(s.f,{svg:e,scale:A,align:z}),(0,a.jsxs)("form",{onSubmit:R,className:"figure-scale-editor-controls space-y-2 rounded-md border p-3 print:hidden",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsx)("label",{htmlFor:h,children:g.figure.scale}),(0,a.jsx)(i.f,{id:h,type:"number",min:d._,max:d.a,step:1,value:S,disabled:k,"aria-describedby":`${h}-hint`,"aria-invalid":!C,onChange:e=>j(e.target.value),className:"h-8 w-20"}),(0,a.jsx)("span",{children:"%"}),(0,a.jsx)(r.f,{type:"button",variant:"outline",size:"sm",disabled:k||C&&$===d.n,onClick:()=>j(String(d.n)),children:g.figure.resetScale}),(0,a.jsxs)("div",{role:"group","aria-label":g.figure.align,className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:g.figure.align}),d.j.map(e=>(0,a.jsx)(r.f,{type:"button",variant:q===e?"default":"outline",size:"sm",disabled:k,"aria-pressed":q===e,onClick:()=>N(e===b?null:e),children:g.figure.aligns[e]},e))]}),(0,a.jsx)(r.f,{type:"submit",size:"sm",disabled:k||!M||!C,children:k?g.common.progress.saving:g.common.save}),M&&(0,a.jsx)(r.f,{type:"button",variant:"ghost",size:"sm",disabled:k,onClick:()=>{j(null),N(null)},children:g.common.cancel})]}),(0,a.jsx)("input",{type:"range",min:d._,max:d.a,step:1,value:$,disabled:k,"aria-label":g.figure.scaleSlider,"aria-describedby":`${h}-hint`,onChange:e=>j(e.target.value),className:"block h-6 w-full max-w-sm accent-primary"}),(0,a.jsx)("p",{id:`${h}-hint`,className:"text-xs text-muted-foreground",children:g.figure.scaleHint})]})]})}])},339023,e=>{var a=e.i(843476),t=e.i(271645),s=e.i(519455),r=e.i(793479),i=e.i(111110),l=e.i(294114),n=e.i(184110),d=e.i(201276);e.s(["f",0,function({scales:e,aligns:m,onPreviewChange:c,onSave:o}){let{t:u}=(0,i.b)(),x=(0,t.useId)(),f=e.map(n.V),g=new Set(f).size<=1,h=f[0]??n.n,p=(m??e.map(()=>n.E)).map(n.o),b=new Set(p).size<=1,y=p[0]??n.E,[j,v]=(0,t.useState)(null),[N,k]=(0,t.useState)(null),[w,S]=(0,t.useState)(!1);if(0===e.length)return null;let C=j??String(h),$=""!==C.trim()&&(0,n.x)(Number(C)),q=$?Number(C):h,A=N??y,z=null!==j||null!==N,M=null!==j?!$||!g||Number(C)!==h:!z&&!g,R=null!==N?!b||N!==y:!z&&!b,T=M||R,F=(e,a)=>{let t=null!==e&&""!==e.trim()&&(0,n.x)(Number(e))?Number(e):null;c?.({scale:t,align:a})},I=e=>{v(e),F(e,N)},E=async e=>{if(e.preventDefault(),$&&T&&!w){S(!0);try{let e={};null===j&&(z||g)||(e.figureScale=q),null===N&&(z||b)||(e.figureAlign=A),await o(e),v(null),k(null),c?.({scale:null,align:null}),l.c.success(u.common.messages.saveSuccess)}catch(e){d.V.error("[ExamFigureScale]","统一保存试卷配图设置失败",{error:e}),l.c.error(u.common.messages.saveFailed)}finally{S(!1)}}};return(0,a.jsxs)("form",{onSubmit:E,className:"figure-scale-editor-controls w-full space-y-2 rounded-md border bg-background p-3 print:hidden",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsx)("label",{htmlFor:x,className:"font-medium",children:u.exam.uniformFigureScale}),(0,a.jsx)(r.f,{id:x,type:"number",min:n._,max:n.a,step:1,value:C,disabled:w,"aria-describedby":`${x}-hint`,"aria-invalid":!$,onChange:e=>I(e.target.value),className:"h-8 w-20"}),(0,a.jsx)("span",{children:"%"}),(0,a.jsx)(s.f,{type:"button",variant:"outline",size:"sm",disabled:w||g&&$&&q===n.n,onClick:()=>I(String(n.n)),children:u.figure.resetScale}),(0,a.jsxs)("div",{role:"group","aria-label":u.exam.uniformFigureAlign,className:"inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-muted-foreground",children:u.exam.uniformFigureAlign}),n.j.map(e=>(0,a.jsx)(s.f,{type:"button",variant:A===e&&(null!==N||b)?"default":"outline",size:"sm",disabled:w,"aria-pressed":A===e&&(null!==N||b),onClick:()=>{var a;k(a=b&&e===y?null:e),F(j,a)},children:u.figure.aligns[e]},e))]}),(0,a.jsx)(s.f,{type:"submit",size:"sm",disabled:w||!T||!$,children:w?u.common.progress.saving:u.common.save}),z&&(0,a.jsx)(s.f,{type:"button",variant:"ghost",size:"sm",disabled:w,onClick:()=>{v(null),k(null),c?.({scale:null,align:null})},children:u.common.cancel})]}),(0,a.jsx)("input",{type:"range",min:n._,max:n.a,step:1,value:q,disabled:w,"aria-label":u.exam.uniformFigureScaleSlider,"aria-describedby":`${x}-hint`,onChange:e=>I(e.target.value),className:"block h-6 w-full max-w-sm accent-primary"}),(0,a.jsx)("p",{id:`${x}-hint`,className:"text-xs text-muted-foreground",children:u.exam.uniformFigureScaleHint})]})}])},663661,e=>{var a=e.i(843476),t=e.i(487486),s=e.i(111110);let r={generating:"bg-blue-100 dark:bg-blue-900/40 text-blue-700 dark:text-blue-300 border-blue-200 dark:border-blue-900",ready:"bg-indigo-100 dark:bg-indigo-900/40 text-indigo-700 dark:text-indigo-300 border-indigo-200 dark:border-indigo-900",partial:"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-900",failed:"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300 border-red-200 dark:border-red-900",completed:"bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-300 border-green-200 dark:border-green-900"};e.s(["f",0,function({status:e,recorded:i}){let{t:l}=(0,s.b)(),n=i&&("ready"===e||"partial"===e)?"completed":e;return(0,a.jsx)(t.f,{variant:"outline",className:r[n],children:l.exam.status[n]})}])},991686,931454,e=>{var a=e.i(843476),t=e.i(271645),s=e.i(522016),r=e.i(215519),i=e.i(306831),l=e.i(716327),n=e.i(456539),d=e.i(632781),m=e.i(77071),c=e.i(328623),o=e.i(759659),u=e.i(487486),x=e.i(519455),f=e.i(515288),g=e.i(511445),h=e.i(856522),p=e.i(793479),b=e.i(393733),y=e.i(111110),j=e.i(41931);function v({errorItemId:e,onSaved:s,onCancel:l}){let{t:n}=(0,y.b)(),{timeZone:m}=(0,r.M)(),c=(0,i.r)(new Date,"yyyy-MM-dd",m),[o,u]=(0,t.useState)(null),[f,g]=(0,t.useState)(c),[N,k]=(0,t.useState)(!1),[w,S]=(0,t.useState)(null),C=async()=>{if(o&&f){k(!0),S(null);try{await j.k.post("/api/practice/record",{errorItemId:e,result:o,source:"manual",takenAt:(0,i.$)(f,m)}),s()}catch{S(n.mastery.resultSaveFailed)}finally{k(!1)}}};return(0,a.jsxs)("div",{className:"space-y-3 rounded-md border bg-muted/30 p-3",children:[(0,a.jsx)(b.f,{value:o,onChange:u,disabled:N}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:`practice-date-${e}`,className:"text-sm font-medium",children:n.mastery.recordDate}),(0,a.jsx)(p.f,{id:`practice-date-${e}`,type:"date",value:f,max:c,onChange:e=>g(e.target.value),className:"sm:w-48"}),(0,a.jsxs)("div",{className:"flex gap-2 sm:ml-auto",children:[(0,a.jsx)(x.f,{variant:"outline",size:"sm",onClick:l,disabled:N,className:"flex-1 sm:flex-none",children:n.exam.cancel}),(0,a.jsxs)(x.f,{size:"sm",onClick:C,disabled:N||!o||!f,className:"flex-1 sm:flex-none",children:[N?(0,a.jsx)(d.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,a.jsx)(h.f,{className:"mr-2 h-4 w-4"}),n.mastery.saveResult]})]})]}),w&&(0,a.jsx)("p",{className:"text-sm text-destructive",children:w})]})}var N=e.i(149704),k=e.i(294114),w=e.i(905110);let S={correct:"bg-green-100 dark:bg-green-900/40 text-green-700 dark:text-green-300 border-green-200 dark:border-green-900",wrong:"bg-red-100 dark:bg-red-900/40 text-red-700 dark:text-red-300 border-red-200 dark:border-red-900",not_attempted:"bg-amber-100 dark:bg-amber-900/40 text-amber-700 dark:text-amber-300 border-amber-200 dark:border-amber-900"};e.s(["K",0,function({errorItemId:e,onMasteryStatusChange:h}){let{timeZone:p}=(0,r.M)(),{t:b}=(0,y.b)(),[C,$]=(0,t.useState)(null),[q,A]=(0,t.useState)(null),[z,M]=(0,t.useState)(0),[R,T]=(0,t.useState)(!1),F=(0,t.useCallback)(()=>{j.k.get(`/api/error-items/${e}/practice-records`).then(e=>{$(e),h?.(e.masteryStatus)}).catch(()=>void 0)},[e,h]);(0,t.useEffect)(F,[F]);let I=()=>{M(0),F()},E=async e=>{if(await (0,k.u)(b.mastery.deleteRecordConfirm,{destructive:!0}))try{await j.k.delete(`/api/practice/record/${e}`),I()}catch{k.c.error(b.mastery.deleteRecordFailed)}},H=C?.records[0],D=!!H&&(!C?.masteryEvaluatedAt||new Date(H.createdAt)>new Date(C.masteryEvaluatedAt));if((0,t.useEffect)(()=>{if(!D||z>=20)return;let e=setTimeout(()=>{M(e=>e+1),F()},4e3);return()=>clearTimeout(e)},[D,z,F]),!C)return null;let V=C.masteryProbability,_=null===V?null:Math.round(100*V),U=null===_?"":(0,w.m)(V,C.masteryThreshold)?"bg-green-500":_>=30?"bg-amber-500":"bg-red-500",O=b.practice.difficulty;return(0,a.jsxs)(f.N,{children:[(0,a.jsx)(f.Y,{children:(0,a.jsxs)(f.v,{className:"flex items-center gap-2 text-base",children:[(0,a.jsx)(c.f,{className:"h-4 w-4 text-primary"}),b.mastery.probability]})}),(0,a.jsxs)(f.O,{className:"space-y-4",children:[null===_?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:D?b.mastery.pending:b.mastery.notEvaluated}):(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsxs)("span",{className:"text-3xl font-bold",children:[_,"%"]}),(0,a.jsxs)("span",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[D&&(0,a.jsx)(d.f,{className:"h-3 w-3 animate-spin"}),(0,a.jsx)(u.f,{variant:"outline",children:"ai"===C.masterySource?b.mastery.aiEvaluated:b.mastery.estimated})]})]}),(0,a.jsx)("div",{className:"h-2 w-full rounded-full bg-muted overflow-hidden",children:(0,a.jsx)("div",{className:`h-full ${U} transition-all`,style:{width:`${_}%`}})}),C.masteryReason&&(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:C.masteryReason}),(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:b.mastery.thresholdHint.replace("{threshold}",String(C.masteryThreshold))})]}),(0,a.jsxs)("div",{className:"space-y-2 border-t pt-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold",children:b.mastery.history}),!R&&(0,a.jsxs)(x.f,{variant:"outline",size:"sm",onClick:()=>T(!0),children:[(0,a.jsx)(m.f,{className:"mr-1 h-4 w-4"}),b.mastery.addRecord]})]}),R&&(0,a.jsx)(v,{errorItemId:e,onCancel:()=>T(!1),onSaved:()=>{T(!1),I()}}),0===C.records.length?(0,a.jsx)("p",{className:"text-sm text-muted-foreground italic",children:b.mastery.noHistory}):(0,a.jsx)("ul",{className:"divide-y rounded-md border",children:C.records.map(e=>(0,a.jsxs)("li",{className:"p-3 text-sm space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2",children:[(0,a.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 flex-wrap items-center gap-2 text-left",onClick:()=>A(q===e.id?null:e.id),children:[(0,a.jsx)("span",{className:"text-muted-foreground tabular-nums",children:(0,i.r)(e.createdAt,"yyyy-MM-dd HH:mm",p)}),(0,a.jsx)(u.f,{variant:"outline",className:S[e.result]||"",children:b.mastery.results[e.result]||e.result}),e.difficulty&&(0,a.jsx)(u.f,{variant:"secondary",children:O[e.difficulty]||e.difficulty}),(0,a.jsx)("span",{className:"text-xs text-muted-foreground",children:e.exam?`${b.mastery.sources.exam} \xb7 ${e.exam.title}`:b.mastery.sources[e.source]||b.mastery.sources.practice}),e.questionText&&(0,a.jsx)("span",{className:"ml-auto text-muted-foreground",children:q===e.id?(0,a.jsx)(n.f,{className:"h-4 w-4"}):(0,a.jsx)(l.f,{className:"h-4 w-4"})})]}),(0,a.jsx)("button",{type:"button","aria-label":b.mastery.deleteRecord,title:b.mastery.deleteRecord,className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-red-50 dark:hover:bg-red-950/40 hover:text-red-600 dark:hover:text-red-400",onClick:()=>E(e.id),children:(0,a.jsx)(o.f,{className:"h-4 w-4"})})]}),q===e.id&&e.questionText&&(0,a.jsxs)("div",{className:"space-y-2 rounded-md bg-muted/40 p-3",children:[(0,a.jsx)(g.f,{content:e.questionText}),(0,a.jsx)(N.f,{svg:e.figureSvg}),e.wrongAnswerText&&(0,a.jsxs)("div",{className:"border-t pt-2",children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:b.editor.wrongAnswerText}),(0,a.jsx)(g.f,{content:e.wrongAnswerText})]}),e.mistakeAnalysis&&(0,a.jsxs)("div",{className:"border-t pt-2",children:[(0,a.jsx)("p",{className:"mb-1 font-medium",children:b.editor.mistakeAnalysis}),(0,a.jsx)(g.f,{content:e.mistakeAnalysis})]}),e.originalImageUrl&&(0,a.jsx)("img",{src:e.originalImageUrl,alt:b.editor.wrongAnswerText,className:"max-h-96 max-w-full rounded object-contain"}),e.answerText&&(0,a.jsx)("div",{className:"border-t pt-2",children:(0,a.jsx)(g.f,{content:e.answerText,className:"font-semibold"})}),e.exam&&(0,a.jsx)(s.default,{href:`/exams/${e.exam.paperId}`,className:"text-xs text-primary hover:underline",children:e.exam.title})]})]},e.id))})]})]})]})},"x",0,S],991686);var C=e.i(534693);e.s(["f",()=>C.f],931454)},393733,e=>{var a=e.i(843476),t=e.i(548161),s=e.i(576248),r=e.i(583967),i=e.i(111110);let l=[{value:"correct",icon:t.f,active:"border-green-600 bg-green-50 dark:bg-green-950/40 text-green-700 dark:text-green-300"},{value:"wrong",icon:r.f,active:"border-red-600 bg-red-50 dark:bg-red-950/40 text-red-700 dark:text-red-300"},{value:"not_attempted",icon:s.f,active:"border-amber-600 bg-amber-50 dark:bg-amber-950/40 text-amber-700 dark:text-amber-300"}];e.s(["f",0,function({value:e,onChange:t,disabled:s,size:r="md"}){let{t:n}=(0,i.b)(),d="sm"===r?"px-2 py-1 text-xs":"px-3 py-2 text-sm";return(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2",role:"radiogroup",children:l.map(({value:i,icon:l,active:m})=>(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":e===i,disabled:s,onClick:()=>t(i),className:`flex items-center justify-center gap-1 rounded-md border font-medium transition-colors disabled:opacity-60 ${d} ${e===i?m:"border-input hover:bg-muted"}`,children:[(0,a.jsx)(l,{className:"sm"===r?"h-3 w-3":"h-4 w-4"}),n.mastery.results[i]]},i))})}])},149704,e=>{var a=e.i(843476),t=e.i(111110),s=e.i(398019),r=e.i(184110),i=e.i(975157);let l={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:n,align:d,className:m}){let{t:c}=(0,t.b)();if(!e)return null;let o=(0,r.V)(n),u=(0,r.o)(d);return(0,a.jsx)("figure",{className:(0,i.f)("question-figure my-3",m),children:(0,a.jsx)("img",{src:(0,s.f)(e),alt:c.figure.alt,className:(0,i.f)(l[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:o/100,maxWidth:`${Math.min(o,100)}%`}})})}])},590546,e=>{var a=e.i(843476),t=e.i(618566),s=e.i(519455),r=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:i}){let l=(0,t.useRouter)();return(0,a.jsx)(s.f,{variant:"ghost",size:"icon",onClick:()=>{l.push(e)},className:i,children:(0,a.jsx)(r.f,{className:"h-5 w-5"})})}])},86963,e=>{var a=e.i(843476),t=e.i(632781);e.s(["f",0,function({label:e}){return(0,a.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,a.jsx)(t.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,a.jsx)("p",{className:"text-sm",children:e})]})}])},184110,e=>{let a=["left","center","right"],t="center";function s(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,t,"n",0,100,"j",0,a,"a",0,200,"_",0,10,"x",0,s,"o",0,function(e){return"string"==typeof e&&a.includes(e)?e:t},"V",0,function(e){return s(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},35209,e=>{var a=e.i(271645),t=e.i(111110);e.s(["f",0,function(...e){let{t:s}=(0,t.b)(),r=[s.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,a.useEffect)(()=>{document.title=r},[r])}])}])})();
|