wrong-notebook 2026.11.6 → 2026.11.8-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +14 -14
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/eula/accept/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js +2 -2
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/telemetry/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +14 -14
- package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/route.js.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.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +15 -15
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +18 -18
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +14 -14
- package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js +14 -14
- 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 +14 -13
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +16 -15
- package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/retag/route.js +19 -17
- package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/route.js +1 -1
- package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +14 -13
- 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 +14 -13
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route.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 +16 -16
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/eula/status/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +16 -15
- 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 +13 -13
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +14 -14
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +12 -11
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +11 -11
- 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 +14 -13
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +19 -18
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +21 -21
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js +16 -16
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/read/route.js +20 -20
- package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/retry/route.js +21 -21
- package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/route.js +20 -20
- package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/start/route.js +20 -20
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +20 -20
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +22 -22
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/read/route.js +22 -22
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +20 -20
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/route.js +22 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +20 -20
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +18 -17
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +18 -18
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +16 -15
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +10 -10
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +14 -14
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +17 -17
- 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.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +16 -15
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +6 -6
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +14 -14
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +14 -14
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/telemetry/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.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/ai-consent/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +16 -15
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/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/eula/page.js.nft.json +1 -1
- package/.next/server/app/eula/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0u_jxskyhdl4l._.js → [root-of-the-server]__007euzraef-1_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0-fpl-4ce-iyj._.js → [root-of-the-server]__00d4vtmsmiyd_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1-gpls663uhw2._.js → [root-of-the-server]__00lpxd_gni_y7._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1-ityr2iq9e-w._.js → [root-of-the-server]__00qar_0vt8v5r._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__00ry5fb1607z0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__07fsx1y8aa-7l._.js → [root-of-the-server]__02m42nibzxxmr._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09re9q5tsyprr._.js → [root-of-the-server]__046l8-2oecq5e._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__04ke3ybbbyqy7._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__07tka5n0kbed7._.js → [root-of-the-server]__06g0t8zt3udt7._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09tf4b1-063yn._.js → [root-of-the-server]__06t523lsa-xt5._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__07za3z2qd-ri5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__09a7mqqvpb5iw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__09uxdlb0atubd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_3i3iyk5i5fu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ar2vbvo840d-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0d3nasp559369._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__06p98x_tv1foa._.js → [root-of-the-server]__0d_63r679gzzq._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ddx0pk-g57hh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evnxpsv44y-s._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0yxdic8niq68m._.js → [root-of-the-server]__0fxflgag7lsn4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0g2y0mex0x8zf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gjk0_s945vrt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gkhutsleo1es._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gvfx4rsinijb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ifivl2todel2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0jrho_9vk0dgw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0jutgg41pd-47._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0kc9gy1644-op._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0dqk6jms3f_58._.js → [root-of-the-server]__0m1vmtwh8l5-k._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0medeb4h2gk5t._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0e6jc57nsnwz0._.js → [root-of-the-server]__0ms1rulcx_yuq._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0s1-3vrrlq54r._.js → [root-of-the-server]__0o5b_c35hufmg._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0prgnysrc2l5k._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__14g_ger_h73lc._.js → [root-of-the-server]__0q520ovb9262s._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0qwtk85kstlpq._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0r3grb-nk-tkn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rwbb97vk-mfk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0smp3m3n89xs_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vg4zd1ewm4lh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vyu7gon1mqle._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0w6c1msz1xtdu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xh5bb2c_6c9c._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1s4kh7tqvbssy._.js → [root-of-the-server]__0yk3ow36t_w2_._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0hzh1vkuuv1uk._.js → [root-of-the-server]__0zj60abydj_ho._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0zsd45jad6b40._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0abb0_151j5sb._.js → [root-of-the-server]__0ztucyaloy2ub._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0zux7hsnes_j2._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1u64nidrg-gwq._.js → [root-of-the-server]__1-i8tof72l68m._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__10--fi__uy8y7._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0haqb2u-0wd6e._.js → [root-of-the-server]__14_mjy9lqgp99._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__14b8pj1sucy1-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16t85d4p3aldo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17o5ki60ndwjg._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1o2w0n3t390ih._.js → [root-of-the-server]__17tyjwy7wmx2z._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1_do4zybj0nvi._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1a71wr5gfcvuh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1bd0rsh28altd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1bz0s-wy2cxhl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ege7h8tb5rk0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gb1x1ubkdwig._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gsm8s81ac08k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hc1bcnovtwo2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jaf9l240am9o._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ln0042a-s6yz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1m2fnptuk23jt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ms_0h40h2rbg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1nasewrsaxrlv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1nw9nkdb5uv4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ogeha9-ljbre._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1p5s772lt24dg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1pxyy29_t_ru1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1s_ky5a7nhgas._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1txu2n-l6c6yu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ulrsdu0e8fjb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vngkcd8tjzqw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wi-k0dtwwxx3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wvm4n7d69s3x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1x-u1u9mrt630._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xpcaqsei77n2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xx_3auad-kml._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1y0omyblg9j35._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1cda8yccka8pg._.js → [root-of-the-server]__1ya8xaf2pmzqp._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1z2d4j9-oei44._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1znqtfuuspj0w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__205o-7lep9jth._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__20c3hyqykubh2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__20pn9h3od2anc._.js +3 -0
- package/.next/server/chunks/_02qwqg9i39x4_._.js +2 -2
- package/.next/server/chunks/_07_mi9-a9cp01._.js +1 -1
- package/.next/server/chunks/_0b2q7l141kz7e._.js +1 -1
- package/.next/server/chunks/_0b9gke5b17vzh._.js +1 -1
- package/.next/server/chunks/_0euocr-coaqik._.js +3 -0
- package/.next/server/chunks/_0nw90thm3bo4l._.js +3 -0
- package/.next/server/chunks/_0tz5wpjdgntj3._.js +1 -1
- package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
- package/.next/server/chunks/_13ffmxv8qrwi0._.js +1 -1
- package/.next/server/chunks/_1b-7g4thtxfnp._.js +1 -1
- package/.next/server/chunks/_1csx8ckltgali._.js +2 -2
- package/.next/server/chunks/_1gtuhmdu6udof._.js +2 -2
- package/.next/server/chunks/_1h650rc49jtvn._.js +1 -1
- package/.next/server/chunks/_1pvqo-qnv-nqm._.js +1 -1
- package/.next/server/chunks/_1yvd01woddaxt._.js +2 -2
- package/.next/server/chunks/_1yx16tn5391kx._.js +3 -0
- package/.next/server/chunks/{src_lib_0osgsup3n2ypg._.js → src_lib_0-lb3lq-kl_f_._.js} +2 -2
- package/.next/server/chunks/src_lib_0gonw_e9wzfyz._.js +3 -0
- package/.next/server/chunks/src_lib_0nrx0t1s6u93x._.js +3 -0
- package/.next/server/chunks/src_lib_0oxhoj8rkufoe._.js +3 -0
- package/.next/server/chunks/src_lib_0qoy_28svqcku._.js +3 -0
- package/.next/server/chunks/src_lib_1-9hy2bx_0k7z._.js +3 -0
- package/.next/server/chunks/src_lib_11ce6iw15f7y2._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +59 -48
- package/.next/server/chunks/src_lib_1b_d9xsuzjp3e._.js +3 -0
- package/.next/server/chunks/src_lib_1q3pbd9tjh5t5._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- package/.next/server/chunks/src_lib_config_index_ts_14-9cq9wn5r30._.js +1 -1
- package/.next/server/chunks/src_lib_notebook-scope_ts_06eipvr6xztlf._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +1 -1
- package/.next/server/chunks/{src_lib_telemetry_server_ts_03e7c8dt4slbj._.js → src_lib_telemetry_server_ts_0_290xuag9bk5._.js} +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__212x4ujehvgfr._.js → [root-of-the-server]__04nhi0374i4dp._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0w77craeuuak9._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__124rb-z-nm7o5._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1xgyz8jfhhs4j._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1yhcc4i7ps6s5._.js +3 -0
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +1 -1
- package/.next/server/chunks/ssr/_0a0h6yv1_61zn._.js +3 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/_0htmdb0udewwn._.js +3 -0
- package/.next/server/chunks/ssr/{_1yclgq1umgl4p._.js → _0mp06uu5odp8m._.js} +2 -2
- package/.next/server/chunks/ssr/_0qbp5_0h-b69q._.js +3 -0
- package/.next/server/chunks/ssr/_0t-venqf7b-4q._.js +3 -0
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +1 -1
- package/.next/server/chunks/ssr/_127aw5h992s9d._.js +4 -0
- package/.next/server/chunks/ssr/{_1x-_hs_sw5z1x._.js → _12ho9vlz1_nzo._.js} +1 -1
- package/.next/server/chunks/ssr/_14h_732sdmo6b._.js +3 -0
- package/.next/server/chunks/ssr/{_18c4g09vqhp-3._.js → _15n156j82yi_d._.js} +1 -1
- package/.next/server/chunks/ssr/_1wt7hpzajqoju._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_133xkxfckw9tf._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_1rxrrb2v6tutq._.js → node_modules_16_s8zyr3620u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1klwivk06jo8p.js → node_modules_heic-to_dist_csp_heic-to_1brtdb7tndxid.js} +1 -1
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +1 -1
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/src_1o5f_wr8vv-x0._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_page_tsx_08njm-5-txm8_._.js +1 -1
- package/.next/server/chunks/ssr/src_components_image-cropper_tsx_0pcp8-ifruyx-._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +78 -12
- package/.next/server/chunks/ssr/src_contexts_LanguageContext_tsx_0r6xucmeu1k5z._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/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/{26r74vzqszcs5.js → 05f13kdl-5r-c.js} +2 -2
- package/.next/static/chunks/0_cnc6gz9gqm8.js +264 -0
- package/.next/static/chunks/0a_jerp9yv-om.js +2 -0
- package/.next/static/chunks/0cpyqet_sqmdp.js +1 -0
- package/.next/static/chunks/0jyyrmsnlj04i.js +13 -0
- package/.next/static/chunks/0l8auoibmum0r.js +1 -0
- package/.next/static/chunks/0wn8i_n7wpzhy.js +8 -0
- package/.next/static/chunks/16qwioc_q7wfz.js +8 -0
- package/.next/static/chunks/1abwe-ep5g7rb.js +1 -0
- package/.next/static/chunks/{045cs_rolnmjd.js → 1joajsaunlqm-.js} +1 -1
- package/.next/static/chunks/{2da48dkivw_8a.js → 1kzmqap7asc46.js} +1 -1
- package/.next/static/chunks/2_0xdmmmic5_l.js +1 -0
- package/.next/static/chunks/{1ep255e058_3b.js → 2hl62fuxy23ky.js} +1 -1
- package/.next/static/chunks/{037g92rz3qjm_.js → 2hl9d1rdb9hkq.js} +1 -1
- package/.next/static/chunks/2hlvwtql2eiqy.js +1 -0
- package/.next/static/chunks/2xn7pbo1omgg1.css +3 -0
- package/.next/static/chunks/3-gt5s84owxj2.js +1 -0
- package/.next/static/chunks/3mnblmrqi_tcr.js +1 -0
- package/.next/static/chunks/3z7dqcxfd75wa.js +2 -0
- package/.next/static/chunks/{2aifo9g5v8kaq.js → 3zg1w_3pn3z75.js} +1 -1
- package/dist-scripts/scripts/rebuild-system-tags.js +3 -0
- package/dist-scripts/scripts/seed-university-grades.js +27 -0
- package/dist-scripts/src/lib/tags/data/index.js +1 -0
- package/dist-scripts/src/lib/tags/data/university.js +17 -0
- package/dist-scripts/src/lib/tags/seed/university-grades.js +32 -0
- package/launcher.js +11 -8
- package/package.json +1 -1
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__017-5vo1u87jc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__063yyz_9kliuv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0c7btjinzvmj3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0dpk56pxg3xh0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ehmpofr_lag1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0eksw09qkfp-z._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0g-4jw7pw15nc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0h82l-5c5x36d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0hiv6ho-1ced7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0hypc-hsxhr5m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0k0-c4brxlw-a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0k_gflpw7m236._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0km5gt590jg97._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0mgpyw67pdn1h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0mztg1mhr7xw2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ni89i2lbtpir._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nqc3uu_4-moq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nu-b-ap5ix-i._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0o72hu-jqh_kc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0q6of-nw_4lh-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0qyqo6m38w5z7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0u2_7w3b4f_c1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xj4u1plpkmot._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0y0v79zd4u8g0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zqnlrgdhvyvb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-4kz5lwzu127._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-sow_jqu0ca5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-uyaylss8lu0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-w4-6dnik6p3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1027cegzwspbv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__106c17t6fe2s5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11jqvp7ydid38._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11r530r-p2-n1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11vx3bv6nef_u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__123mmhkfg7y-y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__128lq-3z36850._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1752yqg4c8167._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__189bp--__jedg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1a6hu09up7_co._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1a_qtu7129ho6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1add4tef8riya._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1bdwqmj_bolrp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1c6ti0495jkvs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1drgctbrp51zt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dxi3-rtvg91t._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1edl3mpo9urp-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g-_sfdjkcyjn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hdm1t67mdd4k._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1iy2ggxzd3waf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1j749v4z8i78u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1jxcq-zd_xo0q._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kwxq6h_s1nw5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lvrzjzsadms_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m6lbueple6ww._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1oynoaepf6enj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1p1k9cmts3crw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1purwqhaw584e._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qe3_j74hbt45._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qp07f8m-pjqu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qr9n5maimy60._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1qzw098fzq6r4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1socdh68x-_68._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t9nlkh7u11c9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1th48iu_ygy4m._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1tznn8iry7lns._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1uxhodktwnw08._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1uxxzcdw7avod._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1v6k289his7kx._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1y-867werf6-u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20an2fcjw_r3_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20vr6ko8apn2_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__2113u3fu2bhjr._.js +0 -3
- package/.next/server/chunks/_0ji5ibtw-dxaz._.js +0 -3
- package/.next/server/chunks/_1almac7c09mp4._.js +0 -3
- package/.next/server/chunks/src_lib_0iplyaedosuse._.js +0 -3
- package/.next/server/chunks/src_lib_152-vqegmmtew._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__09g6pf6gfjb-i._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__10y8dor72926b._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1t2h6rz1x-gwk._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1vj6th0gehszy._.js +0 -3
- package/.next/server/chunks/ssr/_0oo8k-upgx7hb._.js +0 -3
- package/.next/server/chunks/ssr/_117fl8dk5qci2._.js +0 -4
- package/.next/server/chunks/ssr/_126p5i1ynlykc._.js +0 -3
- package/.next/server/chunks/ssr/_1bhvzfiuz3s7j._.js +0 -3
- package/.next/server/chunks/ssr/_1fx20-rihohax._.js +0 -3
- package/.next/server/chunks/ssr/_1qft_czd2ss62._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_0fzknrrqq1bjz._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_1fwhuynv-5kcg._.js +0 -3
- package/.next/static/chunks/059tntkmkgtf4.js +0 -1
- package/.next/static/chunks/0et32jq7vmu34.js +0 -13
- package/.next/static/chunks/0li0d9ufsgsk-.js +0 -1
- package/.next/static/chunks/0ovv_fq59i4y4.js +0 -1
- package/.next/static/chunks/0sl4wa-ghh5g7.js +0 -2
- package/.next/static/chunks/0xze-7xwdgel2.js +0 -8
- package/.next/static/chunks/1qb_yt4hvopfn.js +0 -8
- package/.next/static/chunks/25jnmrgxyy1tx.js +0 -1
- package/.next/static/chunks/2hroxfe_3_b0q.js +0 -1
- package/.next/static/chunks/32c19i38gl4zx.js +0 -1
- package/.next/static/chunks/3bq587l754kfc.js +0 -198
- package/.next/static/chunks/3bv2u8mcme1z4.css +0 -3
- package/.next/static/chunks/3g-l81pwd4ggm.js +0 -1
- package/.next/static/chunks/3m5wl0uzrt4sz.js +0 -2
- /package/.next/static/{vv9z38w24wHWYLUAbjtdk → 8txIetq9muxlc0OqsgaeI}/_buildManifest.js +0 -0
- /package/.next/static/{vv9z38w24wHWYLUAbjtdk → 8txIetq9muxlc0OqsgaeI}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{vv9z38w24wHWYLUAbjtdk → 8txIetq9muxlc0OqsgaeI}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[557230,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230)},144952,206194,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);var m=a.i(190622),n=a.i(291938),o=a.i(960927),p=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:q,language:r}=(0,k.b)(),[s,t]=(0,c.useState)(!1),[u,v]=(0,c.useState)(null),w=a=>q.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),x=async()=>{let b=function(a,b){let c=a.aiProvider;if("openai"===c){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===c){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:c,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:b}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===c)return{ok:!0,body:{provider:c,model:a.minimaxCode?.model,language:b}};if("gemini"===c||"anthropic"===c||(0,m.j)(c)){let d=a[c];return d?.apiKey?{ok:!0,body:{provider:c,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:b}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,r);if(!b.ok){if("UNSUPPORTED_PROVIDER"===b.error)return;v({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===b.error?q.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":q.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}t(!0),v(null);try{v(await n.k.post("/api/ai/test",b.body))}catch(a){p.V.error("[AiConnectionTest]","AI connection test failed",{error:a}),v({success:!1,textSupport:!1,visionSupport:!1,textError:(0,o.Z)(a)})}finally{t(!1)}};return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:x,disabled:s||g,className:"flex-1",children:[s?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),s?q.settings?.ai?.testing||"Testing...":q.settings?.ai?.testConnection||"Test Connection"]}),h]}),u&&(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${u.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[(0,b.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:u.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}),(0,b.jsx)("span",{className:"text-green-700 dark:text-green-300",children:q.settings?.ai?.testSuccess||"Connection Successful"}),u.modelInfo&&(0,b.jsxs)("span",{className:"text-green-600 text-xs",children:["(",u.modelInfo,")"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),(0,b.jsx)("span",{className:"text-red-700 dark:text-red-300",children:q.settings?.ai?.testFailed||"Connection Failed"})]})}),u.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[q.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",q.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[q.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),u.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",q.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",u.visionError?w(u.visionError):q.settings?.ai?.notSupported||"Not Supported"]})]}),!u.visionSupport&&(0,b.jsx)(l,{detail:u.visionErrorDetail}),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:q.settings?.ai?.testNetworkNote})]}),!u.success&&u.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:w(u.textError)}),!u.success&&(0,b.jsx)(l,{detail:u.textErrorDetail})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(492710),i=a.i(612416),j=a.i(340898),k=a.i(168370),l=a.i(474896),m=a.i(557230),n=a.i(519783),o=a.i(786304),p=a.i(866718),q=a.i(895605),r=a.i(563658),s=a.i(550194),t=a.i(529759),u=a.i(986705);function v({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:h,onCheckin:i}){let j,{t:k}=(0,s.b)(),{timeZone:l}=(0,t.M)(),m=k.settings?.ai?.minimaxCode,{today:n,last:p}=a,w=p&&"failed"!==p.status?p:null,x=!!(n?.checkedToday||w),y=String(w?.points??(n?n.points+n.bonusPoints:0)),z=String(w?.streakDays??n?.streakDays??0);return j=w?.trigger==="auto"&&"checked-in"===w.status?(m?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,u.r)(w.at,"HH:mm",l)).replace("{points}",y).replace("{days}",z):x?(m?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(m?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?m?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":m?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:m?.checkinToday||"Today's check-in"}),(0,b.jsxs)(o.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(q.f,{className:"mr-1 h-3 w-3"}),x?m?.checkinSuccess||"Checked in":m?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:i,disabled:h,children:[h&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:j}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:m?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m?.autoCheckinHint})]}),(0,b.jsx)(r.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let w=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var x=a.i(572131),y=a.i(291938),z=a.i(960927),A=a.i(710302),B=a.i(630534);function C({value:a,onChange:f}){let{t:g}=(0,s.b)(),h=g.settings?.ai?.minimaxCode,{status:i,loading:j,pending:q,busy:r,refresh:t,login:u,logout:D,checkin:E}=function(){let{t:a}=(0,s.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,x.useState)(null),[e,f]=(0,x.useState)(!0),[g,h]=(0,x.useState)(null),[i,j]=(0,x.useState)(!1),k=(0,x.useRef)(null),l=(0,x.useCallback)(async()=>{f(!0);try{let a=await y.k.get("/api/minimax-code");d(a),a.pendingLogin&&h(a.pendingLogin)}catch(a){B.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,x.useEffect)(()=>{l()},[l]),(0,x.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await y.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){k.current=setTimeout(c,g.intervalMs);return}h(null),"ok"===d.status?A.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?A.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&A.c.error(b?.loginDenied||"Authorization declined"),l()}catch(c){if(a)return;h(null),A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(c)}`)}};return k.current=setTimeout(c,g.intervalMs),()=>{a=!0,k.current&&clearTimeout(k.current)}},[g,l,b]);let m=async()=>{j(!0);try{await y.k.delete("/api/minimax-code"),h(null),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}},n=async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/checkin",{});"failed"===a.status?A.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):A.c.success(b?.checkinSuccess||"Checked in"),await l()}catch(a){A.c.error((0,z.Z)(a))}finally{j(!1)}};return{status:c,loading:e,pending:g,busy:i,refresh:l,login:async()=>{j(!0);try{let a=await y.k.post("/api/minimax-code/login",{});h(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){A.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,z.Z)(a)}`)}finally{j(!1)}},logout:m,checkin:n}}(),F=i?.login??"none",G=i?.account,H=i?.credits,I={none:h?.statusNone||"Not signed in",active:h?.statusActive||"Signed in",expired:h?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":h?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:h?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:j,"aria-label":h?.refresh||"Refresh",children:(0,b.jsx)(n.f,{className:`h-4 w-4 ${j?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(o.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:h?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(h?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:h?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&i&&(0,b.jsx)(v,{checkin:i.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:r,onCheckin:()=>void E()}),q?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),h?.waiting]}),q.userCode&&(0,b.jsxs)("p",{children:[h?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:q.userCode})]}),(0,b.jsxs)("a",{href:q.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[h?.openLink||"Open the authorization page"," ",(0,b.jsx)(k.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:r,children:[r?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(l.f,{className:"mr-2 h-4 w-4"}),"none"===F?h?.login||"Sign in with browser":h?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void D(),disabled:r,children:[(0,b.jsx)(m.f,{className:"mr-2 h-4 w-4"}),h?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:h?.model||"Model"}),(0,b.jsx)(p.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:w.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:h?.risk})]})}var D=a.i(403512),E=a.i(951675),F=a.i(175592),G=a.i(676330),H=a.i(152679),I=a.i(148463);function J({value:a,onChange:c}){let{t:g}=(0,s.b)(),h=(0,I.f)("openai"),i=a?.instances||[],j=a?.activeInstanceId,k=i.find(a=>a.id===j),l=(b,d)=>{c({...a,instances:i.map(a=>a.id===j?{...a,[b]:d}:a)})},m=async()=>{if(!j||!await (0,A.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=i.filter(a=>a.id!==j);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(i.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${i.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...i,a],activeInstanceId:a.id})},disabled:i.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(D.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),i.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:j||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:i.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),i.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:m,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(E.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),i.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),k&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.name||"",onChange:a=>l("name",a.target.value),placeholder:"e.g. GLM-4V",className:k.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:k.apiKey||"",onChange:a=>l("apiKey",a.target.value),placeholder:"sk-...",className:k.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(p.f,{value:k.baseUrl||"",onChange:a=>l("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:k.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(F.f,{provider:"openai",apiKey:k.apiKey,baseUrl:k.baseUrl,currentModel:k.model,onModelChange:a=>l("model",a),docsHref:h?.models})]})]})}function K({provider:a}){let{t:c}=(0,s.b)(),d=c.settings.ai.providerDocs,e=(0,I.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(k.f,{className:"h-3 w-3"})]},a.href))]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,s.b)(),g=L.$[a],h=(a,b)=>d({...c,[a]:b}),i={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.jsxs)("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-xs text-green-800 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",children:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(G.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(H.f,{value:c?.apiKey||"",onChange:a=>h("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(p.f,{value:c?.baseUrl||"",onChange:a=>h("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(F.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>h("model",a),docsHref:g.docs.models})]})}a.s(["f",0,function({config:a,setConfig:k,loading:l,saving:m,onSave:n}){let{t:o,language:p}=(0,s.b)();return l?(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,b.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:o.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>k(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:"minimax",children:(0,L.z)("minimax",p)}),(0,b.jsx)(f.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),L.U.filter(a=>"minimax"!==a).map(a=>(0,b.jsx)(f.T,{value:a,children:(0,L.z)(a,p)},a)),(0,b.jsx)(f.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,b.jsx)(f.T,{value:"azure",children:"Azure OpenAI"}),(0,b.jsx)(f.T,{value:"openai",children:"OpenAI / Compatible"}),(0,b.jsx)(f.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,b.jsx)(K,{provider:a.aiProvider})]}),"openai"===a.aiProvider&&(0,b.jsx)(J,{value:a.openai,onChange:a=>k(b=>({...b,openai:a}))}),"gemini"===a.aiProvider&&(0,b.jsx)(j.f,{value:a.gemini,onChange:a=>k(b=>({...b,gemini:a}))}),"minimax-code"===a.aiProvider&&(0,b.jsx)(C,{value:a.minimaxCode,onChange:a=>k(b=>({...b,minimaxCode:a}))}),"anthropic"===a.aiProvider&&(0,b.jsx)(h.f,{value:a.anthropic,onChange:a=>k(b=>({...b,anthropic:a}))}),(0,L.j)(a.aiProvider)&&(0,b.jsx)(M,{provider:a.aiProvider,value:a[a.aiProvider],onChange:a=>k(b=>({...b,[b.aiProvider]:a}))},a.aiProvider),"azure"===a.aiProvider&&(0,b.jsx)(i.f,{value:a.azure,onChange:a=>k(b=>({...b,azure:a}))}),(0,b.jsx)(g.f,{config:a,saving:m,saveButton:(0,b.jsxs)(d.f,{onClick:n,disabled:m,className:"flex-1",children:[m&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),o.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,u.L)(a.timeZone??u.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
|
|
1
|
+
(()=>{"use strict";module.exports=[557230,a=>{var b=a.i(164831);let c={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],557230)},144952,206194,442243,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(613412),e=a.i(875160),f=a.i(211134),g=a.i(164831);let h={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};h.node;let i=(0,g.f)(h);var j=a.i(699570),k=a.i(550194);function l({detail:a}){let{t:c}=(0,k.b)();return a?(0,b.jsxs)("p",{className:"mt-1 rounded bg-background/60 px-2 py-1 font-mono text-[11px] leading-relaxed text-red-700 dark:text-red-300 break-all select-text",children:[(0,b.jsx)("span",{className:"font-sans text-muted-foreground",children:c.settings.ai.providerErrorDetail}),a]}):null}a.s(["f",0,l],206194);var m=a.i(190622);let n=[...m.U,"minimax-code","anthropic","azure","openai","gemini"];function o(a,b){return"minimax-code"===a?"MiniMax Code OAuth":(0,m.j)(a)?(0,m.z)(a,b):({anthropic:"Anthropic / Compatible",azure:"Azure OpenAI",openai:"OpenAI / Compatible",gemini:"Google Gemini"})[a]??a}function p(a,b){if("minimax-code"===b)return!0;if("openai"===b){let b=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return!!b?.apiKey?.trim()}if("azure"===b)return!!(a.azure?.apiKey?.trim()&&a.azure?.endpoint?.trim()&&a.azure?.deploymentName?.trim());let c=a[b];return!!c?.apiKey?.trim()}function q(a,b){return a&&n.includes(a)?a:b}function r(a,b){let c=q(a.aiProvider,"minimax"),d=q(a.routing?.[b],c),e=a.routing?.fallback?q(a.routing.fallback,c):null,f=e&&e!==d&&p(a,e)?e:null;return{primary:d,fallback:f}}a.s(["q",0,n,"V",0,o,"G",0,p,"i",0,r],442243);var s=a.i(291938),t=a.i(960927),u=a.i(630534);a.s(["f",0,function({config:a,saving:g,saveButton:h}){let{t:n,language:p}=(0,k.b)(),[q,v]=(0,c.useState)(!1),[w,x]=(0,c.useState)(null),y=a=>n.settings?.ai?.errors?.[a]||a.replace("UNKNOWN:",""),z=async b=>{let c=function(a,b,c){if("openai"===b){let d=a.openai?.instances?.find(b=>b.id===a.openai?.activeInstanceId);return d?.apiKey?{ok:!0,body:{provider:b,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:c}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===b){let d=a.azure;return d?.apiKey&&d.endpoint&&d.deploymentName?{ok:!0,body:{provider:b,apiKey:d.apiKey,endpoint:d.endpoint,deploymentName:d.deploymentName,apiVersion:d.apiVersion,model:d.model,language:c}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===b)return{ok:!0,body:{provider:b,model:a.minimaxCode?.model,language:c}};if("gemini"===b||"anthropic"===b||(0,m.j)(b)){let d=a[b];return d?.apiKey?{ok:!0,body:{provider:b,apiKey:d.apiKey,baseUrl:d.baseUrl,model:d.model,language:c}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(a,b,p);if(!c.ok)return"UNSUPPORTED_PROVIDER"===c.error?{success:!1,textSupport:!1,visionSupport:!1,textError:c.error}:{success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===c.error?n.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":n.settings?.ai?.validationApiKeyRequired||"API Key is required"};try{return await s.k.post("/api/ai/test",c.body)}catch(a){return u.V.error("[AiConnectionTest]","AI connection test failed",{error:a,provider:b}),{success:!1,textSupport:!1,visionSupport:!1,textError:(0,t.Z)(a)}}},A=async()=>{v(!0),x(null);try{let b=[];for(let c of function(a){let b=new Set;for(let c of["vision","text"]){let d=r(a,c);b.add(d.primary),d.fallback&&b.add(d.fallback)}return[...b]}(a))b.push({provider:c,result:await z(c)}),x([...b])}finally{v(!1)}},B=null!==w&&w.every(({result:a})=>a.success),C=(w?.length??0)>1;return(0,b.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(j.f,{type:"button",variant:"outline",onClick:A,disabled:q||g,className:"flex-1",children:[q?(0,b.jsx)(e.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(i,{className:"mr-2 h-4 w-4"}),q?n.settings?.ai?.testing||"Testing...":n.settings?.ai?.testConnection||"Test Connection"]}),h]}),w&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:`flex items-center gap-2 text-sm font-medium ${B?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300"}`,children:[B?(0,b.jsx)(d.f,{className:"h-4 w-4 text-green-600"}):(0,b.jsx)(f.f,{className:"h-4 w-4 text-red-600"}),B?n.settings?.ai?.testSuccess||"Connection Successful":n.settings?.ai?.testFailed||"Connection Failed"]}),w.map(({provider:a,result:c})=>(0,b.jsxs)("div",{className:`p-3 rounded-md text-sm ${c.success?"bg-green-50 dark:bg-green-950/40 border border-green-200 dark:border-green-900":"bg-red-50 dark:bg-red-950/40 border border-red-200 dark:border-red-900"}`,children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium mb-1",children:[c.success?(0,b.jsx)(d.f,{className:"h-3.5 w-3.5 text-green-600"}):(0,b.jsx)(f.f,{className:"h-3.5 w-3.5 text-red-600"}),o(a,p),c.modelInfo&&(0,b.jsxs)("span",{className:"text-muted-foreground",children:["(",c.modelInfo,")"]})]}),c.success&&(0,b.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[n.settings?.ai?.textSupport||"Text Generation",":"]}),(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",n.settings?.ai?.supported||"Supported"]})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsxs)("span",{className:"text-muted-foreground",children:[n.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),c.visionSupport?(0,b.jsxs)("span",{className:"text-green-600",children:["✓ ",n.settings?.ai?.supported||"Supported"]}):(0,b.jsxs)("span",{className:"text-amber-600",children:["✗ ",c.visionError?y(c.visionError):n.settings?.ai?.notSupported||"Not Supported"]})]}),!c.visionSupport&&(0,b.jsx)(l,{detail:c.visionErrorDetail})]}),!c.success&&c.textError&&(0,b.jsx)("p",{className:"text-red-600 text-xs mt-1",children:y(c.textError)}),!c.success&&(0,b.jsx)(l,{detail:c.textErrorDetail})]},a)),(0,b.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:n.settings?.ai?.testNetworkNote})]})]})}],144952)},151304,439830,a=>{var b=a.i(187924),c=a.i(875160),d=a.i(699570),e=a.i(870430),f=a.i(580701),g=a.i(144952),h=a.i(550194),i=a.i(591119),j=a.i(492710),k=a.i(612416),l=a.i(340898),m=a.i(168370),n=a.i(474896),o=a.i(557230),p=a.i(519783),q=a.i(786304),r=a.i(866718),s=a.i(895605),t=a.i(563658),u=a.i(529759),v=a.i(986705);function w({checkin:a,autoCheckin:f,onAutoCheckinChange:g,busy:i,onCheckin:j}){let k,{t:l}=(0,h.b)(),{timeZone:m}=(0,u.M)(),n=l.settings?.ai?.minimaxCode,{today:o,last:p}=a,r=p&&"failed"!==p.status?p:null,x=!!(o?.checkedToday||r),y=String(r?.points??(o?o.points+o.bonusPoints:0)),z=String(r?.streakDays??o?.streakDays??0);return k=r?.trigger==="auto"&&"checked-in"===r.status?(n?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,v.r)(r.at,"HH:mm",m)).replace("{points}",y).replace("{days}",z):x?(n?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",y).replace("{days}",z):p?.status==="failed"?(n?.checkinFailed||"Check-in failed: {error}").replace("{error}",p.error||""):a.autoCheckin?n?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":n?.checkinNotYet||"Not checked in yet today",(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:n?.checkinToday||"Today's check-in"}),(0,b.jsxs)(q.f,{variant:x?"default":p?.status==="failed"?"destructive":"secondary",children:[(0,b.jsx)(s.f,{className:"mr-1 h-3 w-3"}),x?n?.checkinSuccess||"Checked in":n?.checkinNotYet||"Not yet"]})]}),!x&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:j,disabled:i,children:[i&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),n?.checkinNow||"Check in now"]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:k}),(0,b.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-auto-checkin",children:n?.autoCheckin||"Daily auto check-in"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:n?.autoCheckinHint})]}),(0,b.jsx)(t.f,{id:"minimax-code-auto-checkin",checked:f,onCheckedChange:g})]})]})}let x=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var y=a.i(572131),z=a.i(291938),A=a.i(960927),B=a.i(710302),C=a.i(630534);function D({value:a,onChange:f}){let{t:g}=(0,h.b)(),i=g.settings?.ai?.minimaxCode,{status:j,loading:k,pending:l,busy:s,refresh:t,login:u,logout:v,checkin:E}=function(){let{t:a}=(0,h.b)(),b=a.settings?.ai?.minimaxCode,[c,d]=(0,y.useState)(null),[e,f]=(0,y.useState)(!0),[g,i]=(0,y.useState)(null),[j,k]=(0,y.useState)(!1),l=(0,y.useRef)(null),m=(0,y.useCallback)(async()=>{f(!0);try{let a=await z.k.get("/api/minimax-code");d(a),a.pendingLogin&&i(a.pendingLogin)}catch(a){C.V.error("[MiniMaxCode]","Failed to load status",{error:a})}finally{f(!1)}},[]);(0,y.useEffect)(()=>{m()},[m]),(0,y.useEffect)(()=>{if(!g)return;let a=!1,c=async()=>{try{let d=await z.k.get("/api/minimax-code/login");if(a)return;if("pending"===d.status){l.current=setTimeout(c,g.intervalMs);return}i(null),"ok"===d.status?B.c.success(b?.loginSuccess||"Signed in"):"expired"===d.status?B.c.error(b?.loginExpired||"Authorization timed out"):"denied"===d.status&&B.c.error(b?.loginDenied||"Authorization declined"),m()}catch(c){if(a)return;i(null),B.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,A.Z)(c)}`)}};return l.current=setTimeout(c,g.intervalMs),()=>{a=!0,l.current&&clearTimeout(l.current)}},[g,m,b]);let n=async()=>{k(!0);try{await z.k.delete("/api/minimax-code"),i(null),await m()}catch(a){B.c.error((0,A.Z)(a))}finally{k(!1)}},o=async()=>{k(!0);try{let a=await z.k.post("/api/minimax-code/checkin",{});"failed"===a.status?B.c.error((b?.checkinFailed||"Check-in failed: {error}").replace("{error}",a.error||"")):B.c.success(b?.checkinSuccess||"Checked in"),await m()}catch(a){B.c.error((0,A.Z)(a))}finally{k(!1)}};return{status:c,loading:e,pending:g,busy:j,refresh:m,login:async()=>{k(!0);try{let a=await z.k.post("/api/minimax-code/login",{});i(a),window.open(a.url,"_blank","noopener,noreferrer")}catch(a){B.c.error(`${b?.loginFailed||"Sign-in failed"}: ${(0,A.Z)(a)}`)}finally{k(!1)}},logout:n,checkin:o}}(),F=j?.login??"none",G=j?.account,H=j?.credits,I={none:i?.statusNone||"Not signed in",active:i?.statusActive||"Signed in",expired:i?.statusExpired||"Login expired"}[F];return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i?.intro}),(0,b.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":i?.title||"MiniMax Code account",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("h4",{className:"text-sm font-medium",children:i?.title||"MiniMax Code account"}),(0,b.jsx)(d.f,{variant:"ghost",size:"sm",onClick:()=>void t(),disabled:k,"aria-label":i?.refresh||"Refresh",children:(0,b.jsx)(p.f,{className:`h-4 w-4 ${k?"animate-spin":""}`})})]}),(0,b.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:i?.loginStatus||"Login status"}),(0,b.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,b.jsx)(q.f,{variant:"active"===F?"default":"expired"===F?"destructive":"secondary",children:I}),G&&(0,b.jsx)("span",{className:"truncate text-muted-foreground",children:G.name||G.email||G.userId})]}),"active"===F&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("dt",{className:"text-muted-foreground",children:i?.credits||"Remaining credits"}),(0,b.jsx)("dd",{children:H?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-medium tabular-nums",children:H.total}),(0,b.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(i?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(H.free)).replace("{purchased}",String(H.purchased))})]}):(0,b.jsx)("span",{className:"text-muted-foreground",children:i?.creditsUnavailable||"Unavailable"})})]})]}),"active"===F&&j&&(0,b.jsx)(w,{checkin:j.checkin,autoCheckin:a?.autoCheckin!==!1,onAutoCheckinChange:b=>f({...a,autoCheckin:b}),busy:s,onCheckin:()=>void E()}),l?(0,b.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,b.jsxs)("p",{className:"flex items-center gap-2",children:[(0,b.jsx)(c.f,{className:"h-4 w-4 animate-spin"}),i?.waiting]}),l.userCode&&(0,b.jsxs)("p",{children:[i?.userCode||"Verification code",": ",(0,b.jsx)("span",{className:"font-mono font-medium",children:l.userCode})]}),(0,b.jsxs)("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[i?.openLink||"Open the authorization page"," ",(0,b.jsx)(m.f,{className:"h-3 w-3"})]})]}):(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsxs)(d.f,{size:"sm",onClick:()=>void u(),disabled:s,children:[s?(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,b.jsx)(n.f,{className:"mr-2 h-4 w-4"}),"none"===F?i?.login||"Sign in with browser":i?.relogin||"Sign in again"]}),"none"!==F&&(0,b.jsxs)(d.f,{size:"sm",variant:"outline",onClick:()=>void v(),disabled:s,children:[(0,b.jsx)(o.f,{className:"mr-2 h-4 w-4"}),i?.logout||"Sign out"]})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{htmlFor:"minimax-code-model",children:i?.model||"Model"}),(0,b.jsx)(r.f,{id:"minimax-code-model",list:"minimax-code-models",value:a?.model||"",onChange:b=>f({...a,model:b.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,b.jsx)("datalist",{id:"minimax-code-models",children:x.map(a=>(0,b.jsx)("option",{value:a},a))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i?.modelHint})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:i?.risk})]})}var E=a.i(403512),F=a.i(951675),G=a.i(175592),H=a.i(676330),I=a.i(152679),J=a.i(148463);function K({value:a,onChange:c}){let{t:g}=(0,h.b)(),i=(0,J.f)("openai"),j=a?.instances||[],k=a?.activeInstanceId,l=j.find(a=>a.id===k),m=(b,d)=>{c({...a,instances:j.map(a=>a.id===k?{...a,[b]:d}:a)})},n=async()=>{if(!k||!await (0,B.u)(g.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let a=j.filter(a=>a.id!==k);c({instances:a,activeInstanceId:a[0]?.id})};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.instances||"Instance"}),(0,b.jsxs)(d.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(j.length>=10)return;let a={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)}),name:`Instance ${j.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};c({instances:[...j,a],activeInstanceId:a.id})},disabled:j.length>=10,className:"h-7 px-2 text-xs",children:[(0,b.jsx)(E.f,{className:"h-3 w-3 mr-1"}),g.settings?.ai?.addInstance||"Add"]})]}),j.length>0?(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)(f.d,{value:k||"",onValueChange:b=>c({...a,activeInstanceId:b}),children:[(0,b.jsx)(f.P,{className:"flex-1",children:(0,b.jsx)(f.U,{placeholder:g.settings?.ai?.selectInstance||"Select Instance"})}),(0,b.jsx)(f.r,{children:j.map(a=>(0,b.jsx)(f.T,{value:a.id,children:a.name},a.id))})]}),j.length>1&&(0,b.jsx)(d.f,{type:"button",variant:"outline",size:"icon",onClick:n,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,b.jsx)(F.f,{className:"h-4 w-4"})})]}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:g.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),j.length>=10&&(0,b.jsx)("p",{className:"text-xs text-amber-600",children:g.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),l&&(0,b.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.instanceName||"Instance Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(r.f,{value:l.name||"",onChange:a=>m("name",a.target.value),placeholder:"e.g. GLM-4V",className:l.name?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:i?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(I.f,{value:l.apiKey||"",onChange:a=>m("apiKey",a.target.value),placeholder:"sk-...",className:l.apiKey?.trim()?"":"border-destructive"})]}),(0,b.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,b.jsxs)(e.f,{children:["Base URL ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(r.f,{value:l.baseUrl||"",onChange:a=>m("baseUrl",a.target.value),placeholder:"https://api.openai.com/v1",className:l.baseUrl?.trim()?"":"border-destructive"})]}),(0,b.jsx)(G.f,{provider:"openai",apiKey:l.apiKey,baseUrl:l.baseUrl,currentModel:l.model,onModelChange:a=>m("model",a),docsHref:i?.models})]})]})}var L=a.i(190622);function M({provider:a,value:c,onChange:d}){let{t:f}=(0,h.b)(),g=L.$[a],i=(a,b)=>d({...c,[a]:b}),j={qwen:f.settings?.ai?.qwenBaseUrlHint,stepfun:f.settings?.ai?.stepfunBaseUrlHint,volcengine:f.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":f.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":f.settings?.ai?.volcengineCodingBaseUrlHint};return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===a&&(0,b.jsxs)("div",{className:"rounded-md border border-green-200 bg-green-50 p-3 text-xs text-green-800 dark:border-green-900 dark:bg-green-950/40 dark:text-green-300",children:[(0,b.jsx)("p",{className:"font-medium",children:f.settings.ai.volcengineFree.title}),(0,b.jsx)("p",{className:"mt-1",children:f.settings.ai.volcengineFree.body})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(H.f,{label:"API Key",href:g.docs.apiKey,linkText:f.settings.ai.docLinks.apiKey}),(0,b.jsx)(I.f,{value:c?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-..."}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,b.jsx)("a",{href:g.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:g.consoleUrl})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(r.f,{value:c?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:g.baseUrl}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j[a]??f.settings?.ai?.vendorBaseUrlHint})]}),(0,b.jsx)(G.f,{provider:a,apiKey:c?.apiKey,baseUrl:c?.baseUrl,currentModel:c?.model||g.model,onModelChange:a=>i("model",a),docsHref:g.docs.models})]})}function N({provider:a,config:c,setConfig:d}){return"openai"===a?(0,b.jsx)(K,{value:c.openai,onChange:a=>d(b=>({...b,openai:a}))}):"gemini"===a?(0,b.jsx)(l.f,{value:c.gemini,onChange:a=>d(b=>({...b,gemini:a}))}):"minimax-code"===a?(0,b.jsx)(D,{value:c.minimaxCode,onChange:a=>d(b=>({...b,minimaxCode:a}))}):"anthropic"===a?(0,b.jsx)(j.f,{value:c.anthropic,onChange:a=>d(b=>({...b,anthropic:a}))}):"azure"===a?(0,b.jsx)(k.f,{value:c.azure,onChange:a=>d(b=>({...b,azure:a}))}):(0,L.j)(a)?(0,b.jsx)(M,{provider:a,value:c[a],onChange:b=>d(c=>({...c,[a]:b}))},a):null}var O=a.i(442243);let P="__default__";function Q({config:a,setConfig:c}){let{t:d,language:g}=(0,h.b)(),j=d.settings?.ai?.routing,k=`${j?.followDefault||"Follow the default channel"} (${(0,O.V)(a.aiProvider,g)})`,l=(a,b)=>{c(c=>({...c,routing:{...c.routing,[a]:b===P?"":b}}))},m=d.settings?.ai?.routingFallbackHint||"Used automatically when the main channel reports exhausted quota, an expired login, missing permission or lacks image support. Leave empty to disable.";return(0,b.jsxs)(i.N,{children:[(0,b.jsxs)(i.Y,{children:[(0,b.jsx)(i.v,{className:"text-base",children:j?.title||"Channel routing"}),(0,b.jsx)(i.u,{children:j?.desc||"Images need a vision model while text analysis can use a cheaper one. Route them to different channels to save cost; results are recorded per channel."})]}),(0,b.jsxs)(i.O,{className:"space-y-4",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:j?.vision||"Image recognition"}),(0,b.jsxs)(f.d,{value:a.routing?.vision||P,onValueChange:a=>l("vision",a),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:P,children:k}),O.q.map(a=>(0,b.jsx)(f.T,{value:a,children:(0,O.V)(a,g)},a))]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j?.visionHint||"Question photos, figure redrawing and image splitting. The model must support images."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:j?.text||"Text analysis"}),(0,b.jsxs)(f.d,{value:a.routing?.text||P,onValueChange:a=>l("text",a),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:P,children:k}),O.q.map(a=>(0,b.jsx)(f.T,{value:a,children:(0,O.V)(a,g)},a))]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:j?.textHint||"Solving, similar questions, grading and knowledge points. A cheaper text model is usually enough."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:j?.fallback||"Fallback channel"}),(0,b.jsxs)(f.d,{value:a.routing?.fallback||P,onValueChange:a=>l("fallback",a),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsxs)(f.r,{children:[(0,b.jsx)(f.T,{value:P,children:j?.noFallback||"Not used"}),O.q.map(a=>(0,b.jsx)(f.T,{value:a,children:(0,O.V)(a,g)},a))]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:m})]}),(0,b.jsx)(R,{config:a,setConfig:c,configure:a=>c(b=>({...b,aiProvider:a}))})]})]})}function R({config:a,setConfig:c,configure:d}){let{t:e,language:f}=(0,h.b)(),g=e.settings?.ai?.routing,i=(0,O.i)(a,"vision"),j=(0,O.i)(a,"text"),k=Array.from(new Set([i.primary,i.fallback,j.primary,j.fallback].filter(a=>!!a))).filter(b=>!(0,O.G)(a,b)),l=k.filter(b=>b!==a.aiProvider),m=a=>a.fallback?(0,O.V)(a.primary,f)+" → "+(0,O.V)(a.fallback,f):(0,O.V)(a.primary,f);return(0,b.jsxs)("div",{className:"space-y-3 rounded-md border bg-background p-3 text-sm",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1 sm:flex-row sm:justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:g?.currentVision||"Recognition uses"}),(0,b.jsx)("span",{className:"font-medium break-all",children:m(i)})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1 sm:flex-row sm:justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground",children:g?.currentText||"Text analysis uses"}),(0,b.jsx)("span",{className:"font-medium break-all",children:m(j)})]}),k.length>0&&(0,b.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,b.jsx)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:(g?.configureMissing||"These channels are used but not configured yet: {names}").replace("{names}",k.map(a=>(0,O.V)(a,f)).join(g?.listSeparator||", "))}),k.includes(a.aiProvider)&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g?.fillCurrentAbove||"Fill in the channel settings above."}),l.map(e=>(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:(0,O.V)(e,f)}),(0,b.jsx)("button",{type:"button",className:"text-xs underline text-muted-foreground",onClick:()=>d(e),children:g?.useAsDefault||"Use as main channel"})]}),(0,b.jsx)(N,{provider:e,config:a,setConfig:c})]},e))]})]})}function S({provider:a}){let{t:c}=(0,h.b)(),d=c.settings.ai.providerDocs,e=(0,J.f)(a);if(!e)return null;let f=[e.cn&&{href:e.cn,label:e.intl?d.cn:d.official},e.intl&&{href:e.intl,label:e.cn?d.intl:d.official}].filter(a=>!!a);return(0,b.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,b.jsx)("span",{children:d.title}),f.map(a=>(0,b.jsxs)("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[a.label,(0,b.jsx)(m.f,{className:"h-3 w-3"})]},a.href))]})}a.s(["f",0,function({config:a,setConfig:i,loading:j,saving:k,onSave:l}){let{t:m,language:n}=(0,h.b)();if(j)return(0,b.jsx)("div",{className:"flex justify-center py-4",children:(0,b.jsx)(c.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})});let o=O.q.filter(b=>(0,O.G)(a,b));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)(e.f,{children:m.settings?.tabs?.ai||"AI Provider"}),(0,b.jsxs)(f.d,{value:a.aiProvider,onValueChange:a=>i(b=>({...b,aiProvider:a})),children:[(0,b.jsx)(f.P,{children:(0,b.jsx)(f.U,{})}),(0,b.jsx)(f.r,{children:O.q.map(a=>(0,b.jsx)(f.T,{value:a,children:(0,O.V)(a,n)},a))})]}),(0,b.jsx)(S,{provider:a.aiProvider}),o.length>1&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:(m.settings?.ai?.configuredChannels||"Already configured: {names}. Keep several channels so one can back up another.").replace("{names}",o.map(a=>(0,O.V)(a,n)).join(m.settings?.ai?.routing?.listSeparator||", "))})]}),(0,b.jsx)(N,{provider:a.aiProvider,config:a,setConfig:i}),(0,b.jsx)(Q,{config:a,setConfig:i}),(0,b.jsx)(g.f,{config:a,saving:k,saveButton:(0,b.jsxs)(d.f,{onClick:l,disabled:k,className:"flex-1",children:[k&&(0,b.jsx)(c.f,{className:"mr-2 h-4 w-4 animate-spin"}),m.settings?.ai?.save||"Save AI Settings"]})})]})}],151304),a.s(["f",0,function(a,b){if(!(0,v.L)(a.timeZone??v.J))return b.settings.general.invalidTimeZone;if("openai"===a.aiProvider)for(let c of a.openai?.instances||[]){if(!c.name?.trim())return b.settings?.ai?.validationNameRequired||"Instance name is required";if(!c.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!c.baseUrl?.trim())return b.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!c.model?.trim())return b.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===a.aiProvider){if(!a.azure?.endpoint?.trim())return b.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!a.azure?.deploymentName?.trim())return b.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!a.azure?.apiKey?.trim())return b.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],439830)},492710,175592,676330,148463,612416,340898,474896,a=>{var b=a.i(187924),c=a.i(866718),d=a.i(152679),e=a.i(870430),f=a.i(572131),g=a.i(699570),h=a.i(580701),i=a.i(168370),j=a.i(519783),k=a.i(875160),l=a.i(291938),m=a.i(550194),n=a.i(190622),o=a.i(630534);function p({provider:a,apiKey:d,baseUrl:q,currentModel:r,onModelChange:s,docsHref:t}){let{t:u}=(0,m.b)(),[v,w]=(0,f.useState)([]),[x,y]=(0,f.useState)(!1),[z,A]=(0,f.useState)(null),[B,C]=(0,f.useState)(r||""),[D,E]=(0,f.useState)(!1),[F,G]=(0,f.useState)(r);r!==F&&(G(r),C(r||""));let H=async()=>{if(!d)return void A(u.modelSelector?.enterApiKeyFirst||"Please enter API Key first");y(!0),A(null);try{let b=await l.k.post("/api/ai/models",{provider:a,apiKey:d,...q&&{baseUrl:q}});if("error"in b&&"string"==typeof b.error){A(b.error),E(!0),w([]);return}w(b.models),0===b.models.length&&(A(u.modelSelector?.noVisionModel||"No vision model found, please enter manually"),E(!0))}catch(b){o.V.error("[ModelSelector]","Failed to fetch models",{error:b});let a=b instanceof Error&&b.message||u.modelSelector?.fetchFailed||"Failed to fetch models";A(a+(u.modelSelector?.enterManually||", please enter manually")),E(!0)}finally{y(!1)}};return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.f,{className:"flex-1",children:u.modelSelector?.modelName||"Model Name"}),t&&(0,b.jsxs)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[u.settings.ai.docLinks.models,(0,b.jsx)(i.f,{className:"h-3 w-3"})]}),(0,b.jsx)(g.f,{type:"button",variant:"outline",size:"sm",onClick:H,disabled:x||!d,children:x?(0,b.jsx)(k.f,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(j.f,{className:"h-3 w-3"})})]}),z&&(0,b.jsx)("p",{className:"text-xs text-yellow-600",children:z}),D||0===v.length?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(c.f,{value:B,onChange:a=>{var b;C(b=a.target.value),s(b)},placeholder:(0,n.j)(a)?n.$[a].model:"openai"===a?"gpt-6.1-sol":"gemini-1.5-flash"}),v.length>0&&(0,b.jsx)(g.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>E(!1),children:u.modelSelector?.selectFromList||"Select from List"})]}):(0,b.jsx)("div",{className:"space-y-2",children:(0,b.jsxs)(h.d,{value:r,onValueChange:a=>{"_custom"===a?E(!0):(E(!1),C(a),s(a))},children:[(0,b.jsx)(h.P,{children:(0,b.jsx)(h.U,{placeholder:u.modelSelector?.selectModel||"Select Model"})}),(0,b.jsxs)(h.r,{children:[v.map(a=>(0,b.jsxs)(h.T,{value:a.id,children:[a.name,a.owned_by&&` (${a.owned_by})`]},a.id)),(0,b.jsx)(h.T,{value:"_custom",children:u.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function q({label:a,href:c,linkText:d}){return c?(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)(e.f,{children:a}),(0,b.jsxs)("a",{href:c,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[d,(0,b.jsx)(i.f,{className:"h-3 w-3"})]})]}):(0,b.jsx)(e.f,{children:a})}a.s(["f",0,p],175592),a.s(["f",0,q],676330);let r={openai:{intl:"https://platform.openai.com/docs/api-reference",apiKey:"https://platform.openai.com/docs/quickstart",models:"https://platform.openai.com/docs/models"},anthropic:{intl:"https://docs.anthropic.com/en/api/overview",apiKey:"https://docs.anthropic.com/en/api/getting-started",models:"https://docs.anthropic.com/en/docs/about-claude/models/overview"},azure:{intl:"https://learn.microsoft.com/azure/ai-foundry/openai/reference",apiKey:"https://learn.microsoft.com/azure/ai-foundry/openai/how-to/create-resource",models:"https://learn.microsoft.com/azure/ai-foundry/openai/concepts/models"},gemini:{intl:"https://ai.google.dev/gemini-api/docs",apiKey:"https://ai.google.dev/gemini-api/docs/api-key",models:"https://ai.google.dev/gemini-api/docs/models"}};function s(a){return(0,n.j)(a)?n.$[a].docs:r[a]??null}a.s(["f",0,s],148463),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("anthropic"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"sk-ant-..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://api.anthropic.com"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g.settings?.ai?.anthropicBaseUrlHint})]}),(0,b.jsx)(p,{provider:"anthropic",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],492710),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("azure"),i=(b,c)=>f({...a,[b]:c}),j=a=>a?.trim()?"":"border-destructive";return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(e.f,{children:[g.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,b.jsx)(c.f,{value:a?.endpoint||"",onChange:a=>i("endpoint",a.target.value),placeholder:g.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:j(a?.endpoint)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:[g.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.models,linkText:g.settings.ai.docLinks.models}),(0,b.jsx)(c.f,{value:a?.deploymentName||"",onChange:a=>i("deploymentName",a.target.value),placeholder:g.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:j(a?.deploymentName)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:(0,b.jsxs)(b.Fragment,{children:["API Key ",(0,b.jsx)("span",{className:"text-destructive",children:"*"})]}),href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:j(a?.apiKey)})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureApiVersion||"API Version"}),(0,b.jsx)(c.f,{value:a?.apiVersion||"",onChange:a=>i("apiVersion",a.target.value),placeholder:g.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:g.settings?.ai?.azureModel||"Model Display Name"}),(0,b.jsx)(c.f,{value:a?.model||"",onChange:a=>i("model",a.target.value),placeholder:"gpt-4o"})]})]})}],612416),a.s(["f",0,function({value:a,onChange:f}){let{t:g}=(0,m.b)(),h=s("gemini"),i=(b,c)=>f({...a,[b]:c});return(0,b.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(q,{label:"API Key",href:h?.apiKey,linkText:g.settings.ai.docLinks.apiKey}),(0,b.jsx)(d.f,{value:a?.apiKey||"",onChange:a=>i("apiKey",a.target.value),placeholder:"AIza..."})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(e.f,{children:"Base URL (Optional)"}),(0,b.jsx)(c.f,{value:a?.baseUrl||"",onChange:a=>i("baseUrl",a.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,b.jsx)(p,{provider:"gemini",apiKey:a?.apiKey,baseUrl:a?.baseUrl,currentModel:a?.model,onModelChange:a=>i("model",a),docsHref:h?.models})]})}],340898);var t=a.i(164831);let u={name:"log-in",size:24,node:[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]};u.node;let v=(0,t.f)(u);a.s(["f",0,v],474896)},152679,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(755681),e=a.i(777064),f=a.i(699570),g=a.i(866718),h=a.i(550194),i=a.i(368114);a.s(["f",0,function({className:a,...j}){let{t:k}=(0,h.b)(),[l,m]=(0,c.useState)(!1);return(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(g.f,{type:l?"text":"password",className:(0,i.f)("pr-10",a),...j}),(0,b.jsx)(f.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>m(!l),"aria-label":l?k.common.hidePassword:k.common.showPassword,tabIndex:-1,children:l?(0,b.jsx)(e.f,{className:"h-4 w-4 text-muted-foreground"}):(0,b.jsx)(d.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}]})();
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0cmd1ubdlo_by._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[494478,a=>{var b=a.i(164831);let c={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],494478)},879675,a=>{var b=a.i(164831);let c={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],879675)},226897,a=>{var b=a.i(187924),c=a.i(79362),d=a.i(494478),e=a.i(211134),f=a.i(550194);let g=[{value:"correct",icon:c.f,active:"border-green-600 bg-green-50 dark:bg-green-950/40 text-green-700 dark:text-green-300"},{value:"wrong",icon:e.f,active:"border-red-600 bg-red-50 dark:bg-red-950/40 text-red-700 dark:text-red-300"},{value:"not_attempted",icon:d.f,active:"border-amber-600 bg-amber-50 dark:bg-amber-950/40 text-amber-700 dark:text-amber-300"}];a.s(["f",0,function({value:a,onChange:c,disabled:d,size:e="md"}){let{t:h}=(0,f.b)(),i="sm"===e?"px-2 py-1 text-xs":"px-3 py-2 text-sm";return(0,b.jsx)("div",{className:"grid grid-cols-3 gap-2",role:"radiogroup",children:g.map(({value:f,icon:g,active:j})=>(0,b.jsxs)("button",{type:"button",role:"radio","aria-checked":a===f,disabled:d,onClick:()=>c(f),className:`flex items-center justify-center gap-1 rounded-md border font-medium transition-colors disabled:opacity-60 ${i} ${a===f?j:"border-input hover:bg-muted"}`,children:[(0,b.jsx)(g,{className:"sm"===e?"h-3 w-3":"h-4 w-4"}),h.mastery.results[f]]},f))})}])},506376,a=>{var b=a.i(187924),c=a.i(875160);a.s(["f",0,function({label:a}){return(0,b.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,b.jsx)(c.f,{className:"h-7 w-7 animate-spin text-primary"}),a&&(0,b.jsx)("p",{className:"text-sm",children:a})]})}])},391020,a=>{let b={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};a.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(a){if("string"!=typeof a)return null;let c=a.trim().toLowerCase();return c?b[c]??null:null}])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0htmdb0udewwn._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[308311,a=>{var b=a.i(164831);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],308311)},478958,a=>{var b=a.i(164831);let c={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],478958)},62140,a=>{var b=a.i(164831);let c={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],62140)},88444,a=>{var b=a.i(164831);let c={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],88444)},233540,a=>{var b=a.i(164831);let c={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],233540)},622418,a=>{var b=a.i(187924),c=a.i(79362),d=a.i(308311),e=a.i(519783),f=a.i(786304),g=a.i(550194);let h={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:d.f},reviewing:{className:"bg-primary/10 text-primary",icon:e.f},mastered:{className:"bg-success/15 text-success",icon:c.f}};a.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:a,className:c=""}){let{t:d}=(0,g.b)(),{className:e,icon:i}=h[a],j="mastered"===a?d.notebook.mastered:"reviewing"===a?d.notebook.reviewing:d.notebook.review;return(0,b.jsx)(f.f,{variant:"secondary",className:`${e} ${c}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(i,{className:"h-3 w-3"})," ",j]})})}])},468368,723222,a=>{var b=a.i(187924),c=a.i(550194),d=a.i(694696);let e=["primary","junior_high","senior_high"],f="primary",g=["math","english","chinese","physics","chemistry","biology","history","geography","politics"];function h(a){return"string"==typeof a&&g.includes(a)}function i(a){var b;let c=h(a.subjectKey)?a.subjectKey:(0,d.f)(a.name);return{stage:"string"==typeof(b=a.stage)&&e.includes(b)?a.stage:f,subject:c&&h(c)?c:null}}function j(){let{t:a}=(0,c.b)();return{stageLabel:b=>({primary:a.auth.primary,junior_high:a.auth.juniorHigh,senior_high:a.auth.seniorHigh})[b],subjectLabel:b=>a.tags.subjects[b]}}a.s(["j",0,f,"c",0,e,"W",0,{primary:["math","english","chinese"],junior_high:g,senior_high:g},"v",0,i],723222),a.s(["E",0,function({notebook:a,className:c}){let{stageLabel:d,subjectLabel:e}=j(),f=i(a);return(0,b.jsxs)("span",{className:c,children:[d(f.stage),f.subject?` \xb7 ${e(f.subject)}`:""]})},"O",0,j],468368)},697902,a=>{a.s(["$",0,18,"u",0,5,"A",0,200])},95508,a=>{let b=["题干","选项A","选项B","选项C","选项D","答案","解析","知识点","难度","题型","学科","年级学期","来源","大题","题号"],c=[["下列哪个选项是正确的?","选项一","选项二","选项三","选项四","A","这是解析内容。","知识点一、知识点二","3","单选题","数学","七年级上学期","2025 期中","第一大题","1"],["1+1=____。","","","","","2","基础加法运算。","基础运算","易","填空题","数学","一年级上学期","课堂练习","第一大题","2"]];async function d(){let{default:d}=await a.A(177190),e=[b,...c];return await d(e).toBlob()}a.s(["I",0,b,"j",0,function(){let a=a=>/[",\n\r]/.test(a)?`"${a.replace(/"/g,'""')}"`:a,d=[];for(let e of(d.push(b.map(a).join(",")),c))d.push(e.map(a).join(","));return`\uFEFF${d.join("\r\n")}\r
|
|
1
|
+
(()=>{"use strict";module.exports=[308311,a=>{var b=a.i(164831);let c={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],308311)},478958,a=>{var b=a.i(164831);let c={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],478958)},62140,a=>{var b=a.i(164831);let c={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],62140)},88444,a=>{var b=a.i(164831);let c={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],88444)},233540,a=>{var b=a.i(164831);let c={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],233540)},622418,a=>{var b=a.i(187924),c=a.i(79362),d=a.i(308311),e=a.i(519783),f=a.i(786304),g=a.i(550194);let h={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:d.f},reviewing:{className:"bg-primary/10 text-primary",icon:e.f},mastered:{className:"bg-success/15 text-success",icon:c.f}};a.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:a,className:c=""}){let{t:d}=(0,g.b)(),{className:e,icon:i}=h[a],j="mastered"===a?d.notebook.mastered:"reviewing"===a?d.notebook.reviewing:d.notebook.review;return(0,b.jsx)(f.f,{variant:"secondary",className:`${e} ${c}`,children:(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)(i,{className:"h-3 w-3"})," ",j]})})}])},468368,723222,a=>{var b=a.i(187924),c=a.i(550194),d=a.i(694696);let e=["primary","junior_high","senior_high","university"],f="primary",g=["math","english","chinese","physics","chemistry","biology","history","geography","politics"];function h(a){return"string"==typeof a&&g.includes(a)}function i(a){var b;let c=h(a.subjectKey)?a.subjectKey:(0,d.f)(a.name);return{stage:"string"==typeof(b=a.stage)&&e.includes(b)?a.stage:f,subject:c&&h(c)?c:null}}function j(){let{t:a}=(0,c.b)();return{stageLabel:b=>({primary:a.auth.primary,junior_high:a.auth.juniorHigh,senior_high:a.auth.seniorHigh,university:a.auth.university})[b],subjectLabel:b=>a.tags.subjects[b]}}a.s(["j",0,f,"c",0,e,"W",0,{primary:["math","english","chinese"],junior_high:g,senior_high:g,university:g},"v",0,i],723222),a.s(["E",0,function({notebook:a,className:c}){let{stageLabel:d,subjectLabel:e}=j(),f=i(a);return(0,b.jsxs)("span",{className:c,children:[d(f.stage),f.subject?` \xb7 ${e(f.subject)}`:""]})},"O",0,j],468368)},487410,a=>{var b=a.i(187924),c=a.i(368114);a.s(["f",0,function({options:a,value:d,onChange:e,className:f}){return(0,b.jsx)("div",{className:(0,c.f)("grid gap-1 rounded-xl bg-muted p-1",f),style:{gridTemplateColumns:`repeat(${a.length}, minmax(0, 1fr))`},role:"tablist",children:a.map(({value:a,label:f,icon:g})=>{let h=a===d;return(0,b.jsxs)("button",{type:"button",role:"tab","aria-selected":h,className:(0,c.f)("flex items-center justify-center gap-1.5 rounded-lg px-2 py-2.5 text-sm font-medium transition-all",h?"bg-card text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>e(a),children:[g&&(0,b.jsx)(g,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:f})]},a)})})}])},697902,a=>{a.s(["$",0,18,"u",0,5,"A",0,200])},95508,a=>{let b=["题干","选项A","选项B","选项C","选项D","答案","解析","知识点","难度","题型","学科","年级学期","来源","大题","题号"],c=[["下列哪个选项是正确的?","选项一","选项二","选项三","选项四","A","这是解析内容。","知识点一、知识点二","3","单选题","数学","七年级上学期","2025 期中","第一大题","1"],["1+1=____。","","","","","2","基础加法运算。","基础运算","易","填空题","数学","一年级上学期","课堂练习","第一大题","2"]];async function d(){let{default:d}=await a.A(177190),e=[b,...c];return await d(e).toBlob()}a.s(["I",0,b,"j",0,function(){let a=a=>/[",\n\r]/.test(a)?`"${a.replace(/"/g,'""')}"`:a,d=[];for(let e of(d.push(b.map(a).join(",")),c))d.push(e.map(a).join(","));return`\uFEFF${d.join("\r\n")}\r
|
|
2
2
|
`},"n",0,d])},217660,282655,a=>{var b=a.i(291938);async function c(a){try{return(await b.k.get(`/api/error-items/short/${encodeURIComponent(a)}`)).id}catch{return null}}a.s(["f",0,c],217660);let d=RegExp("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{6}$");a.s(["f",0,function(a){return"string"==typeof a&&d.test(a)}],282655)},843326,a=>{a.s(["f",0,function(a){if(a.tags&&a.tags.length>0)return a.tags.map(a=>a.name);if(!a.knowledgePoints)return[];try{let b=JSON.parse(a.knowledgePoints);return Array.isArray(b)?b.filter(a=>"string"==typeof a):[]}catch{return[]}}])}]})();
|
|
3
3
|
|
|
4
|
-
//# sourceMappingURL=
|
|
4
|
+
//# sourceMappingURL=_0mp06uu5odp8m._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[895605,a=>{var b=a.i(164831);let c={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],895605)},283248,a=>{var b=a.i(164831);let c={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],283248)},141146,a=>{var b=a.i(164831);let c={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],141146)},585650,a=>{var b=a.i(164831);let c={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],585650)},536670,a=>{var b=a.i(164831);let c={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],536670)},168370,a=>{var b=a.i(164831);let c={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],168370)},777064,a=>{var b=a.i(164831);let c={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],777064)},483138,a=>{var b=a.i(164831);let c={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],483138)},357204,a=>{var b=a.i(164831);let c={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],357204)},780767,a=>{var b=a.i(164831);let c={name:"scan-text",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],780767)},201661,a=>{var b=a.i(164831);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],201661)},344451,a=>{var b=a.i(164831);let c={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],344451)},785389,a=>{var b=a.i(164831);let c={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d])},930363,a=>{var b=a.i(785389);a.s(["f",()=>b.f])},861954,a=>{var b=a.i(57441);a.s(["z",0,b])},694796,a=>{var b=a.i(57441);a.s(["z",0,b])},445233,a=>{var b=a.i(57441);a.s(["z",0,b])},332485,a=>{var b=a.i(57441);a.s(["z",0,b])},246059,a=>{var b=a.i(57441);a.s(["z",0,b])},998868,a=>{var b=a.i(57441);a.s(["z",0,b])},867147,303324,a=>{var b=a.i(187924),c=a.i(315055),d=a.i(550194);function e(){let{t:a}=(0,d.b)();return(0,b.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,b.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-muted-foreground",children:a.eula.summary.map(a=>(0,b.jsx)("li",{children:a},a))}),(0,b.jsx)("a",{href:"/eula",target:"_blank",rel:"noopener noreferrer",className:"inline-block text-primary hover:underline",children:a.eula.viewFull})]})}a.s(["f",0,e],303324),a.s(["f",0,function({checked:a,onCheckedChange:f,disabled:g}){let{t:h}=(0,d.b)();return(0,b.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[(0,b.jsx)("p",{className:"text-sm font-medium",children:h.eula.title}),(0,b.jsx)(e,{}),(0,b.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,b.jsx)(c.f,{id:"eula-consent",className:"mt-0.5",checked:a,disabled:g,onCheckedChange:a=>f(!0===a)}),(0,b.jsx)("span",{children:h.eula.consentLabel})]})]})}],867147)},424235,a=>{a.s(["f",0,"https://github.com/margrop/wrong-notebook"])},585982,a=>{let b="/api/telemetry";function c(a){try{let c=JSON.stringify(a);if("u">typeof navigator&&"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(b,new Blob([c],{type:"text/plain;charset=UTF-8"})))return;"function"==typeof fetch&&fetch(b,{method:"POST",headers:{"Content-Type":"application/json"},body:c,keepalive:!0,credentials:"same-origin"}).catch(()=>void 0)}catch{}}function d(a){try{let b="wn-telemetry:"+a;if(sessionStorage.getItem(b))return!1;sessionStorage.setItem(b,"1")}catch{}return!0}function e(a,b){c({t:"event",name:a,...b?{payload:b}:{}})}let f=!1;a.s(["E",0,d,"J",0,function(){d("app_opened")&&e("app_opened",{client:"browser"})},"P",0,function(a){if(!f){f=!0;try{let b=a.error instanceof Error?a.error:null,e=b?.name||"Error",f=b?.message??("string"==typeof a.error?a.error:String(a.error??"")),g=b?.stack??"",h=g.split("\n").find(a=>/^\s*at |@/.test(a))??f;if(!d(`error:${function(a){let b=5381;for(let c=0;c<a.length;c++)b=(b<<5)+b+a.charCodeAt(c)|0;return(b>>>0).toString(36)}([a.kind,a.scope,e,h].join("|"))}`))return;c({t:"error",kind:a.kind,scope:a.scope,name:e.slice(0,200),message:f.slice(0,2e3),stack:g.slice(0,8e3),path:"u">typeof location?location.pathname:void 0,userAgent:"u">typeof navigator?navigator.userAgent.slice(0,500):void 0})}catch{}finally{f=!1}}},"z",0,e])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0qbp5_0h-b69q._.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(()=>{"use strict";module.exports=[589027,113608,a=>{var b=a.i(164831);let c={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],589027);let e={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};e.node;let f=(0,b.f)(e);a.s(["f",0,f],113608)},79362,a=>{var b=a.i(164831);let c={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],79362)},211134,a=>{var b=a.i(164831);let c={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],211134)},519783,a=>{var b=a.i(164831);let c={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],519783)},986708,a=>{var b=a.i(164831);let c={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],986708)},951675,a=>{var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.f)(c);a.s(["f",0,d],951675)},474215,a=>{var b=a.i(164831);let c={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};c.node;let d=(0,b.f)(c);a.s(["X",0,d],474215)},786304,a=>{var b=a.i(187924),c=a.i(811011),d=a.i(400187),e=a.i(368114);let f=(0,d.f)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});a.s(["f",0,function({className:a,variant:d,asChild:g=!1,...h}){let i=g?c.M:"span";return(0,b.jsx)(i,{"data-slot":"badge",className:(0,e.f)(f({variant:d}),a),...h})}])},529759,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(986705);let e=(0,c.createContext)({timeZone:d.J,setTimeZone:()=>void 0});a.s(["n",0,function({children:a,initialTimeZone:f=d.J}){let[g,h]=(0,c.useState)(f);return(0,b.jsx)(e.Provider,{value:{timeZone:g,setTimeZone:h},children:a})},"M",0,function(){return(0,c.useContext)(e)}])}]})();
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=_0t-venqf7b-4q._.js.map
|