@jswork/react-questkit 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -355,6 +355,7 @@ function QuestShell({
355
355
  instructionVariant = "card",
356
356
  footer,
357
357
  feedback,
358
+ bare = false,
358
359
  dataQuest,
359
360
  className,
360
361
  children
@@ -364,28 +365,269 @@ function QuestShell({
364
365
  "div",
365
366
  {
366
367
  className: classNames(
367
- "rqk-shell relative isolate flex h-full w-full min-h-0 flex-col overflow-hidden bg-[var(--rqk-screen-bg)]",
368
+ "rqk-shell relative isolate flex w-full min-h-0 flex-col",
369
+ bare && "rqk-bare h-auto overflow-visible",
370
+ !bare && "h-full overflow-hidden",
371
+ "bg-[var(--rqk-screen-bg)]",
368
372
  className
369
373
  ),
370
374
  "data-component": "react-questkit",
371
375
  "data-mode": mode,
372
376
  "data-quest": dataQuest,
373
377
  children: [
374
- /* @__PURE__ */ jsxs3("div", { className: "rqk-body relative flex min-h-0 flex-1 flex-col", children: [
375
- /* @__PURE__ */ jsxs3("div", { className: "rqk-page", children: [
376
- /* @__PURE__ */ jsx4(Progress, { value: index, total }),
377
- /* @__PURE__ */ jsx4(Instruction, { variant: instructionVariant, children: instruction }),
378
- children
379
- ] }),
380
- feedback ? /* @__PURE__ */ jsx4("div", { className: "rqk-feedback-wrap pointer-events-none absolute inset-x-5 bottom-24 z-[4] [&>*]:pointer-events-auto", children: feedback }) : null,
381
- /* @__PURE__ */ jsx4(Toast, { align: toast == null ? void 0 : toast.align, children: toast == null ? void 0 : toast.message })
382
- ] }),
383
- footer ? /* @__PURE__ */ jsx4("div", { className: "rqk-footer absolute inset-x-0 bottom-0 z-[5] [background:linear-gradient(180deg,rgba(246,248,252,0)_0%,rgba(246,248,252,0.9)_32%,var(--rqk-screen-bg)_66%)]", children: footer }) : null
378
+ /* @__PURE__ */ jsxs3(
379
+ "div",
380
+ {
381
+ className: classNames(
382
+ "rqk-body relative flex min-h-0 flex-col",
383
+ !bare && "flex-1"
384
+ ),
385
+ children: [
386
+ /* @__PURE__ */ jsxs3("div", { className: "rqk-page", children: [
387
+ !bare ? /* @__PURE__ */ jsx4(Progress, { value: index, total }) : null,
388
+ !bare ? /* @__PURE__ */ jsx4(Instruction, { variant: instructionVariant, children: instruction }) : null,
389
+ children
390
+ ] }),
391
+ feedback ? /* @__PURE__ */ jsx4("div", { className: "rqk-feedback-wrap pointer-events-none absolute inset-x-5 bottom-24 z-[4] [&>*]:pointer-events-auto", children: feedback }) : null,
392
+ /* @__PURE__ */ jsx4(Toast, { align: toast == null ? void 0 : toast.align, children: toast == null ? void 0 : toast.message })
393
+ ]
394
+ }
395
+ ),
396
+ footer && !bare ? /* @__PURE__ */ jsx4("div", { className: "rqk-footer absolute inset-x-0 bottom-0 z-[5] [background:linear-gradient(180deg,rgba(246,248,252,0)_0%,rgba(246,248,252,0.9)_32%,var(--rqk-screen-bg)_66%)]", children: footer }) : null
384
397
  ]
385
398
  }
386
399
  ) });
387
400
  }
388
401
 
402
+ // src/art/illustrations.tsx
403
+ import { useId } from "react";
404
+
405
+ // src/assets/svg/art-apple.svg
406
+ var art_apple_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#FF8A8A"></stop><stop offset="1" stop-color="#E5484D"></stop></linearGradient></defs><circle cx="57" cy="66" r="32" fill="url(#rqk-grad)"></circle><circle cx="72" cy="70" r="25" fill="url(#rqk-grad)" opacity="0.92"></circle><ellipse cx="47" cy="52" rx="7" ry="10" fill="#FFFFFF" opacity="0.4" transform="rotate(-24 47 52)"></ellipse><path d="M64 36c0-6 3-10 8-12" stroke="#8B5E34" stroke-width="3" stroke-linecap="round" fill="none"></path><path d="M68 34c2-8 12-11 20-7-2 8-12 11-20 7z" fill="#3ED598"></path></svg>\n';
407
+
408
+ // src/assets/svg/art-balloon.svg
409
+ var art_balloon_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0.2" y1="0" x2="0.8" y2="1"><stop offset="0" stop-color="#7FB0FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient></defs><ellipse cx="60" cy="50" rx="28" ry="32" fill="url(#rqk-grad)"></ellipse><ellipse cx="50" cy="38" rx="7" ry="9" fill="#FFFFFF" opacity="0.45"></ellipse><path d="M60 82l3 6h-6z" fill="#0147CC"></path><path d="M60 88c8 6-8 10 0 16s-8 8 0 12" stroke="#0147CC" stroke-width="2.2" fill="none" stroke-linecap="round"></path><circle cx="94" cy="30" r="4" fill="#FFD166"></circle><circle cx="22" cy="86" r="3" fill="#7C5CFF" opacity="0.6"></circle></svg>\n';
410
+
411
+ // src/assets/svg/art-books.svg
412
+ var art_books_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><rect x="20" y="80" width="80" height="16" rx="5" fill="#0158FD"></rect><rect x="26" y="62" width="68" height="16" rx="5" fill="#3ED598"></rect><rect x="22" y="44" width="72" height="16" rx="5" fill="#FFB020"></rect><rect x="32" y="26" width="58" height="16" rx="5" fill="#7C5CFF"></rect><path d="M34 34h54M28 52h60M32 70h56M26 88h68" stroke="#FFFFFF" stroke-width="2.4" opacity="0.35" stroke-linecap="round"></path><circle cx="88" cy="22" r="5" fill="#9CBFFF" opacity="0.7"></circle></svg>\n';
413
+
414
+ // src/assets/svg/art-cat.svg
415
+ var art_cat_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFC48A"></stop><stop offset="1" stop-color="#F09A4F"></stop></linearGradient></defs><path d="M36 42l-6-20 18 8zM84 42l6-20-18 8z" fill="url(#rqk-grad)"></path><circle cx="60" cy="66" r="34" fill="url(#rqk-grad)"></circle><ellipse cx="60" cy="82" rx="18" ry="13" fill="#FFF3E4"></ellipse><circle cx="48" cy="62" r="3.4" fill="#5B3A22"></circle><circle cx="72" cy="62" r="3.4" fill="#5B3A22"></circle><path d="M55 74h10l-5 5z" fill="#F08A8A"></path><path d="M56 83c1.6 1.8 6.4 1.8 8 0" stroke="#5B3A22" stroke-width="1.8" fill="none"></path><path d="M22 68h14M24 76h12M98 68h-14M96 76h-12" stroke="#E7C39F" stroke-width="2" stroke-linecap="round"></path></svg>\n';
416
+
417
+ // src/assets/svg/art-coffee.svg
418
+ var art_coffee_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFFFFF"></stop><stop offset="1" stop-color="#E7EEFA"></stop></linearGradient></defs><ellipse cx="58" cy="90" rx="34" ry="6" fill="#DCE6F7"></ellipse><path d="M30 50h50l-5 34c-.6 4-4 7-8 7H43c-4 0-7.4-3-8-7z" fill="url(#rqk-grad)"></path><path d="M80 58h6a9 9 0 010 18h-3" stroke="#C3D2E8" stroke-width="4" fill="none"></path><rect x="34" y="58" width="42" height="14" rx="4" fill="#D6E2F5"></rect><path d="M48 42c-4-7 4-9 0-16M62 42c-4-7 4-9 0-16" stroke="#9CBFFF" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.8"></path><circle cx="88" cy="34" r="4" fill="#FFB020" opacity="0.7"></circle></svg>\n';
419
+
420
+ // src/assets/svg/art-headphones.svg
421
+ var art_headphones_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 186" fill="none" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad-a" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#5C96FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient><linearGradient id="rqk-grad-b" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#3D7BFF"></stop><stop offset="1" stop-color="#013AA6"></stop></linearGradient></defs><ellipse cx="120" cy="162" rx="48" ry="8" fill="#0B1220" opacity="0.07"></ellipse><path d="M62 112V94c0-32 26-56 58-56s58 24 58 56v18" stroke="url(#rqk-grad-a)" stroke-width="15" stroke-linecap="round"></path><path d="M62 112V94c0-32 26-56 58-56s58 24 58 56v18" stroke="#fff" stroke-width="4" stroke-linecap="round" opacity="0.35"></path><rect x="46" y="102" width="34" height="52" rx="17" fill="url(#rqk-grad-b)"></rect><rect x="160" y="102" width="34" height="52" rx="17" fill="url(#rqk-grad-b)"></rect><rect x="54" y="112" width="18" height="32" rx="9" fill="#fff" opacity="0.25"></rect><rect x="168" y="112" width="18" height="32" rx="9" fill="#fff" opacity="0.25"></rect><g stroke="#0158FD" stroke-width="3" stroke-linecap="round" opacity="0.5"><path d="M198 74c8 6 12 14 12 22M206 62c12 9 18 21 18 34"></path></g></svg>\n';
422
+
423
+ // src/assets/svg/art-kid.svg
424
+ var art_kid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4F8BFF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient></defs><circle cx="60" cy="58" r="46" fill="#EAF1FF"></circle><path d="M22 104c0-15 17-24 38-24s38 9 38 24z" fill="url(#rqk-grad)"></path><circle cx="60" cy="52" r="25" fill="#FFD3B6"></circle><path d="M36 47c0-13 10-21 24-21s24 8 24 21c-6-4-13-6-24-6s-18 2-24 6z" fill="#1F2A44"></path><circle cx="51" cy="53" r="2.6" fill="#1F2A44"></circle><circle cx="69" cy="53" r="2.6" fill="#1F2A44"></circle><path d="M54 62c2.6 3 9.4 3 12 0" stroke="#C96A5A" stroke-width="2.4" stroke-linecap="round" fill="none"></path><circle cx="43" cy="60" r="3.4" fill="#FFB4A8" opacity="0.6"></circle><circle cx="77" cy="60" r="3.4" fill="#FFB4A8" opacity="0.6"></circle></svg>\n';
425
+
426
+ // src/assets/svg/art-screen.svg
427
+ var art_screen_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 186" fill="none" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad-play" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#5C96FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient><linearGradient id="rqk-grad-screen" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#EAF2FF"></stop><stop offset="1" stop-color="#C6DBFF"></stop></linearGradient></defs><ellipse cx="120" cy="166" rx="52" ry="8" fill="#0B1220" opacity="0.07"></ellipse><rect x="42" y="32" width="156" height="104" rx="16" fill="url(#rqk-grad-screen)" stroke="#B9D0FF" stroke-width="2"></rect><rect x="52" y="42" width="136" height="84" rx="10" fill="#0B1220" opacity="0.06"></rect><circle cx="120" cy="84" r="26" fill="url(#rqk-grad-play)"></circle><path d="M113 73l20 11-20 11V73z" fill="#fff"></path><rect x="106" y="136" width="28" height="16" fill="#C6DBFF"></rect><rect x="84" y="150" width="72" height="8" rx="4" fill="#B9D0FF"></rect><g fill="#0158FD" opacity="0.5"><circle cx="62" cy="52" r="2.6"></circle><circle cx="70" cy="52" r="2.6"></circle><circle cx="78" cy="52" r="2.6"></circle></g></svg>\n';
428
+
429
+ // src/assets/svg/art-speech.svg
430
+ var art_speech_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#EAF1FF"></stop><stop offset="1" stop-color="#C6DBFF"></stop></linearGradient></defs><path d="M24 34h72a8 8 0 018 8v34a8 8 0 01-8 8H60l-16 14v-14H24a8 8 0 01-8-8V42a8 8 0 018-8z" fill="url(#rqk-grad)"></path><rect x="38" y="52" width="7" height="18" rx="3.5" fill="#0158FD"></rect><rect x="51" y="44" width="7" height="34" rx="3.5" fill="#4F8BFF"></rect><rect x="64" y="48" width="7" height="26" rx="3.5" fill="#4F8BFF"></rect><rect x="77" y="58" width="7" height="10" rx="3.5" fill="#9CBFFF"></rect></svg>\n';
431
+
432
+ // src/assets/svg/art-trophy.svg
433
+ var art_trophy_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#FFE29A"></stop><stop offset="0.55" stop-color="#FFC24B"></stop><stop offset="1" stop-color="#E08A00"></stop></linearGradient></defs><circle cx="60" cy="54" r="42" fill="#FFF7E6"></circle><path d="M38 34h44v18c0 14-9 22-22 22s-22-8-22-22z" fill="url(#rqk-grad)"></path><path d="M38 40H28v4c0 9 6 15 14 15M82 40h10v4c0 9-6 15-14 15" stroke="#E08A00" stroke-width="3.4" fill="none"></path><rect x="52" y="72" width="16" height="10" fill="#F0A600"></rect><rect x="44" y="82" width="32" height="9" rx="3" fill="#E08A00"></rect><path d="M60 44l3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z" fill="#FFF7E6" opacity="0.9"></path><circle cx="90" cy="30" r="3.4" fill="#FFB020" opacity="0.8"></circle><circle cx="26" cy="76" r="2.6" fill="#7C5CFF" opacity="0.6"></circle></svg>\n';
434
+
435
+ // src/art/illustrations.tsx
436
+ import { jsx as jsx5 } from "react/jsx-runtime";
437
+ var ART_SOURCES = {
438
+ kid: art_kid_default,
439
+ balloon: art_balloon_default,
440
+ apple: art_apple_default,
441
+ coffee: art_coffee_default,
442
+ cat: art_cat_default,
443
+ books: art_books_default,
444
+ headphones: art_headphones_default,
445
+ screen: art_screen_default,
446
+ trophy: art_trophy_default,
447
+ speech: art_speech_default
448
+ };
449
+ function Art({ name, className, size }) {
450
+ var _a;
451
+ const unique = useId().replace(/[^a-zA-Z0-9]/g, "");
452
+ const source = ((_a = ART_SOURCES[name]) != null ? _a : art_speech_default).replace(
453
+ /rqk-grad/g,
454
+ `rqk-grad-${unique}`
455
+ );
456
+ return /* @__PURE__ */ jsx5(
457
+ "span",
458
+ {
459
+ className: ["rqk-art", className].filter(Boolean).join(" "),
460
+ style: size ? { width: size, height: size } : void 0,
461
+ "aria-hidden": true,
462
+ dangerouslySetInnerHTML: { __html: source }
463
+ }
464
+ );
465
+ }
466
+
467
+ // src/core/quest-config.tsx
468
+ import { createContext as createContext2, useContext as useContext2, useMemo as useMemo2 } from "react";
469
+ import { jsx as jsx6 } from "react/jsx-runtime";
470
+ var defaultQuestLabels = {
471
+ submit: "\u63D0\u4EA4\u7B54\u6848",
472
+ submitCount: "\u63D0\u4EA4\u7B54\u6848",
473
+ retry: "\u91CD\u8BD5\u4E00\u6B21",
474
+ next: "\u5207\u9898",
475
+ prev: "\u4E0A\u4E00\u9898",
476
+ back: "\u8FD4\u56DE",
477
+ answer: "\u6B63\u786E\u7B54\u6848",
478
+ analysis: "\u89E3\u6790",
479
+ correctAll: "\u5168\u90E8\u7B54\u5BF9",
480
+ wrongAnswer: "\u7B54\u6848\u8FD8\u4E0D\u6B63\u786E",
481
+ tapToRead: "\u70B9\u51FB\u6717\u8BFB",
482
+ readAloud: "\u8303\u8BFB",
483
+ recording: "\u5F55\u97F3\u4E2D",
484
+ scoring: "\u8BC4\u5206\u4E2D",
485
+ releaseToSend: "\u677E\u624B\u5373\u63D0\u4EA4",
486
+ holdToRecord: "\u70B9\u51FB\u5F00\u59CB\u5F55\u97F3",
487
+ tapToFollow: "\u70B9\u51FB\u8DDF\u8BFB",
488
+ recordingHint: "\u6B63\u5728\u5F55\u97F3 \xB7 \u70B9\u51FB\u7ED3\u675F",
489
+ rescore: "\u91CD\u65B0\u5F55\u97F3",
490
+ submitted: "\u5DF2\u63D0\u4EA4 \xB7 \u53EF\u91CD\u5F55",
491
+ noiseHint: "\u97F3\u8D28\u4E0D\u5408\u683C\uFF1A\u4E0D\u51FA\u5206\uFF0C\u8BF7\u6362\u5B89\u9759\u73AF\u5883\u91CD\u8BD5",
492
+ againHint: "\u672A\u83B7\u53D6\u5206\u6570\uFF0C\u8BF7\u518D\u8BD5\u4E00\u6B21",
493
+ attemptsLeft: "\u8FD8\u6709 {n} \u6B21\u5F55\u97F3\u673A\u4F1A",
494
+ attemptsUsedUp: "\u673A\u4F1A\u5DF2\u7528\u5B8C",
495
+ play: "\u64AD\u653E",
496
+ pause: "\u6682\u505C",
497
+ replay: "\u518D\u542C\u4E00\u904D",
498
+ loop: "\u5FAA\u73AF",
499
+ speed: "\u500D\u901F",
500
+ finish: "\u5B8C\u6210\u5E76\u8FD4\u56DE",
501
+ submitAndStats: "\u63D0\u4EA4\u5E76\u67E5\u770B\u7EDF\u8BA1",
502
+ effectivePlay: "\u6709\u6548\u64AD\u653E",
503
+ totalTime: "\u603B\u65F6\u957F",
504
+ reading: "\u9605\u8BFB",
505
+ expand: "\u5C55\u5F00\u5168\u6587",
506
+ collapse: "\u6536\u8D77",
507
+ notAnswered: "\u672A\u4F5C\u7B54",
508
+ fullscreen: "\u5168\u5C4F"
509
+ };
510
+ var QuestConfigContext = createContext2({});
511
+ function QuestConfigProvider({
512
+ config,
513
+ children
514
+ }) {
515
+ const parent = useContext2(QuestConfigContext);
516
+ const value = useMemo2(
517
+ () => {
518
+ var _a, _b;
519
+ return {
520
+ sound: (_a = config == null ? void 0 : config.sound) != null ? _a : parent.sound,
521
+ speakText: (_b = config == null ? void 0 : config.speakText) != null ? _b : parent.speakText,
522
+ labels: __spreadValues(__spreadValues({}, parent.labels), config == null ? void 0 : config.labels)
523
+ };
524
+ },
525
+ [config, parent]
526
+ );
527
+ return /* @__PURE__ */ jsx6(QuestConfigContext.Provider, { value, children });
528
+ }
529
+ function useQuestConfig() {
530
+ return useContext2(QuestConfigContext);
531
+ }
532
+ function useQuestLabels(override) {
533
+ const config = useQuestConfig();
534
+ return useMemo2(
535
+ () => __spreadValues(__spreadValues(__spreadValues({}, defaultQuestLabels), config.labels), override),
536
+ [config.labels, override]
537
+ );
538
+ }
539
+
540
+ // src/primitives/action-bar.tsx
541
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
542
+ function ActionBar({ actions, index = 1, total, onPrev, className }) {
543
+ const labels = useQuestLabels();
544
+ const autoPrev = Boolean(onPrev) && index > 1;
545
+ const isLast = total !== void 0 && total > 0 && index >= total;
546
+ const resolved = isLast ? actions.map(
547
+ (action) => action.key === "next" ? __spreadProps(__spreadValues({}, action), { label: labels.finish }) : action
548
+ ) : actions;
549
+ const body = autoPrev ? resolved.filter((action) => action.key !== "prev") : resolved;
550
+ const visibleActions = autoPrev ? [
551
+ {
552
+ key: "prev",
553
+ label: labels.prev,
554
+ variant: "ghost",
555
+ onClick: onPrev,
556
+ ariaLabel: labels.prev
557
+ },
558
+ ...body
559
+ ] : body;
560
+ if (!visibleActions.length) return null;
561
+ return /* @__PURE__ */ jsx7("div", { className: classNames("rqk-action-bar flex gap-2.5", className), children: visibleActions.map((action) => /* @__PURE__ */ jsxs4(
562
+ "button",
563
+ {
564
+ type: "button",
565
+ className: classNames(
566
+ "rqk-action ease-rqk-spring inline-flex h-[52px] min-w-0 items-center justify-center gap-1.5 rounded-[16px] px-[18px] text-[17px] font-semibold transition-[transform,opacity,background] duration-200 active:scale-[0.98] disabled:opacity-45 disabled:active:scale-100",
567
+ action.variant === "ghost" ? "rqk-action-ghost text-rqk-ink-2 flex-none bg-white" : "rqk-action-primary disabled:bg-rqk-blue-300 flex-1 bg-[linear-gradient(180deg,#2c74ff,var(--rqk-blue-500)_70%)] text-white"
568
+ ),
569
+ onClick: action.onClick,
570
+ disabled: action.disabled,
571
+ "aria-label": action.ariaLabel,
572
+ children: [
573
+ action.icon ? /* @__PURE__ */ jsx7("span", { className: "rqk-action-icon inline-flex items-center justify-center", children: action.icon }) : null,
574
+ /* @__PURE__ */ jsx7("span", { className: "rqk-action-label", children: action.label })
575
+ ]
576
+ },
577
+ action.key
578
+ )) });
579
+ }
580
+
581
+ // src/primitives/quest-complete.tsx
582
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
583
+ function QuestComplete({
584
+ total = 1,
585
+ index,
586
+ title,
587
+ subtitle,
588
+ art = "trophy",
589
+ stats,
590
+ onFinish,
591
+ finishLabel,
592
+ className
593
+ }) {
594
+ const labels = useQuestLabels();
595
+ const current = index != null ? index : total;
596
+ const statItems = stats != null ? stats : [
597
+ { value: total, unit: "\u9898", label: "\u5B8C\u6210\u9898\u76EE" },
598
+ { value: 100, unit: "%", label: "\u5B8C\u6210\u5EA6" }
599
+ ];
600
+ const actions = [];
601
+ if (onFinish) {
602
+ actions.push({
603
+ key: "finish",
604
+ label: finishLabel != null ? finishLabel : labels.finish,
605
+ onClick: onFinish
606
+ });
607
+ }
608
+ return /* @__PURE__ */ jsx8(
609
+ QuestShell,
610
+ {
611
+ index: current,
612
+ total,
613
+ className: classNames("rqk-complete", className),
614
+ footer: actions.length ? /* @__PURE__ */ jsx8(ActionBar, { actions }) : void 0,
615
+ children: /* @__PURE__ */ jsxs5("div", { className: "rqk-complete-body", children: [
616
+ /* @__PURE__ */ jsx8("div", { className: "rqk-complete-art", "aria-hidden": true, children: /* @__PURE__ */ jsx8(Art, { name: art }) }),
617
+ /* @__PURE__ */ jsx8("div", { className: "rqk-complete-title", role: "heading", "aria-level": 1, children: title != null ? title : "\u9898\u5305\u5B8C\u6210\u5566" }),
618
+ /* @__PURE__ */ jsx8("div", { className: "rqk-complete-subtitle", children: subtitle != null ? subtitle : `\u5171 ${total} \u9053\u9898\u5DF2\u5168\u90E8\u5B8C\u6210` }),
619
+ statItems.length ? /* @__PURE__ */ jsx8("div", { className: "rqk-complete-stats", "aria-label": "\u9898\u5305\u7EDF\u8BA1", children: statItems.map((stat, statIndex) => /* @__PURE__ */ jsxs5("div", { className: "rqk-complete-stat", children: [
620
+ /* @__PURE__ */ jsxs5("div", { className: "rqk-complete-stat-value", children: [
621
+ stat.value,
622
+ stat.unit ? /* @__PURE__ */ jsx8("small", { children: stat.unit }) : null
623
+ ] }),
624
+ /* @__PURE__ */ jsx8("div", { className: "rqk-complete-stat-label", children: stat.label })
625
+ ] }, statIndex)) }) : null
626
+ ] })
627
+ }
628
+ );
629
+ }
630
+
389
631
  // src/core/icons.tsx
390
632
  import classnames2 from "classnames";
391
633
 
@@ -420,7 +662,7 @@ var icon_play_default = '<svg width="22" height="22" viewBox="0 0 24 24" fill="n
420
662
  var icon_speaker_default = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true"><path d="M4 9.6h3.2L12 5.4v13.2L7.2 14.4H4z" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"></path><path d="M15.6 9.2a4 4 0 010 5.6M18.2 6.8a7.4 7.4 0 010 10.4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"></path></svg>\n';
421
663
 
422
664
  // src/core/icons.tsx
423
- import { jsx as jsx5 } from "react/jsx-runtime";
665
+ import { jsx as jsx9 } from "react/jsx-runtime";
424
666
  function SvgIcon(_a) {
425
667
  var _b = _a, {
426
668
  source,
@@ -434,7 +676,7 @@ function SvgIcon(_a) {
434
676
  "style"
435
677
  ]);
436
678
  const html = size ? source.replace("<svg", '<svg style="width:100%;height:100%"') : source;
437
- return /* @__PURE__ */ jsx5(
679
+ return /* @__PURE__ */ jsx9(
438
680
  "span",
439
681
  __spreadProps(__spreadValues({
440
682
  className: classnames2("rqk-icon", className),
@@ -446,38 +688,38 @@ function SvgIcon(_a) {
446
688
  );
447
689
  }
448
690
  function CheckIcon(props) {
449
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_check_default }, props));
691
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_check_default }, props));
450
692
  }
451
693
  function CrossIcon(props) {
452
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_cross_default }, props));
694
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_cross_default }, props));
453
695
  }
454
696
  function AlertIcon(props) {
455
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_alert_default }, props));
697
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_alert_default }, props));
456
698
  }
457
699
  function PlayIcon(props) {
458
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_play_default }, props));
700
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_play_default }, props));
459
701
  }
460
702
  function PauseIcon(props) {
461
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_pause_default }, props));
703
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_pause_default }, props));
462
704
  }
463
705
  function MicIcon(props) {
464
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_mic_default }, props));
706
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_mic_default }, props));
465
707
  }
466
708
  function SpeakerIcon(props) {
467
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_speaker_default }, props));
709
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_speaker_default }, props));
468
710
  }
469
711
  function LoopIcon(props) {
470
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_loop_default }, props));
712
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_loop_default }, props));
471
713
  }
472
714
  function FullscreenIcon(props) {
473
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_fullscreen_default }, props));
715
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_fullscreen_default }, props));
474
716
  }
475
717
  function KeyboardIcon(props) {
476
- return /* @__PURE__ */ jsx5(SvgIcon, __spreadValues({ source: icon_keyboard_default }, props));
718
+ return /* @__PURE__ */ jsx9(SvgIcon, __spreadValues({ source: icon_keyboard_default }, props));
477
719
  }
478
720
 
479
721
  // src/primitives/option-item.tsx
480
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
722
+ import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
481
723
  function OptionItem({
482
724
  label,
483
725
  children,
@@ -491,7 +733,7 @@ function OptionItem({
491
733
  className
492
734
  }) {
493
735
  const marked = state === "correct" || state === "wrong";
494
- return /* @__PURE__ */ jsxs4(
736
+ return /* @__PURE__ */ jsxs6(
495
737
  "button",
496
738
  {
497
739
  type: "button",
@@ -505,21 +747,21 @@ function OptionItem({
505
747
  disabled: disabled || state === "disabled",
506
748
  "aria-pressed": state === "selected",
507
749
  children: [
508
- /* @__PURE__ */ jsx6("span", { className: "rqk-option-marker", children: label }),
509
- media ? /* @__PURE__ */ jsx6("span", { className: "rqk-option-media", children: media }) : null,
510
- /* @__PURE__ */ jsxs4("span", { className: "rqk-option-content", children: [
511
- /* @__PURE__ */ jsx6("span", { className: "rqk-option-text", children }),
512
- sub ? /* @__PURE__ */ jsx6("span", { className: "rqk-option-sub", children: sub }) : null
750
+ /* @__PURE__ */ jsx10("span", { className: "rqk-option-marker", children: label }),
751
+ media ? /* @__PURE__ */ jsx10("span", { className: "rqk-option-media", children: media }) : null,
752
+ /* @__PURE__ */ jsxs6("span", { className: "rqk-option-content", children: [
753
+ /* @__PURE__ */ jsx10("span", { className: "rqk-option-text", children }),
754
+ sub ? /* @__PURE__ */ jsx10("span", { className: "rqk-option-sub", children: sub }) : null
513
755
  ] }),
514
- audioIndicator ? /* @__PURE__ */ jsx6("span", { className: "rqk-option-audio", "aria-hidden": true, children: /* @__PURE__ */ jsx6(SpeakerIcon, { size: 16 }) }) : null,
515
- marked ? /* @__PURE__ */ jsx6("span", { className: "rqk-option-status", "aria-hidden": true, children: state === "correct" ? /* @__PURE__ */ jsx6(CheckIcon, { size: 18 }) : /* @__PURE__ */ jsx6(CrossIcon, { size: 18 }) }) : null
756
+ audioIndicator ? /* @__PURE__ */ jsx10("span", { className: "rqk-option-audio", "aria-hidden": true, children: /* @__PURE__ */ jsx10(SpeakerIcon, { size: 16 }) }) : null,
757
+ marked ? /* @__PURE__ */ jsx10("span", { className: "rqk-option-status", "aria-hidden": true, children: state === "correct" ? /* @__PURE__ */ jsx10(CheckIcon, { size: 18 }) : /* @__PURE__ */ jsx10(CrossIcon, { size: 18 }) }) : null
516
758
  ]
517
759
  }
518
760
  );
519
761
  }
520
762
 
521
763
  // src/primitives/star-rating.tsx
522
- import { jsx as jsx7 } from "react/jsx-runtime";
764
+ import { jsx as jsx11 } from "react/jsx-runtime";
523
765
  function StarRating({
524
766
  value,
525
767
  size = 18,
@@ -528,13 +770,13 @@ function StarRating({
528
770
  label
529
771
  }) {
530
772
  const count = Math.max(0, Math.min(3, value));
531
- return /* @__PURE__ */ jsx7(
773
+ return /* @__PURE__ */ jsx11(
532
774
  "span",
533
775
  {
534
776
  className: classNames("rqk-stars", className),
535
777
  role: "img",
536
778
  "aria-label": label != null ? label : `${count} / 3`,
537
- children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx7(
779
+ children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx11(
538
780
  "span",
539
781
  {
540
782
  className: classNames(
@@ -543,7 +785,7 @@ function StarRating({
543
785
  animate && index < count && "rqk-star-animate"
544
786
  ),
545
787
  style: { animationDelay: `${index * 0.08}s`, fontSize: `${size}px` },
546
- children: /* @__PURE__ */ jsx7("span", { className: "rqk-star-glyph", "aria-hidden": "true", children: "\u2605" })
788
+ children: /* @__PURE__ */ jsx11("span", { className: "rqk-star-glyph", "aria-hidden": "true", children: "\u2605" })
547
789
  },
548
790
  index
549
791
  ))
@@ -552,11 +794,11 @@ function StarRating({
552
794
  }
553
795
 
554
796
  // src/primitives/feedback-sheet.tsx
555
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
797
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
556
798
  var TONE_ICONS = {
557
- ok: /* @__PURE__ */ jsx8(CheckIcon, { size: 18 }),
558
- bad: /* @__PURE__ */ jsx8(CrossIcon, { size: 16 }),
559
- warn: /* @__PURE__ */ jsx8(AlertIcon, { size: 18 })
799
+ ok: /* @__PURE__ */ jsx12(CheckIcon, { size: 18 }),
800
+ bad: /* @__PURE__ */ jsx12(CrossIcon, { size: 16 }),
801
+ warn: /* @__PURE__ */ jsx12(AlertIcon, { size: 18 })
560
802
  };
561
803
  function FeedbackSheet({
562
804
  tone = "ok",
@@ -569,28 +811,28 @@ function FeedbackSheet({
569
811
  analysisLabel = "\u89E3\u6790",
570
812
  className
571
813
  }) {
572
- return /* @__PURE__ */ jsxs5(
814
+ return /* @__PURE__ */ jsxs7(
573
815
  "div",
574
816
  {
575
817
  className: classNames("rqk-feedback", `rqk-feedback-${tone}`, className),
576
818
  role: "status",
577
819
  "aria-live": "polite",
578
820
  children: [
579
- /* @__PURE__ */ jsxs5("div", { className: "rqk-feedback-head", children: [
580
- /* @__PURE__ */ jsx8("span", { className: "rqk-feedback-icon", "aria-hidden": true, children: TONE_ICONS[tone] }),
581
- /* @__PURE__ */ jsxs5("div", { className: "rqk-feedback-copy", children: [
582
- /* @__PURE__ */ jsx8("div", { className: "rqk-feedback-title", children: title }),
583
- detail ? /* @__PURE__ */ jsx8("div", { className: "rqk-feedback-detail", children: detail }) : null
821
+ /* @__PURE__ */ jsxs7("div", { className: "rqk-feedback-head", children: [
822
+ /* @__PURE__ */ jsx12("span", { className: "rqk-feedback-icon", "aria-hidden": true, children: TONE_ICONS[tone] }),
823
+ /* @__PURE__ */ jsxs7("div", { className: "rqk-feedback-copy", children: [
824
+ /* @__PURE__ */ jsx12("div", { className: "rqk-feedback-title", children: title }),
825
+ detail ? /* @__PURE__ */ jsx12("div", { className: "rqk-feedback-detail", children: detail }) : null
584
826
  ] }),
585
- typeof stars === "number" ? /* @__PURE__ */ jsx8(StarRating, { value: stars, size: 16, animate: true }) : null
827
+ typeof stars === "number" ? /* @__PURE__ */ jsx12(StarRating, { value: stars, size: 16, animate: true }) : null
586
828
  ] }),
587
- answer ? /* @__PURE__ */ jsxs5("div", { className: "rqk-feedback-answer", children: [
588
- /* @__PURE__ */ jsx8("span", { className: "rqk-feedback-answer-label", children: answerLabel }),
589
- /* @__PURE__ */ jsx8("span", { className: "rqk-feedback-answer-value", children: answer })
829
+ answer ? /* @__PURE__ */ jsxs7("div", { className: "rqk-feedback-answer", children: [
830
+ /* @__PURE__ */ jsx12("span", { className: "rqk-feedback-answer-label", children: answerLabel }),
831
+ /* @__PURE__ */ jsx12("span", { className: "rqk-feedback-answer-value", children: answer })
590
832
  ] }) : null,
591
- analysis ? /* @__PURE__ */ jsxs5("div", { className: "rqk-feedback-analysis", children: [
592
- /* @__PURE__ */ jsx8("span", { className: "rqk-feedback-analysis-label", children: analysisLabel }),
593
- /* @__PURE__ */ jsx8("div", { children: analysis })
833
+ analysis ? /* @__PURE__ */ jsxs7("div", { className: "rqk-feedback-analysis", children: [
834
+ /* @__PURE__ */ jsx12("span", { className: "rqk-feedback-analysis-label", children: analysisLabel }),
835
+ /* @__PURE__ */ jsx12("div", { children: analysis })
594
836
  ] }) : null
595
837
  ]
596
838
  }
@@ -599,7 +841,7 @@ function FeedbackSheet({
599
841
 
600
842
  // src/primitives/segmented-control.tsx
601
843
  import { useLayoutEffect, useRef as useRef3, useState as useState3 } from "react";
602
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
844
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
603
845
  function SegmentedControl({
604
846
  options,
605
847
  value,
@@ -626,13 +868,11 @@ function SegmentedControl({
626
868
  return current.x === next.x && current.width === next.width && current.ready ? current : next;
627
869
  });
628
870
  };
629
- let timer;
630
871
  if (!mountedRef.current) {
631
872
  mountedRef.current = true;
632
873
  sync();
633
- } else {
634
- timer = setTimeout(sync, 0);
635
874
  }
875
+ const timer = setTimeout(sync, 0);
636
876
  const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(sync);
637
877
  observer == null ? void 0 : observer.observe(root);
638
878
  if (active) observer == null ? void 0 : observer.observe(active);
@@ -645,9 +885,10 @@ function SegmentedControl({
645
885
  }, [value, options.length]);
646
886
  const thumbStyle = {
647
887
  "--rqk-seg-x": `${thumb.x}px`,
648
- "--rqk-seg-w": `${thumb.width}px`
888
+ "--rqk-seg-w": `${thumb.width}px`,
889
+ opacity: thumb.ready ? 1 : 0
649
890
  };
650
- return /* @__PURE__ */ jsxs6(
891
+ return /* @__PURE__ */ jsxs8(
651
892
  "div",
652
893
  {
653
894
  ref: rootRef,
@@ -656,10 +897,10 @@ function SegmentedControl({
656
897
  "aria-label": ariaLabel,
657
898
  "data-ready": thumb.ready,
658
899
  children: [
659
- /* @__PURE__ */ jsx9("span", { className: "rqk-segmented-thumb", style: thumbStyle, "aria-hidden": "true" }),
900
+ /* @__PURE__ */ jsx13("span", { className: "rqk-segmented-thumb", style: thumbStyle, "aria-hidden": "true" }),
660
901
  options.map((option) => {
661
902
  const active = option.value === value;
662
- return /* @__PURE__ */ jsx9(
903
+ return /* @__PURE__ */ jsx13(
663
904
  "button",
664
905
  {
665
906
  type: "button",
@@ -679,116 +920,6 @@ function SegmentedControl({
679
920
  );
680
921
  }
681
922
 
682
- // src/core/quest-config.tsx
683
- import { createContext as createContext2, useContext as useContext2, useMemo as useMemo2 } from "react";
684
- import { jsx as jsx10 } from "react/jsx-runtime";
685
- var defaultQuestLabels = {
686
- submit: "\u63D0\u4EA4\u7B54\u6848",
687
- submitCount: "\u63D0\u4EA4\u7B54\u6848",
688
- retry: "\u91CD\u8BD5\u4E00\u6B21",
689
- next: "\u5207\u9898",
690
- prev: "\u4E0A\u4E00\u9898",
691
- back: "\u8FD4\u56DE",
692
- answer: "\u6B63\u786E\u7B54\u6848",
693
- analysis: "\u89E3\u6790",
694
- correctAll: "\u5168\u90E8\u7B54\u5BF9",
695
- wrongAnswer: "\u7B54\u6848\u8FD8\u4E0D\u6B63\u786E",
696
- tapToRead: "\u70B9\u51FB\u6717\u8BFB",
697
- readAloud: "\u8303\u8BFB",
698
- recording: "\u5F55\u97F3\u4E2D",
699
- scoring: "\u8BC4\u5206\u4E2D",
700
- releaseToSend: "\u677E\u624B\u5373\u63D0\u4EA4",
701
- holdToRecord: "\u70B9\u51FB\u5F00\u59CB\u5F55\u97F3",
702
- tapToFollow: "\u70B9\u51FB\u8DDF\u8BFB",
703
- recordingHint: "\u6B63\u5728\u5F55\u97F3 \xB7 \u70B9\u51FB\u7ED3\u675F",
704
- rescore: "\u91CD\u65B0\u5F55\u97F3",
705
- submitted: "\u5DF2\u63D0\u4EA4 \xB7 \u53EF\u91CD\u5F55",
706
- noiseHint: "\u97F3\u8D28\u4E0D\u5408\u683C\uFF1A\u4E0D\u51FA\u5206\uFF0C\u8BF7\u6362\u5B89\u9759\u73AF\u5883\u91CD\u8BD5",
707
- againHint: "\u672A\u83B7\u53D6\u5206\u6570\uFF0C\u8BF7\u518D\u8BD5\u4E00\u6B21",
708
- attemptsLeft: "\u8FD8\u6709 {n} \u6B21\u5F55\u97F3\u673A\u4F1A",
709
- attemptsUsedUp: "\u673A\u4F1A\u5DF2\u7528\u5B8C",
710
- play: "\u64AD\u653E",
711
- pause: "\u6682\u505C",
712
- replay: "\u518D\u542C\u4E00\u904D",
713
- loop: "\u5FAA\u73AF",
714
- speed: "\u500D\u901F",
715
- finish: "\u5B8C\u6210\u5E76\u8FD4\u56DE",
716
- submitAndStats: "\u63D0\u4EA4\u5E76\u67E5\u770B\u7EDF\u8BA1",
717
- effectivePlay: "\u6709\u6548\u64AD\u653E",
718
- totalTime: "\u603B\u65F6\u957F",
719
- reading: "\u9605\u8BFB",
720
- expand: "\u5C55\u5F00\u5168\u6587",
721
- collapse: "\u6536\u8D77",
722
- notAnswered: "\u672A\u4F5C\u7B54",
723
- fullscreen: "\u5168\u5C4F"
724
- };
725
- var QuestConfigContext = createContext2({});
726
- function QuestConfigProvider({
727
- config,
728
- children
729
- }) {
730
- const parent = useContext2(QuestConfigContext);
731
- const value = useMemo2(
732
- () => {
733
- var _a, _b;
734
- return {
735
- sound: (_a = config == null ? void 0 : config.sound) != null ? _a : parent.sound,
736
- speakText: (_b = config == null ? void 0 : config.speakText) != null ? _b : parent.speakText,
737
- labels: __spreadValues(__spreadValues({}, parent.labels), config == null ? void 0 : config.labels)
738
- };
739
- },
740
- [config, parent]
741
- );
742
- return /* @__PURE__ */ jsx10(QuestConfigContext.Provider, { value, children });
743
- }
744
- function useQuestConfig() {
745
- return useContext2(QuestConfigContext);
746
- }
747
- function useQuestLabels(override) {
748
- const config = useQuestConfig();
749
- return useMemo2(
750
- () => __spreadValues(__spreadValues(__spreadValues({}, defaultQuestLabels), config.labels), override),
751
- [config.labels, override]
752
- );
753
- }
754
-
755
- // src/primitives/action-bar.tsx
756
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
757
- function ActionBar({ actions, index = 1, onPrev, className }) {
758
- const labels = useQuestLabels();
759
- const autoPrev = Boolean(onPrev) && index > 1;
760
- const body = autoPrev ? actions.filter((action) => action.key !== "prev") : actions;
761
- const visibleActions = autoPrev ? [
762
- {
763
- key: "prev",
764
- label: labels.prev,
765
- variant: "ghost",
766
- onClick: onPrev,
767
- ariaLabel: labels.prev
768
- },
769
- ...body
770
- ] : body;
771
- if (!visibleActions.length) return null;
772
- return /* @__PURE__ */ jsx11("div", { className: classNames("rqk-action-bar flex gap-2.5", className), children: visibleActions.map((action) => /* @__PURE__ */ jsxs7(
773
- "button",
774
- {
775
- type: "button",
776
- className: classNames(
777
- "rqk-action ease-rqk-spring inline-flex h-[52px] min-w-0 items-center justify-center gap-1.5 rounded-[16px] px-[18px] text-[17px] font-semibold transition-[transform,opacity,background] duration-200 active:scale-[0.98] disabled:opacity-45 disabled:active:scale-100",
778
- action.variant === "ghost" ? "rqk-action-ghost text-rqk-ink-2 flex-none bg-white" : "rqk-action-primary disabled:bg-rqk-blue-300 flex-1 bg-[linear-gradient(180deg,#2c74ff,var(--rqk-blue-500)_70%)] text-white"
779
- ),
780
- onClick: action.onClick,
781
- disabled: action.disabled,
782
- "aria-label": action.ariaLabel,
783
- children: [
784
- action.icon ? /* @__PURE__ */ jsx11("span", { className: "rqk-action-icon inline-flex items-center justify-center", children: action.icon }) : null,
785
- /* @__PURE__ */ jsx11("span", { className: "rqk-action-label", children: action.label })
786
- ]
787
- },
788
- action.key
789
- )) });
790
- }
791
-
792
923
  // src/questions/single-choice/actions.ts
793
924
  function singleChoiceActions({
794
925
  readonly,
@@ -818,7 +949,7 @@ function singleChoiceActions({
818
949
  }
819
950
 
820
951
  // src/questions/single-choice/feedback.tsx
821
- import { jsx as jsx12 } from "react/jsx-runtime";
952
+ import { jsx as jsx14 } from "react/jsx-runtime";
822
953
  function SingleChoiceFeedback({
823
954
  readonly,
824
955
  phase,
@@ -827,7 +958,7 @@ function SingleChoiceFeedback({
827
958
  answerLabel
828
959
  }) {
829
960
  if (readonly) {
830
- return /* @__PURE__ */ jsx12(
961
+ return /* @__PURE__ */ jsx14(
831
962
  FeedbackSheet,
832
963
  {
833
964
  tone: "ok",
@@ -839,10 +970,10 @@ function SingleChoiceFeedback({
839
970
  );
840
971
  }
841
972
  if (phase === "retry") {
842
- return /* @__PURE__ */ jsx12(FeedbackSheet, { tone: "bad", title: labels.wrongAnswer, detail: "\u518D\u68C0\u67E5\u4E00\u6B21\uFF0C\u8FD8\u6709\u4E00\u6B21\u673A\u4F1A" });
973
+ return /* @__PURE__ */ jsx14(FeedbackSheet, { tone: "bad", title: labels.wrongAnswer, detail: "\u518D\u68C0\u67E5\u4E00\u6B21\uFF0C\u8FD8\u6709\u4E00\u6B21\u673A\u4F1A" });
843
974
  }
844
975
  if (phase === "correct") {
845
- return /* @__PURE__ */ jsx12(
976
+ return /* @__PURE__ */ jsx14(
846
977
  FeedbackSheet,
847
978
  {
848
979
  tone: "ok",
@@ -853,7 +984,7 @@ function SingleChoiceFeedback({
853
984
  );
854
985
  }
855
986
  if (phase === "locked") {
856
- return /* @__PURE__ */ jsx12(
987
+ return /* @__PURE__ */ jsx14(
857
988
  FeedbackSheet,
858
989
  {
859
990
  tone: "bad",
@@ -885,7 +1016,7 @@ function matchesAny(value, answers) {
885
1016
  }
886
1017
 
887
1018
  // src/questions/single-choice/option-list.tsx
888
- import { jsx as jsx13 } from "react/jsx-runtime";
1019
+ import { jsx as jsx15 } from "react/jsx-runtime";
889
1020
  function SingleChoiceOptions({
890
1021
  data,
891
1022
  canPick,
@@ -893,7 +1024,7 @@ function SingleChoiceOptions({
893
1024
  onPick
894
1025
  }) {
895
1026
  const hasImages = data.options.some((option) => option.image);
896
- return /* @__PURE__ */ jsx13("div", { className: classNames("rqk-option-list", hasImages && "rqk-option-list-grid"), children: data.options.map((option, optionIndex) => /* @__PURE__ */ jsx13(
1027
+ return /* @__PURE__ */ jsx15("div", { className: classNames("rqk-option-list", hasImages && "rqk-option-list-grid"), children: data.options.map((option, optionIndex) => /* @__PURE__ */ jsx15(
897
1028
  OptionItem,
898
1029
  {
899
1030
  label: optionLetter(optionIndex),
@@ -901,7 +1032,7 @@ function SingleChoiceOptions({
901
1032
  state: stateOf(optionIndex),
902
1033
  layout: hasImages ? "grid" : "row",
903
1034
  disabled: !canPick,
904
- media: option.image ? /* @__PURE__ */ jsx13("img", { className: "rqk-option-image", src: option.image, alt: "" }) : void 0,
1035
+ media: option.image ? /* @__PURE__ */ jsx15("img", { className: "rqk-option-image", src: option.image, alt: "" }) : void 0,
905
1036
  audioIndicator: Boolean(option.audio || option.speak),
906
1037
  onClick: () => onPick(optionIndex),
907
1038
  children: option.text
@@ -911,9 +1042,9 @@ function SingleChoiceOptions({
911
1042
  }
912
1043
 
913
1044
  // src/primitives/card.tsx
914
- import { jsx as jsx14 } from "react/jsx-runtime";
1045
+ import { jsx as jsx16 } from "react/jsx-runtime";
915
1046
  function Card({ children, flush, tint, className }) {
916
- return /* @__PURE__ */ jsx14(
1047
+ return /* @__PURE__ */ jsx16(
917
1048
  "div",
918
1049
  {
919
1050
  className: classNames(
@@ -1122,7 +1253,7 @@ function useMediaProgress({
1122
1253
  }
1123
1254
 
1124
1255
  // src/primitives/audio-bar.tsx
1125
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1256
+ import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
1126
1257
  var WAVE_BARS = [
1127
1258
  10,
1128
1259
  16,
@@ -1211,134 +1342,67 @@ function AudioBar({
1211
1342
  audio.addEventListener("ended", onEnd);
1212
1343
  audio.addEventListener("pause", onPause);
1213
1344
  audio.addEventListener("loadedmetadata", onMetadata);
1214
- return () => {
1215
- audio.removeEventListener("timeupdate", onTime);
1216
- audio.removeEventListener("ended", onEnd);
1217
- audio.removeEventListener("pause", onPause);
1218
- audio.removeEventListener("loadedmetadata", onMetadata);
1219
- };
1220
- }, [setPlaying, src]);
1221
- const handleToggle = () => {
1222
- var _a;
1223
- if (onToggle) {
1224
- onToggle();
1225
- return;
1226
- }
1227
- if (!isPlaying) {
1228
- if (src && audioRef.current) {
1229
- const played = audioRef.current.play();
1230
- if (played && typeof played.catch === "function") {
1231
- void played.catch(() => setPlaying(false));
1232
- }
1233
- }
1234
- setPlaying(true);
1235
- } else {
1236
- (_a = audioRef.current) == null ? void 0 : _a.pause();
1237
- setPlaying(false);
1238
- }
1239
- };
1240
- const total = src ? sourceDuration != null ? sourceDuration : duration : duration;
1241
- return /* @__PURE__ */ jsxs8(
1242
- "div",
1243
- {
1244
- className: classNames(
1245
- "rqk-audio-bar",
1246
- compact && "rqk-audio-bar-compact",
1247
- isPlaying && "rqk-is-playing",
1248
- className
1249
- ),
1250
- children: [
1251
- /* @__PURE__ */ jsx15(
1252
- "button",
1253
- {
1254
- type: "button",
1255
- className: "rqk-audio-bar-play",
1256
- onClick: handleToggle,
1257
- "aria-label": isPlaying ? "\u6682\u505C" : "\u64AD\u653E",
1258
- children: isPlaying ? /* @__PURE__ */ jsx15(PauseIcon, { size: 18 }) : /* @__PURE__ */ jsx15(PlayIcon, { size: 18 })
1259
- }
1260
- ),
1261
- /* @__PURE__ */ jsxs8("div", { className: "rqk-audio-bar-main", children: [
1262
- label ? /* @__PURE__ */ jsx15("div", { className: "rqk-audio-bar-label", children: label }) : null,
1263
- /* @__PURE__ */ jsx15("div", { className: "rqk-audio-bar-wave", "aria-hidden": true, children: WAVE_BARS.map((height, barIndex) => /* @__PURE__ */ jsx15("span", { style: { height: `${height}px` } }, barIndex)) })
1264
- ] }),
1265
- /* @__PURE__ */ jsx15("span", { className: "rqk-audio-bar-time", children: formatTime(isPlaying ? position : total) }),
1266
- src ? /* @__PURE__ */ jsx15("audio", { ref: audioRef, src, preload: "metadata" }) : null
1267
- ]
1268
- }
1269
- );
1270
- }
1271
-
1272
- // src/primitives/picture-box.tsx
1273
- import { useEffect as useEffect4, useState as useState6 } from "react";
1274
-
1275
- // src/art/illustrations.tsx
1276
- import { useId } from "react";
1277
-
1278
- // src/assets/svg/art-apple.svg
1279
- var art_apple_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#FF8A8A"></stop><stop offset="1" stop-color="#E5484D"></stop></linearGradient></defs><circle cx="57" cy="66" r="32" fill="url(#rqk-grad)"></circle><circle cx="72" cy="70" r="25" fill="url(#rqk-grad)" opacity="0.92"></circle><ellipse cx="47" cy="52" rx="7" ry="10" fill="#FFFFFF" opacity="0.4" transform="rotate(-24 47 52)"></ellipse><path d="M64 36c0-6 3-10 8-12" stroke="#8B5E34" stroke-width="3" stroke-linecap="round" fill="none"></path><path d="M68 34c2-8 12-11 20-7-2 8-12 11-20 7z" fill="#3ED598"></path></svg>\n';
1280
-
1281
- // src/assets/svg/art-balloon.svg
1282
- var art_balloon_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0.2" y1="0" x2="0.8" y2="1"><stop offset="0" stop-color="#7FB0FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient></defs><ellipse cx="60" cy="50" rx="28" ry="32" fill="url(#rqk-grad)"></ellipse><ellipse cx="50" cy="38" rx="7" ry="9" fill="#FFFFFF" opacity="0.45"></ellipse><path d="M60 82l3 6h-6z" fill="#0147CC"></path><path d="M60 88c8 6-8 10 0 16s-8 8 0 12" stroke="#0147CC" stroke-width="2.2" fill="none" stroke-linecap="round"></path><circle cx="94" cy="30" r="4" fill="#FFD166"></circle><circle cx="22" cy="86" r="3" fill="#7C5CFF" opacity="0.6"></circle></svg>\n';
1283
-
1284
- // src/assets/svg/art-books.svg
1285
- var art_books_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><rect x="20" y="80" width="80" height="16" rx="5" fill="#0158FD"></rect><rect x="26" y="62" width="68" height="16" rx="5" fill="#3ED598"></rect><rect x="22" y="44" width="72" height="16" rx="5" fill="#FFB020"></rect><rect x="32" y="26" width="58" height="16" rx="5" fill="#7C5CFF"></rect><path d="M34 34h54M28 52h60M32 70h56M26 88h68" stroke="#FFFFFF" stroke-width="2.4" opacity="0.35" stroke-linecap="round"></path><circle cx="88" cy="22" r="5" fill="#9CBFFF" opacity="0.7"></circle></svg>\n';
1286
-
1287
- // src/assets/svg/art-cat.svg
1288
- var art_cat_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFC48A"></stop><stop offset="1" stop-color="#F09A4F"></stop></linearGradient></defs><path d="M36 42l-6-20 18 8zM84 42l6-20-18 8z" fill="url(#rqk-grad)"></path><circle cx="60" cy="66" r="34" fill="url(#rqk-grad)"></circle><ellipse cx="60" cy="82" rx="18" ry="13" fill="#FFF3E4"></ellipse><circle cx="48" cy="62" r="3.4" fill="#5B3A22"></circle><circle cx="72" cy="62" r="3.4" fill="#5B3A22"></circle><path d="M55 74h10l-5 5z" fill="#F08A8A"></path><path d="M56 83c1.6 1.8 6.4 1.8 8 0" stroke="#5B3A22" stroke-width="1.8" fill="none"></path><path d="M22 68h14M24 76h12M98 68h-14M96 76h-12" stroke="#E7C39F" stroke-width="2" stroke-linecap="round"></path></svg>\n';
1289
-
1290
- // src/assets/svg/art-coffee.svg
1291
- var art_coffee_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#FFFFFF"></stop><stop offset="1" stop-color="#E7EEFA"></stop></linearGradient></defs><ellipse cx="58" cy="90" rx="34" ry="6" fill="#DCE6F7"></ellipse><path d="M30 50h50l-5 34c-.6 4-4 7-8 7H43c-4 0-7.4-3-8-7z" fill="url(#rqk-grad)"></path><path d="M80 58h6a9 9 0 010 18h-3" stroke="#C3D2E8" stroke-width="4" fill="none"></path><rect x="34" y="58" width="42" height="14" rx="4" fill="#D6E2F5"></rect><path d="M48 42c-4-7 4-9 0-16M62 42c-4-7 4-9 0-16" stroke="#9CBFFF" stroke-width="3" fill="none" stroke-linecap="round" opacity="0.8"></path><circle cx="88" cy="34" r="4" fill="#FFB020" opacity="0.7"></circle></svg>\n';
1292
-
1293
- // src/assets/svg/art-headphones.svg
1294
- var art_headphones_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 186" fill="none" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad-a" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#5C96FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient><linearGradient id="rqk-grad-b" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#3D7BFF"></stop><stop offset="1" stop-color="#013AA6"></stop></linearGradient></defs><ellipse cx="120" cy="162" rx="48" ry="8" fill="#0B1220" opacity="0.07"></ellipse><path d="M62 112V94c0-32 26-56 58-56s58 24 58 56v18" stroke="url(#rqk-grad-a)" stroke-width="15" stroke-linecap="round"></path><path d="M62 112V94c0-32 26-56 58-56s58 24 58 56v18" stroke="#fff" stroke-width="4" stroke-linecap="round" opacity="0.35"></path><rect x="46" y="102" width="34" height="52" rx="17" fill="url(#rqk-grad-b)"></rect><rect x="160" y="102" width="34" height="52" rx="17" fill="url(#rqk-grad-b)"></rect><rect x="54" y="112" width="18" height="32" rx="9" fill="#fff" opacity="0.25"></rect><rect x="168" y="112" width="18" height="32" rx="9" fill="#fff" opacity="0.25"></rect><g stroke="#0158FD" stroke-width="3" stroke-linecap="round" opacity="0.5"><path d="M198 74c8 6 12 14 12 22M206 62c12 9 18 21 18 34"></path></g></svg>\n';
1295
-
1296
- // src/assets/svg/art-kid.svg
1297
- var art_kid_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#4F8BFF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient></defs><circle cx="60" cy="58" r="46" fill="#EAF1FF"></circle><path d="M22 104c0-15 17-24 38-24s38 9 38 24z" fill="url(#rqk-grad)"></path><circle cx="60" cy="52" r="25" fill="#FFD3B6"></circle><path d="M36 47c0-13 10-21 24-21s24 8 24 21c-6-4-13-6-24-6s-18 2-24 6z" fill="#1F2A44"></path><circle cx="51" cy="53" r="2.6" fill="#1F2A44"></circle><circle cx="69" cy="53" r="2.6" fill="#1F2A44"></circle><path d="M54 62c2.6 3 9.4 3 12 0" stroke="#C96A5A" stroke-width="2.4" stroke-linecap="round" fill="none"></path><circle cx="43" cy="60" r="3.4" fill="#FFB4A8" opacity="0.6"></circle><circle cx="77" cy="60" r="3.4" fill="#FFB4A8" opacity="0.6"></circle></svg>\n';
1298
-
1299
- // src/assets/svg/art-screen.svg
1300
- var art_screen_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 186" fill="none" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad-play" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#5C96FF"></stop><stop offset="1" stop-color="#0158FD"></stop></linearGradient><linearGradient id="rqk-grad-screen" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#EAF2FF"></stop><stop offset="1" stop-color="#C6DBFF"></stop></linearGradient></defs><ellipse cx="120" cy="166" rx="52" ry="8" fill="#0B1220" opacity="0.07"></ellipse><rect x="42" y="32" width="156" height="104" rx="16" fill="url(#rqk-grad-screen)" stroke="#B9D0FF" stroke-width="2"></rect><rect x="52" y="42" width="136" height="84" rx="10" fill="#0B1220" opacity="0.06"></rect><circle cx="120" cy="84" r="26" fill="url(#rqk-grad-play)"></circle><path d="M113 73l20 11-20 11V73z" fill="#fff"></path><rect x="106" y="136" width="28" height="16" fill="#C6DBFF"></rect><rect x="84" y="150" width="72" height="8" rx="4" fill="#B9D0FF"></rect><g fill="#0158FD" opacity="0.5"><circle cx="62" cy="52" r="2.6"></circle><circle cx="70" cy="52" r="2.6"></circle><circle cx="78" cy="52" r="2.6"></circle></g></svg>\n';
1301
-
1302
- // src/assets/svg/art-speech.svg
1303
- var art_speech_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#EAF1FF"></stop><stop offset="1" stop-color="#C6DBFF"></stop></linearGradient></defs><path d="M24 34h72a8 8 0 018 8v34a8 8 0 01-8 8H60l-16 14v-14H24a8 8 0 01-8-8V42a8 8 0 018-8z" fill="url(#rqk-grad)"></path><rect x="38" y="52" width="7" height="18" rx="3.5" fill="#0158FD"></rect><rect x="51" y="44" width="7" height="34" rx="3.5" fill="#4F8BFF"></rect><rect x="64" y="48" width="7" height="26" rx="3.5" fill="#4F8BFF"></rect><rect x="77" y="58" width="7" height="10" rx="3.5" fill="#9CBFFF"></rect></svg>\n';
1304
-
1305
- // src/assets/svg/art-trophy.svg
1306
- var art_trophy_default = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" class="rqk-art-svg" aria-hidden="true" focusable="false"><defs><linearGradient id="rqk-grad" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#FFE29A"></stop><stop offset="0.55" stop-color="#FFC24B"></stop><stop offset="1" stop-color="#E08A00"></stop></linearGradient></defs><circle cx="60" cy="54" r="42" fill="#FFF7E6"></circle><path d="M38 34h44v18c0 14-9 22-22 22s-22-8-22-22z" fill="url(#rqk-grad)"></path><path d="M38 40H28v4c0 9 6 15 14 15M82 40h10v4c0 9-6 15-14 15" stroke="#E08A00" stroke-width="3.4" fill="none"></path><rect x="52" y="72" width="16" height="10" fill="#F0A600"></rect><rect x="44" y="82" width="32" height="9" rx="3" fill="#E08A00"></rect><path d="M60 44l3 6 7 1-5 5 1 7-6-3-6 3 1-7-5-5 7-1z" fill="#FFF7E6" opacity="0.9"></path><circle cx="90" cy="30" r="3.4" fill="#FFB020" opacity="0.8"></circle><circle cx="26" cy="76" r="2.6" fill="#7C5CFF" opacity="0.6"></circle></svg>\n';
1307
-
1308
- // src/art/illustrations.tsx
1309
- import { jsx as jsx16 } from "react/jsx-runtime";
1310
- var ART_SOURCES = {
1311
- kid: art_kid_default,
1312
- balloon: art_balloon_default,
1313
- apple: art_apple_default,
1314
- coffee: art_coffee_default,
1315
- cat: art_cat_default,
1316
- books: art_books_default,
1317
- headphones: art_headphones_default,
1318
- screen: art_screen_default,
1319
- trophy: art_trophy_default,
1320
- speech: art_speech_default
1321
- };
1322
- function Art({ name, className, size }) {
1323
- var _a;
1324
- const unique = useId().replace(/[^a-zA-Z0-9]/g, "");
1325
- const source = ((_a = ART_SOURCES[name]) != null ? _a : art_speech_default).replace(
1326
- /rqk-grad/g,
1327
- `rqk-grad-${unique}`
1328
- );
1329
- return /* @__PURE__ */ jsx16(
1330
- "span",
1345
+ return () => {
1346
+ audio.removeEventListener("timeupdate", onTime);
1347
+ audio.removeEventListener("ended", onEnd);
1348
+ audio.removeEventListener("pause", onPause);
1349
+ audio.removeEventListener("loadedmetadata", onMetadata);
1350
+ };
1351
+ }, [setPlaying, src]);
1352
+ const handleToggle = () => {
1353
+ var _a;
1354
+ if (onToggle) {
1355
+ onToggle();
1356
+ return;
1357
+ }
1358
+ if (!isPlaying) {
1359
+ if (src && audioRef.current) {
1360
+ const played = audioRef.current.play();
1361
+ if (played && typeof played.catch === "function") {
1362
+ void played.catch(() => setPlaying(false));
1363
+ }
1364
+ }
1365
+ setPlaying(true);
1366
+ } else {
1367
+ (_a = audioRef.current) == null ? void 0 : _a.pause();
1368
+ setPlaying(false);
1369
+ }
1370
+ };
1371
+ const total = src ? sourceDuration != null ? sourceDuration : duration : duration;
1372
+ return /* @__PURE__ */ jsxs9(
1373
+ "div",
1331
1374
  {
1332
- className: ["rqk-art", className].filter(Boolean).join(" "),
1333
- style: size ? { width: size, height: size } : void 0,
1334
- "aria-hidden": true,
1335
- dangerouslySetInnerHTML: { __html: source }
1375
+ className: classNames(
1376
+ "rqk-audio-bar",
1377
+ compact && "rqk-audio-bar-compact",
1378
+ isPlaying && "rqk-is-playing",
1379
+ className
1380
+ ),
1381
+ children: [
1382
+ /* @__PURE__ */ jsx17(
1383
+ "button",
1384
+ {
1385
+ type: "button",
1386
+ className: "rqk-audio-bar-play",
1387
+ onClick: handleToggle,
1388
+ "aria-label": isPlaying ? "\u6682\u505C" : "\u64AD\u653E",
1389
+ children: isPlaying ? /* @__PURE__ */ jsx17(PauseIcon, { size: 18 }) : /* @__PURE__ */ jsx17(PlayIcon, { size: 18 })
1390
+ }
1391
+ ),
1392
+ /* @__PURE__ */ jsxs9("div", { className: "rqk-audio-bar-main", children: [
1393
+ label ? /* @__PURE__ */ jsx17("div", { className: "rqk-audio-bar-label", children: label }) : null,
1394
+ /* @__PURE__ */ jsx17("div", { className: "rqk-audio-bar-wave", "aria-hidden": true, children: WAVE_BARS.map((height, barIndex) => /* @__PURE__ */ jsx17("span", { style: { height: `${height}px` } }, barIndex)) })
1395
+ ] }),
1396
+ /* @__PURE__ */ jsx17("span", { className: "rqk-audio-bar-time", children: formatTime(isPlaying ? position : total) }),
1397
+ src ? /* @__PURE__ */ jsx17("audio", { ref: audioRef, src, preload: "metadata" }) : null
1398
+ ]
1336
1399
  }
1337
1400
  );
1338
1401
  }
1339
1402
 
1340
1403
  // src/primitives/picture-box.tsx
1341
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
1404
+ import { useEffect as useEffect4, useState as useState6 } from "react";
1405
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1342
1406
  function PictureBox({
1343
1407
  src,
1344
1408
  alt = "",
@@ -1356,7 +1420,7 @@ function PictureBox({
1356
1420
  setLoaded(false);
1357
1421
  }, [src]);
1358
1422
  const resolved = state != null ? state : src ? failed ? "fail" : loaded ? "ok" : "loading" : "default";
1359
- return /* @__PURE__ */ jsxs9(
1423
+ return /* @__PURE__ */ jsxs10(
1360
1424
  "div",
1361
1425
  {
1362
1426
  className: classNames(
@@ -1367,7 +1431,7 @@ function PictureBox({
1367
1431
  style: { aspectRatio: ratio },
1368
1432
  "data-state": resolved,
1369
1433
  children: [
1370
- src && resolved !== "fail" ? /* @__PURE__ */ jsx17(
1434
+ src && resolved !== "fail" ? /* @__PURE__ */ jsx18(
1371
1435
  "img",
1372
1436
  {
1373
1437
  src,
@@ -1376,9 +1440,9 @@ function PictureBox({
1376
1440
  onError: () => setFailed(true)
1377
1441
  }
1378
1442
  ) : null,
1379
- resolved === "loading" ? /* @__PURE__ */ jsx17("span", { className: "rqk-picture-skeleton", "aria-hidden": true }) : null,
1380
- resolved === "default" || resolved === "fail" ? /* @__PURE__ */ jsx17("span", { className: "rqk-picture-fallback", children: /* @__PURE__ */ jsx17(Art, { name: art }) }) : null,
1381
- resolved === "fail" ? /* @__PURE__ */ jsx17(
1443
+ resolved === "loading" ? /* @__PURE__ */ jsx18("span", { className: "rqk-picture-skeleton", "aria-hidden": true }) : null,
1444
+ resolved === "default" || resolved === "fail" ? /* @__PURE__ */ jsx18("span", { className: "rqk-picture-fallback", children: /* @__PURE__ */ jsx18(Art, { name: art }) }) : null,
1445
+ resolved === "fail" ? /* @__PURE__ */ jsx18(
1382
1446
  "button",
1383
1447
  {
1384
1448
  type: "button",
@@ -1387,19 +1451,19 @@ function PictureBox({
1387
1451
  children: "\u91CD\u65B0\u52A0\u8F7D"
1388
1452
  }
1389
1453
  ) : null,
1390
- caption ? /* @__PURE__ */ jsx17("span", { className: "rqk-picture-caption", children: caption }) : null
1454
+ caption ? /* @__PURE__ */ jsx18("span", { className: "rqk-picture-caption", children: caption }) : null
1391
1455
  ]
1392
1456
  }
1393
1457
  );
1394
1458
  }
1395
1459
 
1396
1460
  // src/questions/single-choice/stem-card.tsx
1397
- import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
1461
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
1398
1462
  function SingleChoiceStem({ data }) {
1399
- return /* @__PURE__ */ jsxs10(Card, { className: "rqk-stem-card", children: [
1400
- data.stemImage ? /* @__PURE__ */ jsx18(PictureBox, { src: data.stemImage, art: "books", ratio: "16 / 9", alt: "\u9898\u5E72\u914D\u56FE" }) : null,
1401
- data.stemAudio ? /* @__PURE__ */ jsx18(AudioBar, { src: data.stemAudio }) : null,
1402
- /* @__PURE__ */ jsx18("div", { className: "rqk-stem", children: data.stem })
1463
+ return /* @__PURE__ */ jsxs11(Card, { className: "rqk-stem-card", children: [
1464
+ data.stemImage ? /* @__PURE__ */ jsx19(PictureBox, { src: data.stemImage, art: "books", ratio: "16 / 9", alt: "\u9898\u5E72\u914D\u56FE" }) : null,
1465
+ data.stemAudio ? /* @__PURE__ */ jsx19(AudioBar, { src: data.stemAudio }) : null,
1466
+ /* @__PURE__ */ jsx19("div", { className: "rqk-stem", children: data.stem })
1403
1467
  ] });
1404
1468
  }
1405
1469
 
@@ -1434,7 +1498,7 @@ var speakWithSynthesis = (text, opts) => {
1434
1498
  };
1435
1499
 
1436
1500
  // src/questions/single-choice/use-single-choice.tsx
1437
- import { Fragment, jsxs as jsxs11 } from "react/jsx-runtime";
1501
+ import { Fragment, jsxs as jsxs12 } from "react/jsx-runtime";
1438
1502
  function useSingleChoice({
1439
1503
  data,
1440
1504
  mode,
@@ -1485,7 +1549,7 @@ function useSingleChoice({
1485
1549
  answer: selected
1486
1550
  });
1487
1551
  }, [judge, onSubmit, selected]);
1488
- const answerLabel = (_b = data.answerLabel) != null ? _b : /* @__PURE__ */ jsxs11(Fragment, { children: [
1552
+ const answerLabel = (_b = data.answerLabel) != null ? _b : /* @__PURE__ */ jsxs12(Fragment, { children: [
1489
1553
  optionLetter(data.answer),
1490
1554
  ". ",
1491
1555
  (_a = data.options[data.answer]) == null ? void 0 : _a.text
@@ -1521,7 +1585,7 @@ function useSingleChoice({
1521
1585
  }
1522
1586
 
1523
1587
  // src/questions/single-choice/index.tsx
1524
- import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
1588
+ import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
1525
1589
  function SingleChoice({
1526
1590
  data,
1527
1591
  mode = "answer",
@@ -1547,7 +1611,7 @@ function SingleChoice({
1547
1611
  onSubmit: model.handleSubmit,
1548
1612
  onRetry: model.judge.retry
1549
1613
  });
1550
- return /* @__PURE__ */ jsx19(
1614
+ return /* @__PURE__ */ jsx20(
1551
1615
  QuestShell,
1552
1616
  {
1553
1617
  mode,
@@ -1558,7 +1622,7 @@ function SingleChoice({
1558
1622
  onBack,
1559
1623
  className: classNames("rqk-quest", className),
1560
1624
  dataQuest: "single-choice",
1561
- feedback: /* @__PURE__ */ jsx19(
1625
+ feedback: /* @__PURE__ */ jsx20(
1562
1626
  SingleChoiceFeedback,
1563
1627
  {
1564
1628
  readonly: model.readonly,
@@ -1568,10 +1632,10 @@ function SingleChoice({
1568
1632
  answerLabel: model.answerLabel
1569
1633
  }
1570
1634
  ),
1571
- footer: /* @__PURE__ */ jsx19(ActionBar, { actions, index, onPrev }),
1572
- children: /* @__PURE__ */ jsxs12(Fragment2, { children: [
1573
- /* @__PURE__ */ jsx19(SingleChoiceStem, { data }),
1574
- /* @__PURE__ */ jsx19(
1635
+ footer: /* @__PURE__ */ jsx20(ActionBar, { actions, index, total, onPrev }),
1636
+ children: /* @__PURE__ */ jsxs13(Fragment2, { children: [
1637
+ /* @__PURE__ */ jsx20(SingleChoiceStem, { data }),
1638
+ /* @__PURE__ */ jsx20(
1575
1639
  SingleChoiceOptions,
1576
1640
  {
1577
1641
  data,
@@ -1640,7 +1704,7 @@ function followArt(data) {
1640
1704
  }
1641
1705
 
1642
1706
  // src/questions/follow-read/follow-content.tsx
1643
- import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
1707
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1644
1708
  function FollowContent({
1645
1709
  data,
1646
1710
  stage,
@@ -1650,10 +1714,10 @@ function FollowContent({
1650
1714
  startBadgeVisible
1651
1715
  }) {
1652
1716
  var _a, _b, _c, _d, _e, _f, _g, _h;
1653
- return /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-card flex flex-col gap-3", children: [
1654
- /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-stage", children: [
1655
- art ? /* @__PURE__ */ jsx20(Art, { name: art, className: "rqk-follow-art" }) : /* @__PURE__ */ jsxs13("span", { className: "rqk-follow-no-image", role: "img", "aria-label": "No image", children: [
1656
- /* @__PURE__ */ jsxs13(
1717
+ return /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-card flex flex-col gap-3", children: [
1718
+ /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-stage", children: [
1719
+ art ? /* @__PURE__ */ jsx21(Art, { name: art, className: "rqk-follow-art" }) : /* @__PURE__ */ jsxs14("span", { className: "rqk-follow-no-image", role: "img", "aria-label": "No image", children: [
1720
+ /* @__PURE__ */ jsxs14(
1657
1721
  "svg",
1658
1722
  {
1659
1723
  className: "rqk-follow-no-image-icon",
@@ -1661,7 +1725,7 @@ function FollowContent({
1661
1725
  fill: "none",
1662
1726
  "aria-hidden": true,
1663
1727
  children: [
1664
- /* @__PURE__ */ jsx20(
1728
+ /* @__PURE__ */ jsx21(
1665
1729
  "rect",
1666
1730
  {
1667
1731
  x: "7",
@@ -1673,8 +1737,8 @@ function FollowContent({
1673
1737
  strokeWidth: "2"
1674
1738
  }
1675
1739
  ),
1676
- /* @__PURE__ */ jsx20("circle", { cx: "17", cy: "19", r: "3", fill: "currentColor", opacity: "0.45" }),
1677
- /* @__PURE__ */ jsx20(
1740
+ /* @__PURE__ */ jsx21("circle", { cx: "17", cy: "19", r: "3", fill: "currentColor", opacity: "0.45" }),
1741
+ /* @__PURE__ */ jsx21(
1678
1742
  "path",
1679
1743
  {
1680
1744
  d: "M10 34l9-9 7 7 6-6 8 8",
@@ -1684,7 +1748,7 @@ function FollowContent({
1684
1748
  strokeLinejoin: "round"
1685
1749
  }
1686
1750
  ),
1687
- /* @__PURE__ */ jsx20(
1751
+ /* @__PURE__ */ jsx21(
1688
1752
  "path",
1689
1753
  {
1690
1754
  d: "M11 8l27 32",
@@ -1696,24 +1760,24 @@ function FollowContent({
1696
1760
  ]
1697
1761
  }
1698
1762
  ),
1699
- /* @__PURE__ */ jsx20("span", { className: "rqk-follow-no-image-text", children: "No image" })
1763
+ /* @__PURE__ */ jsx21("span", { className: "rqk-follow-no-image-text", children: "No image" })
1700
1764
  ] }),
1701
- startBadgeVisible ? /* @__PURE__ */ jsx20("span", { className: "rqk-follow-start", children: "\u51C6\u5907\u5F00\u59CB\u8DDF\u8BFB" }) : null
1765
+ startBadgeVisible ? /* @__PURE__ */ jsx21("span", { className: "rqk-follow-start", children: "\u51C6\u5907\u5F00\u59CB\u8DDF\u8BFB" }) : null
1702
1766
  ] }),
1703
- data.kind === "word" ? /* @__PURE__ */ jsxs13(Card, { className: "rqk-follow-word", children: [
1704
- /* @__PURE__ */ jsx20("div", { className: "rqk-follow-word-text", children: (_a = data.word) == null ? void 0 : _a.text }),
1705
- /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-word-meta", children: [
1706
- ((_b = data.word) == null ? void 0 : _b.phonetic) ? /* @__PURE__ */ jsx20("span", { className: "rqk-follow-phonetic", children: data.word.phonetic }) : null,
1707
- ((_c = data.word) == null ? void 0 : _c.partOfSpeech) || ((_d = data.word) == null ? void 0 : _d.meaning) ? /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-pos-line", children: [
1708
- ((_e = data.word) == null ? void 0 : _e.partOfSpeech) ? /* @__PURE__ */ jsx20("span", { className: "rqk-follow-pos", children: data.word.partOfSpeech }) : null,
1709
- ((_f = data.word) == null ? void 0 : _f.meaning) ? /* @__PURE__ */ jsx20("span", { className: "rqk-follow-meaning", children: data.word.meaning }) : null
1767
+ data.kind === "word" ? /* @__PURE__ */ jsxs14(Card, { className: "rqk-follow-word", children: [
1768
+ /* @__PURE__ */ jsx21("div", { className: "rqk-follow-word-text", children: (_a = data.word) == null ? void 0 : _a.text }),
1769
+ /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-word-meta", children: [
1770
+ ((_b = data.word) == null ? void 0 : _b.phonetic) ? /* @__PURE__ */ jsx21("span", { className: "rqk-follow-phonetic", children: data.word.phonetic }) : null,
1771
+ ((_c = data.word) == null ? void 0 : _c.partOfSpeech) || ((_d = data.word) == null ? void 0 : _d.meaning) ? /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-pos-line", children: [
1772
+ ((_e = data.word) == null ? void 0 : _e.partOfSpeech) ? /* @__PURE__ */ jsx21("span", { className: "rqk-follow-pos", children: data.word.partOfSpeech }) : null,
1773
+ ((_f = data.word) == null ? void 0 : _f.meaning) ? /* @__PURE__ */ jsx21("span", { className: "rqk-follow-meaning", children: data.word.meaning }) : null
1710
1774
  ] }) : null
1711
1775
  ] })
1712
- ] }) : /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-word rqk-follow-sentence-box", children: [
1713
- /* @__PURE__ */ jsx20("div", { className: "rqk-follow-sentence", children: (_g = data.sentence) == null ? void 0 : _g.words.map((word, wordIndex) => {
1776
+ ] }) : /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-word rqk-follow-sentence-box", children: [
1777
+ /* @__PURE__ */ jsx21("div", { className: "rqk-follow-sentence", children: (_g = data.sentence) == null ? void 0 : _g.words.map((word, wordIndex) => {
1714
1778
  var _a2;
1715
1779
  const score = (_a2 = wordScores[wordIndex]) == null ? void 0 : _a2.score;
1716
- return /* @__PURE__ */ jsx20(
1780
+ return /* @__PURE__ */ jsx21(
1717
1781
  "span",
1718
1782
  {
1719
1783
  className: classNames(
@@ -1725,32 +1789,32 @@ function FollowContent({
1725
1789
  `${word}-${wordIndex}`
1726
1790
  );
1727
1791
  }) }),
1728
- /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-legend", children: [
1729
- /* @__PURE__ */ jsxs13("span", { children: [
1730
- /* @__PURE__ */ jsx20("i", { className: "rqk-follow-legend-ok", children: "\u7EFF" }),
1792
+ /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-legend", children: [
1793
+ /* @__PURE__ */ jsxs14("span", { children: [
1794
+ /* @__PURE__ */ jsx21("i", { className: "rqk-follow-legend-ok", children: "\u7EFF" }),
1731
1795
  " \u226580"
1732
1796
  ] }),
1733
- /* @__PURE__ */ jsxs13("span", { children: [
1734
- /* @__PURE__ */ jsx20("i", { className: "rqk-follow-legend-warn", children: "\u9EC4" }),
1797
+ /* @__PURE__ */ jsxs14("span", { children: [
1798
+ /* @__PURE__ */ jsx21("i", { className: "rqk-follow-legend-warn", children: "\u9EC4" }),
1735
1799
  " 60\u201380"
1736
1800
  ] }),
1737
- /* @__PURE__ */ jsxs13("span", { children: [
1738
- /* @__PURE__ */ jsx20("i", { className: "rqk-follow-legend-bad", children: "\u7EA2" }),
1801
+ /* @__PURE__ */ jsxs14("span", { children: [
1802
+ /* @__PURE__ */ jsx21("i", { className: "rqk-follow-legend-bad", children: "\u7EA2" }),
1739
1803
  " <60"
1740
1804
  ] })
1741
1805
  ] }),
1742
- ((_h = data.sentence) == null ? void 0 : _h.translation) ? /* @__PURE__ */ jsx20("div", { className: "rqk-follow-translation", children: data.sentence.translation }) : null
1806
+ ((_h = data.sentence) == null ? void 0 : _h.translation) ? /* @__PURE__ */ jsx21("div", { className: "rqk-follow-translation", children: data.sentence.translation }) : null
1743
1807
  ] }),
1744
- stage === "scoring" && !readonly ? /* @__PURE__ */ jsxs13("div", { className: "rqk-follow-scoring", "aria-live": "polite", children: [
1745
- /* @__PURE__ */ jsx20("span", { className: "rqk-follow-spinner", "aria-hidden": true }),
1746
- /* @__PURE__ */ jsx20("span", { children: "\u8BC4\u5206\u4E2D\u2026" })
1808
+ stage === "scoring" && !readonly ? /* @__PURE__ */ jsxs14("div", { className: "rqk-follow-scoring", "aria-live": "polite", children: [
1809
+ /* @__PURE__ */ jsx21("span", { className: "rqk-follow-spinner", "aria-hidden": true }),
1810
+ /* @__PURE__ */ jsx21("span", { children: "\u8BC4\u5206\u4E2D\u2026" })
1747
1811
  ] }) : null
1748
1812
  ] });
1749
1813
  }
1750
1814
 
1751
1815
  // src/primitives/celebration.tsx
1752
1816
  import { useEffect as useEffect5, useState as useState8 } from "react";
1753
- import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
1817
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1754
1818
  var CONFETTI_COLORS = [
1755
1819
  "var(--rqk-gold)",
1756
1820
  "#ff6b6b",
@@ -1785,15 +1849,15 @@ function Celebration({
1785
1849
  return () => window.clearTimeout(timer);
1786
1850
  }, [autoHideMs, grade]);
1787
1851
  if (hidden) return null;
1788
- return /* @__PURE__ */ jsxs14("div", { className: classNames("rqk-celebrate", className), "data-grade": grade, role: "status", children: [
1789
- withConfetti ? /* @__PURE__ */ jsx21("div", { className: "rqk-confetti", "aria-hidden": true, children: Array.from({ length: CONFETTI_COUNT }).map((_, index) => {
1852
+ return /* @__PURE__ */ jsxs15("div", { className: classNames("rqk-celebrate", className), "data-grade": grade, role: "status", children: [
1853
+ withConfetti ? /* @__PURE__ */ jsx22("div", { className: "rqk-confetti", "aria-hidden": true, children: Array.from({ length: CONFETTI_COUNT }).map((_, index) => {
1790
1854
  const x = 4 + index * 37 % 93;
1791
1855
  const y = 8 + index * 11 % 26;
1792
1856
  const delay = index * 7 % 6 * 0.07;
1793
1857
  const duration = 1.1 + index * 5 % 7 * 0.1;
1794
1858
  const spin = 180 + index * 41 % 180;
1795
1859
  const drift = index * 13 % 48 - 24;
1796
- return /* @__PURE__ */ jsx21(
1860
+ return /* @__PURE__ */ jsx22(
1797
1861
  "span",
1798
1862
  {
1799
1863
  className: "rqk-confetti-piece",
@@ -1812,16 +1876,16 @@ function Celebration({
1812
1876
  index
1813
1877
  );
1814
1878
  }) }) : null,
1815
- /* @__PURE__ */ jsx21(StarRating, { value: config.stars, size: 26, animate: true }),
1816
- /* @__PURE__ */ jsx21("div", { className: "rqk-celebrate-title", children: title != null ? title : config.title }),
1817
- /* @__PURE__ */ jsx21("div", { className: "rqk-celebrate-ribbon", children: ribbon != null ? ribbon : config.ribbon }),
1818
- note ? /* @__PURE__ */ jsx21("div", { className: "rqk-celebrate-note", children: note }) : null
1879
+ /* @__PURE__ */ jsx22(StarRating, { value: config.stars, size: 26, animate: true }),
1880
+ /* @__PURE__ */ jsx22("div", { className: "rqk-celebrate-title", children: title != null ? title : config.title }),
1881
+ /* @__PURE__ */ jsx22("div", { className: "rqk-celebrate-ribbon", children: ribbon != null ? ribbon : config.ribbon }),
1882
+ note ? /* @__PURE__ */ jsx22("div", { className: "rqk-celebrate-note", children: note }) : null
1819
1883
  ] });
1820
1884
  }
1821
1885
 
1822
1886
  // src/primitives/record-cluster.tsx
1823
1887
  import { useEffect as useEffect6, useRef as useRef6, useState as useState9 } from "react";
1824
- import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1888
+ import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1825
1889
  function formatClock(value) {
1826
1890
  const total = Math.max(0, Math.floor(value));
1827
1891
  return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, "0")}`;
@@ -1884,9 +1948,9 @@ function RecordCluster({
1884
1948
  else start();
1885
1949
  };
1886
1950
  const statusText = hint != null ? hint : recording ? "\u6B63\u5728\u5F55\u97F3 \xB7 \u70B9\u51FB\u7ED3\u675F" : scoring ? "\u8BC4\u5206\u4E2D\u2026" : state === "done" ? "\u91CD\u65B0\u5F55\u97F3" : "\u70B9\u51FB\u8DDF\u8BFB";
1887
- return /* @__PURE__ */ jsxs15("div", { className: classNames("rqk-record-cluster", className), children: [
1888
- /* @__PURE__ */ jsxs15("div", { className: "rqk-record-row", children: [
1889
- /* @__PURE__ */ jsxs15(
1951
+ return /* @__PURE__ */ jsxs16("div", { className: classNames("rqk-record-cluster", className), children: [
1952
+ /* @__PURE__ */ jsxs16("div", { className: "rqk-record-row", children: [
1953
+ /* @__PURE__ */ jsxs16(
1890
1954
  "button",
1891
1955
  {
1892
1956
  type: "button",
@@ -1898,14 +1962,14 @@ function RecordCluster({
1898
1962
  "aria-label": "\u64AD\u653E\u8303\u8BFB",
1899
1963
  "aria-pressed": activeSide === "demo",
1900
1964
  children: [
1901
- /* @__PURE__ */ jsx22("span", { className: "rqk-record-side-icon", children: /* @__PURE__ */ jsx22(SpeakerIcon, { size: 22 }) }),
1902
- /* @__PURE__ */ jsx22("span", { className: "rqk-record-side-label", children: "\u53D1\u97F3" })
1965
+ /* @__PURE__ */ jsx23("span", { className: "rqk-record-side-icon", children: /* @__PURE__ */ jsx23(SpeakerIcon, { size: 22 }) }),
1966
+ /* @__PURE__ */ jsx23("span", { className: "rqk-record-side-label", children: "\u53D1\u97F3" })
1903
1967
  ]
1904
1968
  }
1905
1969
  ),
1906
- /* @__PURE__ */ jsxs15("div", { className: "rqk-record-main", children: [
1907
- recording ? /* @__PURE__ */ jsxs15("svg", { className: "rqk-record-ring", viewBox: "0 0 100 100", "aria-hidden": true, children: [
1908
- /* @__PURE__ */ jsx22(
1970
+ /* @__PURE__ */ jsxs16("div", { className: "rqk-record-main", children: [
1971
+ recording ? /* @__PURE__ */ jsxs16("svg", { className: "rqk-record-ring", viewBox: "0 0 100 100", "aria-hidden": true, children: [
1972
+ /* @__PURE__ */ jsx23(
1909
1973
  "circle",
1910
1974
  {
1911
1975
  className: "rqk-record-ring-track",
@@ -1915,9 +1979,9 @@ function RecordCluster({
1915
1979
  strokeDasharray: "283"
1916
1980
  }
1917
1981
  ),
1918
- /* @__PURE__ */ jsx22("circle", { cx: "50", cy: "50", r: "45", strokeDasharray: "283", strokeDashoffset: ringOffset })
1982
+ /* @__PURE__ */ jsx23("circle", { cx: "50", cy: "50", r: "45", strokeDasharray: "283", strokeDashoffset: ringOffset })
1919
1983
  ] }) : null,
1920
- /* @__PURE__ */ jsx22(
1984
+ /* @__PURE__ */ jsx23(
1921
1985
  "button",
1922
1986
  {
1923
1987
  type: "button",
@@ -1926,11 +1990,11 @@ function RecordCluster({
1926
1990
  disabled: disabled || scoring,
1927
1991
  "aria-label": recording ? "\u7ED3\u675F\u5F55\u97F3" : "\u5F00\u59CB\u5F55\u97F3",
1928
1992
  "aria-pressed": recording,
1929
- children: recording ? /* @__PURE__ */ jsx22("span", { className: "rqk-record-stop", "aria-hidden": true }) : /* @__PURE__ */ jsx22(MicIcon, { size: 30 })
1993
+ children: recording ? /* @__PURE__ */ jsx23("span", { className: "rqk-record-stop", "aria-hidden": true }) : /* @__PURE__ */ jsx23(MicIcon, { size: 30 })
1930
1994
  }
1931
1995
  )
1932
1996
  ] }),
1933
- /* @__PURE__ */ jsxs15(
1997
+ /* @__PURE__ */ jsxs16(
1934
1998
  "button",
1935
1999
  {
1936
2000
  type: "button",
@@ -1942,35 +2006,35 @@ function RecordCluster({
1942
2006
  "aria-label": "\u64AD\u653E\u6211\u7684\u5F55\u97F3",
1943
2007
  "aria-pressed": activeSide === "mine",
1944
2008
  children: [
1945
- /* @__PURE__ */ jsx22("span", { className: "rqk-record-side-icon", children: /* @__PURE__ */ jsx22(PlayIcon, { size: 20 }) }),
1946
- /* @__PURE__ */ jsx22("span", { className: "rqk-record-side-label", children: "\u6211\u7684" })
2009
+ /* @__PURE__ */ jsx23("span", { className: "rqk-record-side-icon", children: /* @__PURE__ */ jsx23(PlayIcon, { size: 20 }) }),
2010
+ /* @__PURE__ */ jsx23("span", { className: "rqk-record-side-label", children: "\u6211\u7684" })
1947
2011
  ]
1948
2012
  }
1949
2013
  )
1950
2014
  ] }),
1951
- /* @__PURE__ */ jsxs15(
2015
+ /* @__PURE__ */ jsxs16(
1952
2016
  "div",
1953
2017
  {
1954
2018
  className: classNames("rqk-record-status", hintTone !== "default" && `rqk-is-${hintTone}`),
1955
2019
  children: [
1956
- recording ? /* @__PURE__ */ jsxs15(Fragment3, { children: [
1957
- /* @__PURE__ */ jsxs15("span", { className: "rqk-record-status-timer", children: [
2020
+ recording ? /* @__PURE__ */ jsxs16(Fragment3, { children: [
2021
+ /* @__PURE__ */ jsxs16("span", { className: "rqk-record-status-timer", children: [
1958
2022
  formatClock(seconds),
1959
2023
  " / ",
1960
2024
  formatClock(maxSeconds)
1961
2025
  ] }),
1962
- /* @__PURE__ */ jsx22("span", { className: "rqk-record-status-sep", "aria-hidden": true, children: "\xB7" })
2026
+ /* @__PURE__ */ jsx23("span", { className: "rqk-record-status-sep", "aria-hidden": true, children: "\xB7" })
1963
2027
  ] }) : null,
1964
- /* @__PURE__ */ jsx22("span", { children: statusText })
2028
+ /* @__PURE__ */ jsx23("span", { children: statusText })
1965
2029
  ]
1966
2030
  }
1967
2031
  ),
1968
- detail ? /* @__PURE__ */ jsx22("div", { className: classNames("rqk-record-detail", detailTone === "bad" && "rqk-is-bad"), children: detail }) : null
2032
+ detail ? /* @__PURE__ */ jsx23("div", { className: classNames("rqk-record-detail", detailTone === "bad" && "rqk-is-bad"), children: detail }) : null
1969
2033
  ] });
1970
2034
  }
1971
2035
 
1972
2036
  // src/questions/follow-read/follow-controls.tsx
1973
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
2037
+ import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
1974
2038
  function FollowControls({
1975
2039
  grade,
1976
2040
  ribbon,
@@ -1990,9 +2054,9 @@ function FollowControls({
1990
2054
  onPlayDemo
1991
2055
  }) {
1992
2056
  const gradeValue = grade && grade !== "noise" ? grade : "again";
1993
- return /* @__PURE__ */ jsxs16("div", { className: "rqk-follow-bottom", children: [
1994
- grade && grade !== "noise" ? /* @__PURE__ */ jsx23(Celebration, { grade: gradeValue, ribbon, autoHideMs: 3200 }) : null,
1995
- /* @__PURE__ */ jsx23(
2057
+ return /* @__PURE__ */ jsxs17("div", { className: "rqk-follow-bottom", children: [
2058
+ grade && grade !== "noise" ? /* @__PURE__ */ jsx24(Celebration, { grade: gradeValue, ribbon, autoHideMs: 3200 }) : null,
2059
+ /* @__PURE__ */ jsx24(
1996
2060
  RecordCluster,
1997
2061
  {
1998
2062
  state: readonly ? "idle" : recordState2,
@@ -2288,7 +2352,7 @@ function useFollowRead({
2288
2352
  }
2289
2353
 
2290
2354
  // src/questions/follow-read/index.tsx
2291
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
2355
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
2292
2356
  function FollowRead({
2293
2357
  data,
2294
2358
  mode = "answer",
@@ -2323,13 +2387,13 @@ function FollowRead({
2323
2387
  onNext
2324
2388
  });
2325
2389
  const displayTitle = title != null ? title : data.kind === "word" ? "\u5355\u8BCD\u8DDF\u8BFB" : "\u53E5\u5B50\u8DDF\u8BFB";
2326
- const instructionText = instruction != null ? instruction : data.kind === "word" ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
2390
+ const instructionText = instruction != null ? instruction : data.kind === "word" ? /* @__PURE__ */ jsxs18(Fragment4, { children: [
2327
2391
  "\u542C\u5355\u8BCD\u793A\u8303\uFF0C\u70B9\u51FB\u9EA6\u514B\u98CE",
2328
- /* @__PURE__ */ jsx24("b", { children: "\u5927\u58F0\u8DDF\u8BFB" }),
2392
+ /* @__PURE__ */ jsx25("b", { children: "\u5927\u58F0\u8DDF\u8BFB" }),
2329
2393
  "\uFF0C\u81EA\u52A8\u8BC4\u5206"
2330
- ] }) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
2394
+ ] }) : /* @__PURE__ */ jsxs18(Fragment4, { children: [
2331
2395
  "\u542C\u53E5\u5B50\u793A\u8303\uFF0C\u70B9\u51FB\u9EA6\u514B\u98CE",
2332
- /* @__PURE__ */ jsx24("b", { children: "\u5927\u58F0\u8DDF\u8BFB" }),
2396
+ /* @__PURE__ */ jsx25("b", { children: "\u5927\u58F0\u8DDF\u8BFB" }),
2333
2397
  "\uFF0C\u9010\u8BCD\u8BC4\u5206"
2334
2398
  ] });
2335
2399
  const detail = detailHint({
@@ -2344,7 +2408,7 @@ function FollowRead({
2344
2408
  });
2345
2409
  const hasPrev = index > 1 && Boolean(onPrev);
2346
2410
  const hasFooter = actions.length > 0 || hasPrev;
2347
- return /* @__PURE__ */ jsxs17(
2411
+ return /* @__PURE__ */ jsxs18(
2348
2412
  QuestShell,
2349
2413
  {
2350
2414
  mode,
@@ -2360,11 +2424,11 @@ function FollowRead({
2360
2424
  className
2361
2425
  ),
2362
2426
  dataQuest: "follow-read",
2363
- footer: hasFooter ? /* @__PURE__ */ jsx24(ActionBar, { actions, index, onPrev }) : void 0,
2427
+ footer: hasFooter ? /* @__PURE__ */ jsx25(ActionBar, { actions, index, total, onPrev }) : void 0,
2364
2428
  children: [
2365
- /* @__PURE__ */ jsxs17(Fragment4, { children: [
2366
- /* @__PURE__ */ jsx24("div", { className: "rqk-follow-instr", children: instructionText }),
2367
- /* @__PURE__ */ jsx24(
2429
+ /* @__PURE__ */ jsxs18(Fragment4, { children: [
2430
+ /* @__PURE__ */ jsx25("div", { className: "rqk-follow-instr", children: instructionText }),
2431
+ /* @__PURE__ */ jsx25(
2368
2432
  FollowContent,
2369
2433
  {
2370
2434
  data,
@@ -2375,7 +2439,7 @@ function FollowRead({
2375
2439
  startBadgeVisible: !model.readonly && model.stage === "ready"
2376
2440
  }
2377
2441
  ),
2378
- /* @__PURE__ */ jsx24(
2442
+ /* @__PURE__ */ jsx25(
2379
2443
  FollowControls,
2380
2444
  {
2381
2445
  grade: model.grade,
@@ -2397,7 +2461,7 @@ function FollowRead({
2397
2461
  }
2398
2462
  )
2399
2463
  ] }),
2400
- model.demoFail ? /* @__PURE__ */ jsx24(FollowReadToast, { message: "\u8303\u8BFB\u52A0\u8F7D\u5931\u8D25 \xB7 \u53EF\u91CD\u8BD5 3 \u6B21" }) : null
2464
+ model.demoFail ? /* @__PURE__ */ jsx25(FollowReadToast, { message: "\u8303\u8BFB\u52A0\u8F7D\u5931\u8D25 \xB7 \u53EF\u91CD\u8BD5 3 \u6B21" }) : null
2401
2465
  ]
2402
2466
  }
2403
2467
  );
@@ -2434,7 +2498,7 @@ function linkMatchActions({
2434
2498
  }
2435
2499
 
2436
2500
  // src/questions/link-match/feedback.tsx
2437
- import { jsx as jsx25 } from "react/jsx-runtime";
2501
+ import { jsx as jsx26 } from "react/jsx-runtime";
2438
2502
  function LinkMatchFeedback({
2439
2503
  readonly,
2440
2504
  phase,
@@ -2443,7 +2507,7 @@ function LinkMatchFeedback({
2443
2507
  answerText
2444
2508
  }) {
2445
2509
  if (readonly) {
2446
- return /* @__PURE__ */ jsx25(
2510
+ return /* @__PURE__ */ jsx26(
2447
2511
  FeedbackSheet,
2448
2512
  {
2449
2513
  tone: "ok",
@@ -2455,13 +2519,13 @@ function LinkMatchFeedback({
2455
2519
  );
2456
2520
  }
2457
2521
  if (phase === "retry") {
2458
- return /* @__PURE__ */ jsx25(FeedbackSheet, { tone: "warn", title: "\u6709\u8FDE\u9519\u7684\u7EBF\uFF0C\u518D\u8BD5\u4E00\u6B21", detail: "\u6B63\u786E\u7684\u8FDE\u7EBF\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
2522
+ return /* @__PURE__ */ jsx26(FeedbackSheet, { tone: "warn", title: "\u6709\u8FDE\u9519\u7684\u7EBF\uFF0C\u518D\u8BD5\u4E00\u6B21", detail: "\u6B63\u786E\u7684\u8FDE\u7EBF\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
2459
2523
  }
2460
2524
  if (phase === "correct") {
2461
- return /* @__PURE__ */ jsx25(FeedbackSheet, { tone: "ok", title: labels.correctAll });
2525
+ return /* @__PURE__ */ jsx26(FeedbackSheet, { tone: "ok", title: labels.correctAll });
2462
2526
  }
2463
2527
  if (phase === "locked") {
2464
- return /* @__PURE__ */ jsx25(
2528
+ return /* @__PURE__ */ jsx26(
2465
2529
  FeedbackSheet,
2466
2530
  {
2467
2531
  tone: "bad",
@@ -2507,7 +2571,7 @@ function nodeOk(data, side, nodeIndex) {
2507
2571
  }
2508
2572
 
2509
2573
  // src/questions/link-match/link-node.tsx
2510
- import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
2574
+ import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
2511
2575
  var BARS = [8, 14, 20, 10, 24, 16, 9, 18, 12];
2512
2576
  function LinkNode({
2513
2577
  side,
@@ -2524,7 +2588,7 @@ function LinkNode({
2524
2588
  }) {
2525
2589
  var _a, _b;
2526
2590
  const label = nodeLabel(node, kind, nodeIndex);
2527
- return /* @__PURE__ */ jsxs18(
2591
+ return /* @__PURE__ */ jsxs19(
2528
2592
  "button",
2529
2593
  {
2530
2594
  type: "button",
@@ -2545,10 +2609,10 @@ function LinkNode({
2545
2609
  "aria-pressed": picked,
2546
2610
  "aria-label": label,
2547
2611
  children: [
2548
- side === "right" ? /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-marker", children: optionLetter(nodeIndex) }) : null,
2549
- kind === "image" ? /* @__PURE__ */ jsxs18("span", { className: "rqk-link-node-media", children: [
2550
- /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-media-fallback", children: (_a = node.imageAlt) != null ? _a : typeof node.text === "string" ? node.text : "\u56FE\u7247" }),
2551
- node.image ? /* @__PURE__ */ jsx26(
2612
+ side === "right" ? /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-marker", children: optionLetter(nodeIndex) }) : null,
2613
+ kind === "image" ? /* @__PURE__ */ jsxs19("span", { className: "rqk-link-node-media", children: [
2614
+ /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-media-fallback", children: (_a = node.imageAlt) != null ? _a : typeof node.text === "string" ? node.text : "\u56FE\u7247" }),
2615
+ node.image ? /* @__PURE__ */ jsx27(
2552
2616
  "img",
2553
2617
  {
2554
2618
  className: "rqk-link-node-image-media",
@@ -2558,27 +2622,27 @@ function LinkNode({
2558
2622
  event.currentTarget.style.opacity = "0";
2559
2623
  }
2560
2624
  }
2561
- ) : node.art ? /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-art", children: /* @__PURE__ */ jsx26(Art, { name: node.art }) }) : null
2562
- ] }) : kind === "audio" ? /* @__PURE__ */ jsxs18("span", { className: "rqk-link-node-audio", children: [
2563
- /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-audio-icon", "aria-hidden": true, children: /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-audio-triangle" }) }),
2564
- /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-wave", "aria-hidden": true, children: BARS.map((height, barIndex) => /* @__PURE__ */ jsx26("span", { style: { height } }, barIndex)) })
2565
- ] }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
2566
- /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-text", children: node.text }),
2567
- node.phonetic ? /* @__PURE__ */ jsx26("span", { className: "rqk-link-node-sub", children: node.phonetic }) : null,
2568
- node.speak || node.audio ? /* @__PURE__ */ jsxs18("span", { className: "rqk-link-node-sound", "aria-hidden": true, children: [
2569
- /* @__PURE__ */ jsx26("span", {}),
2570
- /* @__PURE__ */ jsx26("span", {}),
2571
- /* @__PURE__ */ jsx26("span", {})
2625
+ ) : node.art ? /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-art", children: /* @__PURE__ */ jsx27(Art, { name: node.art }) }) : null
2626
+ ] }) : kind === "audio" ? /* @__PURE__ */ jsxs19("span", { className: "rqk-link-node-audio", children: [
2627
+ /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-audio-icon", "aria-hidden": true, children: /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-audio-triangle" }) }),
2628
+ /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-wave", "aria-hidden": true, children: BARS.map((height, barIndex) => /* @__PURE__ */ jsx27("span", { style: { height } }, barIndex)) })
2629
+ ] }) : /* @__PURE__ */ jsxs19(Fragment5, { children: [
2630
+ /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-text", children: node.text }),
2631
+ node.phonetic ? /* @__PURE__ */ jsx27("span", { className: "rqk-link-node-sub", children: node.phonetic }) : null,
2632
+ node.speak || node.audio ? /* @__PURE__ */ jsxs19("span", { className: "rqk-link-node-sound", "aria-hidden": true, children: [
2633
+ /* @__PURE__ */ jsx27("span", {}),
2634
+ /* @__PURE__ */ jsx27("span", {}),
2635
+ /* @__PURE__ */ jsx27("span", {})
2572
2636
  ] }) : null
2573
2637
  ] }),
2574
- /* @__PURE__ */ jsx26("span", { className: "rqk-link-dot", "aria-hidden": true })
2638
+ /* @__PURE__ */ jsx27("span", { className: "rqk-link-dot", "aria-hidden": true })
2575
2639
  ]
2576
2640
  }
2577
2641
  );
2578
2642
  }
2579
2643
 
2580
2644
  // src/questions/link-match/link-board.tsx
2581
- import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
2645
+ import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
2582
2646
  function LinkBoard({
2583
2647
  data,
2584
2648
  leftKind,
@@ -2596,7 +2660,7 @@ function LinkBoard({
2596
2660
  readonly,
2597
2661
  onNode
2598
2662
  }) {
2599
- return /* @__PURE__ */ jsxs19(
2663
+ return /* @__PURE__ */ jsxs20(
2600
2664
  "div",
2601
2665
  {
2602
2666
  className: classNames("rqk-link-board", `rqk-link-board-h-${boardHeightKind}`),
@@ -2604,7 +2668,7 @@ function LinkBoard({
2604
2668
  boardRef.current = element;
2605
2669
  },
2606
2670
  children: [
2607
- /* @__PURE__ */ jsx27("svg", { className: "rqk-link-lines", width: size.width, height: size.height, "aria-hidden": true, children: paths.map((path) => /* @__PURE__ */ jsx27(
2671
+ /* @__PURE__ */ jsx28("svg", { className: "rqk-link-lines", width: size.width, height: size.height, "aria-hidden": true, children: paths.map((path) => /* @__PURE__ */ jsx28(
2608
2672
  "path",
2609
2673
  {
2610
2674
  d: path.d,
@@ -2620,7 +2684,7 @@ function LinkBoard({
2620
2684
  const kind = side === "left" ? leftKind : rightKind;
2621
2685
  const nodes = side === "left" ? data.left : data.right;
2622
2686
  const refs = side === "left" ? leftRefs : rightRefs;
2623
- return /* @__PURE__ */ jsx27(
2687
+ return /* @__PURE__ */ jsx28(
2624
2688
  "div",
2625
2689
  {
2626
2690
  className: classNames(
@@ -2636,7 +2700,7 @@ function LinkBoard({
2636
2700
  const isPlaying = (playing == null ? void 0 : playing.side) === side && playing.index === nodeIndex;
2637
2701
  const correct = phase === "locked" || readonly ? nodeOk(data, side, nodeIndex) : false;
2638
2702
  const wrong = phase === "locked" && side === "left" && !nodeOk(data, side, nodeIndex);
2639
- return /* @__PURE__ */ jsx27(
2703
+ return /* @__PURE__ */ jsx28(
2640
2704
  LinkNode,
2641
2705
  {
2642
2706
  side,
@@ -2878,7 +2942,7 @@ function projectKind(side, leftKind, rightKind) {
2878
2942
  }
2879
2943
 
2880
2944
  // src/questions/link-match/index.tsx
2881
- import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
2945
+ import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
2882
2946
  function LinkMatch({
2883
2947
  data,
2884
2948
  mode = "answer",
@@ -2927,7 +2991,7 @@ function LinkMatch({
2927
2991
  onSubmit: pairs.handleSubmit,
2928
2992
  onRetry: pairs.judge.retry
2929
2993
  });
2930
- return /* @__PURE__ */ jsx28(
2994
+ return /* @__PURE__ */ jsx29(
2931
2995
  QuestShell,
2932
2996
  {
2933
2997
  mode,
@@ -2938,7 +3002,7 @@ function LinkMatch({
2938
3002
  onBack,
2939
3003
  className: classNames("rqk-quest", className),
2940
3004
  dataQuest: "link-match",
2941
- feedback: /* @__PURE__ */ jsx28(
3005
+ feedback: /* @__PURE__ */ jsx29(
2942
3006
  LinkMatchFeedback,
2943
3007
  {
2944
3008
  readonly: pairs.readonly,
@@ -2948,10 +3012,10 @@ function LinkMatch({
2948
3012
  answerText: pairs.answerText
2949
3013
  }
2950
3014
  ),
2951
- footer: /* @__PURE__ */ jsx28(ActionBar, { actions, index, onPrev }),
2952
- children: /* @__PURE__ */ jsxs20(Fragment6, { children: [
2953
- data.hint ? /* @__PURE__ */ jsx28("div", { className: "rqk-link-hint", children: data.hint }) : null,
2954
- /* @__PURE__ */ jsx28(
3015
+ footer: /* @__PURE__ */ jsx29(ActionBar, { actions, index, total, onPrev }),
3016
+ children: /* @__PURE__ */ jsxs21(Fragment6, { children: [
3017
+ data.hint ? /* @__PURE__ */ jsx29("div", { className: "rqk-link-hint", children: data.hint }) : null,
3018
+ /* @__PURE__ */ jsx29(
2955
3019
  LinkBoard,
2956
3020
  {
2957
3021
  data,
@@ -3000,7 +3064,7 @@ function rearrangeActions({
3000
3064
  }
3001
3065
 
3002
3066
  // src/questions/rearrange/feedback.tsx
3003
- import { jsx as jsx29 } from "react/jsx-runtime";
3067
+ import { jsx as jsx30 } from "react/jsx-runtime";
3004
3068
  function RearrangeFeedback({
3005
3069
  readonly,
3006
3070
  phase,
@@ -3009,7 +3073,7 @@ function RearrangeFeedback({
3009
3073
  answerText
3010
3074
  }) {
3011
3075
  if (readonly) {
3012
- return /* @__PURE__ */ jsx29(
3076
+ return /* @__PURE__ */ jsx30(
3013
3077
  FeedbackSheet,
3014
3078
  {
3015
3079
  tone: "ok",
@@ -3021,7 +3085,7 @@ function RearrangeFeedback({
3021
3085
  );
3022
3086
  }
3023
3087
  if (phase === "retry") {
3024
- return /* @__PURE__ */ jsx29(
3088
+ return /* @__PURE__ */ jsx30(
3025
3089
  FeedbackSheet,
3026
3090
  {
3027
3091
  tone: "warn",
@@ -3031,10 +3095,10 @@ function RearrangeFeedback({
3031
3095
  );
3032
3096
  }
3033
3097
  if (phase === "correct") {
3034
- return /* @__PURE__ */ jsx29(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
3098
+ return /* @__PURE__ */ jsx30(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
3035
3099
  }
3036
3100
  if (phase === "locked") {
3037
- return /* @__PURE__ */ jsx29(
3101
+ return /* @__PURE__ */ jsx30(
3038
3102
  FeedbackSheet,
3039
3103
  {
3040
3104
  tone: "bad",
@@ -3050,7 +3114,7 @@ function RearrangeFeedback({
3050
3114
  }
3051
3115
 
3052
3116
  // src/primitives/word-chip.tsx
3053
- import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
3117
+ import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
3054
3118
  function WordChip({
3055
3119
  children,
3056
3120
  onClick,
@@ -3061,7 +3125,7 @@ function WordChip({
3061
3125
  className,
3062
3126
  ariaLabel
3063
3127
  }) {
3064
- return /* @__PURE__ */ jsxs21(
3128
+ return /* @__PURE__ */ jsxs22(
3065
3129
  "button",
3066
3130
  {
3067
3131
  type: "button",
@@ -3076,14 +3140,14 @@ function WordChip({
3076
3140
  "aria-label": ariaLabel,
3077
3141
  children: [
3078
3142
  children,
3079
- removable ? /* @__PURE__ */ jsx30(CrossIcon, { className: "rqk-chip-remove", size: 14 }) : null
3143
+ removable ? /* @__PURE__ */ jsx31(CrossIcon, { className: "rqk-chip-remove", size: 14 }) : null
3080
3144
  ]
3081
3145
  }
3082
3146
  );
3083
3147
  }
3084
3148
 
3085
3149
  // src/questions/rearrange/bank-card.tsx
3086
- import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
3150
+ import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
3087
3151
  function RearrangeBank({
3088
3152
  data,
3089
3153
  bank,
@@ -3091,11 +3155,11 @@ function RearrangeBank({
3091
3155
  tileUsed,
3092
3156
  onPick
3093
3157
  }) {
3094
- return /* @__PURE__ */ jsxs22(Card, { className: "rqk-rearrange-bank", children: [
3095
- /* @__PURE__ */ jsx31("div", { className: "rqk-rearrange-bank-label", children: data.kind === "word" ? "\u53EF\u9009\u5B57\u6BCD" : "\u53EF\u9009\u5355\u8BCD" }),
3096
- /* @__PURE__ */ jsx31("div", { className: "rqk-rearrange-tiles", children: bank.map((tile, tileIndex) => {
3158
+ return /* @__PURE__ */ jsxs23(Card, { className: "rqk-rearrange-bank", children: [
3159
+ /* @__PURE__ */ jsx32("div", { className: "rqk-rearrange-bank-label", children: data.kind === "word" ? "\u53EF\u9009\u5B57\u6BCD" : "\u53EF\u9009\u5355\u8BCD" }),
3160
+ /* @__PURE__ */ jsx32("div", { className: "rqk-rearrange-tiles", children: bank.map((tile, tileIndex) => {
3097
3161
  const used = tileUsed(tile);
3098
- return /* @__PURE__ */ jsx31(
3162
+ return /* @__PURE__ */ jsx32(
3099
3163
  WordChip,
3100
3164
  {
3101
3165
  variant: data.kind === "word" ? "letter" : "bank",
@@ -3111,7 +3175,7 @@ function RearrangeBank({
3111
3175
  }
3112
3176
 
3113
3177
  // src/questions/rearrange/slots-card.tsx
3114
- import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
3178
+ import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
3115
3179
  function RearrangeSlots({
3116
3180
  data,
3117
3181
  slots,
@@ -3121,15 +3185,15 @@ function RearrangeSlots({
3121
3185
  isSlotOk,
3122
3186
  onSlot
3123
3187
  }) {
3124
- return /* @__PURE__ */ jsxs23(Card, { className: "rqk-rearrange-slots", children: [
3125
- data.hint ? /* @__PURE__ */ jsxs23("div", { className: "rqk-rearrange-hint", children: [
3188
+ return /* @__PURE__ */ jsxs24(Card, { className: "rqk-rearrange-slots", children: [
3189
+ data.hint ? /* @__PURE__ */ jsxs24("div", { className: "rqk-rearrange-hint", children: [
3126
3190
  "\u63D0\u793A\uFF1A",
3127
3191
  data.hint
3128
3192
  ] }) : null,
3129
3193
  slots.map((slot, slotIndex) => {
3130
3194
  const value = slot.holder ? slot.char : filled[slotIndex];
3131
3195
  const current = !slot.holder && !value && cursor === slotIndex;
3132
- return /* @__PURE__ */ jsxs23(
3196
+ return /* @__PURE__ */ jsxs24(
3133
3197
  "button",
3134
3198
  {
3135
3199
  type: "button",
@@ -3145,7 +3209,7 @@ function RearrangeSlots({
3145
3209
  disabled: slot.holder,
3146
3210
  children: [
3147
3211
  value,
3148
- current ? /* @__PURE__ */ jsx32("span", { className: "rqk-rearrange-caret" }) : null
3212
+ current ? /* @__PURE__ */ jsx33("span", { className: "rqk-rearrange-caret" }) : null
3149
3213
  ]
3150
3214
  },
3151
3215
  slotIndex
@@ -3155,7 +3219,7 @@ function RearrangeSlots({
3155
3219
  }
3156
3220
 
3157
3221
  // src/questions/rearrange/rearrange-page.tsx
3158
- import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
3222
+ import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
3159
3223
  function RearrangePage({
3160
3224
  data,
3161
3225
  slots,
@@ -3169,8 +3233,8 @@ function RearrangePage({
3169
3233
  onSlot,
3170
3234
  onPick
3171
3235
  }) {
3172
- return /* @__PURE__ */ jsxs24(Fragment7, { children: [
3173
- /* @__PURE__ */ jsx33(
3236
+ return /* @__PURE__ */ jsxs25(Fragment7, { children: [
3237
+ /* @__PURE__ */ jsx34(
3174
3238
  RearrangeSlots,
3175
3239
  {
3176
3240
  data,
@@ -3182,7 +3246,7 @@ function RearrangePage({
3182
3246
  onSlot
3183
3247
  }
3184
3248
  ),
3185
- /* @__PURE__ */ jsx33(RearrangeBank, { data, bank, frozen, tileUsed, onPick })
3249
+ /* @__PURE__ */ jsx34(RearrangeBank, { data, bank, frozen, tileUsed, onPick })
3186
3250
  ] });
3187
3251
  }
3188
3252
 
@@ -3362,7 +3426,7 @@ function useRearrange({
3362
3426
  }
3363
3427
 
3364
3428
  // src/questions/rearrange/index.tsx
3365
- import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
3429
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
3366
3430
  function Rearrange({
3367
3431
  data,
3368
3432
  mode = "answer",
@@ -3388,26 +3452,26 @@ function Rearrange({
3388
3452
  onSubmit: model.handleSubmit,
3389
3453
  onRetry: model.judge.retry
3390
3454
  });
3391
- return /* @__PURE__ */ jsx34(
3455
+ return /* @__PURE__ */ jsx35(
3392
3456
  QuestShell,
3393
3457
  {
3394
3458
  mode,
3395
3459
  title: title != null ? title : data.kind === "word" ? "\u5355\u8BCD\u91CD\u7EC4" : "\u53E5\u5B50\u91CD\u7EC4",
3396
3460
  index,
3397
3461
  total,
3398
- instruction: instruction != null ? instruction : data.kind === "word" ? /* @__PURE__ */ jsxs25(Fragment8, { children: [
3462
+ instruction: instruction != null ? instruction : data.kind === "word" ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
3399
3463
  "\u6309\u5B57\u6BCD\u987A\u5E8F\u586B\u5165",
3400
- /* @__PURE__ */ jsx34("b", { children: "\u6A2A\u7EBF" }),
3464
+ /* @__PURE__ */ jsx35("b", { children: "\u6A2A\u7EBF" }),
3401
3465
  "\uFF0C\u62FC\u51FA\u5355\u8BCD"
3402
- ] }) : /* @__PURE__ */ jsxs25(Fragment8, { children: [
3466
+ ] }) : /* @__PURE__ */ jsxs26(Fragment8, { children: [
3403
3467
  "\u6309\u6B63\u786E\u987A\u5E8F\u628A\u8BCD\u5757\u586B\u5165",
3404
- /* @__PURE__ */ jsx34("b", { children: "\u6A2A\u7EBF" }),
3468
+ /* @__PURE__ */ jsx35("b", { children: "\u6A2A\u7EBF" }),
3405
3469
  "\uFF0C\u62FC\u51FA\u53E5\u5B50"
3406
3470
  ] }),
3407
3471
  onBack,
3408
3472
  className: classNames("rqk-quest", "rqk-rearrange", className),
3409
3473
  dataQuest: "rearrange",
3410
- feedback: /* @__PURE__ */ jsx34(
3474
+ feedback: /* @__PURE__ */ jsx35(
3411
3475
  RearrangeFeedback,
3412
3476
  {
3413
3477
  readonly: model.readonly,
@@ -3417,8 +3481,8 @@ function Rearrange({
3417
3481
  answerText: targetAnswerText(data)
3418
3482
  }
3419
3483
  ),
3420
- footer: /* @__PURE__ */ jsx34(ActionBar, { actions, index, onPrev }),
3421
- children: /* @__PURE__ */ jsx34(
3484
+ footer: /* @__PURE__ */ jsx35(ActionBar, { actions, index, total, onPrev }),
3485
+ children: /* @__PURE__ */ jsx35(
3422
3486
  RearrangePage,
3423
3487
  {
3424
3488
  data,
@@ -3462,20 +3526,20 @@ function classifyActions({
3462
3526
  }
3463
3527
 
3464
3528
  // src/questions/classify/bank-card.tsx
3465
- import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
3529
+ import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
3466
3530
  function ClassifyBank({
3467
3531
  data,
3468
3532
  remaining,
3469
3533
  frozen,
3470
3534
  onPick
3471
3535
  }) {
3472
- return /* @__PURE__ */ jsxs26(Card, { className: "rqk-classify-bank", children: [
3473
- /* @__PURE__ */ jsxs26("div", { className: "rqk-classify-bank-label", children: [
3536
+ return /* @__PURE__ */ jsxs27(Card, { className: "rqk-classify-bank", children: [
3537
+ /* @__PURE__ */ jsxs27("div", { className: "rqk-classify-bank-label", children: [
3474
3538
  "\u5F85\u5206\u7C7B \xB7 \u5269\u4F59 ",
3475
3539
  remaining.length,
3476
3540
  " \u9879"
3477
3541
  ] }),
3478
- /* @__PURE__ */ jsx35("div", { className: "rqk-classify-bank-items", children: remaining.length ? remaining.map((itemIndex) => /* @__PURE__ */ jsx35(
3542
+ /* @__PURE__ */ jsx36("div", { className: "rqk-classify-bank-items", children: remaining.length ? remaining.map((itemIndex) => /* @__PURE__ */ jsx36(
3479
3543
  WordChip,
3480
3544
  {
3481
3545
  variant: "bank",
@@ -3484,12 +3548,12 @@ function ClassifyBank({
3484
3548
  children: data.items[itemIndex].text
3485
3549
  },
3486
3550
  itemIndex
3487
- )) : /* @__PURE__ */ jsx35("span", { className: "rqk-classify-empty", children: "\u5DF2\u5168\u90E8\u5F52\u7C7B" }) })
3551
+ )) : /* @__PURE__ */ jsx36("span", { className: "rqk-classify-empty", children: "\u5DF2\u5168\u90E8\u5F52\u7C7B" }) })
3488
3552
  ] });
3489
3553
  }
3490
3554
 
3491
3555
  // src/questions/classify/category-card.tsx
3492
- import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
3556
+ import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
3493
3557
  function ClassifyCategory({
3494
3558
  categoryIndex,
3495
3559
  category,
@@ -3503,7 +3567,7 @@ function ClassifyCategory({
3503
3567
  }) {
3504
3568
  const items = data.items.map((_item, itemIndex) => placed[itemIndex] === categoryIndex ? itemIndex : null).filter((itemIndex) => itemIndex !== null);
3505
3569
  const focused = !frozen && current === categoryIndex;
3506
- return /* @__PURE__ */ jsxs27(
3570
+ return /* @__PURE__ */ jsxs28(
3507
3571
  "div",
3508
3572
  {
3509
3573
  className: classNames("rqk-card", "rqk-classify-cat", focused && "rqk-is-selected"),
@@ -3517,20 +3581,20 @@ function ClassifyCategory({
3517
3581
  role: "button",
3518
3582
  tabIndex: frozen ? -1 : 0,
3519
3583
  children: [
3520
- /* @__PURE__ */ jsxs27("div", { className: "rqk-classify-cat-head", children: [
3521
- /* @__PURE__ */ jsxs27("span", { className: "rqk-classify-cat-name", children: [
3584
+ /* @__PURE__ */ jsxs28("div", { className: "rqk-classify-cat-head", children: [
3585
+ /* @__PURE__ */ jsxs28("span", { className: "rqk-classify-cat-name", children: [
3522
3586
  category.label,
3523
- category.sub ? /* @__PURE__ */ jsx36("em", { className: "rqk-classify-cat-sub", children: category.sub }) : null
3587
+ category.sub ? /* @__PURE__ */ jsx37("em", { className: "rqk-classify-cat-sub", children: category.sub }) : null
3524
3588
  ] }),
3525
- /* @__PURE__ */ jsxs27("span", { className: "rqk-classify-cat-count", children: [
3589
+ /* @__PURE__ */ jsxs28("span", { className: "rqk-classify-cat-count", children: [
3526
3590
  items.length,
3527
3591
  " \u9879"
3528
3592
  ] })
3529
3593
  ] }),
3530
- /* @__PURE__ */ jsx36("div", { className: "rqk-classify-cat-body", children: items.length ? items.map((itemIndex) => {
3594
+ /* @__PURE__ */ jsx37("div", { className: "rqk-classify-cat-body", children: items.length ? items.map((itemIndex) => {
3531
3595
  const item = data.items[itemIndex];
3532
3596
  const slotOk = placed[itemIndex] === item.category;
3533
- return /* @__PURE__ */ jsx36(
3597
+ return /* @__PURE__ */ jsx37(
3534
3598
  WordChip,
3535
3599
  {
3536
3600
  variant: "placed",
@@ -3545,14 +3609,14 @@ function ClassifyCategory({
3545
3609
  },
3546
3610
  itemIndex
3547
3611
  );
3548
- }) : /* @__PURE__ */ jsx36("span", { className: "rqk-classify-empty", children: "\u70B9\u51FB\u9009\u9879\u653E\u5165\u8FD9\u4E00\u7C7B" }) })
3612
+ }) : /* @__PURE__ */ jsx37("span", { className: "rqk-classify-empty", children: "\u70B9\u51FB\u9009\u9879\u653E\u5165\u8FD9\u4E00\u7C7B" }) })
3549
3613
  ]
3550
3614
  }
3551
3615
  );
3552
3616
  }
3553
3617
 
3554
3618
  // src/questions/classify/classify-page.tsx
3555
- import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
3619
+ import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
3556
3620
  function ClassifyPage({
3557
3621
  data,
3558
3622
  placed,
@@ -3564,8 +3628,8 @@ function ClassifyPage({
3564
3628
  onUnplace,
3565
3629
  onPick
3566
3630
  }) {
3567
- return /* @__PURE__ */ jsxs28(Fragment9, { children: [
3568
- data.categories.map((category, categoryIndex) => /* @__PURE__ */ jsx37(
3631
+ return /* @__PURE__ */ jsxs29(Fragment9, { children: [
3632
+ data.categories.map((category, categoryIndex) => /* @__PURE__ */ jsx38(
3569
3633
  ClassifyCategory,
3570
3634
  {
3571
3635
  categoryIndex,
@@ -3580,12 +3644,12 @@ function ClassifyPage({
3580
3644
  },
3581
3645
  categoryIndex
3582
3646
  )),
3583
- /* @__PURE__ */ jsx37(ClassifyBank, { data, remaining, frozen, onPick })
3647
+ /* @__PURE__ */ jsx38(ClassifyBank, { data, remaining, frozen, onPick })
3584
3648
  ] });
3585
3649
  }
3586
3650
 
3587
3651
  // src/questions/classify/feedback.tsx
3588
- import { jsx as jsx38 } from "react/jsx-runtime";
3652
+ import { jsx as jsx39 } from "react/jsx-runtime";
3589
3653
  function ClassifyFeedback({
3590
3654
  readonly,
3591
3655
  phase,
@@ -3594,7 +3658,7 @@ function ClassifyFeedback({
3594
3658
  answerText
3595
3659
  }) {
3596
3660
  if (readonly) {
3597
- return /* @__PURE__ */ jsx38(
3661
+ return /* @__PURE__ */ jsx39(
3598
3662
  FeedbackSheet,
3599
3663
  {
3600
3664
  tone: "ok",
@@ -3606,13 +3670,13 @@ function ClassifyFeedback({
3606
3670
  );
3607
3671
  }
3608
3672
  if (phase === "retry") {
3609
- return /* @__PURE__ */ jsx38(FeedbackSheet, { tone: "warn", title: "\u6709\u653E\u9519\u7C7B\u522B\u7684\u5355\u8BCD", detail: "\u5206\u7C7B\u6B63\u786E\u7684\u5355\u8BCD\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
3673
+ return /* @__PURE__ */ jsx39(FeedbackSheet, { tone: "warn", title: "\u6709\u653E\u9519\u7C7B\u522B\u7684\u5355\u8BCD", detail: "\u5206\u7C7B\u6B63\u786E\u7684\u5355\u8BCD\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
3610
3674
  }
3611
3675
  if (phase === "correct") {
3612
- return /* @__PURE__ */ jsx38(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
3676
+ return /* @__PURE__ */ jsx39(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
3613
3677
  }
3614
3678
  if (phase === "locked") {
3615
- return /* @__PURE__ */ jsx38(
3679
+ return /* @__PURE__ */ jsx39(
3616
3680
  FeedbackSheet,
3617
3681
  {
3618
3682
  tone: "bad",
@@ -3710,7 +3774,7 @@ function useClassify({
3710
3774
  }
3711
3775
 
3712
3776
  // src/questions/classify/index.tsx
3713
- import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
3777
+ import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
3714
3778
  function Classify({
3715
3779
  data,
3716
3780
  mode = "answer",
@@ -3736,21 +3800,21 @@ function Classify({
3736
3800
  onSubmit: model.handleSubmit,
3737
3801
  onRetry: model.judge.retry
3738
3802
  });
3739
- return /* @__PURE__ */ jsx39(
3803
+ return /* @__PURE__ */ jsx40(
3740
3804
  QuestShell,
3741
3805
  {
3742
3806
  mode,
3743
3807
  title: title != null ? title : "\u5206\u7C7B\u9898",
3744
3808
  index,
3745
3809
  total,
3746
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs29(Fragment10, { children: [
3810
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs30(Fragment10, { children: [
3747
3811
  "\u628A\u5355\u8BCD\u70B9\u9009\u5230",
3748
- /* @__PURE__ */ jsx39("b", { children: "\u6B63\u786E\u7684\u7C7B\u522B" })
3812
+ /* @__PURE__ */ jsx40("b", { children: "\u6B63\u786E\u7684\u7C7B\u522B" })
3749
3813
  ] }),
3750
3814
  onBack,
3751
3815
  className: classNames("rqk-quest", "rqk-classify", className),
3752
3816
  dataQuest: "classify",
3753
- feedback: /* @__PURE__ */ jsx39(
3817
+ feedback: /* @__PURE__ */ jsx40(
3754
3818
  ClassifyFeedback,
3755
3819
  {
3756
3820
  readonly: model.readonly,
@@ -3760,8 +3824,8 @@ function Classify({
3760
3824
  answerText: model.answerText
3761
3825
  }
3762
3826
  ),
3763
- footer: /* @__PURE__ */ jsx39(ActionBar, { actions, index, onPrev }),
3764
- children: /* @__PURE__ */ jsx39(
3827
+ footer: /* @__PURE__ */ jsx40(ActionBar, { actions, index, total, onPrev }),
3828
+ children: /* @__PURE__ */ jsx40(
3765
3829
  ClassifyPage,
3766
3830
  {
3767
3831
  data,
@@ -3809,7 +3873,7 @@ function rewriteActions({
3809
3873
  }
3810
3874
 
3811
3875
  // src/questions/rewrite/answer-card.tsx
3812
- import { jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
3876
+ import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
3813
3877
  function RewriteAnswerCard({
3814
3878
  data,
3815
3879
  value,
@@ -3821,12 +3885,12 @@ function RewriteAnswerCard({
3821
3885
  showAnswers
3822
3886
  }) {
3823
3887
  var _a, _b;
3824
- return /* @__PURE__ */ jsxs30(Card, { className: "rqk-rewrite-card", children: [
3825
- /* @__PURE__ */ jsxs30("div", { className: "rqk-rewrite-stem", children: [
3826
- /* @__PURE__ */ jsx40("span", { className: "rqk-rewrite-badge", children: "\u539F\u53E5" }),
3888
+ return /* @__PURE__ */ jsxs31(Card, { className: "rqk-rewrite-card", children: [
3889
+ /* @__PURE__ */ jsxs31("div", { className: "rqk-rewrite-stem", children: [
3890
+ /* @__PURE__ */ jsx41("span", { className: "rqk-rewrite-badge", children: "\u539F\u53E5" }),
3827
3891
  data.stem
3828
3892
  ] }),
3829
- /* @__PURE__ */ jsx40(
3893
+ /* @__PURE__ */ jsx41(
3830
3894
  "textarea",
3831
3895
  {
3832
3896
  ref: (element) => {
@@ -3846,12 +3910,12 @@ function RewriteAnswerCard({
3846
3910
  disabled: readonly || phase === "locked"
3847
3911
  }
3848
3912
  ),
3849
- showAnswers ? /* @__PURE__ */ jsx40("div", { className: "rqk-rewrite-answers", children: data.answers.map((answer, answerIndex2) => /* @__PURE__ */ jsx40("span", { className: "rqk-rewrite-answer-chip", children: answer }, answerIndex2)) }) : null
3913
+ showAnswers ? /* @__PURE__ */ jsx41("div", { className: "rqk-rewrite-answers", children: data.answers.map((answer, answerIndex2) => /* @__PURE__ */ jsx41("span", { className: "rqk-rewrite-answer-chip", children: answer }, answerIndex2)) }) : null
3850
3914
  ] });
3851
3915
  }
3852
3916
 
3853
3917
  // src/questions/rewrite/feedback.tsx
3854
- import { jsx as jsx41 } from "react/jsx-runtime";
3918
+ import { jsx as jsx42 } from "react/jsx-runtime";
3855
3919
  function RewriteFeedback({
3856
3920
  readonly,
3857
3921
  phase,
@@ -3859,7 +3923,7 @@ function RewriteFeedback({
3859
3923
  labels
3860
3924
  }) {
3861
3925
  if (readonly) {
3862
- return /* @__PURE__ */ jsx41(
3926
+ return /* @__PURE__ */ jsx42(
3863
3927
  FeedbackSheet,
3864
3928
  {
3865
3929
  tone: "ok",
@@ -3871,13 +3935,13 @@ function RewriteFeedback({
3871
3935
  );
3872
3936
  }
3873
3937
  if (phase === "retry") {
3874
- return /* @__PURE__ */ jsx41(FeedbackSheet, { tone: "warn", title: "\u518D\u68C0\u67E5\u4E00\u4E0B\u8BED\u5E8F\u4E0E\u65F6\u6001", detail: "\u6CE8\u610F\u4FDD\u6301\u539F\u53E5\u7684\u4EBA\u79F0\u548C\u65F6\u6001" });
3938
+ return /* @__PURE__ */ jsx42(FeedbackSheet, { tone: "warn", title: "\u518D\u68C0\u67E5\u4E00\u4E0B\u8BED\u5E8F\u4E0E\u65F6\u6001", detail: "\u6CE8\u610F\u4FDD\u6301\u539F\u53E5\u7684\u4EBA\u79F0\u548C\u65F6\u6001" });
3875
3939
  }
3876
3940
  if (phase === "correct") {
3877
- return /* @__PURE__ */ jsx41(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: data.answers[0] });
3941
+ return /* @__PURE__ */ jsx42(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: data.answers[0] });
3878
3942
  }
3879
3943
  if (phase === "locked") {
3880
- return /* @__PURE__ */ jsx41(
3944
+ return /* @__PURE__ */ jsx42(
3881
3945
  FeedbackSheet,
3882
3946
  {
3883
3947
  tone: "bad",
@@ -3893,10 +3957,10 @@ function RewriteFeedback({
3893
3957
  }
3894
3958
 
3895
3959
  // src/questions/rewrite/kb-hint.tsx
3896
- import { jsx as jsx42, jsxs as jsxs31 } from "react/jsx-runtime";
3960
+ import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
3897
3961
  function RewriteKbHint({ text }) {
3898
- return /* @__PURE__ */ jsxs31("div", { className: "rqk-tx-kb-hint", children: [
3899
- /* @__PURE__ */ jsx42(KeyboardIcon, {}),
3962
+ return /* @__PURE__ */ jsxs32("div", { className: "rqk-tx-kb-hint", children: [
3963
+ /* @__PURE__ */ jsx43(KeyboardIcon, {}),
3900
3964
  text
3901
3965
  ] });
3902
3966
  }
@@ -3958,7 +4022,7 @@ function useRewrite({
3958
4022
  }
3959
4023
 
3960
4024
  // src/questions/rewrite/index.tsx
3961
- import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
4025
+ import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs33 } from "react/jsx-runtime";
3962
4026
  function Rewrite({
3963
4027
  data,
3964
4028
  mode = "answer",
@@ -3985,7 +4049,7 @@ function Rewrite({
3985
4049
  onSubmit: model.handleSubmit,
3986
4050
  onRetry: model.judge.retry
3987
4051
  });
3988
- return /* @__PURE__ */ jsx43(
4052
+ return /* @__PURE__ */ jsx44(
3989
4053
  QuestShell,
3990
4054
  {
3991
4055
  mode,
@@ -3996,7 +4060,7 @@ function Rewrite({
3996
4060
  onBack,
3997
4061
  className: classNames("rqk-quest", "rqk-rewrite", className),
3998
4062
  dataQuest: "rewrite",
3999
- feedback: /* @__PURE__ */ jsx43(
4063
+ feedback: /* @__PURE__ */ jsx44(
4000
4064
  RewriteFeedback,
4001
4065
  {
4002
4066
  readonly: model.readonly,
@@ -4005,9 +4069,9 @@ function Rewrite({
4005
4069
  labels: model.labels
4006
4070
  }
4007
4071
  ),
4008
- footer: /* @__PURE__ */ jsx43(ActionBar, { actions, index, onPrev }),
4009
- children: /* @__PURE__ */ jsxs32(Fragment11, { children: [
4010
- /* @__PURE__ */ jsx43(
4072
+ footer: /* @__PURE__ */ jsx44(ActionBar, { actions, index, total, onPrev }),
4073
+ children: /* @__PURE__ */ jsxs33(Fragment11, { children: [
4074
+ /* @__PURE__ */ jsx44(
4011
4075
  RewriteAnswerCard,
4012
4076
  {
4013
4077
  data,
@@ -4020,7 +4084,7 @@ function Rewrite({
4020
4084
  showAnswers: model.showAnswers
4021
4085
  }
4022
4086
  ),
4023
- !model.readonly && !model.graded ? /* @__PURE__ */ jsx43(RewriteKbHint, { text: "\u70B9\u51FB\u8F93\u5165\u6846\uFF0C\u7CFB\u7EDF\u952E\u76D8\u81EA\u52A8\u5F39\u51FA" }) : null
4087
+ !model.readonly && !model.graded ? /* @__PURE__ */ jsx44(RewriteKbHint, { text: "\u70B9\u51FB\u8F93\u5165\u6846\uFF0C\u7CFB\u7EDF\u952E\u76D8\u81EA\u52A8\u5F39\u51FA" }) : null
4024
4088
  ] })
4025
4089
  }
4026
4090
  );
@@ -4051,7 +4115,7 @@ function fillBlankActions({
4051
4115
  }
4052
4116
 
4053
4117
  // src/questions/fill-blank/feedback.tsx
4054
- import { jsx as jsx44 } from "react/jsx-runtime";
4118
+ import { jsx as jsx45 } from "react/jsx-runtime";
4055
4119
  function FillBlankFeedback({
4056
4120
  readonly,
4057
4121
  phase,
@@ -4060,7 +4124,7 @@ function FillBlankFeedback({
4060
4124
  answerText
4061
4125
  }) {
4062
4126
  if (readonly) {
4063
- return /* @__PURE__ */ jsx44(
4127
+ return /* @__PURE__ */ jsx45(
4064
4128
  FeedbackSheet,
4065
4129
  {
4066
4130
  tone: "ok",
@@ -4072,7 +4136,7 @@ function FillBlankFeedback({
4072
4136
  );
4073
4137
  }
4074
4138
  if (phase === "retry") {
4075
- return /* @__PURE__ */ jsx44(
4139
+ return /* @__PURE__ */ jsx45(
4076
4140
  FeedbackSheet,
4077
4141
  {
4078
4142
  tone: "warn",
@@ -4082,10 +4146,10 @@ function FillBlankFeedback({
4082
4146
  );
4083
4147
  }
4084
4148
  if (phase === "correct") {
4085
- return /* @__PURE__ */ jsx44(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
4149
+ return /* @__PURE__ */ jsx45(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
4086
4150
  }
4087
4151
  if (phase === "locked") {
4088
- return /* @__PURE__ */ jsx44(
4152
+ return /* @__PURE__ */ jsx45(
4089
4153
  FeedbackSheet,
4090
4154
  {
4091
4155
  tone: "bad",
@@ -4101,7 +4165,7 @@ function FillBlankFeedback({
4101
4165
  }
4102
4166
 
4103
4167
  // src/questions/fill-blank/blank-input.tsx
4104
- import { jsx as jsx45 } from "react/jsx-runtime";
4168
+ import { jsx as jsx46 } from "react/jsx-runtime";
4105
4169
  function BlankInput({
4106
4170
  blank,
4107
4171
  blankIndex,
@@ -4116,7 +4180,7 @@ function BlankInput({
4116
4180
  7,
4117
4181
  Math.min(18, normalizeAnswer(value).length || normalizeAnswer((_a = blank.answers[0]) != null ? _a : "").length)
4118
4182
  );
4119
- return /* @__PURE__ */ jsx45(
4183
+ return /* @__PURE__ */ jsx46(
4120
4184
  "input",
4121
4185
  {
4122
4186
  className: classNames("rqk-fill-input", graded && (ok ? "rqk-is-correct" : "rqk-is-wrong")),
@@ -4131,7 +4195,7 @@ function BlankInput({
4131
4195
  }
4132
4196
 
4133
4197
  // src/questions/fill-blank/passage-card.tsx
4134
- import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
4198
+ import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
4135
4199
  function FillBlankPassage({
4136
4200
  data,
4137
4201
  values,
@@ -4140,16 +4204,16 @@ function FillBlankPassage({
4140
4204
  readonly,
4141
4205
  onChange
4142
4206
  }) {
4143
- return /* @__PURE__ */ jsxs33(Card, { className: "rqk-fill-card", children: [
4144
- /* @__PURE__ */ jsxs33("div", { className: "rqk-fill-tip", children: [
4145
- /* @__PURE__ */ jsx46("span", { className: "rqk-fill-badge", children: "\u77ED\u6587" }),
4207
+ return /* @__PURE__ */ jsxs34(Card, { className: "rqk-fill-card", children: [
4208
+ /* @__PURE__ */ jsxs34("div", { className: "rqk-fill-tip", children: [
4209
+ /* @__PURE__ */ jsx47("span", { className: "rqk-fill-badge", children: "\u77ED\u6587" }),
4146
4210
  "\u6BCF\u7A7A\u586B\u4E00\u4E2A\u5355\u8BCD"
4147
4211
  ] }),
4148
- /* @__PURE__ */ jsx46("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
4212
+ /* @__PURE__ */ jsx47("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
4149
4213
  var _a;
4150
- return /* @__PURE__ */ jsxs33("span", { children: [
4214
+ return /* @__PURE__ */ jsxs34("span", { children: [
4151
4215
  segment,
4152
- segmentIndex < data.blanks.length ? /* @__PURE__ */ jsx46(
4216
+ segmentIndex < data.blanks.length ? /* @__PURE__ */ jsx47(
4153
4217
  BlankInput,
4154
4218
  {
4155
4219
  blank: data.blanks[segmentIndex],
@@ -4163,7 +4227,7 @@ function FillBlankPassage({
4163
4227
  ) : null
4164
4228
  ] }, segmentIndex);
4165
4229
  }) }),
4166
- data.translation ? /* @__PURE__ */ jsxs33("div", { className: "rqk-fill-translation", children: [
4230
+ data.translation ? /* @__PURE__ */ jsxs34("div", { className: "rqk-fill-translation", children: [
4167
4231
  "\u8BD1\uFF1A",
4168
4232
  data.translation
4169
4233
  ] }) : null
@@ -4243,7 +4307,7 @@ function useFillBlank({
4243
4307
  }
4244
4308
 
4245
4309
  // src/questions/fill-blank/index.tsx
4246
- import { Fragment as Fragment12, jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
4310
+ import { Fragment as Fragment12, jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
4247
4311
  function FillBlank({
4248
4312
  data,
4249
4313
  mode = "answer",
@@ -4269,22 +4333,22 @@ function FillBlank({
4269
4333
  onSubmit: model.handleSubmit,
4270
4334
  onRetry: model.judge.retry
4271
4335
  });
4272
- return /* @__PURE__ */ jsx47(
4336
+ return /* @__PURE__ */ jsx48(
4273
4337
  QuestShell,
4274
4338
  {
4275
4339
  mode,
4276
4340
  title: title != null ? title : "\u586B\u7A7A\u9898",
4277
4341
  index,
4278
4342
  total,
4279
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs34(Fragment12, { children: [
4343
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs35(Fragment12, { children: [
4280
4344
  "\u8BFB\u77ED\u6587\uFF0C\u5728",
4281
- /* @__PURE__ */ jsx47("b", { children: "\u6A2A\u7EBF" }),
4345
+ /* @__PURE__ */ jsx48("b", { children: "\u6A2A\u7EBF" }),
4282
4346
  "\u5904\u8F93\u5165\u6B63\u786E\u7684\u8BCD"
4283
4347
  ] }),
4284
4348
  onBack,
4285
4349
  className: classNames("rqk-quest", "rqk-fill-blank", className),
4286
4350
  dataQuest: "fill-blank",
4287
- feedback: /* @__PURE__ */ jsx47(
4351
+ feedback: /* @__PURE__ */ jsx48(
4288
4352
  FillBlankFeedback,
4289
4353
  {
4290
4354
  readonly: model.readonly,
@@ -4294,9 +4358,9 @@ function FillBlank({
4294
4358
  answerText: model.answerText
4295
4359
  }
4296
4360
  ),
4297
- footer: /* @__PURE__ */ jsx47(ActionBar, { actions, index, onPrev }),
4298
- children: /* @__PURE__ */ jsxs34(Fragment12, { children: [
4299
- /* @__PURE__ */ jsx47(
4361
+ footer: /* @__PURE__ */ jsx48(ActionBar, { actions, index, total, onPrev }),
4362
+ children: /* @__PURE__ */ jsxs35(Fragment12, { children: [
4363
+ /* @__PURE__ */ jsx48(
4300
4364
  FillBlankPassage,
4301
4365
  {
4302
4366
  data,
@@ -4307,8 +4371,8 @@ function FillBlank({
4307
4371
  onChange: model.updateBlank
4308
4372
  }
4309
4373
  ),
4310
- !model.readonly && !model.graded ? /* @__PURE__ */ jsxs34("div", { className: "rqk-tx-kb-hint", children: [
4311
- /* @__PURE__ */ jsx47(KeyboardIcon, {}),
4374
+ !model.readonly && !model.graded ? /* @__PURE__ */ jsxs35("div", { className: "rqk-tx-kb-hint", children: [
4375
+ /* @__PURE__ */ jsx48(KeyboardIcon, {}),
4312
4376
  "\u70B9\u51FB\u6A2A\u7EBF\u8F93\u5165\uFF0C\u7CFB\u7EDF\u952E\u76D8\u81EA\u52A8\u5F39\u51FA"
4313
4377
  ] }) : null
4314
4378
  ] })
@@ -4340,7 +4404,7 @@ function wordSelectActions({
4340
4404
  }
4341
4405
 
4342
4406
  // src/questions/word-select/bank-card.tsx
4343
- import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
4407
+ import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
4344
4408
  function WordSelectBank({
4345
4409
  bank,
4346
4410
  interaction,
@@ -4348,9 +4412,9 @@ function WordSelectBank({
4348
4412
  tileUsed,
4349
4413
  onPick
4350
4414
  }) {
4351
- return /* @__PURE__ */ jsxs35(Card, { className: "rqk-word-select-bank", children: [
4352
- /* @__PURE__ */ jsx48("div", { className: "rqk-word-select-bank-label", children: interaction === "sequence" ? "\u70B9\u9009\u9879\u4F9D\u5E8F\u586B\u5165" : "\u5148\u9009\u6A2A\u7EBF\uFF0C\u518D\u70B9\u9009\u9879" }),
4353
- /* @__PURE__ */ jsx48("div", { className: "rqk-word-select-bank-items", children: bank.map((tile, tileIndex) => /* @__PURE__ */ jsx48(
4415
+ return /* @__PURE__ */ jsxs36(Card, { className: "rqk-word-select-bank", children: [
4416
+ /* @__PURE__ */ jsx49("div", { className: "rqk-word-select-bank-label", children: interaction === "sequence" ? "\u70B9\u9009\u9879\u4F9D\u5E8F\u586B\u5165" : "\u5148\u9009\u6A2A\u7EBF\uFF0C\u518D\u70B9\u9009\u9879" }),
4417
+ /* @__PURE__ */ jsx49("div", { className: "rqk-word-select-bank-items", children: bank.map((tile, tileIndex) => /* @__PURE__ */ jsx49(
4354
4418
  WordChip,
4355
4419
  {
4356
4420
  variant: "word",
@@ -4365,7 +4429,7 @@ function WordSelectBank({
4365
4429
  }
4366
4430
 
4367
4431
  // src/questions/word-select/feedback.tsx
4368
- import { jsx as jsx49 } from "react/jsx-runtime";
4432
+ import { jsx as jsx50 } from "react/jsx-runtime";
4369
4433
  function WordSelectFeedback({
4370
4434
  readonly,
4371
4435
  phase,
@@ -4374,7 +4438,7 @@ function WordSelectFeedback({
4374
4438
  answerText
4375
4439
  }) {
4376
4440
  if (readonly) {
4377
- return /* @__PURE__ */ jsx49(
4441
+ return /* @__PURE__ */ jsx50(
4378
4442
  FeedbackSheet,
4379
4443
  {
4380
4444
  tone: "ok",
@@ -4386,13 +4450,13 @@ function WordSelectFeedback({
4386
4450
  );
4387
4451
  }
4388
4452
  if (phase === "retry") {
4389
- return /* @__PURE__ */ jsx49(FeedbackSheet, { tone: "warn", title: "\u6709\u7A7A\u653E\u9519\u4E86\u4F4D\u7F6E", detail: "\u6B63\u786E\u7684\u8BCD\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
4453
+ return /* @__PURE__ */ jsx50(FeedbackSheet, { tone: "warn", title: "\u6709\u7A7A\u653E\u9519\u4E86\u4F4D\u7F6E", detail: "\u6B63\u786E\u7684\u8BCD\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
4390
4454
  }
4391
4455
  if (phase === "correct") {
4392
- return /* @__PURE__ */ jsx49(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
4456
+ return /* @__PURE__ */ jsx50(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
4393
4457
  }
4394
4458
  if (phase === "locked") {
4395
- return /* @__PURE__ */ jsx49(
4459
+ return /* @__PURE__ */ jsx50(
4396
4460
  FeedbackSheet,
4397
4461
  {
4398
4462
  tone: "bad",
@@ -4408,7 +4472,7 @@ function WordSelectFeedback({
4408
4472
  }
4409
4473
 
4410
4474
  // src/questions/word-select/passage-card.tsx
4411
- import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
4475
+ import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
4412
4476
  function WordSelectPassage({
4413
4477
  data,
4414
4478
  filled,
@@ -4417,18 +4481,18 @@ function WordSelectPassage({
4417
4481
  phase,
4418
4482
  onSlot
4419
4483
  }) {
4420
- return /* @__PURE__ */ jsxs36(Card, { className: "rqk-word-select-card", children: [
4421
- /* @__PURE__ */ jsxs36("div", { className: "rqk-fill-tip", children: [
4422
- /* @__PURE__ */ jsx50("span", { className: "rqk-fill-badge", children: "\u77ED\u6587" }),
4484
+ return /* @__PURE__ */ jsxs37(Card, { className: "rqk-word-select-card", children: [
4485
+ /* @__PURE__ */ jsxs37("div", { className: "rqk-fill-tip", children: [
4486
+ /* @__PURE__ */ jsx51("span", { className: "rqk-fill-badge", children: "\u77ED\u6587" }),
4423
4487
  "\u6BCF\u4E2A\u8BCD\u53EA\u80FD\u4F7F\u7528\u4E00\u6B21"
4424
4488
  ] }),
4425
- /* @__PURE__ */ jsx50("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
4489
+ /* @__PURE__ */ jsx51("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
4426
4490
  const value = filled[segmentIndex];
4427
4491
  const active = !frozen && !value && selected === segmentIndex;
4428
4492
  const correct = value ? matchesAny(value, [data.blanks[segmentIndex].answer]) : false;
4429
- return /* @__PURE__ */ jsxs36("span", { children: [
4493
+ return /* @__PURE__ */ jsxs37("span", { children: [
4430
4494
  segment,
4431
- segmentIndex < data.blanks.length ? /* @__PURE__ */ jsx50(
4495
+ segmentIndex < data.blanks.length ? /* @__PURE__ */ jsx51(
4432
4496
  "button",
4433
4497
  {
4434
4498
  type: "button",
@@ -4446,7 +4510,7 @@ function WordSelectPassage({
4446
4510
  ) : null
4447
4511
  ] }, segmentIndex);
4448
4512
  }) }),
4449
- data.translation ? /* @__PURE__ */ jsxs36("div", { className: "rqk-fill-translation", children: [
4513
+ data.translation ? /* @__PURE__ */ jsxs37("div", { className: "rqk-fill-translation", children: [
4450
4514
  "\u8BD1\uFF1A",
4451
4515
  data.translation
4452
4516
  ] }) : null
@@ -4574,7 +4638,7 @@ function useWordSelect({
4574
4638
  }
4575
4639
 
4576
4640
  // src/questions/word-select/index.tsx
4577
- import { Fragment as Fragment13, jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
4641
+ import { Fragment as Fragment13, jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
4578
4642
  function WordSelect({
4579
4643
  data,
4580
4644
  mode = "answer",
@@ -4600,22 +4664,22 @@ function WordSelect({
4600
4664
  onSubmit: model.handleSubmit,
4601
4665
  onRetry: model.judge.retry
4602
4666
  });
4603
- return /* @__PURE__ */ jsx51(
4667
+ return /* @__PURE__ */ jsx52(
4604
4668
  QuestShell,
4605
4669
  {
4606
4670
  mode,
4607
4671
  title: title != null ? title : "\u9009\u8BCD\u586B\u7A7A",
4608
4672
  index,
4609
4673
  total,
4610
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs37(Fragment13, { children: [
4674
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs38(Fragment13, { children: [
4611
4675
  "\u4ECE\u9009\u9879\u5E93",
4612
- /* @__PURE__ */ jsx51("b", { children: "\u9009\u8BCD" }),
4676
+ /* @__PURE__ */ jsx52("b", { children: "\u9009\u8BCD" }),
4613
4677
  "\uFF0C\u8865\u5168\u77ED\u6587"
4614
4678
  ] }),
4615
4679
  onBack,
4616
4680
  className: classNames("rqk-quest", "rqk-word-select", className),
4617
4681
  dataQuest: "word-select",
4618
- feedback: /* @__PURE__ */ jsx51(
4682
+ feedback: /* @__PURE__ */ jsx52(
4619
4683
  WordSelectFeedback,
4620
4684
  {
4621
4685
  readonly: model.readonly,
@@ -4625,9 +4689,9 @@ function WordSelect({
4625
4689
  answerText: model.answerText
4626
4690
  }
4627
4691
  ),
4628
- footer: /* @__PURE__ */ jsx51(ActionBar, { actions, index, onPrev }),
4629
- children: /* @__PURE__ */ jsxs37(Fragment13, { children: [
4630
- /* @__PURE__ */ jsx51(
4692
+ footer: /* @__PURE__ */ jsx52(ActionBar, { actions, index, total, onPrev }),
4693
+ children: /* @__PURE__ */ jsxs38(Fragment13, { children: [
4694
+ /* @__PURE__ */ jsx52(
4631
4695
  WordSelectPassage,
4632
4696
  {
4633
4697
  data,
@@ -4638,7 +4702,7 @@ function WordSelect({
4638
4702
  onSlot: model.tapSlot
4639
4703
  }
4640
4704
  ),
4641
- /* @__PURE__ */ jsx51(
4705
+ /* @__PURE__ */ jsx52(
4642
4706
  WordSelectBank,
4643
4707
  {
4644
4708
  bank: model.bank,
@@ -4648,7 +4712,7 @@ function WordSelect({
4648
4712
  onPick: model.pickWord
4649
4713
  }
4650
4714
  ),
4651
- /* @__PURE__ */ jsx51(Toast, { children: model.notice })
4715
+ /* @__PURE__ */ jsx52(Toast, { children: model.notice })
4652
4716
  ] })
4653
4717
  }
4654
4718
  );
@@ -4683,7 +4747,7 @@ function sortSentencesActions({
4683
4747
  }
4684
4748
 
4685
4749
  // src/questions/sort-sentences/feedback.tsx
4686
- import { jsx as jsx52 } from "react/jsx-runtime";
4750
+ import { jsx as jsx53 } from "react/jsx-runtime";
4687
4751
  function SortSentencesFeedback({
4688
4752
  readonly,
4689
4753
  phase,
@@ -4691,7 +4755,7 @@ function SortSentencesFeedback({
4691
4755
  labels
4692
4756
  }) {
4693
4757
  if (readonly) {
4694
- return /* @__PURE__ */ jsx52(
4758
+ return /* @__PURE__ */ jsx53(
4695
4759
  FeedbackSheet,
4696
4760
  {
4697
4761
  tone: "ok",
@@ -4703,13 +4767,13 @@ function SortSentencesFeedback({
4703
4767
  );
4704
4768
  }
4705
4769
  if (phase === "retry") {
4706
- return /* @__PURE__ */ jsx52(FeedbackSheet, { tone: "warn", title: "\u6709\u53E5\u5B50\u653E\u9519\u4E86\u4F4D\u7F6E", detail: "\u987A\u5E8F\u6B63\u786E\u7684\u884C\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
4770
+ return /* @__PURE__ */ jsx53(FeedbackSheet, { tone: "warn", title: "\u6709\u53E5\u5B50\u653E\u9519\u4E86\u4F4D\u7F6E", detail: "\u987A\u5E8F\u6B63\u786E\u7684\u884C\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
4707
4771
  }
4708
4772
  if (phase === "correct") {
4709
- return /* @__PURE__ */ jsx52(FeedbackSheet, { tone: "ok", title: labels.correctAll });
4773
+ return /* @__PURE__ */ jsx53(FeedbackSheet, { tone: "ok", title: labels.correctAll });
4710
4774
  }
4711
4775
  if (phase === "locked") {
4712
- return /* @__PURE__ */ jsx52(
4776
+ return /* @__PURE__ */ jsx53(
4713
4777
  FeedbackSheet,
4714
4778
  {
4715
4779
  tone: "bad",
@@ -4725,7 +4789,7 @@ function SortSentencesFeedback({
4725
4789
  }
4726
4790
 
4727
4791
  // src/questions/sort-sentences/sort-bank.tsx
4728
- import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
4792
+ import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
4729
4793
  function SortBank({
4730
4794
  bank,
4731
4795
  readonly,
@@ -4733,9 +4797,9 @@ function SortBank({
4733
4797
  tileUsed,
4734
4798
  onPick
4735
4799
  }) {
4736
- return /* @__PURE__ */ jsxs38(Card, { className: "rqk-sort-bank", children: [
4737
- /* @__PURE__ */ jsx53("div", { className: "rqk-sort-bank-label", children: readonly ? "\u6B63\u786E\u987A\u5E8F" : "\u5F85\u6392\u5E8F\u53E5\u5B50" }),
4738
- /* @__PURE__ */ jsx53("div", { className: "rqk-sort-bank-items", children: bank.map((tile, tileIndex) => /* @__PURE__ */ jsx53(
4800
+ return /* @__PURE__ */ jsxs39(Card, { className: "rqk-sort-bank", children: [
4801
+ /* @__PURE__ */ jsx54("div", { className: "rqk-sort-bank-label", children: readonly ? "\u6B63\u786E\u987A\u5E8F" : "\u5F85\u6392\u5E8F\u53E5\u5B50" }),
4802
+ /* @__PURE__ */ jsx54("div", { className: "rqk-sort-bank-items", children: bank.map((tile, tileIndex) => /* @__PURE__ */ jsx54(
4739
4803
  "button",
4740
4804
  {
4741
4805
  type: "button",
@@ -4750,7 +4814,7 @@ function SortBank({
4750
4814
  }
4751
4815
 
4752
4816
  // src/questions/sort-sentences/sort-rows.tsx
4753
- import { jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
4817
+ import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
4754
4818
  function SortRows({
4755
4819
  rows,
4756
4820
  order,
@@ -4758,7 +4822,7 @@ function SortRows({
4758
4822
  phase,
4759
4823
  onRow
4760
4824
  }) {
4761
- return /* @__PURE__ */ jsx54("div", { className: "rqk-sort-rows", children: rows.map((sentence, rowIndex) => /* @__PURE__ */ jsxs39(
4825
+ return /* @__PURE__ */ jsx55("div", { className: "rqk-sort-rows", children: rows.map((sentence, rowIndex) => /* @__PURE__ */ jsxs40(
4762
4826
  "div",
4763
4827
  {
4764
4828
  className: classNames(
@@ -4776,8 +4840,8 @@ function SortRows({
4776
4840
  }
4777
4841
  },
4778
4842
  children: [
4779
- /* @__PURE__ */ jsx54("span", { className: "rqk-sort-row-number", children: rowIndex + 1 }),
4780
- sentence ? /* @__PURE__ */ jsx54("span", { className: "rqk-sort-row-text", children: sentence }) : /* @__PURE__ */ jsxs39("span", { className: "rqk-sort-row-placeholder", children: [
4843
+ /* @__PURE__ */ jsx55("span", { className: "rqk-sort-row-number", children: rowIndex + 1 }),
4844
+ sentence ? /* @__PURE__ */ jsx55("span", { className: "rqk-sort-row-text", children: sentence }) : /* @__PURE__ */ jsxs40("span", { className: "rqk-sort-row-placeholder", children: [
4781
4845
  "\u70B9\u51FB\u4E0B\u65B9\u53E5\u5B50\u653E\u5165\u7B2C ",
4782
4846
  rowIndex + 1,
4783
4847
  " \u884C"
@@ -4884,7 +4948,7 @@ function useSortSentences({
4884
4948
  }
4885
4949
 
4886
4950
  // src/questions/sort-sentences/index.tsx
4887
- import { Fragment as Fragment14, jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
4951
+ import { Fragment as Fragment14, jsx as jsx56, jsxs as jsxs41 } from "react/jsx-runtime";
4888
4952
  function SortSentences({
4889
4953
  data,
4890
4954
  mode = "answer",
@@ -4910,22 +4974,22 @@ function SortSentences({
4910
4974
  onSubmit: model.handleSubmit,
4911
4975
  onRetry: model.judge.retry
4912
4976
  });
4913
- return /* @__PURE__ */ jsx55(
4977
+ return /* @__PURE__ */ jsx56(
4914
4978
  QuestShell,
4915
4979
  {
4916
4980
  mode,
4917
4981
  title: title != null ? title : "\u53E5\u5B50\u6392\u5E8F",
4918
4982
  index,
4919
4983
  total,
4920
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs40(Fragment14, { children: [
4984
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs41(Fragment14, { children: [
4921
4985
  "\u6309\u6B63\u786E",
4922
- /* @__PURE__ */ jsx55("b", { children: "\u987A\u5E8F" }),
4986
+ /* @__PURE__ */ jsx56("b", { children: "\u987A\u5E8F" }),
4923
4987
  "\u6392\u5217\u53E5\u5B50\uFF0C\u70B9\u51FB\u7A7A\u884C\u653E\u5165"
4924
4988
  ] }),
4925
4989
  onBack,
4926
4990
  className: classNames("rqk-quest", "rqk-sort", className),
4927
4991
  dataQuest: "sort-sentences",
4928
- feedback: /* @__PURE__ */ jsx55(
4992
+ feedback: /* @__PURE__ */ jsx56(
4929
4993
  SortSentencesFeedback,
4930
4994
  {
4931
4995
  readonly: model.readonly,
@@ -4934,9 +4998,9 @@ function SortSentences({
4934
4998
  labels: model.labels
4935
4999
  }
4936
5000
  ),
4937
- footer: actions.length > 0 || index > 1 && Boolean(onPrev) ? /* @__PURE__ */ jsx55(ActionBar, { actions, index, onPrev }) : void 0,
4938
- children: /* @__PURE__ */ jsxs40(Fragment14, { children: [
4939
- /* @__PURE__ */ jsx55(
5001
+ footer: actions.length > 0 || index > 1 && Boolean(onPrev) ? /* @__PURE__ */ jsx56(ActionBar, { actions, index, total, onPrev }) : void 0,
5002
+ children: /* @__PURE__ */ jsxs41(Fragment14, { children: [
5003
+ /* @__PURE__ */ jsx56(
4940
5004
  SortRows,
4941
5005
  {
4942
5006
  rows: model.rows,
@@ -4946,7 +5010,7 @@ function SortSentences({
4946
5010
  onRow: model.tapRow
4947
5011
  }
4948
5012
  ),
4949
- /* @__PURE__ */ jsx55(
5013
+ /* @__PURE__ */ jsx56(
4950
5014
  SortBank,
4951
5015
  {
4952
5016
  bank: model.bank,
@@ -4956,7 +5020,7 @@ function SortSentences({
4956
5020
  onPick: model.tapBank
4957
5021
  }
4958
5022
  ),
4959
- /* @__PURE__ */ jsx55(Toast, { children: model.notice })
5023
+ /* @__PURE__ */ jsx56(Toast, { children: model.notice })
4960
5024
  ] })
4961
5025
  }
4962
5026
  );
@@ -4986,7 +5050,7 @@ function clozeActions({
4986
5050
  }
4987
5051
 
4988
5052
  // src/questions/cloze/feedback.tsx
4989
- import { jsx as jsx56 } from "react/jsx-runtime";
5053
+ import { jsx as jsx57 } from "react/jsx-runtime";
4990
5054
  function ClozeFeedback({
4991
5055
  readonly,
4992
5056
  phase,
@@ -4995,7 +5059,7 @@ function ClozeFeedback({
4995
5059
  answerText
4996
5060
  }) {
4997
5061
  if (readonly) {
4998
- return /* @__PURE__ */ jsx56(
5062
+ return /* @__PURE__ */ jsx57(
4999
5063
  FeedbackSheet,
5000
5064
  {
5001
5065
  tone: "ok",
@@ -5007,13 +5071,13 @@ function ClozeFeedback({
5007
5071
  );
5008
5072
  }
5009
5073
  if (phase === "retry") {
5010
- return /* @__PURE__ */ jsx56(FeedbackSheet, { tone: "warn", title: "\u6709\u7A7A\u9009\u9519\u4E86", detail: "\u9009\u62E9\u6B63\u786E\u7684\u7A7A\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
5074
+ return /* @__PURE__ */ jsx57(FeedbackSheet, { tone: "warn", title: "\u6709\u7A7A\u9009\u9519\u4E86", detail: "\u9009\u62E9\u6B63\u786E\u7684\u7A7A\u5DF2\u4E3A\u4F60\u4FDD\u7559" });
5011
5075
  }
5012
5076
  if (phase === "correct") {
5013
- return /* @__PURE__ */ jsx56(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
5077
+ return /* @__PURE__ */ jsx57(FeedbackSheet, { tone: "ok", title: labels.correctAll, answer: answerText });
5014
5078
  }
5015
5079
  if (phase === "locked") {
5016
- return /* @__PURE__ */ jsx56(
5080
+ return /* @__PURE__ */ jsx57(
5017
5081
  FeedbackSheet,
5018
5082
  {
5019
5083
  tone: "bad",
@@ -5029,7 +5093,7 @@ function ClozeFeedback({
5029
5093
  }
5030
5094
 
5031
5095
  // src/questions/cloze/option-grid.tsx
5032
- import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
5096
+ import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
5033
5097
  function ClozeOptions({
5034
5098
  data,
5035
5099
  current,
@@ -5041,17 +5105,17 @@ function ClozeOptions({
5041
5105
  var _a;
5042
5106
  const options = (_a = data.options[current]) != null ? _a : [];
5043
5107
  const currentChosen = selected[current];
5044
- return /* @__PURE__ */ jsxs41(Card, { className: "rqk-cloze-options", children: [
5045
- /* @__PURE__ */ jsxs41("div", { className: "rqk-cloze-options-label", children: [
5108
+ return /* @__PURE__ */ jsxs42(Card, { className: "rqk-cloze-options", children: [
5109
+ /* @__PURE__ */ jsxs42("div", { className: "rqk-cloze-options-label", children: [
5046
5110
  "\u7B2C ",
5047
5111
  current + 1,
5048
5112
  " \u7A7A \xB7 \u9009\u62E9\u7B54\u6848"
5049
5113
  ] }),
5050
- /* @__PURE__ */ jsx57("div", { className: "rqk-cloze-options-grid", children: options.map((option, optionIndex) => {
5114
+ /* @__PURE__ */ jsx58("div", { className: "rqk-cloze-options-grid", children: options.map((option, optionIndex) => {
5051
5115
  var _a2;
5052
5116
  const chosen = currentChosen === optionIndex;
5053
5117
  const isAnswer = option === ((_a2 = data.gaps[current]) == null ? void 0 : _a2.answer);
5054
- return /* @__PURE__ */ jsxs41(
5118
+ return /* @__PURE__ */ jsxs42(
5055
5119
  "button",
5056
5120
  {
5057
5121
  type: "button",
@@ -5064,7 +5128,7 @@ function ClozeOptions({
5064
5128
  onClick: () => onPick(optionIndex),
5065
5129
  disabled: frozen,
5066
5130
  children: [
5067
- /* @__PURE__ */ jsx57("span", { className: "rqk-cloze-option-key", children: String.fromCharCode(65 + optionIndex) }),
5131
+ /* @__PURE__ */ jsx58("span", { className: "rqk-cloze-option-key", children: String.fromCharCode(65 + optionIndex) }),
5068
5132
  option
5069
5133
  ]
5070
5134
  },
@@ -5075,7 +5139,7 @@ function ClozeOptions({
5075
5139
  }
5076
5140
 
5077
5141
  // src/questions/cloze/passage-card.tsx
5078
- import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
5142
+ import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
5079
5143
  function ClozePassage({
5080
5144
  data,
5081
5145
  selected,
@@ -5084,15 +5148,15 @@ function ClozePassage({
5084
5148
  phase,
5085
5149
  onGap
5086
5150
  }) {
5087
- return /* @__PURE__ */ jsxs42(Card, { className: "rqk-cloze-card", children: [
5088
- /* @__PURE__ */ jsx58("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
5151
+ return /* @__PURE__ */ jsxs43(Card, { className: "rqk-cloze-card", children: [
5152
+ /* @__PURE__ */ jsx59("div", { className: "rqk-fill-passage", children: data.segments.map((segment, segmentIndex) => {
5089
5153
  var _a, _b;
5090
5154
  const optionIndex = selected[segmentIndex];
5091
5155
  const gap = data.gaps[segmentIndex];
5092
5156
  const value = optionIndex === null || segmentIndex >= data.gaps.length ? "\uFF3F\uFF3F" : (_b = (_a = data.options[segmentIndex]) == null ? void 0 : _a[optionIndex]) != null ? _b : "\uFF3F\uFF3F";
5093
- return /* @__PURE__ */ jsxs42("span", { children: [
5157
+ return /* @__PURE__ */ jsxs43("span", { children: [
5094
5158
  segment,
5095
- segmentIndex < data.gaps.length ? /* @__PURE__ */ jsx58(
5159
+ segmentIndex < data.gaps.length ? /* @__PURE__ */ jsx59(
5096
5160
  "button",
5097
5161
  {
5098
5162
  type: "button",
@@ -5110,7 +5174,7 @@ function ClozePassage({
5110
5174
  ) : null
5111
5175
  ] }, segmentIndex);
5112
5176
  }) }),
5113
- data.translation ? /* @__PURE__ */ jsxs42("div", { className: "rqk-fill-translation", children: [
5177
+ data.translation ? /* @__PURE__ */ jsxs43("div", { className: "rqk-fill-translation", children: [
5114
5178
  "\u8BD1\uFF1A",
5115
5179
  data.translation
5116
5180
  ] }) : null
@@ -5214,7 +5278,7 @@ function useCloze({
5214
5278
  }
5215
5279
 
5216
5280
  // src/questions/cloze/index.tsx
5217
- import { Fragment as Fragment15, jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
5281
+ import { Fragment as Fragment15, jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
5218
5282
  function Cloze({
5219
5283
  data,
5220
5284
  mode = "answer",
@@ -5240,7 +5304,7 @@ function Cloze({
5240
5304
  onSubmit: model.handleSubmit,
5241
5305
  onRetry: model.judge.retry
5242
5306
  });
5243
- return /* @__PURE__ */ jsx59(
5307
+ return /* @__PURE__ */ jsx60(
5244
5308
  QuestShell,
5245
5309
  {
5246
5310
  mode,
@@ -5251,7 +5315,7 @@ function Cloze({
5251
5315
  onBack,
5252
5316
  className: classNames("rqk-quest", "rqk-cloze", className),
5253
5317
  dataQuest: "cloze",
5254
- feedback: /* @__PURE__ */ jsx59(
5318
+ feedback: /* @__PURE__ */ jsx60(
5255
5319
  ClozeFeedback,
5256
5320
  {
5257
5321
  readonly: model.readonly,
@@ -5261,9 +5325,9 @@ function Cloze({
5261
5325
  answerText: model.answerText
5262
5326
  }
5263
5327
  ),
5264
- footer: /* @__PURE__ */ jsx59(ActionBar, { actions, index, onPrev }),
5265
- children: /* @__PURE__ */ jsxs43(Fragment15, { children: [
5266
- /* @__PURE__ */ jsx59(
5328
+ footer: /* @__PURE__ */ jsx60(ActionBar, { actions, index, total, onPrev }),
5329
+ children: /* @__PURE__ */ jsxs44(Fragment15, { children: [
5330
+ /* @__PURE__ */ jsx60(
5267
5331
  ClozePassage,
5268
5332
  {
5269
5333
  data,
@@ -5274,7 +5338,7 @@ function Cloze({
5274
5338
  onGap: model.tapGap
5275
5339
  }
5276
5340
  ),
5277
- /* @__PURE__ */ jsx59(
5341
+ /* @__PURE__ */ jsx60(
5278
5342
  ClozeOptions,
5279
5343
  {
5280
5344
  data,
@@ -5319,7 +5383,7 @@ function readingActions({
5319
5383
  }
5320
5384
 
5321
5385
  // src/questions/reading-comprehension/feedback.tsx
5322
- import { jsx as jsx60 } from "react/jsx-runtime";
5386
+ import { jsx as jsx61 } from "react/jsx-runtime";
5323
5387
  function ReadingFeedback({
5324
5388
  readonly,
5325
5389
  phase,
@@ -5328,7 +5392,7 @@ function ReadingFeedback({
5328
5392
  answerText
5329
5393
  }) {
5330
5394
  if (readonly) {
5331
- return /* @__PURE__ */ jsx60(
5395
+ return /* @__PURE__ */ jsx61(
5332
5396
  FeedbackSheet,
5333
5397
  {
5334
5398
  tone: "ok",
@@ -5340,10 +5404,10 @@ function ReadingFeedback({
5340
5404
  );
5341
5405
  }
5342
5406
  if (phase === "retry") {
5343
- return /* @__PURE__ */ jsx60(FeedbackSheet, { tone: "warn", title: "\u6709\u5C0F\u9898\u7B54\u9519\u4E86", detail: "\u7B54\u5BF9\u7684\u5C0F\u9898\u5DF2\u9501\u5B9A\uFF0C\u9519\u9898\u53EF\u91CD\u65B0\u9009\u62E9" });
5407
+ return /* @__PURE__ */ jsx61(FeedbackSheet, { tone: "warn", title: "\u6709\u5C0F\u9898\u7B54\u9519\u4E86", detail: "\u7B54\u5BF9\u7684\u5C0F\u9898\u5DF2\u9501\u5B9A\uFF0C\u9519\u9898\u53EF\u91CD\u65B0\u9009\u62E9" });
5344
5408
  }
5345
5409
  if (phase === "correct") {
5346
- return /* @__PURE__ */ jsx60(
5410
+ return /* @__PURE__ */ jsx61(
5347
5411
  FeedbackSheet,
5348
5412
  {
5349
5413
  tone: "ok",
@@ -5354,7 +5418,7 @@ function ReadingFeedback({
5354
5418
  );
5355
5419
  }
5356
5420
  if (phase === "locked") {
5357
- return /* @__PURE__ */ jsx60(
5421
+ return /* @__PURE__ */ jsx61(
5358
5422
  FeedbackSheet,
5359
5423
  {
5360
5424
  tone: "bad",
@@ -5370,7 +5434,7 @@ function ReadingFeedback({
5370
5434
  }
5371
5435
 
5372
5436
  // src/questions/reading-comprehension/passage-card.tsx
5373
- import { jsx as jsx61, jsxs as jsxs44 } from "react/jsx-runtime";
5437
+ import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
5374
5438
  function ReadingPassage({
5375
5439
  data,
5376
5440
  collapsible,
@@ -5379,10 +5443,10 @@ function ReadingPassage({
5379
5443
  textRef,
5380
5444
  onToggle
5381
5445
  }) {
5382
- return /* @__PURE__ */ jsxs44(Card, { className: "rqk-reading-card", children: [
5383
- /* @__PURE__ */ jsxs44("div", { className: "rqk-reading-head", children: [
5384
- /* @__PURE__ */ jsx61("span", { className: "rqk-reading-title", children: data.title }),
5385
- collapsible ? /* @__PURE__ */ jsx61(
5446
+ return /* @__PURE__ */ jsxs45(Card, { className: "rqk-reading-card", children: [
5447
+ /* @__PURE__ */ jsxs45("div", { className: "rqk-reading-head", children: [
5448
+ /* @__PURE__ */ jsx62("span", { className: "rqk-reading-title", children: data.title }),
5449
+ collapsible ? /* @__PURE__ */ jsx62(
5386
5450
  "button",
5387
5451
  {
5388
5452
  type: "button",
@@ -5393,12 +5457,12 @@ function ReadingPassage({
5393
5457
  }
5394
5458
  ) : null
5395
5459
  ] }),
5396
- /* @__PURE__ */ jsx61(
5460
+ /* @__PURE__ */ jsx62(
5397
5461
  "div",
5398
5462
  {
5399
5463
  className: classNames("rqk-reading-body", folded && "rqk-is-collapsed"),
5400
5464
  style: { maxHeight: folded ? 80 : fullHeight || void 0 },
5401
- children: /* @__PURE__ */ jsx61(
5465
+ children: /* @__PURE__ */ jsx62(
5402
5466
  "div",
5403
5467
  {
5404
5468
  ref: (element) => {
@@ -5414,7 +5478,7 @@ function ReadingPassage({
5414
5478
  }
5415
5479
 
5416
5480
  // src/questions/reading-comprehension/question-chips.tsx
5417
- import { jsx as jsx62, jsxs as jsxs45 } from "react/jsx-runtime";
5481
+ import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
5418
5482
  function ReadingChips({
5419
5483
  data,
5420
5484
  answers,
@@ -5424,12 +5488,12 @@ function ReadingChips({
5424
5488
  readonly,
5425
5489
  onPick
5426
5490
  }) {
5427
- return /* @__PURE__ */ jsxs45("div", { className: "rqk-reading-chips", children: [
5428
- /* @__PURE__ */ jsx62("span", { className: "rqk-reading-chips-label", children: "\u5C0F\u9898" }),
5491
+ return /* @__PURE__ */ jsxs46("div", { className: "rqk-reading-chips", children: [
5492
+ /* @__PURE__ */ jsx63("span", { className: "rqk-reading-chips-label", children: "\u5C0F\u9898" }),
5429
5493
  data.questions.map((item, questionIndex) => {
5430
5494
  const value = answers[questionIndex];
5431
5495
  const ok = judged && value === item.answer;
5432
- return /* @__PURE__ */ jsx62(
5496
+ return /* @__PURE__ */ jsx63(
5433
5497
  "button",
5434
5498
  {
5435
5499
  type: "button",
@@ -5452,7 +5516,7 @@ function ReadingChips({
5452
5516
  }
5453
5517
 
5454
5518
  // src/questions/reading-comprehension/question-card.tsx
5455
- import { jsx as jsx63, jsxs as jsxs46 } from "react/jsx-runtime";
5519
+ import { jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
5456
5520
  function ReadingQuestion({
5457
5521
  data,
5458
5522
  current,
@@ -5464,18 +5528,18 @@ function ReadingQuestion({
5464
5528
  }) {
5465
5529
  const question = data.questions[current];
5466
5530
  if (!question) return null;
5467
- return /* @__PURE__ */ jsx63(Card, { className: "rqk-reading-question", children: /* @__PURE__ */ jsxs46("div", { className: "rqk-reading-qbody", children: [
5468
- /* @__PURE__ */ jsxs46("div", { className: "rqk-reading-stem", children: [
5469
- /* @__PURE__ */ jsxs46("span", { className: "rqk-reading-stem-index", children: [
5531
+ return /* @__PURE__ */ jsx64(Card, { className: "rqk-reading-question", children: /* @__PURE__ */ jsxs47("div", { className: "rqk-reading-qbody", children: [
5532
+ /* @__PURE__ */ jsxs47("div", { className: "rqk-reading-stem", children: [
5533
+ /* @__PURE__ */ jsxs47("span", { className: "rqk-reading-stem-index", children: [
5470
5534
  current + 1,
5471
5535
  "."
5472
5536
  ] }),
5473
5537
  question.stem
5474
5538
  ] }),
5475
- /* @__PURE__ */ jsx63("div", { className: "rqk-reading-options", children: question.options.map((option, optionIndex) => {
5539
+ /* @__PURE__ */ jsx64("div", { className: "rqk-reading-options", children: question.options.map((option, optionIndex) => {
5476
5540
  const chosen = answers[current] === optionIndex;
5477
5541
  const isAnswer = optionIndex === question.answer;
5478
- return /* @__PURE__ */ jsxs46(
5542
+ return /* @__PURE__ */ jsxs47(
5479
5543
  "button",
5480
5544
  {
5481
5545
  type: "button",
@@ -5489,7 +5553,7 @@ function ReadingQuestion({
5489
5553
  onClick: () => onPick(optionIndex),
5490
5554
  disabled: readonly || locked[current],
5491
5555
  children: [
5492
- /* @__PURE__ */ jsx63("span", { className: "rqk-reading-option-key", children: optionLetter(optionIndex) }),
5556
+ /* @__PURE__ */ jsx64("span", { className: "rqk-reading-option-key", children: optionLetter(optionIndex) }),
5493
5557
  option
5494
5558
  ]
5495
5559
  },
@@ -5500,7 +5564,7 @@ function ReadingQuestion({
5500
5564
  }
5501
5565
 
5502
5566
  // src/questions/reading-comprehension/reading-page.tsx
5503
- import { Fragment as Fragment16, jsx as jsx64, jsxs as jsxs47 } from "react/jsx-runtime";
5567
+ import { Fragment as Fragment16, jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
5504
5568
  function ReadingPage({
5505
5569
  data,
5506
5570
  collapsible,
@@ -5516,8 +5580,8 @@ function ReadingPage({
5516
5580
  onChip,
5517
5581
  onPick
5518
5582
  }) {
5519
- return /* @__PURE__ */ jsxs47(Fragment16, { children: [
5520
- /* @__PURE__ */ jsx64(
5583
+ return /* @__PURE__ */ jsxs48(Fragment16, { children: [
5584
+ /* @__PURE__ */ jsx65(
5521
5585
  ReadingPassage,
5522
5586
  {
5523
5587
  data,
@@ -5528,7 +5592,7 @@ function ReadingPage({
5528
5592
  onToggle
5529
5593
  }
5530
5594
  ),
5531
- /* @__PURE__ */ jsx64(
5595
+ /* @__PURE__ */ jsx65(
5532
5596
  ReadingChips,
5533
5597
  {
5534
5598
  data,
@@ -5540,7 +5604,7 @@ function ReadingPage({
5540
5604
  onPick: onChip
5541
5605
  }
5542
5606
  ),
5543
- /* @__PURE__ */ jsx64(
5607
+ /* @__PURE__ */ jsx65(
5544
5608
  ReadingQuestion,
5545
5609
  {
5546
5610
  data,
@@ -5707,7 +5771,7 @@ function useReadingComprehension({
5707
5771
  }
5708
5772
 
5709
5773
  // src/questions/reading-comprehension/index.tsx
5710
- import { Fragment as Fragment17, jsx as jsx65, jsxs as jsxs48 } from "react/jsx-runtime";
5774
+ import { Fragment as Fragment17, jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
5711
5775
  function ReadingComprehension({
5712
5776
  data,
5713
5777
  mode = "answer",
@@ -5741,22 +5805,22 @@ function ReadingComprehension({
5741
5805
  onSubmit: model.handleSubmit,
5742
5806
  onRetry: model.judge.retry
5743
5807
  });
5744
- return /* @__PURE__ */ jsxs48(
5808
+ return /* @__PURE__ */ jsxs49(
5745
5809
  QuestShell,
5746
5810
  {
5747
5811
  mode,
5748
5812
  title: title != null ? title : "\u9605\u8BFB\u7406\u89E3",
5749
5813
  index,
5750
5814
  total,
5751
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs48(Fragment17, { children: [
5815
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs49(Fragment17, { children: [
5752
5816
  "\u9605\u8BFB\u77ED\u6587\uFF0C\u5B8C\u6210 ",
5753
- /* @__PURE__ */ jsx65("b", { children: data.questions.length }),
5817
+ /* @__PURE__ */ jsx66("b", { children: data.questions.length }),
5754
5818
  " \u9053\u5C0F\u9898"
5755
5819
  ] }),
5756
5820
  onBack,
5757
5821
  className: classNames("rqk-quest", "rqk-reading", className),
5758
5822
  dataQuest: "reading-comprehension",
5759
- feedback: /* @__PURE__ */ jsx65(
5823
+ feedback: /* @__PURE__ */ jsx66(
5760
5824
  ReadingFeedback,
5761
5825
  {
5762
5826
  readonly: model.readonly,
@@ -5766,9 +5830,9 @@ function ReadingComprehension({
5766
5830
  answerText: model.answerText
5767
5831
  }
5768
5832
  ),
5769
- footer: actions.length > 0 || index > 1 && Boolean(onPrev) ? /* @__PURE__ */ jsx65(ActionBar, { actions, index, onPrev }) : void 0,
5833
+ footer: actions.length > 0 || index > 1 && Boolean(onPrev) ? /* @__PURE__ */ jsx66(ActionBar, { actions, index, total, onPrev }) : void 0,
5770
5834
  children: [
5771
- /* @__PURE__ */ jsx65(
5835
+ /* @__PURE__ */ jsx66(
5772
5836
  ReadingPage,
5773
5837
  {
5774
5838
  data,
@@ -5786,7 +5850,7 @@ function ReadingComprehension({
5786
5850
  onPick: model.pick
5787
5851
  }
5788
5852
  ),
5789
- /* @__PURE__ */ jsx65(Toast, { children: model.notice })
5853
+ /* @__PURE__ */ jsx66(Toast, { children: model.notice })
5790
5854
  ]
5791
5855
  }
5792
5856
  );
@@ -5796,67 +5860,69 @@ function ReadingComprehension({
5796
5860
  function listenTaskActions({
5797
5861
  feedback,
5798
5862
  completed,
5799
- onReplay,
5863
+ readonly,
5864
+ labels,
5800
5865
  onSubmit,
5801
5866
  onNext
5802
5867
  }) {
5803
5868
  const actions = [];
5804
5869
  if (feedback) {
5805
- actions.push({ key: "again", label: "\u518D\u542C\u4E00\u904D", variant: "ghost", onClick: onReplay });
5806
- actions.push({ key: "next", label: "\u5B8C\u6210\u5E76\u8FD4\u56DE", onClick: onNext });
5870
+ actions.push({ key: "next", label: labels.next, onClick: onNext });
5807
5871
  } else {
5808
5872
  actions.push({
5809
5873
  key: "submit",
5810
5874
  label: "\u63D0\u4EA4\u5E76\u67E5\u770B\u7EDF\u8BA1",
5811
5875
  onClick: onSubmit,
5812
- disabled: !completed
5876
+ disabled: !completed || readonly
5813
5877
  });
5814
5878
  }
5815
5879
  return actions;
5816
5880
  }
5817
5881
 
5818
5882
  // src/questions/listen-task/feedback.tsx
5819
- import { Fragment as Fragment18, jsx as jsx66, jsxs as jsxs49 } from "react/jsx-runtime";
5883
+ import { Fragment as Fragment18, jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
5820
5884
  function ListenFeedback({
5821
5885
  data,
5822
- progress,
5823
- percent
5886
+ tracks,
5887
+ overall,
5888
+ timeOnTask
5824
5889
  }) {
5825
- var _a;
5890
+ var _a, _b;
5826
5891
  const stats = (_a = data.stats) != null ? _a : [
5827
5892
  {
5828
5893
  label: "\u542C\u97F3\u9891\u65F6\u957F",
5829
- value: /* @__PURE__ */ jsxs49(Fragment18, { children: [
5830
- (progress.timeOnTask / 60).toFixed(1),
5831
- /* @__PURE__ */ jsx66("small", { children: "min" })
5894
+ value: /* @__PURE__ */ jsxs50(Fragment18, { children: [
5895
+ (timeOnTask / 60).toFixed(1),
5896
+ /* @__PURE__ */ jsx67("small", { children: "min" })
5832
5897
  ] })
5833
5898
  },
5834
5899
  {
5835
5900
  label: "\u97F3\u9891\u6570\u91CF",
5836
- value: /* @__PURE__ */ jsxs49(Fragment18, { children: [
5837
- "1",
5838
- /* @__PURE__ */ jsx66("small", { children: "\u6BB5" })
5901
+ value: /* @__PURE__ */ jsxs50(Fragment18, { children: [
5902
+ tracks.length,
5903
+ /* @__PURE__ */ jsx67("small", { children: "\u6BB5" })
5839
5904
  ] })
5840
5905
  },
5841
5906
  {
5842
5907
  label: "\u5B8C\u6210\u5EA6",
5843
- value: /* @__PURE__ */ jsxs49(Fragment18, { children: [
5844
- percent,
5845
- /* @__PURE__ */ jsx66("small", { children: "%" })
5908
+ value: /* @__PURE__ */ jsxs50(Fragment18, { children: [
5909
+ overall,
5910
+ /* @__PURE__ */ jsx67("small", { children: "%" })
5846
5911
  ] })
5847
5912
  }
5848
5913
  ];
5849
- return /* @__PURE__ */ jsxs49("div", { className: "rqk-listen-feedback", children: [
5850
- /* @__PURE__ */ jsx66(Art, { name: "trophy", className: "rqk-listen-feedback-art" }),
5851
- /* @__PURE__ */ jsx66("h2", { className: "rqk-listen-feedback-title", children: "\u542C\u529B\u5B8C\u6210" }),
5852
- /* @__PURE__ */ jsxs49("p", { className: "rqk-listen-feedback-sub", children: [
5853
- "\u5DF2\u542C\u5B8C 1 \u6BB5\u97F3\u9891 \xB7 \u6709\u6548\u64AD\u653E ",
5854
- percent,
5914
+ return /* @__PURE__ */ jsxs50("div", { className: "rqk-listen-feedback", children: [
5915
+ /* @__PURE__ */ jsx67(Art, { name: "trophy", className: "rqk-listen-feedback-art" }),
5916
+ /* @__PURE__ */ jsx67("h2", { className: "rqk-listen-feedback-title", children: (_b = data.finishTitle) != null ? _b : "\u542C\u529B\u5B8C\u6210" }),
5917
+ /* @__PURE__ */ jsxs50("p", { className: "rqk-listen-feedback-sub", children: [
5918
+ tracks.length,
5919
+ " \u6BB5\u97F3\u9891\u5168\u90E8\u5B8C\u6210 \xB7 \u6709\u6548\u64AD\u653E ",
5920
+ overall,
5855
5921
  "%"
5856
5922
  ] }),
5857
- /* @__PURE__ */ jsx66("div", { className: "rqk-listen-stats", children: stats.map((stat, statIndex) => /* @__PURE__ */ jsxs49("div", { className: "rqk-listen-stat", children: [
5858
- /* @__PURE__ */ jsx66("span", { className: "rqk-listen-stat-value", children: stat.value }),
5859
- /* @__PURE__ */ jsx66("span", { className: "rqk-listen-stat-label", children: stat.label })
5923
+ /* @__PURE__ */ jsx67("div", { className: "rqk-listen-stats", children: stats.map((stat, statIndex) => /* @__PURE__ */ jsxs50("div", { className: "rqk-listen-stat", children: [
5924
+ /* @__PURE__ */ jsx67("span", { className: "rqk-listen-stat-value", children: stat.value }),
5925
+ /* @__PURE__ */ jsx67("span", { className: "rqk-listen-stat-label", children: stat.label })
5860
5926
  ] }, statIndex)) })
5861
5927
  ] });
5862
5928
  }
@@ -5870,27 +5936,56 @@ function isArtName(value) {
5870
5936
  }
5871
5937
 
5872
5938
  // src/questions/listen-task/listen-hero.tsx
5873
- import { jsx as jsx67, jsxs as jsxs50 } from "react/jsx-runtime";
5874
- function ListenHero({ data }) {
5875
- return /* @__PURE__ */ jsxs50(Card, { className: "rqk-listen-hero", children: [
5876
- /* @__PURE__ */ jsxs50("div", { className: "rqk-listen-art", children: [
5877
- data.cover && isArtName(data.cover) ? /* @__PURE__ */ jsx67(Art, { name: data.cover, className: "rqk-listen-cover-art" }) : data.cover ? /* @__PURE__ */ jsx67("img", { className: "rqk-listen-cover-img", src: data.cover, alt: "" }) : /* @__PURE__ */ jsx67(Art, { name: "headphones", className: "rqk-listen-cover-art" }),
5878
- data.badge ? /* @__PURE__ */ jsx67("span", { className: "rqk-listen-badge", children: data.badge }) : null
5939
+ import { jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
5940
+ function ListenHero({ data, compact = false }) {
5941
+ return /* @__PURE__ */ jsxs51(Card, { className: classNames("rqk-listen-hero", compact && "rqk-is-compact"), children: [
5942
+ /* @__PURE__ */ jsxs51("div", { className: "rqk-listen-art", children: [
5943
+ data.cover && isArtName(data.cover) ? /* @__PURE__ */ jsx68(Art, { name: data.cover, className: "rqk-listen-cover-art" }) : data.cover ? /* @__PURE__ */ jsx68("img", { className: "rqk-listen-cover-img", src: data.cover, alt: "" }) : /* @__PURE__ */ jsx68(Art, { name: "headphones", className: "rqk-listen-cover-art" }),
5944
+ data.badge ? /* @__PURE__ */ jsx68("span", { className: "rqk-listen-badge", children: data.badge }) : null
5879
5945
  ] }),
5880
- /* @__PURE__ */ jsxs50("div", { className: "rqk-listen-meta", children: [
5881
- /* @__PURE__ */ jsx67("div", { className: "rqk-listen-name", children: data.title }),
5882
- data.subtitle ? /* @__PURE__ */ jsx67("div", { className: "rqk-listen-subtitle", children: data.subtitle }) : null
5946
+ /* @__PURE__ */ jsxs51("div", { className: "rqk-listen-meta", children: [
5947
+ /* @__PURE__ */ jsx68("div", { className: "rqk-listen-name", children: data.title }),
5948
+ data.subtitle ? /* @__PURE__ */ jsx68("div", { className: "rqk-listen-subtitle", children: data.subtitle }) : null
5883
5949
  ] })
5884
5950
  ] });
5885
5951
  }
5886
5952
 
5953
+ // src/questions/listen-task/listen-list.tsx
5954
+ import { jsx as jsx69, jsxs as jsxs52 } from "react/jsx-runtime";
5955
+ function ListenList({
5956
+ tracks,
5957
+ current,
5958
+ done,
5959
+ readonly,
5960
+ onSelect
5961
+ }) {
5962
+ return /* @__PURE__ */ jsx69("div", { className: "rqk-listen-list", children: tracks.map((track, trackIndex) => /* @__PURE__ */ jsxs52(
5963
+ "button",
5964
+ {
5965
+ type: "button",
5966
+ className: classNames("rqk-listen-item", trackIndex === current && "rqk-is-current"),
5967
+ disabled: readonly,
5968
+ onClick: () => onSelect(trackIndex),
5969
+ children: [
5970
+ /* @__PURE__ */ jsx69("span", { className: "rqk-listen-item-no", children: trackIndex + 1 }),
5971
+ /* @__PURE__ */ jsxs52("span", { className: "rqk-listen-item-text", children: [
5972
+ track.title,
5973
+ /* @__PURE__ */ jsx69("small", { children: trackIndex === current ? "\u5F53\u524D\u97F3\u9891" : `\u65F6\u957F ${formatTime(track.duration)}` })
5974
+ ] }),
5975
+ done(trackIndex) ? /* @__PURE__ */ jsx69("span", { className: "rqk-listen-item-ok", children: "\u2713" }) : null
5976
+ ]
5977
+ },
5978
+ trackIndex
5979
+ )) });
5980
+ }
5981
+
5887
5982
  // src/questions/listen-task/listen-ring.tsx
5888
- import { jsx as jsx68, jsxs as jsxs51 } from "react/jsx-runtime";
5983
+ import { jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
5889
5984
  function ListenRing({ percent }) {
5890
- return /* @__PURE__ */ jsxs51("div", { className: "rqk-listen-ring", children: [
5891
- /* @__PURE__ */ jsxs51("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": true, children: [
5892
- /* @__PURE__ */ jsx68("circle", { className: "rqk-listen-ring-bg", cx: "24", cy: "24", r: "20" }),
5893
- /* @__PURE__ */ jsx68(
5985
+ return /* @__PURE__ */ jsxs53("div", { className: "rqk-listen-ring", children: [
5986
+ /* @__PURE__ */ jsxs53("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": true, children: [
5987
+ /* @__PURE__ */ jsx70("circle", { className: "rqk-listen-ring-bg", cx: "24", cy: "24", r: "20" }),
5988
+ /* @__PURE__ */ jsx70(
5894
5989
  "circle",
5895
5990
  {
5896
5991
  className: "rqk-listen-ring-fg",
@@ -5902,7 +5997,7 @@ function ListenRing({ percent }) {
5902
5997
  }
5903
5998
  )
5904
5999
  ] }),
5905
- /* @__PURE__ */ jsxs51("span", { className: classNames("rqk-listen-ring-text", percent >= 100 && "rqk-is-full"), children: [
6000
+ /* @__PURE__ */ jsxs53("span", { className: classNames("rqk-listen-ring-text", percent >= 100 && "rqk-is-full"), children: [
5906
6001
  percent,
5907
6002
  "%"
5908
6003
  ] })
@@ -5910,107 +6005,111 @@ function ListenRing({ percent }) {
5910
6005
  }
5911
6006
 
5912
6007
  // src/questions/listen-task/listen-player.tsx
5913
- import { Fragment as Fragment19, jsx as jsx69, jsxs as jsxs52 } from "react/jsx-runtime";
5914
- function ListenPlayer({
5915
- data,
5916
- progress,
5917
- percent
5918
- }) {
5919
- return /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-player", children: [
5920
- /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-top", children: [
5921
- /* @__PURE__ */ jsx69(
6008
+ import { Fragment as Fragment19, jsx as jsx71, jsxs as jsxs54 } from "react/jsx-runtime";
6009
+ function ListenPlayer({ model }) {
6010
+ var _a;
6011
+ const track = model.track;
6012
+ if (!track) return null;
6013
+ const percent = model.percentFor(model.current);
6014
+ const credit = (_a = model.credits[model.current]) != null ? _a : 0;
6015
+ const duration = Math.max(track.duration, 0);
6016
+ const ratio = duration ? Math.min(1, model.position / duration) : 0;
6017
+ return /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-player", children: [
6018
+ /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-top", children: [
6019
+ /* @__PURE__ */ jsx71(
5922
6020
  "button",
5923
6021
  {
5924
6022
  type: "button",
5925
6023
  className: "rqk-listen-play",
5926
- onClick: progress.toggle,
5927
- "aria-label": progress.playing ? "\u6682\u505C" : "\u64AD\u653E",
5928
- children: progress.playing ? /* @__PURE__ */ jsx69(PauseIcon, {}) : /* @__PURE__ */ jsx69(PlayIcon, {})
6024
+ onClick: model.toggle,
6025
+ "aria-label": model.playing ? "\u6682\u505C" : "\u64AD\u653E",
6026
+ children: model.playing ? /* @__PURE__ */ jsx71(PauseIcon, {}) : /* @__PURE__ */ jsx71(PlayIcon, {})
5929
6027
  }
5930
6028
  ),
5931
- /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-info", children: [
5932
- /* @__PURE__ */ jsx69("span", { className: "rqk-listen-state", children: progress.playing ? "\u6B63\u5728\u64AD\u653E\u2026" : progress.finished ? "\u64AD\u653E\u5B8C\u6BD5" : "\u5DF2\u6682\u505C" }),
5933
- /* @__PURE__ */ jsx69("span", { className: "rqk-listen-hint", children: progress.playing ? "\u64AD\u653E\u4E2D\u2026" : "\u70B9\u51FB\u64AD\u653E" })
6029
+ /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-info", children: [
6030
+ /* @__PURE__ */ jsx71("span", { className: "rqk-listen-state", children: model.playing ? "\u6B63\u5728\u64AD\u653E\u2026" : model.finished ? "\u64AD\u653E\u5B8C\u6BD5" : "\u5DF2\u6682\u505C" }),
6031
+ /* @__PURE__ */ jsx71("span", { className: "rqk-listen-hint", children: model.tracks.length > 1 ? `\u7B2C ${model.current + 1} \u6BB5 \xB7 \u5171 ${model.tracks.length} \u6BB5` : model.playing ? "\u64AD\u653E\u4E2D\u2026" : "\u70B9\u51FB\u64AD\u653E" })
5934
6032
  ] })
5935
6033
  ] }),
5936
- /* @__PURE__ */ jsxs52(
6034
+ /* @__PURE__ */ jsxs54(
5937
6035
  "div",
5938
6036
  {
5939
6037
  className: "rqk-listen-track",
5940
6038
  onPointerDown: (event) => {
6039
+ if (model.readonly) return;
5941
6040
  const rect = event.currentTarget.getBoundingClientRect();
5942
- const ratio = Math.min(1, Math.max(0, (event.clientX - rect.left) / rect.width));
5943
- progress.seek(ratio * data.duration);
6041
+ const next = Math.min(1, Math.max(0, (event.clientX - rect.left) / rect.width));
6042
+ model.seek(next * duration);
5944
6043
  },
5945
6044
  children: [
5946
- /* @__PURE__ */ jsx69("div", { className: "rqk-listen-buffer" }),
5947
- /* @__PURE__ */ jsx69(
5948
- "div",
5949
- {
5950
- className: "rqk-listen-fill",
5951
- style: { width: `${progress.position / data.duration * 100}%` }
5952
- }
5953
- ),
5954
- /* @__PURE__ */ jsx69(
5955
- "div",
5956
- {
5957
- className: "rqk-listen-knob",
5958
- style: { left: `${progress.position / data.duration * 100}%` }
5959
- }
5960
- )
6045
+ /* @__PURE__ */ jsx71("div", { className: "rqk-listen-buffer" }),
6046
+ /* @__PURE__ */ jsx71("div", { className: "rqk-listen-fill", style: { width: `${ratio * 100}%` } }),
6047
+ /* @__PURE__ */ jsx71("div", { className: "rqk-listen-knob", style: { left: `${ratio * 100}%` } })
5961
6048
  ]
5962
6049
  }
5963
6050
  ),
5964
- /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-times", children: [
5965
- /* @__PURE__ */ jsx69("span", { children: formatTime(progress.position) }),
5966
- /* @__PURE__ */ jsx69("span", { children: formatTime(data.duration) })
6051
+ /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-times", children: [
6052
+ /* @__PURE__ */ jsx71("span", { children: formatTime(model.position) }),
6053
+ /* @__PURE__ */ jsx71("span", { children: formatTime(duration) })
5967
6054
  ] }),
5968
- /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-controls", children: [
5969
- /* @__PURE__ */ jsxs52(
6055
+ /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-controls", children: [
6056
+ /* @__PURE__ */ jsxs54(
5970
6057
  "button",
5971
6058
  {
5972
6059
  type: "button",
5973
- className: classNames("rqk-listen-loop", progress.loop && "rqk-is-on"),
5974
- onClick: () => progress.setLoop(!progress.loop),
6060
+ className: classNames("rqk-listen-loop", model.loop && "rqk-is-on"),
6061
+ disabled: model.readonly,
6062
+ onClick: () => model.setLoop(!model.loop),
5975
6063
  children: [
5976
- /* @__PURE__ */ jsx69(LoopIcon, {}),
6064
+ /* @__PURE__ */ jsx71(LoopIcon, {}),
5977
6065
  "\u5FAA\u73AF"
5978
6066
  ]
5979
6067
  }
5980
6068
  ),
5981
- /* @__PURE__ */ jsx69(
6069
+ /* @__PURE__ */ jsx71(
5982
6070
  SegmentedControl,
5983
6071
  {
5984
6072
  ariaLabel: "\u64AD\u653E\u901F\u5EA6",
5985
6073
  className: "rqk-listen-speeds",
5986
6074
  options: SPEED_OPTIONS,
5987
- value: `${progress.speed}`,
5988
- onChange: (value) => progress.setSpeed(Number(value))
6075
+ value: `${model.speed}`,
6076
+ disabled: model.readonly,
6077
+ onChange: (value) => model.setSpeed(Number(value))
5989
6078
  }
5990
6079
  )
5991
6080
  ] }),
5992
- /* @__PURE__ */ jsxs52("div", { className: "rqk-listen-progress", children: [
5993
- /* @__PURE__ */ jsx69(ListenRing, { percent }),
5994
- /* @__PURE__ */ jsx69("div", { className: "rqk-listen-credit", children: Math.abs(progress.position - progress.credited) > 0.75 ? /* @__PURE__ */ jsxs52(Fragment19, { children: [
6081
+ /* @__PURE__ */ jsxs54("div", { className: "rqk-listen-progress", children: [
6082
+ /* @__PURE__ */ jsx71(ListenRing, { percent }),
6083
+ /* @__PURE__ */ jsx71("div", { className: "rqk-listen-credit", children: Math.abs(model.position - credit) > 0.75 ? /* @__PURE__ */ jsxs54(Fragment19, { children: [
5995
6084
  "\u64AD\u653E ",
5996
- /* @__PURE__ */ jsx69("b", { children: formatTime(progress.position) }),
6085
+ /* @__PURE__ */ jsx71("b", { children: formatTime(model.position) }),
5997
6086
  " / ",
5998
- formatTime(data.duration),
5999
- /* @__PURE__ */ jsx69("span", { className: "rqk-listen-credit-sep", children: "\xB7" }),
6087
+ formatTime(duration),
6088
+ /* @__PURE__ */ jsx71("span", { className: "rqk-listen-credit-sep", children: "\xB7" }),
6000
6089
  "\u6709\u6548 ",
6001
- /* @__PURE__ */ jsx69("b", { children: formatTime(progress.credited) })
6002
- ] }) : /* @__PURE__ */ jsxs52(Fragment19, { children: [
6090
+ /* @__PURE__ */ jsx71("b", { children: formatTime(credit) })
6091
+ ] }) : /* @__PURE__ */ jsxs54(Fragment19, { children: [
6003
6092
  "\u6709\u6548\u64AD\u653E ",
6004
- /* @__PURE__ */ jsx69("b", { children: formatTime(progress.credited) }),
6093
+ /* @__PURE__ */ jsx71("b", { children: formatTime(credit) }),
6005
6094
  " / ",
6006
- formatTime(data.duration)
6095
+ formatTime(duration)
6007
6096
  ] }) })
6008
6097
  ] }),
6009
- data.audio ? /* @__PURE__ */ jsx69(
6098
+ model.tracks.length > 1 ? /* @__PURE__ */ jsx71(
6099
+ ListenList,
6100
+ {
6101
+ tracks: model.tracks,
6102
+ current: model.current,
6103
+ done: model.done,
6104
+ readonly: model.readonly,
6105
+ onSelect: model.selectTrack
6106
+ }
6107
+ ) : null,
6108
+ track.audio ? /* @__PURE__ */ jsx71(
6010
6109
  "audio",
6011
6110
  {
6012
- ref: progress.mediaRef,
6013
- src: data.audio,
6111
+ ref: model.audioRef,
6112
+ src: track.audio,
6014
6113
  preload: "metadata"
6015
6114
  }
6016
6115
  ) : null
@@ -6018,33 +6117,223 @@ function ListenPlayer({
6018
6117
  }
6019
6118
 
6020
6119
  // src/questions/listen-task/use-listen-task.ts
6021
- import { useState as useState24 } from "react";
6022
- function useListenTask({ data, onSubmit }) {
6120
+ import { useEffect as useEffect17, useMemo as useMemo5, useRef as useRef13, useState as useState24 } from "react";
6121
+ var TICK_MS2 = 100;
6122
+ function useListenTask({
6123
+ data,
6124
+ onSubmit,
6125
+ mode = "answer",
6126
+ initialRatios
6127
+ }) {
6128
+ var _a, _b, _c, _d, _e;
6129
+ const tracks = useMemo5(() => {
6130
+ var _a2, _b2;
6131
+ if ((_a2 = data.audios) == null ? void 0 : _a2.length) return data.audios;
6132
+ return [{ title: data.title, audio: data.audio, duration: (_b2 = data.duration) != null ? _b2 : 0 }];
6133
+ }, [data]);
6134
+ const readonly = mode === "lookup" || mode === "preview";
6135
+ const ratios = tracks.map(
6136
+ (_, index) => {
6137
+ var _a2;
6138
+ return Math.min(1, Math.max(0, (_a2 = initialRatios == null ? void 0 : initialRatios[index]) != null ? _a2 : 0));
6139
+ }
6140
+ );
6141
+ const secondsFor = (ratio, track2) => Math.min(track2.duration, Math.max(0, ratio * track2.duration));
6142
+ const initial = tracks.map((track2, index) => secondsFor(ratios[index], track2));
6023
6143
  const [view, setView] = useState24("task");
6024
- const progress = useMediaProgress({
6025
- duration: data.duration,
6026
- src: data.audio,
6027
- speed: 1
6028
- });
6029
- const percent = Math.min(100, Math.round(progress.ratio * 100));
6144
+ const [current, setCurrent] = useState24(0);
6145
+ const [position, setPosition] = useState24((_a = initial[0]) != null ? _a : 0);
6146
+ const [credits, setCredits] = useState24(initial);
6147
+ const [playing, setPlaying] = useState24(false);
6148
+ const [finished, setFinished] = useState24(false);
6149
+ const [speed, setSpeedState] = useState24(1);
6150
+ const [loop, setLoopState] = useState24(false);
6151
+ const [timeOnTask, setTimeOnTask] = useState24(0);
6152
+ const audioRef = useRef13(null);
6153
+ const positionRef = useRef13((_b = initial[0]) != null ? _b : 0);
6154
+ const creditRef = useRef13((_c = initial[0]) != null ? _c : 0);
6155
+ const playingRef = useRef13(false);
6156
+ const speedRef = useRef13(1);
6157
+ const loopRef = useRef13(false);
6158
+ const track = (_d = tracks[current]) != null ? _d : tracks[0];
6159
+ const duration = (_e = track == null ? void 0 : track.duration) != null ? _e : 0;
6160
+ useEffect17(() => {
6161
+ var _a2;
6162
+ const next = tracks.map((t, i) => secondsFor(ratios[i], t));
6163
+ setCredits(next);
6164
+ const credit = (_a2 = next[current]) != null ? _a2 : 0;
6165
+ creditRef.current = credit;
6166
+ positionRef.current = Math.min(track.duration, credit);
6167
+ setPosition(positionRef.current);
6168
+ }, [tracks]);
6169
+ const applyPosition = (value) => {
6170
+ const next = Math.min(duration, Math.max(0, value));
6171
+ positionRef.current = next;
6172
+ setPosition(next);
6173
+ };
6174
+ const applyCredit = (value) => {
6175
+ const next = Math.min(duration, Math.max(0, value));
6176
+ creditRef.current = next;
6177
+ setCredits((values) => values.map((item, itemIndex) => itemIndex === current ? next : item));
6178
+ };
6179
+ const pause = () => {
6180
+ var _a2;
6181
+ playingRef.current = false;
6182
+ setPlaying(false);
6183
+ (_a2 = audioRef.current) == null ? void 0 : _a2.pause();
6184
+ };
6185
+ const toggle = () => {
6186
+ var _a2;
6187
+ if (playingRef.current) {
6188
+ pause();
6189
+ return;
6190
+ }
6191
+ if (positionRef.current >= duration) {
6192
+ applyPosition(0);
6193
+ setFinished(false);
6194
+ }
6195
+ playingRef.current = true;
6196
+ setPlaying(true);
6197
+ if (track == null ? void 0 : track.audio) void ((_a2 = audioRef.current) == null ? void 0 : _a2.play().catch(() => void 0));
6198
+ };
6199
+ const seek = (seconds) => {
6200
+ if (readonly) return;
6201
+ applyPosition(seconds);
6202
+ if (seconds < duration) setFinished(false);
6203
+ if (audioRef.current) audioRef.current.currentTime = Math.max(0, Math.min(duration, seconds));
6204
+ };
6205
+ const setSpeed = (value) => {
6206
+ if (readonly) return;
6207
+ speedRef.current = value;
6208
+ setSpeedState(value);
6209
+ if (audioRef.current) audioRef.current.playbackRate = value;
6210
+ };
6211
+ const setLoop = (value) => {
6212
+ if (readonly) return;
6213
+ loopRef.current = value;
6214
+ setLoopState(value);
6215
+ if (audioRef.current) audioRef.current.loop = value;
6216
+ };
6217
+ const selectTrack = (trackIndex) => {
6218
+ var _a2, _b2;
6219
+ if (readonly || trackIndex === current) return;
6220
+ playingRef.current = false;
6221
+ setPlaying(false);
6222
+ setFinished(false);
6223
+ (_a2 = audioRef.current) == null ? void 0 : _a2.pause();
6224
+ setCurrent(trackIndex);
6225
+ positionRef.current = 0;
6226
+ creditRef.current = (_b2 = credits[trackIndex]) != null ? _b2 : 0;
6227
+ setPosition(0);
6228
+ };
6229
+ useEffect17(() => {
6230
+ if ((track == null ? void 0 : track.audio) || !playing) return void 0;
6231
+ const timer = window.setInterval(() => {
6232
+ if (!playingRef.current) return;
6233
+ const delta = TICK_MS2 / 1e3 * speedRef.current;
6234
+ let next = positionRef.current + delta;
6235
+ let stopped = false;
6236
+ if (next >= duration) {
6237
+ if (loopRef.current && duration > 0) {
6238
+ next -= duration;
6239
+ } else {
6240
+ next = duration;
6241
+ stopped = true;
6242
+ }
6243
+ }
6244
+ applyPosition(next);
6245
+ applyCredit(creditRef.current + delta);
6246
+ setTimeOnTask((value) => value + TICK_MS2 / 1e3);
6247
+ if (stopped) {
6248
+ playingRef.current = false;
6249
+ setPlaying(false);
6250
+ setFinished(true);
6251
+ }
6252
+ }, TICK_MS2);
6253
+ return () => window.clearInterval(timer);
6254
+ }, [duration, playing, track == null ? void 0 : track.audio]);
6255
+ useEffect17(() => {
6256
+ const media = audioRef.current;
6257
+ if (!media || !(track == null ? void 0 : track.audio)) return void 0;
6258
+ media.playbackRate = speedRef.current;
6259
+ media.loop = loopRef.current;
6260
+ const handleTime = () => {
6261
+ const next = media.currentTime;
6262
+ const delta = next - positionRef.current;
6263
+ if (delta > 0 && delta < 1.2) {
6264
+ applyCredit(creditRef.current + delta);
6265
+ setTimeOnTask((value) => value + delta);
6266
+ }
6267
+ applyPosition(next);
6268
+ };
6269
+ const handleEnded = () => {
6270
+ setFinished(true);
6271
+ if (!loopRef.current) {
6272
+ playingRef.current = false;
6273
+ setPlaying(false);
6274
+ }
6275
+ };
6276
+ media.addEventListener("timeupdate", handleTime);
6277
+ media.addEventListener("ended", handleEnded);
6278
+ return () => {
6279
+ media.removeEventListener("timeupdate", handleTime);
6280
+ media.removeEventListener("ended", handleEnded);
6281
+ };
6282
+ }, [current, track == null ? void 0 : track.audio]);
6283
+ const percentFor = (trackIndex) => {
6284
+ var _a2;
6285
+ const item = tracks[trackIndex];
6286
+ if (!item || item.duration <= 0) return 0;
6287
+ return Math.min(100, Math.round(((_a2 = credits[trackIndex]) != null ? _a2 : 0) / item.duration * 100));
6288
+ };
6289
+ const done = (trackIndex) => percentFor(trackIndex) >= 90;
6290
+ const allDone = tracks.every((_item, trackIndex) => done(trackIndex));
6291
+ const overall = Math.round(
6292
+ tracks.reduce(
6293
+ (sum, item, trackIndex) => {
6294
+ var _a2;
6295
+ return sum + (item.duration > 0 ? Math.min(1, ((_a2 = credits[trackIndex]) != null ? _a2 : 0) / item.duration) : 0);
6296
+ },
6297
+ 0
6298
+ ) / tracks.length * 100
6299
+ );
6030
6300
  const handleSubmit = () => {
6031
6301
  setView("feedback");
6032
6302
  onSubmit == null ? void 0 : onSubmit({
6033
6303
  correct: true,
6034
6304
  attempts: 1,
6035
- answer: { ratio: progress.ratio }
6305
+ answer: { credits }
6036
6306
  });
6037
6307
  };
6038
- const replay = () => {
6039
- progress.pause();
6040
- progress.seek(0);
6041
- setView("task");
6308
+ return {
6309
+ allDone,
6310
+ audioRef,
6311
+ credits,
6312
+ current,
6313
+ done,
6314
+ finished,
6315
+ handleSubmit,
6316
+ loop,
6317
+ overall,
6318
+ percentFor,
6319
+ playing,
6320
+ position,
6321
+ readonly,
6322
+ selectTrack,
6323
+ setLoop,
6324
+ setSpeed,
6325
+ speed,
6326
+ timeOnTask,
6327
+ toggle,
6328
+ track,
6329
+ tracks,
6330
+ view,
6331
+ seek
6042
6332
  };
6043
- return { handleSubmit, percent, progress, replay, view };
6044
6333
  }
6045
6334
 
6046
6335
  // src/questions/listen-task/index.tsx
6047
- import { Fragment as Fragment20, jsx as jsx70, jsxs as jsxs53 } from "react/jsx-runtime";
6336
+ import { Fragment as Fragment20, jsx as jsx72, jsxs as jsxs55 } from "react/jsx-runtime";
6048
6337
  function ListenTask({
6049
6338
  data,
6050
6339
  mode = "answer",
@@ -6056,35 +6345,50 @@ function ListenTask({
6056
6345
  onPrev,
6057
6346
  onNext,
6058
6347
  onSubmit,
6059
- className
6348
+ bare,
6349
+ className,
6350
+ initialRatios
6060
6351
  }) {
6061
- const model = useListenTask({ data, onSubmit });
6352
+ const labels = useQuestLabels();
6353
+ const model = useListenTask({ data, onSubmit, mode, initialRatios });
6062
6354
  const actions = listenTaskActions({
6063
6355
  feedback: model.view === "feedback",
6064
- completed: model.progress.completed,
6065
- onReplay: model.replay,
6356
+ completed: model.allDone,
6357
+ readonly: model.readonly,
6358
+ labels,
6066
6359
  onSubmit: model.handleSubmit,
6067
6360
  onNext
6068
6361
  });
6069
- return /* @__PURE__ */ jsx70(
6362
+ return /* @__PURE__ */ jsx72(
6070
6363
  QuestShell,
6071
6364
  {
6072
6365
  mode,
6073
6366
  title: title != null ? title : model.view === "feedback" ? "\u542C\u529B\u7EDF\u8BA1" : "\u542C\u529B\u4EFB\u52A1",
6074
6367
  index,
6075
6368
  total,
6076
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs53(Fragment20, { children: [
6077
- "\u542C\u5B8C\u97F3\u9891\uFF0C\u6709\u6548\u64AD\u653E ",
6078
- /* @__PURE__ */ jsx70("b", { children: "\u226590%" }),
6079
- " \u89C6\u4E3A\u5B8C\u6210"
6369
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs55(Fragment20, { children: [
6370
+ model.tracks.length > 1 ? "\u542C\u5B8C\u6BCF\u6BB5\u97F3\u9891" : "\u542C\u5B8C\u97F3\u9891",
6371
+ "\uFF0C\u6709\u6548\u64AD\u653E ",
6372
+ /* @__PURE__ */ jsx72("b", { children: "\u226590%" }),
6373
+ " ",
6374
+ "\u89C6\u4E3A\u5B8C\u6210"
6080
6375
  ] }),
6081
6376
  onBack,
6377
+ bare,
6082
6378
  className: classNames("rqk-quest", "rqk-listen", className),
6083
6379
  dataQuest: "listen-task",
6084
- footer: /* @__PURE__ */ jsx70(ActionBar, { actions, index, onPrev }),
6085
- children: model.view === "feedback" ? /* @__PURE__ */ jsx70(ListenFeedback, { data, progress: model.progress, percent: model.percent }) : /* @__PURE__ */ jsxs53(Fragment20, { children: [
6086
- /* @__PURE__ */ jsx70(ListenHero, { data }),
6087
- /* @__PURE__ */ jsx70(ListenPlayer, { data, progress: model.progress, percent: model.percent })
6380
+ footer: /* @__PURE__ */ jsx72(ActionBar, { actions, index, total, onPrev }),
6381
+ children: model.view === "feedback" ? /* @__PURE__ */ jsx72(
6382
+ ListenFeedback,
6383
+ {
6384
+ data,
6385
+ tracks: model.tracks,
6386
+ overall: model.overall,
6387
+ timeOnTask: model.timeOnTask
6388
+ }
6389
+ ) : /* @__PURE__ */ jsxs55(Fragment20, { children: [
6390
+ /* @__PURE__ */ jsx72(ListenHero, { data, compact: model.tracks.length > 1 }),
6391
+ /* @__PURE__ */ jsx72(ListenPlayer, { model })
6088
6392
  ] })
6089
6393
  }
6090
6394
  );
@@ -6094,14 +6398,13 @@ function ListenTask({
6094
6398
  function videoTaskActions({
6095
6399
  feedback,
6096
6400
  allDone,
6097
- onReplay,
6401
+ labels,
6098
6402
  onSubmit,
6099
6403
  onNext
6100
6404
  }) {
6101
6405
  const actions = [];
6102
6406
  if (feedback) {
6103
- actions.push({ key: "again", label: "\u518D\u770B\u4E00\u904D", variant: "ghost", onClick: onReplay });
6104
- actions.push({ key: "next", label: "\u5B8C\u6210\u5E76\u8FD4\u56DE", onClick: onNext });
6407
+ actions.push({ key: "next", label: labels.next, onClick: onNext });
6105
6408
  } else {
6106
6409
  actions.push({
6107
6410
  key: "submit",
@@ -6114,7 +6417,7 @@ function videoTaskActions({
6114
6417
  }
6115
6418
 
6116
6419
  // src/questions/video-task/feedback.tsx
6117
- import { Fragment as Fragment21, jsx as jsx71, jsxs as jsxs54 } from "react/jsx-runtime";
6420
+ import { Fragment as Fragment21, jsx as jsx73, jsxs as jsxs56 } from "react/jsx-runtime";
6118
6421
  function VideoFeedback({
6119
6422
  data,
6120
6423
  overall,
@@ -6124,63 +6427,63 @@ function VideoFeedback({
6124
6427
  const stats = (_a = data.stats) != null ? _a : [
6125
6428
  {
6126
6429
  label: "\u89C2\u770B\u65F6\u957F",
6127
- value: /* @__PURE__ */ jsxs54(Fragment21, { children: [
6430
+ value: /* @__PURE__ */ jsxs56(Fragment21, { children: [
6128
6431
  (timeOnTask / 60).toFixed(1),
6129
- /* @__PURE__ */ jsx71("small", { children: "min" })
6432
+ /* @__PURE__ */ jsx73("small", { children: "min" })
6130
6433
  ] })
6131
6434
  },
6132
6435
  {
6133
6436
  label: "\u89C6\u9891\u6570\u91CF",
6134
- value: /* @__PURE__ */ jsxs54(Fragment21, { children: [
6437
+ value: /* @__PURE__ */ jsxs56(Fragment21, { children: [
6135
6438
  data.videos.length,
6136
- /* @__PURE__ */ jsx71("small", { children: "\u4E2A" })
6439
+ /* @__PURE__ */ jsx73("small", { children: "\u4E2A" })
6137
6440
  ] })
6138
6441
  },
6139
6442
  {
6140
6443
  label: "\u5B8C\u6210\u5EA6",
6141
- value: /* @__PURE__ */ jsxs54(Fragment21, { children: [
6444
+ value: /* @__PURE__ */ jsxs56(Fragment21, { children: [
6142
6445
  overall,
6143
- /* @__PURE__ */ jsx71("small", { children: "%" })
6446
+ /* @__PURE__ */ jsx73("small", { children: "%" })
6144
6447
  ] })
6145
6448
  }
6146
6449
  ];
6147
- return /* @__PURE__ */ jsxs54("div", { className: "rqk-video-feedback", children: [
6148
- /* @__PURE__ */ jsx71(Art, { name: "trophy", className: "rqk-video-feedback-art" }),
6149
- /* @__PURE__ */ jsx71("h2", { className: "rqk-video-feedback-title", children: (_b = data.finishTitle) != null ? _b : "\u89C6\u9891\u770B\u5B8C\u5566" }),
6150
- /* @__PURE__ */ jsxs54("p", { className: "rqk-video-feedback-sub", children: [
6450
+ return /* @__PURE__ */ jsxs56("div", { className: "rqk-video-feedback", children: [
6451
+ /* @__PURE__ */ jsx73(Art, { name: "trophy", className: "rqk-video-feedback-art" }),
6452
+ /* @__PURE__ */ jsx73("h2", { className: "rqk-video-feedback-title", children: (_b = data.finishTitle) != null ? _b : "\u89C6\u9891\u770B\u5B8C\u5566" }),
6453
+ /* @__PURE__ */ jsxs56("p", { className: "rqk-video-feedback-sub", children: [
6151
6454
  data.videos.length,
6152
6455
  " \u4E2A\u89C6\u9891\u5168\u90E8\u5B8C\u6210 \xB7 \u6709\u6548\u89C2\u770B ",
6153
6456
  overall,
6154
6457
  "%"
6155
6458
  ] }),
6156
- /* @__PURE__ */ jsx71("div", { className: "rqk-video-stats", children: stats.map((stat, statIndex) => /* @__PURE__ */ jsxs54("div", { className: "rqk-video-stat", children: [
6157
- /* @__PURE__ */ jsx71("span", { className: "rqk-video-stat-value", children: stat.value }),
6158
- /* @__PURE__ */ jsx71("span", { className: "rqk-video-stat-label", children: stat.label })
6459
+ /* @__PURE__ */ jsx73("div", { className: "rqk-video-stats", children: stats.map((stat, statIndex) => /* @__PURE__ */ jsxs56("div", { className: "rqk-video-stat", children: [
6460
+ /* @__PURE__ */ jsx73("span", { className: "rqk-video-stat-value", children: stat.value }),
6461
+ /* @__PURE__ */ jsx73("span", { className: "rqk-video-stat-label", children: stat.label })
6159
6462
  ] }, statIndex)) })
6160
6463
  ] });
6161
6464
  }
6162
6465
 
6163
6466
  // src/questions/video-task/video-list.tsx
6164
- import { jsx as jsx72, jsxs as jsxs55 } from "react/jsx-runtime";
6467
+ import { jsx as jsx74, jsxs as jsxs57 } from "react/jsx-runtime";
6165
6468
  function VideoList({
6166
6469
  data,
6167
6470
  current,
6168
6471
  done,
6169
6472
  onSelect
6170
6473
  }) {
6171
- return /* @__PURE__ */ jsx72("div", { className: "rqk-video-list", children: data.videos.map((item, videoIndex) => /* @__PURE__ */ jsxs55(
6474
+ return /* @__PURE__ */ jsx74("div", { className: "rqk-video-list", children: data.videos.map((item, videoIndex) => /* @__PURE__ */ jsxs57(
6172
6475
  "button",
6173
6476
  {
6174
6477
  type: "button",
6175
6478
  className: classNames("rqk-video-item", videoIndex === current && "rqk-is-current"),
6176
6479
  onClick: () => onSelect(videoIndex),
6177
6480
  children: [
6178
- /* @__PURE__ */ jsx72("span", { className: "rqk-video-item-no", children: videoIndex + 1 }),
6179
- /* @__PURE__ */ jsxs55("span", { className: "rqk-video-item-text", children: [
6481
+ /* @__PURE__ */ jsx74("span", { className: "rqk-video-item-no", children: videoIndex + 1 }),
6482
+ /* @__PURE__ */ jsxs57("span", { className: "rqk-video-item-text", children: [
6180
6483
  item.title,
6181
- /* @__PURE__ */ jsx72("small", { children: videoIndex === current ? "\u6B63\u5728\u89C2\u770B" : `\u65F6\u957F ${formatTime(item.duration)}` })
6484
+ /* @__PURE__ */ jsx74("small", { children: videoIndex === current ? "\u6B63\u5728\u89C2\u770B" : `\u65F6\u957F ${formatTime(item.duration)}` })
6182
6485
  ] }),
6183
- done(videoIndex) ? /* @__PURE__ */ jsx72("span", { className: "rqk-video-item-ok", children: "\u2713" }) : null
6486
+ done(videoIndex) ? /* @__PURE__ */ jsx74("span", { className: "rqk-video-item-ok", children: "\u2713" }) : null
6184
6487
  ]
6185
6488
  },
6186
6489
  videoIndex
@@ -6188,12 +6491,12 @@ function VideoList({
6188
6491
  }
6189
6492
 
6190
6493
  // src/questions/video-task/video-ring.tsx
6191
- import { jsx as jsx73, jsxs as jsxs56 } from "react/jsx-runtime";
6494
+ import { jsx as jsx75, jsxs as jsxs58 } from "react/jsx-runtime";
6192
6495
  function VideoRing({ percent }) {
6193
- return /* @__PURE__ */ jsxs56("div", { className: "rqk-video-ring", children: [
6194
- /* @__PURE__ */ jsxs56("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": true, children: [
6195
- /* @__PURE__ */ jsx73("circle", { className: "rqk-video-ring-bg", cx: "24", cy: "24", r: "20" }),
6196
- /* @__PURE__ */ jsx73(
6496
+ return /* @__PURE__ */ jsxs58("div", { className: "rqk-video-ring", children: [
6497
+ /* @__PURE__ */ jsxs58("svg", { width: "48", height: "48", viewBox: "0 0 48 48", "aria-hidden": true, children: [
6498
+ /* @__PURE__ */ jsx75("circle", { className: "rqk-video-ring-bg", cx: "24", cy: "24", r: "20" }),
6499
+ /* @__PURE__ */ jsx75(
6197
6500
  "circle",
6198
6501
  {
6199
6502
  className: "rqk-video-ring-fg",
@@ -6206,7 +6509,7 @@ function VideoRing({ percent }) {
6206
6509
  }
6207
6510
  )
6208
6511
  ] }),
6209
- /* @__PURE__ */ jsxs56("span", { className: classNames("rqk-video-ring-text", percent >= 100 && "rqk-is-full"), children: [
6512
+ /* @__PURE__ */ jsxs58("span", { className: classNames("rqk-video-ring-text", percent >= 100 && "rqk-is-full"), children: [
6210
6513
  percent,
6211
6514
  "%"
6212
6515
  ] })
@@ -6214,7 +6517,7 @@ function VideoRing({ percent }) {
6214
6517
  }
6215
6518
 
6216
6519
  // src/questions/video-task/video-controls.tsx
6217
- import { Fragment as Fragment22, jsx as jsx74, jsxs as jsxs57 } from "react/jsx-runtime";
6520
+ import { Fragment as Fragment22, jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
6218
6521
  function VideoControls({
6219
6522
  data,
6220
6523
  video,
@@ -6231,24 +6534,24 @@ function VideoControls({
6231
6534
  applyPosition
6232
6535
  }) {
6233
6536
  var _a, _b, _c;
6234
- return /* @__PURE__ */ jsxs57(Card, { className: "rqk-video-controls", children: [
6235
- /* @__PURE__ */ jsxs57("div", { className: "rqk-video-ctrl", children: [
6236
- /* @__PURE__ */ jsx74(
6537
+ return /* @__PURE__ */ jsxs59(Card, { className: "rqk-video-controls", children: [
6538
+ /* @__PURE__ */ jsxs59("div", { className: "rqk-video-ctrl", children: [
6539
+ /* @__PURE__ */ jsx76(
6237
6540
  "button",
6238
6541
  {
6239
6542
  type: "button",
6240
6543
  className: "rqk-video-mini",
6241
6544
  onClick: onToggle,
6242
6545
  "aria-label": playing ? "\u6682\u505C" : "\u64AD\u653E",
6243
- children: playing ? /* @__PURE__ */ jsx74(PauseIcon, {}) : /* @__PURE__ */ jsx74(PlayIcon, {})
6546
+ children: playing ? /* @__PURE__ */ jsx76(PauseIcon, {}) : /* @__PURE__ */ jsx76(PlayIcon, {})
6244
6547
  }
6245
6548
  ),
6246
- /* @__PURE__ */ jsxs57("div", { className: "rqk-video-scrub", children: [
6247
- /* @__PURE__ */ jsxs57("div", { className: "rqk-video-times", children: [
6248
- /* @__PURE__ */ jsx74("span", { children: formatTime(position) }),
6249
- /* @__PURE__ */ jsx74("span", { children: formatTime(video.duration) })
6549
+ /* @__PURE__ */ jsxs59("div", { className: "rqk-video-scrub", children: [
6550
+ /* @__PURE__ */ jsxs59("div", { className: "rqk-video-times", children: [
6551
+ /* @__PURE__ */ jsx76("span", { children: formatTime(position) }),
6552
+ /* @__PURE__ */ jsx76("span", { children: formatTime(video.duration) })
6250
6553
  ] }),
6251
- /* @__PURE__ */ jsxs57(
6554
+ /* @__PURE__ */ jsxs59(
6252
6555
  "div",
6253
6556
  {
6254
6557
  className: "rqk-video-track",
@@ -6258,14 +6561,14 @@ function VideoControls({
6258
6561
  applyPosition(ratio * video.duration);
6259
6562
  },
6260
6563
  children: [
6261
- /* @__PURE__ */ jsx74(
6564
+ /* @__PURE__ */ jsx76(
6262
6565
  "div",
6263
6566
  {
6264
6567
  className: "rqk-video-fill",
6265
6568
  style: { width: `${position / video.duration * 100}%` }
6266
6569
  }
6267
6570
  ),
6268
- /* @__PURE__ */ jsx74(
6571
+ /* @__PURE__ */ jsx76(
6269
6572
  "div",
6270
6573
  {
6271
6574
  className: "rqk-video-knob",
@@ -6276,40 +6579,40 @@ function VideoControls({
6276
6579
  }
6277
6580
  )
6278
6581
  ] }),
6279
- /* @__PURE__ */ jsx74(
6582
+ /* @__PURE__ */ jsx76(
6280
6583
  "button",
6281
6584
  {
6282
6585
  type: "button",
6283
6586
  className: classNames("rqk-video-mini", fullscreen && "rqk-is-on"),
6284
6587
  onClick: onFullscreen,
6285
6588
  "aria-label": "\u5207\u6362\u5168\u5C4F",
6286
- children: /* @__PURE__ */ jsx74(FullscreenIcon, {})
6589
+ children: /* @__PURE__ */ jsx76(FullscreenIcon, {})
6287
6590
  }
6288
6591
  )
6289
6592
  ] }),
6290
- /* @__PURE__ */ jsxs57("div", { className: "rqk-video-progress", children: [
6291
- /* @__PURE__ */ jsx74(VideoRing, { percent: percentFor(current) }),
6292
- /* @__PURE__ */ jsx74("div", { className: "rqk-video-credit", children: Math.abs(position - ((_a = credits[current]) != null ? _a : 0)) > 0.75 ? /* @__PURE__ */ jsxs57(Fragment22, { children: [
6593
+ /* @__PURE__ */ jsxs59("div", { className: "rqk-video-progress", children: [
6594
+ /* @__PURE__ */ jsx76(VideoRing, { percent: percentFor(current) }),
6595
+ /* @__PURE__ */ jsx76("div", { className: "rqk-video-credit", children: Math.abs(position - ((_a = credits[current]) != null ? _a : 0)) > 0.75 ? /* @__PURE__ */ jsxs59(Fragment22, { children: [
6293
6596
  "\u64AD\u653E ",
6294
- /* @__PURE__ */ jsx74("b", { children: formatTime(position) }),
6597
+ /* @__PURE__ */ jsx76("b", { children: formatTime(position) }),
6295
6598
  " / ",
6296
6599
  formatTime(video.duration),
6297
- /* @__PURE__ */ jsx74("span", { className: "rqk-video-credit-sep", children: "\xB7" }),
6600
+ /* @__PURE__ */ jsx76("span", { className: "rqk-video-credit-sep", children: "\xB7" }),
6298
6601
  "\u6709\u6548 ",
6299
- /* @__PURE__ */ jsx74("b", { children: formatTime((_b = credits[current]) != null ? _b : 0) })
6300
- ] }) : /* @__PURE__ */ jsxs57(Fragment22, { children: [
6602
+ /* @__PURE__ */ jsx76("b", { children: formatTime((_b = credits[current]) != null ? _b : 0) })
6603
+ ] }) : /* @__PURE__ */ jsxs59(Fragment22, { children: [
6301
6604
  "\u6709\u6548\u89C2\u770B ",
6302
- /* @__PURE__ */ jsx74("b", { children: formatTime((_c = credits[current]) != null ? _c : 0) }),
6605
+ /* @__PURE__ */ jsx76("b", { children: formatTime((_c = credits[current]) != null ? _c : 0) }),
6303
6606
  " / ",
6304
6607
  formatTime(video.duration)
6305
6608
  ] }) })
6306
6609
  ] }),
6307
- /* @__PURE__ */ jsx74(VideoList, { data, current, done, onSelect })
6610
+ /* @__PURE__ */ jsx76(VideoList, { data, current, done, onSelect })
6308
6611
  ] });
6309
6612
  }
6310
6613
 
6311
6614
  // src/questions/video-task/video-stage.tsx
6312
- import { jsx as jsx75, jsxs as jsxs58 } from "react/jsx-runtime";
6615
+ import { jsx as jsx77, jsxs as jsxs60 } from "react/jsx-runtime";
6313
6616
  function VideoStage({
6314
6617
  video,
6315
6618
  position,
@@ -6319,15 +6622,15 @@ function VideoStage({
6319
6622
  onToggle,
6320
6623
  onStageFullscreen
6321
6624
  }) {
6322
- const cover = video.poster ? /* @__PURE__ */ jsx75("img", { className: "rqk-video-poster", src: video.poster, alt: "" }) : /* @__PURE__ */ jsx75(Art, { name: "screen", className: "rqk-video-cover-art" });
6323
- return /* @__PURE__ */ jsxs58("div", { className: classNames("rqk-video-stage", fullscreen && "rqk-is-fullscreen"), children: [
6324
- /* @__PURE__ */ jsx75("div", { className: "rqk-video-cover", children: cover }),
6325
- /* @__PURE__ */ jsx75("div", { className: "rqk-video-dim" }),
6326
- playing ? null : /* @__PURE__ */ jsx75("button", { type: "button", className: "rqk-video-bigplay", onClick: onToggle, "aria-label": "\u64AD\u653E", children: /* @__PURE__ */ jsx75(PlayIcon, {}) }),
6327
- /* @__PURE__ */ jsx75("span", { className: "rqk-video-duration", children: formatTime(video.duration) }),
6328
- /* @__PURE__ */ jsx75("button", { type: "button", className: "rqk-video-fs", onClick: onStageFullscreen, "aria-label": "\u5168\u5C4F", children: /* @__PURE__ */ jsx75(FullscreenIcon, {}) }),
6329
- /* @__PURE__ */ jsx75("div", { className: "rqk-video-nowbar", children: /* @__PURE__ */ jsx75("i", { style: { width: `${position / video.duration * 100}%` } }) }),
6330
- video.src ? /* @__PURE__ */ jsx75(
6625
+ const cover = video.poster ? /* @__PURE__ */ jsx77("img", { className: "rqk-video-poster", src: video.poster, alt: "" }) : /* @__PURE__ */ jsx77(Art, { name: "screen", className: "rqk-video-cover-art" });
6626
+ return /* @__PURE__ */ jsxs60("div", { className: classNames("rqk-video-stage", fullscreen && "rqk-is-fullscreen"), children: [
6627
+ /* @__PURE__ */ jsx77("div", { className: "rqk-video-cover", children: cover }),
6628
+ /* @__PURE__ */ jsx77("div", { className: "rqk-video-dim" }),
6629
+ playing ? null : /* @__PURE__ */ jsx77("button", { type: "button", className: "rqk-video-bigplay", onClick: onToggle, "aria-label": "\u64AD\u653E", children: /* @__PURE__ */ jsx77(PlayIcon, {}) }),
6630
+ /* @__PURE__ */ jsx77("span", { className: "rqk-video-duration", children: formatTime(video.duration) }),
6631
+ /* @__PURE__ */ jsx77("button", { type: "button", className: "rqk-video-fs", onClick: onStageFullscreen, "aria-label": "\u5168\u5C4F", children: /* @__PURE__ */ jsx77(FullscreenIcon, {}) }),
6632
+ /* @__PURE__ */ jsx77("div", { className: "rqk-video-nowbar", children: /* @__PURE__ */ jsx77("i", { style: { width: `${position / video.duration * 100}%` } }) }),
6633
+ video.src ? /* @__PURE__ */ jsx77(
6331
6634
  "video",
6332
6635
  {
6333
6636
  ref: (element) => {
@@ -6343,13 +6646,13 @@ function VideoStage({
6343
6646
  }
6344
6647
 
6345
6648
  // src/questions/video-task/use-video-task.ts
6346
- import { useRef as useRef13, useState as useState25 } from "react";
6649
+ import { useRef as useRef14, useState as useState25 } from "react";
6347
6650
 
6348
6651
  // src/questions/video-task/use-video-clock.ts
6349
- import { useEffect as useEffect17 } from "react";
6652
+ import { useEffect as useEffect18 } from "react";
6350
6653
 
6351
6654
  // src/questions/video-task/constants.ts
6352
- var TICK_MS2 = 100;
6655
+ var TICK_MS3 = 100;
6353
6656
 
6354
6657
  // src/questions/video-task/use-video-clock.ts
6355
6658
  function useVideoClock({
@@ -6366,17 +6669,17 @@ function useVideoClock({
6366
6669
  setPosition,
6367
6670
  setTimeOnTask
6368
6671
  }) {
6369
- useEffect17(() => {
6672
+ useEffect18(() => {
6370
6673
  positionRef.current = 0;
6371
6674
  setPosition(0);
6372
6675
  setPlaying(false);
6373
6676
  playingRef.current = false;
6374
6677
  }, [current]);
6375
- useEffect17(() => {
6678
+ useEffect18(() => {
6376
6679
  if (video.src || !playing) return void 0;
6377
6680
  const timer = window.setInterval(() => {
6378
6681
  if (!playingRef.current) return;
6379
- const delta = TICK_MS2 / 1e3;
6682
+ const delta = TICK_MS3 / 1e3;
6380
6683
  const next = positionRef.current + delta;
6381
6684
  applyPosition(next);
6382
6685
  applyCredit(creditRef.current + delta);
@@ -6385,10 +6688,10 @@ function useVideoClock({
6385
6688
  playingRef.current = false;
6386
6689
  setPlaying(false);
6387
6690
  }
6388
- }, TICK_MS2);
6691
+ }, TICK_MS3);
6389
6692
  return () => window.clearInterval(timer);
6390
6693
  }, [playing, video.duration, video.src]);
6391
- useEffect17(() => {
6694
+ useEffect18(() => {
6392
6695
  const element = videoRef.current;
6393
6696
  if (!element || !video.src) return void 0;
6394
6697
  const handleTime = () => {
@@ -6423,10 +6726,10 @@ function useVideoTask({ data, onSubmit }) {
6423
6726
  const [playing, setPlaying] = useState25(false);
6424
6727
  const [timeOnTask, setTimeOnTask] = useState25(0);
6425
6728
  const [fullscreen, setFullscreen] = useState25(false);
6426
- const videoRef = useRef13(null);
6427
- const positionRef = useRef13(0);
6428
- const creditRef = useRef13(0);
6429
- const playingRef = useRef13(false);
6729
+ const videoRef = useRef14(null);
6730
+ const positionRef = useRef14(0);
6731
+ const creditRef = useRef14(0);
6732
+ const playingRef = useRef14(false);
6430
6733
  const video = (_a = data.videos[current]) != null ? _a : data.videos[0];
6431
6734
  const applyPosition = (value) => {
6432
6735
  const next = Math.min(video.duration, Math.max(0, value));
@@ -6501,10 +6804,6 @@ function useVideoTask({ data, onSubmit }) {
6501
6804
  answer: { credits }
6502
6805
  });
6503
6806
  };
6504
- const replay = () => {
6505
- setView("task");
6506
- applyPosition(0);
6507
- };
6508
6807
  const toggleStageFullscreen = () => {
6509
6808
  var _a2, _b, _c, _d;
6510
6809
  setFullscreen((value) => !value);
@@ -6526,7 +6825,6 @@ function useVideoTask({ data, onSubmit }) {
6526
6825
  percentFor,
6527
6826
  playing,
6528
6827
  position,
6529
- replay,
6530
6828
  selectVideo,
6531
6829
  setFullscreen,
6532
6830
  timeOnTask,
@@ -6539,7 +6837,7 @@ function useVideoTask({ data, onSubmit }) {
6539
6837
  }
6540
6838
 
6541
6839
  // src/questions/video-task/index.tsx
6542
- import { Fragment as Fragment23, jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
6840
+ import { Fragment as Fragment23, jsx as jsx78, jsxs as jsxs61 } from "react/jsx-runtime";
6543
6841
  function VideoTask({
6544
6842
  data,
6545
6843
  mode = "answer",
@@ -6553,32 +6851,33 @@ function VideoTask({
6553
6851
  onSubmit,
6554
6852
  className
6555
6853
  }) {
6854
+ const labels = useQuestLabels();
6556
6855
  const model = useVideoTask({ data, onSubmit });
6557
6856
  const actions = videoTaskActions({
6558
6857
  feedback: model.view === "feedback",
6559
6858
  allDone: model.allDone,
6560
- onReplay: model.replay,
6859
+ labels,
6561
6860
  onSubmit: model.handleSubmit,
6562
6861
  onNext
6563
6862
  });
6564
- return /* @__PURE__ */ jsx76(
6863
+ return /* @__PURE__ */ jsx78(
6565
6864
  QuestShell,
6566
6865
  {
6567
6866
  mode,
6568
6867
  title: title != null ? title : model.view === "feedback" ? "\u89C6\u9891\u7EDF\u8BA1" : "\u89C6\u9891\u4EFB\u52A1",
6569
6868
  index,
6570
6869
  total,
6571
- instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs59(Fragment23, { children: [
6870
+ instruction: instruction != null ? instruction : /* @__PURE__ */ jsxs61(Fragment23, { children: [
6572
6871
  "\u89C2\u770B\u89C6\u9891\uFF0C\u6709\u6548\u89C2\u770B ",
6573
- /* @__PURE__ */ jsx76("b", { children: "\u226590%" }),
6872
+ /* @__PURE__ */ jsx78("b", { children: "\u226590%" }),
6574
6873
  " \u89C6\u4E3A\u5B8C\u6210"
6575
6874
  ] }),
6576
6875
  onBack,
6577
6876
  className: classNames("rqk-quest", "rqk-video", className),
6578
6877
  dataQuest: "video-task",
6579
- footer: /* @__PURE__ */ jsx76(ActionBar, { actions, index, onPrev }),
6580
- children: model.view === "feedback" ? /* @__PURE__ */ jsx76(VideoFeedback, { data, overall: model.overall, timeOnTask: model.timeOnTask }) : /* @__PURE__ */ jsxs59(Fragment23, { children: [
6581
- /* @__PURE__ */ jsx76(
6878
+ footer: /* @__PURE__ */ jsx78(ActionBar, { actions, index, total, onPrev }),
6879
+ children: model.view === "feedback" ? /* @__PURE__ */ jsx78(VideoFeedback, { data, overall: model.overall, timeOnTask: model.timeOnTask }) : /* @__PURE__ */ jsxs61(Fragment23, { children: [
6880
+ /* @__PURE__ */ jsx78(
6582
6881
  VideoStage,
6583
6882
  {
6584
6883
  video: model.video,
@@ -6590,7 +6889,7 @@ function VideoTask({
6590
6889
  onStageFullscreen: model.toggleStageFullscreen
6591
6890
  }
6592
6891
  ),
6593
- /* @__PURE__ */ jsx76(
6892
+ /* @__PURE__ */ jsx78(
6594
6893
  VideoControls,
6595
6894
  {
6596
6895
  data,
@@ -6614,7 +6913,7 @@ function VideoTask({
6614
6913
  }
6615
6914
 
6616
6915
  // src/primitives/blank-input.tsx
6617
- import { jsx as jsx77 } from "react/jsx-runtime";
6916
+ import { jsx as jsx79 } from "react/jsx-runtime";
6618
6917
  function BlankInput2({
6619
6918
  value,
6620
6919
  onChange,
@@ -6629,7 +6928,7 @@ function BlankInput2({
6629
6928
  var _a;
6630
6929
  const measured = Math.max(value.length, (_a = placeholder == null ? void 0 : placeholder.length) != null ? _a : 0, minCh);
6631
6930
  const width = `${Math.min(18, Math.max(minCh, measured))}ch`;
6632
- return /* @__PURE__ */ jsx77(
6931
+ return /* @__PURE__ */ jsx79(
6633
6932
  "input",
6634
6933
  {
6635
6934
  className: classNames(
@@ -6652,10 +6951,11 @@ function BlankInput2({
6652
6951
  }
6653
6952
 
6654
6953
  // src/index.tsx
6655
- var version = "1.0.2";
6954
+ var version = "1.0.4";
6656
6955
  var questkit = {
6657
6956
  version,
6658
6957
  QuestShell,
6958
+ QuestComplete,
6659
6959
  OptionItem,
6660
6960
  FeedbackSheet,
6661
6961
  Instruction,
@@ -6696,6 +6996,7 @@ export {
6696
6996
  OptionItem,
6697
6997
  PictureBox,
6698
6998
  Progress,
6999
+ QuestComplete,
6699
7000
  QuestConfigProvider,
6700
7001
  QuestConfigProvider as QuestProvider,
6701
7002
  QuestShell,