hyperbook 0.113.0 → 0.113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +18 -3
  2. package/dist/asset-manifest.json +9 -9
  3. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-CE3Yr86b.js} +155 -155
  4. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-eYGRtw6N.js} +1 -1
  5. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-CxvZkGrY.js} +1138 -1073
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +3 -3
  8. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-88c3K20U.js} +31 -31
  9. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-B61LKxr1.js} +45 -45
  10. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BG0PL-Z6.js} +30 -30
  11. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-BNdpL6Ss.js} +78 -78
  12. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-BO-d4HVC.js} +48 -48
  13. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-BZhNY0lo.js} +12 -12
  14. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-BadyFTU5.js} +8 -8
  15. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-BlT1EcFH.js} +34 -34
  16. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-BuQ-K_tR.js} +7 -7
  17. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-Bw0pL0hW.js} +28 -28
  18. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-BwBVUdJ9.js} +94 -94
  19. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-BydYlLy4.js} +73 -73
  20. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-C7RJxxAx.js} +63 -63
  21. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-CERSJ9uS.js} +70 -70
  22. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-CLHtOGrW.js} +11 -11
  23. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-CWe2GjBK.js} +14 -14
  24. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CfKpkSVC.js} +72 -72
  25. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-CjKhq7gY.js} +23 -23
  26. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-Cm4w1Zyc.js} +38 -38
  27. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-D0U3nepG.js} +52 -52
  28. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-D4PdXMcj.js} +33 -33
  29. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-D9LOuqr2.js} +99 -99
  30. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-DIb3CXwC.js} +42 -42
  31. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-DQP0cUsP.js} +70 -70
  32. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-DUOrQfVe.js} +27 -27
  33. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DW3cUBvZ.js} +1 -1
  34. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-DYWo0PUv.js} +24 -24
  35. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-D_QhyFcx.js} +101 -91
  36. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-Dn5hHVuT.js} +226 -193
  37. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-DruC5d43.js} +69 -69
  38. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-EKIgFddO.js} +105 -105
  39. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-HXNGIC7K.js} +70 -70
  40. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-ISbOe239.js} +42 -42
  41. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-IsMJtrUT.js} +31 -31
  42. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-TUXuIR22.js} +6 -6
  43. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-WbE9UOFa.js} +24 -24
  44. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-d5ebPDeY.js} +13 -13
  45. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-ledofrbo.js} +33 -33
  46. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-oNmOArKu.js} +1 -1
  47. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-rp4UTV85.js} +84 -84
  48. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-xTX3CXJW.js} +23 -23
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  51. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  52. package/dist/assets/directive-bitflow/report.js +1 -1
  53. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-vjEU4OvA.js} +2 -2
  54. package/dist/index.js +6351 -3340
  55. package/dist/schemas/hyperbook.schema.json +4 -4
  56. package/package.json +5 -5
@@ -1,6 +1,6 @@
1
- import { L as I, a4 as $, ac as W, ad as q, a2 as k, j as r, am as G, a5 as Z, a as j, b as N, aa as _, s as J } from "./dom-uYx_3K1r.js";
2
- import { S as Q, v as V, A as y, e as X, P as ee, D as te, y as ie, E as ne, g as oe, s as re, L as ae, R as se } from "./bitLoaders-DIGwTcpd.js";
3
- const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-ordering-list{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:0;list-style:none}.bitflow-ordering-item{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;width:100%;padding:var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:grab;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);touch-action:manipulation}.bitflow-ordering-grip{flex:none;align-self:stretch;display:flex;align-items:center;justify-content:center;width:2rem;margin-block:calc(-1 * var(--bitflow-space-xsmall));margin-inline-start:calc(-1 * var(--bitflow-space-xsmall));touch-action:none;cursor:grab}.bitflow-ordering-grip:before{content:"";width:12px;height:18px;background:radial-gradient(circle,var(--bitflow-color-neutral-400) 1.5px,transparent 2px) 0 0 / 6px 6px}.bitflow-ordering-item:disabled{cursor:default}.bitflow-ordering-position{flex:none;width:1.75rem;height:1.75rem;font-variant-numeric:tabular-nums;line-height:1.75rem;text-align:center;background:var(--bitflow-color-neutral-100);border-radius:50%}.bitflow-ordering-image{max-height:4rem}.bitflow-ordering-item.bitflow-ordering-item-gap{background:var(--bitflow-color-neutral-100);border-style:dashed;border-color:var(--bitflow-color-primary)}.bitflow-ordering-lifted{position:fixed;top:0;left:0;z-index:10;cursor:grabbing;pointer-events:none;box-shadow:var(--bitflow-shadow-medium)}.bitflow-ordering-item.bitflow-ordering-item-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-correct)}.bitflow-ordering-item.bitflow-ordering-item-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-wrong)}', de = (e, n) => e.items.filter((a, s) => n[s] === a.id).map((a) => a.id), me = ({
1
+ import { L as P, a4 as z, ac as W, ad as q, a2 as k, j as r, am as G, a5 as Z, a as j, b as N, aa as _, s as J } from "./dom-uYx_3K1r.js";
2
+ import { $ as Q, e as V, g as y, P as L, M as ee, h as te, C as ie, B as ne, q as oe, y as re, U as ae, H as se } from "./bitLoaders-CxvZkGrY.js";
3
+ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-ordering-list{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall);padding:0;margin:0;list-style:none}.bitflow-ordering-item{display:flex;gap:var(--bitflow-space-xsmall);align-items:center;width:100%;padding:var(--bitflow-space-xsmall);font:inherit;color:var(--bitflow-color-text);text-align:left;cursor:grab;background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);touch-action:manipulation}.bitflow-ordering-grip{flex:none;align-self:stretch;display:flex;align-items:center;justify-content:center;width:2rem;margin-block:calc(-1 * var(--bitflow-space-xsmall));margin-inline-start:calc(-1 * var(--bitflow-space-xsmall));touch-action:none;cursor:grab}.bitflow-ordering-grip:before{content:"";width:12px;height:18px;background:radial-gradient(circle,var(--bitflow-color-neutral-400) 1.5px,transparent 2px) 0 0 / 6px 6px}.bitflow-ordering-item:disabled{cursor:default}.bitflow-ordering-position{flex:none;width:1.75rem;height:1.75rem;font-variant-numeric:tabular-nums;line-height:1.75rem;text-align:center;background:var(--bitflow-color-neutral-100);border-radius:50%}.bitflow-ordering-image{max-height:4rem}.bitflow-ordering-item.bitflow-ordering-item-gap{background:var(--bitflow-color-neutral-100);border-style:dashed;border-color:var(--bitflow-color-primary)}.bitflow-ordering-lifted{position:fixed;top:0;left:0;z-index:10;cursor:grabbing;pointer-events:none;box-shadow:var(--bitflow-shadow-medium)}.bitflow-ordering-item.bitflow-ordering-item-correct{background:color-mix(in srgb,var(--bitflow-color-correct) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-correct)}.bitflow-ordering-item.bitflow-ordering-item-wrong{background:color-mix(in srgb,var(--bitflow-color-wrong) 12%,var(--bitflow-color-surface));border-color:var(--bitflow-color-wrong)}', de = (e, n) => e.items.filter((a, s) => n[s] === a.id).map((a) => a.id), me = ({
4
4
  data: e,
5
5
  answer: n
6
6
  }) => {
@@ -17,7 +17,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
17
17
  correct: s
18
18
  }
19
19
  };
20
- }, P = {
20
+ }, I = {
21
21
  en: {
22
22
  name: "Put in order",
23
23
  description: "Items the learner arranges into the right order.",
@@ -38,7 +38,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
38
38
  itemRight: "an der richtigen Stelle",
39
39
  itemWrong: "nicht an der richtigen Stelle"
40
40
  }
41
- }, ce = I({
41
+ }, ce = P({
42
42
  /** Stable across edits, so an answer keeps pointing at the same item. */
43
43
  id: k().min(1),
44
44
  kind: Z(["text", "image"]).default("text"),
@@ -48,13 +48,13 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
48
48
  */
49
49
  label: k().default(""),
50
50
  image: G.optional()
51
- }), ue = I({
51
+ }), ue = P({
52
52
  instruction: k().default(""),
53
53
  /**
54
54
  * In the order they belong. The learner never sees this order; it is the
55
55
  * answer.
56
56
  */
57
- items: $(ce).default([]),
57
+ items: z(ce).default([]),
58
58
  evaluation: W.default(q)
59
59
  }).check((e) => {
60
60
  const n = e.value.items.map((a) => a.id);
@@ -81,7 +81,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
81
81
  path: ["items"],
82
82
  message: "Add at least three items. Fewer than that is not an ordering."
83
83
  });
84
- }), Ee = I({
84
+ }), Me = P({
85
85
  /**
86
86
  * The item ids in the order the learner has put them.
87
87
  *
@@ -89,7 +89,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
89
89
  * renaming the items — and so a stale answer referring to a deleted item is
90
90
  * something the runtime can notice rather than silently misread.
91
91
  */
92
- order: $(k()).default([])
92
+ order: z(k()).default([])
93
93
  }), he = {
94
94
  en: {
95
95
  instructionLabel: "Instruction",
@@ -137,7 +137,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
137
137
  readonly: o,
138
138
  onReorder: h
139
139
  }) => {
140
- const f = (t, l) => N(P, t, s, l), [g, x] = j.useState(""), w = j.useRef(null), i = j.useRef(null), [, m] = j.useReducer((t) => t + 1, 0), d = (t) => e.find((l) => l.id === t), p = (t) => t.label || t.id, M = a !== void 0, u = i.current, A = u ? u.order : n, C = (t, l) => {
140
+ const f = (t, l) => N(I, t, s, l), [g, x] = j.useState(""), w = j.useRef(null), i = j.useRef(null), [, m] = j.useReducer((t) => t + 1, 0), d = (t) => e.find((l) => l.id === t), p = (t) => t.label || t.id, E = a !== void 0, u = i.current, C = u ? u.order : n, A = (t, l) => {
141
141
  const c = d(t);
142
142
  x(
143
143
  f("moved", {
@@ -146,18 +146,18 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
146
146
  total: l.length
147
147
  })
148
148
  );
149
- }, F = (t, l) => {
149
+ }, U = (t, l) => {
150
150
  if (o) return;
151
151
  const c = n.indexOf(t), b = Math.min(Math.max(l, 0), n.length - 1);
152
- c === -1 || c === b || (h(E(n, t, b)), C(t, E(n, t, b)));
153
- }, O = (t) => {
152
+ c === -1 || c === b || (h(M(n, t, b)), A(t, M(n, t, b)));
153
+ }, F = (t) => {
154
154
  const l = [...w.current?.querySelectorAll("li") ?? []];
155
155
  for (let c = 0; c < l.length; c++) {
156
156
  const b = l[c].getBoundingClientRect();
157
157
  if (t < b.top + b.height / 2) return c;
158
158
  }
159
159
  return Math.max(0, l.length - 1);
160
- }, U = (t, l) => {
160
+ }, O = (t, l) => {
161
161
  if (o || t.button !== 0 || be(t.pointerType) && !fe(t.target)) return;
162
162
  const c = t.currentTarget.getBoundingClientRect();
163
163
  i.current = {
@@ -176,12 +176,12 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
176
176
  }, D = (t) => {
177
177
  const l = i.current;
178
178
  if (!l) return;
179
- const c = O(t.clientY);
179
+ const c = F(t.clientY);
180
180
  i.current = {
181
181
  ...l,
182
182
  x: t.clientX,
183
183
  y: t.clientY,
184
- order: E(l.order, l.id, c),
184
+ order: M(l.order, l.id, c),
185
185
  // Measured from where the drag began, not from the last position: a
186
186
  // slow drag moves a pixel at a time and would otherwise never count as
187
187
  // a drag at all.
@@ -190,20 +190,20 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
190
190
  }, K = () => {
191
191
  S.stop();
192
192
  const t = i.current;
193
- i.current = null, m(), !(!t || !t.moved) && t.order.join() !== n.join() && (h(t.order), C(t.id, t.order));
193
+ i.current = null, m(), !(!t || !t.moved) && t.order.join() !== n.join() && (h(t.order), A(t.id, t.order));
194
194
  }, S = oe(() => {
195
195
  const t = i.current;
196
196
  t && D({ clientX: t.x, clientY: t.y });
197
197
  });
198
198
  re(D, K);
199
- const L = u?.moved ? d(u.id) : void 0;
199
+ const Y = u?.moved ? d(u.id) : void 0;
200
200
  return /* @__PURE__ */ r.jsxs("div", { className: "bitflow-ordering", children: [
201
201
  /* @__PURE__ */ r.jsx("p", { className: "bitflow-hint", children: f(o ? "howToReadonly" : "howTo") }),
202
- /* @__PURE__ */ r.jsx("ol", { className: "bitflow-ordering-list", ref: w, children: A.map((t, l) => {
202
+ /* @__PURE__ */ r.jsx("ol", { className: "bitflow-ordering-list", ref: w, children: C.map((t, l) => {
203
203
  const c = d(t);
204
204
  if (!c) return null;
205
205
  const b = a?.includes(t), R = u?.moved === !0 && u.id === t, T = ["bitflow-ordering-item"];
206
- return M && T.push(
206
+ return E && T.push(
207
207
  b ? "bitflow-ordering-item-correct" : "bitflow-ordering-item-wrong"
208
208
  ), R && T.push("bitflow-ordering-item-gap"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsxs(
209
209
  "button",
@@ -215,20 +215,20 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
215
215
  "aria-label": f("itemLabel", {
216
216
  item: p(c),
217
217
  position: l + 1,
218
- total: A.length
218
+ total: C.length
219
219
  }),
220
- onPointerDown: (v) => U(v, t),
220
+ onPointerDown: (v) => O(v, t),
221
221
  onKeyDown: (v) => {
222
- const Y = v.key === "ArrowUp" ? -1 : v.key === "ArrowDown" ? 1 : 0;
223
- Y !== 0 && (v.preventDefault(), F(t, l + Y));
222
+ const H = v.key === "ArrowUp" ? -1 : v.key === "ArrowDown" ? 1 : 0;
223
+ H !== 0 && (v.preventDefault(), U(t, l + H));
224
224
  },
225
225
  children: [
226
226
  !R && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
227
- !o && /* @__PURE__ */ r.jsx(z, {}),
227
+ !o && /* @__PURE__ */ r.jsx($, {}),
228
228
  /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-position", "aria-hidden": "true", children: l + 1 }),
229
- H(c)
229
+ X(c)
230
230
  ] }),
231
- M && /* @__PURE__ */ r.jsxs("span", { className: "bitflow-visually-hidden", children: [
231
+ E && /* @__PURE__ */ r.jsxs("span", { className: "bitflow-visually-hidden", children: [
232
232
  " ",
233
233
  f(b ? "itemRight" : "itemWrong")
234
234
  ] })
@@ -236,7 +236,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
236
236
  }
237
237
  ) }, t);
238
238
  }) }),
239
- L && u && /* @__PURE__ */ r.jsxs(
239
+ Y && u && /* @__PURE__ */ r.jsxs(
240
240
  "div",
241
241
  {
242
242
  className: "bitflow-ordering-item bitflow-ordering-lifted",
@@ -247,15 +247,15 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
247
247
  transform: `translate(${u.x - u.grabX}px, ${u.y - u.grabY}px)`
248
248
  },
249
249
  children: [
250
- /* @__PURE__ */ r.jsx(z, {}),
250
+ /* @__PURE__ */ r.jsx($, {}),
251
251
  /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-position", children: u.order.indexOf(u.id) + 1 }),
252
- H(L)
252
+ X(Y)
253
253
  ]
254
254
  }
255
255
  ),
256
256
  /* @__PURE__ */ r.jsx("div", { className: "bitflow-visually-hidden", role: "status", "aria-live": "polite", children: g })
257
257
  ] });
258
- }, z = () => /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-grip", "aria-hidden": "true" }), be = (e) => e === "touch" || e === "pen", fe = (e) => e instanceof Element && e.closest(".bitflow-ordering-grip") !== null, H = (e) => e.kind === "image" && e.image?.src ? /* @__PURE__ */ r.jsx(
258
+ }, $ = () => /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-grip", "aria-hidden": "true" }), be = (e) => e === "touch" || e === "pen", fe = (e) => e instanceof Element && e.closest(".bitflow-ordering-grip") !== null, X = (e) => e.kind === "image" && e.image?.src ? /* @__PURE__ */ r.jsx(
259
259
  "img",
260
260
  {
261
261
  className: "bitflow-ordering-image",
@@ -263,7 +263,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
263
263
  alt: "",
264
264
  draggable: !1
265
265
  }
266
- ) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-text", children: e.label || e.id }), E = (e, n, a) => {
266
+ ) : /* @__PURE__ */ r.jsx("span", { className: "bitflow-ordering-text", children: e.label || e.id }), M = (e, n, a) => {
267
267
  const s = e.indexOf(n);
268
268
  if (s === -1) return e;
269
269
  const o = [...e];
@@ -373,7 +373,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
373
373
  y(s, "items") && /* @__PURE__ */ r.jsx("span", { className: "bitflow-field-error", role: "alert", children: y(s, "items") }),
374
374
  e.items.length === 0 && /* @__PURE__ */ r.jsx("p", { className: "bitflow-text-muted", children: o("noItems") }),
375
375
  e.items.map((i, m) => /* @__PURE__ */ r.jsx("div", { className: "bitflow-rule", children: /* @__PURE__ */ r.jsxs(
376
- X,
376
+ L,
377
377
  {
378
378
  ...f.props(i.id),
379
379
  summary: i.label || o("unnamedItem"),
@@ -474,7 +474,7 @@ const le = '.bitflow-ordering{display:flex;flex-direction:column;gap:var(--bitfl
474
474
  )
475
475
  ] })
476
476
  ] }),
477
- /* @__PURE__ */ r.jsx(X, { summary: o("advanced"), children: /* @__PURE__ */ r.jsx(
477
+ /* @__PURE__ */ r.jsx(L, { summary: o("advanced"), children: /* @__PURE__ */ r.jsx(
478
478
  ne,
479
479
  {
480
480
  evaluation: e.evaluation,
@@ -492,8 +492,8 @@ _({
492
492
  Task: ye,
493
493
  Form: Ne,
494
494
  info: (e) => ({
495
- name: N(P, "name", e),
496
- description: N(P, "description", e)
495
+ name: N(I, "name", e),
496
+ description: N(I, "description", e)
497
497
  }),
498
498
  defaultData: () => ({
499
499
  instruction: "",
@@ -504,7 +504,7 @@ _({
504
504
  se(B);
505
505
  J("bitflow-styles-task-ordering", le);
506
506
  export {
507
- Ee as AnswerSchema,
507
+ Me as AnswerSchema,
508
508
  ue as DataSchema,
509
509
  Ne as Form,
510
510
  ce as ItemSchema,
@@ -514,7 +514,7 @@ export {
514
514
  de as correctPositions,
515
515
  me as evaluate,
516
516
  he as formMessages,
517
- P as messages,
517
+ I as messages,
518
518
  we as seededShuffle,
519
519
  pe as shuffledAwayFrom
520
520
  };
@@ -1,6 +1,6 @@
1
- import { L as R, a4 as q, ac as ce, ad as J, a9 as W, P as L, am as he, a2 as S, a as p, j as n, a5 as Q, b as C, s as ue, aa as be } from "./dom-uYx_3K1r.js";
2
- import { S as me, v as F, D as ge, A as M, P as O, _, e as G, y as fe, M as D, t as Y, E as we, L as pe, s as V, R as xe } from "./bitLoaders-DIGwTcpd.js";
3
- const I = (e) => ({
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) => ({
4
4
  x: e.x,
5
5
  y: e.y,
6
6
  width: e.kind === "rect" ? e.width : 0,
@@ -24,14 +24,14 @@ const I = (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(I(e)) : e;
27
+ const l = e.kind === "rect" ? ve(Y(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(I(e), B(r)) >= c.overlap;
34
+ return ke(Y(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);
@@ -119,9 +119,9 @@ const I = (e) => ({
119
119
  verdictStray: "Hier ist nichts",
120
120
  missed: "Nicht markiert: {label}"
121
121
  }
122
- }, Se = ".bitflow-annotate{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-annotate-picture{position:relative;width:100%;border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);overflow:hidden;background:var(--bitflow-color-surface);touch-action:manipulation}.bitflow-annotate-picture-drag{touch-action:none}.bitflow-annotate-image{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-select:none;user-select:none}.bitflow-annotate-noimage{background:repeating-linear-gradient(45deg,var(--bitflow-color-neutral-100),var(--bitflow-color-neutral-100) 10px,var(--bitflow-color-surface) 10px,var(--bitflow-color-surface) 20px)}.bitflow-annotate-surface{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:crosshair}.bitflow-annotate-surface:disabled{cursor:default}.bitflow-annotate-aim{position:absolute;width:var(--bitflow-annotate-aim-size, 1.5rem);height:var(--bitflow-annotate-aim-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);pointer-events:none;opacity:0;background:linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / var(--bitflow-border-width) 100% no-repeat,linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / 100% var(--bitflow-border-width) no-repeat}.bitflow-annotate-surface:focus-visible~.bitflow-annotate-aim{opacity:1}.bitflow-annotate-mark{position:absolute;pointer-events:none;border:var(--bitflow-border-width) solid var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 15%,transparent)}.bitflow-annotate-mark-point{width:var(--bitflow-annotate-mark-size, 1.5rem);height:var(--bitflow-annotate-mark-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);border-radius:var(--bitflow-radius-full)}.bitflow-annotate-number{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-bold);color:var(--bitflow-color-primary)}.bitflow-annotate-mark-right{border-color:var(--bitflow-color-correct);background:color-mix(in srgb,var(--bitflow-color-correct) 20%,transparent)}.bitflow-annotate-mark-named-wrong{border-color:var(--bitflow-color-warning);border-style:dashed}.bitflow-annotate-mark-stray{border-color:var(--bitflow-color-wrong);border-style:dashed}.bitflow-annotate-drawing{border-style:dashed}.bitflow-annotate-region{position:absolute;border:var(--bitflow-border-width) dashed var(--bitflow-color-correct);background:transparent;pointer-events:none}.bitflow-annotate-editor .bitflow-annotate-region{pointer-events:auto;cursor:move;padding:0;border-style:solid;border-color:var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 10%,transparent)}.bitflow-annotate-editor{cursor:crosshair}.bitflow-annotate-region-selected{border-color:var(--bitflow-color-primary-dark);background:color-mix(in srgb,var(--bitflow-color-primary) 25%,transparent)}.bitflow-annotate-region-name{position:absolute;left:0;bottom:100%;padding:0 var(--bitflow-space-xxsmall);font-size:var(--bitflow-font-size-small);white-space:nowrap;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-list,.bitflow-annotate-missed{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-annotate-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-row-where{font-variant-numeric:tabular-nums}.bitflow-annotate-row>.bitflow-input{flex:1 1 var(--bitflow-annotate-name-min, 8rem);min-width:0}.bitflow-annotate-verdict{color:var(--bitflow-color-text-muted)}", N = L().min(0).max(1), te = ["point", "rect"], ae = Q(te), Re = R({
122
+ }, Ce = ".bitflow-annotate{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-annotate-picture{position:relative;width:100%;border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);overflow:hidden;background:var(--bitflow-color-surface);touch-action:manipulation}.bitflow-annotate-picture-drag{touch-action:none}.bitflow-annotate-image{display:block;width:100%;height:100%;object-fit:contain;-webkit-user-select:none;user-select:none}.bitflow-annotate-noimage{background:repeating-linear-gradient(45deg,var(--bitflow-color-neutral-100),var(--bitflow-color-neutral-100) 10px,var(--bitflow-color-surface) 10px,var(--bitflow-color-surface) 20px)}.bitflow-annotate-surface{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:crosshair}.bitflow-annotate-surface:disabled{cursor:default}.bitflow-annotate-aim{position:absolute;width:var(--bitflow-annotate-aim-size, 1.5rem);height:var(--bitflow-annotate-aim-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-aim-size, 1.5rem) / -2);pointer-events:none;opacity:0;background:linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / var(--bitflow-border-width) 100% no-repeat,linear-gradient(var(--bitflow-color-primary),var(--bitflow-color-primary)) center / 100% var(--bitflow-border-width) no-repeat}.bitflow-annotate-surface:focus-visible~.bitflow-annotate-aim{opacity:1}.bitflow-annotate-mark{position:absolute;pointer-events:none;border:var(--bitflow-border-width) solid var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 15%,transparent)}.bitflow-annotate-mark-point{width:var(--bitflow-annotate-mark-size, 1.5rem);height:var(--bitflow-annotate-mark-size, 1.5rem);margin-left:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);margin-top:calc(var(--bitflow-annotate-mark-size, 1.5rem) / -2);border-radius:var(--bitflow-radius-full)}.bitflow-annotate-number{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-bold);color:var(--bitflow-color-primary)}.bitflow-annotate-mark-right{border-color:var(--bitflow-color-correct);background:color-mix(in srgb,var(--bitflow-color-correct) 20%,transparent)}.bitflow-annotate-mark-named-wrong{border-color:var(--bitflow-color-warning);border-style:dashed}.bitflow-annotate-mark-stray{border-color:var(--bitflow-color-wrong);border-style:dashed}.bitflow-annotate-drawing{border-style:dashed}.bitflow-annotate-region{position:absolute;border:var(--bitflow-border-width) dashed var(--bitflow-color-correct);background:transparent;pointer-events:none}.bitflow-annotate-editor .bitflow-annotate-region{pointer-events:auto;cursor:move;padding:0;border-style:solid;border-color:var(--bitflow-color-primary);background:color-mix(in srgb,var(--bitflow-color-primary) 10%,transparent)}.bitflow-annotate-editor{cursor:crosshair}.bitflow-annotate-region-selected{border-color:var(--bitflow-color-primary-dark);background:color-mix(in srgb,var(--bitflow-color-primary) 25%,transparent)}.bitflow-annotate-region-name{position:absolute;left:0;bottom:100%;padding:0 var(--bitflow-space-xxsmall);font-size:var(--bitflow-font-size-small);white-space:nowrap;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-list,.bitflow-annotate-missed{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-annotate-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-annotate-row-where{font-variant-numeric:tabular-nums}.bitflow-annotate-row>.bitflow-input{flex:1 1 var(--bitflow-annotate-name-min, 8rem);min-width:0}.bitflow-annotate-verdict{color:var(--bitflow-color-text-muted)}", N = L().min(0).max(1), te = ["point", "rect"], ae = Q(te), Se = S({
123
123
  /** Stable across edits, so an outcome keeps pointing at the same region. */
124
- id: S().min(1),
124
+ id: C().min(1),
125
125
  /**
126
126
  * Where the answer is. A circle for "mark the point"; a rectangle for
127
127
  * "outline the area". Both are what *counts*, not what is asked for — the
@@ -139,17 +139,17 @@ const I = (e) => ({
139
139
  * Names what is here. Shown once the answer is in, and used by whoever
140
140
  * cannot see the picture — so it is written for a reader, not as a key.
141
141
  */
142
- label: S().default(""),
142
+ label: C().default(""),
143
143
  /**
144
144
  * Spellings the learner may write when a label is asked for. The region's
145
145
  * own `label` always counts, so this is for synonyms.
146
146
  */
147
- acceptedLabels: q(S()).default([])
148
- }), Ce = R({
149
- instruction: S().default(""),
147
+ acceptedLabels: q(C()).default([])
148
+ }), ze = S({
149
+ instruction: C().default(""),
150
150
  background: he.default({ src: "", alt: "" }),
151
151
  /** The shape of the picture, so the marks keep their proportions. */
152
- size: R({
152
+ size: S({
153
153
  width: L().positive().default(620),
154
154
  height: L().positive().default(310)
155
155
  }).default({ width: 620, height: 310 }),
@@ -163,7 +163,7 @@ const I = (e) => ({
163
163
  maximumCount: L().int().min(1).default(1),
164
164
  /** Whether each mark has to be named as well as placed. */
165
165
  requireLabel: W().default(!1),
166
- regions: q(Re).default([]),
166
+ regions: q(Se).default([]),
167
167
  /**
168
168
  * How close a `rect` answer has to be to a `rect` region, as a fraction of
169
169
  * the two boxes' union — the Jaccard overlap. 0.5 is "half right", which
@@ -223,18 +223,18 @@ const I = (e) => ({
223
223
  path: ["maximumCount"],
224
224
  message: `There are ${r.length} regions but only ${l} mark(s) allowed, so the task cannot be completed.`
225
225
  }));
226
- }), ze = R({
226
+ }), Re = S({
227
227
  /** Stable while the learner works, so a mark can be moved and removed. */
228
- id: S().min(1),
228
+ id: C().min(1),
229
229
  kind: ae.default("point"),
230
230
  x: N,
231
231
  y: N,
232
232
  /** Only for a `rect` mark. */
233
233
  width: N.default(0),
234
234
  height: N.default(0),
235
- label: S().default("")
236
- }), Te = R({
237
- annotations: q(ze).default([])
235
+ label: C().default("")
236
+ }), Fe = S({
237
+ annotations: q(Re).default([])
238
238
  }), Ee = 0.01, He = 0.05, Pe = 0.02, $ = (e) => Math.min(1, Math.max(0, e));
239
239
  let $e = 0;
240
240
  const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be = ({
@@ -245,13 +245,13 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
245
245
  readonly: a,
246
246
  onAnswerChange: h
247
247
  }) => {
248
- const d = (i, o) => C(X, i, l, o), f = p.useRef(null), [g, j] = p.useState({ x: 0.5, y: 0.5 }), [w, k] = p.useState(), [b, t] = p.useState(""), s = p.useRef(void 0), m = p.useRef(!1), [v, z] = p.useState(), y = r?.annotations ?? [], E = c !== void 0, K = y.length >= e.maximumCount, H = p.useCallback((i, o) => {
248
+ const d = (i, o) => z(X, i, l, o), f = p.useRef(null), [g, j] = p.useState({ x: 0.5, y: 0.5 }), [w, k] = p.useState(), [b, t] = p.useState(""), s = p.useRef(void 0), m = p.useRef(!1), [v, R] = p.useState(), y = r?.annotations ?? [], E = c !== void 0, K = y.length >= e.maximumCount, H = p.useCallback((i, o) => {
249
249
  const u = f.current?.getBoundingClientRect();
250
250
  return !u || u.width === 0 || u.height === 0 ? null : {
251
251
  x: $((i - u.left) / u.width),
252
252
  y: $((o - u.top) / u.height)
253
253
  };
254
- }, []), T = (i) => {
254
+ }, []), F = (i) => {
255
255
  if (a || K) return;
256
256
  const o = { ...i, id: Ae() };
257
257
  h({ annotations: [...y, o] }), t(
@@ -271,10 +271,10 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
271
271
  )
272
272
  }), P = (i, o) => {
273
273
  if (e.annotationKind === "point" || !o) {
274
- T({ kind: "point", x: i.x, y: i.y, width: 0, height: 0, label: "" });
274
+ F({ kind: "point", x: i.x, y: i.y, width: 0, height: 0, label: "" });
275
275
  return;
276
276
  }
277
- T({
277
+ F({
278
278
  kind: "rect",
279
279
  x: Math.min(i.x, o.x),
280
280
  y: Math.min(i.y, o.y),
@@ -289,7 +289,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
289
289
  const o = H(i.clientX, i.clientY);
290
290
  if (!o) return;
291
291
  const { fromX: u, fromY: x } = s.current;
292
- Math.hypot(o.x - u, o.y - x) > Pe && (m.current = !0), m.current && e.annotationKind === "rect" && z({
292
+ Math.hypot(o.x - u, o.y - x) > Pe && (m.current = !0), m.current && e.annotationKind === "rect" && R({
293
293
  x: Math.min(u, o.x),
294
294
  y: Math.min(x, o.y),
295
295
  width: Math.abs(o.x - u),
@@ -298,7 +298,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
298
298
  },
299
299
  (i) => {
300
300
  const o = s.current;
301
- if (s.current = void 0, z(void 0), !o || !m.current) return;
301
+ if (s.current = void 0, R(void 0), !o || !m.current) return;
302
302
  const u = H(i.clientX, i.clientY);
303
303
  u && e.annotationKind === "rect" && P({ x: o.fromX, y: o.fromY }, u);
304
304
  }
@@ -331,7 +331,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
331
331
  return;
332
332
  }
333
333
  P(w, g), k(void 0);
334
- }, Z = (i) => c?.find((o) => o.annotationId === i);
334
+ }, T = (i) => c?.find((o) => o.annotationId === i);
335
335
  return /* @__PURE__ */ n.jsxs("div", { className: "bitflow-annotate", children: [
336
336
  /* @__PURE__ */ n.jsxs(
337
337
  "div",
@@ -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 = I(i), x = Z(i.id), de = E ? x && !x.labelWrong ? " bitflow-annotate-mark-right" : x ? " bitflow-annotate-mark-named-wrong" : " bitflow-annotate-mark-stray" : "";
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" : "";
372
372
  return /* @__PURE__ */ n.jsx(
373
373
  "span",
374
374
  {
@@ -448,7 +448,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
448
448
  /* @__PURE__ */ n.jsxs("ul", { className: "bitflow-annotate-list", children: [
449
449
  y.length === 0 && /* @__PURE__ */ n.jsx("li", { className: "bitflow-text-muted", children: d("nothingPlaced") }),
450
450
  y.map((i, o) => {
451
- const u = Z(i.id);
451
+ const u = T(i.id);
452
452
  return /* @__PURE__ */ n.jsxs("li", { className: "bitflow-annotate-row", children: [
453
453
  /* @__PURE__ */ n.jsx("span", { className: "bitflow-annotate-row-where", children: d(i.kind === "rect" ? "markBox" : "markPoint", {
454
454
  number: o + 1,
@@ -567,7 +567,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
567
567
  advanced: "Erweitert",
568
568
  previewHint: "Das Bild, wie Lernende es sehen, mit eingezeichneten Bereichen. Ihnen werden die Bereiche erst nach der Abgabe gezeigt."
569
569
  }
570
- }, A = (e) => Math.min(1, Math.max(0, e)), U = 0.02, Ke = ({
570
+ }, A = (e) => Math.min(1, Math.max(0, e)), _ = 0.02, Ke = ({
571
571
  data: e,
572
572
  locale: r,
573
573
  selectedId: c,
@@ -575,7 +575,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
575
575
  onDraw: a,
576
576
  onMove: h
577
577
  }) => {
578
- const d = (b) => C(ne, b, r), f = p.useRef(null), [g, j] = p.useState(), w = p.useRef(void 0), k = p.useCallback((b, t) => {
578
+ const d = (b) => z(ne, b, r), f = p.useRef(null), [g, j] = p.useState(), w = p.useRef(void 0), k = p.useCallback((b, t) => {
579
579
  const s = f.current?.getBoundingClientRect();
580
580
  return !s || s.width === 0 || s.height === 0 ? null : {
581
581
  x: A((b - s.left) / s.width),
@@ -607,7 +607,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
607
607
  const b = w.current;
608
608
  w.current = void 0;
609
609
  const t = g;
610
- j(void 0), !(b?.kind !== "draw" || !t) && (t.width < U || t.height < U || a(t));
610
+ j(void 0), !(b?.kind !== "draw" || !t) && (t.width < _ || t.height < _ || a(t));
611
611
  }
612
612
  ), /* @__PURE__ */ n.jsxs(
613
613
  "div",
@@ -716,25 +716,25 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
716
716
  onAnswerChange: h
717
717
  }
718
718
  )
719
- ] }), Ye = (e) => {
719
+ ] }), Ie = (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
- }, Ie = ({
724
+ }, Ye = ({
725
725
  data: e,
726
726
  locale: r,
727
727
  onChange: c,
728
728
  errors: l
729
729
  }) => {
730
- const a = (t, s) => C(ne, t, r, s), h = (t) => c({ ...e, ...t }), [d, f] = p.useState(), g = me(e.regions.map((t) => t.id)), j = (t) => {
730
+ const a = (t, s) => z(ne, t, r, s), h = (t) => c({ ...e, ...t }), [d, f] = p.useState(), g = me(e.regions.map((t) => t.id)), j = (t) => {
731
731
  f(t), t && g.open(t);
732
732
  }, w = (t, s) => h({
733
733
  regions: e.regions.map(
734
734
  (m) => m.id === t ? { ...m, ...s } : m
735
735
  )
736
736
  }), k = (t) => {
737
- const s = Ye(e.regions.map((v) => v.id)), m = We(s, t, e.annotationKind === "rect" ? "rect" : "circle");
737
+ const s = Ie(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(Y, { label: m, children: (v) => /* @__PURE__ */ n.jsx(
745
+ }, b = (t, s, m) => /* @__PURE__ */ n.jsx(I, { label: m, children: (v) => /* @__PURE__ */ n.jsx(
746
746
  "input",
747
747
  {
748
748
  ...v,
@@ -752,14 +752,14 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
752
752
  max: 100,
753
753
  step: 1,
754
754
  value: Math.round(t[s] * 100),
755
- onChange: (z) => w(t.id, {
756
- [s]: Math.min(1, Math.max(0, Number(z.target.value) / 100))
755
+ onChange: (R) => w(t.id, {
756
+ [s]: Math.min(1, Math.max(0, Number(R.target.value) / 100))
757
757
  })
758
758
  }
759
759
  ) });
760
760
  return /* @__PURE__ */ n.jsxs("div", { className: "bitflow-stack", children: [
761
761
  /* @__PURE__ */ n.jsx(
762
- F,
762
+ Z,
763
763
  {
764
764
  label: a("instructionLabel"),
765
765
  hint: a("instructionHint"),
@@ -810,14 +810,14 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
810
810
  /* @__PURE__ */ n.jsxs("fieldset", { className: "bitflow-field", children: [
811
811
  /* @__PURE__ */ n.jsx("legend", { className: "bitflow-label", children: a("regionsLabel") }),
812
812
  /* @__PURE__ */ n.jsx("span", { className: "bitflow-hint", children: a("regionsHint") }),
813
- _(l, "regions") && /* @__PURE__ */ n.jsx("span", { className: "bitflow-field-error", role: "alert", children: _(l, "regions") }),
813
+ G(l, "regions") && /* @__PURE__ */ n.jsx("span", { className: "bitflow-field-error", role: "alert", children: G(l, "regions") }),
814
814
  e.regions.length === 0 && /* @__PURE__ */ n.jsx("p", { className: "bitflow-text-muted", children: a("noRegions") }),
815
815
  e.regions.map((t, s) => /* @__PURE__ */ n.jsx(
816
816
  "div",
817
817
  {
818
818
  className: d === t.id ? "bitflow-rule bitflow-rule-selected" : "bitflow-rule",
819
819
  children: /* @__PURE__ */ n.jsxs(
820
- G,
820
+ U,
821
821
  {
822
822
  ...g.props(t.id),
823
823
  summary: t.label || a("unnamedRegion"),
@@ -858,7 +858,7 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
858
858
  ] }),
859
859
  M(l, `regions.${s}`) && /* @__PURE__ */ n.jsx("span", { className: "bitflow-field-error", role: "alert", children: M(l, `regions.${s}`) }),
860
860
  e.requireLabel && /* @__PURE__ */ n.jsx(
861
- F,
861
+ Z,
862
862
  {
863
863
  label: a("acceptedLabels"),
864
864
  hint: a("acceptedLabelsHint"),
@@ -909,9 +909,9 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
909
909
  onChange: (t) => h({ requireLabel: t })
910
910
  }
911
911
  ),
912
- /* @__PURE__ */ n.jsxs(G, { summary: a("advanced"), children: [
912
+ /* @__PURE__ */ n.jsxs(U, { summary: a("advanced"), children: [
913
913
  /* @__PURE__ */ n.jsx(
914
- Y,
914
+ I,
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(Y, { label: a("overlapLabel"), hint: a("overlapHint"), children: (t) => /* @__PURE__ */ n.jsx(
935
+ e.annotationKind === "rect" && /* @__PURE__ */ n.jsx(I, { label: a("overlapLabel"), hint: a("overlapHint"), children: (t) => /* @__PURE__ */ n.jsx(
936
936
  "input",
937
937
  {
938
938
  ...t,
@@ -978,18 +978,18 @@ const Ae = () => `mark-${$e += 1}-${Math.random().toString(36).slice(2, 7)}`, Be
978
978
  ] })
979
979
  ] });
980
980
  };
981
- ue("bitflow-styles-task-image-annotation", Se);
981
+ ue("bitflow-styles-task-image-annotation", Ce);
982
982
  const ie = "task-image-annotation";
983
983
  be({
984
984
  type: ie,
985
985
  kind: "task",
986
- schema: Ce,
986
+ schema: ze,
987
987
  evaluate: Le,
988
988
  Task: De,
989
- Form: Ie,
989
+ Form: Ye,
990
990
  info: (e) => ({
991
- name: C(X, "name", e),
992
- description: C(X, "description", e)
991
+ name: z(X, "name", e),
992
+ description: z(X, "description", e)
993
993
  }),
994
994
  defaultData: () => ({
995
995
  instruction: "",
@@ -1007,9 +1007,9 @@ be({
1007
1007
  });
1008
1008
  xe(ie);
1009
1009
  export {
1010
- Te as AnswerSchema,
1011
- Ce as DataSchema,
1012
- Ie as Form,
1010
+ Fe as AnswerSchema,
1011
+ ze as DataSchema,
1012
+ Ye as Form,
1013
1013
  ie as TYPE,
1014
1014
  De as Task,
1015
1015
  Le as evaluate,