wrong-notebook 2026.10.30-3 → 2026.10.30-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +2 -0
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +12 -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/dashboard/route.js +9 -9
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +9 -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 +9 -9
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +11 -11
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +10 -10
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +11 -11
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +9 -9
- 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 +10 -10
- 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 +11 -11
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +9 -9
- 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 +12 -12
- package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +9 -9
- 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 +9 -9
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +9 -9
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +11 -11
- 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 +9 -9
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +7 -7
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +7 -7
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +12 -12
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +11 -11
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +9 -9
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +2 -2
- 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 +2 -2
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +7 -7
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +7 -7
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +10 -10
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +9 -9
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +10 -10
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +9 -9
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +8 -8
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js +2 -2
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js +2 -2
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +8 -8
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +4 -4
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tts/batch/route/build-manifest.json +12 -0
- package/.next/server/app/api/tts/batch/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tts/batch/route.js +17 -0
- package/.next/server/app/api/tts/batch/route.js.map +5 -0
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -0
- package/.next/server/app/api/tts/batch/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tts/route.js +8 -7
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tts/status/route/build-manifest.json +12 -0
- package/.next/server/app/api/tts/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tts/status/route.js +16 -0
- package/.next/server/app/api/tts/status/route.js.map +5 -0
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -0
- package/.next/server/app/api/tts/status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/user/route.js +11 -11
- package/.next/server/app/api/user/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/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 +2 -0
- package/.next/server/chunks/[root-of-the-server]__003ii50e63ws5._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__02bjw2uriv5fd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__03ru8t856rgvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__06j_-j4ftb5db._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0duevucfb62_h._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gvvuk0avtpy9._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0iq2agc-dlcyc._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0a-iuqynn3h9d._.js → [root-of-the-server]__0lgsw0kfw-jqc._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0orbb3gvf9h5l._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0rt84iswe-353._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__0uvuljzm78r8b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-jk6umz3qs6r._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10ffg2l-u0zof._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_fxjdqa7fwwc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1g038brpx-jta._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gx-b_vxyk--4._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ixfwffo1gqy1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jcp2-lix6if6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kff0rbt3ym95._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1n2uvss8wfueo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1nsrbw9jntgo8._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1onv3pfwsqytl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1q9pzdlt18lp0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1uz66pjshld-e._.js +3 -0
- package/.next/server/chunks/_076-jjzrfdsdk._.js +1 -1
- package/.next/server/chunks/_09o9zamz75n5d._.js +1 -1
- package/.next/server/chunks/{_0t4hmii1np2ho._.js → _0a7_sds_l6vgw._.js} +3 -3
- package/.next/server/chunks/{_1oy0tspjrakxd._.js → _0b7ljlcl6h_ro._.js} +3 -3
- package/.next/server/chunks/_0gxi3zrkhyvx_._.js +1 -1
- package/.next/server/chunks/_0hk9z9rqga4x-._.js +3 -0
- package/.next/server/chunks/_0lob14xk0ko5z._.js +1 -1
- package/.next/server/chunks/_0p-sas2zxy3iv._.js +3 -0
- package/.next/server/chunks/_0z0zrluul2idw._.js +1 -1
- package/.next/server/chunks/_11_p1ahjjply_._.js +1 -1
- package/.next/server/chunks/_13ffmxv8qrwi0._.js +1 -1
- package/.next/server/chunks/_16jdov0rxh99d._.js +1 -1
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1ahi8466v1b3l._.js +1 -1
- package/.next/server/chunks/_1b7qjlv0nxovi._.js +1 -1
- package/.next/server/chunks/_1e8w9uuebtrcb._.js +1 -1
- package/.next/server/chunks/_1hp9mnz19v199._.js +1 -1
- package/.next/server/chunks/_1m-yyz-pl9-03._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_tts_batch_route_actions_1jmuawkcgxmae.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_tts_status_route_actions_1udk0hbf96zdl.js +3 -0
- package/.next/server/chunks/src_lib_1csf8_0vpeenu._.js +3 -0
- package/.next/server/chunks/src_lib_1mno8g5cqmaet._.js +1 -1
- package/.next/server/chunks/src_lib_1p0k3ud1vrwmg._.js +3 -0
- package/.next/server/chunks/src_lib_1qy5aajgog9r2._.js +1 -1
- package/.next/server/chunks/src_lib_auth-utils_ts_20i7biv4dj8pm._.js +1 -1
- package/.next/server/chunks/src_lib_minimax-code_checkin_ts_1j1mpuxc1vgoz._.js +1 -1
- package/.next/server/chunks/src_lib_tts_19zri-v8-l_4u._.js +6 -6
- package/.next/server/chunks/ssr/[root-of-the-server]__0x_ihemma9171._.js +3 -0
- package/.next/server/chunks/ssr/_00np6xqvkg6u-._.js +1 -1
- package/.next/server/chunks/ssr/_08fq-uch-l1g6._.js +1 -1
- package/.next/server/chunks/ssr/_0n_xmfdlu07f9._.js +3 -0
- package/.next/server/chunks/ssr/_0xyykn-ar3ujn._.js +3 -0
- package/.next/server/chunks/ssr/_17edi6l2a0p76._.js +1 -1
- package/.next/server/chunks/ssr/_20-x85_onge5x._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_play_0upz8-7p5gttr.js +4 -0
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.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 +1 -1
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_difficulty-stars_tsx_1af9qqfurq7_t._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/500.html +1 -1
- package/.next/server/preview-props.json +3 -3
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/00n2-r3ac3dh5.js +2 -0
- package/.next/static/chunks/0kh-fx3tssh5w.js +1 -0
- package/.next/static/chunks/0p2fh98qaki45.js +1 -0
- package/.next/static/chunks/{314x1g250-zss.js → 1c46asvnosb8-.js} +1 -1
- package/.next/static/chunks/1cdwoh8b2ub-t.js +1 -0
- package/.next/static/chunks/1epmdj8kqwbz4.js +1 -0
- package/.next/static/chunks/1l46v858ieavc.js +1 -0
- package/.next/static/chunks/1r7yfcltcmwkh.js +1 -0
- package/.next/static/chunks/24gum0cmhhv7z.js +1 -0
- package/.next/static/chunks/26qq8907b9j3d.js +1 -0
- package/.next/static/chunks/2cf27aonkij9_.css +3 -0
- package/.next/static/chunks/2ctc1xbp8lz8e.js +191 -0
- package/.next/static/chunks/{2rgflf9-3s4ud.js → 2fr8ktozrvacg.js} +1 -1
- package/.next/static/chunks/{0oe2-jjx_8ol-.js → 2mawf08h1jfc8.js} +1 -1
- package/.next/static/chunks/2uobd1ff4vknn.js +33 -0
- package/.next/static/chunks/341etzsqr_b1v.js +6 -0
- package/package.json +1 -1
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__0ergl3gmxvrz3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0lqng_pqv30ts._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ozf21hrh_433._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0s0eusp3mojnx._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wm4req5e6m88._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__114quo-_-qi9w._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16-d6bl8bbqvy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1_04f-bpuf75t._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1_hpgx5rlxpya._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1mj__r5f_o6lo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20m7u7lg4e5q8._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1w4rew5br9_b8._.js +0 -3
- package/.next/server/chunks/ssr/_04ziy8_ak_olr._.js +0 -3
- package/.next/server/chunks/ssr/_09gyxodn5bpsw._.js +0 -4
- package/.next/server/chunks/ssr/_0oksf3a6pbj88._.js +0 -3
- package/.next/static/chunks/0-_s_oel8jb5s.js +0 -1
- package/.next/static/chunks/0dizg7xu7sle2.js +0 -1
- package/.next/static/chunks/0ebem2w42rgm6.js +0 -191
- package/.next/static/chunks/0h8aoqx7182md.js +0 -1
- package/.next/static/chunks/0pvlg-25ddo6e.js +0 -33
- package/.next/static/chunks/188s0rumoz5yj.js +0 -1
- package/.next/static/chunks/1c_3by-e4c6ix.js +0 -2
- package/.next/static/chunks/1qa6rlj01hnl5.js +0 -1
- package/.next/static/chunks/2q9n-d4_9bhp2.js +0 -1
- package/.next/static/chunks/2x1y8v15sfol3.css +0 -3
- package/.next/static/chunks/37jrjuqt8f_ee.js +0 -1
- package/.next/static/chunks/3oygizhwo77gr.js +0 -6
- package/.next/static/chunks/3zt-rwod7li6h.js +0 -1
- /package/.next/static/{x6fwUxfhT4hZ2tYr6cKl_ → X3NzguYsDSEVWQKJ6r_e7}/_buildManifest.js +0 -0
- /package/.next/static/{x6fwUxfhT4hZ2tYr6cKl_ → X3NzguYsDSEVWQKJ6r_e7}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{x6fwUxfhT4hZ2tYr6cKl_ → X3NzguYsDSEVWQKJ6r_e7}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[131368,992883,a=>{"use strict";var b=a.i(187924);let c=(0,a.i(170106).f)("star",[["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"}]]);var d=a.i(550194),e=a.i(368114);let f=[1,2,3,4,5];function g(a){return"not_attempted"===a||"wrong_attempt"===a||"unknown"===a?a:"unknown"}a.s(["f",0,function({value:a,onChange:g,disabled:h,size:i="sm",showUnrated:j=!0,className:k}){let{t:l}=(0,d.b)(),m=a??0,n="sm"===i?"h-3.5 w-3.5":"h-5 w-5",o=m?l.difficulty.starsLabel.replace("{n}",String(m)):l.difficulty.unrated;return g?(0,b.jsxs)("span",{className:(0,e.f)("inline-flex items-center gap-0.5",k),role:"group","aria-label":`${l.difficulty.label}
|
|
1
|
+
module.exports=[131368,992883,a=>{"use strict";var b=a.i(187924);let c=(0,a.i(170106).f)("star",[["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"}]]);var d=a.i(550194),e=a.i(368114);let f=[1,2,3,4,5];function g(a){return"not_attempted"===a||"wrong_attempt"===a||"unknown"===a?a:"unknown"}a.s(["f",0,function({value:a,onChange:g,disabled:h,size:i="sm",showUnrated:j=!0,className:k}){let{t:l}=(0,d.b)(),m=a??0,n="sm"===i?"h-3.5 w-3.5":"h-5 w-5",o=m?l.difficulty.starsLabel.replace("{n}",String(m)):l.difficulty.unrated;return g?(0,b.jsxs)("span",{className:(0,e.f)("inline-flex items-center gap-0.5",k),role:"group","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:l.difficulty.clearHint,children:[f.map(a=>(0,b.jsx)("button",{type:"button",disabled:h,onClick:()=>g(a===m?null:a),"aria-label":l.difficulty.setStars.replace("{n}",String(a)),"aria-pressed":a<=m,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,b.jsx)(c,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},a)),!m&&j&&(0,b.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:l.difficulty.unrated})]}):m?(0,b.jsx)("span",{className:(0,e.f)("inline-flex items-center",k),role:"img","aria-label":`${l.difficulty.label}${l.common.colon}${o}`,title:o,children:f.map(a=>(0,b.jsx)(c,{className:(0,e.f)(n,a<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},a))}):j?(0,b.jsx)("span",{className:(0,e.f)("text-xs text-muted-foreground",k),children:l.difficulty.unrated}):null}],131368),a.s(["i",0,function(a,b="zh"){return("en"===b?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[g(a)]},"h",0,g,"x",0,function(a,b){return(b||"").trim()?"wrong_attempt":g(a)}],992883)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_components_difficulty-stars_tsx_1af9qqfurq7_t._.js.map
|
|
@@ -188,6 +188,6 @@ ${aG}
|
|
|
188
188
|
${aG}
|
|
189
189
|
|
|
190
190
|
{{grade_instruction}}
|
|
191
|
-
{{provider_hints}}`;var aJ=a.i(787654);function aK({name:a,description:c}){return(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-2 text-xs py-1",children:[(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded font-mono text-primary shrink-0 w-fit",children:`{{${a}}}`}),(0,b.jsx)("span",{className:"text-muted-foreground",children:c})]})}function aL(){let{t:a}=(0,c.b)();return(0,b.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-md p-3 flex items-start gap-3 text-amber-900 text-sm mb-4",children:[(0,b.jsx)(r,{className:"h-5 w-5 shrink-0 text-amber-600"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"font-medium",children:a.settings?.prompts?.caution||"Modify with Caution"}),(0,b.jsx)("p",{className:"text-amber-800/90 text-xs",children:a.settings?.prompts?.warning||"Variables in {{brackets}} are used to inject dynamic content. Please preserve these variables, otherwise the AI providing may fail to get question context or return invalid formats."})]})]})}function aM({config:a,onUpdate:d}){let{t:e}=(0,c.b)(),f=a.prompts?.analyze||aH,g=a.prompts?.similar||aI,h=async a=>{await (0,T.u)(e.settings?.prompts?.resetConfirm||"Are you sure you want to reset to default?",{destructive:!0})&&d(a,"analyze"===a?aH:aI)},i=(a,b)=>{d(a,b)};return(0,b.jsx)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:(0,b.jsxs)(C.i,{defaultValue:"analyze",className:"w-full",children:[(0,b.jsxs)(C.U,{className:"grid w-full grid-cols-2",children:[(0,b.jsx)(C.k,{value:"analyze",children:e.settings?.prompts?.analysisTab||"Analysis Prompt"}),(0,b.jsx)(C.k,{value:"similar",children:e.settings?.prompts?.similarTab||"Similar Question Prompt"})]}),(0,b.jsx)(C.S,{value:"analyze",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)(H.f,{className:"text-base font-semibold",children:e.settings?.prompts?.customAnalysis||"Custom Analysis Template"}),(0,b.jsxs)(A.f,{variant:"outline",size:"sm",onClick:()=>h("analyze"),children:[(0,b.jsx)(aJ.f,{className:"w-4 h-4 mr-2"}),e.settings?.prompts?.reset||"Reset Default"]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,b.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,b.jsx)(t,{className:"h-3.5 w-3.5"}),e.settings?.prompts?.variables||"Available Variables"]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aK,{name:"language_instruction",description:e.settings?.prompts?.vars?.languageInstruction||"Injects instructions based on target language (e.g., keep English questions in English but analysis in Chinese)."}),(0,b.jsx)(aK,{name:"knowledge_points_list",description:e.settings?.prompts?.vars?.knowledgePointsList||"Injects the standard list of knowledge point tags for the specific subject."}),(0,b.jsx)(aK,{name:"provider_hints",description:e.settings?.prompts?.vars?.providerHints||"System-injected hints (e.g., enforcing JSON format)."})]})]}),(0,b.jsx)(aB.f,{value:f,onChange:a=>i("analyze",a.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:aH})]})}),(0,b.jsx)(C.S,{value:"similar",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)(H.f,{className:"text-base font-semibold",children:e.settings?.prompts?.customSimilar||"Custom Similar Question Template"}),(0,b.jsxs)(A.f,{variant:"outline",size:"sm",onClick:()=>h("similar"),children:[(0,b.jsx)(aJ.f,{className:"w-4 h-4 mr-2"}),e.settings?.prompts?.reset||"Reset Default"]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,b.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,b.jsx)(t,{className:"h-3.5 w-3.5"}),e.settings?.prompts?.variables||"Available Variables"]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aK,{name:"difficulty_level",description:e.settings?.prompts?.vars?.difficultyLevel||"Target difficulty level."}),(0,b.jsx)(aK,{name:"difficulty_instruction",description:e.settings?.prompts?.vars?.difficultyInstruction||"Specific writing instructions for the target difficulty."}),(0,b.jsx)(aK,{name:"original_question",description:e.settings?.prompts?.vars?.originalQuestion||"The full text of the original question."}),(0,b.jsx)(aK,{name:"knowledge_points",description:e.settings?.prompts?.vars?.knowledgePoints||"List of knowledge points to test."}),(0,b.jsx)(aK,{name:"language_instruction",description:e.settings?.prompts?.vars?.languageInstructionShort||"Language formatting instructions."})]})]}),(0,b.jsx)(aB.f,{value:g,onChange:a=>i("similar",a.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:aI})]})})]})})}var aN=a.i(325015),aO=a.i(190622),aP=a.i(975484);let aQ=["browser","minimax","qwen"],aR={minimax:{model:"speech-2.8-hd",voice:"male-qn-jingying"},qwen:{model:"qwen-audio-3.0-tts-plus",voice:"longanlufeng"}};function aS({config:a,setConfig:d,saving:e,onSave:f}){let{t:g,language:h}=(0,c.b)(),i=g.settings.tts,[j,k]=(0,q.useState)(!1),l=a.tts?.mode??"browser",m="minimax"===l||"qwen"===l?l:null,n=m?a.tts?.[m]:void 0,o=(a,b)=>{m&&d(c=>({...c,tts:{...c.tts,[m]:{...c.tts?.[m],[a]:b}}}))},p=async()=>{(0,aP.p)(),k(!0);try{await f();let{id:a}=await S.f.post("/api/tts",{text:i.previewText,language:h},{timeout:12e4,recoverable:!0}),b=(0,aP.l)();if(!b)return;b.src=`/api/tts/${a}`,b.playbackRate=1,await b.play()}catch(b){U.f.error("[TtsSettings]","Preview failed",{error:b});let a=(0,V.d)(b);T.c.error("TTS_NOT_CONFIGURED"===a?i.notConfigured:"TTS_PROVIDER_ERROR"===a?i.providerError:i.previewFailed)}finally{k(!1)}};return(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{children:i.title}),(0,b.jsxs)(af.d,{value:l,onValueChange:a=>d(b=>({...b,tts:{...b.tts,mode:a}})),children:[(0,b.jsx)(af.P,{children:(0,b.jsx)(af.U,{})}),(0,b.jsx)(af.r,{children:aQ.map(a=>(0,b.jsx)(af.T,{value:a,children:i.modes[a]},a))})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?i.cloudHint:i.browserHint})]}),m&&(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(H.f,{children:[aO.$[m].name," API Key"]}),(0,b.jsx)(ae.f,{value:a[m]?.apiKey||"",onChange:a=>{var b;return b=a.target.value,void(m&&d(a=>({...a,[m]:{...a[m],apiKey:b}})))},placeholder:"qwen"===m?"sk-sp-...":"sk-..."}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i.apiKeyHint[m]})]}),(0,b.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{children:i.model}),(0,b.jsx)(G.f,{value:n?.model||"",onChange:a=>o("model",a.target.value),placeholder:aR[m].model})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{children:i.voice}),(0,b.jsx)(G.f,{value:n?.voice||"",onChange:a=>o("voice",a.target.value),placeholder:aR[m].voice})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i.voiceHint[m]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{children:i.endpoint}),(0,b.jsx)(G.f,{value:n?.endpoint||"",onChange:a=>o("endpoint",a.target.value),placeholder:function(a,b){let{baseUrl:c}=(0,aO.k)(a,b);if("minimax"===a)return`${c.replace(/\/+$/,"")}/t2a_v2`;try{return`${new URL(c).origin}/api/v1/services/audio/tts/SpeechSynthesizer`}catch{return""}}(m,a[m])}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i.endpointHint})]})]},m),(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[m&&(0,b.jsxs)(A.f,{variant:"outline",onClick:p,disabled:e||j,className:"sm:w-auto",children:[j?(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(aN.f,{className:"mr-2 h-4 w-4"}),i.preview]}),(0,b.jsxs)(A.f,{onClick:()=>void f(),disabled:e||j,className:"flex-1",children:[e&&(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}),i.save]})]})]})}var aT=a.i(439830);function aU({value:a,icon:c,label:d}){return(0,b.jsxs)(C.k,{value:a,className:"px-2 sm:px-3",children:[c,(0,b.jsx)("span",{className:"hidden sm:inline",children:d})]})}function aV(){let{setTimeZone:a}=(0,e.M)(),{data:f}=(0,d.useSession)(),g=f?.user?.role==="admin",{t:j}=(0,c.b)(),k=(0,h.useRouter)(),[l,m]=(0,q.useState)(!1),n=(0,q.useRef)(null),[o,E]=(0,q.useState)(!1),[F,G]=(0,q.useState)(!1),[H,I]=(0,q.useState)({aiProvider:"minimax"}),J=(0,q.useCallback)(async()=>{G(!0);try{I(await S.f.get("/api/settings"))}catch(a){U.f.error("[SettingsDialog]","Failed to fetch settings",{error:a})}finally{G(!1)}},[]);(0,q.useEffect)(()=>{l&&J()},[l,J]);let K=async()=>{let b=(0,aT.f)(H,j);if(b)return void T.c.error(b);E(!0);try{let b=await S.f.post("/api/settings",H);I(b),a(b.timeZone||D.J),T.c.success(j.settings?.messages?.saved||"Settings saved"),n.current?.scrollTo({top:0,behavior:"smooth"})}catch(a){U.f.error("[SettingsDialog]","Failed to save settings",{error:a}),T.c.error(j.settings?.messages?.saveFailed||"Failed to save")}finally{E(!1)}},L=a=>(0,b.jsxs)(A.f,{onClick:K,disabled:o,className:"w-full",children:[o&&(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}),a]});return(0,b.jsxs)(B.N,{open:l,onOpenChange:m,children:[(0,b.jsx)(B.a,{asChild:!0,children:(0,b.jsxs)(A.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,b.jsx)(x,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"sr-only",children:j.settings?.title||"Settings"})]})}),(0,b.jsxs)(B.d,{ref:n,className:"w-[calc(100vw-2rem)] sm:max-w-[900px] max-h-[85vh] overflow-y-auto",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsx)(B.F,{children:j.settings?.title||"Settings"}),(0,b.jsx)(B.C,{children:j.settings?.desc||"Manage your preferences and data."})]}),(0,b.jsxs)(C.i,{defaultValue:"general",className:"w-full",children:[(0,b.jsxs)(C.U,{className:`grid w-full grid-cols-4 ${g?"sm:grid-cols-7":"sm:grid-cols-4"} gap-1 h-auto`,children:[(0,b.jsx)(aU,{value:"general",icon:(0,b.jsx)(u.f,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.general||"General"}),(0,b.jsx)(aU,{value:"account",icon:(0,b.jsx)(y.f,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.account||"Account"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aU,{value:"ai",icon:(0,b.jsx)(s,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.ai||"AI Provider"}),(0,b.jsx)(aU,{value:"prompts",icon:(0,b.jsx)(w,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.prompts||"Prompts"}),(0,b.jsx)(aU,{value:"admin",icon:(0,b.jsx)(p,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.admin||"User Management"})]}),(0,b.jsx)(aU,{value:"danger",icon:(0,b.jsx)(r,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.danger||"Danger"}),(0,b.jsx)(aU,{value:"about",icon:(0,b.jsx)(t,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.about||"About"})]}),(0,b.jsxs)(C.S,{value:"general",className:"space-y-4 py-4",children:[(0,b.jsx)(aA,{config:H,setConfig:I,isAdmin:g,disabled:F||o}),g&&L(j.settings?.save||"Save Settings")]}),(0,b.jsx)(C.S,{value:"account",className:"space-y-4 py-4",children:(0,b.jsx)(ah,{})}),(0,b.jsxs)(C.S,{value:"ai",className:"space-y-4 py-4",children:[(0,b.jsx)(ai.f,{config:H,setConfig:I,loading:F,saving:o,onSave:K}),!F&&(0,b.jsx)(aS,{config:H,setConfig:I,saving:o,onSave:K})]}),(0,b.jsxs)(C.S,{value:"prompts",className:"space-y-4 py-4",children:[(0,b.jsx)(aM,{config:H,onUpdate:(a,b)=>I(c=>({...c,prompts:{...c.prompts,[a]:b}}))}),L(j.settings?.prompts?.save||"Save Prompt Settings")]}),g&&(0,b.jsxs)(C.S,{value:"admin",className:"space-y-4 py-4",children:[(0,b.jsxs)(A.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{m(!1),k.push("/admin")},children:[(0,b.jsx)(i.f,{className:"h-4 w-4"}),j.admin?.dashboard?.title||"Admin Dashboard"]}),(0,b.jsxs)(A.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{m(!1),k.push("/setup")},children:[(0,b.jsx)(z.f,{className:"h-4 w-4"}),j.setup.rerun]}),(0,b.jsx)("div",{className:"border-t pt-4",children:(0,b.jsx)(W,{})})]}),(0,b.jsx)(C.S,{value:"danger",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(ar,{isAdmin:g}),(0,b.jsx)(am,{isAdmin:g})]})}),(0,b.jsx)(C.S,{value:"about",className:"space-y-4 py-4",children:(0,b.jsx)(ad,{})})]})]})]})}let aW=[/^\/login/,/^\/register/,/^\/setup/,/^\/print-preview/,/^\/exams\/[^/]+\/print/],aX=[{key:"home",href:"/",icon:o,match:a=>"/"===a},{key:"notebooks",href:"/notebooks",icon:j.f,match:a=>a.startsWith("/notebooks")||a.startsWith("/error-items")||a.startsWith("/practice")},{key:"review",href:"/review",icon:k.f,match:a=>a.startsWith("/review")},{key:"stats",href:"/stats",icon:i.f,match:a=>a.startsWith("/stats")||a.startsWith("/tags")},{key:"exams",href:"/exams",icon:l.f,match:a=>a.startsWith("/exams")}];function aY({children:a}){var e;let i,j,k=(0,h.usePathname)()||"/",{t:l}=(0,c.b)(),{data:n,status:o}=(0,d.useSession)(),r=n?.user?.role==="admin",s=aW.some(a=>a.test(k));if(e=r&&!s,i=(0,h.useRouter)(),j=(0,q.useRef)(!1),(0,q.useEffect)(()=>{e&&!j.current&&(j.current=!0,S.f.get("/api/setup").then(a=>{a.needsSetup&&i.replace("/setup")}).catch(a=>U.f.warn("[Setup]","Failed to check setup status",{error:a})))},[e,i]),s||"unauthenticated"===o)return(0,b.jsx)(b.Fragment,{children:a});let t=n?.user?.name||n?.user?.email||"";return(0,b.jsxs)("div",{className:"min-h-screen",children:[(0,b.jsx)("header",{className:"sticky top-0 z-40 border-b bg-card/80 backdrop-blur-md supports-[backdrop-filter]:bg-card/70 print:hidden",children:(0,b.jsxs)("div",{className:"mx-auto flex h-14 max-w-6xl items-center gap-3 px-4 md:h-16 md:px-8",children:[(0,b.jsxs)(g.default,{href:"/",className:"flex shrink-0 items-center gap-2",children:[(0,b.jsx)(f.default,{src:"/icons/icon.png",alt:"",width:32,height:32,className:"rounded-lg",priority:!0,unoptimized:!0}),(0,b.jsx)("span",{className:"text-base font-semibold tracking-tight",children:l.pageTitle.base})]}),(0,b.jsx)("nav",{className:"ml-4 hidden items-center gap-1 md:flex",children:aX.map(a=>{let c=a.match(k),d=a.icon;return(0,b.jsxs)(g.default,{href:a.href,className:(0,I.f)("flex items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium transition-colors",c?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),"aria-current":c?"page":void 0,children:[(0,b.jsx)(d,{className:"h-4 w-4"}),l.nav[a.key]]},a.key)})}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[t&&(0,b.jsxs)("span",{className:"mr-2 hidden max-w-40 items-center gap-2 truncate text-sm text-muted-foreground lg:flex",children:[(0,b.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary",children:t.slice(0,1).toUpperCase()}),(0,b.jsx)("span",{className:"truncate",children:t})]}),r&&(0,b.jsx)(g.default,{href:"/admin",title:l.nav.admin,children:(0,b.jsxs)(A.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,b.jsx)(p,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"sr-only",children:l.nav.admin})]})}),(0,b.jsx)(aV,{}),(0,b.jsx)(A.f,{variant:"ghost",size:"icon",className:"rounded-full text-muted-foreground hover:text-destructive",onClick:()=>(0,d.signOut)({callbackUrl:"/login"}),title:l.app.logout,children:(0,b.jsx)(m.f,{className:"h-5 w-5"})})]})]})}),(0,b.jsx)("div",{className:"pb-20 md:pb-0",children:a}),(0,b.jsx)("nav",{className:"pb-safe fixed inset-x-0 bottom-0 z-40 border-t bg-card/90 backdrop-blur-md md:hidden print:hidden",children:(0,b.jsx)("div",{className:"grid h-16 grid-cols-5",children:aX.map(a=>{let c=a.match(k),d=a.icon;return(0,b.jsxs)(g.default,{href:a.href,className:(0,I.f)("flex flex-col items-center justify-center gap-1 text-[11px] font-medium transition-colors",c?"text-primary":"text-muted-foreground"),"aria-current":c?"page":void 0,children:[(0,b.jsx)("span",{className:(0,I.f)("flex h-7 w-12 items-center justify-center rounded-full transition-colors",c&&"bg-accent"),children:(0,b.jsx)(d,{className:"h-5 w-5"})}),l.nav[a.key]]},a.key)})})})]})}let aZ=(0,n.f)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var a$=a.i(862722);let a_=[/^\/login/,/^\/register/,/^\/print-preview/,/^\/exams\/[^/]+\/print/];function a0(){let{t:a}=(0,c.b)(),{timeZone:f}=(0,e.M)(),{status:i}=(0,d.useSession)(),j=(0,h.usePathname)(),[k,l]=(0,q.useState)(!1),[m,n]=(0,q.useState)([]),[o,p]=(0,q.useState)(()=>Date.now()),r="authenticated"!==i||a_.some(a=>a.test(j||"")),s=(0,q.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{let a=await S.f.get("/api/tasks");n(a.tasks),p(Date.now())}catch{}},[]);if((0,q.useEffect)(()=>{if(r)return;let a=setTimeout(s,0),b=setInterval(s,k?2e3:15e3);return()=>{clearTimeout(a),clearInterval(b)}},[r,k,s]),r)return null;let t=m.filter(a=>"running"===a.status).length,u=m.some(a=>"running"!==a.status),w=async()=>{try{let a=await S.f.delete("/api/tasks");n(a.tasks)}catch{}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(A.f,{variant:"outline",size:"icon",className:"fixed bottom-20 right-4 z-40 h-11 w-11 rounded-full shadow-lg md:bottom-6 md:right-6 print:hidden",onClick:()=>l(!0),"aria-label":a.backgroundTasks.title,title:a.backgroundTasks.title,children:[t>0?(0,b.jsx)(v.f,{className:"h-5 w-5 animate-spin"}):(0,b.jsx)(aZ,{className:"h-5 w-5"}),t>0&&(0,b.jsx)("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground",children:t})]}),(0,b.jsx)(B.N,{open:k,onOpenChange:l,children:(0,b.jsxs)(B.d,{className:"max-h-[85vh] overflow-y-auto sm:max-w-lg",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsx)(B.F,{children:a.backgroundTasks.title}),(0,b.jsx)(B.C,{children:a.backgroundTasks.description})]}),0===m.length?(0,b.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a.backgroundTasks.empty}):(0,b.jsx)("ul",{className:"space-y-2",children:m.map(c=>{var d,e;let h;return(0,b.jsx)("li",{className:"rounded-md border p-3 text-sm",children:(0,b.jsxs)("div",{className:"flex items-start gap-2",children:["running"===c.status&&(0,b.jsx)(v.f,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin text-primary"}),"succeeded"===c.status&&(0,b.jsx)(an.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-green-600"}),"failed"===c.status&&(0,b.jsx)(a$.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,b.jsxs)("div",{className:"font-medium",children:[a.backgroundTasks.kinds[c.kind],(0,b.jsxs)("span",{className:"font-normal text-muted-foreground",children:[" · ",a.backgroundTasks.status[c.status]]})]}),c.subject&&(0,b.jsx)("div",{className:"break-words text-muted-foreground",children:c.subject}),c.progress&&c.progress.total>0&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"h-1.5 overflow-hidden rounded bg-muted",children:(0,b.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${Math.round(c.progress.done/c.progress.total*100)}%`}})}),(0,b.jsxs)("div",{className:"text-xs text-muted-foreground",children:[a.backgroundTasks.progress.replace("{done}",String(c.progress.done)).replace("{total}",String(c.progress.total)),c.progress.failed>0&&` \xb7 ${a.backgroundTasks.failedCount.replace("{count}",String(c.progress.failed))}`]})]}),c.error&&(0,b.jsx)("div",{className:"text-xs text-destructive",children:(b=>{if(!b)return null;let c=a.backgroundTasks.errors[b]??a.errors[b];return"string"==typeof c?c:b})(c.error)}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:a.backgroundTasks.startedAt.replace("{time}",(0,D.r)(c.startedAt,"HH:mm:ss",f))}),(0,b.jsx)("span",{children:a.backgroundTasks.elapsed.replace("{time}",(d=c.startedAt,e=c.finishedAt,h=Math.max(0,Math.round(((e?Date.parse(e):o)-Date.parse(d))/1e3)),`${Math.floor(h/60)}:${String(h%60).padStart(2,"0")}`))}),c.link&&(0,b.jsx)(g.default,{href:c.link,className:"text-primary hover:underline",onClick:()=>l(!1),children:a.backgroundTasks.view})]})]})]})},c.id)})}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-1",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a.backgroundTasks.retentionHint}),u&&(0,b.jsx)(A.f,{variant:"ghost",size:"sm",onClick:w,children:a.backgroundTasks.clearFinished})]})]})})]})}var a1=a.i(633508);let a2={success:{icon:an.f,className:"text-success"},error:{icon:a$.f,className:"text-destructive"},warning:{icon:r,className:"text-warning"},info:{icon:t,className:"text-primary"}};function a3(){let{t:a}=(0,c.b)(),[d,e]=(0,q.useState)([]),[f,g]=(0,q.useState)(null);return(0,q.useEffect)(()=>(0,T.M)(a=>{e(a.toasts),g(a.confirm)}),[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-3 z-[100] flex flex-col items-center gap-2 px-4 print:hidden",role:"status","aria-live":"polite",children:d.map(c=>{let{icon:d,className:e}=a2[c.type];return(0,b.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-sm items-start gap-3 rounded-xl border bg-card/95 px-4 py-3 text-sm shadow-lg backdrop-blur animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,b.jsx)(d,{className:(0,I.f)("mt-0.5 h-4 w-4 shrink-0",e)}),(0,b.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:c.message}),(0,b.jsx)("button",{type:"button",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",onClick:()=>(0,T.p)(c.id),"aria-label":a.common.close,children:(0,b.jsx)(a1.X,{className:"h-3.5 w-3.5"})})]},c.id)})}),(0,b.jsx)(B.N,{open:!!f,onOpenChange:a=>{a||f?.resolve(!1)},children:(0,b.jsxs)(B.d,{className:"sm:max-w-md",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsxs)(B.F,{className:"flex items-center gap-2",children:[f?.destructive&&(0,b.jsx)(r,{className:"h-5 w-5 text-destructive"}),f?.title||a.common.confirmTitle]}),(0,b.jsx)(B.C,{className:"whitespace-pre-line pt-1 text-left leading-relaxed",children:f?.message})]}),(0,b.jsxs)(B.c,{className:"gap-2",children:[(0,b.jsx)(A.f,{variant:"outline",onClick:()=>f?.resolve(!1),children:f?.cancelText||a.common.cancel}),(0,b.jsx)(A.f,{variant:f?.destructive?"destructive":"default",onClick:()=>f?.resolve(!0),autoFocus:!0,children:f?.confirmText||a.common.confirm})]})]})})]})}function a4(){return(0,q.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(a=>{U.f.warn("[PWA]","Service worker registration failed",{error:String(a)})})},[]),null}a.s(["Providers",0,function({children:a,timeZone:f}){return(0,b.jsx)(d.SessionProvider,{children:(0,b.jsx)(c.w,{children:(0,b.jsxs)(e.n,{initialTimeZone:f,children:[(0,b.jsx)(aY,{children:a}),(0,b.jsx)(a0,{}),(0,b.jsx)(a3,{}),(0,b.jsx)(a4,{})]})})})}],418175)}];
|
|
191
|
+
{{provider_hints}}`;var aJ=a.i(787654);function aK({name:a,description:c}){return(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-2 text-xs py-1",children:[(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded font-mono text-primary shrink-0 w-fit",children:`{{${a}}}`}),(0,b.jsx)("span",{className:"text-muted-foreground",children:c})]})}function aL(){let{t:a}=(0,c.b)();return(0,b.jsxs)("div",{className:"bg-amber-50 border border-amber-200 rounded-md p-3 flex items-start gap-3 text-amber-900 text-sm mb-4",children:[(0,b.jsx)(r,{className:"h-5 w-5 shrink-0 text-amber-600"}),(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("p",{className:"font-medium",children:a.settings?.prompts?.caution||"Modify with Caution"}),(0,b.jsx)("p",{className:"text-amber-800/90 text-xs",children:a.settings?.prompts?.warning||"Variables in {{brackets}} are used to inject dynamic content. Please preserve these variables, otherwise the AI providing may fail to get question context or return invalid formats."})]})]})}function aM({config:a,onUpdate:d}){let{t:e}=(0,c.b)(),f=a.prompts?.analyze||aH,g=a.prompts?.similar||aI,h=async a=>{await (0,T.u)(e.settings?.prompts?.resetConfirm||"Are you sure you want to reset to default?",{destructive:!0})&&d(a,"analyze"===a?aH:aI)},i=(a,b)=>{d(a,b)};return(0,b.jsx)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:(0,b.jsxs)(C.i,{defaultValue:"analyze",className:"w-full",children:[(0,b.jsxs)(C.U,{className:"grid w-full grid-cols-2",children:[(0,b.jsx)(C.k,{value:"analyze",children:e.settings?.prompts?.analysisTab||"Analysis Prompt"}),(0,b.jsx)(C.k,{value:"similar",children:e.settings?.prompts?.similarTab||"Similar Question Prompt"})]}),(0,b.jsx)(C.S,{value:"analyze",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)(H.f,{className:"text-base font-semibold",children:e.settings?.prompts?.customAnalysis||"Custom Analysis Template"}),(0,b.jsxs)(A.f,{variant:"outline",size:"sm",onClick:()=>h("analyze"),children:[(0,b.jsx)(aJ.f,{className:"w-4 h-4 mr-2"}),e.settings?.prompts?.reset||"Reset Default"]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,b.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,b.jsx)(t,{className:"h-3.5 w-3.5"}),e.settings?.prompts?.variables||"Available Variables"]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aK,{name:"language_instruction",description:e.settings?.prompts?.vars?.languageInstruction||"Injects instructions based on target language (e.g., keep English questions in English but analysis in Chinese)."}),(0,b.jsx)(aK,{name:"knowledge_points_list",description:e.settings?.prompts?.vars?.knowledgePointsList||"Injects the standard list of knowledge point tags for the specific subject."}),(0,b.jsx)(aK,{name:"provider_hints",description:e.settings?.prompts?.vars?.providerHints||"System-injected hints (e.g., enforcing JSON format)."})]})]}),(0,b.jsx)(aB.f,{value:f,onChange:a=>i("analyze",a.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:aH})]})}),(0,b.jsx)(C.S,{value:"similar",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"flex justify-between items-center",children:[(0,b.jsx)(H.f,{className:"text-base font-semibold",children:e.settings?.prompts?.customSimilar||"Custom Similar Question Template"}),(0,b.jsxs)(A.f,{variant:"outline",size:"sm",onClick:()=>h("similar"),children:[(0,b.jsx)(aJ.f,{className:"w-4 h-4 mr-2"}),e.settings?.prompts?.reset||"Reset Default"]})]}),(0,b.jsx)(aL,{}),(0,b.jsxs)("div",{className:"space-y-2 border rounded-md p-3 bg-background",children:[(0,b.jsxs)("h4",{className:"text-xs font-medium flex items-center gap-1.5 mb-2",children:[(0,b.jsx)(t,{className:"h-3.5 w-3.5"}),e.settings?.prompts?.variables||"Available Variables"]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(aK,{name:"difficulty_level",description:e.settings?.prompts?.vars?.difficultyLevel||"Target difficulty level."}),(0,b.jsx)(aK,{name:"difficulty_instruction",description:e.settings?.prompts?.vars?.difficultyInstruction||"Specific writing instructions for the target difficulty."}),(0,b.jsx)(aK,{name:"original_question",description:e.settings?.prompts?.vars?.originalQuestion||"The full text of the original question."}),(0,b.jsx)(aK,{name:"knowledge_points",description:e.settings?.prompts?.vars?.knowledgePoints||"List of knowledge points to test."}),(0,b.jsx)(aK,{name:"language_instruction",description:e.settings?.prompts?.vars?.languageInstructionShort||"Language formatting instructions."})]})]}),(0,b.jsx)(aB.f,{value:g,onChange:a=>i("similar",a.target.value),className:"font-mono text-xs min-h-[400px]",placeholder:aI})]})})]})})}var aN=a.i(325015),aO=a.i(676330),aP=a.i(206194),aQ=a.i(190622),aR=a.i(975484);let aS=["browser","minimax","qwen","glm","stepfun","volcengine","volcengine-agent","openai"];aS.filter(a=>"browser"!==a);let aT={minimax:{model:"speech-2.8-hd",voice:"male-qn-jingying"},qwen:{model:"qwen-audio-3.0-tts-plus",voice:"longanlufeng"},glm:{model:"glm-tts",voice:"xiaochen"},stepfun:{model:"stepaudio-2.5-tts",voice:"qingniandaxuesheng"},volcengine:{model:"seed-tts-2.0",voice:"zh_male_yangguangqingnian_uranus_bigtts"},"volcengine-agent":{model:"seed-tts-2.0",voice:"zh_male_yangguangqingnian_uranus_bigtts"},openai:{model:"gpt-4o-mini-tts",voice:"cedar"}},aU={minimax:{apiKey:"https://platform.minimax.cn/docs/guides/quickstart-preparation",model:"https://platform.minimax.cn/docs/api-reference/speech-t2a-http",voice:"https://platform.minimax.cn/docs/faq/system-voice-id",endpoint:"https://platform.minimax.cn/docs/api-reference/speech-t2a-http"},qwen:{apiKey:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",model:"https://help.aliyun.com/zh/model-studio/non-realtime-tts-user-guide",voice:"https://help.aliyun.com/zh/model-studio/qwen-audio-tts-voice-list",endpoint:"https://help.aliyun.com/zh/model-studio/non-realtime-tts-user-guide"},glm:{apiKey:"https://docs.bigmodel.cn/cn/guide/start/quick-start",model:"https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E6%96%87%E6%9C%AC%E8%BD%AC%E8%AF%AD%E9%9F%B3",voice:"https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E6%96%87%E6%9C%AC%E8%BD%AC%E8%AF%AD%E9%9F%B3",endpoint:"https://docs.bigmodel.cn/api-reference/%E6%A8%A1%E5%9E%8B-api/%E6%96%87%E6%9C%AC%E8%BD%AC%E8%AF%AD%E9%9F%B3"},stepfun:{apiKey:"https://platform.stepfun.com/docs/zh/step-plan/integrations/audio-api",model:"https://platform.stepfun.com/docs/zh/api-reference/audio/create-audio",voice:"https://platform.stepfun.com/docs/zh/guides/developer/tts",endpoint:"https://platform.stepfun.com/docs/zh/api-reference/audio/create-audio"},volcengine:{apiKey:"https://www.volcengine.com/docs/6561/196768",model:"https://www.volcengine.com/docs/6561/1598757",voice:"https://www.volcengine.com/docs/6561/1257544",endpoint:"https://www.volcengine.com/docs/6561/1598757"},openai:{apiKey:"https://platform.openai.com/docs/quickstart",model:"https://developers.openai.com/api/docs/guides/text-to-speech",voice:"https://developers.openai.com/api/docs/guides/text-to-speech",endpoint:"https://developers.openai.com/api/docs/guides/text-to-speech"},"volcengine-agent":{apiKey:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",model:"https://docs.volcengine.com/docs/ark/agent-plan-personal-voice-model?lang=zh",voice:"https://www.volcengine.com/docs/6561/1257544",endpoint:"https://docs.volcengine.com/docs/ark/agent-plan-personal-voice-model?lang=zh"}};function aV({config:a,setConfig:d,saving:e,onSave:f}){var g;let{t:h,language:i}=(0,c.b)(),j=h.settings.tts,[k,l]=(0,q.useState)(!1),[m,n]=(0,q.useState)(null),o=a.tts?.mode??"browser",p="browser"!==o&&"string"==typeof(g=o)&&aS.includes(g)?o:null,r=p?a.tts?.[p]:void 0,s=(a,b)=>{p&&d(c=>({...c,tts:{...c.tts,[p]:{...c.tts?.[p],[a]:b}}}))},t=!!p&&("volcengine"===p||"openai"===p),u=p?function(a,b){if("openai"===b){let b=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return b?{apiKey:b.apiKey,baseUrl:b.baseUrl}:void 0}return a[b]}(a,p):void 0,w=t?r?.apiKey:u?.apiKey,x=async()=>{(0,aR.p)(),l(!0),n(null);try{await f();let{id:a,version:b}=await S.f.post("/api/tts",{text:j.previewText,language:i},{timeout:12e4,recoverable:!0}),c=(0,aR.l)();if(!c)return;c.src=`/api/tts/${a}?v=${b}`,c.playbackRate=1,await c.play()}catch(b){U.f.error("[TtsSettings]","Preview failed",{error:b});let a=(0,V.d)(b);T.c.error("TTS_NOT_CONFIGURED"===a?j.notConfigured:"TTS_PROVIDER_ERROR"===a?j.providerError:j.previewFailed),n((0,V.L)(b)??null)}finally{l(!1)}};return(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{children:j.title}),(0,b.jsxs)(af.d,{value:o,onValueChange:a=>d(b=>({...b,tts:{...b.tts,mode:a}})),children:[(0,b.jsx)(af.P,{children:(0,b.jsx)(af.U,{})}),(0,b.jsx)(af.r,{children:aS.map(a=>(0,b.jsx)(af.T,{value:a,children:j.modes[a]},a))})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:p?j.cloudHint:j.browserHint})]}),p&&(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(aO.f,{label:"openai"===p?"OpenAI API Key":t?j.speechApiKey:`${(0,aQ.z)(p,i)} API Key`,href:aU[p].apiKey,linkText:h.settings.ai.docLinks.apiKey}),(0,b.jsx)(ae.f,{value:w||"",onChange:a=>{var b;return b=a.target.value,void(p&&(t?s("apiKey",b):d(a=>({...a,[p]:{...a[p],apiKey:b}}))))},placeholder:"qwen"===p?"sk-sp-...":t?"":"sk-..."}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j.apiKeyHint[p]})]}),(0,b.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(aO.f,{label:j.model,href:aU[p].model,linkText:j.docs}),(0,b.jsx)(G.f,{value:r?.model||"",onChange:a=>s("model",a.target.value),placeholder:aT[p].model})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(aO.f,{label:j.voice,href:aU[p].voice,linkText:j.voiceList}),(0,b.jsx)(G.f,{value:r?.voice||"",onChange:a=>s("voice",a.target.value),placeholder:aT[p].voice})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j.voiceHint[p]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(aO.f,{label:j.endpoint,href:aU[p].endpoint,linkText:j.docs}),(0,b.jsx)(G.f,{value:r?.endpoint||"",onChange:a=>s("endpoint",a.target.value),placeholder:function(a,b){if("volcengine"===a)return"https://openspeech.bytedance.com/api/v3/tts/unidirectional";if("volcengine-agent"===a)return"https://openspeech.bytedance.com/api/v3/plan/tts/unidirectional";if("openai"===a)return`${(b?.baseUrl||"https://api.openai.com/v1").replace(/\/+$/,"")}/audio/speech`;let{baseUrl:c}=(0,aQ.k)(a,b);if("minimax"===a)return`${c.replace(/\/+$/,"")}/t2a_v2`;if("glm"===a||"stepfun"===a)return`${c.replace(/\/+$/,"")}/audio/speech`;try{return`${new URL(c).origin}/api/v1/services/audio/tts/SpeechSynthesizer`}catch{return""}}(p,u)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j.endpointHint})]})]},p),(0,b.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[p&&(0,b.jsxs)(A.f,{variant:"outline",onClick:x,disabled:e||k,className:"sm:w-auto",children:[k?(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(aN.f,{className:"mr-2 h-4 w-4"}),j.preview]}),(0,b.jsxs)(A.f,{onClick:()=>void f(),disabled:e||k,className:"flex-1",children:[e&&(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}),j.save]})]}),p&&m&&(0,b.jsx)("div",{className:"rounded-md border border-red-200 bg-red-50 p-2 dark:border-red-900 dark:bg-red-950/40",children:(0,b.jsx)(aP.f,{detail:m})})]})}var aW=a.i(439830);function aX({value:a,icon:c,label:d}){return(0,b.jsxs)(C.k,{value:a,className:"px-2 sm:px-3",children:[c,(0,b.jsx)("span",{className:"hidden sm:inline",children:d})]})}function aY(){let{setTimeZone:a}=(0,e.M)(),{data:f}=(0,d.useSession)(),g=f?.user?.role==="admin",{t:j}=(0,c.b)(),k=(0,h.useRouter)(),[l,m]=(0,q.useState)(!1),n=(0,q.useRef)(null),[o,E]=(0,q.useState)(!1),[F,G]=(0,q.useState)(!1),[H,I]=(0,q.useState)({aiProvider:"minimax"}),J=(0,q.useCallback)(async()=>{G(!0);try{I(await S.f.get("/api/settings"))}catch(a){U.f.error("[SettingsDialog]","Failed to fetch settings",{error:a})}finally{G(!1)}},[]);(0,q.useEffect)(()=>{l&&J()},[l,J]);let K=async()=>{let b=(0,aW.f)(H,j);if(b)return void T.c.error(b);E(!0);try{let b=await S.f.post("/api/settings",H);I(b),a(b.timeZone||D.J),T.c.success(j.settings?.messages?.saved||"Settings saved"),n.current?.scrollTo({top:0,behavior:"smooth"})}catch(a){U.f.error("[SettingsDialog]","Failed to save settings",{error:a}),T.c.error(j.settings?.messages?.saveFailed||"Failed to save")}finally{E(!1)}},L=a=>(0,b.jsxs)(A.f,{onClick:K,disabled:o,className:"w-full",children:[o&&(0,b.jsx)(v.f,{className:"mr-2 h-4 w-4 animate-spin"}),a]});return(0,b.jsxs)(B.N,{open:l,onOpenChange:m,children:[(0,b.jsx)(B.a,{asChild:!0,children:(0,b.jsxs)(A.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,b.jsx)(x,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"sr-only",children:j.settings?.title||"Settings"})]})}),(0,b.jsxs)(B.d,{ref:n,className:"w-[calc(100vw-2rem)] sm:max-w-[900px] max-h-[85vh] overflow-y-auto",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsx)(B.F,{children:j.settings?.title||"Settings"}),(0,b.jsx)(B.C,{children:j.settings?.desc||"Manage your preferences and data."})]}),(0,b.jsxs)(C.i,{defaultValue:"general",className:"w-full",children:[(0,b.jsxs)(C.U,{className:`grid w-full grid-cols-4 ${g?"sm:grid-cols-7":"sm:grid-cols-4"} gap-1 h-auto`,children:[(0,b.jsx)(aX,{value:"general",icon:(0,b.jsx)(u.f,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.general||"General"}),(0,b.jsx)(aX,{value:"account",icon:(0,b.jsx)(y.f,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.account||"Account"}),g&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(aX,{value:"ai",icon:(0,b.jsx)(s,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.ai||"AI Provider"}),(0,b.jsx)(aX,{value:"prompts",icon:(0,b.jsx)(w,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.prompts||"Prompts"}),(0,b.jsx)(aX,{value:"admin",icon:(0,b.jsx)(p,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.admin||"User Management"})]}),(0,b.jsx)(aX,{value:"danger",icon:(0,b.jsx)(r,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.danger||"Danger"}),(0,b.jsx)(aX,{value:"about",icon:(0,b.jsx)(t,{className:"h-4 w-4 sm:mr-2"}),label:j.settings?.tabs?.about||"About"})]}),(0,b.jsxs)(C.S,{value:"general",className:"space-y-4 py-4",children:[(0,b.jsx)(aA,{config:H,setConfig:I,isAdmin:g,disabled:F||o}),g&&L(j.settings?.save||"Save Settings")]}),(0,b.jsx)(C.S,{value:"account",className:"space-y-4 py-4",children:(0,b.jsx)(ah,{})}),(0,b.jsxs)(C.S,{value:"ai",className:"space-y-4 py-4",children:[(0,b.jsx)(ai.f,{config:H,setConfig:I,loading:F,saving:o,onSave:K}),!F&&(0,b.jsx)(aV,{config:H,setConfig:I,saving:o,onSave:K})]}),(0,b.jsxs)(C.S,{value:"prompts",className:"space-y-4 py-4",children:[(0,b.jsx)(aM,{config:H,onUpdate:(a,b)=>I(c=>({...c,prompts:{...c.prompts,[a]:b}}))}),L(j.settings?.prompts?.save||"Save Prompt Settings")]}),g&&(0,b.jsxs)(C.S,{value:"admin",className:"space-y-4 py-4",children:[(0,b.jsxs)(A.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{m(!1),k.push("/admin")},children:[(0,b.jsx)(i.f,{className:"h-4 w-4"}),j.admin?.dashboard?.title||"Admin Dashboard"]}),(0,b.jsxs)(A.f,{variant:"outline",className:"w-full justify-start gap-2",onClick:()=>{m(!1),k.push("/setup")},children:[(0,b.jsx)(z.f,{className:"h-4 w-4"}),j.setup.rerun]}),(0,b.jsx)("div",{className:"border-t pt-4",children:(0,b.jsx)(W,{})})]}),(0,b.jsx)(C.S,{value:"danger",className:"space-y-4 py-4",children:(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(ar,{isAdmin:g}),(0,b.jsx)(am,{isAdmin:g})]})}),(0,b.jsx)(C.S,{value:"about",className:"space-y-4 py-4",children:(0,b.jsx)(ad,{})})]})]})]})}let aZ=[/^\/login/,/^\/register/,/^\/setup/,/^\/print-preview/,/^\/exams\/[^/]+\/print/],a$=[{key:"home",href:"/",icon:o,match:a=>"/"===a},{key:"notebooks",href:"/notebooks",icon:j.f,match:a=>a.startsWith("/notebooks")||a.startsWith("/error-items")||a.startsWith("/practice")},{key:"review",href:"/review",icon:k.f,match:a=>a.startsWith("/review")},{key:"stats",href:"/stats",icon:i.f,match:a=>a.startsWith("/stats")||a.startsWith("/tags")},{key:"exams",href:"/exams",icon:l.f,match:a=>a.startsWith("/exams")}];function a_({children:a}){var e;let i,j,k=(0,h.usePathname)()||"/",{t:l}=(0,c.b)(),{data:n,status:o}=(0,d.useSession)(),r=n?.user?.role==="admin",s=aZ.some(a=>a.test(k));if(e=r&&!s,i=(0,h.useRouter)(),j=(0,q.useRef)(!1),(0,q.useEffect)(()=>{e&&!j.current&&(j.current=!0,S.f.get("/api/setup").then(a=>{a.needsSetup&&i.replace("/setup")}).catch(a=>U.f.warn("[Setup]","Failed to check setup status",{error:a})))},[e,i]),s||"unauthenticated"===o)return(0,b.jsx)(b.Fragment,{children:a});let t=n?.user?.name||n?.user?.email||"";return(0,b.jsxs)("div",{className:"min-h-screen",children:[(0,b.jsx)("header",{className:"sticky top-0 z-40 border-b bg-card/80 backdrop-blur-md supports-[backdrop-filter]:bg-card/70 print:hidden",children:(0,b.jsxs)("div",{className:"mx-auto flex h-14 max-w-6xl items-center gap-3 px-4 md:h-16 md:px-8",children:[(0,b.jsxs)(g.default,{href:"/",className:"flex shrink-0 items-center gap-2",children:[(0,b.jsx)(f.default,{src:"/icons/icon.png",alt:"",width:32,height:32,className:"rounded-lg",priority:!0,unoptimized:!0}),(0,b.jsx)("span",{className:"text-base font-semibold tracking-tight",children:l.pageTitle.base})]}),(0,b.jsx)("nav",{className:"ml-4 hidden items-center gap-1 md:flex",children:a$.map(a=>{let c=a.match(k),d=a.icon;return(0,b.jsxs)(g.default,{href:a.href,className:(0,I.f)("flex items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium transition-colors",c?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),"aria-current":c?"page":void 0,children:[(0,b.jsx)(d,{className:"h-4 w-4"}),l.nav[a.key]]},a.key)})}),(0,b.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[t&&(0,b.jsxs)("span",{className:"mr-2 hidden max-w-40 items-center gap-2 truncate text-sm text-muted-foreground lg:flex",children:[(0,b.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary/10 text-xs font-semibold text-primary",children:t.slice(0,1).toUpperCase()}),(0,b.jsx)("span",{className:"truncate",children:t})]}),r&&(0,b.jsx)(g.default,{href:"/admin",title:l.nav.admin,children:(0,b.jsxs)(A.f,{variant:"ghost",size:"icon",className:"rounded-full",children:[(0,b.jsx)(p,{className:"h-5 w-5"}),(0,b.jsx)("span",{className:"sr-only",children:l.nav.admin})]})}),(0,b.jsx)(aY,{}),(0,b.jsx)(A.f,{variant:"ghost",size:"icon",className:"rounded-full text-muted-foreground hover:text-destructive",onClick:()=>(0,d.signOut)({callbackUrl:"/login"}),title:l.app.logout,children:(0,b.jsx)(m.f,{className:"h-5 w-5"})})]})]})}),(0,b.jsx)("div",{className:"pb-20 md:pb-0",children:a}),(0,b.jsx)("nav",{className:"pb-safe fixed inset-x-0 bottom-0 z-40 border-t bg-card/90 backdrop-blur-md md:hidden print:hidden",children:(0,b.jsx)("div",{className:"grid h-16 grid-cols-5",children:a$.map(a=>{let c=a.match(k),d=a.icon;return(0,b.jsxs)(g.default,{href:a.href,className:(0,I.f)("flex flex-col items-center justify-center gap-1 text-[11px] font-medium transition-colors",c?"text-primary":"text-muted-foreground"),"aria-current":c?"page":void 0,children:[(0,b.jsx)("span",{className:(0,I.f)("flex h-7 w-12 items-center justify-center rounded-full transition-colors",c&&"bg-accent"),children:(0,b.jsx)(d,{className:"h-5 w-5"})}),l.nav[a.key]]},a.key)})})})]})}let a0=(0,n.f)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var a1=a.i(862722);let a2=[/^\/login/,/^\/register/,/^\/print-preview/,/^\/exams\/[^/]+\/print/];function a3(){let{t:a}=(0,c.b)(),{timeZone:f}=(0,e.M)(),{status:i}=(0,d.useSession)(),j=(0,h.usePathname)(),[k,l]=(0,q.useState)(!1),[m,n]=(0,q.useState)([]),[o,p]=(0,q.useState)(()=>Date.now()),r="authenticated"!==i||a2.some(a=>a.test(j||"")),s=(0,q.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{let a=await S.f.get("/api/tasks");n(a.tasks),p(Date.now())}catch{}},[]);if((0,q.useEffect)(()=>{if(r)return;let a=setTimeout(s,0),b=setInterval(s,k?2e3:15e3);return()=>{clearTimeout(a),clearInterval(b)}},[r,k,s]),r)return null;let t=m.filter(a=>"running"===a.status).length,u=m.some(a=>"running"!==a.status),w=async()=>{try{let a=await S.f.delete("/api/tasks");n(a.tasks)}catch{}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(A.f,{variant:"outline",size:"icon",className:"fixed bottom-20 right-4 z-40 h-11 w-11 rounded-full shadow-lg md:bottom-6 md:right-6 print:hidden",onClick:()=>l(!0),"aria-label":a.backgroundTasks.title,title:a.backgroundTasks.title,children:[t>0?(0,b.jsx)(v.f,{className:"h-5 w-5 animate-spin"}):(0,b.jsx)(a0,{className:"h-5 w-5"}),t>0&&(0,b.jsx)("span",{className:"absolute -right-1 -top-1 flex h-5 min-w-5 items-center justify-center rounded-full bg-primary px-1 text-xs text-primary-foreground",children:t})]}),(0,b.jsx)(B.N,{open:k,onOpenChange:l,children:(0,b.jsxs)(B.d,{className:"max-h-[85vh] overflow-y-auto sm:max-w-lg",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsx)(B.F,{children:a.backgroundTasks.title}),(0,b.jsx)(B.C,{children:a.backgroundTasks.description})]}),0===m.length?(0,b.jsx)("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a.backgroundTasks.empty}):(0,b.jsx)("ul",{className:"space-y-2",children:m.map(c=>{var d,e;let h;return(0,b.jsx)("li",{className:"rounded-md border p-3 text-sm",children:(0,b.jsxs)("div",{className:"flex items-start gap-2",children:["running"===c.status&&(0,b.jsx)(v.f,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin text-primary"}),"succeeded"===c.status&&(0,b.jsx)(an.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-green-600"}),"failed"===c.status&&(0,b.jsx)(a1.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,b.jsxs)("div",{className:"font-medium",children:[a.backgroundTasks.kinds[c.kind],(0,b.jsxs)("span",{className:"font-normal text-muted-foreground",children:[" · ",a.backgroundTasks.status[c.status]]})]}),c.subject&&(0,b.jsx)("div",{className:"break-words text-muted-foreground",children:c.subject}),c.progress&&c.progress.total>0&&(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)("div",{className:"h-1.5 overflow-hidden rounded bg-muted",children:(0,b.jsx)("div",{className:"h-full bg-primary transition-all",style:{width:`${Math.round(c.progress.done/c.progress.total*100)}%`}})}),(0,b.jsxs)("div",{className:"text-xs text-muted-foreground",children:[a.backgroundTasks.progress.replace("{done}",String(c.progress.done)).replace("{total}",String(c.progress.total)),c.progress.failed>0&&` \xb7 ${a.backgroundTasks.failedCount.replace("{count}",String(c.progress.failed))}`]})]}),c.error&&(0,b.jsx)("div",{className:"text-xs text-destructive",children:(b=>{if(!b)return null;let c=a.backgroundTasks.errors[b]??a.errors[b];return"string"==typeof c?c:b})(c.error)}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:a.backgroundTasks.startedAt.replace("{time}",(0,D.r)(c.startedAt,"HH:mm:ss",f))}),(0,b.jsx)("span",{children:a.backgroundTasks.elapsed.replace("{time}",(d=c.startedAt,e=c.finishedAt,h=Math.max(0,Math.round(((e?Date.parse(e):o)-Date.parse(d))/1e3)),`${Math.floor(h/60)}:${String(h%60).padStart(2,"0")}`))}),c.link&&(0,b.jsx)(g.default,{href:c.link,className:"text-primary hover:underline",onClick:()=>l(!1),children:a.backgroundTasks.view})]})]})]})},c.id)})}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-1",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:a.backgroundTasks.retentionHint}),u&&(0,b.jsx)(A.f,{variant:"ghost",size:"sm",onClick:w,children:a.backgroundTasks.clearFinished})]})]})})]})}var a4=a.i(633508);let a5={success:{icon:an.f,className:"text-success"},error:{icon:a1.f,className:"text-destructive"},warning:{icon:r,className:"text-warning"},info:{icon:t,className:"text-primary"}};function a6(){let{t:a}=(0,c.b)(),[d,e]=(0,q.useState)([]),[f,g]=(0,q.useState)(null);return(0,q.useEffect)(()=>(0,T.M)(a=>{e(a.toasts),g(a.confirm)}),[]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-3 z-[100] flex flex-col items-center gap-2 px-4 print:hidden",role:"status","aria-live":"polite",children:d.map(c=>{let{icon:d,className:e}=a5[c.type];return(0,b.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-sm items-start gap-3 rounded-xl border bg-card/95 px-4 py-3 text-sm shadow-lg backdrop-blur animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,b.jsx)(d,{className:(0,I.f)("mt-0.5 h-4 w-4 shrink-0",e)}),(0,b.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:c.message}),(0,b.jsx)("button",{type:"button",className:"shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground",onClick:()=>(0,T.p)(c.id),"aria-label":a.common.close,children:(0,b.jsx)(a4.X,{className:"h-3.5 w-3.5"})})]},c.id)})}),(0,b.jsx)(B.N,{open:!!f,onOpenChange:a=>{a||f?.resolve(!1)},children:(0,b.jsxs)(B.d,{className:"sm:max-w-md",children:[(0,b.jsxs)(B.s,{children:[(0,b.jsxs)(B.F,{className:"flex items-center gap-2",children:[f?.destructive&&(0,b.jsx)(r,{className:"h-5 w-5 text-destructive"}),f?.title||a.common.confirmTitle]}),(0,b.jsx)(B.C,{className:"whitespace-pre-line pt-1 text-left leading-relaxed",children:f?.message})]}),(0,b.jsxs)(B.c,{className:"gap-2",children:[(0,b.jsx)(A.f,{variant:"outline",onClick:()=>f?.resolve(!1),children:f?.cancelText||a.common.cancel}),(0,b.jsx)(A.f,{variant:f?.destructive?"destructive":"default",onClick:()=>f?.resolve(!0),autoFocus:!0,children:f?.confirmText||a.common.confirm})]})]})})]})}function a7(){return(0,q.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js",{scope:"/"}).catch(a=>{U.f.warn("[PWA]","Service worker registration failed",{error:String(a)})})},[]),null}a.s(["Providers",0,function({children:a,timeZone:f}){return(0,b.jsx)(d.SessionProvider,{children:(0,b.jsx)(c.w,{children:(0,b.jsxs)(e.n,{initialTimeZone:f,children:[(0,b.jsx)(a_,{children:a}),(0,b.jsx)(a3,{}),(0,b.jsx)(a6,{}),(0,b.jsx)(a7,{})]})})})}],418175)}];
|
|
192
192
|
|
|
193
193
|
//# sourceMappingURL=src_components_providers_tsx_09kw-mv3nb6xs._.js.map
|
|
@@ -7,9 +7,9 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
7
7
|
"static/chunks/0cz1d0mv5g_q7.js"
|
|
8
8
|
],
|
|
9
9
|
"lowPriorityFiles": [
|
|
10
|
-
"static/
|
|
11
|
-
"static/
|
|
12
|
-
"static/
|
|
10
|
+
"static/X3NzguYsDSEVWQKJ6r_e7/_buildManifest.js",
|
|
11
|
+
"static/X3NzguYsDSEVWQKJ6r_e7/_ssgManifest.js",
|
|
12
|
+
"static/X3NzguYsDSEVWQKJ6r_e7/_clientMiddlewareManifest.js"
|
|
13
13
|
],
|
|
14
14
|
"rootMainFiles": [
|
|
15
15
|
"static/chunks/263d57goy87o4.js",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"wasm": [],
|
|
22
22
|
"assets": [],
|
|
23
23
|
"env": {
|
|
24
|
-
"__NEXT_BUILD_ID": "
|
|
25
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
26
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
27
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
28
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
24
|
+
"__NEXT_BUILD_ID": "X3NzguYsDSEVWQKJ6r_e7",
|
|
25
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "GIVb0DZH0z6CTK9uPuUflaojB+hU0Bb2NFPXNMXGPG0=",
|
|
26
|
+
"__NEXT_PREVIEW_MODE_ID": "613a8f48cb0162659e342a8315712c28",
|
|
27
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "dc8dc934a99342c568fa6182fe5f9fc0eb63c6272e6a63aae6ba1e319a238070",
|
|
28
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "9a355d577776377848dd2c95b7cfac33c1e079735db5efdad83d7368677789ea"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/263d57goy87o4.js"/><script src="/_next/static/chunks/242x7dx0zu3hf.js" async=""></script><script src="/_next/static/chunks/0ykhi6pk49so-.js" async=""></script><script src="/_next/static/chunks/1fkaya2t7r343.js" async=""></script><script src="/_next/static/chunks/turbopack-2c3mg3r-05n1w.js" async=""></script><script src="/_next/static/chunks/0a-rekt06v0sv.js" async=""></script><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?favicon.2vob68tjqpejf.ico" sizes="256x256" type="image/x-icon"/><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/263d57goy87o4.js","static/chunks/242x7dx0zu3hf.js","static/chunks/0ykhi6pk49so-.js","static/chunks/1fkaya2t7r343.js"],"runtimeModuleIds":[494553]});</script><script src="/_next/static/chunks/263d57goy87o4.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/0a-rekt06v0sv.js\"\n3:I[339756,[\"$2\"],\"default\"]\n4:I[837457,[\"$2\"],\"default\"]\n7:I[897367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[897367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[897367,[\"$2\"],\"$d\"]\n10:I[168027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/263d57goy87o4.js"/><script src="/_next/static/chunks/242x7dx0zu3hf.js" async=""></script><script src="/_next/static/chunks/0ykhi6pk49so-.js" async=""></script><script src="/_next/static/chunks/1fkaya2t7r343.js" async=""></script><script src="/_next/static/chunks/turbopack-2c3mg3r-05n1w.js" async=""></script><script src="/_next/static/chunks/0a-rekt06v0sv.js" async=""></script><link rel="manifest" href="/manifest.webmanifest"/><link rel="icon" href="/favicon.ico?favicon.2vob68tjqpejf.ico" sizes="256x256" type="image/x-icon"/><meta name="next-size-adjust" content=""/><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script id="_R_">(globalThis["TURBOPACK"] || (globalThis["TURBOPACK"] = [])).push({"otherChunks":["static/chunks/263d57goy87o4.js","static/chunks/242x7dx0zu3hf.js","static/chunks/0ykhi6pk49so-.js","static/chunks/1fkaya2t7r343.js"],"runtimeModuleIds":[494553]});</script><script src="/_next/static/chunks/263d57goy87o4.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:\"/_next/static/chunks/0a-rekt06v0sv.js\"\n3:I[339756,[\"$2\"],\"default\"]\n4:I[837457,[\"$2\"],\"default\"]\n7:I[897367,[\"$2\"],\"OutletBoundary\"]\n8:\"$Sreact.suspense\"\na:\"ViewportBoundary\"\nb:I[897367,[\"$2\"],\"$a\"]\nd:\"MetadataBoundary\"\ne:I[897367,[\"$2\"],\"$d\"]\n10:I[168027,[\"$2\"],\"default\",1]\n5:X\n6:[[\"children\",{\"s\":\"__PAGE__\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L7\",null,{\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@9\"}]}]]}],\"p\":false,\"v\":null}}]]\n0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"t\":{\"t\":{\"s\":\"\",\"h\":528,\"d\":{\"r\":[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],\"p\":false,\"v\":\"$5\"},\"c\":\"$Q6\"},\"h\":{\"r\":[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$Lc\"}],[\"$\",\"$Le\",null,{\"children\":[[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$8\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}],null]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],\"p\":false,\"v\":null}},\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"r\":\"$undefined\",\"s\":\"$undefined\",\"a\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"X3NzguYsDSEVWQKJ6r_e7\"}\n5:C\nc:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n11:I[27201,[\"$2\"],\"IconMark\"]\n9:null\nf:[[\"$\",\"link\",\"0\",{\"rel\":\"manifest\",\"href\":\"/manifest.webmanifest\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.2vob68tjqpejf.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L11\",\"2\",{}]]\n"])</script></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"previewModeId": "
|
|
3
|
-
"previewModeSigningKey": "
|
|
4
|
-
"previewModeEncryptionKey": "
|
|
2
|
+
"previewModeId": "613a8f48cb0162659e342a8315712c28",
|
|
3
|
+
"previewModeSigningKey": "9a355d577776377848dd2c95b7cfac33c1e079735db5efdad83d7368677789ea",
|
|
4
|
+
"previewModeEncryptionKey": "dc8dc934a99342c568fa6182fe5f9fc0eb63c6272e6a63aae6ba1e319a238070"
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"
|
|
1
|
+
self.__RSC_SERVER_MANIFEST="{\n \"node\": {},\n \"edge\": {},\n \"encryptionKey\": \"GIVb0DZH0z6CTK9uPuUflaojB+hU0Bb2NFPXNMXGPG0=\"\n}"
|
|
@@ -0,0 +1,2 @@
|
|
|
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),u=e.i(30207),l=e.i(369340),c=e.i(586318),f=e.i(934620),d=Object.defineProperty,p=(e,t)=>d(e,"name",{value:t,configurable:!0}),h=!1;function v(){let[e,r]=t.useState(h);return t.useEffect(()=>{h||(h=!0,r(!0))},[]),e}p(v,"useIsHydrated");var y=t[" useSyncExternalStore ".trim().toString()];function g(){return()=>{}}function m(){return y(g,()=>!0,()=>!1)}p(g,"subscribe"),p(m,"useIsHydratedModern");var b="function"==typeof y?m:v,x=e.i(843476),w=Object.defineProperty,k=(e,t)=>w(e,"name",{value:t,configurable:!0}),M="rovingFocusGroup.onEntryFocus",j={bubbles:!1,cancelable:!0},S="RovingFocusGroup",[T,F,C]=(0,n.f)(S),[E,P]=(0,a.f)(S,[C]),[R,I]=E(S),A=t.forwardRef(k(function(e,t){return(0,x.jsx)(T.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(T.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,x.jsx)(N,{...e,ref:t})})})},"RovingFocusGroup")),N=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:a,orientation:i,loop:f=!1,dir:d,currentTabStopId:p,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:v,onEntryFocus:y,preventScrollOnEntryFocus:g=!1,...m}=e,b=t.useRef(null),w=(0,o.f)(n,b),k=(0,c.f)(d),[T,C]=(0,l.f)({prop:p,defaultProp:h??null,onChange:v,caller:S}),[E,P]=t.useState(!1),I=(0,u.f)(y),A=F(a),N=t.useRef(!1),[L,U]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(M,I),()=>e.removeEventListener(M,I)},[I]),(0,x.jsx)(R,{scope:a,orientation:i,dir:k,loop:f,currentTabStopId:T,onItemFocus:t.useCallback(e=>C(e),[C]),onItemShiftTab:t.useCallback(()=>P(!0),[]),onFocusableItemAdd:t.useCallback(()=>U(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>U(e=>e-1),[]),children:(0,x.jsx)(s.V.div,{tabIndex:E||0===L?-1:0,"data-orientation":i,...m,ref:w,style:{outline:"none",...e.style},onMouseDown:(0,r.f)(e.onMouseDown,()=>{N.current=!0}),onFocus:(0,r.f)(e.onFocus,e=>{let t=!N.current;if(e.target===e.currentTarget&&t&&!E){let t=new CustomEvent(M,j);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=A().filter(e=>e.focusable);O([e.find(e=>e.active),e.find(e=>e.id===T),...e].filter(Boolean).map(e=>e.ref.current),g)}}N.current=!1}),onBlur:(0,r.f)(e.onBlur,()=>P(!1))})})},"RovingFocusGroupImpl")),L=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:o,focusable:a=!0,active:u=!1,tabStopId:l,children:c,...d}=e,p=(0,i.f)(),h=l||p,v=I("RovingFocusGroupItem",o),y=v.currentTabStopId===h,g=F(o),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:k}=v,M=b();return(0,f.f)(()=>{if(M&&a)return m(),()=>w()},[M,a,m,w]),t.useEffect(()=>{if(!M&&a)return m(),()=>w()},[M,a,m,w]),(0,x.jsx)(T.ItemSlot,{scope:o,id:h,focusable:a,active:u,children:(0,x.jsx)(s.V.span,{tabIndex:y?0:-1,"data-orientation":v.orientation,...d,ref:n,onMouseDown:(0,r.f)(e.onMouseDown,e=>{a?v.onItemFocus(h):e.preventDefault()}),onFocus:(0,r.f)(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:(0,r.f)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=_(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=g().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=v.loop?$(r,n+1):r.slice(n+1)}setTimeout(()=>O(r))}}),children:"function"==typeof c?c({isCurrentTabStop:y,hasTabStop:null!=k}):c})})},"RovingFocusGroupItem")),U={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function _(e,t,r){let n=D(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return U[n]}function O(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function $(e,t){return e.map((r,n)=>e[(t+n)%e.length])}k(D,"getDirectionAwareKey"),k(_,"getFocusIntent"),k(O,"focusFirst"),k($,"wrapArray"),e.s(["M",0,L,"F",0,A,"B",0,P],842727)},217923,e=>{let t=(0,e.i(475254).f)("chart-column",[["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"}]]);e.s(["f",0,t],217923)},664659,655900,e=>{var t=e.i(475254);let r=(0,t.f)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["f",0,r],664659);let n=(0,t.f)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["f",0,n],655900)},269638,e=>{let t=(0,e.i(475254).f)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["f",0,t],269638)},373884,e=>{let t=(0,e.i(475254).f)("circle-x",[["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"}]]);e.s(["f",0,t],373884)},440160,e=>{let t=(0,e.i(475254).f)("download",[["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"}]]);e.s(["f",0,t],440160)},178583,733060,e=>{let t=(0,e.i(475254).f)("file-text",[["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"}]]);e.s(["f",0,t],178583);var r=e.i(908821);e.s(["f",()=>r.f],733060)},763639,e=>{let t=(0,e.i(475254).f)("languages",[["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"}]]);e.s(["f",0,t],763639)},431343,79058,e=>{let t=(0,e.i(475254).f)("play",[["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"}]]);e.s(["f",0,t],431343);var r=e.i(41931);let n=null,o=null,a=!1;function i(){return"u"<typeof Audio?null:o??=new Audio}let s=new Map,u=(e,t)=>`${t}
|
|
2
|
+
${e}`;function l(e,t,n,o){return r.f.post("/api/tts/batch",{texts:e,language:t,...n?{regenerate:n}:{},...o?{errorItemId:o}:{}},{timeout:6e5,recoverable:!0}).then(({items:e})=>e.map(({id:e,version:t})=>`/api/tts/${e}?v=${t}`))}async function c(e,t,r){let n=await l(e,t,!0,r);e.forEach((e,r)=>s.set(u(e,t),Promise.resolve(n[r])))}e.s(["l",0,i,"v",0,function(){return n??=r.f.get("/api/tts").then(e=>"cloud"===e.mode?"cloud":"browser").catch(()=>"browser")},"h",0,function(){return a},"z",0,function(e,t){return r.f.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=>!s.has(u(e,t)));if(!n.length)return Promise.resolve();let o=l(n,t,!1,r);return n.forEach((e,r)=>{let n=u(e,t),a=o.then(e=>e[r]);a.catch(()=>s.delete(n)),s.set(n,a)}),o.then(()=>void 0)},"H",0,c,"U",0,function(e,t){let n=u(e,t),o=s.get(n);!o&&((o=r.f.post("/api/tts",{text:e,language:t},{timeout:12e4,recoverable:!0}).then(({id:e,version:t})=>`/api/tts/${e}?v=${t}`)).catch(()=>s.delete(n)),s.set(n,o));return o},"p",0,function(){let e=i();if(e&&!a){let t,r,n;a=!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(()=>{a=!1})}}],79058)},107233,e=>{let t=(0,e.i(475254).f)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["f",0,t],107233)},16715,e=>{let t=(0,e.i(475254).f)("refresh-cw",[["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"}]]);e.s(["f",0,t],16715)},367240,e=>{let t=(0,e.i(475254).f)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["f",0,t],367240)},727612,e=>{let t=(0,e.i(475254).f)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["f",0,t],727612)},284614,e=>{let t=(0,e.i(475254).f)("user",[["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"}]]);e.s(["f",0,t],284614)},908821,e=>{let t=(0,e.i(475254).f)("wand-sparkles",[["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"}]]);e.s(["f",0,t])},522016,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},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)),u=e.r(195057),l=e.r(8372),c=e.r(818581),f=e.r(718967),d=e.r(405550),p=e.r(388540),h=e.r(91949),v=e.r(573668),y=e.r(509396);function g(t){var r;let n,o,a,[g,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:w,as:k,children:M,prefetch:j=null,passHref:S,replace:T,shallow:F,scroll:C,onClick:E,onMouseEnter:P,onTouchStart:R,legacyBehavior:I=!1,onNavigate:A,transitionTypes:N,ref:L,unstable_dynamicOnHover:U,...D}=t;n=M,I&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let _=s.default.useContext(l.AppRouterContext),O=!1!==j,$=!1===j?"none":!0===j?"full":"auto",z="none"!==$?"auto"===$?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,V="string"==typeof(r=k||w)?r:(0,u.formatUrl)(r);if(I){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=I?o&&"object"==typeof o&&o.ref:L,B,q=s.default.useCallback(e=>(null!==_&&(x.current=(0,h.mountLinkInstance)(e,V,_,z,O,b,B)),()=>{x.current&&((0,h.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,h.unmountPrefetchableInstance)(e)}),[O,V,_,z,b,B]),H={ref:(0,c.useMergedRef)(q,K),onClick(t){I||"function"!=typeof E||E(t),I&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!_||t.defaultPrevented||function(t,r,n,o,a,i,s,u="none"){if("u">typeof window){let l,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((l=t.currentTarget.getAttribute("target"))&&"_self"!==l||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,v.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:f}=e.r(132916);f(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s,u)}}(t,V,x,T,C,A,N,$)},onMouseEnter(e){I||"function"!=typeof P||P(e),I&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),_&&O&&(0,h.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){I||"function"!=typeof R||R(e),I&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),_&&O&&(0,h.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,f.isAbsoluteUrl)(V)?H.href=V:I&&!S&&("a"!==o.type||"href"in o.props)||(H.href=(0,d.addBasePath)(V)),a=I?s.default.cloneElement(o,H):(0,i.jsx)("a",{...D,...H,children:n}),(0,i.jsx)(m.Provider,{value:g,children:a})}let m=(0,s.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,s.useContext)(m);("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 l},urlObjectKeys:function(){return u}};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||"",u=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(l+=":"+e.port)),u&&"object"==typeof u&&(u=String(a.urlQueryToSearchParams(u)));let c=e.search||u&&`?${u}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==l?(l="//"+(l||""),o&&"/"!==o[0]&&(o="/"+o)):l||(l=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${l}${o}${c}${s}`}let u=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(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 g},MiddlewareNotFoundError:function(){return w},MissingStaticPage:function(){return x},NormalizeError:function(){return m},PageNotFoundError:function(){return b},SP:function(){return v},ST:function(){return y},WEB_VITALS:function(){return a},execOnce:function(){return i},getDisplayName:function(){return f},getLocationOrigin:function(){return l},getURL:function(){return c},isAbsoluteUrl:function(){return u},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+\-.]*?:/,u=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&s.test(e)};function l(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=l();return e.substring(t.length)}function f(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(`"${f(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`);return n}let v="u">typeof performance,y=v&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class m 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})}},307364,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(531278),o=e.i(519455),a=e.i(793479),i=e.i(110204),s=e.i(111110),u=e.i(41931),l=e.i(201276);e.s(["f",0,function({onSaved:e}){let{t:c}=(0,s.b)(),[f,d]=(0,r.useState)(String(90)),[p,h]=(0,r.useState)(null),[v,y]=(0,r.useState)(!0),[g,m]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),w=Number(f),k=""!==f.trim()&&Number.isFinite(w)&&w>=1&&w<=100&&1e-6>Math.abs(100*w-Math.round(100*w)),M=(0,r.useCallback)(async()=>{y(!0),x(null);try{let e=(await u.f.get("/api/user")).questionDuplicateThreshold??90;d(String(e)),h(e)}catch(e){x(c.importFlow.thresholdLoadFailed),l.f.error("[Settings]","加载判重阈值失败",{error:e instanceof Error?e.message:String(e)})}finally{y(!1)}},[c.importFlow.thresholdLoadFailed]);(0,r.useEffect)(()=>{M()},[M]);let j=async()=>{if(k&&null!==p){m(!0),x(null);try{let t=(await u.f.patch("/api/user",{questionDuplicateThreshold:w})).questionDuplicateThreshold??w;h(t),d(String(t)),x(c.importFlow.preferenceSaved),e?.(t)}catch(e){x(c.importFlow.preferenceSaveFailed),l.f.error("[Settings]","保存判重阈值失败",{error:e instanceof Error?e.message:String(e)})}finally{m(!1)}}};return(0,t.jsxs)("div",{className:"space-y-2 border-t pt-4",children:[(0,t.jsx)(i.f,{htmlFor:"question-duplicate-threshold",children:c.importFlow.thresholdLabel}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(a.f,{id:"question-duplicate-threshold",type:"number",min:1,max:100,step:.01,value:f,onChange:e=>{d(e.target.value),x(null)},disabled:v||g||null===p,className:"w-28","aria-describedby":"question-duplicate-threshold-hint"}),(0,t.jsx)("span",{"aria-hidden":"true",children:"%"}),(0,t.jsxs)(o.f,{type:"button",size:"sm",variant:"outline",onClick:j,disabled:v||g||null===p||!k||w===p,children:[(v||g)&&(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4 animate-spin"}),c.importFlow.saveThreshold]}),!v&&null===p&&(0,t.jsx)(o.f,{type:"button",size:"sm",variant:"outline",onClick:M,children:c.importFlow.retryLoad})]}),(0,t.jsx)("p",{id:"question-duplicate-threshold-hint",className:"text-xs text-muted-foreground",children:c.importFlow.thresholdDescription}),null!==p&&!k&&(0,t.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:c.importFlow.thresholdInvalid}),b&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",role:"status",children:b})]})}],307364)},487486,e=>{var t=e.i(843476),r=e.i(991918),n=e.i(225913),o=e.i(975157);let a=(0,n.f)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});e.s(["f",0,function({className:e,variant:n,asChild:i=!1,...s}){let u=i?r.M:"span";return(0,t.jsx)(u,{"data-slot":"badge",className:(0,o.f)(a({variant:n}),e),...s})}])},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),u=e.i(586318),l=e.i(369340),c=e.i(610772),f=Object.defineProperty,d=(e,t)=>f(e,"name",{value:t,configurable:!0}),p="Tabs",[h,v]=(0,o.f)(p,[a.B]),y=(0,a.B)(),[g,m]=h(p),b=r.forwardRef(d(function(e,r){let{__scopeTabs:n,value:o,onValueChange:a,defaultValue:i,orientation:f="horizontal",dir:d,activationMode:h="automatic",...v}=e,y=(0,u.f)(d),[m,b]=(0,l.f)({prop:o,onChange:a,defaultProp:i??"",caller:p});return(0,t.jsx)(g,{scope:n,baseId:(0,c.f)(),value:m,onValueChange:b,orientation:f,dir:y,activationMode:h,children:(0,t.jsx)(s.V.div,{dir:y,"data-orientation":f,...v,ref:r})})},"Tabs")),x=r.forwardRef(d(function(e,r){let{__scopeTabs:n,loop:o=!0,...i}=e,u=m("TabsList",n),l=y(n);return(0,t.jsx)(a.F,{asChild:!0,...l,orientation:u.orientation,dir:u.dir,loop:o,children:(0,t.jsx)(s.V.div,{role:"tablist","aria-orientation":u.orientation,...i,ref:r})})},"TabsList")),w=r.forwardRef(d(function(e,r){let{__scopeTabs:o,value:i,disabled:u=!1,...l}=e,c=m("TabsTrigger",o),f=y(o),d=M(c.baseId,i),p=j(c.baseId,i),h=i===c.value;return(0,t.jsx)(a.M,{asChild:!0,...f,focusable:!u,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":u?"":void 0,disabled:u,id:d,...l,ref:r,onMouseDown:(0,n.f)(e.onMouseDown,e=>{u||0!==e.button||!1!==e.ctrlKey?e.preventDefault():(e.currentTarget.focus(),c.onValueChange(i))}),onKeyDown:(0,n.f)(e.onKeyDown,e=>{!u&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,n.f)(e.onFocus,()=>{let e="manual"!==c.activationMode;h||u||!e||c.onValueChange(i)})})})},"TabsTrigger")),k=r.forwardRef(d(function(e,n){let{__scopeTabs:o,value:a,forceMount:u,children:l,...c}=e,f=m("TabsContent",o),d=M(f.baseId,a),p=j(f.baseId,a),h=a===f.value,v=r.useRef(h);return r.useEffect(()=>{let e=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(i.f,{present:u||h,children:({present:r})=>(0,t.jsx)(s.V.div,{"data-state":h?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":d,hidden:!r,id:p,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:v.current?"0s":void 0},children:r&&l})})},"TabsContent"));function M(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}d(M,"makeTriggerId"),d(j,"makeContentId");var S=e.i(975157);let T=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(x,{ref:n,className:(0,S.f)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));T.displayName=x.displayName;let F=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(w,{ref:n,className:(0,S.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}));F.displayName=w.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(k,{ref:n,className:(0,S.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}));C.displayName=k.displayName,e.s(["i",0,b,"S",0,C,"U",0,T,"k",0,F],677572)},624687,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.f)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...n})}])},215519,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(306831);let o=(0,r.createContext)({timeZone:n.J,setTimeZone:()=>void 0});e.s(["n",0,function({children:e,initialTimeZone:a=n.J}){let[i,s]=(0,r.useState)(a);return(0,t.jsx)(o.Provider,{value:{timeZone:i,setTimeZone:s},children:e})},"M",0,function(){return(0,r.useContext)(o)}])},905110,e=>{e.s(["z",0,50,"o",0,100,"P",0,1,"m",0,function(e,t=50){return"number"==typeof e&&e>=t/100}])}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871689,e=>{let t=(0,e.i(475254).f)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,t],871689)},463059,e=>{let t=(0,e.i(475254).f)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["f",0,t],463059)},503116,e=>{let t=(0,e.i(475254).f)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["f",0,t],503116)},63804,e=>{let t=(0,e.i(475254).f)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);e.s(["f",0,t],63804)},303281,e=>{let t=(0,e.i(475254).f)("printer",[["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"}]]);e.s(["f",0,t],303281)},283086,e=>{let t=(0,e.i(475254).f)("sparkles",[["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"}]]);e.s(["f",0,t],283086)},469937,62825,e=>{var t=e.i(843476);let r=(0,e.i(475254).f)("star",[["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"}]]);var n=e.i(111110),s=e.i(975157);let i=[1,2,3,4,5];function a(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["f",0,function({value:e,onChange:a,disabled:l,size:c="sm",showUnrated:o=!0,className:d}){let{t:u}=(0,n.b)(),f=e??0,m="sm"===c?"h-3.5 w-3.5":"h-5 w-5",h=f?u.difficulty.starsLabel.replace("{n}",String(f)):u.difficulty.unrated;return a?(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}${u.common.colon}${h}`,title:u.difficulty.clearHint,children:[i.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>a(e===f?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=f,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(r,{className:(0,s.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!f&&o&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):f?(0,t.jsx)("span",{className:(0,s.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}${u.common.colon}${h}`,title:h,children:i.map(e=>(0,t.jsx)(r,{className:(0,s.f)(m,e<=f?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):o?(0,t.jsx)("span",{className:(0,s.f)("text-xs text-muted-foreground",d),children:u.difficulty.unrated}):null}],469937),e.s(["i",0,function(e,t="zh"){return("en"===t?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[a(e)]},"h",0,a,"x",0,function(e,t){return(t||"").trim()?"wrong_attempt":a(e)}],62825)},846968,e=>{var t=e.i(843476),r=e.i(269638),n=e.i(503116),s=e.i(16715),i=e.i(487486),a=e.i(111110);let l={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:n.f},reviewing:{className:"bg-primary/10 text-primary",icon:s.f},mastered:{className:"bg-success/15 text-success",icon:r.f}};e.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:e,className:r=""}){let{t:n}=(0,a.b)(),{className:s,icon:c}=l[e],o="mastered"===e?n.notebook.mastered:"reviewing"===e?n.notebook.reviewing:n.notebook.review;return(0,t.jsx)(i.f,{variant:"secondary",className:`${s} ${r}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c,{className:"h-3 w-3"})," ",o]})})}])},709830,76824,e=>{var t=e.i(843476),r=e.i(111110),n=e.i(952122);let s=["primary","junior_high","senior_high"],i="primary",a=["math","english","chinese","physics","chemistry","biology","history","geography","politics"];function l(e){return"string"==typeof e&&a.includes(e)}function c(e){var t;let r=l(e.subjectKey)?e.subjectKey:(0,n.f)(e.name);return{stage:"string"==typeof(t=e.stage)&&s.includes(t)?e.stage:i,subject:r&&l(r)?r:null}}function o(){let{t:e}=(0,r.b)();return{stageLabel:t=>({primary:e.auth.primary,junior_high:e.auth.juniorHigh,senior_high:e.auth.seniorHigh})[t],subjectLabel:t=>e.tags.subjects[t]}}e.s(["j",0,i,"c",0,s,"W",0,{primary:["math","english"],junior_high:a,senior_high:a},"v",0,c],76824),e.s(["E",0,function({notebook:e,className:r}){let{stageLabel:n,subjectLabel:s}=o(),i=c(e);return(0,t.jsxs)("span",{className:r,children:[n(i.stage),i.subject?` \xb7 ${s(i.subject)}`:""]})},"O",0,o],709830)},590546,e=>{var t=e.i(843476),r=e.i(618566),n=e.i(519455),s=e.i(871689);e.s(["f",0,function({fallbackUrl:e,className:i}){let a=(0,r.useRouter)();return(0,t.jsx)(n.f,{variant:"ghost",size:"icon",onClick:()=>{a.push(e)},className:i,children:(0,t.jsx)(s.f,{className:"h-5 w-5"})})}])},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})}])},257428,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(820783),s=e.i(30030),i=e.i(981140),a=e.i(369340),l=e.i(635804),c=e.i(296626),o=e.i(248425),d=Object.defineProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),f="Checkbox",[m,h]=(0,s.f)(f),[p,g]=m(f);function x(e){let{__scopeCheckbox:n,checked:s,children:i,defaultChecked:l,disabled:c,form:o,name:d,onCheckedChange:u,required:m,value:h="on",internal_do_not_use_render:g}=e,[x,b]=(0,a.f)({prop:s,defaultProp:l??!1,onChange:u,caller:f}),[y,k]=r.useState(null),[j,N]=r.useState(null),[C,_]=r.useState(null),R=!y||!!o||!!y.closest("form"),E={checked:x,disabled:c,setChecked:b,control:y,setControl:k,name:d,form:o,value:h,userClick:C,onUserClick:_,required:m,defaultChecked:!w(l)&&l,isFormControl:R,bubbleInput:j,setBubbleInput:N};return(0,t.jsx)(p,{scope:n,...E,children:v(g)?g(E):i})}u(x,"CheckboxProvider");var b=r.forwardRef(u(function({__scopeCheckbox:e,onKeyDown:s,onClick:a,...l},c){let{control:d,value:f,disabled:m,checked:h,required:p,setControl:x,setChecked:b,onUserClick:y,isFormControl:k,bubbleInput:j}=g("CheckboxTrigger",e),v=(0,n.f)(c,x),C=r.useRef(h);return r.useEffect(()=>{let e=d?.form;if(e){let t=u(()=>b(C.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,b]),(0,t.jsx)(o.V.button,{type:"button",role:"checkbox","aria-checked":w(h)?"mixed":h,"aria-required":p,"data-state":N(h),"data-disabled":m?"":void 0,disabled:m,value:f,...l,ref:v,onKeyDown:(0,i.f)(s,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,i.f)(a,e=>{let t=e.isPropagationStopped();y({requestedChecked:!!w(h)||!h,hasConsumerStoppedPropagation:t}),b(e=>!!w(e)||!e),j&&k&&!t&&e.stopPropagation()})})},"CheckboxTrigger")),y=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,name:s,checked:i,defaultChecked:a,required:l,disabled:c,value:o,onCheckedChange:d,form:u,...f}=e;return(0,t.jsx)(x,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:c,required:l,onCheckedChange:d,name:s,form:u,value:o,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{...f,ref:r,__scopeCheckbox:n}),e&&(0,t.jsx)(j,{__scopeCheckbox:n})]})})},"Checkbox")),k=r.forwardRef(u(function(e,r){let{__scopeCheckbox:n,forceMount:s,...i}=e,a=g("CheckboxIndicator",n);return(0,t.jsx)(c.f,{present:s||w(a.checked)||!0===a.checked,children:(0,t.jsx)(o.V.span,{"data-state":N(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:r,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),j=r.forwardRef(u(function({__scopeCheckbox:e,onClick:s,...a},c){let{control:d,userClick:u,checked:f,defaultChecked:m,required:h,disabled:p,name:x,value:b,form:y,bubbleInput:k,setBubbleInput:j}=g("CheckboxBubbleInput",e),v=(0,n.f)(c,j),N=(0,l.f)(d),C=r.useRef(!1),_=r.useRef(f),R=r.useRef(u),E=r.useRef(null);r.useEffect(()=>{if(!k)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!e)return;let t=_.current!==f;_.current=f;let r=null!==u&&u!==R.current;if(R.current=u,r)E.current=t?null:u,t&&(k.indeterminate=w(f),e.call(k,!w(f)&&f)),k.dispatchEvent(new Event("click",{bubbles:!u.hasConsumerStoppedPropagation}));else if(t){let t=E.current;E.current=null;let r=t?.requestedChecked===f;C.current=!0,k.indeterminate=w(f),e.call(k,!w(f)&&f),k.dispatchEvent(new Event("click",{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),C.current=!1}},[k,f,u]);let P=r.useRef(!w(f)&&f);return(0,t.jsx)(o.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:m??P.current,required:h,disabled:p,name:x,value:b,form:y,...a,tabIndex:-1,ref:v,onClick:(0,i.f)(s,e=>{C.current&&e.stopPropagation()}),style:{...a.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function v(e){return"function"==typeof e}function w(e){return"indeterminate"===e}function N(e){return w(e)?"indeterminate":e?"checked":"unchecked"}u(v,"isFunction"),u(w,"isIndeterminate"),u(N,"getState");var C=e.i(643531),_=e.i(975157);let R=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(y,{ref:n,className:(0,_.f)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...r,children:(0,t.jsx)(k,{className:(0,_.f)("flex items-center justify-center text-current"),children:(0,t.jsx)(C.f,{className:"h-4 w-4"})})}));R.displayName=y.displayName,e.s(["f",0,R],257428)},912505,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({icon:e,title:n,description:s,action:i,className:a}){return(0,t.jsxs)("div",{className:(0,r.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",a),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:n}),s&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:s}),i&&(0,t.jsx)("div",{className:"mt-5",children:i})]})}])},393842,e=>{var t=e.i(843476),r=e.i(590546),n=e.i(975157);e.s(["f",0,function({title:e,description:s,backHref:i,actions:a,titleAddon:l,className:c}){return(0,t.jsxs)("div",{className:(0,n.f)("flex items-start gap-3",c),children:[i&&(0,t.jsx)(r.f,{fallbackUrl:i,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),s&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:s})]}),a&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}])},86963,e=>{var t=e.i(843476),r=e.i(531278);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(r.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},990745,e=>{e.s(["f",0,function(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);if(!e.knowledgePoints)return[];try{let t=JSON.parse(e.knowledgePoints);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},35209,e=>{var t=e.i(271645),r=e.i(111110);e.s(["f",0,function(...e){let{t:n}=(0,r.b)(),s=[n.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=s},[s])}])},833547,747279,e=>{var t=e.i(41931);async function r(e){try{return(await t.f.get(`/api/error-items/short/${encodeURIComponent(e)}`)).id}catch{return null}}e.s(["f",0,r],833547);let n=RegExp("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{6}$");e.s(["f",0,function(e){return"string"==typeof e&&n.test(e)}],747279)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871689,e=>{let t=(0,e.i(475254).f)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,t],871689)},503116,e=>{let t=(0,e.i(475254).f)("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["f",0,t],503116)},356909,e=>{let t=(0,e.i(475254).f)("save",[["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"}]]);e.s(["f",0,t],356909)},283086,e=>{let t=(0,e.i(475254).f)("sparkles",[["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"}]]);e.s(["f",0,t],283086)},469937,62825,e=>{var t=e.i(843476);let s=(0,e.i(475254).f)("star",[["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"}]]);var a=e.i(111110),r=e.i(975157);let i=[1,2,3,4,5];function n(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["f",0,function({value:e,onChange:n,disabled:l,size:c="sm",showUnrated:d=!0,className:o}){let{t:m}=(0,a.b)(),u=e??0,x="sm"===c?"h-3.5 w-3.5":"h-5 w-5",f=u?m.difficulty.starsLabel.replace("{n}",String(u)):m.difficulty.unrated;return n?(0,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-0.5",o),role:"group","aria-label":`${m.difficulty.label}${m.common.colon}${f}`,title:m.difficulty.clearHint,children:[i.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>n(e===u?null:e),"aria-label":m.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)(s,{className:(0,r.f)(x,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&d&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:m.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,r.f)("inline-flex items-center",o),role:"img","aria-label":`${m.difficulty.label}${m.common.colon}${f}`,title:f,children:i.map(e=>(0,t.jsx)(s,{className:(0,r.f)(x,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):d?(0,t.jsx)("span",{className:(0,r.f)("text-xs text-muted-foreground",o),children:m.difficulty.unrated}):null}],469937),e.s(["i",0,function(e,t="zh"){return("en"===t?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[n(e)]},"h",0,n,"x",0,function(e,t){return(t||"").trim()?"wrong_attempt":n(e)}],62825)},991686,868983,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(522016),r=e.i(215519),i=e.i(306831),n=e.i(664659),l=e.i(655900),c=e.i(531278),d=e.i(107233),o=e.i(283086),m=e.i(727612),u=e.i(487486),x=e.i(519455),f=e.i(515288),h=e.i(511445),p=e.i(356909),g=e.i(793479),y=e.i(393733),b=e.i(111110),v=e.i(41931);function j({errorItemId:e,onSaved:a,onCancel:n}){let{t:l}=(0,b.b)(),{timeZone:d}=(0,r.M)(),o=(0,i.r)(new Date,"yyyy-MM-dd",d),[m,u]=(0,s.useState)(null),[f,h]=(0,s.useState)(o),[N,w]=(0,s.useState)(!1),[k,$]=(0,s.useState)(null),S=async()=>{if(m&&f){w(!0),$(null);try{await v.f.post("/api/practice/record",{errorItemId:e,result:m,source:"manual",takenAt:(0,i.$)(f,d)}),a()}catch{$(l.mastery.resultSaveFailed)}finally{w(!1)}}};return(0,t.jsxs)("div",{className:"space-y-3 rounded-md border bg-muted/30 p-3",children:[(0,t.jsx)(y.f,{value:m,onChange:u,disabled:N}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,t.jsx)("label",{htmlFor:`practice-date-${e}`,className:"text-sm font-medium",children:l.mastery.recordDate}),(0,t.jsx)(g.f,{id:`practice-date-${e}`,type:"date",value:f,max:o,onChange:e=>h(e.target.value),className:"sm:w-48"}),(0,t.jsxs)("div",{className:"flex gap-2 sm:ml-auto",children:[(0,t.jsx)(x.f,{variant:"outline",size:"sm",onClick:n,disabled:N,className:"flex-1 sm:flex-none",children:l.exam.cancel}),(0,t.jsxs)(x.f,{size:"sm",onClick:S,disabled:N||!m||!f,className:"flex-1 sm:flex-none",children:[N?(0,t.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(p.f,{className:"mr-2 h-4 w-4"}),l.mastery.saveResult]})]})]}),k&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:k})]})}var N=e.i(149704),w=e.i(294114),k=e.i(905110);let $={correct:"bg-green-100 text-green-700 border-green-200",wrong:"bg-red-100 text-red-700 border-red-200",not_attempted:"bg-amber-100 text-amber-700 border-amber-200"};e.s(["K",0,function({errorItemId:e,onMasteryStatusChange:p}){let{timeZone:g}=(0,r.M)(),{t:y}=(0,b.b)(),[S,M]=(0,s.useState)(null),[C,T]=(0,s.useState)(null),[A,E]=(0,s.useState)(0),[R,_]=(0,s.useState)(!1),z=(0,s.useCallback)(()=>{v.f.get(`/api/error-items/${e}/practice-records`).then(e=>{M(e),p?.(e.masteryStatus)}).catch(()=>void 0)},[e,p]);(0,s.useEffect)(z,[z]);let D=()=>{E(0),z()},H=async e=>{if(await (0,w.u)(y.mastery.deleteRecordConfirm,{destructive:!0}))try{await v.f.delete(`/api/practice/record/${e}`),D()}catch{w.c.error(y.mastery.deleteRecordFailed)}},U=S?.records[0],q=!!U&&(!S?.masteryEvaluatedAt||new Date(U.createdAt)>new Date(S.masteryEvaluatedAt));if((0,s.useEffect)(()=>{if(!q||A>=20)return;let e=setTimeout(()=>{E(e=>e+1),z()},4e3);return()=>clearTimeout(e)},[q,A,z]),!S)return null;let I=S.masteryProbability,L=null===I?null:Math.round(100*I),P=null===L?"":(0,k.m)(I,S.masteryThreshold)?"bg-green-500":L>=30?"bg-amber-500":"bg-red-500",F=y.practice.difficulty;return(0,t.jsxs)(f.N,{children:[(0,t.jsx)(f.Y,{children:(0,t.jsxs)(f.v,{className:"flex items-center gap-2 text-base",children:[(0,t.jsx)(o.f,{className:"h-4 w-4 text-primary"}),y.mastery.probability]})}),(0,t.jsxs)(f.O,{className:"space-y-4",children:[null===L?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:q?y.mastery.pending:y.mastery.notEvaluated}):(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,t.jsxs)("span",{className:"text-3xl font-bold",children:[L,"%"]}),(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[q&&(0,t.jsx)(c.f,{className:"h-3 w-3 animate-spin"}),(0,t.jsx)(u.f,{variant:"outline",children:"ai"===S.masterySource?y.mastery.aiEvaluated:y.mastery.estimated})]})]}),(0,t.jsx)("div",{className:"h-2 w-full rounded-full bg-muted overflow-hidden",children:(0,t.jsx)("div",{className:`h-full ${P} transition-all`,style:{width:`${L}%`}})}),S.masteryReason&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:S.masteryReason}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:y.mastery.thresholdHint.replace("{threshold}",String(S.masteryThreshold))})]}),(0,t.jsxs)("div",{className:"space-y-2 border-t pt-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-semibold",children:y.mastery.history}),!R&&(0,t.jsxs)(x.f,{variant:"outline",size:"sm",onClick:()=>_(!0),children:[(0,t.jsx)(d.f,{className:"mr-1 h-4 w-4"}),y.mastery.addRecord]})]}),R&&(0,t.jsx)(j,{errorItemId:e,onCancel:()=>_(!1),onSaved:()=>{_(!1),D()}}),0===S.records.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground italic",children:y.mastery.noHistory}):(0,t.jsx)("ul",{className:"divide-y rounded-md border",children:S.records.map(e=>(0,t.jsxs)("li",{className:"p-3 text-sm space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 flex-wrap items-center gap-2 text-left",onClick:()=>T(C===e.id?null:e.id),children:[(0,t.jsx)("span",{className:"text-muted-foreground tabular-nums",children:(0,i.r)(e.createdAt,"yyyy-MM-dd HH:mm",g)}),(0,t.jsx)(u.f,{variant:"outline",className:$[e.result]||"",children:y.mastery.results[e.result]||e.result}),e.difficulty&&(0,t.jsx)(u.f,{variant:"secondary",children:F[e.difficulty]||e.difficulty}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:e.exam?`${y.mastery.sources.exam} \xb7 ${e.exam.title}`:y.mastery.sources[e.source]||y.mastery.sources.practice}),e.questionText&&(0,t.jsx)("span",{className:"ml-auto text-muted-foreground",children:C===e.id?(0,t.jsx)(l.f,{className:"h-4 w-4"}):(0,t.jsx)(n.f,{className:"h-4 w-4"})})]}),(0,t.jsx)("button",{type:"button","aria-label":y.mastery.deleteRecord,title:y.mastery.deleteRecord,className:"shrink-0 rounded p-1 text-muted-foreground hover:bg-red-50 hover:text-red-600",onClick:()=>H(e.id),children:(0,t.jsx)(m.f,{className:"h-4 w-4"})})]}),C===e.id&&e.questionText&&(0,t.jsxs)("div",{className:"space-y-2 rounded-md bg-muted/40 p-3",children:[(0,t.jsx)(h.f,{content:e.questionText}),(0,t.jsx)(N.f,{svg:e.figureSvg}),e.wrongAnswerText&&(0,t.jsxs)("div",{className:"border-t pt-2",children:[(0,t.jsx)("p",{className:"mb-1 font-medium",children:y.editor.wrongAnswerText}),(0,t.jsx)(h.f,{content:e.wrongAnswerText})]}),e.mistakeAnalysis&&(0,t.jsxs)("div",{className:"border-t pt-2",children:[(0,t.jsx)("p",{className:"mb-1 font-medium",children:y.editor.mistakeAnalysis}),(0,t.jsx)(h.f,{content:e.mistakeAnalysis})]}),e.originalImageUrl&&(0,t.jsx)("img",{src:e.originalImageUrl,alt:y.editor.wrongAnswerText,className:"max-h-96 max-w-full rounded object-contain"}),e.answerText&&(0,t.jsx)("div",{className:"border-t pt-2",children:(0,t.jsx)(h.f,{content:e.answerText,className:"font-semibold"})}),e.exam&&(0,t.jsx)(a.default,{href:`/exams/${e.exam.paperId}`,className:"text-xs text-primary hover:underline",children:e.exam.title})]})]},e.id))})]})]})]})},"x",0,$],991686);var S=e.i(908821);e.s(["f",()=>S.f],868983)},846968,e=>{var t=e.i(843476),s=e.i(269638),a=e.i(503116),r=e.i(16715),i=e.i(487486),n=e.i(111110);let l={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:a.f},reviewing:{className:"bg-primary/10 text-primary",icon:r.f},mastered:{className:"bg-success/15 text-success",icon:s.f}};e.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:e,className:s=""}){let{t:a}=(0,n.b)(),{className:r,icon:c}=l[e],d="mastered"===e?a.notebook.mastered:"reviewing"===e?a.notebook.reviewing:a.notebook.review;return(0,t.jsx)(i.f,{variant:"secondary",className:`${r} ${s}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(c,{className:"h-3 w-3"})," ",d]})})}])},393733,e=>{var t=e.i(843476),s=e.i(269638);let a=(0,e.i(475254).f)("circle-question-mark",[["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"}]]);var r=e.i(373884),i=e.i(111110);let n=[{value:"correct",icon:s.f,active:"border-green-600 bg-green-50 text-green-700"},{value:"wrong",icon:r.f,active:"border-red-600 bg-red-50 text-red-700"},{value:"not_attempted",icon:a,active:"border-amber-600 bg-amber-50 text-amber-700"}];e.s(["f",0,function({value:e,onChange:s,disabled:a,size:r="md"}){let{t:l}=(0,i.b)(),c="sm"===r?"px-2 py-1 text-xs":"px-3 py-2 text-sm";return(0,t.jsx)("div",{className:"grid grid-cols-3 gap-2",role:"radiogroup",children:n.map(({value:i,icon:n,active:d})=>(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":e===i,disabled:a,onClick:()=>s(i),className:`flex items-center justify-center gap-1 rounded-md border font-medium transition-colors disabled:opacity-60 ${c} ${e===i?d:"border-input hover:bg-muted"}`,children:[(0,t.jsx)(n,{className:"sm"===r?"h-3 w-3":"h-4 w-4"}),l.mastery.results[i]]},i))})}],393733)},149704,e=>{var t=e.i(843476),s=e.i(111110),a=e.i(975157);e.s(["f",0,function({svg:e,className:r}){let{t:i}=(0,s.b)();return e?(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",r),children:(0,t.jsx)("img",{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,alt:i.figure.alt,className:"mx-auto block h-auto max-w-full rounded border bg-white p-2",style:{maxHeight:360}})}):null}],149704)},574041,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(37727),r=e.i(487486),i=e.i(793479),n=e.i(41931),l=e.i(201276);e.s(["f",0,function({value:e=[],onChange:c,placeholder:d="Enter tags...",className:o="",enterHint:m,subject:u,gradeStage:x}){let[f,h]=(0,s.useState)(""),[p,g]=(0,s.useState)([]),[y,b]=(0,s.useState)(!1),[v,j]=(0,s.useState)(0),N=(0,s.useRef)(null),w=(0,s.useRef)(null),k=(0,s.useCallback)(async t=>{try{let s=new URLSearchParams({q:t});u&&s.append("subject",u),x&&s.append("stage",x);let a=((await n.f.get(`/api/tags/suggestions?${s.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));g(a.slice(0,20)),b(a.length>0),j(0)}catch(e){l.f.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,x,e]);(0,s.useEffect)(()=>{f.trim()&&k(f)},[f,k]);let $=t=>{t.trim()&&!e.includes(t.trim())&&(c([...e,t.trim()]),h(""),g([]),b(!1),j(0))},S=t=>{c(e.filter(e=>e!==t))};return(0,s.useEffect)(()=>{let e=e=>{!w.current||w.current.contains(e.target)||N.current?.contains(e.target)||b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${o}`,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)(r.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>S(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(a.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(i.f,{ref:N,type:"text",value:f,onChange:e=>{h(e.target.value),e.target.value.trim()||(g([]),b(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),v>=0&&p[v]?$(p[v]):f.trim()&&$(f)):"ArrowDown"===t.key?(t.preventDefault(),j(e=>Math.min(e+1,p.length-1))):"ArrowUp"===t.key?(t.preventDefault(),j(e=>Math.max(e-1,0))):"Escape"===t.key?(b(!1),j(0)):"Backspace"===t.key&&!f&&e.length>0&&S(e[e.length-1])},onFocus:()=>{p.length>0&&b(!0)},placeholder:0===e.length?d:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),y&&p.length>0&&(0,t.jsx)("div",{ref:w,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:p.map((e,s)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${s===v?"bg-accent":""}`,onClick:()=>$(e),onMouseEnter:()=>j(s),children:e},e))}),f&&!y&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:m?`${m} "${f}"`:`Press Enter to create "${f}"`})]})}])},515288,e=>{var t=e.i(843476),s=e.i(975157);e.s(["N",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,s.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"O",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.f)("px-6",e),...a})},"u",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.f)("text-muted-foreground text-sm",e),...a})},"Y",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.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),...a})},"v",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.f)("leading-none font-semibold",e),...a})}])},912505,e=>{var t=e.i(843476),s=e.i(975157);e.s(["f",0,function({icon:e,title:a,description:r,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,s.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",n),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:a}),r&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:r}),i&&(0,t.jsx)("div",{className:"mt-5",children:i})]})}])},86963,e=>{var t=e.i(843476),s=e.i(531278);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},990745,e=>{e.s(["f",0,function(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);if(!e.knowledgePoints)return[];try{let t=JSON.parse(e.knowledgePoints);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:a}=(0,s.b)(),r=[a.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=r},[r])}])}])})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63804,e=>{let t=(0,e.i(475254).f)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);e.s(["f",0,t],63804)},356909,e=>{let t=(0,e.i(475254).f)("save",[["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"}]]);e.s(["f",0,t],356909)},283086,e=>{let t=(0,e.i(475254).f)("sparkles",[["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"}]]);e.s(["f",0,t],283086)},620278,e=>{let t=(0,e.i(475254).f)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["f",0,t],620278)},952683,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(618566),i=e.i(968553),n=e.i(674558),r=e.i(283086),l=e.i(747819),o=e.i(178119),c=e.i(515288),d=e.i(519455),u=e.i(624687),m=e.i(110204),h=e.i(356909),x=e.i(531278),p=e.i(286536),f=e.i(185873),f=f,g=e.i(367240),v=e.i(111110),y=e.i(511445),b=e.i(574041),j=e.i(438465),w=e.i(967489),k=e.i(952122),N=e.i(294114);function S({onSubmit:e,defaultNotebookId:a,defaultNotebookName:i,isSaving:r}){let{t:l}=(0,v.b)(),[o,C]=(0,s.useState)(null),[E,A]=(0,s.useState)(""),[T,P]=(0,s.useState)(""),[I,H]=(0,s.useState)(""),[M,$]=(0,s.useState)(""),[z,q]=(0,s.useState)(""),[D,L]=(0,s.useState)("unknown"),[_,B]=(0,s.useState)([]),[U,F]=(0,s.useState)(a||""),[R,K]=(0,s.useState)(""),[O,V]=(0,s.useState)("a"),W=async()=>{if(E.trim()){if(!U)return void N.c.warning(l.editor.messages?.selectNotebook||"Please select a notebook");await e({questionText:E.trim(),answerText:T.trim(),analysis:I.trim(),wrongAnswerText:M.trim(),mistakeAnalysis:z.trim(),mistakeStatus:D,knowledgePoints:_,subjectId:U,gradeSemester:R||void 0,paperLevel:O})}},Q=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),E.trim()&&U&&!r&&W())},G=[{key:"question",label:l.editor?.question||"Question Text",value:E,setter:A,placeholder:l.directEntry.questionPlaceholder,minHeight:"min-h-[180px]",required:!0},{key:"answer",label:l.editor?.answer||"Answer",value:T,setter:P,placeholder:l.directEntry.answerPlaceholder,minHeight:"min-h-[120px]"},{key:"analysis",label:l.editor?.analysis||"Analysis / Explanation",value:I,setter:H,placeholder:l.directEntry.analysisPlaceholder,minHeight:"min-h-[150px]"},{key:"wrongAnswer",label:l.editor?.wrongAnswerText||"Wrong Answer / Work",value:M,setter:$,placeholder:l.directEntry.wrongAnswerPlaceholder,minHeight:"min-h-[100px]"},{key:"mistakeAnalysis",label:l.editor?.mistakeAnalysis||"Mistake Cause Analysis",value:z,setter:q,placeholder:l.directEntry.mistakeAnalysisPlaceholder,minHeight:"min-h-[100px]"}];return(0,t.jsx)(c.N,{className:"rounded-2xl",children:(0,t.jsxs)(c.O,{className:"p-6 space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(n.f,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l.directEntry.title})]}),(0,t.jsxs)(d.f,{variant:"ghost",size:"sm",onClick:()=>{A(""),P(""),H(""),$(""),q(""),L("unknown"),B([]),K(""),V("a")},disabled:r,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(g.f,{className:"h-4 w-4 mr-1"}),l.directEntry.reset]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(m.f,{children:[l.editor?.selectNotebook||"Select Notebook"," *"]}),(0,t.jsx)(j.f,{value:U,onChange:F})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.gradeSemester||"Grade/Semester"}),(0,t.jsx)("input",{type:"text",value:R,onChange:e=>K(e.target.value),placeholder:l.directEntry.gradeSemesterPlaceholder,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.paperLevel||"Paper Level"}),(0,t.jsxs)(w.d,{value:O,onValueChange:V,children:[(0,t.jsx)(w.P,{children:(0,t.jsx)(w.U,{})}),(0,t.jsxs)(w.r,{children:[(0,t.jsx)(w.T,{value:"a",children:l.editor?.paperLevels?.a||"Paper A"}),(0,t.jsx)(w.T,{value:"b",children:l.editor?.paperLevels?.b||"Paper B"}),(0,t.jsx)(w.T,{value:"other",children:l.editor?.paperLevels?.other||"Other"})]})]})]})]}),G.map(e=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(m.f,{className:e.required?"text-primary font-semibold":"",children:[e.label," ",e.required&&"*"]}),(0,t.jsx)(d.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>C(o===e.key?null:e.key),disabled:!e.value,children:o===e.key?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.f,{className:"h-3 w-3 mr-1"}),l.directEntry.edit]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.f,{className:"h-3 w-3 mr-1"}),l.directEntry.preview]})})]}),o===e.key?(0,t.jsx)("div",{className:`rounded-md border bg-muted/30 p-4 ${e.minHeight} overflow-auto cursor-pointer`,onClick:()=>C(null),children:(0,t.jsx)(y.f,{content:e.value})}):(0,t.jsx)(u.f,{value:e.value,onChange:t=>e.setter(t.target.value),onKeyDown:Q,placeholder:e.placeholder,className:`${e.minHeight} font-mono text-sm resize-y`,disabled:r})]},e.key)),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(w.d,{value:D,onValueChange:e=>L(e),children:[(0,t.jsx)(w.P,{className:"w-[200px]",children:(0,t.jsx)(w.U,{})}),(0,t.jsxs)(w.r,{children:[(0,t.jsx)(w.T,{value:"not_attempted",children:l.editor?.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(w.T,{value:"wrong_attempt",children:l.editor?.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(w.T,{value:"unknown",children:l.editor?.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.tags||"Knowledge Points (Press Enter to add)"}),(0,t.jsx)(b.f,{value:_,onChange:B,placeholder:l.editor?.tagsPlaceholder||"Enter knowledge tags, select from suggestions...",enterHint:l.editor?.createTagHint,subject:(0,k.f)(i||null)||void 0}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l.editor?.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 pt-2",children:[(0,t.jsx)(d.f,{onClick:W,disabled:!E.trim()||!U||r,className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",size:"lg",children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.f,{className:"mr-2 h-4 w-4 animate-spin"}),l.directEntry.saving]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.f,{className:"mr-2 h-4 w-4"}),l.directEntry.save]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:l.directEntry.hint})]})]})})}var C=e.i(522016),E=e.i(217255),A=e.i(810980),T=e.i(551804),P=e.i(63804),I=e.i(620278);let H=()=>()=>{};function M({href:e,icon:s,label:a,value:i}){return(0,t.jsxs)(C.default,{href:e,className:"rounded-xl bg-white/15 px-4 py-3 backdrop-blur-sm transition-colors hover:bg-white/20",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-white/75",children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsx)("div",{className:"mt-1 text-2xl font-bold tabular-nums",children:i??"–"})]})}function $({notebookCount:e,itemCount:a,dueCount:i,targetNotebook:n}){let{t:r,language:l}=(0,v.b)(),{data:o}=(0,E.useSession)(),c=(0,s.useSyncExternalStore)(H,()=>new Date().getHours(),()=>null),d=null===c?r.common.welcome.replace(/[,,\s]+$/,""):c<12?r.home.greetingMorning:c<18?r.home.greetingAfternoon:r.home.greetingEvening,u=o?.user?.name||o?.user?.email||"";return(0,t.jsxs)("section",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-indigo-600 via-indigo-500 to-violet-500 p-5 text-white shadow-lg shadow-indigo-500/20 md:p-7",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-10 -top-12 h-44 w-44 rounded-full bg-white/10 blur-2xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-16 right-24 h-40 w-40 rounded-full bg-fuchsia-300/20 blur-2xl"}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("h1",{className:"text-xl font-bold tracking-tight md:text-2xl",children:[d,u&&`${"zh"===l?",":", "}${u}`]}),(0,t.jsx)("p",{className:"max-w-md text-sm text-white/80",children:r.home.heroSubtitle}),n&&(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-xs font-medium",children:[(0,t.jsx)(I.f,{className:"h-3.5 w-3.5"}),r.home.targetNotebook.replace("{name}",n)]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 md:w-96",children:[(0,t.jsx)(M,{href:"/notebooks",icon:A.f,label:r.home.notebookCount,value:e}),(0,t.jsx)(M,{href:"/notebooks",icon:P.f,label:r.home.itemCount,value:a}),(0,t.jsx)(M,{href:"/review",icon:T.f,label:r.home.dueCount,value:i})]})]})]})}var z=e.i(12130),q=e.i(430634),D=e.i(717448),L=e.i(798469),_=e.i(86963),B=e.i(956738),U=e.i(185592),F=e.i(41931),R=e.i(201276),K=e.i(35209),O=e.i(267275);function V(){let{t:e}=(0,v.b)();(0,K.f)(e.pageTitle.home);let c=(0,a.useSearchParams)().get("notebook"),[d,u]=(0,s.useState)([]),[m,h]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),[f,g]=(0,s.useState)("image"),y=c||m,b=y?d.find(e=>e.id===y):void 0,j=(0,O.f)({logPrefix:"[Home]",analyzeSubjectId:y,importSubjectId:c,textNotebook:b&&{id:b.id,name:b.name},onParsed:e=>{let t=e.subject&&d.find(t=>t.name.includes(e.subject)||e.subject.includes(t.name));t&&h(t.id)}});(0,s.useEffect)(()=>{F.f.get("/api/notebooks").then(e=>u(e)).catch(e=>R.f.error("[Home]","Failed to fetch notebooks",{error:e})),F.f.get("/api/review/due?pageSize=1").then(e=>p(e.total)).catch(e=>R.f.error("[Home]","Failed to fetch due reviews",{error:e}))},[]);let w=async e=>{j.setAnalysisStep("saving"),await j.saveQuestion({...e,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",originalImageUrl:""}),j.setAnalysisStep("idle")},k=d.reduce((e,t)=>e+(t._count?.errorItems||0),0),N=[{value:"image",icon:i.f,label:e.app?.uploadImage||"Take Photo"},{value:"text",icon:r.f,label:e.app?.manualInput||"Manual Input"},{value:"direct",icon:n.f,label:e.app?.directInput||"Manual Entry"}];return(0,t.jsxs)("main",{className:"min-h-screen",children:[(0,t.jsx)(B.f,{status:j.analysisStep}),(0,t.jsxs)("div",{className:`mx-auto space-y-6 px-4 py-6 md:px-8 md:py-8 ${"review"===j.step?"max-w-6xl":"max-w-4xl"}`,children:["upload"===j.step&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($,{notebookCount:d.length,itemCount:k,dueCount:x,targetNotebook:c?b?.name:void 0}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(U.f,{options:N,value:f,onChange:g}),j.lastImported&&(0,t.jsx)(q.f,{imported:j.lastImported,onDismiss:j.dismissImported}),j.batchBlobs?(0,t.jsx)(l.f,{blobs:j.batchBlobs,subjectId:c,timeout:j.aiTimeout,onClose:j.closeBatch}):"image"===f?(0,t.jsx)(L.f,{onImageSelect:j.selectImage,isAnalyzing:j.isBusy}):"text"===f?(0,t.jsx)(D.f,{onSubmit:j.submitText,isAnalyzing:j.isBusy,defaultNotebookName:b?.name}):(0,t.jsx)(S,{onSubmit:w,defaultNotebookId:y||void 0,defaultNotebookName:b?.name,isSaving:"saving"===j.analysisStep})]})]}),j.croppingImage&&(0,t.jsx)(z.f,{imageSrc:j.croppingImage,open:j.isCropperOpen,onClose:j.closeCropper,onCropComplete:j.cropComplete,onMultiCropComplete:j.startBatch}),"review"===j.step&&j.parsedData&&(0,t.jsx)(o.f,{initialData:j.parsedData,onSave:j.saveReviewed,onCancel:j.cancelReview,imagePreview:j.currentImage,initialSubjectId:y||void 0,aiTimeout:j.aiTimeout})]})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(_.f,{}),children:(0,t.jsx)(V,{})})}],952683)},469937,62825,e=>{var t=e.i(843476);let s=(0,e.i(475254).f)("star",[["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"}]]);var a=e.i(111110),i=e.i(975157);let n=[1,2,3,4,5];function r(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["f",0,function({value:e,onChange:r,disabled:l,size:o="sm",showUnrated:c=!0,className:d}){let{t:u}=(0,a.b)(),m=e??0,h="sm"===o?"h-3.5 w-3.5":"h-5 w-5",x=m?u.difficulty.starsLabel.replace("{n}",String(m)):u.difficulty.unrated;return r?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}:${x}`,title:u.difficulty.clearHint,children:[n.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>r(e===m?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=m,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(s,{className:(0,i.f)(h,e<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!m&&c&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):m?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}:${x}`,title:x,children:n.map(e=>(0,t.jsx)(s,{className:(0,i.f)(h,e<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):c?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",d),children:u.difficulty.unrated}):null}],469937),e.s(["i",0,function(e,t="zh"){return("en"===t?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[r(e)]},"h",0,r,"x",0,function(e,t){return(t||"").trim()?"wrong_attempt":r(e)}],62825)},149704,e=>{var t=e.i(843476),s=e.i(111110),a=e.i(975157);e.s(["f",0,function({svg:e,className:i}){let{t:n}=(0,s.b)();return e?(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",i),children:(0,t.jsx)("img",{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,alt:n.figure.alt,className:"mx-auto block h-auto max-w-full rounded border bg-white p-2",style:{maxHeight:360}})}):null}],149704)},574041,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(37727),i=e.i(487486),n=e.i(793479),r=e.i(41931),l=e.i(201276);e.s(["f",0,function({value:e=[],onChange:o,placeholder:c="Enter tags...",className:d="",enterHint:u,subject:m,gradeStage:h}){let[x,p]=(0,s.useState)(""),[f,g]=(0,s.useState)([]),[v,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)(0),w=(0,s.useRef)(null),k=(0,s.useRef)(null),N=(0,s.useCallback)(async t=>{try{let s=new URLSearchParams({q:t});m&&s.append("subject",m),h&&s.append("stage",h);let a=((await r.f.get(`/api/tags/suggestions?${s.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));g(a.slice(0,20)),y(a.length>0),j(0)}catch(e){l.f.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[m,h,e]);(0,s.useEffect)(()=>{x.trim()&&N(x)},[x,N]);let S=t=>{t.trim()&&!e.includes(t.trim())&&(o([...e,t.trim()]),p(""),g([]),y(!1),j(0))},C=t=>{o(e.filter(e=>e!==t))};return(0,s.useEffect)(()=>{let e=e=>{!k.current||k.current.contains(e.target)||w.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${d}`,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:()=>C(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(a.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(n.f,{ref:w,type:"text",value:x,onChange:e=>{p(e.target.value),e.target.value.trim()||(g([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?S(f[b]):x.trim()&&S(x)):"ArrowDown"===t.key?(t.preventDefault(),j(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),j(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),j(0)):"Backspace"===t.key&&!x&&e.length>0&&C(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?c:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),v&&f.length>0&&(0,t.jsx)("div",{ref:k,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,s)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${s===b?"bg-accent":""}`,onClick:()=>S(e),onMouseEnter:()=>j(s),children:e},e))}),x&&!v&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:u?`${u} "${x}"`:`Press Enter to create "${x}"`})]})}])},515288,e=>{var t=e.i(843476),s=e.i(975157);e.s(["N",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,s.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"O",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.f)("px-6",e),...a})},"u",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.f)("text-muted-foreground text-sm",e),...a})},"Y",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.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),...a})},"v",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.f)("leading-none font-semibold",e),...a})}])},86963,e=>{var t=e.i(843476),s=e.i(531278);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:a}=(0,s.b)(),i=[a.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=i},[i])}])}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63804,e=>{let t=(0,e.i(475254).f)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]);e.s(["f",0,t],63804)},356909,e=>{let t=(0,e.i(475254).f)("save",[["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"}]]);e.s(["f",0,t],356909)},283086,e=>{let t=(0,e.i(475254).f)("sparkles",[["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"}]]);e.s(["f",0,t],283086)},620278,e=>{let t=(0,e.i(475254).f)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);e.s(["f",0,t],620278)},952683,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(618566),i=e.i(968553),n=e.i(674558),r=e.i(283086),l=e.i(747819),o=e.i(178119),c=e.i(515288),d=e.i(519455),u=e.i(624687),m=e.i(110204),h=e.i(356909),x=e.i(531278),p=e.i(286536),f=e.i(185873),f=f,g=e.i(367240),v=e.i(111110),y=e.i(511445),b=e.i(574041),j=e.i(438465),w=e.i(967489),k=e.i(952122),N=e.i(294114);function S({onSubmit:e,defaultNotebookId:a,defaultNotebookName:i,isSaving:r}){let{t:l}=(0,v.b)(),[o,C]=(0,s.useState)(null),[E,A]=(0,s.useState)(""),[T,P]=(0,s.useState)(""),[I,$]=(0,s.useState)(""),[H,M]=(0,s.useState)(""),[z,q]=(0,s.useState)(""),[D,L]=(0,s.useState)("unknown"),[_,B]=(0,s.useState)([]),[U,F]=(0,s.useState)(a||""),[R,K]=(0,s.useState)(""),[O,V]=(0,s.useState)("a"),W=async()=>{if(E.trim()){if(!U)return void N.c.warning(l.editor.messages?.selectNotebook||"Please select a notebook");await e({questionText:E.trim(),answerText:T.trim(),analysis:I.trim(),wrongAnswerText:H.trim(),mistakeAnalysis:z.trim(),mistakeStatus:D,knowledgePoints:_,subjectId:U,gradeSemester:R||void 0,paperLevel:O})}},Q=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&(e.preventDefault(),E.trim()&&U&&!r&&W())},G=[{key:"question",label:l.editor?.question||"Question Text",value:E,setter:A,placeholder:l.directEntry.questionPlaceholder,minHeight:"min-h-[180px]",required:!0},{key:"answer",label:l.editor?.answer||"Answer",value:T,setter:P,placeholder:l.directEntry.answerPlaceholder,minHeight:"min-h-[120px]"},{key:"analysis",label:l.editor?.analysis||"Analysis / Explanation",value:I,setter:$,placeholder:l.directEntry.analysisPlaceholder,minHeight:"min-h-[150px]"},{key:"wrongAnswer",label:l.editor?.wrongAnswerText||"Wrong Answer / Work",value:H,setter:M,placeholder:l.directEntry.wrongAnswerPlaceholder,minHeight:"min-h-[100px]"},{key:"mistakeAnalysis",label:l.editor?.mistakeAnalysis||"Mistake Cause Analysis",value:z,setter:q,placeholder:l.directEntry.mistakeAnalysisPlaceholder,minHeight:"min-h-[100px]"}];return(0,t.jsx)(c.N,{className:"rounded-2xl",children:(0,t.jsxs)(c.O,{className:"p-6 space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(n.f,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:l.directEntry.title})]}),(0,t.jsxs)(d.f,{variant:"ghost",size:"sm",onClick:()=>{A(""),P(""),$(""),M(""),q(""),L("unknown"),B([]),K(""),V("a")},disabled:r,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(g.f,{className:"h-4 w-4 mr-1"}),l.directEntry.reset]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(m.f,{children:[l.editor?.selectNotebook||"Select Notebook"," *"]}),(0,t.jsx)(j.f,{value:U,onChange:F})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.gradeSemester||"Grade/Semester"}),(0,t.jsx)("input",{type:"text",value:R,onChange:e=>K(e.target.value),placeholder:l.directEntry.gradeSemesterPlaceholder,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.paperLevel||"Paper Level"}),(0,t.jsxs)(w.d,{value:O,onValueChange:V,children:[(0,t.jsx)(w.P,{children:(0,t.jsx)(w.U,{})}),(0,t.jsxs)(w.r,{children:[(0,t.jsx)(w.T,{value:"a",children:l.editor?.paperLevels?.a||"Paper A"}),(0,t.jsx)(w.T,{value:"b",children:l.editor?.paperLevels?.b||"Paper B"}),(0,t.jsx)(w.T,{value:"other",children:l.editor?.paperLevels?.other||"Other"})]})]})]})]}),G.map(e=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)(m.f,{className:e.required?"text-primary font-semibold":"",children:[e.label," ",e.required&&"*"]}),(0,t.jsx)(d.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>C(o===e.key?null:e.key),disabled:!e.value,children:o===e.key?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.f,{className:"h-3 w-3 mr-1"}),l.directEntry.edit]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.f,{className:"h-3 w-3 mr-1"}),l.directEntry.preview]})})]}),o===e.key?(0,t.jsx)("div",{className:`rounded-md border bg-muted/30 p-4 ${e.minHeight} overflow-auto cursor-pointer`,onClick:()=>C(null),children:(0,t.jsx)(y.f,{content:e.value})}):(0,t.jsx)(u.f,{value:e.value,onChange:t=>e.setter(t.target.value),onKeyDown:Q,placeholder:e.placeholder,className:`${e.minHeight} font-mono text-sm resize-y`,disabled:r})]},e.key)),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(w.d,{value:D,onValueChange:e=>L(e),children:[(0,t.jsx)(w.P,{className:"w-[200px]",children:(0,t.jsx)(w.U,{})}),(0,t.jsxs)(w.r,{children:[(0,t.jsx)(w.T,{value:"not_attempted",children:l.editor?.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(w.T,{value:"wrong_attempt",children:l.editor?.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(w.T,{value:"unknown",children:l.editor?.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(m.f,{children:l.editor?.tags||"Knowledge Points (Press Enter to add)"}),(0,t.jsx)(b.f,{value:_,onChange:B,placeholder:l.editor?.tagsPlaceholder||"Enter knowledge tags, select from suggestions...",enterHint:l.editor?.createTagHint,subject:(0,k.f)(i||null)||void 0}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l.editor?.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 pt-2",children:[(0,t.jsx)(d.f,{onClick:W,disabled:!E.trim()||!U||r,className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",size:"lg",children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.f,{className:"mr-2 h-4 w-4 animate-spin"}),l.directEntry.saving]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.f,{className:"mr-2 h-4 w-4"}),l.directEntry.save]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground text-center",children:l.directEntry.hint})]})]})})}var C=e.i(522016),E=e.i(217255),A=e.i(810980),T=e.i(551804),P=e.i(63804),I=e.i(620278);let $=()=>()=>{};function H({href:e,icon:s,label:a,value:i}){return(0,t.jsxs)(C.default,{href:e,className:"rounded-xl bg-white/15 px-4 py-3 backdrop-blur-sm transition-colors hover:bg-white/20",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-white/75",children:[(0,t.jsx)(s,{className:"h-3.5 w-3.5 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]}),(0,t.jsx)("div",{className:"mt-1 text-2xl font-bold tabular-nums",children:i??"–"})]})}function M({notebookCount:e,itemCount:a,dueCount:i,targetNotebook:n}){let{t:r,language:l}=(0,v.b)(),{data:o}=(0,E.useSession)(),c=(0,s.useSyncExternalStore)($,()=>new Date().getHours(),()=>null),d=null===c?r.common.welcome.replace(/[,,\s]+$/,""):c<12?r.home.greetingMorning:c<18?r.home.greetingAfternoon:r.home.greetingEvening,u=o?.user?.name||o?.user?.email||"";return(0,t.jsxs)("section",{className:"relative overflow-hidden rounded-2xl bg-gradient-to-br from-indigo-600 via-indigo-500 to-violet-500 p-5 text-white shadow-lg shadow-indigo-500/20 md:p-7",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-10 -top-12 h-44 w-44 rounded-full bg-white/10 blur-2xl"}),(0,t.jsx)("div",{className:"pointer-events-none absolute -bottom-16 right-24 h-40 w-40 rounded-full bg-fuchsia-300/20 blur-2xl"}),(0,t.jsxs)("div",{className:"relative flex flex-col gap-5 md:flex-row md:items-end md:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("h1",{className:"text-xl font-bold tracking-tight md:text-2xl",children:[d,u&&`${"zh"===l?",":", "}${u}`]}),(0,t.jsx)("p",{className:"max-w-md text-sm text-white/80",children:r.home.heroSubtitle}),n&&(0,t.jsxs)("p",{className:"inline-flex items-center gap-1.5 rounded-full bg-white/15 px-3 py-1 text-xs font-medium",children:[(0,t.jsx)(I.f,{className:"h-3.5 w-3.5"}),r.home.targetNotebook.replace("{name}",n)]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-3 md:w-96",children:[(0,t.jsx)(H,{href:"/notebooks",icon:A.f,label:r.home.notebookCount,value:e}),(0,t.jsx)(H,{href:"/notebooks",icon:P.f,label:r.home.itemCount,value:a}),(0,t.jsx)(H,{href:"/review",icon:T.f,label:r.home.dueCount,value:i})]})]})]})}var z=e.i(12130),q=e.i(430634),D=e.i(717448),L=e.i(798469),_=e.i(86963),B=e.i(956738),U=e.i(185592),F=e.i(41931),R=e.i(201276),K=e.i(35209),O=e.i(267275);function V(){let{t:e}=(0,v.b)();(0,K.f)(e.pageTitle.home);let c=(0,a.useSearchParams)().get("notebook"),[d,u]=(0,s.useState)([]),[m,h]=(0,s.useState)(null),[x,p]=(0,s.useState)(null),[f,g]=(0,s.useState)("image"),y=c||m,b=y?d.find(e=>e.id===y):void 0,j=(0,O.f)({logPrefix:"[Home]",analyzeSubjectId:y,importSubjectId:c,textNotebook:b&&{id:b.id,name:b.name},onParsed:e=>{let t=e.subject&&d.find(t=>t.name.includes(e.subject)||e.subject.includes(t.name));t&&h(t.id)}});(0,s.useEffect)(()=>{F.f.get("/api/notebooks").then(e=>u(e)).catch(e=>R.f.error("[Home]","Failed to fetch notebooks",{error:e})),F.f.get("/api/review/due?pageSize=1").then(e=>p(e.total)).catch(e=>R.f.error("[Home]","Failed to fetch due reviews",{error:e}))},[]);let w=async e=>{j.setAnalysisStep("saving"),await j.saveQuestion({...e,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",originalImageUrl:""}),j.setAnalysisStep("idle")},k=d.reduce((e,t)=>e+(t._count?.errorItems||0),0),N=[{value:"image",icon:i.f,label:e.app?.uploadImage||"Take Photo"},{value:"text",icon:r.f,label:e.app?.manualInput||"Manual Input"},{value:"direct",icon:n.f,label:e.app?.directInput||"Manual Entry"}];return(0,t.jsxs)("main",{className:"min-h-screen",children:[(0,t.jsx)(B.f,{status:j.analysisStep}),(0,t.jsxs)("div",{className:`mx-auto space-y-6 px-4 py-6 md:px-8 md:py-8 ${"review"===j.step?"max-w-6xl":"max-w-4xl"}`,children:["upload"===j.step&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M,{notebookCount:d.length,itemCount:k,dueCount:x,targetNotebook:c?b?.name:void 0}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(U.f,{options:N,value:f,onChange:g}),j.lastImported&&(0,t.jsx)(q.f,{imported:j.lastImported,onDismiss:j.dismissImported}),j.batchBlobs?(0,t.jsx)(l.f,{blobs:j.batchBlobs,subjectId:c,timeout:j.aiTimeout,onClose:j.closeBatch}):"image"===f?(0,t.jsx)(L.f,{onImageSelect:j.selectImage,isAnalyzing:j.isBusy}):"text"===f?(0,t.jsx)(D.f,{onSubmit:j.submitText,isAnalyzing:j.isBusy,defaultNotebookName:b?.name}):(0,t.jsx)(S,{onSubmit:w,defaultNotebookId:y||void 0,defaultNotebookName:b?.name,isSaving:"saving"===j.analysisStep})]})]}),j.croppingImage&&(0,t.jsx)(z.f,{imageSrc:j.croppingImage,open:j.isCropperOpen,onClose:j.closeCropper,onCropComplete:j.cropComplete,onMultiCropComplete:j.startBatch}),"review"===j.step&&j.parsedData&&(0,t.jsx)(o.f,{initialData:j.parsedData,onSave:j.saveReviewed,onCancel:j.cancelReview,imagePreview:j.currentImage,initialSubjectId:y||void 0,aiTimeout:j.aiTimeout})]})]})}e.s(["default",0,function(){return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(_.f,{}),children:(0,t.jsx)(V,{})})}],952683)},469937,62825,e=>{var t=e.i(843476);let s=(0,e.i(475254).f)("star",[["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"}]]);var a=e.i(111110),i=e.i(975157);let n=[1,2,3,4,5];function r(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["f",0,function({value:e,onChange:r,disabled:l,size:o="sm",showUnrated:c=!0,className:d}){let{t:u}=(0,a.b)(),m=e??0,h="sm"===o?"h-3.5 w-3.5":"h-5 w-5",x=m?u.difficulty.starsLabel.replace("{n}",String(m)):u.difficulty.unrated;return r?(0,t.jsxs)("span",{className:(0,i.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:u.difficulty.clearHint,children:[n.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>r(e===m?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=m,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(s,{className:(0,i.f)(h,e<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!m&&c&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):m?(0,t.jsx)("span",{className:(0,i.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}${u.common.colon}${x}`,title:x,children:n.map(e=>(0,t.jsx)(s,{className:(0,i.f)(h,e<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):c?(0,t.jsx)("span",{className:(0,i.f)("text-xs text-muted-foreground",d),children:u.difficulty.unrated}):null}],469937),e.s(["i",0,function(e,t="zh"){return("en"===t?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[r(e)]},"h",0,r,"x",0,function(e,t){return(t||"").trim()?"wrong_attempt":r(e)}],62825)},149704,e=>{var t=e.i(843476),s=e.i(111110),a=e.i(975157);e.s(["f",0,function({svg:e,className:i}){let{t:n}=(0,s.b)();return e?(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",i),children:(0,t.jsx)("img",{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,alt:n.figure.alt,className:"mx-auto block h-auto max-w-full rounded border bg-white p-2",style:{maxHeight:360}})}):null}],149704)},574041,e=>{var t=e.i(843476),s=e.i(271645),a=e.i(37727),i=e.i(487486),n=e.i(793479),r=e.i(41931),l=e.i(201276);e.s(["f",0,function({value:e=[],onChange:o,placeholder:c="Enter tags...",className:d="",enterHint:u,subject:m,gradeStage:h}){let[x,p]=(0,s.useState)(""),[f,g]=(0,s.useState)([]),[v,y]=(0,s.useState)(!1),[b,j]=(0,s.useState)(0),w=(0,s.useRef)(null),k=(0,s.useRef)(null),N=(0,s.useCallback)(async t=>{try{let s=new URLSearchParams({q:t});m&&s.append("subject",m),h&&s.append("stage",h);let a=((await r.f.get(`/api/tags/suggestions?${s.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));g(a.slice(0,20)),y(a.length>0),j(0)}catch(e){l.f.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[m,h,e]);(0,s.useEffect)(()=>{x.trim()&&N(x)},[x,N]);let S=t=>{t.trim()&&!e.includes(t.trim())&&(o([...e,t.trim()]),p(""),g([]),y(!1),j(0))},C=t=>{o(e.filter(e=>e!==t))};return(0,s.useEffect)(()=>{let e=e=>{!k.current||k.current.contains(e.target)||w.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${d}`,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:()=>C(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(a.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(n.f,{ref:w,type:"text",value:x,onChange:e=>{p(e.target.value),e.target.value.trim()||(g([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?S(f[b]):x.trim()&&S(x)):"ArrowDown"===t.key?(t.preventDefault(),j(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),j(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),j(0)):"Backspace"===t.key&&!x&&e.length>0&&C(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?c:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),v&&f.length>0&&(0,t.jsx)("div",{ref:k,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,s)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${s===b?"bg-accent":""}`,onClick:()=>S(e),onMouseEnter:()=>j(s),children:e},e))}),x&&!v&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:u?`${u} "${x}"`:`Press Enter to create "${x}"`})]})}])},515288,e=>{var t=e.i(843476),s=e.i(975157);e.s(["N",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card",className:(0,s.f)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...a})},"O",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-content",className:(0,s.f)("px-6",e),...a})},"u",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-description",className:(0,s.f)("text-muted-foreground text-sm",e),...a})},"Y",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-header",className:(0,s.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),...a})},"v",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"card-title",className:(0,s.f)("leading-none font-semibold",e),...a})}])},86963,e=>{var t=e.i(843476),s=e.i(531278);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:a}=(0,s.b)(),i=[a.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=i},[i])}])}])})();
|