wrong-notebook 2026.11.4 → 2026.11.5-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +6 -6
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +6 -6
- 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 +2 -2
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +11 -11
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +5 -5
- 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 +2 -2
- 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 +7 -7
- 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 +7 -7
- 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 +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +12 -12
- 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 +12 -12
- 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 +8 -8
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +9 -9
- 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 +2 -2
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +7 -7
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +5 -5
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +6 -6
- 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 +2 -2
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +9 -9
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +17 -17
- 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 +4 -4
- 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 +16 -16
- 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 +17 -17
- 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 +16 -16
- 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 +16 -16
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +16 -16
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +19 -19
- 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 +19 -19
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +19 -19
- 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 +19 -19
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +16 -16
- 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 +1 -1
- 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 +5 -5
- 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 +6 -6
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +5 -5
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +5 -5
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +4 -4
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +3 -3
- 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 +3 -3
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +2 -2
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +2 -2
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js.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/app-paths-manifest.json +3 -0
- package/.next/server/app/api/user/ai-consent/route/build-manifest.json +12 -0
- package/.next/server/app/api/user/ai-consent/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/user/ai-consent/route.js +12 -0
- package/.next/server/app/api/user/ai-consent/route.js.map +5 -0
- package/.next/server/app/api/user/ai-consent/route.js.nft.json +1 -0
- package/.next/server/app/api/user/ai-consent/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/user/route.js +4 -4
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +1 -0
- package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__025dluj5es8w4._.js → [root-of-the-server]__0-zi_nkxp9dof._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0l8sbsrfjhttk._.js → [root-of-the-server]__02kuxxv4mod1v._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__01jxyfokd6l4_._.js → [root-of-the-server]__032tjseth76z3._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__00w9qhjl8kvr4._.js → [root-of-the-server]__05wem-_dvlzug._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__00w_kxg7h-9_p._.js → [root-of-the-server]__06-v15r8ror-q._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__06irm2njvcb2a._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__13a3izu1xb4m4._.js → [root-of-the-server]__07twbtie04xx6._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0-ii_w4q2w_78._.js → [root-of-the-server]__08wrx5aay9znc._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1e7_e83zxstdw._.js → [root-of-the-server]__0_e69dt7jrpui._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0_icvdlc-nqy_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0aynxvfd9wp_r._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dv_e-7ip1wts._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__02fu_lp66613e._.js → [root-of-the-server]__0eyqs-2hri164._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__14gc66h_h3i2i._.js → [root-of-the-server]__0f8kzoc_gaf8y._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__163ocf8u6v-xl._.js → [root-of-the-server]__0fembrq8pciz5._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__04yihz3dovm0z._.js → [root-of-the-server]__0g0van70ibkrj._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0g2s86ce159k0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05a4j8yu5_bg1._.js → [root-of-the-server]__0gankrx12ee4n._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0hxujtysw2kwx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ilrqq68_5wg5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ky9-3kyba1lu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0lwuci8tnhggb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0m4dmn-gj2fnm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ntfbtwf-s7a6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0of02idkcau3l._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0svpy5s3x369z._.js → [root-of-the-server]__0ohg2cyilt44e._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0rsgnrk2qy8wo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0v0tr1bn12xyu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vazs1dmyut7b._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__11wpfrrg965mf._.js → [root-of-the-server]__0w9x80vsjqsbt._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0x76w78-o6bfn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xwm-4fhj8j--._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0rwoy4jm7s8o7._.js → [root-of-the-server]__13u9cd4f8_gva._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__16j73gw0vaw81._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17_lgezg_8k4-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17qr9lkc0h9ta._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1bw1tevy-ufwx._.js → [root-of-the-server]__18axi_zdc2uzr._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__19larrqj6rokv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cno0cu053una._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cowc49z-6tny._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__001wdwos9fkgg._.js → [root-of-the-server]__1edbiu94nqqym._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1f_ztllkdhd1g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1g_f4opcfnwwl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1iysogl93kyqq._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ka1feeszq3gt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ke-yb4v9knf4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kp5acqtrdysf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kxewr0hve3xs._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1l47_6jece7bq._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1gc1jsjtvhvls._.js → [root-of-the-server]__1nb3q3vglx569._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1o42aqttqc3b8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1pw5kygb6kibs._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1qy_fxhx5yu1t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sokwptzp3b3m._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0cizcawcu31he._.js → [root-of-the-server]__1ve60byz8pq4j._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0fhi9g3nqu6k3._.js → [root-of-the-server]__1vwlmzqz2r0yr._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1pfhgjwnx_--j._.js → [root-of-the-server]__1w_yq12h-kxx0._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1x6r0_9_fqoy-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xx-czpwd_ny7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1zkrlusy_cbtj._.js +3 -0
- package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
- package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
- package/.next/server/chunks/_05-ouasholjra._.js +1 -1
- package/.next/server/chunks/_06pseal2zu-71._.js +1 -1
- package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
- package/.next/server/chunks/_0ahfgpo6w1vyz._.js +3 -0
- package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
- package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
- package/.next/server/chunks/_0i58-g30ox5-8._.js +1 -1
- package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
- package/.next/server/chunks/_0r8u30vd4lix4._.js +1 -1
- package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
- package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
- package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1ad8i3ukisj99._.js +1 -1
- package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
- package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
- package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
- package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
- package/.next/server/chunks/_1zbkha-v5mkk0._.js +1 -1
- package/.next/server/chunks/_next-internal_server_app_api_user_ai-consent_route_actions_0g-jtv0cc92di.js +3 -0
- package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +1 -1
- package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +1 -1
- package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +1 -1
- package/.next/server/chunks/src_lib_0n6nhl7_avcme._.js +1 -1
- package/.next/server/chunks/src_lib_0so-2topfosjo._.js +1 -1
- package/.next/server/chunks/src_lib_1_p9kz6i8to9n._.js +3 -0
- package/.next/server/chunks/src_lib_1t_-lm7x_gu08._.js +3 -0
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +2 -2
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
- package/.next/server/chunks/src_lib_mastery_ts_0ybi94uxn8ut6._.js +1 -1
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__1epxx0lrejssz._.js → [root-of-the-server]__1qkpcqb6ewk9r._.js} +1 -1
- package/.next/server/chunks/ssr/_09y2uhjubswp4._.js +1 -1
- package/.next/server/chunks/ssr/_0_m51opjnip8x._.js +32 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/{_05gdkgyyr0suj._.js → _0fp_p60hb9ex8._.js} +1 -1
- package/.next/server/chunks/ssr/_0lzeodofsq9pe._.js +1 -1
- package/.next/server/chunks/ssr/_0ozptnii2nxuw._.js +1 -1
- package/.next/server/chunks/ssr/{_01zv6gqnnj9oy._.js → _0qs44fqs7b5wd._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1yz9gg4275g30._.js → node_modules_0v4btraw_y7x2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1-wb4967v48id._.js → node_modules_1cm5684hz1o51._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1we6ggthjslzt._.js → node_modules_1im5by828hg3r._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_038nbq-p7grtd.js → node_modules_heic-to_dist_csp_heic-to_064ewwu8t3acv.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1b61b0i6philz.js → node_modules_heic-to_dist_csp_heic-to_1xp1ys7qrz7uh.js} +1 -1
- package/.next/server/chunks/ssr/src_1rmus42s388dk._.js +1 -1
- package/.next/server/chunks/ssr/src_1seqsa8jiwu83._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +2 -2
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +2 -2
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +12 -12
- package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{16h0nz5l970cx.js → 08pb1_yl7fhsw.js} +1 -1
- package/.next/static/chunks/{1-00icoq9w3_i.js → 0c3tf7izst9o8.js} +1 -1
- package/.next/static/chunks/{3ldaxwwj8i1r_.js → 0ddn90rrjkr7y.js} +3 -3
- package/.next/static/chunks/185736qwog1ar.js +1 -0
- package/.next/static/chunks/{0y9dgn85yuuy5.js → 1bcso9y60vl1j.js} +1 -1
- package/.next/static/chunks/1jsd1qdcjh3ht.js +198 -0
- package/.next/static/chunks/1nef598mkxf9g.js +1 -0
- package/.next/static/chunks/{2r3xwds8ivfso.js → 1ogj95u4nfqgm.js} +5 -5
- package/.next/static/chunks/2-m8at3d9m9fl.js +38 -0
- package/.next/static/chunks/21jkvmvb2mzaa.js +1 -0
- package/.next/static/chunks/32c19i38gl4zx.js +1 -0
- package/.next/static/chunks/34r6_zyo8ux86.js +1 -0
- package/.next/static/chunks/3_5fscrh8uxav.css +3 -0
- package/.next/static/chunks/{2gamhj4j8w-tp.js → 3lvul9moygg-1.js} +4 -4
- package/package.json +1 -1
- package/prisma/migrations/20261105000000_user_ai_data_consent/migration.sql +2 -0
- package/prisma/schema.prisma +1 -0
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__07i32k2sv285o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0_le78e9b2yno._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b8rxaox_x2n1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0bvf731upd2_w._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0eqjbieakyy2g._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gk6xz_lxrrer._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nin5p-dwlpf9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nye-53zadylr._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0o9oim91bxvxq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0pojh2d6n1kp6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wea836zkhvlj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wex3czgya39o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yq7jm5ja3r6t._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-1ld657rjip5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11-fk0-4iuf_k._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__11x5u4zg5i2c6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12f6t_ozjtn42._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13cos0n0yw_z6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15r55xy6cyrg3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16_meybuj-s5w._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__17659spbpgn__._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1f0zocrmsd5p8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fp6mylnljj_6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1gf_vv57qtjh0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hn69stngi4kc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ii155nyrptua._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kxecl8v-_px5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1l6v9x8xm11pl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1r5lj-ffov9r0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1uqnotrppylmw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1utvl-1o6mb8y._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vc89u7_xxhyf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vorkvvfkrr39._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1x_kq-6h3utmo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1x_yvd3pxoee7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1y9cx1kv17pl_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1z4-5hlzq34fw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20vfjg0kexwpn._.js +0 -3
- package/.next/server/chunks/src_lib_1-8qgpevmw3ew._.js +0 -3
- package/.next/server/chunks/src_lib_1w0niu4i8hnaq._.js +0 -3
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +0 -32
- package/.next/static/chunks/15zro21ycjjle.js +0 -1
- package/.next/static/chunks/1vtq_er8xir3c.css +0 -3
- package/.next/static/chunks/28qmcol3c39_a.js +0 -198
- package/.next/static/chunks/3fj_icg91t5ar.js +0 -38
- package/.next/static/chunks/3fyp0ya1q-g_k.js +0 -1
- package/.next/static/chunks/3g93k83oklg4_.js +0 -1
- package/.next/static/chunks/3u-qpv02dkpmu.js +0 -1
- package/.next/static/chunks/3x0gnqbvstc69.js +0 -1
- /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_buildManifest.js +0 -0
- /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,367784,e=>{var s=e.i(456420);let i={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"}]]};i.node;let a=(0,s.f)(i);e.s(["f",0,a],367784)},713452,753817,128093,e=>{var s=e.i(843476),i=e.i(271645),a=e.i(551757),n=e.i(632781),t=e.i(583967),r=e.i(456420);let l={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"}]]};l.node;let o=(0,r.f)(l);var c=e.i(519455),d=e.i(111110);function m({detail:e}){let{t:i}=(0,d.b)();return e?(0,s.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,s.jsx)("span",{className:"font-sans text-muted-foreground",children:i.settings.ai.providerErrorDetail}),e]}):null}e.s(["f",0,m],753817);let p={minimax:{name:"MiniMax",nameEn:"MiniMax",baseUrl:"https://api.minimax.cn/v1",model:"MiniMax-M3.1-Flash",envPrefix:"MINIMAX",consoleUrl:"https://platform.minimax.cn",docs:{cn:"https://platform.minimax.cn/docs/api-reference/api-overview",intl:"https://platform.minimax.io/docs/api-reference/api-overview",apiKey:"https://platform.minimax.cn/docs/guides/quickstart-preparation",models:"https://platform.minimax.cn/docs/guides/models-intro"}},glm:{name:"智谱 GLM",nameEn:"Zhipu GLM",baseUrl:"https://open.bigmodel.cn/api/paas/v4",model:"glm-5.3-flash",envPrefix:"GLM",consoleUrl:"https://open.bigmodel.cn",docs:{cn:"https://docs.bigmodel.cn/cn/guide/start/quick-start",intl:"https://docs.z.ai/guides/overview/quick-start",apiKey:"https://docs.bigmodel.cn/cn/guide/start/quick-start",models:"https://docs.bigmodel.cn/cn/guide/start/model-overview"}},deepseek:{name:"DeepSeek",nameEn:"DeepSeek",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",envPrefix:"DEEPSEEK",consoleUrl:"https://platform.deepseek.com",docs:{cn:"https://api-docs.deepseek.com/zh-cn/",apiKey:"https://api-docs.deepseek.com/zh-cn/",models:"https://api-docs.deepseek.com/zh-cn/quick_start/pricing"}},kimi:{name:"Kimi",nameEn:"Kimi",baseUrl:"https://api.moonshot.cn/v1",model:"kimi-k3.1-pro",envPrefix:"KIMI",consoleUrl:"https://platform.kimi.com",docs:{cn:"https://platform.moonshot.cn/docs/introduction",intl:"https://platform.moonshot.ai/docs/introduction",apiKey:"https://platform.moonshot.cn/docs/introduction",models:"https://platform.moonshot.cn/docs/pricing/chat"}},qwen:{name:"千问 Qwen",nameEn:"Qwen",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",model:"qwen3.8-max",envPrefix:"QWEN",consoleUrl:"https://bailian.console.aliyun.com",docs:{cn:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",intl:"https://www.alibabacloud.com/help/en/model-studio/token-plan-personal-quick-start",apiKey:"https://help.aliyun.com/zh/model-studio/token-plan-personal-quick-start",models:"https://help.aliyun.com/zh/model-studio/models"}},stepfun:{name:"阶跃星辰 StepFun",nameEn:"StepFun",baseUrl:"https://api.stepfun.com/step_plan/v1",model:"step-5-preview",envPrefix:"STEPFUN",consoleUrl:"https://platform.stepfun.com",docs:{cn:"https://platform.stepfun.com/docs/zh/guides/developer/openai",intl:"https://platform.stepfun.ai/docs/en/guides/developer/openai",apiKey:"https://platform.stepfun.com/docs/zh/guides/developer/openai",models:"https://platform.stepfun.com/docs/zh/guides/models/list"}},volcengine:{name:"火山引擎 豆包",nameEn:"Volcengine Doubao",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1330626",intl:"https://docs.byteplus.com/en/docs/ModelArk/1330626",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}},"volcengine-agent":{name:"火山引擎 Agent Plan",nameEn:"Volcengine Agent Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/plan/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_AGENT",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",apiKey:"https://ark.volcengine.com/region:cn-beijing/docs/82379/2160841?lang=zh",models:"https://www.volcengine.com/docs/82379/2366394"}},"volcengine-coding":{name:"火山引擎 Coding Plan",nameEn:"Volcengine Coding Plan",baseUrl:"https://ark.cn-beijing.volces.com/api/coding/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_CODING",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1928261",apiKey:"https://www.volcengine.com/docs/82379/1928261",models:"https://www.volcengine.com/docs/82379/1928261"}},"volcengine-free":{name:"火山引擎(免费试用)",nameEn:"Volcengine (free trial)",baseUrl:"https://ark.cn-beijing.volces.com/api/v3",model:"doubao-seed-evolving",envPrefix:"VOLCENGINE_FREE",consoleUrl:"https://console.volcengine.com/ark",docs:{cn:"https://www.volcengine.com/docs/82379/1399514",apiKey:"https://www.volcengine.com/docs/82379/1541594",models:"https://www.volcengine.com/docs/82379/1330310"}}},x=Object.keys(p);function u(e){return"string"==typeof e&&Object.prototype.hasOwnProperty.call(p,e)}e.s(["$",0,p,"U",0,x,"z",0,function(e,s){let i=p[e];return"zh"===s?i.name:i.nameEn},"j",0,u,"k",0,function(e,s){let i=p[e];return{apiKey:s?.apiKey||"",baseUrl:s?.baseUrl||i.baseUrl,model:s?.model||i.model}}],128093);var h=e.i(41931),g=e.i(303163),f=e.i(201276);e.s(["f",0,function({config:e,saving:r,saveButton:l}){let{t:p,language:x}=(0,d.b)(),[v,j]=(0,i.useState)(!1),[y,N]=(0,i.useState)(null),b=e=>p.settings?.ai?.errors?.[e]||e.replace("UNKNOWN:",""),k=async()=>{let s=function(e,s){let i=e.aiProvider;if("openai"===i){let a=e.openai?.instances?.find(s=>s.id===e.openai?.activeInstanceId);return a?.apiKey?{ok:!0,body:{provider:i,apiKey:a.apiKey,baseUrl:a.baseUrl,model:a.model,language:s}}:{ok:!1,error:"API_KEY_REQUIRED"}}if("azure"===i){let a=e.azure;return a?.apiKey&&a.endpoint&&a.deploymentName?{ok:!0,body:{provider:i,apiKey:a.apiKey,endpoint:a.endpoint,deploymentName:a.deploymentName,apiVersion:a.apiVersion,model:a.model,language:s}}:{ok:!1,error:"AZURE_CONFIG_INCOMPLETE"}}if("minimax-code"===i)return{ok:!0,body:{provider:i,model:e.minimaxCode?.model,language:s}};if("gemini"===i||"anthropic"===i||u(i)){let a=e[i];return a?.apiKey?{ok:!0,body:{provider:i,apiKey:a.apiKey,baseUrl:a.baseUrl,model:a.model,language:s}}:{ok:!1,error:"API_KEY_REQUIRED"}}return{ok:!1,error:"UNSUPPORTED_PROVIDER"}}(e,x);if(!s.ok){if("UNSUPPORTED_PROVIDER"===s.error)return;N({success:!1,textSupport:!1,visionSupport:!1,textError:"AZURE_CONFIG_INCOMPLETE"===s.error?p.settings?.ai?.validationAzureEndpointRequired||"Azure config is incomplete":p.settings?.ai?.validationApiKeyRequired||"API Key is required"});return}j(!0),N(null);try{N(await h.k.post("/api/ai/test",s.body))}catch(e){f.V.error("[AiConnectionTest]","AI connection test failed",{error:e}),N({success:!1,textSupport:!1,visionSupport:!1,textError:(0,g.Z)(e)})}finally{j(!1)}};return(0,s.jsxs)("div",{className:"space-y-3 pt-3 border-t",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(c.f,{type:"button",variant:"outline",onClick:k,disabled:v||r,className:"flex-1",children:[v?(0,s.jsx)(n.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,s.jsx)(o,{className:"mr-2 h-4 w-4"}),v?p.settings?.ai?.testing||"Testing...":p.settings?.ai?.testConnection||"Test Connection"]}),l]}),y&&(0,s.jsxs)("div",{className:`p-3 rounded-md text-sm ${y.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,s.jsx)("div",{className:"flex items-center gap-2 font-medium mb-2",children:y.success?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.f,{className:"h-4 w-4 text-green-600"}),(0,s.jsx)("span",{className:"text-green-700 dark:text-green-300",children:p.settings?.ai?.testSuccess||"Connection Successful"}),y.modelInfo&&(0,s.jsxs)("span",{className:"text-green-600 text-xs",children:["(",y.modelInfo,")"]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.f,{className:"h-4 w-4 text-red-600"}),(0,s.jsx)("span",{className:"text-red-700 dark:text-red-300",children:p.settings?.ai?.testFailed||"Connection Failed"})]})}),y.success&&(0,s.jsxs)("div",{className:"space-y-1 text-xs",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-muted-foreground",children:[p.settings?.ai?.textSupport||"Text Generation",":"]}),(0,s.jsxs)("span",{className:"text-green-600",children:["✓ ",p.settings?.ai?.supported||"Supported"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"text-muted-foreground",children:[p.settings?.ai?.visionSupport||"Vision/Multimodal",":"]}),y.visionSupport?(0,s.jsxs)("span",{className:"text-green-600",children:["✓ ",p.settings?.ai?.supported||"Supported"]}):(0,s.jsxs)("span",{className:"text-amber-600",children:["✗ ",y.visionError?b(y.visionError):p.settings?.ai?.notSupported||"Not Supported"]})]}),!y.visionSupport&&(0,s.jsx)(m,{detail:y.visionErrorDetail}),(0,s.jsx)("p",{className:"text-muted-foreground/60 text-[10px] pl-1",children:p.settings?.ai?.testNetworkNote})]}),!y.success&&y.textError&&(0,s.jsx)("p",{className:"text-red-600 text-xs mt-1",children:b(y.textError)}),!y.success&&(0,s.jsx)(m,{detail:y.textErrorDetail})]})]})}],713452)},10038,835467,e=>{var s=e.i(843476),i=e.i(632781),a=e.i(519455),n=e.i(110204),t=e.i(967489),r=e.i(713452),l=e.i(459649),o=e.i(118585),c=e.i(75977),d=e.i(482022),m=e.i(97923),p=e.i(367784),x=e.i(741120),u=e.i(487486),h=e.i(793479),g=e.i(975153),f=e.i(699375),v=e.i(111110),j=e.i(215519),y=e.i(306831);function N({checkin:e,autoCheckin:t,onAutoCheckinChange:r,busy:l,onCheckin:o}){let c,{t:d}=(0,v.b)(),{timeZone:m}=(0,j.M)(),p=d.settings?.ai?.minimaxCode,{today:x,last:h}=e,b=h&&"failed"!==h.status?h:null,k=!!(x?.checkedToday||b),w=String(b?.points??(x?x.points+x.bonusPoints:0)),C=String(b?.streakDays??x?.streakDays??0);return c=b?.trigger==="auto"&&"checked-in"===b.status?(p?.checkinAuto||"Checked in automatically today at {time} (+{points} credits, day {days} in a row)").replace("{time}",(0,y.r)(b.at,"HH:mm",m)).replace("{points}",w).replace("{days}",C):k?(p?.checkinDone||"Checked in today (+{points} credits, day {days} in a row)").replace("{points}",w).replace("{days}",C):h?.status==="failed"?(p?.checkinFailed||"Check-in failed: {error}").replace("{error}",h.error||""):e.autoCheckin?p?.checkinWillAuto||"Not checked in yet today. The app will check in automatically within the hour.":p?.checkinNotYet||"Not checked in yet today",(0,s.jsxs)("div",{className:"space-y-3 border-t pt-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:p?.checkinToday||"Today's check-in"}),(0,s.jsxs)(u.f,{variant:k?"default":h?.status==="failed"?"destructive":"secondary",children:[(0,s.jsx)(g.f,{className:"mr-1 h-3 w-3"}),k?p?.checkinSuccess||"Checked in":p?.checkinNotYet||"Not yet"]})]}),!k&&(0,s.jsxs)(a.f,{size:"sm",variant:"outline",onClick:o,disabled:l,children:[l&&(0,s.jsx)(i.f,{className:"mr-2 h-4 w-4 animate-spin"}),p?.checkinNow||"Check in now"]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground break-words",children:c}),(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(n.f,{htmlFor:"minimax-code-auto-checkin",children:p?.autoCheckin||"Daily auto check-in"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:p?.autoCheckinHint})]}),(0,s.jsx)(f.f,{id:"minimax-code-auto-checkin",checked:t,onCheckedChange:r})]})]})}let b=["MiniMax-M3.1-Flash","MiniMax-M3","MiniMax-M2.7-highspeed","MiniMax-M2.7"];var k=e.i(271645),w=e.i(41931),C=e.i(303163),K=e.i(294114),U=e.i(201276);function M({value:e,onChange:t}){let{t:r}=(0,v.b)(),l=r.settings?.ai?.minimaxCode,{status:o,loading:c,pending:g,busy:f,refresh:j,login:y,logout:P,checkin:S}=function(){let{t:e}=(0,v.b)(),s=e.settings?.ai?.minimaxCode,[i,a]=(0,k.useState)(null),[n,t]=(0,k.useState)(!0),[r,l]=(0,k.useState)(null),[o,c]=(0,k.useState)(!1),d=(0,k.useRef)(null),m=(0,k.useCallback)(async()=>{t(!0);try{let e=await w.k.get("/api/minimax-code");a(e),e.pendingLogin&&l(e.pendingLogin)}catch(e){U.V.error("[MiniMaxCode]","Failed to load status",{error:e})}finally{t(!1)}},[]);(0,k.useEffect)(()=>{m()},[m]),(0,k.useEffect)(()=>{if(!r)return;let e=!1,i=async()=>{try{let a=await w.k.get("/api/minimax-code/login");if(e)return;if("pending"===a.status){d.current=setTimeout(i,r.intervalMs);return}l(null),"ok"===a.status?K.c.success(s?.loginSuccess||"Signed in"):"expired"===a.status?K.c.error(s?.loginExpired||"Authorization timed out"):"denied"===a.status&&K.c.error(s?.loginDenied||"Authorization declined"),m()}catch(i){if(e)return;l(null),K.c.error(`${s?.loginFailed||"Sign-in failed"}: ${(0,C.Z)(i)}`)}};return d.current=setTimeout(i,r.intervalMs),()=>{e=!0,d.current&&clearTimeout(d.current)}},[r,m,s]);let p=async()=>{c(!0);try{await w.k.delete("/api/minimax-code"),l(null),await m()}catch(e){K.c.error((0,C.Z)(e))}finally{c(!1)}},x=async()=>{c(!0);try{let e=await w.k.post("/api/minimax-code/checkin",{});"failed"===e.status?K.c.error((s?.checkinFailed||"Check-in failed: {error}").replace("{error}",e.error||"")):K.c.success(s?.checkinSuccess||"Checked in"),await m()}catch(e){K.c.error((0,C.Z)(e))}finally{c(!1)}};return{status:i,loading:n,pending:r,busy:o,refresh:m,login:async()=>{c(!0);try{let e=await w.k.post("/api/minimax-code/login",{});l(e),window.open(e.url,"_blank","noopener,noreferrer")}catch(e){K.c.error(`${s?.loginFailed||"Sign-in failed"}: ${(0,C.Z)(e)}`)}finally{c(!1)}},logout:p,checkin:x}}(),E=o?.login??"none",z=o?.account,I=o?.credits,A={none:l?.statusNone||"Not signed in",active:l?.statusActive||"Signed in",expired:l?.statusExpired||"Login expired"}[E];return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:l?.intro}),(0,s.jsxs)("section",{className:"space-y-3 rounded-md border bg-background p-3","aria-label":l?.title||"MiniMax Code account",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("h4",{className:"text-sm font-medium",children:l?.title||"MiniMax Code account"}),(0,s.jsx)(a.f,{variant:"ghost",size:"sm",onClick:()=>void j(),disabled:c,"aria-label":l?.refresh||"Refresh",children:(0,s.jsx)(x.f,{className:`h-4 w-4 ${c?"animate-spin":""}`})})]}),(0,s.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[(0,s.jsx)("dt",{className:"text-muted-foreground",children:l?.loginStatus||"Login status"}),(0,s.jsxs)("dd",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,s.jsx)(u.f,{variant:"active"===E?"default":"expired"===E?"destructive":"secondary",children:A}),z&&(0,s.jsx)("span",{className:"truncate text-muted-foreground",children:z.name||z.email||z.userId})]}),"active"===E&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("dt",{className:"text-muted-foreground",children:l?.credits||"Remaining credits"}),(0,s.jsx)("dd",{children:I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"font-medium tabular-nums",children:I.total}),(0,s.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:(l?.creditsDetail||"Free {free} · Purchased {purchased}").replace("{free}",String(I.free)).replace("{purchased}",String(I.purchased))})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:l?.creditsUnavailable||"Unavailable"})})]})]}),"active"===E&&o&&(0,s.jsx)(N,{checkin:o.checkin,autoCheckin:e?.autoCheckin!==!1,onAutoCheckinChange:s=>t({...e,autoCheckin:s}),busy:f,onCheckin:()=>void S()}),g?(0,s.jsxs)("div",{className:"space-y-1 rounded-md bg-muted/50 p-3 text-sm",children:[(0,s.jsxs)("p",{className:"flex items-center gap-2",children:[(0,s.jsx)(i.f,{className:"h-4 w-4 animate-spin"}),l?.waiting]}),g.userCode&&(0,s.jsxs)("p",{children:[l?.userCode||"Verification code",": ",(0,s.jsx)("span",{className:"font-mono font-medium",children:g.userCode})]}),(0,s.jsxs)("a",{href:g.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[l?.openLink||"Open the authorization page"," ",(0,s.jsx)(d.f,{className:"h-3 w-3"})]})]}):(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)(a.f,{size:"sm",onClick:()=>void y(),disabled:f,children:[f?(0,s.jsx)(i.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,s.jsx)(m.f,{className:"mr-2 h-4 w-4"}),"none"===E?l?.login||"Sign in with browser":l?.relogin||"Sign in again"]}),"none"!==E&&(0,s.jsxs)(a.f,{size:"sm",variant:"outline",onClick:()=>void P(),disabled:f,children:[(0,s.jsx)(p.f,{className:"mr-2 h-4 w-4"}),l?.logout||"Sign out"]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{htmlFor:"minimax-code-model",children:l?.model||"Model"}),(0,s.jsx)(h.f,{id:"minimax-code-model",list:"minimax-code-models",value:e?.model||"",onChange:s=>t({...e,model:s.target.value}),placeholder:"MiniMax-M3.1-Flash"}),(0,s.jsx)("datalist",{id:"minimax-code-models",children:b.map(e=>(0,s.jsx)("option",{value:e},e))}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:l?.modelHint})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:l?.risk})]})}var P=e.i(77071),S=e.i(759659),E=e.i(464034),z=e.i(434901),I=e.i(37038),A=e.i(62189);function T({value:e,onChange:i}){let{t:r}=(0,v.b)(),l=(0,A.f)("openai"),o=e?.instances||[],c=e?.activeInstanceId,d=o.find(e=>e.id===c),m=(s,a)=>{i({...e,instances:o.map(e=>e.id===c?{...e,[s]:a}:e)})},p=async()=>{if(!c||!await (0,K.u)(r.settings?.ai?.confirmDelete||"Delete this instance?",{destructive:!0}))return;let e=o.filter(e=>e.id!==c);i({instances:e,activeInstanceId:e[0]?.id})};return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(n.f,{children:r.settings?.ai?.instances||"Instance"}),(0,s.jsxs)(a.f,{type:"button",variant:"outline",size:"sm",onClick:()=>{if(o.length>=10)return;let e={id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let s=16*Math.random()|0;return("x"===e?s:3&s|8).toString(16)}),name:`Instance ${o.length+1}`,apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-6.1-sol"};i({instances:[...o,e],activeInstanceId:e.id})},disabled:o.length>=10,className:"h-7 px-2 text-xs",children:[(0,s.jsx)(P.f,{className:"h-3 w-3 mr-1"}),r.settings?.ai?.addInstance||"Add"]})]}),o.length>0?(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)(t.d,{value:c||"",onValueChange:s=>i({...e,activeInstanceId:s}),children:[(0,s.jsx)(t.P,{className:"flex-1",children:(0,s.jsx)(t.U,{placeholder:r.settings?.ai?.selectInstance||"Select Instance"})}),(0,s.jsx)(t.r,{children:o.map(e=>(0,s.jsx)(t.T,{value:e.id,children:e.name},e.id))})]}),o.length>1&&(0,s.jsx)(a.f,{type:"button",variant:"outline",size:"icon",onClick:p,className:"h-10 w-10 text-destructive hover:text-destructive",children:(0,s.jsx)(S.f,{className:"h-4 w-4"})})]}):(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:r.settings?.ai?.noInstances||"No instances configured. Click 'Add' to create one."}),o.length>=10&&(0,s.jsx)("p",{className:"text-xs text-amber-600",children:r.settings?.ai?.maxInstancesReached||"Maximum instances reached (10)"})]}),d&&(0,s.jsxs)("div",{className:"space-y-3 p-3 border rounded-md bg-background",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(n.f,{children:[r.settings?.ai?.instanceName||"Instance Name"," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsx)(h.f,{value:d.name||"",onChange:e=>m("name",e.target.value),placeholder:"e.g. GLM-4V",className:d.name?.trim()?"":"border-destructive"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(z.f,{label:(0,s.jsxs)(s.Fragment,{children:["API Key ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),href:l?.apiKey,linkText:r.settings.ai.docLinks.apiKey}),(0,s.jsx)(I.f,{value:d.apiKey||"",onChange:e=>m("apiKey",e.target.value),placeholder:"sk-...",className:d.apiKey?.trim()?"":"border-destructive"})]}),(0,s.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,s.jsxs)(n.f,{children:["Base URL ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsx)(h.f,{value:d.baseUrl||"",onChange:e=>m("baseUrl",e.target.value),placeholder:"https://api.openai.com/v1",className:d.baseUrl?.trim()?"":"border-destructive"})]}),(0,s.jsx)(E.f,{provider:"openai",apiKey:d.apiKey,baseUrl:d.baseUrl,currentModel:d.model,onModelChange:e=>m("model",e),docsHref:l?.models})]})]})}function F({provider:e}){let{t:i}=(0,v.b)(),a=i.settings.ai.providerDocs,n=(0,A.f)(e);if(!n)return null;let t=[n.cn&&{href:n.cn,label:n.intl?a.cn:a.official},n.intl&&{href:n.intl,label:n.cn?a.intl:a.official}].filter(e=>!!e);return(0,s.jsxs)("p",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,s.jsx)("span",{children:a.title}),t.map(e=>(0,s.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 underline",children:[e.label,(0,s.jsx)(d.f,{className:"h-3 w-3"})]},e.href))]})}var R=e.i(128093);function L({provider:e,value:i,onChange:a}){let{t}=(0,v.b)(),r=R.$[e],l=(e,s)=>a({...i,[e]:s}),o={qwen:t.settings?.ai?.qwenBaseUrlHint,stepfun:t.settings?.ai?.stepfunBaseUrlHint,volcengine:t.settings?.ai?.volcengineBaseUrlHint,"volcengine-agent":t.settings?.ai?.volcengineAgentBaseUrlHint,"volcengine-coding":t.settings?.ai?.volcengineCodingBaseUrlHint};return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:["volcengine-free"===e&&(0,s.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,s.jsx)("p",{className:"font-medium",children:t.settings.ai.volcengineFree.title}),(0,s.jsx)("p",{className:"mt-1",children:t.settings.ai.volcengineFree.body})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(z.f,{label:"API Key",href:r.docs.apiKey,linkText:t.settings.ai.docLinks.apiKey}),(0,s.jsx)(I.f,{value:i?.apiKey||"",onChange:e=>l("apiKey",e.target.value),placeholder:"sk-..."}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[t.settings?.ai?.vendorApiKeyHint||"Get an API key from the console:"," ",(0,s.jsx)("a",{href:r.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"underline break-all",children:r.consoleUrl})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:"Base URL (Optional)"}),(0,s.jsx)(h.f,{value:i?.baseUrl||"",onChange:e=>l("baseUrl",e.target.value),placeholder:r.baseUrl}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:o[e]??t.settings?.ai?.vendorBaseUrlHint})]}),(0,s.jsx)(E.f,{provider:e,apiKey:i?.apiKey,baseUrl:i?.baseUrl,currentModel:i?.model||r.model,onModelChange:e=>l("model",e),docsHref:r.docs.models})]})}e.s(["f",0,function({config:e,setConfig:d,loading:m,saving:p,onSave:x}){let{t:u,language:h}=(0,v.b)();return m?(0,s.jsx)("div",{className:"flex justify-center py-4",children:(0,s.jsx)(i.f,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):(0,s.jsxs)("div",{className:"space-y-4 border rounded-lg p-4 bg-muted/30",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:u.settings?.tabs?.ai||"AI Provider"}),(0,s.jsxs)(t.d,{value:e.aiProvider,onValueChange:e=>d(s=>({...s,aiProvider:e})),children:[(0,s.jsx)(t.P,{children:(0,s.jsx)(t.U,{})}),(0,s.jsxs)(t.r,{children:[(0,s.jsx)(t.T,{value:"minimax",children:(0,R.z)("minimax",h)}),(0,s.jsx)(t.T,{value:"minimax-code",children:"MiniMax Code OAuth"}),R.U.filter(e=>"minimax"!==e).map(e=>(0,s.jsx)(t.T,{value:e,children:(0,R.z)(e,h)},e)),(0,s.jsx)(t.T,{value:"anthropic",children:"Anthropic / Compatible"}),(0,s.jsx)(t.T,{value:"azure",children:"Azure OpenAI"}),(0,s.jsx)(t.T,{value:"openai",children:"OpenAI / Compatible"}),(0,s.jsx)(t.T,{value:"gemini",children:"Google Gemini"})]})]}),(0,s.jsx)(F,{provider:e.aiProvider})]}),"openai"===e.aiProvider&&(0,s.jsx)(T,{value:e.openai,onChange:e=>d(s=>({...s,openai:e}))}),"gemini"===e.aiProvider&&(0,s.jsx)(c.f,{value:e.gemini,onChange:e=>d(s=>({...s,gemini:e}))}),"minimax-code"===e.aiProvider&&(0,s.jsx)(M,{value:e.minimaxCode,onChange:e=>d(s=>({...s,minimaxCode:e}))}),"anthropic"===e.aiProvider&&(0,s.jsx)(l.f,{value:e.anthropic,onChange:e=>d(s=>({...s,anthropic:e}))}),(0,R.j)(e.aiProvider)&&(0,s.jsx)(L,{provider:e.aiProvider,value:e[e.aiProvider],onChange:e=>d(s=>({...s,[s.aiProvider]:e}))},e.aiProvider),"azure"===e.aiProvider&&(0,s.jsx)(o.f,{value:e.azure,onChange:e=>d(s=>({...s,azure:e}))}),(0,s.jsx)(r.f,{config:e,saving:p,saveButton:(0,s.jsxs)(a.f,{onClick:x,disabled:p,className:"flex-1",children:[p&&(0,s.jsx)(i.f,{className:"mr-2 h-4 w-4 animate-spin"}),u.settings?.ai?.save||"Save AI Settings"]})})]})}],10038),e.s(["f",0,function(e,s){if(!(0,y.L)(e.timeZone??y.J))return s.settings.general.invalidTimeZone;if("openai"===e.aiProvider)for(let i of e.openai?.instances||[]){if(!i.name?.trim())return s.settings?.ai?.validationNameRequired||"Instance name is required";if(!i.apiKey?.trim())return s.settings?.ai?.validationApiKeyRequired||"API Key is required";if(!i.baseUrl?.trim())return s.settings?.ai?.validationBaseUrlRequired||"Base URL is required";if(!i.model?.trim())return s.settings?.ai?.validationModelRequired||"Model name is required"}if("azure"===e.aiProvider){if(!e.azure?.endpoint?.trim())return s.settings?.ai?.validationAzureEndpointRequired||"Azure Endpoint is required";if(!e.azure?.deploymentName?.trim())return s.settings?.ai?.validationAzureDeploymentRequired||"Deployment Name is required";if(!e.azure?.apiKey?.trim())return s.settings?.ai?.validationApiKeyRequired||"API Key is required"}return null}],835467)},459649,464034,434901,62189,118585,75977,97923,e=>{var s=e.i(843476),i=e.i(793479),a=e.i(37038),n=e.i(110204),t=e.i(271645),r=e.i(519455),l=e.i(967489),o=e.i(482022),c=e.i(741120),d=e.i(632781),m=e.i(41931),p=e.i(111110),x=e.i(128093),u=e.i(201276);function h({provider:e,apiKey:a,baseUrl:g,currentModel:f,onModelChange:v,docsHref:j}){let{t:y}=(0,p.b)(),[N,b]=(0,t.useState)([]),[k,w]=(0,t.useState)(!1),[C,K]=(0,t.useState)(null),[U,M]=(0,t.useState)(f||""),[P,S]=(0,t.useState)(!1),[E,z]=(0,t.useState)(f);f!==E&&(z(f),M(f||""));let I=async()=>{if(!a)return void K(y.modelSelector?.enterApiKeyFirst||"Please enter API Key first");w(!0),K(null);try{let s=await m.k.post("/api/ai/models",{provider:e,apiKey:a,...g&&{baseUrl:g}});if("error"in s&&"string"==typeof s.error){K(s.error),S(!0),b([]);return}b(s.models),0===s.models.length&&(K(y.modelSelector?.noVisionModel||"No vision model found, please enter manually"),S(!0))}catch(s){u.V.error("[ModelSelector]","Failed to fetch models",{error:s});let e=s instanceof Error&&s.message||y.modelSelector?.fetchFailed||"Failed to fetch models";K(e+(y.modelSelector?.enterManually||", please enter manually")),S(!0)}finally{w(!1)}};return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(n.f,{className:"flex-1",children:y.modelSelector?.modelName||"Model Name"}),j&&(0,s.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[y.settings.ai.docLinks.models,(0,s.jsx)(o.f,{className:"h-3 w-3"})]}),(0,s.jsx)(r.f,{type:"button",variant:"outline",size:"sm",onClick:I,disabled:k||!a,children:k?(0,s.jsx)(d.f,{className:"h-3 w-3 animate-spin"}):(0,s.jsx)(c.f,{className:"h-3 w-3"})})]}),C&&(0,s.jsx)("p",{className:"text-xs text-yellow-600",children:C}),P||0===N.length?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(i.f,{value:U,onChange:e=>{var s;M(s=e.target.value),v(s)},placeholder:(0,x.j)(e)?x.$[e].model:"openai"===e?"gpt-6.1-sol":"gemini-1.5-flash"}),N.length>0&&(0,s.jsx)(r.f,{type:"button",variant:"link",size:"sm",className:"h-auto p-0 text-xs",onClick:()=>S(!1),children:y.modelSelector?.selectFromList||"Select from List"})]}):(0,s.jsx)("div",{className:"space-y-2",children:(0,s.jsxs)(l.d,{value:f,onValueChange:e=>{"_custom"===e?S(!0):(S(!1),M(e),v(e))},children:[(0,s.jsx)(l.P,{children:(0,s.jsx)(l.U,{placeholder:y.modelSelector?.selectModel||"Select Model"})}),(0,s.jsxs)(l.r,{children:[N.map(e=>(0,s.jsxs)(l.T,{value:e.id,children:[e.name,e.owned_by&&` (${e.owned_by})`]},e.id)),(0,s.jsx)(l.T,{value:"_custom",children:y.modelSelector?.customInput||"Custom Input..."})]})]})})]})}function g({label:e,href:i,linkText:a}){return i?(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)(n.f,{children:e}),(0,s.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground underline",children:[a,(0,s.jsx)(o.f,{className:"h-3 w-3"})]})]}):(0,s.jsx)(n.f,{children:e})}e.s(["f",0,h],464034),e.s(["f",0,g],434901);let f={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 v(e){return(0,x.j)(e)?x.$[e].docs:f[e]??null}e.s(["f",0,v],62189),e.s(["f",0,function({value:e,onChange:t}){let{t:r}=(0,p.b)(),l=v("anthropic"),o=(s,i)=>t({...e,[s]:i});return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(g,{label:"API Key",href:l?.apiKey,linkText:r.settings.ai.docLinks.apiKey}),(0,s.jsx)(a.f,{value:e?.apiKey||"",onChange:e=>o("apiKey",e.target.value),placeholder:"sk-ant-..."})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:"Base URL (Optional)"}),(0,s.jsx)(i.f,{value:e?.baseUrl||"",onChange:e=>o("baseUrl",e.target.value),placeholder:"https://api.anthropic.com"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:r.settings?.ai?.anthropicBaseUrlHint})]}),(0,s.jsx)(h,{provider:"anthropic",apiKey:e?.apiKey,baseUrl:e?.baseUrl,currentModel:e?.model,onModelChange:e=>o("model",e),docsHref:l?.models})]})}],459649),e.s(["f",0,function({value:e,onChange:t}){let{t:r}=(0,p.b)(),l=v("azure"),o=(s,i)=>t({...e,[s]:i}),c=e=>e?.trim()?"":"border-destructive";return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)(n.f,{children:[r.settings?.ai?.azureEndpoint||"Azure Endpoint"," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,s.jsx)(i.f,{value:e?.endpoint||"",onChange:e=>o("endpoint",e.target.value),placeholder:r.settings?.ai?.azureEndpointPlaceholder||"https://your-resource.openai.azure.com",className:c(e?.endpoint)})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(g,{label:(0,s.jsxs)(s.Fragment,{children:[r.settings?.ai?.azureDeployment||"Deployment Name"," ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),href:l?.models,linkText:r.settings.ai.docLinks.models}),(0,s.jsx)(i.f,{value:e?.deploymentName||"",onChange:e=>o("deploymentName",e.target.value),placeholder:r.settings?.ai?.azureDeploymentPlaceholder||"gpt-4o-deployment",className:c(e?.deploymentName)})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(g,{label:(0,s.jsxs)(s.Fragment,{children:["API Key ",(0,s.jsx)("span",{className:"text-destructive",children:"*"})]}),href:l?.apiKey,linkText:r.settings.ai.docLinks.apiKey}),(0,s.jsx)(a.f,{value:e?.apiKey||"",onChange:e=>o("apiKey",e.target.value),placeholder:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",className:c(e?.apiKey)})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:r.settings?.ai?.azureApiVersion||"API Version"}),(0,s.jsx)(i.f,{value:e?.apiVersion||"",onChange:e=>o("apiVersion",e.target.value),placeholder:r.settings?.ai?.azureApiVersionPlaceholder||"2024-02-15-preview"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:r.settings?.ai?.azureModel||"Model Display Name"}),(0,s.jsx)(i.f,{value:e?.model||"",onChange:e=>o("model",e.target.value),placeholder:"gpt-4o"})]})]})}],118585),e.s(["f",0,function({value:e,onChange:t}){let{t:r}=(0,p.b)(),l=v("gemini"),o=(s,i)=>t({...e,[s]:i});return(0,s.jsxs)("div",{className:"space-y-3 animate-in fade-in slide-in-from-top-2",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(g,{label:"API Key",href:l?.apiKey,linkText:r.settings.ai.docLinks.apiKey}),(0,s.jsx)(a.f,{value:e?.apiKey||"",onChange:e=>o("apiKey",e.target.value),placeholder:"AIza..."})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(n.f,{children:"Base URL (Optional)"}),(0,s.jsx)(i.f,{value:e?.baseUrl||"",onChange:e=>o("baseUrl",e.target.value),placeholder:"https://generativelanguage.googleapis.com"})]}),(0,s.jsx)(h,{provider:"gemini",apiKey:e?.apiKey,baseUrl:e?.baseUrl,currentModel:e?.model,onModelChange:e=>o("model",e),docsHref:l?.models})]})}],75977);var j=e.i(456420);let y={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"}]]};y.node;let N=(0,j.f)(y);e.s(["f",0,N],97923)},37038,e=>{var s=e.i(843476),i=e.i(271645),a=e.i(772382),n=e.i(580860),t=e.i(519455),r=e.i(793479),l=e.i(111110),o=e.i(975157);e.s(["f",0,function({className:e,...c}){let{t:d}=(0,l.b)(),[m,p]=(0,i.useState)(!1);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(r.f,{type:m?"text":"password",className:(0,o.f)("pr-10",e),...c}),(0,s.jsx)(t.f,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",onClick:()=>p(!m),"aria-label":m?d.common.hidePassword:d.common.showPassword,tabIndex:-1,children:m?(0,s.jsx)(n.f,{className:"h-4 w-4 text-muted-foreground"}):(0,s.jsx)(a.f,{className:"h-4 w-4 text-muted-foreground"})})]})}])}])})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,981140,e=>{var t=Object.defineProperty,r=(e,r)=>t(e,"name",{value:r,configurable:!0}),n=!!("u">typeof window&&window.document&&window.document.createElement);function i(e,t,{checkForDefaultPrevented:n=!0}={}){return r(function(r){if(e?.(r),!1===n||!r||!r.defaultPrevented)return t?.(r)},"handleEvent")}function o(e){if(!n)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}function a(e){return"IFRAME"===e.tagName}r(i,"composeEventHandlers"),r(function(e){if(!n)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window},"getOwnerWindow"),r(o,"getOwnerDocument"),r(function e(t,r=!1){let{activeElement:n}=o(t);if(!n?.nodeName)return null;if(a(n)&&n.contentDocument)return e(n.contentDocument.body,r);if(r){let e=n.getAttribute("aria-activedescendant");if(e){let t=o(n).getElementById(e);if(t)return t}}return n},"getActiveElement"),r(a,"isFrame"),e.s(["f",0,i])},705844,e=>{e.s(["f",0,!1])},30030,e=>{var t=e.i(271645),r=e.i(843476),n=Object.defineProperty,i=(e,t)=>n(e,"name",{value:t,configurable:!0});function o(e,n=[]){let s=[];function u(n,o){let a=t.createContext(o);a.displayName=n+"Context";let u=s.length;s=[...s,o];let l=i(n=>{let{scope:i,children:o,...s}=n,l=i?.[e]?.[u]||a,c=t.useMemo(()=>s,Object.values(s));return(0,r.jsx)(l.Provider,{value:c,children:o})},"Provider");function c(r,i,s={}){let{optional:l=!1}=s,d=i?.[e]?.[u]||a,f=t.useContext(d);if(f)return f;if(void 0!==o)return o;if(!l)throw Error(`\`${r}\` must be used within \`${n}\``)}return l.displayName=n+"Provider",i(c,"useContext"),[l,c]}i(u,"createContext");let l=i(()=>{let r=s.map(e=>t.createContext(e));return i(function(n){let i=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])},"useScope")},"createScope");return l.scopeName=e,[u,a(l,...n)]}function a(...e){let r=e[0];if(1===e.length)return r;let n=i(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return i(function(e){let i=n.reduce((t,{useScope:r,scopeName:n})=>{let i=r(e)[`__scope${n}`];return{...t,...i}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return n.scopeName=r.scopeName,n}i(function(e,n){let o=t.createContext(n);o.displayName=e+"Context";let a=i(e=>{let{children:n,...i}=e,a=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:a,children:n})},"Provider");function s(r,i={}){let{optional:a=!1}=i,u=t.useContext(o);if(u)return u;if(void 0!==n)return n;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return a.displayName=e+"Provider",i(s,"useContext"),[a,s]},"createContext"),i(o,"createContextScope"),i(a,"composeContextScopes"),e.s(["f",0,o])},296626,e=>{var t=e.i(271645),r=e.i(934620),n=Object.defineProperty,i=(e,t)=>n(e,"name",{value:t,configurable:!0});function o(e,r){return t.useReducer((e,t)=>r[e][t]??e,e)}i(o,"useStateMachine");var a=i(e=>{let{present:r,children:n}=e,i=s(r),o="function"==typeof n?n({present:i.isPresent}):t.Children.only(n),a=l(i.ref,d(o));return"function"==typeof n||i.isPresent?t.cloneElement(o,{ref:a}):null},"Presence");function s(e){let[n,a]=t.useState(),s=t.useRef(null),u=t.useRef(e),l=t.useRef("none"),d=t.useRef(void 0),[f,m]=o(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect(()=>{"mounted"===f?(l.current=d.current??c(s.current),d.current=void 0):l.current="none"},[f]),(0,r.f)(()=>{let t=s.current,r=u.current;if(r!==e){let n=l.current,i=c(t);e?(d.current=i,m("MOUNT")):"none"===i||t?.display==="none"?m("UNMOUNT"):r&&n!==i?m("ANIMATION_OUT"):m("UNMOUNT"),u.current=e}},[e,m]),(0,r.f)(()=>{if(n){let e,t=n.ownerDocument.defaultView??window,r=i(r=>{let i=c(s.current).includes(CSS.escape(r.animationName));if(r.target===n&&i&&(m("ANIMATION_END"),!u.current)){let r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},"handleAnimationEnd"),o=i(e=>{e.target===n&&(l.current=c(s.current))},"handleAnimationStart");return n.addEventListener("animationstart",o),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",o),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}m("ANIMATION_END")},[n,m]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:t.useCallback(e=>{if(e){let t=getComputedStyle(e);s.current=t,d.current=c(t)}else s.current=null;a(e)},[])}}function u(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){let r=t.useRef(e);return r.current=e,t.useCallback(e=>{let t=r.current,n=!1,i=t.map(t=>{let r=u(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e<i.length;e++){let r=i[e];"function"==typeof r?r():u(t[e],null)}}},[])}function c(e){return e?.animationName||"none"}function d(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(r=(t=Object.getOwnPropertyDescriptor(e,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning)?e.props.ref:e.props.ref||e.ref}i(s,"usePresence"),i(u,"setRef"),i(l,"useStableComposedRefs"),i(c,"getAnimationName"),i(d,"getElementRef"),e.s(["f",0,a])},248425,e=>{var t=e.i(271645),r=e.i(174080),n=e.i(991918),i=e.i(843476),o=Object.defineProperty,a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let o=(0,n.B)(`Primitive.${r}`),a=t.forwardRef((e,t)=>{let{asChild:n,...a}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(n?o:r,{...a,ref:t})});return a.displayName=`Primitive.${r}`,{...e,[r]:a}},{});function s(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}o(s,"name",{value:"dispatchDiscreteCustomEvent",configurable:!0}),e.s(["V",0,a,"u",0,s])},369340,e=>{var t=e.i(271645),r=e.i(705844),n=e.i(934620),i=Object.defineProperty,o=t[" useEffectEvent ".trim().toString()],a=t[" useInsertionEffect ".trim().toString()];function s(e){if("function"==typeof o)return o(e);let r=t.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});return"function"==typeof a?a(()=>{r.current=e}):(0,n.f)(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}i(s,"name",{value:"useEffectEvent",configurable:!0});var u=Object.defineProperty,l=(e,t)=>u(e,"name",{value:t,configurable:!0}),c=t[" useInsertionEffect ".trim().toString()]||n.f;function d({prop:e,defaultProp:n,onChange:i=l(()=>{},"onChange"),caller:o}){let[a,s,u]=f({defaultProp:n,onChange:i}),c=void 0!==e,p=c?e:a;if(r.f){let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=c},[c,o])}return[p,t.useCallback(t=>{if(c){let r=m(t)?t(e):t;r!==e&&u.current?.(r)}else s(t)},[c,e,s,u])]}function f({defaultProp:e,onChange:r}){let[n,i]=t.useState(e),o=t.useRef(n),a=t.useRef(r);return c(()=>{a.current=r},[r]),t.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,i,a]}function m(e){return"function"==typeof e}l(d,"useControllableState"),l(f,"useUncontrolledState"),l(m,"isFunction");var p=Symbol("RADIX:SYNC_STATE");l(function(e,n,i,o){let{prop:a,defaultProp:u,onChange:l,caller:c}=n,d=void 0!==a,f=s(l);if(r.f){let e=t.useRef(void 0!==a);t.useEffect(()=>{let t=e.current;if(t!==d){let e=d?"controlled":"uncontrolled";console.warn(`${c} is changing from ${t?"controlled":"uncontrolled"} to ${e}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}e.current=d},[d,c])}let m=[{...i,state:u}];o&&m.push(o);let[v,h]=t.useReducer((t,r)=>{if(r.type===p)return{...t,state:r.state};let n=e(t,r);return d&&!Object.is(n.state,t.state)&&f(n.state),n},...m),g=v.state,y=t.useRef(g);t.useEffect(()=>{y.current!==g&&(y.current=g,d||f(g))},[g,y,d]);let w=t.useMemo(()=>void 0!==a?{...v,state:a}:v,[v,a]);return t.useEffect(()=>{d&&!Object.is(a,v.state)&&h({type:p,state:a})},[a,v.state,d]),[w,h]},"useControllableStateReducer"),e.s(["f",0,d],369340)},934620,e=>{var t=e.i(271645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["f",0,r])},635804,e=>{var t=e.i(271645),r=e.i(934620);function n(e){let[n,i]=t.useState(void 0);return(0,r.f)(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let n=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if("borderBoxSize"in n){let e=n.borderBoxSize,i=Array.isArray(e)?e[0]:e;t=i.inlineSize,r=i.blockSize}else t=e.offsetWidth,r=e.offsetHeight;i({width:t,height:r})})});return r.observe(e,{box:"border-box"}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}i(void 0)},[e]),n}(0,Object.defineProperty)(n,"name",{value:"useSize",configurable:!0}),e.s(["f",0,n])},856423,e=>{var t=e.i(456420);let r={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],856423)},689664,e=>{var t=e.i(456420);let r={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],689664)},716327,456539,e=>{var t=e.i(456420);let r={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],716327);let i={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};i.node;let o=(0,t.f)(i);e.s(["f",0,o],456539)},551757,e=>{var t=e.i(456420);let r={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],551757)},772382,e=>{var t=e.i(456420);let r={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],772382)},632781,e=>{var t=e.i(456420);let r={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],632781)},395925,e=>{var t=e.i(456420);let r={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],395925)},759659,e=>{var t=e.i(456420);let r={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"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],759659)},853138,e=>{var t=e.i(456420);let r={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],853138)},28342,676167,e=>{var t=e.i(843476),r=e.i(111110);let n=["一年级","二年级","三年级","四年级","五年级","六年级","初一","初二","初三","高一","高二","高三","大一","大二","大三","大四"],i=n.flatMap(e=>[`${e}上`,`${e}下`]),o={primary:{start:0,end:6},junior_high:{start:6,end:9},senior_high:{start:9,end:12},university:{start:12,end:16}};e.s(["T",0,n,"H",0,i,"c",0,function(e){let t=o[e];return t?n.slice(t.start,t.end):[]},"p",0,function(e){return e.endsWith("上")?{grade:e.slice(0,-1),semester:"上"}:e.endsWith("下")?{grade:e.slice(0,-1),semester:"下"}:null}],676167),e.s(["f",0,function({id:e,value:o,onChange:a,disabled:s}){let{t:u}=(0,r.b)();return(0,t.jsxs)("select",{id:e,value:o,onChange:e=>a(e.target.value),disabled:s,"aria-label":u.editor.gradeSemester,className:"h-10 w-full min-w-0 rounded-md border border-input bg-background px-3 text-sm disabled:opacity-50",children:[(0,t.jsx)("option",{value:"",children:u.common.notSet}),o&&!i.includes(o)&&(0,t.jsx)("option",{value:o,children:o}),n.flatMap((e,r)=>["上","下"].map((n,i)=>(0,t.jsxs)("option",{value:`${e}${n}`,children:[u.gradeSelection.names[r]," · ",0===i?u.gradeSelection.firstSemester:u.gradeSelection.secondSemester]},`${e}${n}`)))]})}],28342)},487486,e=>{var t=e.i(843476),r=e.i(991918),n=e.i(225913),i=e.i(975157);let o=(0,n.f)("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});e.s(["f",0,function({className:e,variant:n,asChild:a=!1,...s}){let u=a?r.M:"span";return(0,t.jsx)(u,{"data-slot":"badge",className:(0,i.f)(o({variant:n}),e),...s})}])},793479,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,type:n,...i}){return(0,t.jsx)("input",{type:n,"data-slot":"input",className:(0,r.f)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...i})}])},624687,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.f)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...n})}])},215519,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(306831);let i=(0,r.createContext)({timeZone:n.J,setTimeZone:()=>void 0});e.s(["n",0,function({children:e,initialTimeZone:o=n.J}){let[a,s]=(0,r.useState)(o);return(0,t.jsx)(i.Provider,{value:{timeZone:a,setTimeZone:s},children:e})},"M",0,function(){return(0,r.useContext)(i)}])},707212,e=>{e.s(["f",0,{zh:"今天的 AI 使用次数已达上限,请明天再试,或请管理员调整额度。",en:"You have used up today's AI allowance. Try again tomorrow or ask an administrator to raise the limit."}])},41931,294114,e=>{let t={success:2500,info:3500,warning:4500,error:5e3},r={toasts:[],confirm:null},n=1,i=new Set;function o(e){r=e,i.forEach(e=>e(r))}function a(e){o({...r,toasts:r.toasts.filter(t=>t.id!==e)})}function s(e,i){let s="string"==typeof i?i:String(i??"");if(!s)return;let u=n++;o({...r,toasts:[...r.toasts.slice(-3),{id:u,type:e,message:s}]}),setTimeout(()=>a(u),t[e])}let u={success:e=>s("success",e),error:e=>s("error",e),info:e=>s("info",e),warning:e=>s("warning",e)};e.s(["u",0,function(e,t={}){return 0===i.size?Promise.resolve("function"==typeof window.confirm&&window.confirm(e)):(r.confirm?.resolve(!1),new Promise(i=>{let a=n++;o({...r,confirm:{...t,id:a,message:e,resolve:e=>{r.confirm?.id===a&&o({...r,confirm:null}),i(e)}}})}))},"p",0,a,"M",0,function(e){return i.add(e),e(r),()=>{i.delete(e)}},"c",0,u],294114);var l=e.i(707212);class c extends Error{status;statusText;data;constructor(e,t,r){super(`API Error: ${e} ${t}`),this.status=e,this.statusText=t,this.data=r,this.name="ApiError"}}function d(e){if("object"!=typeof e||null===e||!("code"in e)||"AI_DAILY_LIMIT_EXCEEDED"!==e.code)return;let t="zh";try{"en"===localStorage.getItem("app-language")&&(t="en")}catch{}u.warning(l.f[t])}function f(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}let m=e=>new Promise(t=>setTimeout(t,e));async function p(e,t,r){let n=Date.now();for(;Date.now()<t;){let t=null;try{t=await v(`/api/requests/${e}`,{method:"GET",timeout:15e3})}catch(e){if(e instanceof c&&404===e.status&&Date.now()-n>6e3)throw r}if(t?.state==="done"){if(t.status>=200&&t.status<300)return t.body??{};throw 429===t.status&&d(t.body),new c(t.status,"",t.body)}await m(3e3)}throw new c(408,"Request Timeout",{message:"AI_TIMEOUT_ERROR"})}async function v(e,t={}){let{params:r,headers:n,timeout:i=6e4,recoverable:o,requestId:a,...s}=t,u=o?a??f():null,l=Date.now(),m=e;if(r){let e=new URLSearchParams(r);m+=`?${e.toString()}`}let h=new AbortController,g=setTimeout(()=>h.abort(),i);try{let e=await fetch(m,{headers:{"Content-Type":"application/json",...u?{"X-Request-Id":u}:{},...n},signal:h.signal,...s});if(clearTimeout(g),!e.ok){let t,r=await e.text();try{t=JSON.parse(r)}catch{t=r}throw 429===e.status&&d(t),new c(e.status,e.statusText,t)}if(204===e.status)return{};try{return await e.json()}catch{return{}}}catch(e){if(clearTimeout(g),e instanceof Error&&"AbortError"===e.name)throw new c(408,"Request Timeout",{message:"AI_TIMEOUT_ERROR"});if(u&&e instanceof TypeError)return p(u,l+i,e);throw e}}e.s(["a",0,c,"k",0,{get:(e,t)=>v(e,{...t,method:"GET"}),post:(e,t,r)=>v(e,{...r,method:"POST",body:JSON.stringify(t)}),put:(e,t,r)=>v(e,{...r,method:"PUT",body:JSON.stringify(t)}),patch:(e,t,r)=>v(e,{...r,method:"PATCH",body:JSON.stringify(t)}),delete:(e,t)=>v(e,{...t,method:"DELETE"})},"j",0,f,"u",0,p],41931)},303163,e=>{e.s(["L",0,function(e){if("object"!=typeof e||null===e||!("data"in e))return;let{data:t}=e;if("object"==typeof t&&null!==t&&"details"in t)return"string"==typeof t.details&&t.details?t.details:void 0},"d",0,function(e){if("object"!=typeof e||null===e||!("data"in e))return;let{data:t}=e;if("object"==typeof t&&null!==t&&"message"in t)return"string"==typeof t.message?t.message:void 0},"Z",0,function(e){return e instanceof Error?e.message:String(e)}])},113381,e=>{var t=e.i(303163);let r=["Line","Segment","Ray","Point","Circle","Ellipse","Hyperbola","Parabola","Polygon","Intersect","Midpoint","PerpendicularLine","Angle","Text","Slider","Locus","Reflect","Translate","Rotate","Vector","UnitVector","OrthogonalVector","Distance","Length","Area","Tangent","Arc","CircularArc","Semicircle","Sequence","Element","If","Sum","Integral","Derivative","Root","Extremum","sin","cos","tan","asin","acos","atan","sqrt","abs","exp","ln","log","floor","ceil","round","min","max"],n=["setCoordSystem","setAxesVisible","setGridVisible","setColor","setLineThickness","setLineStyle","setPointSize","setPointStyle","setLabelVisible","setCaption","setVisible","setFilling","setValue","setFixed","setBackgroundColor"],i=new Map(n.map(e=>[e.toLowerCase(),e])),o=new Set(r.map(e=>e.toLowerCase())),a=/(?:java|vb)script\s*:|[\u0000-\u0008\u000b\u000c\u000e-\u001f]/i;function s(e){if(a.test(e)||/<\s*\/?\s*(?:script|iframe|img|svg|object|embed|html)\b/i.test(e))return!0;for(let t of e.matchAll(/"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/g))try{let e=l(t[0]);if("string"==typeof e&&(/<\s*\/?\s*[a-z!][^>]*>/i.test(e)||a.test(e)))return!0;if(t[0].startsWith('"'))try{let e=JSON.parse(t[0]);if("string"==typeof e&&(/<\s*\/?\s*[a-z!][^>]*>/i.test(e)||/(?:java|vb)script\s*:/i.test(e)))return!0}catch{}}catch{return!0}return!1}function u(e){if(!e.trim())return[];let t=[],r="",n=!1,i=0,o=0;for(let a=0;a<e.length;a++){let s=e[a];if(r)n?n=!1:"\\"===s?n=!0:s===r&&(r="");else if('"'===s||"'"===s)r=s;else if("["===s)i++;else if("]"===s){if(--i<0)throw Error("参数括号不匹配")}else","===s&&0===i&&(t.push(e.slice(o,a).trim()),o=a+1)}if(r||i||n)throw Error("参数未闭合");return t.push(e.slice(o).trim()),t}function l(e){if(/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i.test(e)){let t=Number(e);if(Number.isFinite(t))return t}if("true"===e||"false"===e)return"true"===e;if(e.startsWith("[")&&e.endsWith("]"))return u(e.slice(1,-1)).map(l);let t=e[0];if(('"'===t||"'"===t)&&e.endsWith(t)){let r=e.slice(1,-1),n="";for(let e=0;e<r.length;e++){if(r[e]===t)throw Error("字符串包含未转义引号");if("\\"!==r[e])n+=r[e];else{let i=r[++e];if(void 0===i)throw Error("字符串转义未闭合");n+="\\"===i||i===t?i:"\\"+i}}return n}if(/^[\p{L}_][\p{L}\p{N}_]*$/u.test(e))return e;throw Error("API 参数必须是字面值")}e.s(["r",0,n,"I",0,r,"i",0,function(e){if(!e?.trim())return[];let t=e.trim();if(t.startsWith("["))try{let e=JSON.parse(t);if(Array.isArray(e))return e.filter(e=>"string"==typeof e&&!!e.trim())}catch{}return t.split("\n").map(e=>e.trim()).filter(e=>e&&!e.startsWith("//"))},"L",0,function(e,r){let n=[],a=new Set;for(let c of r)try{if(s(c))throw Error("命令包含不允许的脚本或标记");if(function(e){let t=e.trim().match(/^(\w+)\s*\(/)?.[1].toLowerCase();return!!t&&i.has(t)}(c)){let t=function(e){let t=e.trim().match(/^(\w+)\s*\(([\s\S]*)\)$/);if(!t)return null;let r=i.get(t[1].toLowerCase());if(!r)return null;try{let e=u(t[2]).map(l);return{m:r,a:e}}catch{return null}}(c),r=t?e[t.m]:void 0;if(!t||"function"!=typeof r)throw Error("API 方法或参数无效");r.apply(e,t.a)}else{if(!function(e,t=new Set){if(!e.trim()||s(e)||/[;`\r\n]/.test(e))return!1;let r=e.replace(/"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'/g,"");if(/["']/.test(r)||/(?:https?:|\b(?:ggbApplet|window|document)\b)/i.test(r)||/\b(?:Execute|RunClickScript|RunUpdateScript|JavaScript|eval|Function|Open|PlaySound|ReadText)\b/i.test(r))return!1;let n=r.match(/^\s*([\p{L}_][\p{L}\p{N}_]*)\s*\([^)]*\)\s*=/u)?.[1];for(let e of r.matchAll(/([\p{L}_][\p{L}\p{N}_]*)\s*[(\[]/gu)){let r=e[1];if(!o.has(r.toLowerCase())&&r!==n&&!t.has(r))return!1}return!0}(c,a))throw Error("指令不在允许范围内");if(!e.evalCommand(c.trim()))throw Error("GeoGebra 未能执行该命令");let t=c.match(/^\s*([\p{L}_][\p{L}\p{N}_]*)\s*\([^)]*\)\s*=/u)?.[1];t&&a.add(t)}}catch(e){n.push({command:c,message:(0,t.Z)(e)})}return n}])},901219,e=>{var t=e.i(271645),r=e.i(127175);e.s(["a",0,function(e,n){var i;let[o,a]=(0,t.useState)(null),[s,u]=(0,t.useState)(!1),l=(0,t.useRef)(e),c=(0,t.useRef)(n);(0,t.useEffect)(()=>{l.current=e,c.current=n},[e,n]);let d=(0,t.useCallback)(async()=>{let e=l.current;if(e&&("u"<typeof document||"hidden"!==document.visibilityState))try{let t=await (0,r.h)(e);l.current===e&&(a(t),u(!1),c.current?.(t))}catch(t){t?.status===404&&l.current===e&&u(!0)}},[]);(0,t.useEffect)(()=>{if(!e)return;let t=setTimeout(d,0),n=(0,r.E)(d);return()=>{clearTimeout(t),n()}},[e,d]);let f="analyzing"===(i=o?.status)||"saving"===i;return(0,t.useEffect)(()=>{if(!e||!f)return;let t=setInterval(d,2500);return()=>clearInterval(t)},[e,f,d]),{task:o&&o.id===e?o:null,notFound:s,refresh:d,setTask:a}},"b",0,function(e=!0){let[n,i]=(0,t.useState)(null),[o,a]=(0,t.useState)(!1),s=(0,t.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{i(await (0,r.B)()),a(!1)}catch{a(!0)}},[]);(0,t.useEffect)(()=>{if(!e)return;let t=setTimeout(s,0),n=(0,r.E)(s);return window.addEventListener(r.y,s),()=>{clearTimeout(t),n(),window.removeEventListener(r.y,s)}},[e,s]);let u=(n?.activeCount??0)>0;return(0,t.useEffect)(()=>{if(!e)return;let t=setInterval(s,u?2500:3e4);return()=>clearInterval(t)},[e,u,s]),{data:n,error:o,refresh:s}}])},470279,e=>{var t=e.i(271645),r=e.i(41931),n=e.i(201276);let i=null,o=0,a=new Set;e.s(["f",0,function(){let[e,s]=(0,t.useState)(i??[]),[u,l]=(0,t.useState)(!i),[c,d]=(0,t.useState)(null),f=(0,t.useCallback)(async(e=!1)=>{let t=Date.now();if(!e&&i&&t-o<3e4){s(i),l(!1);return}try{l(!0);let e=await r.k.get("/api/paper-groups");i=e,o=t,a.forEach(t=>t(e)),d(null)}catch(e){n.V.error("[usePaperGroups]","Failed to fetch paper groups",{error:e}),d("Failed to load paper groups")}finally{l(!1)}},[]);return(0,t.useEffect)(()=>(a.add(s),f(),()=>{a.delete(s)}),[f]),{groups:e,loading:u,error:c,refetch:(0,t.useCallback)(()=>(i=null,o=0,f(!0)),[f])}}])},127175,e=>{var t=e.i(41931);let r="wrong-notebook:import-tasks-changed";function n(){window.dispatchEvent(new Event(r))}function i(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}async function o(e,r=i()){let a;for(let i=0;i<3;i++)try{let{task:i}=await t.k.post("/api/import-tasks",{...e,clientRequestId:r,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4});return n(),i}catch(e){if(a=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===i)break;await new Promise(e=>setTimeout(e,1e3*(i+1)))}throw a}async function a(e,r={}){let n=r.image?"?include=image":"",{task:i}=await t.k.get(`/api/import-tasks/${encodeURIComponent(e)}${n}`);return i}async function s(e,r){let i=await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/confirm`,r);return n(),i}async function u(e){let{task:r}=await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/retry`,{});return n(),r}async function l(e){await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/read`,{}),n()}async function c(e){await t.k.delete(`/api/import-tasks/${encodeURIComponent(e)}`),n()}e.s(["y",0,r,"I",0,s,"S",0,o,"x",0,c,"h",0,a,"B",0,function(){return t.k.get("/api/import-tasks")},"N",0,l,"c",0,i,"P",0,n,"E",0,function(e){let t=()=>{"visible"===document.visibilityState&&e()},r=t=>{t.persisted&&e()};return document.addEventListener("visibilitychange",t),window.addEventListener("focus",e),window.addEventListener("pageshow",r),window.addEventListener("online",e),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",e),window.removeEventListener("pageshow",r),window.removeEventListener("online",e)}},"R",0,u])}])})();
|
|
File without changes
|
/package/.next/static/{afzFj9VsDFOvE5lff98xs → oMYEAS-Ug2KhwHuve1br9}/_clientMiddlewareManifest.js
RENAMED
|
File without changes
|
|
File without changes
|