hyperbook 0.113.2 → 0.113.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-CE3Yr86b.js → EditorElement-BNwEKIvk.js} +143 -143
  3. package/dist/assets/directive-bitflow/{ReportElements-eYGRtw6N.js → ReportElements-CAvHx5xm.js} +2 -2
  4. package/dist/assets/directive-bitflow/{bitLoaders-CxvZkGrY.js → bitLoaders-7qanePQL.js} +41 -41
  5. package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +4 -4
  8. package/dist/assets/directive-bitflow/{index-oNmOArKu.js → index-4JaKZ7WT.js} +2 -2
  9. package/dist/assets/directive-bitflow/{index-EKIgFddO.js → index-6CQr_atd.js} +19 -19
  10. package/dist/assets/directive-bitflow/{index-BadyFTU5.js → index-B9iG-a48.js} +2 -2
  11. package/dist/assets/directive-bitflow/{index-D4PdXMcj.js → index-BFYoOtcY.js} +5 -5
  12. package/dist/assets/directive-bitflow/{index-d5ebPDeY.js → index-BI6aFdIS.js} +10 -10
  13. package/dist/assets/directive-bitflow/{index-DruC5d43.js → index-Bf078mfo.js} +2 -2
  14. package/dist/assets/directive-bitflow/{index-CWe2GjBK.js → index-BinE5Wvd.js} +7 -7
  15. package/dist/assets/directive-bitflow/{index-BG0PL-Z6.js → index-BoX5-jkC.js} +7 -7
  16. package/dist/assets/directive-bitflow/{index-ledofrbo.js → index-BqRsXShM.js} +4 -4
  17. package/dist/assets/directive-bitflow/{index-CjKhq7gY.js → index-BxihQ8Oo.js} +13 -13
  18. package/dist/assets/directive-bitflow/{index-BNdpL6Ss.js → index-C5YguHZU.js} +28 -28
  19. package/dist/assets/directive-bitflow/{index-xTX3CXJW.js → index-C8zwSmE6.js} +7 -7
  20. package/dist/assets/directive-bitflow/{index-D9LOuqr2.js → index-C9JSBTNc.js} +21 -21
  21. package/dist/assets/directive-bitflow/{index-BydYlLy4.js → index-CCMI6UK4.js} +8 -8
  22. package/dist/assets/directive-bitflow/{index-WbE9UOFa.js → index-CGDt8H6s.js} +5 -5
  23. package/dist/assets/directive-bitflow/{index-D_QhyFcx.js → index-Ca1v0pjV.js} +5 -5
  24. package/dist/assets/directive-bitflow/{index-88c3K20U.js → index-CaYn3Gmh.js} +12 -12
  25. package/dist/assets/directive-bitflow/{index-C7RJxxAx.js → index-CbQue0If.js} +30 -30
  26. package/dist/assets/directive-bitflow/{index-CfKpkSVC.js → index-CjH3h0OO.js} +28 -28
  27. package/dist/assets/directive-bitflow/{index-TUXuIR22.js → index-CkO3QfOS.js} +4 -4
  28. package/dist/assets/directive-bitflow/{index-DIb3CXwC.js → index-Cz4i5rfe.js} +6 -6
  29. package/dist/assets/directive-bitflow/{index-HXNGIC7K.js → index-D0NtgeiX.js} +17 -17
  30. package/dist/assets/directive-bitflow/{index-CLHtOGrW.js → index-D1C_1SPY.js} +4 -4
  31. package/dist/assets/directive-bitflow/{index-Dn5hHVuT.js → index-D45u7EVR.js} +13 -13
  32. package/dist/assets/directive-bitflow/{index-IsMJtrUT.js → index-D9Ox4YpM.js} +10 -10
  33. package/dist/assets/directive-bitflow/{index-B61LKxr1.js → index-DJ1w2Xcm.js} +15 -15
  34. package/dist/assets/directive-bitflow/{index-BwBVUdJ9.js → index-DUqW2fmV.js} +2 -2
  35. package/dist/assets/directive-bitflow/{index-DUOrQfVe.js → index-Deedj9EF.js} +6 -6
  36. package/dist/assets/directive-bitflow/{index-DQP0cUsP.js → index-Dg6nnY_v.js} +14 -14
  37. package/dist/assets/directive-bitflow/{index-DW3cUBvZ.js → index-DgxEzomz.js} +2 -2
  38. package/dist/assets/directive-bitflow/{index-D0U3nepG.js → index-Dl0-ZAT5.js} +20 -20
  39. package/dist/assets/directive-bitflow/{index-ISbOe239.js → index-Do6dmZyj.js} +2 -2
  40. package/dist/assets/directive-bitflow/{index-Bw0pL0hW.js → index-DqnGC-DU.js} +6 -6
  41. package/dist/assets/directive-bitflow/{index-rp4UTV85.js → index-DwXXeSwk.js} +19 -19
  42. package/dist/assets/directive-bitflow/{index-BZhNY0lo.js → index-b6qwcTj9.js} +9 -9
  43. package/dist/assets/directive-bitflow/{index-BO-d4HVC.js → index-d105UFQI.js} +21 -21
  44. package/dist/assets/directive-bitflow/{index-BuQ-K_tR.js → index-jijMWQB6.js} +2 -2
  45. package/dist/assets/directive-bitflow/{index-DYWo0PUv.js → index-kxO5_U9Y.js} +2 -2
  46. package/dist/assets/directive-bitflow/{index-Cm4w1Zyc.js → index-p5AOgOal.js} +21 -21
  47. package/dist/assets/directive-bitflow/{index-BlT1EcFH.js → index-q2APknM6.js} +15 -15
  48. package/dist/assets/directive-bitflow/{index-CERSJ9uS.js → index-zVkWgm5I.js} +11 -11
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/report.js +1 -1
  51. package/dist/assets/directive-bitflow/{shareableReport-vjEU4OvA.js → shareableReport-mdyEMdsJ.js} +6 -6
  52. package/dist/index.js +1 -1
  53. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
- import { L as K, a4 as j, ac as fe, ad as ae, a9 as R, ao as we, a6 as J, a2 as N, P as Q, a as v, j as r, b as E, aa as me, s as ge } from "./dom-uYx_3K1r.js";
2
- import { e as ee, P as te, i as le, g as W, F as G, M as re, B as xe, y as ve, U as Ce, r as ye, H as ke } from "./bitLoaders-CxvZkGrY.js";
3
- const Le = K({
1
+ import { P as Y, a4 as j, ac as fe, ad as ae, a9 as R, ao as we, a6 as J, a2 as N, Y as Q, a as v, j as r, b as E, aa as me, s as ge } from "./dom-B6NPWBb1.js";
2
+ import { e as ee, P as te, i as le, g as W, F as G, M as re, B as xe, y as ve, U as Ce, r as ye, H as ke } from "./bitLoaders-7qanePQL.js";
3
+ const Le = Y({
4
4
  /** Stable across edits, so a target or a startColor keeps pointing at the
5
5
  * same colour even after the author renames it or moves it in the list. */
6
6
  id: N().min(1),
@@ -12,7 +12,7 @@ const Le = K({
12
12
  }), P = [
13
13
  { id: "white", color: "#ffffff", label: "0" },
14
14
  { id: "black", color: "#000000", label: "1" }
15
- ], je = K({
15
+ ], je = Y({
16
16
  instruction: N().default(""),
17
17
  rows: Q().int().min(1).max(32).default(5),
18
18
  columns: Q().int().min(1).max(32).default(5),
@@ -76,16 +76,16 @@ const Le = K({
76
76
  message: "Choose a starting colour from the palette."
77
77
  });
78
78
  }
79
- }), $e = K({
79
+ }), $e = Y({
80
80
  /** Palette ids, rows by columns. Not padded to size here — a stored answer
81
81
  * from a smaller grid the author has since resized is padded back out by
82
82
  * `effectiveCells` at read time instead of being rewritten. */
83
83
  cells: j(j(N())).default([])
84
- }), V = (e, a, d) => e.given[a]?.[d] === !0, ie = (e, a) => e.palette.find((d) => d.id === a), Ne = (e, a) => Array.from(
84
+ }), K = (e, a, d) => e.given[a]?.[d] === !0, ie = (e, a) => e.palette.find((d) => d.id === a), Ne = (e, a) => Array.from(
85
85
  { length: e.rows },
86
86
  (d, o) => Array.from(
87
87
  { length: e.columns },
88
- (t, n) => V(e, o, n) ? e.target[o]?.[n] ?? e.startColor : a?.[o]?.[n] ?? e.startColor
88
+ (t, n) => K(e, o, n) ? e.target[o]?.[n] ?? e.startColor : a?.[o]?.[n] ?? e.startColor
89
89
  )
90
90
  ), Pe = (e) => Array.from(
91
91
  { length: e.rows },
@@ -102,7 +102,7 @@ const Le = K({
102
102
  }, oe = (e, a) => Array.from(
103
103
  { length: e.rows },
104
104
  (d, o) => Array.from({ length: e.columns }, (t, n) => {
105
- if (V(e, o, n)) return !1;
105
+ if (K(e, o, n)) return !1;
106
106
  const c = a?.cells?.[o]?.[n] ?? e.startColor, f = e.target[o]?.[n] ?? e.startColor;
107
107
  return c !== f;
108
108
  })
@@ -111,7 +111,7 @@ const Le = K({
111
111
  let o = 0, t = 0;
112
112
  for (let n = 0; n < e.rows; n++)
113
113
  for (let c = 0; c < e.columns; c++)
114
- V(e, n, c) || (t += 1, d[n][c] || (o += 1));
114
+ K(e, n, c) || (t += 1, d[n][c] || (o += 1));
115
115
  return e.partialCredit ? { earned: o, possible: t } : { earned: t > 0 && o === t ? 1 : 0, possible: t > 0 ? 1 : 0 };
116
116
  }, Be = ({
117
117
  data: e,
@@ -298,13 +298,13 @@ const Ie = (e) => {
298
298
  }) => {
299
299
  const w = (s, i) => E(U, s, d, i), [x, z] = v.useState({ row: 0, column: 0 }), [$, O] = v.useState(
300
300
  e.palette[0]?.id ?? ""
301
- ), [D, S] = v.useState(""), l = v.useId(), u = v.useRef(null), b = v.useRef(a), g = v.useRef(!1), y = v.useRef(null), H = e.palette.find((s) => s.id === $)?.id ?? e.palette[0]?.id ?? "", Y = (s, i) => {
301
+ ), [D, S] = v.useState(""), l = v.useId(), u = v.useRef(null), b = v.useRef(a), g = v.useRef(!1), y = v.useRef(null), H = e.palette.find((s) => s.id === $)?.id ?? e.palette[0]?.id ?? "", V = (s, i) => {
302
302
  const h = ie(e, s);
303
303
  return h?.label || h?.id || w("colorFallback", { number: i + 1 });
304
304
  }, X = (s) => {
305
305
  O(s);
306
306
  const i = e.palette.findIndex((h) => h.id === s);
307
- S(w("selectedColor", { color: Y(s, i) }));
307
+ S(w("selectedColor", { color: V(s, i) }));
308
308
  }, I = (s, i) => {
309
309
  if (o) return;
310
310
  if (p) {
@@ -356,7 +356,7 @@ const Ie = (e) => {
356
356
  i && (s.preventDefault(), i());
357
357
  }, he = (s, i) => {
358
358
  const h = a[s]?.[i], m = e.palette.findIndex((L) => L.id === h), k = [w("cellAt", {
359
- color: Y(h, m),
359
+ color: V(h, m),
360
360
  row: s + e.firstIndex,
361
361
  column: i + e.firstIndex
362
362
  })];
@@ -783,7 +783,7 @@ export {
783
783
  Ne as effectiveCells,
784
784
  Be as evaluate,
785
785
  Se as formMessages,
786
- V as isGiven,
786
+ K as isGiven,
787
787
  U as messages,
788
788
  ze as paintCell,
789
789
  ie as paletteEntry,
@@ -1,5 +1,5 @@
1
- import { L as k, a4 as v, ab as j, a9 as y, a2 as w, ac as A, ad as L, a5 as H, a as S, j as i, b as g, E as z, aa as F, s as P } from "./dom-uYx_3K1r.js";
2
- import { e as D, g as C, M as U, P as W, F as M, B as R, U as N, H as T } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as k, a4 as v, ab as j, a9 as y, a2 as w, ac as A, ad as E, a5 as H, a as S, j as i, b as g, E as z, aa as P, s as F } from "./dom-B6NPWBb1.js";
2
+ import { e as D, g as C, M as U, P as W, F as M, B as R, U as N, H as T } from "./bitLoaders-7qanePQL.js";
3
3
  const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-option.bitflow-option-correct{border-color:var(--bitflow-color-correct);background:var(--bitflow-color-correct-surface)}.bitflow-option.bitflow-option-wrong{border-color:var(--bitflow-color-wrong);background:var(--bitflow-color-wrong-surface)}.bitflow-choice-editor{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-choice-editor>.bitflow-input{flex:1 1 var(--bitflow-choice-editor-min, 8rem);min-width:0}.bitflow-choice-editor-actions{flex:none;flex-wrap:nowrap}.bitflow-choice-editor-correct{display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;flex-shrink:0}.bitflow-choice-editor-correct input{width:1.15em;height:1.15em;margin:0;accent-color:var(--bitflow-color-primary)}", I = ({
4
4
  data: e,
5
5
  answer: n
@@ -328,7 +328,7 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
328
328
  * all-or-nothing. Only meaningful for `multiple`.
329
329
  */
330
330
  partialCredit: y().default(!1),
331
- evaluation: A.default(L),
331
+ evaluation: A.default(E),
332
332
  /**
333
333
  * Feedback for one exact combination of choices — the successor to the old
334
334
  * "patterns" map, with choice ids in place of positional letters.
@@ -426,9 +426,9 @@ const $ = ".bitflow-choice-group{border:0;margin:0;padding:0;display:flex;flex-d
426
426
  [n[s], n[l]] = [n[l], n[s]];
427
427
  }
428
428
  return n;
429
- }, E = "task-choice";
430
- F({
431
- type: E,
429
+ }, L = "task-choice";
430
+ P({
431
+ type: L,
432
432
  kind: "task",
433
433
  schema: J,
434
434
  evaluate: I,
@@ -447,18 +447,18 @@ F({
447
447
  ],
448
448
  shuffle: !1,
449
449
  partialCredit: !1,
450
- evaluation: L(),
450
+ evaluation: E(),
451
451
  patternFeedback: []
452
452
  })
453
453
  });
454
- T(E);
455
- P("bitflow-styles-task-choice", $);
454
+ T(L);
455
+ F("bitflow-styles-task-choice", $);
456
456
  export {
457
457
  _ as AnswerSchema,
458
458
  G as ChoiceSchema,
459
459
  J as DataSchema,
460
460
  B as Form,
461
- E as TYPE,
461
+ L as TYPE,
462
462
  O as Task,
463
463
  I as evaluate,
464
464
  x as messages
@@ -1,5 +1,5 @@
1
- import { L as C, a2 as k, ac as $, ad as z, a4 as A, P as B, am as I, a as j, j as o, a9 as P, a5 as W, b as R, aa as O, s as Z } from "./dom-uYx_3K1r.js";
2
- import { $ as U, e as S, h as Y, g as f, P as F, C as q, F as G, M as K, r as J, B as Q, j as V, U as X, H as _ } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as C, a2 as k, ac as $, ad as z, a4 as A, Y as B, am as I, a as j, j as o, a9 as P, a5 as W, b as R, aa as O, s as Y } from "./dom-B6NPWBb1.js";
2
+ import { $ as Z, e as S, h as U, g as f, P as F, C as G, F as K, M as q, r as J, B as Q, j as V, U as X, H as _ } from "./bitLoaders-7qanePQL.js";
3
3
  const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-hotspots-picture{position:relative;width:100%;overflow:hidden;border-radius:var(--bitflow-radius-standard)}.bitflow-hotspots-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.bitflow-hotspots-noimage{background:var(--bitflow-color-neutral-100)}.bitflow-hotspots-surface{position:absolute;inset:0;width:100%;height:100%;padding:0;cursor:crosshair;background:none;border:0}.bitflow-hotspots-surface:disabled{cursor:default}.bitflow-hotspots-aim{position:absolute;width:22px;height:22px;margin:-11px 0 0 -11px;pointer-events:none;opacity:0;border:2px solid var(--bitflow-color-primary);border-radius:50%}.bitflow-hotspots-surface:focus-visible~.bitflow-hotspots-aim{opacity:1}.bitflow-hotspots-mark{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;pointer-events:none;background:var(--bitflow-color-primary);border:2px solid var(--bitflow-color-surface);border-radius:50%}.bitflow-hotspots-mark-correct{background:var(--bitflow-color-correct)}.bitflow-hotspots-mark-wrong{background:var(--bitflow-color-wrong)}.bitflow-hotspots-region{position:absolute;pointer-events:none;border:2px solid}.bitflow-hotspots-region-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 15%,transparent);border-color:var(--bitflow-color-correct)}.bitflow-hotspots-region-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 15%,transparent);border-color:var(--bitflow-color-wrong)}.bitflow-hotspots-verdict,.bitflow-hotspots-feedback{margin:0}.bitflow-boxeditor-box.bitflow-hotspots-handle-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 18%,transparent);border-color:var(--bitflow-color-correct)}", te = (e, i) => {
4
4
  if (e.width <= 0 || e.height <= 0) return !1;
5
5
  if (e.shape === "rect")
@@ -146,7 +146,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
146
146
  y: v,
147
147
  hotspotId: k().optional()
148
148
  }).optional()
149
- }), L = {
149
+ }), T = {
150
150
  en: {
151
151
  instructionLabel: "Question",
152
152
  instructionHint: "Markdown is supported. Say what the learner should find.",
@@ -215,7 +215,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
215
215
  onDraw: s,
216
216
  onMove: u
217
217
  }) => {
218
- const h = (c) => R(L, c, i);
218
+ const h = (c) => R(T, c, i);
219
219
  return /* @__PURE__ */ o.jsx(
220
220
  V,
221
221
  {
@@ -392,7 +392,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
392
392
  onChange: n,
393
393
  errors: a
394
394
  }) => {
395
- const s = (t) => R(L, t, i), u = (t) => n({ ...e, ...t }), [h, c] = j.useState(), w = U(e.hotspots.map((t) => t.id)), y = (t) => {
395
+ const s = (t) => R(T, t, i), u = (t) => n({ ...e, ...t }), [h, c] = j.useState(), w = Z(e.hotspots.map((t) => t.id)), y = (t) => {
396
396
  c(t), t && w.open(t);
397
397
  }, m = (t, p) => u({
398
398
  hotspots: e.hotspots.map(
@@ -427,7 +427,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
427
427
  }
428
428
  ),
429
429
  /* @__PURE__ */ o.jsx(
430
- Y,
430
+ U,
431
431
  {
432
432
  value: e.background,
433
433
  locale: i,
@@ -465,7 +465,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
465
465
  ...w.props(t.id),
466
466
  children: [
467
467
  /* @__PURE__ */ o.jsx(
468
- q,
468
+ G,
469
469
  {
470
470
  label: s("regionName"),
471
471
  hint: s("regionNameHint"),
@@ -476,7 +476,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
476
476
  }
477
477
  ),
478
478
  /* @__PURE__ */ o.jsx(
479
- G,
479
+ K,
480
480
  {
481
481
  label: s("regionCorrect"),
482
482
  checked: t.correct,
@@ -484,7 +484,7 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
484
484
  }
485
485
  ),
486
486
  /* @__PURE__ */ o.jsx(
487
- K,
487
+ q,
488
488
  {
489
489
  label: s("regionShape"),
490
490
  value: t.shape,
@@ -589,9 +589,9 @@ const ee = ".bitflow-hotspots{display:flex;flex-direction:column;gap:var(--bitfl
589
589
  )
590
590
  ] })
591
591
  ] });
592
- }, T = "task-find-hotspots";
592
+ }, L = "task-find-hotspots";
593
593
  O({
594
- type: T,
594
+ type: L,
595
595
  kind: "task",
596
596
  schema: ae,
597
597
  evaluate: oe,
@@ -609,8 +609,8 @@ O({
609
609
  evaluation: z()
610
610
  })
611
611
  });
612
- _(T);
613
- Z("bitflow-styles-task-find-hotspots", ee);
612
+ _(L);
613
+ Y("bitflow-styles-task-find-hotspots", ee);
614
614
  export {
615
615
  ge as AnswerSchema,
616
616
  ae as DataSchema,
@@ -618,12 +618,12 @@ export {
618
618
  ie as HotspotCanvas,
619
619
  se as HotspotSchema,
620
620
  le as Picture,
621
- T as TYPE,
621
+ L as TYPE,
622
622
  he as Task,
623
623
  be as centreOf,
624
624
  te as contains,
625
625
  oe as evaluate,
626
- L as formMessages,
626
+ T as formMessages,
627
627
  H as hotspotAt,
628
628
  D as messages
629
629
  };
@@ -1,5 +1,5 @@
1
- import { L as C, ak as U, a2 as v, a4 as E, ao as le, a5 as V, ac as te, ad as I, a9 as O, P as ae, j as a, a as R, b as k, aa as ne, s as oe } from "./dom-uYx_3K1r.js";
2
- import { e as W, C as re, P as G, i as T, F as A, M as ie, r as se, B as ce, U as de, H as be } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as C, ak as U, a2 as v, a4 as E, ao as le, a5 as V, ac as te, ad as I, a9 as O, Y as ae, j as a, a as R, b as k, aa as ne, s as oe } from "./dom-B6NPWBb1.js";
2
+ import { e as W, C as re, P as G, i as T, F as A, M as ie, r as se, B as ce, U as de, H as be } from "./bitLoaders-7qanePQL.js";
3
3
  const Y = ["text", "number", "formula"], ue = V(Y), me = C({
4
4
  /** Stable across edits, so a cell keeps pointing at the same column. */
5
5
  id: v().min(1),
@@ -1,5 +1,5 @@
1
- import { L, a2 as f, ac as P, ad as H, a9 as z, a4 as C, P as v, j as t, a as O, a5 as E, b as x, s as F, aa as R } from "./dom-uYx_3K1r.js";
2
- import { e as k, g as p, M as T, i as j, P as Z, C as B, F as D, B as K, U as N, r as U, H as I } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as L, a2 as f, ac as P, ad as H, a9 as z, a4 as C, Y as v, j as t, a as O, a5 as E, b as x, s as F, aa as R } from "./dom-B6NPWBb1.js";
2
+ import { e as k, g as p, M as T, i as j, P as Z, C as B, F as D, B as K, U as N, r as U, H as I } from "./bitLoaders-7qanePQL.js";
3
3
  const A = ["person", "keywords"], $ = E(A), q = L({
4
4
  /** Stable across edits, so an outcome keeps pointing at the same line. */
5
5
  id: f().min(1),
@@ -76,7 +76,7 @@ const A = ["person", "keywords"], $ = E(A), q = L({
76
76
  }), ae = L({
77
77
  /** What the learner wrote, whole and unaltered. */
78
78
  text: f().default("")
79
- }), W = (e) => e.trim().length, G = (e, c, m) => {
79
+ }), W = (e) => e.trim().length, Y = (e, c, m) => {
80
80
  const o = (a) => m ? a : a.toLowerCase(), n = new Set(
81
81
  o(e).split(/[^\p{L}\p{N}_'’]+/u).filter(Boolean)
82
82
  );
@@ -84,16 +84,16 @@ const A = ["person", "keywords"], $ = E(A), q = L({
84
84
  const r = a.split(/[^\p{L}\p{N}_'’]+/u).filter(Boolean);
85
85
  return r.length === 0 ? !1 : r.length > 1 ? o(e).includes(a) : n.has(r[0]);
86
86
  });
87
- }, Y = (e, c) => e.criteria.map((m) => ({
87
+ }, G = (e, c) => e.criteria.map((m) => ({
88
88
  criterionId: m.id,
89
89
  label: m.label,
90
90
  points: m.points,
91
- met: e.marking === "keywords" ? G(c, m, e.caseSensitive) : void 0
91
+ met: e.marking === "keywords" ? Y(c, m, e.caseSensitive) : void 0
92
92
  })), _ = ({
93
93
  data: e,
94
94
  answer: c
95
95
  }) => {
96
- const m = c?.text ?? "", o = Y(e, m), n = { criteria: o, length: W(m) };
96
+ const m = c?.text ?? "", o = G(e, m), n = { criteria: o, length: W(m) };
97
97
  if (e.evaluation.mode === "skip")
98
98
  return { state: "unknown", allowRetry: !1, detail: n };
99
99
  if (e.marking === "person")
@@ -1,5 +1,5 @@
1
- import { L as V, ak as Fe, P as M, a2 as E, a as L, j as t, a5 as Me, aj as $e, ac as Ee, ad as ve, a9 as De, a4 as ue, b as D, aa as Pe, s as Re } from "./dom-uYx_3K1r.js";
2
- import { e as We, C as ke, g as z, r as B, P as Oe, M as Ve, F as Ke, B as Ie, y as Be, U as Ge, H as Ze } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as V, ak as Fe, Y as M, a2 as E, a as L, j as t, a5 as Me, aj as $e, ac as Ee, ad as ve, a9 as De, a4 as ue, b as D, aa as Pe, s as Re } from "./dom-B6NPWBb1.js";
2
+ import { e as We, C as ke, g as z, r as B, P as Oe, M as Ve, F as Ke, B as Ie, y as Be, U as Ge, H as Ze } from "./bitLoaders-7qanePQL.js";
3
3
  const q = (e, o) => {
4
4
  const l = $e(e, { variables: { x: o } });
5
5
  return l.ok ? l.rest !== "" ? { ok: !1, error: "trailing" } : { ok: !0, value: l.value } : { ok: !1, error: l.error };
@@ -19,14 +19,14 @@ const q = (e, o) => {
19
19
  expressionNotAllowed: "Enter a valid function of x.",
20
20
  notFinite: "That is not a finite number at every handle — check for something like dividing by zero or the square root of a negative number.",
21
21
  trailing: "There is text left over after the function — check for a stray character."
22
- }, fe = (e) => qe[e], H = (e) => String(e), Ue = 1e-9, ne = (e, o) => {
22
+ }, fe = (e) => qe[e], H = (e) => String(e), Ye = 1e-9, ne = (e, o) => {
23
23
  const l = ee(e.target), r = {};
24
24
  for (const a of e.handles) {
25
25
  const i = o?.values?.[H(a)];
26
- r[H(a)] = i !== void 0 && Number.isFinite(i) && Math.abs(i - l(a)) <= e.tolerance + Ue ? "correct" : "wrong";
26
+ r[H(a)] = i !== void 0 && Number.isFinite(i) && Math.abs(i - l(a)) <= e.tolerance + Ye ? "correct" : "wrong";
27
27
  }
28
28
  return r;
29
- }, Ye = (e, o) => {
29
+ }, Ue = (e, o) => {
30
30
  const l = Object.values(ne(e, o));
31
31
  return {
32
32
  earned: l.filter((r) => r === "correct").length,
@@ -41,7 +41,7 @@ const q = (e, o) => {
41
41
  }) => {
42
42
  if (e.evaluation.mode === "skip")
43
43
  return { state: "unknown", allowRetry: !1 };
44
- const l = _e(e, o), r = Ye(e, o), a = e.partialCredit && r.possible > 0 ? r : { earned: l ? 1 : 0, possible: 1 };
44
+ const l = _e(e, o), r = Ue(e, o), a = e.partialCredit && r.possible > 0 ? r : { earned: l ? 1 : 0, possible: 1 };
45
45
  return {
46
46
  state: l ? "correct" : "wrong",
47
47
  score: a,
@@ -345,7 +345,7 @@ const q = (e, o) => {
345
345
  onSet: i,
346
346
  revealTarget: b
347
347
  }) => {
348
- const g = (n, f) => D(O, n, r, f), d = L.useRef(null), u = ct(d), x = L.useRef(null), [, y] = L.useReducer((n) => n + 1, 0), [S, s] = L.useState(""), c = !!i && !a, k = o?.values ?? {}, m = e.axes.x, p = e.axes.y, oe = de(m), le = de(p), U = b ?? !!l, Y = (n) => {
348
+ const g = (n, f) => D(O, n, r, f), d = L.useRef(null), u = ct(d), x = L.useRef(null), [, y] = L.useReducer((n) => n + 1, 0), [S, s] = L.useState(""), c = !!i && !a, k = o?.values ?? {}, m = e.axes.x, p = e.axes.y, oe = de(m), le = de(p), Y = b ?? !!l, U = (n) => {
349
349
  const f = d.current?.getBoundingClientRect();
350
350
  if (!f || f.height === 0) return null;
351
351
  const w = (n - f.top) / f.height * Z;
@@ -356,13 +356,13 @@ const q = (e, o) => {
356
356
  ));
357
357
  }, Ce = (n, f) => {
358
358
  if (!c || n.button !== 0) return;
359
- const w = Y(n.clientY);
359
+ const w = U(n.clientY);
360
360
  w !== null && (x.current = { x: f, value: W(p, w, e.snap) }, y());
361
361
  };
362
362
  Be((n) => {
363
363
  const f = x.current;
364
364
  if (!f) return;
365
- const w = Y(n.clientY);
365
+ const w = U(n.clientY);
366
366
  w !== null && (x.current = { x: f.x, value: W(p, w, e.snap) }, y());
367
367
  }, () => {
368
368
  const n = x.current;
@@ -370,7 +370,7 @@ const q = (e, o) => {
370
370
  });
371
371
  const Te = (n, f) => {
372
372
  if (!c) return;
373
- const w = Y(n.clientY);
373
+ const w = U(n.clientY);
374
374
  w !== null && _(f, W(p, w, e.snap));
375
375
  }, Ae = (n, f, w) => {
376
376
  if (!c) return;
@@ -409,7 +409,7 @@ const q = (e, o) => {
409
409
  ...n,
410
410
  color: ge[f % ge.length],
411
411
  segments: we(ee(n.expression), m, p)
412
- })), ze = U ? we(ee(e.target), m, p) : [], ce = (n) => n.map((f) => `${C(m, f.x)},${T(p, f.y)}`).join(" ");
412
+ })), ze = Y ? we(ee(e.target), m, p) : [], ce = (n) => n.map((f) => `${C(m, f.x)},${T(p, f.y)}`).join(" ");
413
413
  return /* @__PURE__ */ t.jsxs("div", { className: "bitflow-function-plot", children: [
414
414
  /* @__PURE__ */ t.jsxs(
415
415
  "svg",
@@ -610,7 +610,7 @@ const q = (e, o) => {
610
610
  ]
611
611
  }
612
612
  ),
613
- (e.shown.length > 0 || U) && /* @__PURE__ */ t.jsxs("ul", { className: "bitflow-function-plot-legend", children: [
613
+ (e.shown.length > 0 || Y) && /* @__PURE__ */ t.jsxs("ul", { className: "bitflow-function-plot-legend", children: [
614
614
  re.map((n, f) => /* @__PURE__ */ t.jsxs("li", { children: [
615
615
  /* @__PURE__ */ t.jsx(
616
616
  "span",
@@ -622,7 +622,7 @@ const q = (e, o) => {
622
622
  ),
623
623
  n.label || g("unnamedCurve", { number: f + 1 })
624
624
  ] }, f)),
625
- U && /* @__PURE__ */ t.jsxs("li", { children: [
625
+ Y && /* @__PURE__ */ t.jsxs("li", { children: [
626
626
  /* @__PURE__ */ t.jsx(
627
627
  "span",
628
628
  {
@@ -996,7 +996,7 @@ export {
996
996
  O as messages,
997
997
  $ as round9,
998
998
  we as sampleCurve,
999
- Ye as scoreOf,
999
+ Ue as scoreOf,
1000
1000
  W as snapValue,
1001
1001
  de as ticksFor,
1002
1002
  xt as xFromView,
@@ -1,5 +1,5 @@
1
- import { L as i, a2 as m, j as t, b as a, s as l, aa as k } from "./dom-uYx_3K1r.js";
2
- import { e as w, U as c, H as p } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as i, a2 as m, j as t, b as a, s as l, aa as k } from "./dom-B6NPWBb1.js";
2
+ import { e as w, U as c, H as p } from "./bitLoaders-7qanePQL.js";
3
3
  const b = "", e = {
4
4
  en: {
5
5
  name: "Text",
@@ -1,6 +1,6 @@
1
- import { L as S, a4 as q, ac as ce, ad as J, a9 as W, P as L, am as he, a2 as C, a as p, j as n, a5 as Q, b as z, s as ue, aa as be } from "./dom-uYx_3K1r.js";
2
- import { $ as me, e as Z, h as ge, g as M, M as O, i as G, P as U, C as fe, F as D, r as I, B as we, U as pe, y as V, H as xe } from "./bitLoaders-CxvZkGrY.js";
3
- const Y = (e) => ({
1
+ import { P as S, a4 as q, ac as ce, ad as J, a9 as W, Y as L, am as he, a2 as C, a as p, j as n, a5 as Q, b as z, s as ue, aa as be } from "./dom-B6NPWBb1.js";
2
+ import { $ as me, e as Z, h as ge, g as M, M as O, i as G, P as U, C as fe, F as Y, r as D, B as we, U as pe, y as V, H as xe } from "./bitLoaders-7qanePQL.js";
3
+ const I = (e) => ({
4
4
  x: e.x,
5
5
  y: e.y,
6
6
  width: e.kind === "rect" ? e.width : 0,
@@ -24,14 +24,14 @@ const Y = (e) => ({
24
24
  return h <= 0 ? 0 : a / h;
25
25
  }, ye = (e, r) => Math.hypot(e.x - r.x, e.y - r.y) <= r.radius, Me = (e, r, c) => {
26
26
  if (r.kind === "circle") {
27
- const l = e.kind === "rect" ? ve(Y(e)) : e;
27
+ const l = e.kind === "rect" ? ve(I(e)) : e;
28
28
  return ye(l, r);
29
29
  }
30
30
  if (e.kind === "point") {
31
31
  const l = B(r);
32
32
  return e.x >= l.x && e.x <= l.x + l.width && e.y >= l.y && e.y <= l.y + l.height;
33
33
  }
34
- return ke(Y(e), B(r)) >= c.overlap;
34
+ return ke(I(e), B(r)) >= c.overlap;
35
35
  }, Ne = (e, r, c) => {
36
36
  if (!c.requireLabel) return !0;
37
37
  const l = (h) => c.caseSensitive ? h.trim() : h.trim().toLowerCase(), a = l(e.label);
@@ -368,7 +368,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
368
368
  );
369
369
  }),
370
370
  y.map((i, o) => {
371
- const u = Y(i), x = T(i.id), de = E ? x && !x.labelWrong ? " bitflow-annotate-mark-right" : x ? " bitflow-annotate-mark-named-wrong" : " bitflow-annotate-mark-stray" : "";
371
+ const u = I(i), x = T(i.id), de = E ? x && !x.labelWrong ? " bitflow-annotate-mark-right" : x ? " bitflow-annotate-mark-named-wrong" : " bitflow-annotate-mark-stray" : "";
372
372
  return /* @__PURE__ */ n.jsx(
373
373
  "span",
374
374
  {
@@ -696,7 +696,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
696
696
  height: r.height,
697
697
  label: "",
698
698
  acceptedLabels: []
699
- }, De = ({
699
+ }, Ye = ({
700
700
  data: e,
701
701
  answer: r,
702
702
  result: c,
@@ -716,12 +716,12 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
716
716
  onAnswerChange: h
717
717
  }
718
718
  )
719
- ] }), Ie = (e) => {
719
+ ] }), De = (e) => {
720
720
  for (let r = e.length + 1; ; r++) {
721
721
  const c = `region-${r}`;
722
722
  if (!e.includes(c)) return c;
723
723
  }
724
- }, Ye = ({
724
+ }, Ie = ({
725
725
  data: e,
726
726
  locale: r,
727
727
  onChange: c,
@@ -734,7 +734,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
734
734
  (m) => m.id === t ? { ...m, ...s } : m
735
735
  )
736
736
  }), k = (t) => {
737
- const s = Ie(e.regions.map((v) => v.id)), m = We(s, t, e.annotationKind === "rect" ? "rect" : "circle");
737
+ const s = De(e.regions.map((v) => v.id)), m = We(s, t, e.annotationKind === "rect" ? "rect" : "circle");
738
738
  h({
739
739
  regions: [...e.regions, m],
740
740
  // A task nobody can finish is not what the author just asked for, so
@@ -742,7 +742,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
742
742
  // problem the next click would have avoided.
743
743
  maximumCount: Math.max(e.maximumCount, e.regions.length + 1)
744
744
  }), j(s);
745
- }, b = (t, s, m) => /* @__PURE__ */ n.jsx(I, { label: m, children: (v) => /* @__PURE__ */ n.jsx(
745
+ }, b = (t, s, m) => /* @__PURE__ */ n.jsx(D, { label: m, children: (v) => /* @__PURE__ */ n.jsx(
746
746
  "input",
747
747
  {
748
748
  ...v,
@@ -901,7 +901,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
901
901
  ) })
902
902
  ] }),
903
903
  /* @__PURE__ */ n.jsx(
904
- D,
904
+ Y,
905
905
  {
906
906
  label: a("requireLabelLabel"),
907
907
  hint: a("requireLabelHint"),
@@ -911,7 +911,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
911
911
  ),
912
912
  /* @__PURE__ */ n.jsxs(U, { summary: a("advanced"), children: [
913
913
  /* @__PURE__ */ n.jsx(
914
- I,
914
+ D,
915
915
  {
916
916
  label: a("countLabel"),
917
917
  hint: a("countHint"),
@@ -932,7 +932,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
932
932
  )
933
933
  }
934
934
  ),
935
- e.annotationKind === "rect" && /* @__PURE__ */ n.jsx(I, { label: a("overlapLabel"), hint: a("overlapHint"), children: (t) => /* @__PURE__ */ n.jsx(
935
+ e.annotationKind === "rect" && /* @__PURE__ */ n.jsx(D, { label: a("overlapLabel"), hint: a("overlapHint"), children: (t) => /* @__PURE__ */ n.jsx(
936
936
  "input",
937
937
  {
938
938
  ...t,
@@ -951,7 +951,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
951
951
  }
952
952
  ) }),
953
953
  /* @__PURE__ */ n.jsx(
954
- D,
954
+ Y,
955
955
  {
956
956
  label: a("penaliseLabel"),
957
957
  hint: a("penaliseHint"),
@@ -960,7 +960,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
960
960
  }
961
961
  ),
962
962
  e.requireLabel && /* @__PURE__ */ n.jsx(
963
- D,
963
+ Y,
964
964
  {
965
965
  label: a("caseSensitiveLabel"),
966
966
  checked: e.caseSensitive,
@@ -985,8 +985,8 @@ be({
985
985
  kind: "task",
986
986
  schema: ze,
987
987
  evaluate: Le,
988
- Task: De,
989
- Form: Ye,
988
+ Task: Ye,
989
+ Form: Ie,
990
990
  info: (e) => ({
991
991
  name: z(X, "name", e),
992
992
  description: z(X, "description", e)
@@ -1009,9 +1009,9 @@ xe(ie);
1009
1009
  export {
1010
1010
  Fe as AnswerSchema,
1011
1011
  ze as DataSchema,
1012
- Ye as Form,
1012
+ Ie as Form,
1013
1013
  ie as TYPE,
1014
- De as Task,
1014
+ Ye as Task,
1015
1015
  Le as evaluate,
1016
1016
  ne as formMessages,
1017
1017
  Me as lands,
@@ -1,5 +1,5 @@
1
- import { L as k, ak as z, a2 as j, a9 as E, ac as U, ad as M, a5 as _, a4 as P, a as $, j as r, b as y, an as G, ao as J, a6 as N, s as K, aa as Q } from "./dom-uYx_3K1r.js";
2
- import { e as F, g as H, i as W, F as V, P as X, M as Y, B as ee, U as te, H as ae } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as k, ak as z, a2 as j, a9 as E, ac as U, ad as M, a5 as _, a4 as P, a as $, j as r, b as y, an as G, ao as J, a6 as N, s as K, aa as Q } from "./dom-B6NPWBb1.js";
2
+ import { e as F, g as H, i as W, F as V, P as X, M as Y, B as ee, U as te, H as ae } from "./bitLoaders-7qanePQL.js";
3
3
  const S = {
4
4
  iff: ["<->", "<=>", "↔", "≡", "iff", "xnor"],
5
5
  implies: ["->", "=>", "→", "⊃", "implies"],
@@ -1,6 +1,6 @@
1
- import { L as j, a2 as w, ac as $, ad as Z, a4 as F, ab as B, a9 as _, P as R, ae as x, j as o, a as T, a5 as S, af as U, b as L, s as K, aa as Y } from "./dom-uYx_3K1r.js";
2
- import { ag as Me, ah as ye, ai as Ne, aj as Ce } from "./dom-uYx_3K1r.js";
3
- import { e as N, C as V, g as f, M as A, P as Q, F as X, B as J, U as ee, r as te, H as ae } from "./bitLoaders-CxvZkGrY.js";
1
+ import { P as j, a2 as w, ac as $, ad as Z, a4 as F, ab as B, a9 as Y, Y as R, ae as x, j as o, a as T, a5 as S, af as U, b as L, s as _, aa as K } from "./dom-B6NPWBb1.js";
2
+ import { ag as Me, ah as ye, ai as Ne, aj as Ce } from "./dom-B6NPWBb1.js";
3
+ import { e as N, C as V, g as f, M as A, P as Q, F as X, B as J, U as ee, r as te, H as ae } from "./bitLoaders-7qanePQL.js";
4
4
  const ne = S([
5
5
  /** The same number, up to floating-point noise. */
6
6
  "exact",
@@ -46,7 +46,7 @@ const ne = S([
46
46
  * Off, `3/4` is refused instead of quietly worked out — "give it as a
47
47
  * decimal" is a real question and answering it with the division dodges it.
48
48
  */
49
- allowExpression: _().default(!0),
49
+ allowExpression: Y().default(!0),
50
50
  /**
51
51
  * Feedback for particular wrong answers — the classic slip, the
52
52
  * unconverted unit, the factor of ten. Matched with the same tolerance as
@@ -686,9 +686,9 @@ const ne = S([
686
686
  ] })
687
687
  ] });
688
688
  };
689
- K("bitflow-styles-task-numeric", he);
689
+ _("bitflow-styles-task-numeric", he);
690
690
  const q = "task-numeric";
691
- Y({
691
+ K({
692
692
  type: q,
693
693
  kind: "task",
694
694
  schema: se,