wrong-notebook 2026.11.2 → 2026.11.3-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.
Files changed (690) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +16 -0
  3. package/.next/build-manifest.json +36 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +120 -0
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/admin/page.js.nft.json +1 -1
  16. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
  18. package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/admin/cnm-tags/route.js +6 -5
  20. package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
  21. package/.next/server/app/api/admin/dashboard/route.js +16 -15
  22. package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
  23. package/.next/server/app/api/admin/debug-logs/export/route.js +5 -4
  24. package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
  25. package/.next/server/app/api/admin/debug-logs/route.js +5 -4
  26. package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
  27. package/.next/server/app/api/admin/migrate-tags/route.js +5 -4
  28. package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
  29. package/.next/server/app/api/admin/system-reset/route.js +5 -4
  30. package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
  31. package/.next/server/app/api/admin/users/[id]/detail/route.js +16 -15
  32. package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
  33. package/.next/server/app/api/admin/users/[id]/route.js +5 -4
  34. package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/admin/users/route.js +5 -4
  36. package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
  37. package/.next/server/app/api/ai/models/route.js +11 -10
  38. package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
  39. package/.next/server/app/api/ai/test/route.js +10 -9
  40. package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
  41. package/.next/server/app/api/analytics/route.js +12 -11
  42. package/.next/server/app/api/analytics/route.js.nft.json +1 -1
  43. package/.next/server/app/api/analyze/route.js +16 -14
  44. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  45. package/.next/server/app/api/auth/[...nextauth]/route.js +4 -3
  46. package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/error-items/[id]/delete/route.js +5 -4
  48. package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
  49. package/.next/server/app/api/error-items/[id]/figure/route.js +14 -13
  50. package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
  51. package/.next/server/app/api/error-items/[id]/fix-latex/route.js +16 -15
  52. package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
  53. package/.next/server/app/api/error-items/[id]/geogebra/route.js +12 -11
  54. package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
  55. package/.next/server/app/api/error-items/[id]/image/route.js +4 -3
  56. package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
  57. package/.next/server/app/api/error-items/[id]/notes/route.js +5 -4
  58. package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
  59. package/.next/server/app/api/error-items/[id]/practice-records/route.js +4 -3
  60. package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
  61. package/.next/server/app/api/error-items/[id]/reanswer/route.js +14 -13
  62. package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
  63. package/.next/server/app/api/error-items/[id]/retag/route.js +15 -14
  64. package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
  65. package/.next/server/app/api/error-items/[id]/route.js +6 -5
  66. package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
  67. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +14 -13
  68. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
  69. package/.next/server/app/api/error-items/[id]/svg-animation/route.js +14 -13
  70. package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
  71. package/.next/server/app/api/error-items/answer-space/route/app-paths-manifest.json +3 -0
  72. package/.next/server/app/api/error-items/answer-space/route/build-manifest.json +12 -0
  73. package/.next/server/app/api/error-items/answer-space/route/server-reference-manifest.json +4 -0
  74. package/.next/server/app/api/error-items/answer-space/route.js +14 -0
  75. package/.next/server/app/api/error-items/answer-space/route.js.map +5 -0
  76. package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -0
  77. package/.next/server/app/api/error-items/answer-space/route_client-reference-manifest.js +3 -0
  78. package/.next/server/app/api/error-items/batch-delete/route.js +5 -4
  79. package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
  80. package/.next/server/app/api/error-items/clear/route.js +5 -4
  81. package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
  82. package/.next/server/app/api/error-items/list/route.js +6 -5
  83. package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
  84. package/.next/server/app/api/error-items/route.js +17 -15
  85. package/.next/server/app/api/error-items/route.js.nft.json +1 -1
  86. package/.next/server/app/api/error-items/short/[shortId]/route.js +4 -3
  87. package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
  88. package/.next/server/app/api/error-items/similarity/route.js +6 -5
  89. package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
  90. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +15 -14
  91. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
  92. package/.next/server/app/api/exams/[id]/results/route.js +17 -16
  93. package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
  94. package/.next/server/app/api/exams/[id]/retry/route.js +16 -15
  95. package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
  96. package/.next/server/app/api/exams/[id]/route.js +17 -15
  97. package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
  98. package/.next/server/app/api/exams/route.js +17 -16
  99. package/.next/server/app/api/exams/route.js.nft.json +1 -1
  100. package/.next/server/app/api/export/route.js +10 -8
  101. package/.next/server/app/api/export/route.js.nft.json +1 -1
  102. package/.next/server/app/api/geogebra-analyze/route.js +13 -12
  103. package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
  104. package/.next/server/app/api/health/route.js +3 -2
  105. package/.next/server/app/api/health/route.js.nft.json +1 -1
  106. package/.next/server/app/api/import/route.js +19 -17
  107. package/.next/server/app/api/import/route.js.nft.json +1 -1
  108. package/.next/server/app/api/import-batches/[id]/confirm-all/route/app-paths-manifest.json +3 -0
  109. package/.next/server/app/api/import-batches/[id]/confirm-all/route/build-manifest.json +12 -0
  110. package/.next/server/app/api/import-batches/[id]/confirm-all/route/server-reference-manifest.json +4 -0
  111. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +34 -0
  112. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.map +5 -0
  113. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -0
  114. package/.next/server/app/api/import-batches/[id]/confirm-all/route_client-reference-manifest.js +3 -0
  115. package/.next/server/app/api/import-batches/[id]/fix-text/route/app-paths-manifest.json +3 -0
  116. package/.next/server/app/api/import-batches/[id]/fix-text/route/build-manifest.json +12 -0
  117. package/.next/server/app/api/import-batches/[id]/fix-text/route/server-reference-manifest.json +4 -0
  118. package/.next/server/app/api/import-batches/[id]/fix-text/route.js +26 -0
  119. package/.next/server/app/api/import-batches/[id]/fix-text/route.js.map +5 -0
  120. package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -0
  121. package/.next/server/app/api/import-batches/[id]/fix-text/route_client-reference-manifest.js +3 -0
  122. package/.next/server/app/api/import-batches/[id]/read/route/app-paths-manifest.json +3 -0
  123. package/.next/server/app/api/import-batches/[id]/read/route/build-manifest.json +12 -0
  124. package/.next/server/app/api/import-batches/[id]/read/route/server-reference-manifest.json +4 -0
  125. package/.next/server/app/api/import-batches/[id]/read/route.js +34 -0
  126. package/.next/server/app/api/import-batches/[id]/read/route.js.map +5 -0
  127. package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -0
  128. package/.next/server/app/api/import-batches/[id]/read/route_client-reference-manifest.js +3 -0
  129. package/.next/server/app/api/import-batches/[id]/retry/route/app-paths-manifest.json +3 -0
  130. package/.next/server/app/api/import-batches/[id]/retry/route/build-manifest.json +12 -0
  131. package/.next/server/app/api/import-batches/[id]/retry/route/server-reference-manifest.json +4 -0
  132. package/.next/server/app/api/import-batches/[id]/retry/route.js +34 -0
  133. package/.next/server/app/api/import-batches/[id]/retry/route.js.map +5 -0
  134. package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -0
  135. package/.next/server/app/api/import-batches/[id]/retry/route_client-reference-manifest.js +3 -0
  136. package/.next/server/app/api/import-batches/[id]/route/app-paths-manifest.json +3 -0
  137. package/.next/server/app/api/import-batches/[id]/route/build-manifest.json +12 -0
  138. package/.next/server/app/api/import-batches/[id]/route/server-reference-manifest.json +4 -0
  139. package/.next/server/app/api/import-batches/[id]/route.js +34 -0
  140. package/.next/server/app/api/import-batches/[id]/route.js.map +5 -0
  141. package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -0
  142. package/.next/server/app/api/import-batches/[id]/route_client-reference-manifest.js +3 -0
  143. package/.next/server/app/api/import-batches/[id]/start/route/app-paths-manifest.json +3 -0
  144. package/.next/server/app/api/import-batches/[id]/start/route/build-manifest.json +12 -0
  145. package/.next/server/app/api/import-batches/[id]/start/route/server-reference-manifest.json +4 -0
  146. package/.next/server/app/api/import-batches/[id]/start/route.js +34 -0
  147. package/.next/server/app/api/import-batches/[id]/start/route.js.map +5 -0
  148. package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -0
  149. package/.next/server/app/api/import-batches/[id]/start/route_client-reference-manifest.js +3 -0
  150. package/.next/server/app/api/import-batches/route/app-paths-manifest.json +3 -0
  151. package/.next/server/app/api/import-batches/route/build-manifest.json +12 -0
  152. package/.next/server/app/api/import-batches/route/server-reference-manifest.json +4 -0
  153. package/.next/server/app/api/import-batches/route.js +34 -0
  154. package/.next/server/app/api/import-batches/route.js.map +5 -0
  155. package/.next/server/app/api/import-batches/route.js.nft.json +1 -0
  156. package/.next/server/app/api/import-batches/route_client-reference-manifest.js +3 -0
  157. package/.next/server/app/api/import-tasks/[id]/confirm/route/app-paths-manifest.json +3 -0
  158. package/.next/server/app/api/import-tasks/[id]/confirm/route/build-manifest.json +12 -0
  159. package/.next/server/app/api/import-tasks/[id]/confirm/route/server-reference-manifest.json +4 -0
  160. package/.next/server/app/api/import-tasks/[id]/confirm/route.js +33 -0
  161. package/.next/server/app/api/import-tasks/[id]/confirm/route.js.map +5 -0
  162. package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -0
  163. package/.next/server/app/api/import-tasks/[id]/confirm/route_client-reference-manifest.js +3 -0
  164. package/.next/server/app/api/import-tasks/[id]/read/route/app-paths-manifest.json +3 -0
  165. package/.next/server/app/api/import-tasks/[id]/read/route/build-manifest.json +12 -0
  166. package/.next/server/app/api/import-tasks/[id]/read/route/server-reference-manifest.json +4 -0
  167. package/.next/server/app/api/import-tasks/[id]/read/route.js +33 -0
  168. package/.next/server/app/api/import-tasks/[id]/read/route.js.map +5 -0
  169. package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -0
  170. package/.next/server/app/api/import-tasks/[id]/read/route_client-reference-manifest.js +3 -0
  171. package/.next/server/app/api/import-tasks/[id]/retry/route/app-paths-manifest.json +3 -0
  172. package/.next/server/app/api/import-tasks/[id]/retry/route/build-manifest.json +12 -0
  173. package/.next/server/app/api/import-tasks/[id]/retry/route/server-reference-manifest.json +4 -0
  174. package/.next/server/app/api/import-tasks/[id]/retry/route.js +33 -0
  175. package/.next/server/app/api/import-tasks/[id]/retry/route.js.map +5 -0
  176. package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -0
  177. package/.next/server/app/api/import-tasks/[id]/retry/route_client-reference-manifest.js +3 -0
  178. package/.next/server/app/api/import-tasks/[id]/route/app-paths-manifest.json +3 -0
  179. package/.next/server/app/api/import-tasks/[id]/route/build-manifest.json +12 -0
  180. package/.next/server/app/api/import-tasks/[id]/route/server-reference-manifest.json +4 -0
  181. package/.next/server/app/api/import-tasks/[id]/route.js +33 -0
  182. package/.next/server/app/api/import-tasks/[id]/route.js.map +5 -0
  183. package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -0
  184. package/.next/server/app/api/import-tasks/[id]/route_client-reference-manifest.js +3 -0
  185. package/.next/server/app/api/import-tasks/route/app-paths-manifest.json +3 -0
  186. package/.next/server/app/api/import-tasks/route/build-manifest.json +12 -0
  187. package/.next/server/app/api/import-tasks/route/server-reference-manifest.json +4 -0
  188. package/.next/server/app/api/import-tasks/route.js +34 -0
  189. package/.next/server/app/api/import-tasks/route.js.map +5 -0
  190. package/.next/server/app/api/import-tasks/route.js.nft.json +1 -0
  191. package/.next/server/app/api/import-tasks/route_client-reference-manifest.js +3 -0
  192. package/.next/server/app/api/initialize/route.js +5 -4
  193. package/.next/server/app/api/initialize/route.js.nft.json +1 -1
  194. package/.next/server/app/api/logs/frontend/route.js +4 -3
  195. package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
  196. package/.next/server/app/api/minimax-code/checkin/route.js +6 -5
  197. package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
  198. package/.next/server/app/api/minimax-code/login/route.js +5 -4
  199. package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
  200. package/.next/server/app/api/minimax-code/route.js +5 -4
  201. package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
  202. package/.next/server/app/api/notebooks/[id]/retag/route.js +13 -12
  203. package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
  204. package/.next/server/app/api/notebooks/[id]/route.js +5 -4
  205. package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
  206. package/.next/server/app/api/notebooks/route.js +5 -4
  207. package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
  208. package/.next/server/app/api/openclaw/batch-upload/route.js +17 -16
  209. package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
  210. package/.next/server/app/api/paper-groups/[id]/route.js +5 -4
  211. package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
  212. package/.next/server/app/api/paper-groups/route.js +6 -5
  213. package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
  214. package/.next/server/app/api/practice/generate/route.js +14 -13
  215. package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
  216. package/.next/server/app/api/practice/grade/route.js +13 -12
  217. package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
  218. package/.next/server/app/api/practice/record/[id]/route.js +11 -10
  219. package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
  220. package/.next/server/app/api/practice/record/route.js +13 -12
  221. package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
  222. package/.next/server/app/api/reanswer/route.js +15 -14
  223. package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
  224. package/.next/server/app/api/register/route.js +6 -5
  225. package/.next/server/app/api/register/route.js.nft.json +1 -1
  226. package/.next/server/app/api/register/status/route.js +5 -4
  227. package/.next/server/app/api/register/status/route.js.nft.json +1 -1
  228. package/.next/server/app/api/requests/[id]/route.js +6 -5
  229. package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
  230. package/.next/server/app/api/review/due/route.js +15 -14
  231. package/.next/server/app/api/review/due/route.js.nft.json +1 -1
  232. package/.next/server/app/api/settings/route.js +9 -8
  233. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  234. package/.next/server/app/api/setup/route.js +6 -5
  235. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  236. package/.next/server/app/api/stats/practice/clear/route.js +5 -4
  237. package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
  238. package/.next/server/app/api/stats/practice/route.js +5 -4
  239. package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
  240. package/.next/server/app/api/tags/route.js +4 -3
  241. package/.next/server/app/api/tags/route.js.nft.json +1 -1
  242. package/.next/server/app/api/tags/stats/route.js +5 -4
  243. package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
  244. package/.next/server/app/api/tags/suggestions/route.js +4 -3
  245. package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
  246. package/.next/server/app/api/tasks/route.js +5 -4
  247. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  248. package/.next/server/app/api/tts/[id]/route.js +8 -7
  249. package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
  250. package/.next/server/app/api/tts/batch/route.js +12 -11
  251. package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
  252. package/.next/server/app/api/tts/route.js +8 -7
  253. package/.next/server/app/api/tts/route.js.nft.json +1 -1
  254. package/.next/server/app/api/tts/status/route.js +10 -9
  255. package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
  256. package/.next/server/app/api/user/route.js +14 -13
  257. package/.next/server/app/api/user/route.js.nft.json +1 -1
  258. package/.next/server/app/api/version/route.js +3 -2
  259. package/.next/server/app/api/version/route.js.nft.json +1 -1
  260. package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
  261. package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
  262. package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
  263. package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
  264. package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
  265. package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
  266. package/.next/server/app/exams/page.js.nft.json +1 -1
  267. package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
  268. package/.next/server/app/favicon.ico/route.js +3 -2
  269. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  270. package/.next/server/app/import-batches/[id]/page/app-paths-manifest.json +3 -0
  271. package/.next/server/app/import-batches/[id]/page/build-manifest.json +22 -0
  272. package/.next/server/app/import-batches/[id]/page/next-font-manifest.json +11 -0
  273. package/.next/server/app/import-batches/[id]/page/react-loadable-manifest.json +1 -0
  274. package/.next/server/app/import-batches/[id]/page/server-reference-manifest.json +4 -0
  275. package/.next/server/app/import-batches/[id]/page.js +14 -0
  276. package/.next/server/app/import-batches/[id]/page.js.map +5 -0
  277. package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -0
  278. package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +3 -0
  279. package/.next/server/app/import-tasks/[id]/page/app-paths-manifest.json +3 -0
  280. package/.next/server/app/import-tasks/[id]/page/build-manifest.json +22 -0
  281. package/.next/server/app/import-tasks/[id]/page/next-font-manifest.json +11 -0
  282. package/.next/server/app/import-tasks/[id]/page/react-loadable-manifest.json +1 -0
  283. package/.next/server/app/import-tasks/[id]/page/server-reference-manifest.json +4 -0
  284. package/.next/server/app/import-tasks/[id]/page.js +14 -0
  285. package/.next/server/app/import-tasks/[id]/page.js.map +5 -0
  286. package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -0
  287. package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +3 -0
  288. package/.next/server/app/import-tasks/page/app-paths-manifest.json +3 -0
  289. package/.next/server/app/import-tasks/page/build-manifest.json +22 -0
  290. package/.next/server/app/import-tasks/page/next-font-manifest.json +11 -0
  291. package/.next/server/app/import-tasks/page/react-loadable-manifest.json +1 -0
  292. package/.next/server/app/import-tasks/page/server-reference-manifest.json +4 -0
  293. package/.next/server/app/import-tasks/page.js +14 -0
  294. package/.next/server/app/import-tasks/page.js.map +5 -0
  295. package/.next/server/app/import-tasks/page.js.nft.json +1 -0
  296. package/.next/server/app/import-tasks/page_client-reference-manifest.js +3 -0
  297. package/.next/server/app/initialize/page.js.nft.json +1 -1
  298. package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
  299. package/.next/server/app/login/page.js.nft.json +1 -1
  300. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  301. package/.next/server/app/manifest.webmanifest/route.js +3 -2
  302. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  303. package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
  304. package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
  305. package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
  306. package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/notebooks/page.js.nft.json +1 -1
  308. package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
  309. package/.next/server/app/page.js.nft.json +1 -1
  310. package/.next/server/app/page_client-reference-manifest.js +1 -1
  311. package/.next/server/app/practice/page.js.nft.json +1 -1
  312. package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
  313. package/.next/server/app/print-preview/page.js.nft.json +1 -1
  314. package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
  315. package/.next/server/app/register/page.js.nft.json +1 -1
  316. package/.next/server/app/register/page_client-reference-manifest.js +1 -1
  317. package/.next/server/app/review/page.js.nft.json +1 -1
  318. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  319. package/.next/server/app/setup/page.js.nft.json +1 -1
  320. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  321. package/.next/server/app/stats/page.js.nft.json +1 -1
  322. package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  323. package/.next/server/app/tags/page.js.nft.json +1 -1
  324. package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
  325. package/.next/server/app-paths-manifest.json +16 -0
  326. package/.next/server/chunks/1oeh_server_app_api_error-items_answer-space_route_actions_02_4xy5gtmofu.js +3 -0
  327. package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_confirm-all_route_actions_1u0e8at9dph0_.js +3 -0
  328. package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_fix-text_route_actions_0r7lg6-5j_fez.js +3 -0
  329. package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_read_route_actions_1nrzqz1at4s64.js +3 -0
  330. package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_retry_route_actions_1u5hn2zjw-sj-.js +3 -0
  331. package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_start_route_actions_1o5tg4uk8s-ch.js +3 -0
  332. package/.next/server/chunks/1oeh_server_app_api_import-tasks_[id]_confirm_route_actions_0cj5phaug2e76.js +3 -0
  333. package/.next/server/chunks/1oeh_server_app_api_import-tasks_[id]_retry_route_actions_1g7rekf8h4rkk.js +3 -0
  334. package/.next/server/chunks/{[externals]__0c36n-dcv5nqc._.js → [externals]__0fgpzedhhntg9._.js} +1 -1
  335. package/.next/server/chunks/[externals]__14rv088xdnlo4._.js +3 -0
  336. package/.next/server/chunks/{[externals]__1lhov-pp9xqtz._.js → [externals]__1i7c9m3y35e80._.js} +1 -1
  337. package/.next/server/chunks/[root-of-the-server]__0-f1ktua0hz_g._.js +3 -0
  338. package/.next/server/chunks/{[root-of-the-server]__0455yyxule6q_._.js → [root-of-the-server]__01-14hxale6jz._.js} +1 -1
  339. package/.next/server/chunks/{[root-of-the-server]__0nw6t7u627b2m._.js → [root-of-the-server]__01mz72wf0po36._.js} +2 -2
  340. package/.next/server/chunks/{[root-of-the-server]__07uf7ctm4sjo4._.js → [root-of-the-server]__01rm65xnqj0z-._.js} +1 -1
  341. package/.next/server/chunks/{[root-of-the-server]__0n0c-mpolar22._.js → [root-of-the-server]__029n0r2v92pcc._.js} +2 -2
  342. package/.next/server/chunks/[root-of-the-server]__02ez4rqh6y7uu._.js +3 -0
  343. package/.next/server/chunks/{[root-of-the-server]__1d1gxff_c2o28._.js → [root-of-the-server]__02jcq4nj_tb6l._.js} +2 -2
  344. package/.next/server/chunks/{[root-of-the-server]__06lmwv-4d1slg._.js → [root-of-the-server]__02nbzp-n9g9_o._.js} +1 -1
  345. package/.next/server/chunks/{[root-of-the-server]__0hm2dh8ziz93k._.js → [root-of-the-server]__02oqd6w58wymi._.js} +1 -1
  346. package/.next/server/chunks/[root-of-the-server]__04pdmyloqh744._.js +5 -0
  347. package/.next/server/chunks/{[root-of-the-server]__0_ahztuh3lr_n._.js → [root-of-the-server]__05tyrbfzivoeq._.js} +1 -1
  348. package/.next/server/chunks/[root-of-the-server]__06jad9cnzeci-._.js +3 -0
  349. package/.next/server/chunks/{[root-of-the-server]__0os8s3dtzx4gi._.js → [root-of-the-server]__08aldp-j0e_op._.js} +2 -2
  350. package/.next/server/chunks/[root-of-the-server]__08crf3zxl7fnv._.js +3 -0
  351. package/.next/server/chunks/{[root-of-the-server]__0m8bcdajibej0._.js → [root-of-the-server]__092b1e081ocu6._.js} +1 -1
  352. package/.next/server/chunks/{[root-of-the-server]__0vz0xv_w6vbpq._.js → [root-of-the-server]__092h03ec6f_1u._.js} +1 -1
  353. package/.next/server/chunks/{[root-of-the-server]__12fkzjxvspcin._.js → [root-of-the-server]__094fb72-14c6v._.js} +1 -1
  354. package/.next/server/chunks/{[root-of-the-server]__1fj6upsvfxy4r._.js → [root-of-the-server]__0_fisu5brhyk_._.js} +1 -1
  355. package/.next/server/chunks/[root-of-the-server]__0_uvtfu0yr-na._.js +4 -4
  356. package/.next/server/chunks/[root-of-the-server]__0a13lncff9jx-._.js +3 -0
  357. package/.next/server/chunks/{[root-of-the-server]__1m8b6why7f1uj._.js → [root-of-the-server]__0a5qx2roo_50n._.js} +2 -2
  358. package/.next/server/chunks/{[root-of-the-server]__14wezz97rhtz9._.js → [root-of-the-server]__0ahnj8vp1pywj._.js} +2 -2
  359. package/.next/server/chunks/[root-of-the-server]__0b5mh_vi6e246._.js +3 -0
  360. package/.next/server/chunks/[root-of-the-server]__0b5qyqwq6mk5v._.js +3 -0
  361. package/.next/server/chunks/[root-of-the-server]__0b79cd6lae7ep._.js +3 -0
  362. package/.next/server/chunks/{[root-of-the-server]__0sxr-ing62eg7._.js → [root-of-the-server]__0bmczgpuggwki._.js} +1 -1
  363. package/.next/server/chunks/[root-of-the-server]__0cu5jz9b3f0i1._.js +3 -0
  364. package/.next/server/chunks/[root-of-the-server]__0d31vt-7stly0._.js +3 -0
  365. package/.next/server/chunks/[root-of-the-server]__0d818ux928r5h._.js +3 -0
  366. package/.next/server/chunks/[root-of-the-server]__0dclcdg0hwxxj._.js +3 -0
  367. package/.next/server/chunks/{[root-of-the-server]__0u36j_9ml4et6._.js → [root-of-the-server]__0ddvoqy3a719u._.js} +1 -1
  368. package/.next/server/chunks/[root-of-the-server]__0e13o3ny66zb3._.js +3 -0
  369. package/.next/server/chunks/{[root-of-the-server]__0xqsrh251_yms._.js → [root-of-the-server]__0eba9rni-2_tw._.js} +1 -1
  370. package/.next/server/chunks/{[root-of-the-server]__18uhupcdidftm._.js → [root-of-the-server]__0fnte1x8xdn5o._.js} +1 -1
  371. package/.next/server/chunks/{[root-of-the-server]__11ztapi1pi7j-._.js → [root-of-the-server]__0fx0s5_6sjw-d._.js} +1 -1
  372. package/.next/server/chunks/[root-of-the-server]__0gphporvvjc0d._.js +3 -0
  373. package/.next/server/chunks/[root-of-the-server]__0h3er81lqy7-3._.js +3 -0
  374. package/.next/server/chunks/{[root-of-the-server]__1ptzu7aqoga2n._.js → [root-of-the-server]__0hcbw1sliw973._.js} +2 -2
  375. package/.next/server/chunks/[root-of-the-server]__0hy5-7_ikat1_._.js +3 -0
  376. package/.next/server/chunks/[root-of-the-server]__0i2mt6zjxbq--._.js +3 -0
  377. package/.next/server/chunks/[root-of-the-server]__0ijmyxflggama._.js +3 -0
  378. package/.next/server/chunks/[root-of-the-server]__0ijq_d0gr5zo8._.js +3 -0
  379. package/.next/server/chunks/{[root-of-the-server]__1f_lrxzw_n-6-._.js → [root-of-the-server]__0ik-49062qe6v._.js} +2 -2
  380. package/.next/server/chunks/[root-of-the-server]__0iqp1f0-yvbhw._.js +3 -0
  381. package/.next/server/chunks/[root-of-the-server]__0j-1ri4yahq6t._.js +3 -0
  382. package/.next/server/chunks/[root-of-the-server]__0k0c90ih7n0te._.js +3 -0
  383. package/.next/server/chunks/{[root-of-the-server]__18z_cczwqkonn._.js → [root-of-the-server]__0kehix4ojdnhw._.js} +2 -2
  384. package/.next/server/chunks/{[root-of-the-server]__145w7mwgp8ujm._.js → [root-of-the-server]__0l30p58xnmw13._.js} +2 -2
  385. package/.next/server/chunks/[root-of-the-server]__0maxg52nxqrzi._.js +3 -0
  386. package/.next/server/chunks/[root-of-the-server]__0ml-m3il4unb6._.js +3 -0
  387. package/.next/server/chunks/[root-of-the-server]__0nujsu6qbn-8o._.js +4 -4
  388. package/.next/server/chunks/{[root-of-the-server]__1oedx4ko_1hl9._.js → [root-of-the-server]__0ob0n0xzc2--7._.js} +2 -2
  389. package/.next/server/chunks/{[root-of-the-server]__0rnr17a382rjx._.js → [root-of-the-server]__0opuw_bsktcnc._.js} +2 -2
  390. package/.next/server/chunks/{[root-of-the-server]__12cpc3g7-oi86._.js → [root-of-the-server]__0ptn9j1rleieh._.js} +1 -1
  391. package/.next/server/chunks/[root-of-the-server]__0rwxa2doabk45._.js +3 -0
  392. package/.next/server/chunks/[root-of-the-server]__0s-etfexh0i4a._.js +3 -0
  393. package/.next/server/chunks/[root-of-the-server]__0u3m78xhq8b3l._.js +3 -0
  394. package/.next/server/chunks/{[root-of-the-server]__08t21dbk1cidn._.js → [root-of-the-server]__0v5o3aoha3nct._.js} +2 -2
  395. package/.next/server/chunks/{[root-of-the-server]__18nv1yn5xh03v._.js → [root-of-the-server]__0w53aflmo1keg._.js} +2 -2
  396. package/.next/server/chunks/[root-of-the-server]__0wdjzoxwwh6bn._.js +3 -0
  397. package/.next/server/chunks/[root-of-the-server]__0wj82qshtrskw._.js +3 -0
  398. package/.next/server/chunks/[root-of-the-server]__0wx65sza19ou-._.js +3 -0
  399. package/.next/server/chunks/[root-of-the-server]__0xasoo-1cispc._.js +3 -0
  400. package/.next/server/chunks/{[root-of-the-server]__00kq2qcxfg-kq._.js → [root-of-the-server]__0xnu_7ck-z9do._.js} +2 -2
  401. package/.next/server/chunks/{[root-of-the-server]__0ym21tuxqrmc4._.js → [root-of-the-server]__0yv_kznxz5qzn._.js} +2 -2
  402. package/.next/server/chunks/[root-of-the-server]__0zldj8zxo-hvc._.js +3 -0
  403. package/.next/server/chunks/[root-of-the-server]__109pj952qxtan._.js +3 -0
  404. package/.next/server/chunks/[root-of-the-server]__121tnm6bol8ow._.js +3 -0
  405. package/.next/server/chunks/[root-of-the-server]__12u4jc5x2ss9k._.js +3 -0
  406. package/.next/server/chunks/[root-of-the-server]__13_k7w8nrx7ie._.js +1 -1
  407. package/.next/server/chunks/[root-of-the-server]__13ofz2qkhwdmd._.js +3 -0
  408. package/.next/server/chunks/{[root-of-the-server]__00jyo3io99_dn._.js → [root-of-the-server]__14jpfgwnpc9gl._.js} +2 -2
  409. package/.next/server/chunks/[root-of-the-server]__14m8fewwq1xs6._.js +3 -0
  410. package/.next/server/chunks/[root-of-the-server]__1679e_8h0w86j._.js +3 -0
  411. package/.next/server/chunks/[root-of-the-server]__18tzik6wyd5b2._.js +3 -0
  412. package/.next/server/chunks/[root-of-the-server]__196oikyiyhn_9._.js +3 -0
  413. package/.next/server/chunks/[root-of-the-server]__19qwvtmhzhh9_._.js +3 -0
  414. package/.next/server/chunks/[root-of-the-server]__19wv3dxe-dx43._.js +3 -0
  415. package/.next/server/chunks/[root-of-the-server]__1asgy7sah0mo6._.js +3 -0
  416. package/.next/server/chunks/[root-of-the-server]__1av1l48rnghpa._.js +3 -0
  417. package/.next/server/chunks/[root-of-the-server]__1azlmjwymm3nj._.js +3 -0
  418. package/.next/server/chunks/{[root-of-the-server]__1v1p83o4ygnyt._.js → [root-of-the-server]__1c5_00hz3u1z7._.js} +2 -2
  419. package/.next/server/chunks/[root-of-the-server]__1dom1le7wqh7d._.js +3 -0
  420. package/.next/server/chunks/{[root-of-the-server]__0btfk_sy3o9wa._.js → [root-of-the-server]__1drs4rr5x286d._.js} +1 -1
  421. package/.next/server/chunks/[root-of-the-server]__1dtpezu7cisnu._.js +3 -0
  422. package/.next/server/chunks/[root-of-the-server]__1eli1ues3akzx._.js +3 -0
  423. package/.next/server/chunks/[root-of-the-server]__1fe2v2mv5-rgo._.js +3 -0
  424. package/.next/server/chunks/[root-of-the-server]__1g6jrwm72xr8a._.js +3 -0
  425. package/.next/server/chunks/{[root-of-the-server]__1zwat9xocdoqz._.js → [root-of-the-server]__1h545soby66hi._.js} +1 -1
  426. package/.next/server/chunks/[root-of-the-server]__1hk5kgctlp2wn._.js +3 -0
  427. package/.next/server/chunks/[root-of-the-server]__1ixotu0p11op8._.js +3 -0
  428. package/.next/server/chunks/[root-of-the-server]__1j0l1jz1c3mpt._.js +3 -0
  429. package/.next/server/chunks/[root-of-the-server]__1k4pnhbw4rgzs._.js +3 -0
  430. package/.next/server/chunks/[root-of-the-server]__1lea5m7hl1n7f._.js +3 -0
  431. package/.next/server/chunks/[root-of-the-server]__1ll7fod21jjr6._.js +3 -0
  432. package/.next/server/chunks/[root-of-the-server]__1m7pja8jp27eh._.js +3 -0
  433. package/.next/server/chunks/[root-of-the-server]__1nv28fsr0vd5p._.js +3 -0
  434. package/.next/server/chunks/[root-of-the-server]__1o_zqaie6w0vc._.js +3 -0
  435. package/.next/server/chunks/[root-of-the-server]__1q-7krekgvk1w._.js +3 -0
  436. package/.next/server/chunks/[root-of-the-server]__1rqu8zxkn8yj1._.js +3 -0
  437. package/.next/server/chunks/[root-of-the-server]__1ruzcenko2gi1._.js +3 -0
  438. package/.next/server/chunks/{[root-of-the-server]__1o9pbkx7ejxu0._.js → [root-of-the-server]__1s-y00c3-nc_-._.js} +1 -1
  439. package/.next/server/chunks/[root-of-the-server]__1seev7pmug-hj._.js +3 -0
  440. package/.next/server/chunks/{[root-of-the-server]__1n21o3aq7pxla._.js → [root-of-the-server]__1t6aypqxgjkg_._.js} +2 -2
  441. package/.next/server/chunks/[root-of-the-server]__1to25zgnk7xk-._.js +3 -0
  442. package/.next/server/chunks/[root-of-the-server]__1vbof6uu4he_-._.js +3 -0
  443. package/.next/server/chunks/[root-of-the-server]__1xkmo8s1c258u._.js +3 -0
  444. package/.next/server/chunks/{[root-of-the-server]__0kmy5264opoz7._.js → [root-of-the-server]__1z56ua9u9hadc._.js} +2 -2
  445. package/.next/server/chunks/[root-of-the-server]__1zc0bmdyn1lg4._.js +3 -0
  446. package/.next/server/chunks/[root-of-the-server]__207c97dbcdb0z._.js +3 -0
  447. package/.next/server/chunks/[root-of-the-server]__20cdqectwle3j._.js +3 -0
  448. package/.next/server/chunks/[root-of-the-server]__20dy4zclqbnw8._.js +3 -0
  449. package/.next/server/chunks/_01bayc6kg7upi._.js +3 -0
  450. package/.next/server/chunks/{_10tpt8iizl4v3._.js → _03dn7v_h3d-v8._.js} +8 -5
  451. package/.next/server/chunks/{_1dvka-waihfum._.js → _043-r529chcri._.js} +8 -5
  452. package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
  453. package/.next/server/chunks/_04rjm4ctjqrba._.js +3 -0
  454. package/.next/server/chunks/_05ans30vcd4s-._.js +3 -0
  455. package/.next/server/chunks/_0_rhee7wb6tcg._.js +1 -1
  456. package/.next/server/chunks/_0ge95_bkwrkmc._.js +3 -0
  457. package/.next/server/chunks/_0lmh33cdt_1fr._.js +3 -0
  458. package/.next/server/chunks/_0pzdohc1mz5ts._.js +3 -0
  459. package/.next/server/chunks/_0suqhfy3e5sv6._.js +3 -0
  460. package/.next/server/chunks/_0xv7-7d6dyo9-._.js +3 -0
  461. package/.next/server/chunks/{_1wulydy4wg9ow._.js → _0xx4y9tk1qclc._.js} +2 -2
  462. package/.next/server/chunks/_0ymqtnritje40._.js +3 -0
  463. package/.next/server/chunks/_1-6i59jd1zhly._.js +11 -0
  464. package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
  465. package/.next/server/chunks/_1647rfjflw_iq._.js +3 -0
  466. package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
  467. package/.next/server/chunks/_1duugm0s3-6nw._.js +3 -0
  468. package/.next/server/chunks/_1gdet1v2zk2gy._.js +3 -0
  469. package/.next/server/chunks/_1hvmjv_7xksea._.js +3 -0
  470. package/.next/server/chunks/_1j10upti9l6da._.js +3 -0
  471. package/.next/server/chunks/{_11_p1ahjjply_._.js → _1pvqo-qnv-nqm._.js} +2 -2
  472. package/.next/server/chunks/{_0dicq393_0h3i._.js → _1rreh3rgx8xan._.js} +1 -1
  473. package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
  474. package/.next/server/chunks/_1s55l1bx-1cxp._.js +3 -0
  475. package/.next/server/chunks/_1srq5kxah38r6._.js +3 -0
  476. package/.next/server/chunks/_1tahh9ric8la3._.js +3 -0
  477. package/.next/server/chunks/_1tvl0cm629nyc._.js +3 -0
  478. package/.next/server/chunks/_next-internal_server_app_api_import-batches_[id]_route_actions_0_mc245t1pbwl.js +3 -0
  479. package/.next/server/chunks/_next-internal_server_app_api_import-batches_route_actions_0pi56cpanyvac.js +3 -0
  480. package/.next/server/chunks/_next-internal_server_app_api_import-tasks_[id]_read_route_actions_116wza5ukp0c2.js +3 -0
  481. package/.next/server/chunks/_next-internal_server_app_api_import-tasks_[id]_route_actions_1fvi-v9pgzuli.js +3 -0
  482. package/.next/server/chunks/_next-internal_server_app_api_import-tasks_route_actions_0d08bh7zurcp_.js +3 -0
  483. package/.next/server/chunks/node_modules_next_dist_0n2og9jackhd2._.js +54 -0
  484. package/.next/server/chunks/src_0bhf345rd7jho._.js +1 -1
  485. package/.next/server/chunks/src_lib_0_g_0q-n01g-x._.js +3 -0
  486. package/.next/server/chunks/src_lib_10is5pyogge95._.js +1 -1
  487. package/.next/server/chunks/src_lib_12j7n__96zd0q._.js +3 -0
  488. package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +80 -27
  489. package/.next/server/chunks/src_lib_1qvj-3jt4jbq7._.js +3 -0
  490. package/.next/server/chunks/src_lib_1xdguwkq8k_gz._.js +3 -0
  491. package/.next/server/chunks/src_lib_constants_pagination_ts_0tz3fg9ib3b-w._.js +1 -1
  492. package/.next/server/chunks/src_lib_import-batches_ts_0aekmggdwo_9-._.js +3 -0
  493. package/.next/server/chunks/src_lib_import-tasks_ts_1f4ejsy00-v1t._.js +3 -0
  494. package/.next/server/chunks/src_lib_question-analysis_ts_15_8r_pxmtd06._.js +3 -0
  495. package/.next/server/chunks/src_lib_question-deduplication_ts_1p1bik-vwl9ue._.js +1 -1
  496. package/.next/server/chunks/src_lib_tag-hierarchy_ts_1illun--8v3_9._.js +3 -0
  497. package/.next/server/chunks/ssr/{[root-of-the-server]__0_eqpxqkvkrs_._.js → [root-of-the-server]__00_c9kpvx5075._.js} +1 -1
  498. package/.next/server/chunks/ssr/[root-of-the-server]__0_bi5ljcm1i1c._.js +3 -0
  499. package/.next/server/chunks/ssr/[root-of-the-server]__0r_5r-242wwqy._.js +3 -0
  500. package/.next/server/chunks/ssr/{[root-of-the-server]__0d4mrtd9tdni-._.js → [root-of-the-server]__0vgnixmnie9dg._.js} +1 -1
  501. package/.next/server/chunks/ssr/[root-of-the-server]__1l68oxzjvj18_._.js +3 -0
  502. package/.next/server/chunks/ssr/[root-of-the-server]__1mrj6vygoasvv._.js +3 -0
  503. package/.next/server/chunks/ssr/{[root-of-the-server]__1eu3xw3zls5xt._.js → [root-of-the-server]__1o5pa8m50qyqa._.js} +1 -1
  504. package/.next/server/chunks/ssr/[root-of-the-server]__1ynp6nm1gttsf._.js +3 -0
  505. package/.next/server/chunks/ssr/[root-of-the-server]__1zupg0zigit-2._.js +3 -0
  506. package/.next/server/chunks/ssr/[root-of-the-server]__2019hdxvtb4e0._.js +3 -0
  507. package/.next/server/chunks/ssr/_05szyj465au6e._.js +3 -0
  508. package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
  509. package/.next/server/chunks/ssr/_0f2k-q7kimi4o._.js +3 -0
  510. package/.next/server/chunks/ssr/_0ks-0g-tu__3m._.js +3 -0
  511. package/.next/server/chunks/ssr/_0lzeodofsq9pe._.js +1 -1
  512. package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +3 -0
  513. package/.next/server/chunks/ssr/_0nt5dm7rmsp4f._.js +3 -0
  514. package/.next/server/chunks/ssr/{_07-atqwd3wqya._.js → _0oslwj90y-3j0._.js} +1 -1
  515. package/.next/server/chunks/ssr/_0ozptnii2nxuw._.js +1 -1
  516. package/.next/server/chunks/ssr/_0s318kewgu2zg._.js +3 -0
  517. package/.next/server/chunks/ssr/_0ueequ0gysrs-._.js +3 -0
  518. package/.next/server/chunks/ssr/_15fdum1ye-k0z._.js +3 -0
  519. package/.next/server/chunks/ssr/_186fwf-hcr_ua._.js +8 -0
  520. package/.next/server/chunks/ssr/_19hxsrrruepym._.js +3 -0
  521. package/.next/server/chunks/ssr/{_1l_v9_8-5wv_d._.js → _1b8cip9y91_br._.js} +1 -1
  522. package/.next/server/chunks/ssr/_1hbrn0tcfh7hd._.js +3 -0
  523. package/.next/server/chunks/ssr/_1j3yr2arbxd6a._.js +3 -0
  524. package/.next/server/chunks/ssr/_1pdnzaad7hk0d._.js +8 -0
  525. package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +1 -9
  526. package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +32 -0
  527. package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +1 -9
  528. package/.next/server/chunks/ssr/_1w1qijzykerpu._.js +3 -0
  529. package/.next/server/chunks/ssr/_next-internal_server_app_import-batches_[id]_page_actions_1hnz0a7dq8meb.js +3 -0
  530. package/.next/server/chunks/ssr/_next-internal_server_app_import-tasks_[id]_page_actions_0ln1lwiey8bbi.js +3 -0
  531. package/.next/server/chunks/ssr/_next-internal_server_app_import-tasks_page_actions_1h7cqbj1cojed.js +3 -0
  532. package/.next/server/chunks/ssr/node_modules_05hncuf8243qe._.js +3 -0
  533. package/.next/server/chunks/ssr/node_modules_0b0fwrqs9v-g1._.js +3 -0
  534. package/.next/server/chunks/ssr/node_modules_11z4lth_9u_hn._.js +2 -2
  535. package/.next/server/chunks/ssr/node_modules_17lx40fyvpom3._.js +3 -0
  536. package/.next/server/chunks/ssr/node_modules_@radix-ui_1i8eumxju2gpw._.js +3 -0
  537. package/.next/server/chunks/ssr/node_modules_heic-to_dist_csp_heic-to_1a1i_ppryp81y.js +3 -0
  538. package/.next/server/chunks/ssr/node_modules_heic-to_dist_csp_heic-to_1myi81wrj4gw4.js +3 -0
  539. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_06p81-gtz_2cm._.js +3 -0
  540. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1bq471wvtkwrl._.js +3 -0
  541. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-4c5fuxx178f.js +3 -0
  542. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d5g5-w_y282q.js +3 -0
  543. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pdc0gl8iqtfa.js +3 -0
  544. package/.next/server/chunks/ssr/node_modules_react-image-crop_dist_index_0khmp4mv3j9zr.js +3 -0
  545. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0n-w9zu3b6q41.js +57 -0
  546. package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
  547. package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +6 -6
  548. package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +3 -0
  549. package/.next/server/chunks/ssr/src_app_import-tasks_[id]_page_tsx_0_grj11-jdqqc._.js +3 -0
  550. package/.next/server/chunks/ssr/src_app_import-tasks_page_tsx_01983hytm-x08._.js +3 -0
  551. package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
  552. package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +1 -1
  553. package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
  554. package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +6 -0
  555. package/.next/server/chunks/ssr/src_components_image-cropper_tsx_0pcp8-ifruyx-._.js +3 -0
  556. package/.next/server/chunks/ssr/src_components_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +3 -0
  557. package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +1 -31
  558. package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +10 -64
  559. package/.next/server/chunks/ssr/src_lib_question-split_text_ts_0h4uz23xrlybm._.js +6 -0
  560. package/.next/server/middleware-build-manifest.js +36 -3
  561. package/.next/server/next-font-manifest.js +1 -1
  562. package/.next/server/next-font-manifest.json +12 -0
  563. package/.next/server/pages/500.html +1 -1
  564. package/.next/server/preview-props.json +3 -3
  565. package/.next/server/server-reference-manifest.js +1 -1
  566. package/.next/server/server-reference-manifest.json +1 -1
  567. package/.next/static/chunks/02wft51kf3t9f.js +1 -0
  568. package/.next/static/chunks/0_ar7dth9hybc.js +1 -0
  569. package/.next/static/chunks/0p6ox1l56khn2.js +3 -0
  570. package/.next/static/chunks/0x9-b30mhne-_.js +1 -0
  571. package/.next/static/chunks/{1g13qcek7-0du.js → 16h0nz5l970cx.js} +1 -1
  572. package/.next/static/chunks/1746y345zti-9.js +33 -0
  573. package/.next/static/chunks/1d0ltu2dk4a0v.js +1 -0
  574. package/.next/static/chunks/1hwk1kmheoccm.js +9 -0
  575. package/.next/static/chunks/1qj8u6q02qbty.js +1 -0
  576. package/.next/static/chunks/1rvm9ttct-w2q.css +3 -0
  577. package/.next/static/chunks/1upvap68fad8i.js +1 -0
  578. package/.next/static/chunks/21-zw9_-z7wy0.js +1 -0
  579. package/.next/static/chunks/210o9wkszynk8.js +55 -0
  580. package/.next/static/chunks/2467o8uezj--l.js +12 -0
  581. package/.next/static/chunks/26_q5epdikurm.js +1 -0
  582. package/.next/static/chunks/289znh7431pug.js +1 -0
  583. package/.next/static/chunks/2hh64gi4pmlk2.js +1 -0
  584. package/.next/static/chunks/2ic9ath-r3jvf.js +193 -0
  585. package/.next/static/chunks/2q9dw_3pa6om0.js +12 -0
  586. package/.next/static/chunks/3-se55-6uc0mx.js +2 -0
  587. package/.next/static/chunks/31-r0kqqw-wfd.js +6 -0
  588. package/.next/static/chunks/344kc1rli8fy-.js +1 -0
  589. package/.next/static/chunks/38fux_rbsoiif.js +1 -0
  590. package/.next/static/chunks/38vt_4ntvy02e.js +1 -0
  591. package/.next/static/chunks/3c3cp7uzfhnyr.js +1 -0
  592. package/.next/static/chunks/3gy-_kb72v5lr.js +1 -0
  593. package/.next/static/chunks/3jvftad10pwwg.js +9 -0
  594. package/.next/static/chunks/3lsj4waqfw7eq.js +1 -0
  595. package/.next/static/chunks/3wr-25ch-9chk.js +1 -0
  596. package/.next/static/chunks/4441xuc3i-yb7.js +1 -0
  597. package/package.json +1 -1
  598. package/prisma/migrations/20261102102339_add_custom_answer_space/migration.sql +5 -0
  599. package/prisma/migrations/20261103011313_add_import_tasks/migration.sql +37 -0
  600. package/prisma/migrations/20261103052754_add_import_batches/migration.sql +79 -0
  601. package/prisma/schema.prisma +77 -0
  602. package/prisma/seed.db +0 -0
  603. package/public/third-party-licenses/heic-to/GPL-3.0.txt +674 -0
  604. package/public/third-party-licenses/heic-to/NOTICE.txt +76 -0
  605. package/public/third-party-licenses/heic-to/emscripten-LICENSE.txt +102 -0
  606. package/public/third-party-licenses/heic-to/heic-to-LICENSE.txt +177 -0
  607. package/public/third-party-licenses/heic-to/libde265-1.0.16-COPYING.txt +871 -0
  608. package/public/third-party-licenses/heic-to/libheif-1.23.6-COPYING.txt +871 -0
  609. package/.next/server/chunks/[root-of-the-server]__01nvw5ogtwc0h._.js +0 -3
  610. package/.next/server/chunks/[root-of-the-server]__02dkbynj2vxld._.js +0 -3
  611. package/.next/server/chunks/[root-of-the-server]__05n74a-t4yfhk._.js +0 -3
  612. package/.next/server/chunks/[root-of-the-server]__05u_glm0nzz-u._.js +0 -3
  613. package/.next/server/chunks/[root-of-the-server]__0c2729fcpi3-x._.js +0 -3
  614. package/.next/server/chunks/[root-of-the-server]__0gaai286hkspk._.js +0 -3
  615. package/.next/server/chunks/[root-of-the-server]__0jy-eooky8kei._.js +0 -3
  616. package/.next/server/chunks/[root-of-the-server]__0kljn4jodzvqk._.js +0 -3
  617. package/.next/server/chunks/[root-of-the-server]__0pn5idap1logb._.js +0 -3
  618. package/.next/server/chunks/[root-of-the-server]__0tflqqgyujt1r._.js +0 -3
  619. package/.next/server/chunks/[root-of-the-server]__0z99q93n88cro._.js +0 -3
  620. package/.next/server/chunks/[root-of-the-server]__1-g1cu85bv1bg._.js +0 -3
  621. package/.next/server/chunks/[root-of-the-server]__1-hfmp3groi95._.js +0 -56
  622. package/.next/server/chunks/[root-of-the-server]__10l89psqaisak._.js +0 -3
  623. package/.next/server/chunks/[root-of-the-server]__1236d6g1_51pt._.js +0 -3
  624. package/.next/server/chunks/[root-of-the-server]__12_laap0hyw4p._.js +0 -3
  625. package/.next/server/chunks/[root-of-the-server]__13pd8ofsmrv7k._.js +0 -3
  626. package/.next/server/chunks/[root-of-the-server]__13zeb46abilr5._.js +0 -3
  627. package/.next/server/chunks/[root-of-the-server]__142g4s902bza-._.js +0 -3
  628. package/.next/server/chunks/[root-of-the-server]__1460_07yt08m0._.js +0 -3
  629. package/.next/server/chunks/[root-of-the-server]__15mf1z85mft8d._.js +0 -3
  630. package/.next/server/chunks/[root-of-the-server]__15ypu4q7xi8ig._.js +0 -3
  631. package/.next/server/chunks/[root-of-the-server]__1610s5zvyss1k._.js +0 -3
  632. package/.next/server/chunks/[root-of-the-server]__16864lw9bhmwl._.js +0 -3
  633. package/.next/server/chunks/[root-of-the-server]__19a62id_4lwka._.js +0 -3
  634. package/.next/server/chunks/[root-of-the-server]__1b42xh9458czy._.js +0 -3
  635. package/.next/server/chunks/[root-of-the-server]__1dreyiratyfvo._.js +0 -3
  636. package/.next/server/chunks/[root-of-the-server]__1elqmd_7a9bto._.js +0 -3
  637. package/.next/server/chunks/[root-of-the-server]__1gvnk0s0_zrpo._.js +0 -3
  638. package/.next/server/chunks/[root-of-the-server]__1hwftfenrsu3p._.js +0 -3
  639. package/.next/server/chunks/[root-of-the-server]__1lafe11jnkmlv._.js +0 -3
  640. package/.next/server/chunks/[root-of-the-server]__1m1wi2f60x1fk._.js +0 -3
  641. package/.next/server/chunks/[root-of-the-server]__1o-0-f8rlbavp._.js +0 -3
  642. package/.next/server/chunks/[root-of-the-server]__1r7wz_id6mvlj._.js +0 -3
  643. package/.next/server/chunks/[root-of-the-server]__1r_x7moz0opqt._.js +0 -3
  644. package/.next/server/chunks/[root-of-the-server]__1rx3b8m_g_p57._.js +0 -3
  645. package/.next/server/chunks/[root-of-the-server]__1wh65tfd7apxx._.js +0 -3
  646. package/.next/server/chunks/[root-of-the-server]__1wsyku681k2uq._.js +0 -3
  647. package/.next/server/chunks/[root-of-the-server]__1ximu6k5bljjj._.js +0 -3
  648. package/.next/server/chunks/[root-of-the-server]__1yrozlry-psmk._.js +0 -3
  649. package/.next/server/chunks/[root-of-the-server]__20jkc-_5uj_zc._.js +0 -3
  650. package/.next/server/chunks/_03udbqs8_z944._.js +0 -3
  651. package/.next/server/chunks/_1_ns7o3cqznv6._.js +0 -3
  652. package/.next/server/chunks/_1rr_juv5pj1at._.js +0 -3
  653. package/.next/server/chunks/_1upqhtax8p96-._.js +0 -3
  654. package/.next/server/chunks/src_lib_0ximwux0rcb__._.js +0 -3
  655. package/.next/server/chunks/src_lib_1wm8ay-jqxakc._.js +0 -3
  656. package/.next/server/chunks/ssr/[root-of-the-server]__0mf_ugip8jvfl._.js +0 -3
  657. package/.next/server/chunks/ssr/[root-of-the-server]__1jhmaiw3yp6gx._.js +0 -3
  658. package/.next/server/chunks/ssr/[root-of-the-server]__1x6b2a-bbo2py._.js +0 -3
  659. package/.next/server/chunks/ssr/_02zfjls23g-o4._.js +0 -3
  660. package/.next/server/chunks/ssr/_0j4vduk13imjn._.js +0 -3
  661. package/.next/server/chunks/ssr/_0ltqx22v65imo._.js +0 -32
  662. package/.next/server/chunks/ssr/_0tr-7klbcz1r7._.js +0 -3
  663. package/.next/server/chunks/ssr/_0yrywyu_og4rx._.js +0 -3
  664. package/.next/server/chunks/ssr/_1-i5cy964i_s9._.js +0 -3
  665. package/.next/server/chunks/ssr/_1-z85ugzufqk6._.js +0 -3
  666. package/.next/server/chunks/ssr/_10stgw6io7x93._.js +0 -3
  667. package/.next/server/chunks/ssr/_11xqn1cgzpe6k._.js +0 -3
  668. package/.next/server/chunks/ssr/_1cc3psc9rvrwn._.js +0 -3
  669. package/.next/server/chunks/ssr/_1hp7fzio98dms._.js +0 -3
  670. package/.next/server/chunks/ssr/node_modules_0efju2pv0_0yw._.js +0 -3
  671. package/.next/static/chunks/01lfibj7hk--1.js +0 -1
  672. package/.next/static/chunks/06bfusm1eqhzt.js +0 -4
  673. package/.next/static/chunks/0fu1xttg42yzk.js +0 -1
  674. package/.next/static/chunks/0mp9tvylhyxid.js +0 -1
  675. package/.next/static/chunks/0xuzdy0dn7jkp.js +0 -63
  676. package/.next/static/chunks/1fa2xv93zl8oj.js +0 -1
  677. package/.next/static/chunks/1ou17klnb8gu_.js +0 -1
  678. package/.next/static/chunks/21v7--q2m3c4_.js +0 -1
  679. package/.next/static/chunks/22gdddnfj38h6.js +0 -1
  680. package/.next/static/chunks/2btkflolmab19.css +0 -3
  681. package/.next/static/chunks/2dml0yrklxocr.js +0 -31
  682. package/.next/static/chunks/2hjp9cnvepyzy.js +0 -247
  683. package/.next/static/chunks/2mu8zu6zd59z2.js +0 -1
  684. package/.next/static/chunks/2xibor-sxcc67.js +0 -1
  685. package/.next/static/chunks/3_e_larybjcr5.js +0 -1
  686. package/.next/static/chunks/3au-yz7ullfnr.js +0 -9
  687. package/.next/static/chunks/3zs0fu6zcu0lb.js +0 -1
  688. /package/.next/static/{-4YWb-OtqvHBsA28MaEog → vcaSyuwRLyplMa8bkQEcE}/_buildManifest.js +0 -0
  689. /package/.next/static/{-4YWb-OtqvHBsA28MaEog → vcaSyuwRLyplMa8bkQEcE}/_clientMiddlewareManifest.js +0 -0
  690. /package/.next/static/{-4YWb-OtqvHBsA28MaEog → vcaSyuwRLyplMa8bkQEcE}/_ssgManifest.js +0 -0
@@ -0,0 +1,12 @@
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let r={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],314381);var n=e.i(843476),i=e.i(271645),s=e.i(632781);let o={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};o.node;let l=(0,t.f)(o),d={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};d.node;let c=(0,t.f)(d);var h=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),x=e.i(201276),w=e.i(113381);let y=null;function v(e,t,r){let a=e?.firstElementChild;a&&(a.style.width="100%",a.style.height=`${r}px`,t?.setSize(e?.offsetWidth||a.offsetWidth||800,r))}function b(e,t){let r=(0,w.L)(e,t);for(let e of r)x.V.warn("[GGB]","命令执行失败",{...e});return r.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:r=!1,showAlgebraInput:a=!1,showMenuBar:o=!1,className:d="",onRegenerate:j,onDelete:k}){let{t:N}=(0,p.b)(),C=(0,i.useRef)(null),S=(0,i.useRef)(null),E=(0,i.useRef)(void 0),I=(0,i.useId)(),A=(0,i.useRef)(`ggb-${I.replace(/[^a-zA-Z0-9_-]/g,"")}`),[D,M]=(0,i.useState)(!0),[R,T]=(0,i.useState)(null),[_,L]=(0,i.useState)(!0),[$,P]=(0,i.useState)(!1),[O,U]=(0,i.useState)(!1),z=(0,i.useMemo)(()=>(0,w.i)(e),[e]);(0,i.useEffect)(()=>{if(0===z.length)return;let e=!1,n=A.current,i=C.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let r=document.createElement("script");r.src="https://www.geogebra.org/apps/deployggb.js",r.async=!0,r.onload=()=>e(),r.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(r)}))).then(()=>{if(e)return;let s=window.GGBApplet;if(!s){T(N.geogebra.notLoaded),M(!1);return}if(i){i.innerHTML=`<div id="${n}" style="width:100%;height:${t}px"></div>`;try{new s({appName:"classic",width:"100%",height:t,showToolBar:r,showAlgebraInput:a,showMenuBar:o,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:r=>{e||(S.current=r,v(i,r,t),E.current=b(r,z),M(!1))}},!0).inject(n)}catch(t){x.V.error("[GGB]","Init failed",{error:t}),e||(T(N.geogebra.initFailed),M(!1))}}}).catch(t=>{x.V.error("[GGB]","Script load failed",{error:t}),e||(T(N.geogebra.scriptFailed),M(!1))}),()=>{e=!0;try{let e=S.current;e?.remove&&e.remove()}catch(e){x.V.warn("[GGB]","Cleanup failed",{error:e})}S.current=null,i&&(i.innerHTML="")}},[z,r,a,o]),(0,i.useEffect)(()=>{v(C.current,S.current,_?700:t)},[_,t]);let H=(0,i.useCallback)(()=>{let e=S.current;if(e)try{e.resetConstruction(),setTimeout(()=>{S.current&&(E.current=b(S.current,z))},300)}catch(e){x.V.warn("[GGB]","Reset failed",{error:e})}},[z]),F=(0,i.useCallback)(async()=>{if(j&&!$){P(!0);try{await j(E.current)}finally{P(!1)}}},[j,$]),V=(0,i.useCallback)(async()=>{if(k&&!O&&await (0,f.u)(N.geogebra.confirmDelete,{destructive:!0})){U(!0);try{await k()}catch{f.c.error(N.geogebra.deleteFailed)}finally{U(!1)}}},[k,O,N]);return 0===z.length?null:(0,n.jsxs)("div",{className:`relative rounded-lg border bg-card ${d}`,children:[(0,n.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:N.geogebra.title}),D&&(0,n.jsx)(s.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[j&&(0,n.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:F,title:N.geogebra.regenerate,disabled:$||D,children:[$?(0,n.jsx)(s.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:N.geogebra.regenerate})]}),k&&(0,n.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:V,title:N.geogebra.delete,disabled:O||$,children:[O?(0,n.jsx)(s.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,n.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,n.jsx)("span",{children:N.geogebra.delete})]}),(0,n.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:H,title:N.geogebra.reset,disabled:D,children:(0,n.jsx)(h.f,{className:"h-3.5 w-3.5"})}),(0,n.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>L(e=>!e),title:_?N.geogebra.shrink:N.geogebra.enlarge,children:_?(0,n.jsx)(c,{className:"h-3.5 w-3.5"}):(0,n.jsx)(l,{className:"h-3.5 w-3.5"})})]})]}),(0,n.jsx)("div",{ref:C,style:{width:"100%"}}),D&&(0,n.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,n.jsx)(s.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,n.jsx)("span",{className:"text-sm text-muted-foreground",children:N.geogebra.loading})]})}),R&&(0,n.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:R})]})}],3198)},399847,e=>{var t=e.i(456420);let r={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],399847)},13285,e=>{var t=e.i(456420);let r={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],13285)},615568,168148,e=>{var t=e.i(456420);let r={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],615568);var n=e.i(843476),i=e.i(271645),s=e.i(30030),o=e.i(248425),l=Object.defineProperty,d=(e,t)=>l(e,"name",{value:t,configurable:!0}),c="Progress",[h,u]=(0,s.f)(c),[m,g]=h(c),p=i.forwardRef(d(function(e,t){let{__scopeProgress:r,value:a=null,max:i,getValueLabel:s=x,...l}=e;(i||0===i)&&!v(i)&&console.error(j(`${i}`,"Progress"));let d=v(i)?i:100;null===a||b(a,d)||console.error(k(`${a}`,"Progress"));let c=b(a,d)?a:null,h=y(c)?s(c,d):void 0;return(0,n.jsx)(m,{scope:r,value:c,max:d,children:(0,n.jsx)(o.V.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":y(c)?c:void 0,"aria-valuetext":h,role:"progressbar","data-state":w(c,d),"data-value":c??void 0,"data-max":d,...l,ref:t})})},"Progress")),f=i.forwardRef(d(function(e,t){let{__scopeProgress:r,...a}=e,i=g("ProgressIndicator",r);return(0,n.jsx)(o.V.div,{"data-state":w(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...a,ref:t})},"ProgressIndicator"));function x(e,t){return`${Math.round(e/t*100)}%`}function w(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function y(e){return"number"==typeof e}function v(e){return y(e)&&!isNaN(e)&&e>0}function b(e,t){return y(e)&&!isNaN(e)&&e<=t&&e>=0}function j(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function k(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
+ - a positive number
3
+ - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
4
+ - \`null\` or \`undefined\` if the progress is indeterminate.
5
+
6
+ Defaulting to \`null\`.`}d(x,"defaultGetValueLabel"),d(w,"getProgressState"),d(y,"isNumber"),d(v,"isValidMaxNumber"),d(b,"isValidValueNumber"),d(j,"getInvalidMaxError"),d(k,"getInvalidValueError");var N=e.i(975157);let C=i.forwardRef(({className:e,value:t,...r},a)=>(0,n.jsx)(p,{ref:a,value:t,className:(0,N.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,n.jsx)(f,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));C.displayName=p.displayName,e.s(["f",0,C],168148)},856522,e=>{var t=e.i(456420);let r={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};r.node;let a=(0,t.f)(r);e.s(["f",0,a],856522)},232660,213761,e=>{var t=e.i(271645),r={x:0,y:0,width:0,height:0,unit:"px"},a=(e,t,r)=>Math.min(Math.max(e,t),r),n=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function i(e,t,a){return"%"===e.unit?{...r,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/a*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/a*100:0}}function s(e,t,a){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*a/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*a/100:0}:{...r,...e,unit:"px"}}function o(e,t,r,a,n,i=0,s=0,l=a,d=n){let c={...e},h=Math.min(i,a),u=Math.min(s,n),m=Math.min(l,a),g=Math.min(d,n);t&&(t>1?(u=(h=s?s*t:h)/t,m=l*t):(h=(u=i?i/t:u)*t,g=d/t)),c.y<0&&(c.height=Math.max(c.height+c.y,u),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,h),c.x=0);let p=a-(c.x+c.width);p<0&&(c.x=Math.min(c.x,a-h),c.width+=p);let f=n-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,n-u),c.height+=f),c.width<h&&(("sw"===r||"nw"==r)&&(c.x-=h-c.width),c.width=h),c.height<u&&(("nw"===r||"ne"==r)&&(c.y-=u-c.height),c.height=u),c.width>m&&(("sw"===r||"nw"==r)&&(c.x-=m-c.width),c.width=m),c.height>g&&(("nw"===r||"ne"==r)&&(c.y-=g-c.height),c.height=g),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,u);("nw"===r||"ne"==r)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,h);("sw"===r||"nw"==r)&&(c.x-=e-c.width),c.width=e}}return c}var l={capture:!0,passive:!1},d=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${d++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:r,width:a,height:n}=e.getBoundingClientRect();return{x:t,y:r,width:a,height:n}}componentDidUpdate(e){let{crop:t,onComplete:r}=this.props;if(r&&!e.crop&&t){let{width:e,height:a}=this.getBox();e&&a&&r(s(t,e,a),i(t,e,a))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:r}=this.props,a=this.getBox();if(!t)return;let n=s(t,a.width,a.height);if(r)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let i=e.target.dataset.ord,o=e.clientX,l=e.clientY,d=n.x,c=n.y;if(i){let t=e.clientX-a.x,r=e.clientY-a.y,s=0,h=0;"ne"===i||"e"==i?(s=t-(n.x+n.width),h=r-n.y,d=n.x,c=n.y+n.height):"se"===i||"s"===i?(s=t-(n.x+n.width),h=r-(n.y+n.height),d=n.x,c=n.y):"sw"===i||"w"==i?(s=t-n.x,h=r-(n.y+n.height),d=n.x+n.width,c=n.y):("nw"===i||"n"==i)&&(s=t-n.x,h=r-n.y,d=n.x+n.width,c=n.y+n.height),o=d+a.x+s,l=c+a.y+h}this.evData={startClientX:o,startClientY:l,startCropX:d,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!i,ord:i},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:r,locked:a,keepSelection:n,onChange:o}=this.props,l=this.getBox();if(r||a||n&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let d=e.clientX-l.x,c=e.clientY-l.y,h={unit:"px",x:d,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:d,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(s(h,l.width,l.height),i(h,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:r,disabled:a,onChange:o,onDragStart:l}=this.props,d=this.getBox();if(a||!r||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,n(r,t=c.isResize?this.resizeCrop():this.dragCrop())||o(s(t,d.width,d.height),i(t,d.width,d.height))};onComponentKeyDown=t=>{let{crop:r,disabled:n,onChange:o,onComplete:l}=this.props;if(n)return;let d=t.key,c=!1;if(!r)return;let h=this.getBox(),u=this.makePixelCrop(h),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===d?(u.x-=m,c=!0):"ArrowRight"===d?(u.x+=m,c=!0):"ArrowUp"===d?(u.y-=m,c=!0):"ArrowDown"===d&&(u.y+=m,c=!0),c){t.cancelable&&t.preventDefault(),u.x=a(u.x,0,h.width-u.width),u.y=a(u.y,0,h.height-u.height);let e=s(u,h.width,h.height),r=i(u,h.width,h.height);o(e,r),l&&l(e,r)}};onHandlerKeyDown=(t,r)=>{var a,l;let d,{aspect:c=0,crop:h,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:x,onComplete:w}=this.props,y=this.getBox();if(u||!h||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let v=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,b=o((a=s(h,y.width,y.height),l=t.key,d={...a},"ArrowLeft"===l?"nw"===r?(d.x-=v,d.y-=v,d.width+=v,d.height+=v):"w"===r?(d.x-=v,d.width+=v):"sw"===r?(d.x-=v,d.width+=v,d.height+=v):"ne"===r?(d.y+=v,d.width-=v,d.height-=v):"e"===r?d.width-=v:"se"===r&&(d.width-=v,d.height-=v):"ArrowRight"===l&&("nw"===r?(d.x+=v,d.y+=v,d.width-=v,d.height-=v):"w"===r?(d.x+=v,d.width-=v):"sw"===r?(d.x+=v,d.width-=v,d.height-=v):"ne"===r?(d.y-=v,d.width+=v,d.height+=v):"e"===r?d.width+=v:"se"===r&&(d.width+=v,d.height+=v)),"ArrowUp"===l?"nw"===r?(d.x-=v,d.y-=v,d.width+=v,d.height+=v):"n"===r?(d.y-=v,d.height+=v):"ne"===r?(d.y-=v,d.width+=v,d.height+=v):"sw"===r?(d.x+=v,d.width-=v,d.height-=v):"s"===r?d.height-=v:"se"===r&&(d.width-=v,d.height-=v):"ArrowDown"===l&&("nw"===r?(d.x+=v,d.y+=v,d.width-=v,d.height-=v):"n"===r?(d.y+=v,d.height-=v):"ne"===r?(d.y+=v,d.width-=v,d.height-=v):"sw"===r?(d.x-=v,d.width+=v,d.height+=v):"s"===r?d.height+=v:"se"===r&&(d.width+=v,d.height+=v)),d),c,r,y.width,y.height,m,g,p,f);if(!n(h,b)){let e=i(b,y.width,y.height);x(b,e),w&&w(b,e)}};onDocPointerDone=e=>{let{crop:t,disabled:r,onComplete:a,onDragEnd:n}=this.props,o=this.getBox();this.unbindDocMove(),!(r||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,n&&n(e),a&&a(s(t,o.width,o.height),i(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),r=this.makePixelCrop(t),n=e.clientX-e.startClientX,i=e.clientY-e.startClientY;return r.x=a(e.startCropX+n,0,t.width-r.width),r.y=a(e.startCropY+i,0,t.height-r.height),r}getPointRegion(e,t,r,a){let{evData:n}=this,i=n.clientX-e.x,s=n.clientY-e.y,o;return o=a&&t?"nw"===t||"n"===t||"ne"===t:s<n.startCropY,(r&&t?"nw"===t||"w"===t||"sw"===t:i<n.startCropX)?o?"nw":"sw":o?"ne":"se"}resolveMinDimensions(e,t,r=0,a=0){let n=Math.min(r,e.width),i=Math.min(a,e.height);return t&&(n||i)?t>1?n?[n,n/t]:[i*t,i]:i?[i*t,i]:[n,n/t]:[n,i]}resizeCrop(){let{evData:t}=this,{aspect:r=0,maxWidth:n,maxHeight:i}=this.props,s=this.getBox(),[l,d]=this.resolveMinDimensions(s,r,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(s),h=this.getPointRegion(s,t.ord,l,d),u=t.ord||h,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-l)),(d&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-d));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===h?(p.x=t.startCropX,p.width=m,r?p.height=p.width/r:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===h?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,r?p.height=p.width/r:p.height=g):"sw"===h?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),r?p.height=p.width/r:p.height=g):"nw"===h&&(p.x=t.startCropX+m,p.width=Math.abs(m),r?(p.height=p.width/r,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=o(p,r,h,s.width,s.height,l,d,n,i);return r||e.xyOrds.indexOf(u)>-1?c=f:e.xOrds.indexOf(u)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(u)>-1&&(c.y=f.y,c.height=f.height),c.x=a(c.x,0,s.width-c.width),c.y=a(c.y,0,s.height-c.height),c}renderCropSelection(){let{ariaLabels:r=e.defaultProps.ariaLabels,disabled:a,locked:n,renderSelectionAddon:i,ruleOfThirds:s,crop:o}=this.props,l=this.getCropStyle();if(o)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!a&&!n&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),i&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},i(this.state)),s&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return s({...r,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:r,circularCrop:a,className:n,crop:i,disabled:s,locked:o,style:l,ruleOfThirds:d}=this.props,{cropIsActive:c,newCropIsBeingDrawn:h}=this.state,u=i?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",n,c&&"ReactCrop--active",s&&"ReactCrop--disabled",o&&"ReactCrop--locked",h&&"ReactCrop--new-crop",i&&e&&"ReactCrop--fixed-aspect",i&&a&&"ReactCrop--circular-crop",i&&d&&"ReactCrop--rule-of-thirds",!this.dragStarted&&i&&!i.width&&!i.height&&"ReactCrop--invisible-crop",a&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},r),i?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),a?t.default.createElement("ellipse",{cx:`${i.x+i.width/2}${i.unit}`,cy:`${i.y+i.height/2}${i.unit}`,rx:`${i.width/2}${i.unit}`,ry:`${i.height/2}${i.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${i.x}${i.unit}`,y:`${i.y}${i.unit}`,width:`${i.width}${i.unit}`,height:`${i.height}${i.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,c],232660);let h={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,r){super(e,void 0===r?void 0:{cause:r}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let m=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),g=new Set(["mif1","msf1","mif2"]),p=new Set(["avif","avis"]);function f(e,t,r=h){let a=Math.min(1,r.maxLongEdge/Math.max(e,t),Math.sqrt(r.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a)),scale:a}}async function x(e){let t,r;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let a=await (t=URL.createObjectURL(e),(r=new Image).decoding="async",new Promise((e,a)=>{r.onload=()=>e(r),r.onerror=()=>a(Error("IMAGE_ELEMENT_DECODE_FAILED")),r.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!a.naturalWidth||!a.naturalHeight)throw Error("IMAGE_EMPTY");return a}async function w(t){let{heicTo:r}=await e.A(462684);return r({blob:t,type:"image/jpeg",quality:.95})}function y(e,t){return new Promise((r,a)=>{e.toBlob(e=>e?r(e):a(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function v(e,t,r,a,n,i,s){let o,l=((o=document.createElement("canvas")).width=i,o.height=s,o),d=l.getContext("2d");if(!d)throw Error("CANVAS_UNSUPPORTED");return d.fillStyle="#ffffff",d.fillRect(0,0,i,s),d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(e,t,r,a,n,0,0,i,s),l}async function b(e,t){var r;let a,n=performance.now(),i=await e.arrayBuffer(),s=performance.now()-n,o=function(e){let t=(t,r)=>String.fromCharCode(...e.subarray(t,r));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let r=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),a=[t(8,12)];for(let e=16;e+4<=r;e+=4)a.push(t(e,e+4));if(a.some(e=>m.has(e)))return"heic";if(a.some(e=>p.has(e)))return"avif";if(a.some(e=>g.has(e)))return"heic"}return"unknown"}(new Uint8Array(i,0,Math.min(i.byteLength,64))),l=e.type||"",d=performance.now(),c="native",h=new Blob([i],{type:l||"application/octet-stream"});try{a=await x(h)}catch(e){if("heic"!==o)throw new u("unknown"===o?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",o,e);t?.();try{a=await x(await w(h)),c="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",o,e)}}let{width:b,height:j}=(r=a)instanceof HTMLImageElement?{width:r.naturalWidth,height:r.naturalHeight}:{width:r.width,height:r.height};if(!b||!j)throw new u("IMAGE_DECODE_FAILED",o);let k=f(b,j,{maxLongEdge:1600,maxPixels:1/0}),N=await y(v(a,0,0,b,j,k.width,k.height),.85),C=URL.createObjectURL(N),S=performance.now()-d;return{source:a,width:b,height:j,format:o,decoder:c,previewUrl:C,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(s),convert:Math.round(S)},dispose:()=>{URL.revokeObjectURL(C),a instanceof HTMLImageElement||a.close()}}}let j={x:0,y:0,width:1,height:1};async function k(e,t=j,r=h){var a;let n=performance.now(),i=e=>Math.min(1,Math.max(0,e)),s=Math.round(i(t.x)*e.width),o=Math.round(i(t.y)*e.height),l=Math.max(1,Math.min(e.width-s,Math.round(i(t.width)*e.width))),d=Math.max(1,Math.min(e.height-o,Math.round(i(t.height)*e.height))),c=f(l,d,r),u=v(e.source,s,o,l,d,c.width,c.height),m=performance.now()-n,g=performance.now(),p=r.startQuality,x=await y(u,p);for(let t=0;x.size>r.maxBytes&&t<12;t++)p-.05>=r.minQuality-1e-9?p=Math.round((p-.05)*100)/100:(c={width:Math.max(1,Math.floor(.85*c.width)),height:Math.max(1,Math.floor(.85*c.height)),scale:.85*c.scale},u=v(e.source,s,o,l,d,c.width,c.height)),x=await y(u,p);return{dataUrl:await (a=x,new Promise((e,t)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>t(r.error??Error("READ_FAILED")),r.readAsDataURL(a)})),width:c.width,height:c.height,bytes:x.size,quality:p,timings:{crop:Math.round(m),compress:Math.round(performance.now()-g)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,b,"X",0,k],213761)},866531,497346,752012,e=>{var t=e.i(843476),r=e.i(271645),a=e.i(632781),n=e.i(741120),i=e.i(856522),s=e.i(314381),o=e.i(3198),l=e.i(519455),d=e.i(111110),c=e.i(41931),h=e.i(294114),u=e.i(201276);function m({data:e,onChange:n}){let{t:i}=(0,d.b)(),[g,p]=(0,r.useState)(!1),[f,x]=(0,r.useState)(null),w=async()=>{if(!e.questionText.trim())return void h.c.warning(i.editor.enterQuestionFirst||"Please enter question text first");if(!e.answerText.trim())return void h.c.warning(i.geogebra.answerRequired);p(!0),x(null);try{let t=await c.k.post("/api/geogebra-analyze",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis},{timeout:18e4,recoverable:!0});t.suitable&&t.commands&&t.commands.length>0?n({geogebraCommands:JSON.stringify(t.commands)}):x(t.description||i.geogebra.notSuitable)}catch(e){u.V.error("[CorrectionEditor]","GeoGebra analysis failed",{error:e}),x(i.geogebra.analyzeFailed)}finally{p(!1)}};return e.geogebraCommands?(0,t.jsx)(o.f,{commands:e.geogebraCommands,height:350,onRegenerate:w,onDelete:async()=>n({geogebraCommands:void 0})}):e.questionText.trim()&&e.answerText.trim()?(0,t.jsxs)("div",{className:"rounded-lg border border-dashed p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:i.geogebra.title})]}),(0,t.jsx)(l.f,{variant:"outline",size:"sm",onClick:w,disabled:g,children:g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.f,{className:"mr-2 h-4 w-4 animate-spin"}),i.geogebra.analyzing]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.f,{className:"mr-2 h-4 w-4"}),i.geogebra.generate]})})]}),f&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:f}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:i.geogebra.hint})]}):null}var g=e.i(469937),p=e.i(28342),f=e.i(438465),x=e.i(674166),w=e.i(110204);function y({data:e,paperLevel:r,onChange:a}){let{t:n}=(0,d.b)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.editor.selectNotebook||"Select Notebook"}),(0,t.jsx)(f.f,{value:e.subjectId,onChange:e=>a({subjectId:e})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{htmlFor:"correction-grade-semester",children:n.editor.gradeSemester||"Grade/Semester"}),(0,t.jsx)(p.f,{id:"correction-grade-semester",value:e.gradeSemester||"",onChange:e=>a({gradeSemester:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.editor.paperLevel||"Paper Level"}),(0,t.jsx)(x.f,{value:r,onChange:e=>a({paperLevel:e})})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.difficulty.label}),(0,t.jsx)("div",{children:(0,t.jsx)(g.f,{size:"md",value:e.difficultyStars,onChange:e=>a({difficultyStars:e})})})]})]})}var v=e.i(141176),b=e.i(515288),j=e.i(967489);function k({data:e,onChange:r}){let{t:a}=(0,d.b)();return(0,t.jsxs)(b.N,{children:[(0,t.jsx)(b.Y,{children:(0,t.jsx)(b.v,{children:a.editor.mistakeAnalysisTitle||"Mistake Analysis"})}),(0,t.jsxs)(b.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:a.editor.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(j.d,{value:e.mistakeStatus||"unknown",onValueChange:e=>r({mistakeStatus:e}),children:[(0,t.jsx)(j.P,{children:(0,t.jsx)(j.U,{})}),(0,t.jsxs)(j.r,{children:[(0,t.jsx)(j.T,{value:"not_attempted",children:a.editor.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(j.T,{value:"wrong_attempt",children:a.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(j.T,{value:"unknown",children:a.editor.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:a.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(v.f,{value:e.wrongAnswerText||"",onChange:t=>r({wrongAnswerText:t,mistakeStatus:t.trim()?"wrong_attempt":e.mistakeStatus}),className:"min-h-[100px] font-mono text-sm",placeholder:a.editor.wrongAnswerPlaceholder||"Leave blank if no wrong answer is visible"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:a.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(v.f,{value:e.mistakeAnalysis||"",onChange:e=>r({mistakeAnalysis:e}),className:"min-h-[140px] font-mono text-sm",placeholder:a.editor.mistakeAnalysisPlaceholder||"Explain where and why the mistake happened"})]})]})]})}var N=e.i(511445),C=e.i(149704);function S({title:e,children:r,className:a}){return(0,t.jsxs)(b.N,{children:[(0,t.jsx)(b.Y,{children:(0,t.jsx)(b.v,{children:e})}),(0,t.jsx)(b.O,{className:a,children:r})]})}function E({data:e,children:r}){let{t:a}=(0,d.b)(),n={wrong_attempt:a.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt",not_attempted:a.editor.mistakeStatuses?.notAttempted||"Not attempted",unknown:a.editor.mistakeStatuses?.unknown||"Unknown"};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(S,{title:a.editor.preview?.question||"Question Preview",children:[(0,t.jsx)(N.f,{content:e.questionText}),(0,t.jsx)(C.f,{svg:e.figureSvg})]}),r,(0,t.jsx)(S,{title:a.editor.preview?.answer||"Answer Preview",children:(0,t.jsx)(N.f,{content:e.answerText})}),(0,t.jsx)(S,{title:a.editor.preview?.analysis||"Analysis Preview",children:(0,t.jsx)(N.f,{content:e.analysis})}),(0,t.jsxs)(S,{title:a.editor.preview?.mistakeAnalysis||"Mistake Analysis Preview",className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{className:"text-muted-foreground",children:[a.editor.mistakeStatus||"Attempt Status",a.common.colon,n[e.mistakeStatus]??n.unknown]}),e.wrongAnswerText&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:a.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(N.f,{content:e.wrongAnswerText})]}),e.mistakeAnalysis&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:a.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(N.f,{content:e.mistakeAnalysis})]})]})]})}var I=e.i(574041),A=e.i(215519),D=e.i(306831);e.i(676167);var M=e.i(952122),R=e.i(62825),T=e.i(664030),_=e.i(303163);e.s(["f",0,function({initialData:e,onSave:s,onCancel:o,imagePreview:g,initialSubjectId:p,aiTimeout:f}){let{timeZone:x}=(0,A.M)(),{t:j,language:N}=(0,d.b)(),[C,S]=(0,r.useState)({...e,wrongAnswerText:e.wrongAnswerText||"",mistakeAnalysis:e.mistakeAnalysis||"",mistakeStatus:e.mistakeStatus||"unknown",subjectId:p,gradeSemester:e.gradeSemester||""}),L=(0,r.useRef)(!1),$=e=>{"gradeSemester"in e&&(L.current=!0),S(t=>({...t,...e}))},{groups:P}=(0,T.f)(),O=(()=>{if(C.paperLevel)return C.paperLevel;let e="number"==typeof C.difficultyStars&&C.difficultyStars>=4?"b":"a";return P.find(t=>t.key===e&&t.isActive)?.id||""})(),U=C.paperLevel??O,[z,H]=(0,r.useState)(!1),[F,V]=(0,r.useState)(!1),[B,Y]=(0,r.useState)(!1),[G,X]=(0,r.useState)(void 0),[q,K]=(0,r.useState)([]);(0,r.useEffect)(()=>{c.k.get("/api/notebooks").then(K).catch(e=>u.V.error("[CorrectionEditor]","Failed to fetch notebooks",{error:e})),c.k.get("/api/user").then(e=>{if(Y(!!e?.enableGeogebra),e){let t=function(e,t=D.J){return"ai"===e.gradeRecognitionMode?null:e.fixedGradeSemester?e.fixedGradeSemester:e.educationStage&&e.enrollmentYear?function(e,t,r=new Date,a="en",n=D.J){let i=(0,D.c)(r,n),s=i.getFullYear(),o=i.getMonth()+1,l=s-t,d="2nd";o>=9?(l+=1,d="1st"):d=o<2?"1st":"2nd";let c="zh"===a,h=c?"1st"===d?"上期":"下期":"1st"===d?"1st Semester":"2nd Semester",u=(c?{primary:["一年级","二年级","三年级","四年级","五年级","六年级"],junior_high:["初一","初二","初三"],senior_high:["高一","高二","高三"],university:["大一","大二","大三","大四"]}:{primary:["Grade 1","Grade 2","Grade 3","Grade 4","Grade 5","Grade 6"],junior_high:["Junior High Grade 1","Junior High Grade 2","Junior High Grade 3"],senior_high:["Senior High Grade 1","Senior High Grade 2","Senior High Grade 3"],university:["Freshman","Sophomore","Junior","Senior"]})[e]||[],m=`${l}`;if(m=l>0&&l<=u.length?u[l-1]:l>u.length?c?"已毕业":"Graduated":c?"学前":"Pre-school",!c)return`${m}, ${h}`;{let e="1st"===d?"上":"下";return`${m}${e}`}}(e.educationStage,e.enrollmentYear,new Date,"zh",t):null}(e,x);S(e=>e.gradeSemester||L.current?e:{...e,gradeSemester:t||""}),X(e.educationStage||void 0)}}).catch(e=>u.V.error("[CorrectionEditor]","Failed to fetch user info for grade calculation",{error:e}))},[N,x]);let W=async()=>{if(!C.questionText.trim())return void h.c.warning(j.editor.enterQuestionFirst||"Please enter question text first");H(!0);try{let e=function({questionText:e,language:t,subject:r,imagePreview:a,gradeSemester:n,subjectId:i}){let s={questionText:e,language:t,subject:r};return a&&(s.imageBase64=a),n&&(s.gradeSemester=n),i&&(s.subjectId=i),s}({questionText:C.questionText,language:N,subject:C.subject,imagePreview:g,gradeSemester:C.gradeSemester??void 0,subjectId:C.subjectId});u.V.info("[Reanswer]",e.imageBase64?"Sending image + text (image available for mistake analysis)":"Sending text only (no image available)",{timeout:f});let t=await c.k.post("/api/reanswer",e,{timeout:f||18e4,recoverable:!0});S(e=>({...e,answerText:t.answerText,analysis:t.analysis,knowledgePoints:t.knowledgePoints,wrongAnswerText:t.wrongAnswerText||"",mistakeAnalysis:t.mistakeAnalysis||"",mistakeStatus:(0,R.x)(t.mistakeStatus,t.wrongAnswerText),difficultyStars:t.difficultyStars??e.difficultyStars})),h.c.success(j.editor.reanswerSuccess||"✅ Answer and analysis updated!")}catch(a){let e,t,r;u.V.error("[CorrectionEditor]","Reanswer failed",{error:a}),h.c.error((e=(0,_.d)(a)||"",r=(t=j.errors?.reanswer||{}).default||"Reanswer failed",e.includes("AI_AUTH_ERROR")?t.authError||j.errors?.AI_AUTH_ERROR||r:e.includes("AI_CONNECTION_FAILED")?t.connectionFailed||j.errors?.AI_CONNECTION_FAILED||r:e.includes("AI_RESPONSE_ERROR")&&(t.responseError||j.errors?.AI_RESPONSE_ERROR)||r))}finally{H(!1)}},Q=async()=>{if(!C.subjectId)return void h.c.warning(j.editor.messages?.selectNotebook||"Please select a notebook");if(!F){V(!0);try{await s({...C,paperLevel:U,mistakeStatus:(0,R.x)(C.mistakeStatus,C.wrongAnswerText)})}finally{V(!1)}}},Z=j.editor.placeholder||"Supports Markdown and LaTeX...",J=(0,M.f)(q.find(e=>e.id===C.subjectId)?.name||null)||(0,M.f)(C.subject||null)||void 0;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:j.editor.title}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.f,{variant:"outline",onClick:o,children:j.editor.cancel}),(0,t.jsxs)(l.f,{onClick:Q,disabled:F,children:[F?(0,t.jsx)(a.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(i.f,{className:"mr-2 h-4 w-4"}),F?j.common?.pleaseWait||"Please wait...":j.editor.save]})]})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[g&&(0,t.jsx)(b.N,{children:(0,t.jsx)(b.O,{className:"p-4",children:(0,t.jsx)("img",{src:g,alt:"Original",className:"w-full rounded-md"})})}),(0,t.jsx)(y,{data:C,paperLevel:U,onChange:$}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:j.editor.question}),(0,t.jsx)(v.f,{value:C.questionText,onChange:e=>$({questionText:e}),className:"min-h-[150px] font-mono text-sm",placeholder:Z}),(0,t.jsx)(l.f,{variant:"default",size:"sm",onClick:W,disabled:z||!C.questionText.trim(),className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",children:z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.f,{className:"mr-2 h-4 w-4 animate-spin"}),j.editor.reanswering||"AI solving..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4"}),j.editor.reanswer||"🔄 Reanswer (based on corrected question)"]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j.editor.reanswerHint||"💡 If the question was misrecognized, correct it and click to regenerate answer"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:j.editor.tags}),(0,t.jsx)(I.f,{value:C.knowledgePoints,onChange:e=>$({knowledgePoints:e}),placeholder:j.editor.tagsPlaceholder||"Enter knowledge tags...",enterHint:j.editor.createTagHint,subject:J,gradeStage:G}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:j.editor.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:j.editor.answer}),(0,t.jsx)(v.f,{value:C.answerText,onChange:e=>$({answerText:e}),className:"min-h-[100px] font-mono text-sm",placeholder:Z})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:j.editor.analysis}),(0,t.jsx)(v.f,{value:C.analysis,onChange:e=>$({analysis:e}),className:"min-h-[200px] font-mono text-sm",placeholder:Z})]}),(0,t.jsx)(k,{data:C,onChange:$})]}),(0,t.jsx)(E,{data:C,children:B&&(0,t.jsx)(m,{data:C,onChange:$})})]})]})}],866531);var L=e.i(853138),$=e.i(263676);e.s(["f",0,function({message:e,onDismiss:r}){let{t:a}=(0,d.b)();return e?(0,t.jsxs)("div",{role:"alert",className:"flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive",children:[(0,t.jsx)(L.f,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0"}),(0,t.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:e}),(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":a.common.close,className:"shrink-0 rounded p-1 hover:bg-destructive/10",children:(0,t.jsx)($.X,{"aria-hidden":"true",className:"h-4 w-4"})})]}):null}],497346);var P=e.i(618566);function O(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}function U(e,t){if("string"!=typeof e||!/^(QUESTION_SAVE_|AI_)[A-Z_]+$/.test(e))return;let r=t.errors[e];return"string"==typeof r?r:void 0}e.s(["f",0,function(e){let{t}=(0,d.b)(),a=(0,P.useRouter)(),[n,i]=(0,r.useState)(null),s=async(r,n,s=!0)=>{i(null);try{let e=await r();return h.c.success(e.duplicate?t.importFlow.duplicate:t.common.messages.saveSuccess),s&&(e.duplicate?a.push(`/error-items/${e.id}`):n&&a.push(`/notebooks/${n}`)),!0}catch(a){u.V.error(e,"Save failed",{errorMessage:(0,_.d)(a)??(0,_.Z)(a)});let r=function(e,t){let r=O(e),a=O(r?.data),n="number"==typeof r?.status?r.status:void 0,i=(0,_.d)(e),s=U(i,t)??U(a?.code,t),o={400:t.errors.QUESTION_SAVE_INVALID_INPUT,401:t.errors.QUESTION_SAVE_UNAUTHORIZED,403:t.errors.QUESTION_SAVE_FORBIDDEN,408:t.errors.QUESTION_SAVE_TIMEOUT,409:t.errors.QUESTION_SAVE_CONFLICT,413:t.errors.QUESTION_SAVE_TOO_LARGE,429:t.errors.QUESTION_SAVE_RATE_LIMITED,502:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,503:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,504:t.errors.QUESTION_SAVE_TIMEOUT},l=s??(n?o[n]:void 0)??t.errors.QUESTION_SAVE_FAILED;!n&&(e instanceof TypeError||/fetch|network|load failed/i.test((0,_.Z)(e)))&&(l=t.errors.QUESTION_SAVE_NETWORK_ERROR);let d=O(a?.details);if("QUESTION_SAVE_GRADE_FAILED"===i){let e=U(d?.reason,t);e&&(l+=`
7
+ ${e}`)}return 400===n&&(l+=(function(e,t){if(!Array.isArray(e))return[];let r={questionText:t.editor.question,answerText:t.editor.answer,analysis:t.editor.analysis,wrongAnswerText:t.editor.wrongAnswerText,mistakeAnalysis:t.editor.mistakeAnalysis,knowledgePoints:t.editor.tags,subjectId:t.editor.selectNotebook,gradeSemester:t.editor.gradeSemester,paperLevel:t.editor.paperLevel};return e.slice(0,3).flatMap(e=>{let a=O(e),n=a?.path,i=Array.isArray(n)&&"string"==typeof n[0]?r[n[0]]:void 0;if(!i)return[];let s=a?.maximum,o=t.questionSave.invalidField;return a?.code==="too_big"&&"number"==typeof s&&Number.isSafeInteger(s)&&s>=0&&(o="array"===a.origin?t.questionSave.tooMany:t.questionSave.tooLong),[o.replace("{field}",i).replace("{maximum}",String(s))]})})(a?.details,t).map(e=>`
8
+ ${e}`).join("")),"string"==typeof d?.databaseCode&&/^P\d{4}$/.test(d.databaseCode)&&(l+=`
9
+ ${t.questionSave.databaseCode.replace("{code}",d.databaseCode)}`),n&&(l+=` (HTTP ${n})`),l}(a,t);return i(r),"AI_DAILY_LIMIT_EXCEEDED"!==(0,_.d)(a)&&h.c.error(r),!1}};return{saveError:n,setSaveError:i,dismissSaveError:()=>i(null),run:s}}],752012)},469937,62825,e=>{var t=e.i(843476),r=e.i(456420);let a={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};a.node;let n=(0,r.f)(a);var i=e.i(111110),s=e.i(975157);let o=[1,2,3,4,5];function l(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["f",0,function({value:e,onChange:r,disabled:a,size:l="sm",showUnrated:d=!0,className:c}){let{t:h}=(0,i.b)(),u=e??0,m="sm"===l?"h-3.5 w-3.5":"h-5 w-5",g=u?h.difficulty.starsLabel.replace("{n}",String(u)):h.difficulty.unrated;return r?(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-0.5",c),role:"group","aria-label":`${h.difficulty.label}${h.common.colon}${g}`,title:h.difficulty.clearHint,children:[o.map(e=>(0,t.jsx)("button",{type:"button",disabled:a,onClick:()=>r(e===u?null:e),"aria-label":h.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(n,{className:(0,s.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&d&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:h.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,s.f)("inline-flex items-center",c),role:"img","aria-label":`${h.difficulty.label}${h.common.colon}${g}`,title:g,children:o.map(e=>(0,t.jsx)(n,{className:(0,s.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):d?(0,t.jsx)("span",{className:(0,s.f)("text-xs text-muted-foreground",c),children:h.difficulty.unrated}):null}],469937),e.s(["i",0,function(e,t="zh"){return("en"===t?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[l(e)]},"h",0,l,"x",0,function(e,t){return(t||"").trim()?"wrong_attempt":l(e)}],62825)},12130,e=>{var t=e.i(843476),r=e.i(271645),a=e.i(232660),n=e.i(519455),i=e.i(776639),s=e.i(263676),o=e.i(111110);async function l(e,t){let{naturalWidth:r,naturalHeight:a}=e;return Promise.all(t.map(t=>new Promise((n,i)=>{let s=document.createElement("canvas"),o=Math.round(t.x*r),l=Math.round(t.y*a);s.width=Math.max(1,Math.round(t.width*r)),s.height=Math.max(1,Math.round(t.height*a));let d=s.getContext("2d");d?(d.drawImage(e,o,l,s.width,s.height,0,0,s.width,s.height),s.toBlob(e=>e?n(e):i(Error("Canvas is empty")),"image/jpeg",.95)):i(Error("Canvas is not supported"))})))}let d={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},c=(0,r.forwardRef)(function({imageSrc:e,regions:a,onChange:n,imageStyle:i=d,onImageLoad:l},c){let{t:h}=(0,o.b)(),u=(0,r.useRef)(null),m=(0,r.useRef)(null),[g,p]=(0,r.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},x=()=>{g&&g.width>=.02&&g.height>=.02&&n([...a,g]),m.current=null,p(null)},w=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:c,src:e,alt:"",draggable:!1,style:i,onLoad:l,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,r,a,n;let i,s,o;if(!m.current)return;let l=f(e);p((t=m.current.x,r=m.current.y,a=l.x,n=l.y,s=(i=e=>Math.min(1,Math.max(0,e)))(Math.min(t,a)),o=i(Math.min(r,n)),{x:s,y:o,width:i(Math.max(t,a))-s,height:i(Math.max(r,n))-o}))},onPointerUp:x,onPointerCancel:x,children:[a.map((e,r)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:w(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:r+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":h.batchImport.removeRegion.replace("{index}",String(r+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>n(a.filter((e,t)=>t!==r)),children:(0,t.jsx)(s.X,{className:"h-3 w-3"})})]},r)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:w(g)})]})]})});var h=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,h.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,h.f)(g);function f({zoom:e,onZoomIn:r,onZoomOut:a,onReset:n}){let{t:i}=(0,o.b)(),s="outline-none focus-visible:ring-2 focus-visible:ring-white/70",l=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${s}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:l,onClick:a,disabled:e<=1,"aria-label":i.common.cropper.zoomOut,title:i.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${s}`,onClick:n,"aria-label":i.common.cropper.resetZoom,title:i.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:l,onClick:r,disabled:e>=5,"aria-label":i.common.cropper.zoomIn,title:i.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var x=e.i(201276);let w={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:s,onClose:d,onCropComplete:h,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p}){let{t:y}=(0,o.b)(),v=/^(blob:|data:image\/)/i.test(e)?e:void 0,[b,j]=(0,r.useState)(),k=(0,r.useRef)(null),[N,C]=(0,r.useState)("single"),{containerRef:S,zoom:E,imageStyle:I,measureImage:A,zoomIn:D,zoomOut:M,reset:R}=function(e){let[t,a]=(0,r.useState)(null),n=(0,r.useRef)(null),i=(0,r.useCallback)(e=>{n.current=e,a(e)},[]),[s,o]=(0,r.useState)(1),l=(0,r.useRef)(1),[d,c]=(0,r.useState)(null),h=(0,r.useRef)(null),u=(0,r.useRef)(!1),m=(0,r.useCallback)((e,t,r)=>{let a=n.current,i=l.current,s=Math.min(5,Math.max(1,e));if(!a||s===i)return;if(1===i){let e=a.querySelector("img");e&&c(e.clientWidth)}let d=a.getBoundingClientRect(),u=(t??d.left+d.width/2)-d.left,m=(r??d.top+d.height/2)-d.top;h.current={viewX:u,viewY:m,contentX:a.scrollLeft+u,contentY:a.scrollTop+m,ratio:s/i},l.current=s,o(s)},[]);(0,r.useLayoutEffect)(()=>{let e=n.current,t=h.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,h.current=null)},[s]),(0,r.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(l.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},r=null,a=e=>{let[t,r]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-r.clientX,t.clientY-r.clientY),centerX:(t.clientX+r.clientX)/2,centerY:(t.clientY+r.clientY)/2}},n=e=>{2===e.touches.length&&(r={distance:a(e.touches).distance,zoom:l.current},u.current=!0)},i=e=>{if(!r||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:n,centerY:i}=a(e.touches);r.distance>0&&m(r.zoom*(t/r.distance),n,i)},s=e=>{e.touches.length<2&&(r=null,u.current=!1)},o=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",n,{passive:!0}),t.addEventListener("touchmove",i,{passive:!1}),t.addEventListener("touchend",s),t.addEventListener("touchcancel",s),t.addEventListener("pointermove",o,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",n),t.removeEventListener("touchmove",i),t.removeEventListener("touchend",s),t.removeEventListener("touchcancel",s),t.removeEventListener("pointermove",o,{capture:!0})}},[t,m]);let g=(0,r.useCallback)(e=>{e&&1===l.current&&c(e.clientWidth)},[]),p=(0,r.useCallback)(()=>m(1.25*l.current),[m]),f=(0,r.useCallback)(()=>m(l.current/1.25),[m]),x=(0,r.useCallback)(()=>{l.current=1,h.current=null,o(1)},[]),w=1!==s&&d?{...e,width:d*s,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:i,zoom:s,imageStyle:w,measureImage:g,zoomIn:p,zoomOut:f,reset:x}}(w[N]);(0,r.useEffect)(()=>{R()},[e,R]);let[T,_]=(0,r.useState)({src:e,regions:[]}),L=T.src===e?T.regions:[],$=t=>_({src:e,regions:t}),P=(0,r.useRef)(null),O=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],U={single:y.batchImport.singleMode,auto:y.batchImport.autoMode,multi:y.batchImport.multiMode},z=async()=>{if(0!==L.length){if(m){m(L,!0),$([]);return}if(P.current&&u)try{u(await l(P.current,L)),$([])}catch(e){x.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},H=async()=>{let e=b&&b.width>0&&b.height>0?{x:b.x/100,y:b.y/100,width:b.width/100,height:b.height/100}:{x:0,y:0,width:1,height:1};if("auto"===N&&p)return void p(e);if(m)return void m([e],!1);if(k.current&&h)try{let[t]=await l(k.current,[e]);h(t)}catch(e){x.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(i.N,{open:s,onOpenChange:e=>!e&&d(),children:(0,t.jsxs)(i.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(i.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(i.F,{children:y.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:S,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===N?(0,t.jsx)(c,{ref:P,imageSrc:v,regions:L,onChange:$,imageStyle:I,onImageLoad:e=>A(e.currentTarget)}):(0,t.jsx)(a.f,{crop:b,onChange:(e,t)=>j(t),children:(0,t.jsx)("img",{ref:k,alt:"Crop me",src:v,onLoad:function(e){j({unit:"%",x:0,y:0,width:100,height:100}),A(e.currentTarget)},style:I})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:E,onZoomIn:D,onZoomOut:M,onReset:R})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[O.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===O.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:O.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":N===e,onClick:()=>{R(),C(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${N===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:U[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===N?`${y.batchImport.hint} ${y.batchImport.regionCount.replace("{count}",String(L.length))}`:"auto"===N?y.batchImport.autoHint:y.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex gap-2 justify-end",children:["multi"===N&&L.length>0&&(0,t.jsx)(n.f,{variant:"ghost",onClick:()=>$([]),children:y.batchImport.clear}),(0,t.jsx)(n.f,{variant:"outline",onClick:d,children:y.common.cancel||"Cancel"}),"multi"===N?(0,t.jsx)(n.f,{onClick:z,disabled:0===L.length,children:y.batchImport.start.replace("{count}",String(L.length))}):(0,t.jsx)(n.f,{onClick:H,children:"auto"===N?y.batchImport.autoStart:y.common.confirm||"Confirm"})]})]})]})]})})}],12130)},731335,579321,927904,e=>{var t=e.i(843476),r=e.i(399847),a=e.i(551757),n=e.i(456420);let i={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};i.node;let s=(0,n.f)(i);var o=e.i(632781),l=e.i(615568),d=e.i(487486),c=e.i(519455),h=e.i(168148),u=e.i(111110),m=e.i(215519),g=e.i(306831);let p=["read","convert","crop","compress","upload"],f=["receive","analyze","save"];function x(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(+(t<10))}s`;let r=Math.round(t);return`${Math.floor(r/60)}:${String(r%60).padStart(2,"0")}`}var w=e.i(975157);let y={analyzing:50,saving:90},v={analyzing:o.f,saving:o.f,review:l.f,saved:a.f,failed:r.f};e.s(["f",0,function({task:e,now:r,onReview:a,onViewItem:n,onRetry:i,onDiscard:o}){let{t:l}=(0,u.b)(),{timeZone:b}=(0,m.M)(),j=v[e.status],k="analyzing"===e.status||"saving"===e.status,N=l.errors,C=e.error?"string"==typeof N[e.error]?N[e.error]:e.error:null,S=function(e){let t=[];for(let r of p){let a=e?.client?.[r];"number"==typeof a&&t.push({stage:r,ms:a})}for(let r of f){let a=e?.server?.[r];"number"==typeof a&&t.push({stage:r,ms:a})}return t}(e.timings),E=k&&r?r-Date.parse(e.createdAt):null;return(0,t.jsxs)("div",{className:(0,w.f)("space-y-2 rounded-lg border p-3 text-sm",e.unread&&"border-primary/50 bg-primary/5"),"data-testid":"import-task-card","data-status":e.status,children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(j,{className:(0,w.f)("mt-0.5 h-4 w-4 shrink-0",k&&"animate-spin text-primary","saved"===e.status&&"text-green-600","failed"===e.status&&"text-destructive","review"===e.status&&"text-primary")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:l.importTasks.status[e.status]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:l.importTasks.mode[e.mode]}),e.unread&&(0,t.jsx)(d.f,{children:l.importTasks.unread})]}),k&&(0,t.jsx)(h.f,{value:y[e.status],"aria-label":l.importTasks.stageEstimate,"aria-valuetext":l.common.progress.estimated.replace("{percent}",String(y[e.status])),className:"h-1.5"}),e.excerpt&&(0,t.jsx)("p",{className:"break-words text-muted-foreground",children:e.excerpt}),"saved"===e.status&&!e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l.importTasks.itemDeleted}),"saved"===e.status&&e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-green-700 dark:text-green-300",children:e.duplicate?l.importTasks.duplicateSaved:l.importTasks.savedTo.replace("{notebook}",e.notebookName||"-").replace("{id}",e.errorItemShortId||"-")}),C&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:C}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(s,{className:"h-3 w-3"}),l.importTasks.createdAt.replace("{time}",(0,g.r)(e.createdAt,"MM-dd HH:mm",b))]}),null!==E&&(0,t.jsx)("span",{children:l.importTasks.elapsed.replace("{time}",x(E))}),e.attempts>1&&(0,t.jsx)("span",{children:l.importTasks.attempts.replace("{count}",String(e.attempts))})]}),S.length>0&&(0,t.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums","aria-label":"timings",children:S.map(({stage:e,ms:r})=>(0,t.jsxs)("li",{children:[l.importTasks.timings[e]," ",x(r)]},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:["review"===e.status&&a&&(0,t.jsx)(c.f,{size:"sm",onClick:a,children:l.importTasks.continueReview}),"saved"===e.status&&e.errorItemId&&n&&(0,t.jsx)(c.f,{size:"sm",variant:"outline",onClick:n,children:l.importTasks.viewItem}),"failed"===e.status&&i&&(0,t.jsx)(c.f,{size:"sm",onClick:i,children:l.importTasks.retry}),"saving"!==e.status&&"saved"!==e.status&&o&&(0,t.jsx)(c.f,{size:"sm",variant:"ghost",onClick:o,children:l.importTasks.discard})]})]})}],731335);var b=e.i(618566),j=e.i(61425),k=e.i(294114),N=e.i(201276),C=e.i(116331);e.s(["f",0,function(e){let{t}=(0,u.b)(),r=(0,b.useRouter)(),a=e=>{e.unread&&(0,C.N)(e.id).catch(e=>N.V.warn("[ImportTasks]","Mark read failed",{error:e}))};return{openReview:e=>{a(e),r.push(`/import-tasks/${e.id}`)},viewItem:e=>{e.errorItemId&&(a(e),r.push(`/error-items/${e.errorItemId}`))},markRead:a,retry:async r=>{try{await (0,C.R)(r.id),k.c.info(t.importTasks.retried)}catch(e){k.c.error((0,j.f)(e,t))}e?.()},discard:async r=>{if(!await (0,k.u)(t.importTasks.discardConfirm))return!1;let a=!1;try{await (0,C.x)(r.id),k.c.success(t.importTasks.discarded),a=!0}catch(e){k.c.error((0,j.f)(e,t))}return e?.(),a}}}],579321);var S=e.i(271645);e.s(["f",0,function(e,t=1e3){let[r,a]=(0,S.useState)(()=>Date.now());return(0,S.useEffect)(()=>{if(!e)return;let r=setInterval(()=>a(Date.now()),t);return()=>clearInterval(r)},[e,t]),r}],927904)},141176,e=>{var t=e.i(843476),r=e.i(271645),a=e.i(456420);let n={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};n.node;let i=(0,a.f)(n);var s=e.i(772382),o=e.i(511445),l=e.i(624687),d=e.i(111110),c=e.i(975157);e.s(["f",0,function({value:e,onChange:a,className:n,...h}){let{t:u}=(0,d.b)(),[m,g]=(0,r.useState)("source"),p=(0,r.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:i},{mode:"preview",label:u.markdownEditor.preview,icon:s.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:r,icon:a})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,c.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),r]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(l.f,{value:e,onChange:e=>a(e.target.value),className:n,...h}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(o.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),r=e.i(271645),a=e.i(967489),n=e.i(856423),i=e.i(41931),s=e.i(201276),o=e.i(111110);e.s(["f",0,function({value:e,onChange:l,className:d}){let[c,h]=(0,r.useState)([]),{t:u}=(0,o.b)();return(0,r.useEffect)(()=>{(async()=>{try{let e=await i.k.get("/api/notebooks");h(e)}catch(e){s.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(a.d,{value:e,onValueChange:l,children:[(0,t.jsx)(a.P,{className:d,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(a.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(a.r,{children:0===c.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):c.map(e=>(0,t.jsx)(a.T,{value:e.id,children:e.name},e.id))})]})}],438465);var l=e.i(664030);e.s(["f",0,function({value:e,onChange:r,disabled:n}){let{groups:i,loading:s}=(0,l.f)(),o=i.filter(e=>e.isActive);return(0,t.jsxs)(a.d,{value:e,onValueChange:r,disabled:n||s,children:[(0,t.jsx)(a.P,{children:(0,t.jsx)(a.U,{placeholder:"选择卷别"})}),(0,t.jsx)(a.r,{children:o.map(e=>(0,t.jsx)(a.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),r=e.i(111110),a=e.i(398019),n=e.i(184110),i=e.i(975157);let s={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:o,align:l,className:d}){let{t:c}=(0,r.b)();if(!e)return null;let h=(0,n.V)(o),u=(0,n.o)(l);return(0,t.jsx)("figure",{className:(0,i.f)("question-figure my-3",d),children:(0,t.jsx)("img",{src:(0,a.f)(e),alt:c.figure.alt,className:(0,i.f)(s[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:h/100,maxWidth:`${Math.min(h,100)}%`}})})}])},574041,e=>{var t=e.i(843476),r=e.i(271645),a=e.i(263676),n=e.i(487486),i=e.i(793479),s=e.i(41931),o=e.i(201276);e.s(["f",0,function({value:e=[],onChange:l,placeholder:d="Enter tags...",className:c="",enterHint:h,subject:u,gradeStage:m}){let[g,p]=(0,r.useState)(""),[f,x]=(0,r.useState)([]),[w,y]=(0,r.useState)(!1),[v,b]=(0,r.useState)(0),j=(0,r.useRef)(null),k=(0,r.useRef)(null),N=(0,r.useCallback)(async t=>{try{let r=new URLSearchParams({q:t});u&&r.append("subject",u),m&&r.append("stage",m);let a=((await s.k.get(`/api/tags/suggestions?${r.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));x(a.slice(0,20)),y(a.length>0),b(0)}catch(e){o.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,r.useEffect)(()=>{g.trim()&&N(g)},[g,N]);let C=t=>{t.trim()&&!e.includes(t.trim())&&(l([...e,t.trim()]),p(""),x([]),y(!1),b(0))},S=t=>{l(e.filter(e=>e!==t))};return(0,r.useEffect)(()=>{let e=e=>{!k.current||k.current.contains(e.target)||j.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${c}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(n.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>S(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(a.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(i.f,{ref:j,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(x([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),v>=0&&f[v]?C(f[v]):g.trim()&&C(g)):"ArrowDown"===t.key?(t.preventDefault(),b(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),b(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),b(0)):"Backspace"===t.key&&!g&&e.length>0&&S(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?d:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),w&&f.length>0&&(0,t.jsx)("div",{ref:k,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,r)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${r===v?"bg-accent":""}`,onClick:()=>C(e),onMouseEnter:()=>b(r),children:e},e))}),g&&!w&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:h?`${h} "${g}"`:`Press Enter to create "${g}"`})]})}])},61425,e=>{var t=e.i(303163);e.s(["f",0,function(e,r){let a=r.common?.messages?.analysisFailed||"Analysis failed, please try again",n=(0,t.d)(e);if(n){let e=r.errors??{};if(!(n in e))return n;let t=e[n];return"string"==typeof t?t:a}let i=(0,t.Z)(e);if(i.includes("fetch")||i.includes("network"))return r.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${a} (${t})`}return a}])},184110,e=>{let t=["left","center","right"],r="center";function a(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,r,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,a,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:r},"V",0,function(e){return a(e)?e:100}])},398019,e=>{e.s(["f",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},952122,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])},825624,575557,364002,e=>{let t=/^[\s  ]+/,r="一二三四五六七八九十",a=[{family:"dot",pattern:/^(\d{1,3})\s*[..](?!\d)\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function n(e){let n=e.replace(t,"");for(let{family:e,pattern:t}of a){let a=n.match(t);if(!a||n.length<=a[0].length)continue;let i=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?r.indexOf(e)+1:10*(0===t?1:r.indexOf(e[0])+1)+(t===e.length-1?0:r.indexOf(e[t+1])+1)}(a[1]);if(Number.isFinite(i)&&!(i<=0))return{value:i,family:e,prefixLength:a[0].length,label:a[1]}}return null}function i(e){let t=[];for(let r of e)(r||0!==t.length&&""!==t[t.length-1])&&t.push(r);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let s=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,o=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,l=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,d=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,c=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,h=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,u=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function m(e){let t=[],r=[];for(let a of e)a?r.push(a):r.length&&(t.push(r.join("\n")),r=[]);return r.length&&t.push(r.join("\n")),t}function g(e,t){let r=[];for(let a=0;a<e.length;a++){let n=e[a],i=[n];for(let r=a+1;r<e.length;r++){let a=e[r],s=i[i.length-1];if(a.family!==n.family)continue;let o=1===a.value&&[...t].some(e=>e>s.line&&e<a.line);(a.value===s.value+1||o)&&i.push(a)}i.length>r.length&&(r=i)}return r}function p(e,t,r){return!!d.test(e)||!!t&&"cn"===t.family&&"cn"!==r&&null!==r&&(e.length<=40||c.test(e.slice(0,20)))}function f(e){let t=e.match(h);if(!t)return null;let r=Number(t[1]),a=Number(t[2]);return r<=a?{from:r,to:a}:null}e.s(["S",0,60,"i",0,2e4,"J",0,function(e,r={}){let a=e.length>2e4,c=e.slice(0,2e4).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),x=c.map(e=>e?n(e):null),w=c.length;for(let e=0;e<c.length;e++)if(l.test(c[e])){w=e;break}let y=[],v=[];for(let e=0;e<w;e++){let t=x[e];t&&("cn"===t.family?v:y).push({...t,line:e})}let b=new Set;for(let e=0;e<w;e++)(d.test(c[e])||x[e]?.family==="cn")&&b.add(e);let j=g(y,b);if(j.length<2){let e=g(v,new Set);e.length>=2&&(j=e)}let k=i(c.slice(0,w)),N=w<c.length?m(c.slice(w)):[],C=e=>({questions:k?[{label:null,text:k,material:null,section:null}]:[],ignored:N,detected:!1,ambiguous:e,candidateCount:e?j.length:+!!k,overflow:0,tooLong:a});if(j.length<2)return C(!1);let S=j[0].family;if(!r.forceNumbered&&function(e,t,r,a){let n=null;for(let i=t-1;i>=0;i--)if(e[i]){n=p(e[i],a[i],r)?null:e[i];break}return!(!n||s.test(n)||h.test(n))&&("paren"===r?n.length>=15||/[。?!?!::,,;;]$/.test(n):/[::]$/.test(n)&&u.test(n))}(c,j[0].line,S,x))return C(!0);let E=new Set(j.map(e=>e.line)),I=[],A=[],D=null,M=[],R=[],T=(e,t)=>{for(let r of m(e))(!s.test(r)||!(r.length<80))&&(o.test(r)||r.length>=80&&/[。!?.!?;;]/.test(r))?M.push({text:r,range:f(r)}):t?I.push(r):D&&!A.some(e=>e.section===D)?D=`${D}
10
+ ${r}`:I.push(r)},_=j[0].line,L=[];for(let e=0;e<_;e++)c[e]&&p(c[e],x[e],S)?(T(L.splice(0),!0),D=c[e],R=[]):L.push(c[e]);T(L,!0);for(let e=0;e<j.length;e++){let r=j[e].line,a=e+1<j.length?j[e+1].line:w;M.length&&(R=[...R.filter(e=>e.range),...M],M=[]);let s=a,l=null;for(let e=r+1;e<a;e++)if(c[e]&&!E.has(e)&&p(c[e],x[e],S)){s=e,l=c[e];break}let d=c.slice(r,s),h=m(d),u=[];for(;h.length>1&&o.test(h[h.length-1].slice(0,30));)u.unshift(h.pop());let g=u.length?h.join("\n"):i(d),y=j[e].value,v=R.filter(e=>!e.range||y>=e.range.from&&y<=e.range.to);for(let r of(A.push({label:j[e].label,text:function(e){let r=e.split("\n"),a=r[0]?.replace(t,"")??"",i=n(a);return i&&"cn"!==i.family&&(r[0]=a.slice(i.prefixLength)),r.join("\n")}(g),material:v.length?v.map(e=>e.text).join("\n\n"):null,section:D}),u))M.push({text:r,range:f(r)});null!==l&&(D=l,R=[],T(c.slice(s+1,a),!1))}let $=A.slice(60);return{questions:A.slice(0,60),ignored:[...I,...N,...$.map(e=>{var t;let r,a;return r=(t=e).text.trim(),(a=t.material?.trim())?`${a}
11
+
12
+ ${r}`:r})],detected:!0,ambiguous:!1,candidateCount:A.length,overflow:$.length,tooLong:a}}],825624);var x=e.i(41931),w=e.i(116331);async function y(e){let t;for(let r=0;r<3;r++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===r)break;await new Promise(e=>setTimeout(e,1e3*(r+1)))}throw t}async function v(e,t=(0,w.c)()){let{batch:r}=await y(()=>x.k.post("/api/import-batches",{...e,clientRequestId:t,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4}));return(0,w.P)(),r}async function b(e,t={}){let r=t.image?"?include=image":"",{batch:a}=await x.k.get(`/api/import-batches/${encodeURIComponent(e)}${r}`);return a}async function j(e,t,r){let{batch:a}=await x.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:t,draft:r});return a}async function k(e,t,r){let{batch:a}=await y(()=>x.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:t,images:r},{timeout:12e4}));return(0,w.P)(),a}async function N(e){let{batch:t}=await x.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,w.P)(),t}async function C(e){let t=await x.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,w.P)(),t}async function S(e){await x.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,w.P)()}async function E(e){await x.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,w.P)()}async function I(e,t){return x.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:t},{timeout:6e5,recoverable:!0})}async function A(){try{return!!(await x.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function D(e,t){let r=await x.k.post("/api/error-items",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,subjectId:t.subjectId||void 0,subjectName:t.subjectId?void 0:e.subject,originalImageUrl:t.imageUrl||"",paperLevel:t.paperLevel||void 0});return{id:r.id,shortId:r.shortId??null,subjectId:r.subjectId??null,notebookName:r.subject?.name??null,duplicate:r.duplicate}}e.s(["J",0,C,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,v,"o",0,S,"w",0,b,"$",0,I,"f",0,E,"s",0,N,"S",0,j,"g",0,k],575557),e.i(201276),e.s(["x",0,A,"a",0,D],364002)}])})();
@@ -0,0 +1,2 @@
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,842727,e=>{var t=e.i(271645),r=e.i(981140),n=e.i(75830),a=e.i(820783),i=e.i(30030),o=e.i(610772),s=e.i(248425),l=e.i(30207),d=e.i(369340),u=e.i(586318),c=e.i(934620),f=Object.defineProperty,p=(e,t)=>f(e,"name",{value:t,configurable:!0}),m=!1;function h(){let[e,r]=t.useState(m);return t.useEffect(()=>{m||(m=!0,r(!0))},[]),e}p(h,"useIsHydrated");var g=t[" useSyncExternalStore ".trim().toString()];function v(){return()=>{}}function y(){return g(v,()=>!0,()=>!1)}p(v,"subscribe"),p(y,"useIsHydratedModern");var b="function"==typeof g?y:h,w=e.i(843476),x=Object.defineProperty,k=(e,t)=>x(e,"name",{value:t,configurable:!0}),j="rovingFocusGroup.onEntryFocus",R={bubbles:!1,cancelable:!0},D="RovingFocusGroup",[M,C,S]=(0,n.f)(D),[I,E]=(0,i.f)(D,[S]),[A,z]=I(D),L=t.forwardRef(k(function(e,t){return(0,w.jsx)(M.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(M.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,w.jsx)(N,{...e,ref:t})})})},"RovingFocusGroup")),N=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:i,orientation:o,loop:c=!1,dir:f,currentTabStopId:p,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:v=!1,...y}=e,b=t.useRef(null),x=(0,a.f)(n,b),k=(0,u.f)(f),[M,S]=(0,d.f)({prop:p,defaultProp:m??null,onChange:h,caller:D}),[I,E]=t.useState(!1),z=(0,l.f)(g),L=C(i),N=t.useRef(!1),[T,F]=t.useState(0);return t.useEffect(()=>{let e=b.current;if(e)return e.addEventListener(j,z),()=>e.removeEventListener(j,z)},[z]),(0,w.jsx)(A,{scope:i,orientation:o,dir:k,loop:c,currentTabStopId:M,onItemFocus:t.useCallback(e=>S(e),[S]),onItemShiftTab:t.useCallback(()=>E(!0),[]),onFocusableItemAdd:t.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>F(e=>e-1),[]),children:(0,w.jsx)(s.V.div,{tabIndex:I||0===T?-1:0,"data-orientation":o,...y,ref:x,style:{outline:"none",...e.style},onMouseDown:(0,r.f)(e.onMouseDown,()=>{N.current=!0}),onFocus:(0,r.f)(e.onFocus,e=>{let t=!N.current;if(e.target===e.currentTarget&&t&&!I){let t=new CustomEvent(j,R);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=L().filter(e=>e.focusable);O([e.find(e=>e.active),e.find(e=>e.id===M),...e].filter(Boolean).map(e=>e.ref.current),v)}}N.current=!1}),onBlur:(0,r.f)(e.onBlur,()=>E(!1))})})},"RovingFocusGroupImpl")),T=t.forwardRef(k(function(e,n){let{__scopeRovingFocusGroup:a,focusable:i=!0,active:l=!1,tabStopId:d,children:u,...f}=e,p=(0,o.f)(),m=d||p,h=z("RovingFocusGroupItem",a),g=h.currentTabStopId===m,v=C(a),{onFocusableItemAdd:y,onFocusableItemRemove:x,currentTabStopId:k}=h,j=b();return(0,c.f)(()=>{if(j&&i)return y(),()=>x()},[j,i,y,x]),t.useEffect(()=>{if(!j&&i)return y(),()=>x()},[j,i,y,x]),(0,w.jsx)(M.ItemSlot,{scope:a,id:m,focusable:i,active:l,children:(0,w.jsx)(s.V.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...f,ref:n,onMouseDown:(0,r.f)(e.onMouseDown,e=>{i?h.onItemFocus(m):e.preventDefault()}),onFocus:(0,r.f)(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:(0,r.f)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=V(e,h.orientation,h.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=v().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();let n=r.indexOf(e.currentTarget);r=h.loop?U(r,n+1):r.slice(n+1)}setTimeout(()=>O(r))}}),children:"function"==typeof u?u({isCurrentTabStop:g,hasTabStop:null!=k}):u})})},"RovingFocusGroupItem")),F={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function P(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function V(e,t,r){let n=P(e.key,r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(n))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)))return F[n]}function O(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function U(e,t){return e.map((r,n)=>e[(t+n)%e.length])}k(P,"getDirectionAwareKey"),k(V,"getFocusIntent"),k(O,"focusFirst"),k(U,"wrapArray"),e.s(["M",0,T,"F",0,L,"B",0,E],842727)},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)},975153,e=>{var t=e.i(456420);let r={name:"calendar-check",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],975153)},749803,e=>{var t=e.i(456420);let r={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],749803)},867927,e=>{var t=e.i(456420);let r={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],867927)},548161,e=>{var t=e.i(456420);let r={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],548161)},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)},583967,e=>{var t=e.i(456420);let r={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],583967)},762368,e=>{var t=e.i(456420);let r={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],762368)},580860,e=>{var t=e.i(456420);let r={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],580860)},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)},226091,994533,e=>{var t=e.i(456420);let r={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],226091);var a=e.i(534693);e.s(["f",()=>a.f],994533)},999092,e=>{var t=e.i(456420);let r={name:"languages",size:24,node:[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],999092)},446513,e=>{var t=e.i(456420);let r={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],446513)},21357,79058,e=>{var t=e.i(456420);let r={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],21357);var a=e.i(41931);let i=null,o=null,s=!1;function l(){return"u"<typeof Audio?null:o??=new Audio}let d=new Map,u=(e,t)=>`${t}
2
+ ${e}`;function c(e,t,r,n){return a.k.post("/api/tts/batch",{texts:e,language:t,...r?{regenerate:r}:{},...n?{errorItemId:n}:{}},{timeout:6e5,recoverable:!0}).then(({items:e})=>e.map(({id:e,version:t})=>`/api/tts/${e}?v=${t}`))}async function f(e,t,r){let n=await c(e,t,!0,r);e.forEach((e,r)=>d.set(u(e,t),Promise.resolve(n[r])))}e.s(["l",0,l,"v",0,function(){return i??=a.k.get("/api/tts").then(e=>"cloud"===e.mode?"cloud":"browser").catch(()=>"browser")},"h",0,function(){return s},"z",0,function(e,t){return a.k.post("/api/tts/status",{texts:e,language:t}).then(e=>!0===e.ready).catch(()=>!1)},"w",0,function(e,t,r){let n=[...new Set(e)].filter(e=>!d.has(u(e,t)));if(!n.length)return Promise.resolve();let a=c(n,t,!1,r);return n.forEach((e,r)=>{let n=u(e,t),i=a.then(e=>e[r]);i.catch(()=>d.delete(n)),d.set(n,i)}),a.then(()=>void 0)},"H",0,f,"U",0,function(e,t){let r=u(e,t),n=d.get(r);!n&&((n=a.k.post("/api/tts",{text:e,language:t},{timeout:12e4,recoverable:!0}).then(({id:e,version:t})=>`/api/tts/${e}?v=${t}`)).catch(()=>d.delete(r)),d.set(r,n));return n},"p",0,function(){let e=l();if(e&&!s){let t,r,n;s=!0,t=new DataView(new ArrayBuffer(1644)),(r=(e,r)=>[...r].forEach((r,n)=>t.setUint8(e+n,r.charCodeAt(0))))(0,"RIFF"),t.setUint32(4,1636,!0),r(8,"WAVE"),r(12,"fmt "),t.setUint32(16,16,!0),t.setUint16(20,1,!0),t.setUint16(22,1,!0),t.setUint32(24,8e3,!0),t.setUint32(28,16e3,!0),t.setUint16(32,2,!0),t.setUint16(34,16,!0),r(36,"data"),t.setUint32(40,1600,!0),n="",new Uint8Array(t.buffer).forEach(e=>{n+=String.fromCharCode(e)}),e.src=`data:audio/wav;base64,${btoa(n)}`,e.play().catch(()=>{s=!1})}}],79058)},77071,e=>{var t=e.i(456420);let r={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],77071)},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)},980105,e=>{var t=e.i(456420);let r={name:"scan-text",size:24,node:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],980105)},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)},901279,e=>{var t=e.i(456420);let r={name:"user",size:24,node:[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],901279)},534693,e=>{var t=e.i(456420);let r={name:"wand-sparkles",size:24,node:[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],aliases:["wand-2"]};r.node;let n=(0,t.f)(r);e.s(["f",0,n])},28342,676167,e=>{var t=e.i(843476),r=e.i(111110);let n=["一年级","二年级","三年级","四年级","五年级","六年级","初一","初二","初三","高一","高二","高三","大一","大二","大三","大四"],a=n.flatMap(e=>[`${e}上`,`${e}下`]),i={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,a,"c",0,function(e){let t=i[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:i,onChange:o,disabled:s}){let{t:l}=(0,r.b)();return(0,t.jsxs)("select",{id:e,value:i,onChange:e=>o(e.target.value),disabled:s,"aria-label":l.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:l.common.notSet}),i&&!a.includes(i)&&(0,t.jsx)("option",{value:i,children:i}),n.flatMap((e,r)=>["上","下"].map((n,a)=>(0,t.jsxs)("option",{value:`${e}${n}`,children:[l.gradeSelection.names[r]," · ",0===a?l.gradeSelection.firstSemester:l.gradeSelection.secondSemester]},`${e}${n}`)))]})}],28342)},776639,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),a=e.i(820783),i=e.i(30030),o=e.i(610772),s=e.i(369340),l=e.i(726330),d=e.i(765491),u=e.i(774606),c=e.i(296626),f=e.i(248425),p=e.i(303536),m=e.i(934620),h=e.i(985369),g=e.i(186312),v=e.i(991918),y=Object.defineProperty,b=(e,t)=>y(e,"name",{value:t,configurable:!0}),w="Dialog",[x,k]=(0,i.f)(w),[j,R]=x(w),D=b(e=>{let{__scopeDialog:n,children:a,open:i,defaultOpen:l,onOpenChange:u,modal:c=!0}=e,f=r.useRef(null),p=r.useRef(null),{nodes:m,registry:h}=(0,d.D)(),[g,v]=(0,s.f)({prop:i,defaultProp:l??!1,onChange:u,caller:w}),[y,b]=r.useState(0),[x,k]=r.useState(0);return(0,t.jsx)(j,{scope:n,triggerRef:f,contentRef:p,contentId:(0,o.f)(),titleId:(0,o.f)(),descriptionId:(0,o.f)(),titlePresent:y>0,descriptionPresent:x>0,setTitleCount:b,setDescriptionCount:k,open:g,onOpenChange:v,onOpenToggle:r.useCallback(()=>v(e=>!e),[v]),modal:c,branchNodes:m,branchRegistry:h,children:a})},"Dialog"),M=r.forwardRef(b(function(e,r){let{__scopeDialog:i,...o}=e,s=R("DialogTrigger",i),l=(0,a.f)(r,s.triggerRef);return(0,t.jsx)(f.V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":K(s.open),...o,ref:l,onClick:(0,n.f)(e.onClick,s.onOpenToggle)})},"DialogTrigger")),C="DialogPortal",[S,I]=x(C,{forceMount:void 0}),E=b(e=>{let{__scopeDialog:n,forceMount:a,children:i,container:o}=e,s=R(C,n);return(0,t.jsx)(S,{scope:n,forceMount:a,children:r.Children.map(i,e=>(0,t.jsx)(c.f,{present:a||s.open,children:(0,t.jsx)(u.f,{asChild:!0,container:o,children:e})}))})},"DialogPortal"),A="DialogOverlay",z=r.forwardRef(b(function(e,r){let n=I(A,e.__scopeDialog),{forceMount:a=n.forceMount,...i}=e,o=R(A,e.__scopeDialog);return o.modal?(0,t.jsx)(c.f,{present:a||o.open,children:(0,t.jsx)(N,{...i,ref:r})}):null},"DialogOverlay")),L=(0,v.B)("DialogOverlay.RemoveScroll"),N=r.forwardRef(b(function(e,n){let{__scopeDialog:i,...o}=e,s=R(A,i),d=(0,l.y)(),u=(0,a.f)(n,d);return(0,t.jsx)(h.f,{as:L,allowPinchZoom:!0,shards:r.useMemo(()=>[s.contentRef,...s.branchNodes.map(e=>({current:e}))],[s.contentRef,s.branchNodes]),children:(0,t.jsx)(f.V.div,{"data-state":K(s.open),...o,ref:u,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),T="DialogContent",F=r.forwardRef(b(function(e,r){let n=I(T,e.__scopeDialog),{forceMount:a=n.forceMount,...i}=e,o=R(T,e.__scopeDialog);return(0,t.jsx)(c.f,{present:a||o.open,children:o.modal?(0,t.jsx)(P,{...i,ref:r}):(0,t.jsx)(V,{...i,ref:r})})},"DialogContent")),P=r.forwardRef(b(function(e,i){let o=R(T,e.__scopeDialog),s=r.useRef(null),l=(0,a.f)(i,o.contentRef,s);return r.useEffect(()=>{let e=s.current;if(e)return(0,g.f)(e)},[]),(0,t.jsx)(O,{...e,ref:l,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:(0,n.f)(e.onCloseAutoFocus,e=>{e.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:(0,n.f)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,n.f)(e.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal")),V=r.forwardRef(b(function(e,n){let a=R(T,e.__scopeDialog),i=r.useRef(!1),o=r.useRef(!1);return(0,t.jsx)(O,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||a.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));let r=t.target;a.triggerRef.current?.contains(r)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})},"DialogContentNonModal")),O=r.forwardRef(b(function(e,r){let{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,"aria-describedby":s,children:u,...c}=e,f=R(T,n);return(0,p.f)(),(0,t.jsx)(d.l,{registry:f.branchRegistry,children:(0,t.jsx)(d.v,{asChild:!0,loop:!0,trapped:a,branches:f.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:o,children:(0,t.jsx)(l.V,{role:"dialog",id:f.contentId,"aria-labelledby":f.titlePresent?f.titleId:void 0,"aria-describedby":f.descriptionPresent?H(s,f.descriptionId):s,"data-state":K(f.open),...c,ref:r,deferPointerDownOutside:!0,onDismiss:()=>f.onOpenChange(!1),children:u})})})},"DialogContentImpl")),U=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...a}=e,i=R("DialogTitle",n),{setTitleCount:o}=i;return(0,m.f)(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,t.jsx)(f.V.h2,{id:i.titleId,...a,ref:r})},"DialogTitle")),$=r.forwardRef(b(function(e,r){let{__scopeDialog:n,...a}=e,i=R("DialogDescription",n),{setDescriptionCount:o}=i;return(0,m.f)(()=>(o(e=>e+1),()=>o(e=>e-1)),[o]),(0,t.jsx)(f.V.p,{id:i.descriptionId,...a,ref:r})},"DialogDescription")),_=r.forwardRef(b(function(e,r){let{__scopeDialog:a,...i}=e,o=R("DialogClose",a);return(0,t.jsx)(f.V.button,{type:"button",...i,ref:r,onClick:(0,n.f)(e.onClick,()=>o.onOpenChange(!1))})},"DialogClose"));function H(...e){let t=new Set;for(let r of e)if("string"==typeof r)for(let e of String(r).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(" "):void 0}function K(e){return e?"open":"closed"}b(H,"concatAriaDescribedby"),b(K,"getState");var B=e.i(263676),q=e.i(975157);let G=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(z,{ref:n,className:(0,q.f)("fixed inset-0 z-50 bg-black/50 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));G.displayName=z.displayName;let W=r.forwardRef(({className:e,children:r,...n},a)=>(0,t.jsxs)(E,{children:[(0,t.jsx)(G,{}),(0,t.jsxs)(F,{ref:a,onPointerDownOutside:e=>{e.preventDefault()},className:(0,q.f)("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border bg-card p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...n,children:[r,(0,t.jsxs)(_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,t.jsx)(B.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));W.displayName=F.displayName;let J=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});J.displayName="DialogHeader";let Z=({className:e,...r})=>(0,t.jsx)("div",{className:(0,q.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});Z.displayName="DialogFooter";let X=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(U,{ref:n,className:(0,q.f)("text-lg font-semibold leading-none tracking-tight",e),...r}));X.displayName=U.displayName;let Q=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)($,{ref:n,className:(0,q.f)("text-sm text-muted-foreground",e),...r}));Q.displayName=$.displayName,e.s(["N",0,D,"d",0,W,"C",0,Q,"c",0,Z,"s",0,J,"F",0,X,"a",0,M],776639)},110204,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(248425),a=Object.defineProperty,i=r.forwardRef(a(function(e,r){return(0,t.jsx)(n.V.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},"name",{value:"Label",configurable:!0})),o=e.i(975157);e.s(["f",0,function({className:e,...r}){return(0,t.jsx)(i,{"data-slot":"label",className:(0,o.f)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}],110204)},677572,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(981140),a=e.i(30030),i=e.i(842727),o=e.i(296626),s=e.i(248425),l=e.i(586318),d=e.i(369340),u=e.i(610772),c=Object.defineProperty,f=(e,t)=>c(e,"name",{value:t,configurable:!0}),p="Tabs",[m,h]=(0,a.f)(p,[i.B]),g=(0,i.B)(),[v,y]=m(p),b=r.forwardRef(f(function(e,r){let{__scopeTabs:n,value:a,onValueChange:i,defaultValue:o,orientation:c="horizontal",dir:f,activationMode:m="automatic",...h}=e,g=(0,l.f)(f),[y,b]=(0,d.f)({prop:a,onChange:i,defaultProp:o??"",caller:p});return(0,t.jsx)(v,{scope:n,baseId:(0,u.f)(),value:y,onValueChange:b,orientation:c,dir:g,activationMode:m,children:(0,t.jsx)(s.V.div,{dir:g,"data-orientation":c,...h,ref:r})})},"Tabs")),w=r.forwardRef(f(function(e,r){let{__scopeTabs:n,loop:a=!0,...o}=e,l=y("TabsList",n),d=g(n);return(0,t.jsx)(i.F,{asChild:!0,...d,orientation:l.orientation,dir:l.dir,loop:a,children:(0,t.jsx)(s.V.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:r})})},"TabsList")),x=r.forwardRef(f(function(e,r){let{__scopeTabs:a,value:o,disabled:l=!1,...d}=e,u=y("TabsTrigger",a),c=g(a),f=j(u.baseId,o),p=R(u.baseId,o),m=o===u.value;return(0,t.jsx)(i.M,{asChild:!0,...c,focusable:!l,active:m,children:(0,t.jsx)(s.V.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":p,"data-state":m?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...d,ref:r,onMouseDown:(0,n.f)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():(e.currentTarget.focus(),u.onValueChange(o))}),onKeyDown:(0,n.f)(e.onKeyDown,e=>{!l&&e.target===e.currentTarget&&[" ","Enter"].includes(e.key)&&u.onValueChange(o)}),onFocus:(0,n.f)(e.onFocus,()=>{let e="manual"!==u.activationMode;m||l||!e||u.onValueChange(o)})})})},"TabsTrigger")),k=r.forwardRef(f(function(e,n){let{__scopeTabs:a,value:i,forceMount:l,children:d,...u}=e,c=y("TabsContent",a),f=j(c.baseId,i),p=R(c.baseId,i),m=i===c.value,h=r.useRef(m);return r.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(o.f,{present:l||m,children:({present:r})=>(0,t.jsx)(s.V.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:p,tabIndex:0,...u,ref:n,style:{...e.style,animationDuration:h.current?"0s":void 0},children:r&&d})})},"TabsContent"));function j(e,t){return`${e}-trigger-${t}`}function R(e,t){return`${e}-content-${t}`}f(j,"makeTriggerId"),f(R,"makeContentId");var D=e.i(975157);let M=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(w,{ref:n,className:(0,D.f)("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...r}));M.displayName=w.displayName;let C=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(x,{ref:n,className:(0,D.f)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...r}));C.displayName=x.displayName;let S=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(k,{ref:n,className:(0,D.f)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...r}));S.displayName=k.displayName,e.s(["i",0,b,"S",0,S,"U",0,M,"k",0,C],677572)},624687,e=>{var t=e.i(843476),r=e.i(975157);e.s(["f",0,function({className:e,...n}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,r.f)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...n})}])},81968,e=>{e.s(["f",0,function(){return window.WrongNotebookAndroid??null}])},637691,e=>{e.s(["f",0,"https://github.com/margrop/wrong-notebook"])},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"],a=new Map(n.map(e=>[e.toLowerCase(),e])),i=new Set(r.map(e=>e.toLowerCase())),o=/(?:java|vb)script\s*:|[\u0000-\u0008\u000b\u000c\u000e-\u001f]/i;function s(e){if(o.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=d(t[0]);if("string"==typeof e&&(/<\s*\/?\s*[a-z!][^>]*>/i.test(e)||o.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 l(e){if(!e.trim())return[];let t=[],r="",n=!1,a=0,i=0;for(let o=0;o<e.length;o++){let s=e[o];if(r)n?n=!1:"\\"===s?n=!0:s===r&&(r="");else if('"'===s||"'"===s)r=s;else if("["===s)a++;else if("]"===s){if(--a<0)throw Error("参数括号不匹配")}else","===s&&0===a&&(t.push(e.slice(i,o).trim()),i=o+1)}if(r||a||n)throw Error("参数未闭合");return t.push(e.slice(i).trim()),t}function d(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 l(e.slice(1,-1)).map(d);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 a=r[++e];if(void 0===a)throw Error("字符串转义未闭合");n+="\\"===a||a===t?a:"\\"+a}}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=[],o=new Set;for(let u of r)try{if(s(u))throw Error("命令包含不允许的脚本或标记");if(function(e){let t=e.trim().match(/^(\w+)\s*\(/)?.[1].toLowerCase();return!!t&&a.has(t)}(u)){let t=function(e){let t=e.trim().match(/^(\w+)\s*\(([\s\S]*)\)$/);if(!t)return null;let r=a.get(t[1].toLowerCase());if(!r)return null;try{let e=l(t[2]).map(d);return{m:r,a:e}}catch{return null}}(u),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(!i.has(r.toLowerCase())&&r!==n&&!t.has(r))return!1}return!0}(u,o))throw Error("指令不在允许范围内");if(!e.evalCommand(u.trim()))throw Error("GeoGebra 未能执行该命令");let t=u.match(/^\s*([\p{L}_][\p{L}\p{N}_]*)\s*\([^)]*\)\s*=/u)?.[1];t&&o.add(t)}}catch(e){n.push({command:u,message:(0,t.Z)(e)})}return n}])},116331,e=>{var t=e.i(41931);let r="wrong-notebook:import-tasks-changed";function n(){window.dispatchEvent(new Event(r))}function a(){let e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}async function i(e,r=a()){let o;for(let a=0;a<3;a++)try{let{task:a}=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(),a}catch(e){if(o=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===a)break;await new Promise(e=>setTimeout(e,1e3*(a+1)))}throw o}async function o(e,r={}){let n=r.image?"?include=image":"",{task:a}=await t.k.get(`/api/import-tasks/${encodeURIComponent(e)}${n}`);return a}async function s(e,r){let a=await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/confirm`,r);return n(),a}async function l(e){let{task:r}=await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/retry`,{});return n(),r}async function d(e){await t.k.post(`/api/import-tasks/${encodeURIComponent(e)}/read`,{}),n()}async function u(e){await t.k.delete(`/api/import-tasks/${encodeURIComponent(e)}`),n()}e.s(["y",0,r,"I",0,s,"S",0,i,"x",0,u,"h",0,o,"B",0,function(){return t.k.get("/api/import-tasks")},"N",0,d,"c",0,a,"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,l])},905110,e=>{e.s(["z",0,50,"o",0,100,"P",0,1,"m",0,function(e,t=50){return"number"==typeof e&&e>=t/100}])},768339,e=>{var t=e.i(271645),r=e.i(116331);e.s(["a",0,function(e,n){var a;let[i,o]=(0,t.useState)(null),[s,l]=(0,t.useState)(!1),d=(0,t.useRef)(e),u=(0,t.useRef)(n);(0,t.useEffect)(()=>{d.current=e,u.current=n},[e,n]);let c=(0,t.useCallback)(async()=>{let e=d.current;if(e&&("u"<typeof document||"hidden"!==document.visibilityState))try{let t=await (0,r.h)(e);d.current===e&&(o(t),l(!1),u.current?.(t))}catch(t){t?.status===404&&d.current===e&&l(!0)}},[]);(0,t.useEffect)(()=>{if(!e)return;let t=setTimeout(c,0),n=(0,r.E)(c);return()=>{clearTimeout(t),n()}},[e,c]);let f="analyzing"===(a=i?.status)||"saving"===a;return(0,t.useEffect)(()=>{if(!e||!f)return;let t=setInterval(c,2500);return()=>clearInterval(t)},[e,f,c]),{task:i&&i.id===e?i:null,notFound:s,refresh:c,setTask:o}},"b",0,function(e=!0){let[n,a]=(0,t.useState)(null),[i,o]=(0,t.useState)(!1),s=(0,t.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{a(await (0,r.B)()),o(!1)}catch{o(!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 l=(n?.activeCount??0)>0;return(0,t.useEffect)(()=>{if(!e)return;let t=setInterval(s,l?2500:3e4);return()=>clearInterval(t)},[e,l,s]),{data:n,error:i,refresh:s}}])}])})();
@@ -0,0 +1,6 @@
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let a={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],711241)},399847,e=>{var t=e.i(456420);let a={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],399847)},13285,e=>{var t=e.i(456420);let a={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],13285)},615568,168148,e=>{var t=e.i(456420);let a={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],615568);var r=e.i(843476),i=e.i(271645),n=e.i(30030),l=e.i(248425),c=Object.defineProperty,d=(e,t)=>c(e,"name",{value:t,configurable:!0}),o="Progress",[m,u]=(0,n.f)(o),[p,f]=m(o),x=i.forwardRef(d(function(e,t){let{__scopeProgress:a,value:s=null,max:i,getValueLabel:n=v,...c}=e;(i||0===i)&&!y(i)&&console.error(N(`${i}`,"Progress"));let d=y(i)?i:100;null===s||k(s,d)||console.error(b(`${s}`,"Progress"));let o=k(s,d)?s:null,m=j(o)?n(o,d):void 0;return(0,r.jsx)(p,{scope:a,value:o,max:d,children:(0,r.jsx)(l.V.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":j(o)?o:void 0,"aria-valuetext":m,role:"progressbar","data-state":g(o,d),"data-value":o??void 0,"data-max":d,...c,ref:t})})},"Progress")),h=i.forwardRef(d(function(e,t){let{__scopeProgress:a,...s}=e,i=f("ProgressIndicator",a);return(0,r.jsx)(l.V.div,{"data-state":g(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...s,ref:t})},"ProgressIndicator"));function v(e,t){return`${Math.round(e/t*100)}%`}function g(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function j(e){return"number"==typeof e}function y(e){return j(e)&&!isNaN(e)&&e>0}function k(e,t){return j(e)&&!isNaN(e)&&e<=t&&e>=0}function N(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function b(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
+ - a positive number
3
+ - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
4
+ - \`null\` or \`undefined\` if the progress is indeterminate.
5
+
6
+ Defaulting to \`null\`.`}d(v,"defaultGetValueLabel"),d(g,"getProgressState"),d(j,"isNumber"),d(y,"isValidMaxNumber"),d(k,"isValidValueNumber"),d(N,"getInvalidMaxError"),d(b,"getInvalidValueError");var w=e.i(975157);let T=i.forwardRef(({className:e,value:t,...a},s)=>(0,r.jsx)(x,{ref:s,value:t,className:(0,w.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,r.jsx)(h,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));T.displayName=x.displayName,e.s(["f",0,T],168148)},419327,e=>{var t=e.i(843476),a=e.i(522016),s=e.i(980105),r=e.i(399847),i=e.i(551757),n=e.i(13285),l=e.i(632781),c=e.i(615568),d=e.i(487486),o=e.i(519455),m=e.i(111110),u=e.i(215519),p=e.i(306831),f=e.i(975157);let x={splitting:l.f,processing:l.f,draft:c.f,attention:r.f,failed:r.f,done:i.f};function h({batch:e}){let{t:s}=(0,m.b)(),{timeZone:r}=(0,u.M)(),i=x[e.phase],l="splitting"===e.phase||"processing"===e.phase,c="started"===e.status?e.counts.total:e.itemCount,{counts:v}=e,g="started"===e.status?[v.saved>0&&s.importBatch.counts.saved.replace("{count}",String(v.saved-v.duplicate)),v.duplicate>0&&s.importBatch.counts.duplicate.replace("{count}",String(v.duplicate)),v.review>0&&s.importBatch.counts.review.replace("{count}",String(v.review)),v.failed>0&&s.importBatch.counts.failed.replace("{count}",String(v.failed)),v.active>0&&s.importBatch.counts.active.replace("{count}",String(v.active))].filter(Boolean):[];return(0,t.jsxs)("div",{className:(0,f.f)("space-y-2 rounded-lg border p-3 text-sm",e.unread&&"border-primary/50 bg-primary/5"),"data-testid":"import-batch-card","data-phase":e.phase,children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(i,{className:(0,f.f)("mt-0.5 h-4 w-4 shrink-0",l&&"animate-spin text-primary","done"===e.phase&&"text-green-600",("failed"===e.phase||"attention"===e.phase)&&"text-destructive")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(n.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium",children:c>0?s.importBatch.batchOf.replace("{count}",String(c)):s.importBatch.title}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.importBatch.source[e.source]," · ",s.importBatch.phase[e.phase]]}),e.unread&&(0,t.jsx)(d.f,{children:s.importTasks.unread})]}),e.excerpt&&(0,t.jsx)("p",{className:"line-clamp-2 break-words text-muted-foreground",children:e.excerpt}),g.length>0&&(0,t.jsx)("p",{className:"text-xs",children:g.join(" · ")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s.importTasks.createdAt.replace("{time}",(0,p.r)(e.createdAt,"MM-dd HH:mm",r))})]})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(o.f,{asChild:!0,size:"sm",variant:"draft"===e.phase||"attention"===e.phase?"default":"outline",children:(0,t.jsx)(a.default,{href:`/import-batches/${e.id}`,children:s.importBatch.open})})})]})}var v=e.i(731335),g=e.i(912505),j=e.i(393842),y=e.i(86963),k=e.i(35209),N=e.i(579321),b=e.i(768339),w=e.i(927904);e.s(["default",0,function(){let{t:e}=(0,m.b)();(0,k.f)(e.importTasks.title);let{data:r,refresh:i}=(0,b.b)(),n=(0,N.f)(i),l=(0,w.f)((r?.activeCount??0)>0);return(0,t.jsxs)("main",{className:"mx-auto max-w-3xl space-y-4 px-4 py-6 md:px-8 md:py-8",children:[(0,t.jsx)(j.f,{backHref:"/",title:e.importTasks.title,description:e.importTasks.description}),r?0!==r.tasks.length||r.batches?.length?(0,t.jsx)("ul",{className:"space-y-3",children:[...(r.batches??[]).map(e=>({kind:"batch",createdAt:e.createdAt,batch:e})),...r.tasks.map(e=>({kind:"task",createdAt:e.createdAt,task:e}))].sort((e,t)=>t.createdAt.localeCompare(e.createdAt)).map(e=>"batch"===e.kind?(0,t.jsx)("li",{children:(0,t.jsx)(h,{batch:e.batch})},`batch-${e.batch.id}`):(0,t.jsx)("li",{children:(0,t.jsx)(v.f,{task:e.task,now:l,onReview:()=>n.openReview(e.task),onViewItem:()=>n.viewItem(e.task),onRetry:()=>n.retry(e.task),onDiscard:()=>n.discard(e.task)})},e.task.id))}):(0,t.jsx)(g.f,{icon:s.f,title:e.importTasks.empty,action:(0,t.jsx)(a.default,{href:"/",children:(0,t.jsx)(o.f,{children:e.importTasks.backHome})})}):(0,t.jsx)(y.f,{}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.importTasks.retentionHint})]})}],419327)},731335,579321,927904,e=>{var t=e.i(843476),a=e.i(399847),s=e.i(551757),r=e.i(456420);let i={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};i.node;let n=(0,r.f)(i);var l=e.i(632781),c=e.i(615568),d=e.i(487486),o=e.i(519455),m=e.i(168148),u=e.i(111110),p=e.i(215519),f=e.i(306831);let x=["read","convert","crop","compress","upload"],h=["receive","analyze","save"];function v(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(+(t<10))}s`;let a=Math.round(t);return`${Math.floor(a/60)}:${String(a%60).padStart(2,"0")}`}var g=e.i(975157);let j={analyzing:50,saving:90},y={analyzing:l.f,saving:l.f,review:c.f,saved:s.f,failed:a.f};e.s(["f",0,function({task:e,now:a,onReview:s,onViewItem:r,onRetry:i,onDiscard:l}){let{t:c}=(0,u.b)(),{timeZone:k}=(0,p.M)(),N=y[e.status],b="analyzing"===e.status||"saving"===e.status,w=c.errors,T=e.error?"string"==typeof w[e.error]?w[e.error]:e.error:null,I=function(e){let t=[];for(let a of x){let s=e?.client?.[a];"number"==typeof s&&t.push({stage:a,ms:s})}for(let a of h){let s=e?.server?.[a];"number"==typeof s&&t.push({stage:a,ms:s})}return t}(e.timings),z=b&&a?a-Date.parse(e.createdAt):null;return(0,t.jsxs)("div",{className:(0,g.f)("space-y-2 rounded-lg border p-3 text-sm",e.unread&&"border-primary/50 bg-primary/5"),"data-testid":"import-task-card","data-status":e.status,children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(N,{className:(0,g.f)("mt-0.5 h-4 w-4 shrink-0",b&&"animate-spin text-primary","saved"===e.status&&"text-green-600","failed"===e.status&&"text-destructive","review"===e.status&&"text-primary")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:c.importTasks.status[e.status]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:c.importTasks.mode[e.mode]}),e.unread&&(0,t.jsx)(d.f,{children:c.importTasks.unread})]}),b&&(0,t.jsx)(m.f,{value:j[e.status],"aria-label":c.importTasks.stageEstimate,"aria-valuetext":c.common.progress.estimated.replace("{percent}",String(j[e.status])),className:"h-1.5"}),e.excerpt&&(0,t.jsx)("p",{className:"break-words text-muted-foreground",children:e.excerpt}),"saved"===e.status&&!e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.importTasks.itemDeleted}),"saved"===e.status&&e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-green-700 dark:text-green-300",children:e.duplicate?c.importTasks.duplicateSaved:c.importTasks.savedTo.replace("{notebook}",e.notebookName||"-").replace("{id}",e.errorItemShortId||"-")}),T&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:T}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(n,{className:"h-3 w-3"}),c.importTasks.createdAt.replace("{time}",(0,f.r)(e.createdAt,"MM-dd HH:mm",k))]}),null!==z&&(0,t.jsx)("span",{children:c.importTasks.elapsed.replace("{time}",v(z))}),e.attempts>1&&(0,t.jsx)("span",{children:c.importTasks.attempts.replace("{count}",String(e.attempts))})]}),I.length>0&&(0,t.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums","aria-label":"timings",children:I.map(({stage:e,ms:a})=>(0,t.jsxs)("li",{children:[c.importTasks.timings[e]," ",v(a)]},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:["review"===e.status&&s&&(0,t.jsx)(o.f,{size:"sm",onClick:s,children:c.importTasks.continueReview}),"saved"===e.status&&e.errorItemId&&r&&(0,t.jsx)(o.f,{size:"sm",variant:"outline",onClick:r,children:c.importTasks.viewItem}),"failed"===e.status&&i&&(0,t.jsx)(o.f,{size:"sm",onClick:i,children:c.importTasks.retry}),"saving"!==e.status&&"saved"!==e.status&&l&&(0,t.jsx)(o.f,{size:"sm",variant:"ghost",onClick:l,children:c.importTasks.discard})]})]})}],731335);var k=e.i(618566),N=e.i(61425),b=e.i(294114),w=e.i(201276),T=e.i(116331);e.s(["f",0,function(e){let{t}=(0,u.b)(),a=(0,k.useRouter)(),s=e=>{e.unread&&(0,T.N)(e.id).catch(e=>w.V.warn("[ImportTasks]","Mark read failed",{error:e}))};return{openReview:e=>{s(e),a.push(`/import-tasks/${e.id}`)},viewItem:e=>{e.errorItemId&&(s(e),a.push(`/error-items/${e.errorItemId}`))},markRead:s,retry:async a=>{try{await (0,T.R)(a.id),b.c.info(t.importTasks.retried)}catch(e){b.c.error((0,N.f)(e,t))}e?.()},discard:async a=>{if(!await (0,b.u)(t.importTasks.discardConfirm))return!1;let s=!1;try{await (0,T.x)(a.id),b.c.success(t.importTasks.discarded),s=!0}catch(e){b.c.error((0,N.f)(e,t))}return e?.(),s}}}],579321);var I=e.i(271645);e.s(["f",0,function(e,t=1e3){let[a,s]=(0,I.useState)(()=>Date.now());return(0,I.useEffect)(()=>{if(!e)return;let a=setInterval(()=>s(Date.now()),t);return()=>clearInterval(a)},[e,t]),a}],927904)},590546,e=>{var t=e.i(843476),a=e.i(618566),s=e.i(519455),r=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:i}){let n=(0,a.useRouter)();return(0,t.jsx)(s.f,{variant:"ghost",size:"icon",onClick:()=>{n.push(e)},className:i,children:(0,t.jsx)(r.f,{className:"h-5 w-5"})})}])},912505,e=>{var t=e.i(843476),a=e.i(975157);e.s(["f",0,function({icon:e,title:s,description:r,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,a.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",n),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:s}),r&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:r}),i&&(0,t.jsx)("div",{className:"mt-5",children:i})]})}])},393842,e=>{var t=e.i(843476),a=e.i(590546),s=e.i(975157);e.s(["f",0,function({title:e,description:r,backHref:i,actions:n,titleAddon:l,className:c}){return(0,t.jsxs)("div",{className:(0,s.f)("flex items-start gap-3",c),children:[i&&(0,t.jsx)(a.f,{fallbackUrl:i,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),r&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:r})]}),n&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:n})]})}])},86963,e=>{var t=e.i(843476),a=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(a.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},61425,e=>{var t=e.i(303163);e.s(["f",0,function(e,a){let s=a.common?.messages?.analysisFailed||"Analysis failed, please try again",r=(0,t.d)(e);if(r){let e=a.errors??{};if(!(r in e))return r;let t=e[r];return"string"==typeof t?t:s}let i=(0,t.Z)(e);if(i.includes("fetch")||i.includes("network"))return a.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${s} (${t})`}return s}])},35209,e=>{var t=e.i(271645),a=e.i(111110);e.s(["f",0,function(...e){let{t:s}=(0,a.b)(),r=[s.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=r},[r])}])}])})();