@pie-element/graphing 11.0.4-next.20261011174919 → 11.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.
@@ -58,80 +58,71 @@ var f = /* @__PURE__ */ d(c(), 1), p = {
58
58
  "sine",
59
59
  "vector"
60
60
  ]
61
- }, m = (e, t) => (e = { ...e }, t = { ...t }, n(e.x, t.x) && n(e.y, t.y)), h = (e, t) => {
61
+ }, m = (e) => ({ ...e }), h = (e, t) => (e = { ...e }, t = { ...t }, n(e.x, t.x) && n(e.y, t.y)), g = (e, t) => {
62
62
  let r = !0;
63
63
  return e = { ...e }, t = { ...t }, (e.label || t.label) && (r = n(e.label, t.label)), n(e.x, t.x) && n(e.y, t.y) && r;
64
- }, g = (e, t) => n(e.from, t.from) && n(e.to, t.to) || n(e.to, t.from) && n(e.from, t.to), _ = (e, t) => n(e.from, t.from) && n(e.to, t.to), v = (e) => Object.keys(e || {}).sort().reduce((t, n) => (n !== "correctAnswer" && (t[n] = e[n]), t), {}), y = (e) => {
65
- e = {
66
- ...e,
67
- to: { ...e.to },
68
- from: { ...e.from }
69
- };
70
- let t = e.from.x, n = e.from.y, r = e.to.x, i = e.to.y;
64
+ }, _ = (e, t) => n(e.from, t.from) && n(e.to, t.to) || n(e.to, t.from) && n(e.from, t.to), v = (e, t) => n(e.from, t.from) && n(e.to, t.to), y = (e) => Object.keys(e || {}).sort().reduce((t, n) => (e && n !== "correctAnswer" && (t[n] = e[n]), t), {}), b = (e) => {
65
+ let t = m(e.from), n = m(e.to), r = t.x, i = t.y, a = n.x, o = n.y;
71
66
  return {
72
- a: i - n,
73
- b: t - r,
74
- c: r * n - t * i
67
+ a: o - i,
68
+ b: r - a,
69
+ c: a * i - r * o
75
70
  };
76
- }, b = (e) => Math.round(e * 1e4) / 1e4, x = (e, t) => {
77
- let { a: n, b: i, c: a } = y(e), { a: o, b: s, c } = y(t), l = [];
78
- if (o !== 0) l.push(b(n / o));
71
+ }, x = (e) => Math.round(e * 1e4) / 1e4, S = (e, t) => {
72
+ let { a: n, b: i, c: a } = b(e), { a: o, b: s, c } = b(t), l = [];
73
+ if (o !== 0) l.push(x(n / o));
79
74
  else if (n !== o) return !1;
80
- if (s !== 0) l.push(b(i / s));
75
+ if (s !== 0) l.push(x(i / s));
81
76
  else if (i !== s) return !1;
82
- if (c !== 0) l.push(b(a / c));
77
+ if (c !== 0) l.push(x(a / c));
83
78
  else if (a !== c) return !1;
84
79
  return r(l).length === 1;
85
- }, S = (e, t) => {
86
- e = {
87
- ...e,
88
- to: { ...e.to },
89
- from: { ...e.from }
90
- }, t = {
91
- ...t,
92
- to: { ...t.to },
93
- from: { ...t.from }
94
- };
95
- let n = (e.to.y - e.from.y) / (e.to.x - e.from.x), r = (t.to.y - t.from.y) / (t.to.x - t.from.x), i = Math.atan2(e.to.y - e.from.y, e.to.x - e.from.x) * 180 / Math.PI, a = Math.atan2(t.to.y - t.from.y, t.to.x - t.from.x) * 180 / Math.PI;
96
- return n === r && e.from.x === t.from.x && e.from.y === t.from.y && i === a;
97
- }, C = (e) => (e || []).map((t, n) => ({
98
- from: t,
99
- to: e[(n + 1) % e.length]
100
- })), w = (e) => (e ||= [], l(e, (e, t) => g(e, t))), T = (e) => (e ||= [], e.filter((e) => !n(e.from, e.to))), E = (e, t) => {
101
- let { points: n } = e, { points: r } = t, i = C(n), a = C(r), o = w(T(i)), s = w(T(a)), c = u(o, s, g), l = u(s, o, g);
80
+ }, C = (e, t) => {
81
+ let n = {
82
+ from: m(e.from),
83
+ to: m(e.to)
84
+ }, r = {
85
+ from: m(t.from),
86
+ to: m(t.to)
87
+ }, i = (n.to.y - n.from.y) / (n.to.x - n.from.x), a = (r.to.y - r.from.y) / (r.to.x - r.from.x), o = Math.atan2(n.to.y - n.from.y, n.to.x - n.from.x) * 180 / Math.PI, s = Math.atan2(r.to.y - r.from.y, r.to.x - r.from.x) * 180 / Math.PI;
88
+ return i === a && n.from.x === r.from.x && n.from.y === r.from.y && o === s;
89
+ }, w = (e) => {
90
+ let t = e || [];
91
+ return t.map((e, n) => ({
92
+ from: e,
93
+ to: t[(n + 1) % t.length]
94
+ }));
95
+ }, T = (e) => (e ||= [], l(e, (e, t) => _(e, t))), E = (e) => (e ||= [], e.filter((e) => !n(e.from, e.to))), D = (e, t) => {
96
+ let { points: n } = e, { points: r } = t, i = w(n), a = w(r), o = T(E(i)), s = T(E(a)), c = u(o, s, _), l = u(s, o, _);
102
97
  return (!c || !c.length) && (!l || !l.length);
103
- }, D = (e, t) => {
104
- if (e = {
105
- ...e,
106
- root: { ...e.root },
107
- edge: { ...e.edge }
108
- }, t = {
109
- ...t,
110
- root: { ...t.root },
111
- edge: { ...t.edge }
112
- }, n(t.edge, e.edge) && n(t.root, e.root)) return !0;
113
- let r = Math.sqrt((e.edge.x - e.root.x) ** 2 + (e.edge.y - e.root.y) ** 2), i = Math.sqrt((t.edge.x - t.root.x) ** 2 + (t.edge.y - t.root.y) ** 2);
114
- return n(t.root, e.root) && n(r, i);
115
98
  }, O = (e, t) => {
116
- let n = ({ root: e, edge: t }) => {
117
- e = { ...e }, t = { ...t };
118
- let { amplitude: n, freq: r } = s(e, t), i = Math.abs(e.y - t.y) * 2, a = Math.abs(e.x - t.x) * 2, o = t.x, c = t.y;
119
- for (; o < 0 && a !== 0;) o += a, c = c < e.y ? c + i : c - i;
120
- for (; o - a > 0 && a !== 0;) o -= a, c = c < e.y ? c + i : c - i;
99
+ let r = {
100
+ root: m(e.root),
101
+ edge: m(e.edge)
102
+ }, i = {
103
+ root: m(t.root),
104
+ edge: m(t.edge)
105
+ };
106
+ if (n(i.edge, r.edge) && n(i.root, r.root)) return !0;
107
+ let a = Math.sqrt((r.edge.x - r.root.x) ** 2 + (r.edge.y - r.root.y) ** 2), o = Math.sqrt((i.edge.x - i.root.x) ** 2 + (i.edge.y - i.root.y) ** 2);
108
+ return n(i.root, r.root) && n(a, o);
109
+ }, k = (e, t) => {
110
+ let n = (e) => {
111
+ let t = m(e.root), n = m(e.edge), { amplitude: r, freq: i } = s(t, n), a = Math.abs(t.y - n.y) * 2, o = Math.abs(t.x - n.x) * 2, c = n.x, l = n.y;
112
+ for (; c < 0 && o !== 0;) c += o, l = l < t.y ? l + a : l - a;
113
+ for (; c - o > 0 && o !== 0;) c -= o, l = l < t.y ? l + a : l - a;
121
114
  return {
122
- amplitude: b(n),
123
- freq: b(r),
124
- min: b(t.y < e.y ? t.y : t.y - i),
125
- max: b(t.y < e.y ? t.y + i : t.y),
126
- edgeAboveZeroX: b(o),
127
- edgeAboveZeroY: b(c)
115
+ amplitude: x(r),
116
+ freq: x(i),
117
+ min: x(n.y < t.y ? n.y : n.y - a),
118
+ max: x(n.y < t.y ? n.y + a : n.y),
119
+ edgeAboveZeroX: x(c),
120
+ edgeAboveZeroY: x(l)
128
121
  };
129
- }, r = n(e), i = n(t), { amplitude: a, freq: o, min: c, max: l, edgeAboveZeroX: u, edgeAboveZeroY: d } = r, { amplitude: f, freq: p, min: m, max: h, edgeAboveZeroX: g, edgeAboveZeroY: _ } = i;
130
- return Math.abs(a) === Math.abs(f) && Math.abs(o) === Math.abs(p) && c === m && l === h && u === g && d === _;
131
- }, k = (e, t) => {
132
- let { edge: n } = e, { edge: r } = t, { root: i } = e, { root: a } = t;
133
- i = { ...i }, a = { ...a };
134
- let s = n || { ...i }, c = r || { ...a }, l = {
122
+ }, r = n(e), i = n(t), { amplitude: a, freq: o, min: c, max: l, edgeAboveZeroX: u, edgeAboveZeroY: d } = r, { amplitude: f, freq: p, min: h, max: g, edgeAboveZeroX: _, edgeAboveZeroY: v } = i;
123
+ return Math.abs(a) === Math.abs(f) && Math.abs(o) === Math.abs(p) && c === h && l === g && u === _ && d === v;
124
+ }, A = (e, t) => {
125
+ let { edge: n } = e, { edge: r } = t, i = m(e.root), a = m(t.root), s = n || { ...i }, c = r || { ...a }, l = {
135
126
  x: i.x - (s.x - i.x),
136
127
  y: s.y
137
128
  }, u = {
@@ -139,44 +130,40 @@ var f = /* @__PURE__ */ d(c(), 1), p = {
139
130
  y: c.y
140
131
  };
141
132
  if (!n || !r) return !1;
142
- let { a: d, b: f, c: p } = o(i, n, l), { a: m, b: h, c: g } = o(a, r, u), _ = (e) => Math.round(e * 1e4) / 1e4;
143
- return _(d) === _(m) && _(f) === _(h) && _(p) === _(g);
144
- }, A = (e, r) => {
145
- let { edge: i } = e, { edge: a } = r, { root: o } = e, { root: s } = r;
146
- o = { ...o }, s = { ...s };
147
- let c = i || { ...o }, l = a || { ...s }, u = t(o, c), d = t(s, l);
133
+ let { a: d, b: f, c: p } = o(i, n, l), { a: h, b: g, c: _ } = o(a, r, u), v = (e) => Math.round(e * 1e4) / 1e4;
134
+ return v(d) === v(h) && v(f) === v(g) && v(p) === v(_);
135
+ }, j = (e, r) => {
136
+ let { edge: i } = e, { edge: a } = r, o = m(e.root), s = m(r.root), c = i || { ...o }, l = a || { ...s }, u = t(o, c), d = t(s, l);
148
137
  return n(s, o) && n(d, u);
149
- }, j = (e, t) => {
150
- let { edge: r } = e, { edge: a } = t, { root: o } = e, { root: s } = t;
151
- o = { ...o }, s = { ...s };
152
- let c = r || { ...o }, l = a || { ...s }, { a: u, b: d } = i(o, c), { a: f, b: p } = i(s, l);
138
+ }, M = (e, t) => {
139
+ let { edge: r } = e, { edge: a } = t, o = m(e.root), s = m(t.root), c = r || { ...o }, l = a || { ...s }, { a: u, b: d } = i(o, c), { a: f, b: p } = i(s, l);
153
140
  return n(f, u) && n(p, d);
154
- }, M = {
155
- circle: (e, t) => D(e, t),
156
- line: (e, t) => x(e, t),
157
- parabola: (e, t) => k(e, t),
158
- absolute: (e, t) => A(e, t),
159
- exponential: (e, t) => j(e, t),
160
- point: (e, t) => m(e, t),
161
- polygon: (e, t) => E(e, t),
162
- ray: (e, t) => S(e, t),
163
- segment: (e, t) => g(e, t),
164
- sine: (e, t) => O(e, t),
165
- vector: (e, t) => _(e, t)
166
- }, N = Object.defineProperty, P = /* @__PURE__ */ ((e, t) => {
141
+ }, N = {
142
+ circle: (e, t) => O(e, t),
143
+ line: (e, t) => S(e, t),
144
+ parabola: (e, t) => A(e, t),
145
+ absolute: (e, t) => j(e, t),
146
+ exponential: (e, t) => M(e, t),
147
+ point: (e, t) => h(e, t),
148
+ polygon: (e, t) => D(e, t),
149
+ ray: (e, t) => C(e, t),
150
+ segment: (e, t) => _(e, t),
151
+ sine: (e, t) => k(e, t),
152
+ vector: (e, t) => v(e, t)
153
+ }, P = Object.defineProperty, F = /* @__PURE__ */ ((e, t) => {
167
154
  let n = {};
168
- for (var r in e) N(n, r, {
155
+ for (var r in e) P(n, r, {
169
156
  get: e[r],
170
157
  enumerable: !0
171
158
  });
172
- return t || N(n, Symbol.toStringTag, { value: "Module" }), n;
173
- })({ enabled: () => F });
174
- function F(e, t, n) {
159
+ return t || P(n, Symbol.toStringTag, { value: "Module" }), n;
160
+ })({ enabled: () => I });
161
+ function I(e, t, n) {
175
162
  return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n != "boolean" || n;
176
163
  }
177
164
  //#endregion
178
165
  //#region src/controller/index.ts
179
- var I = (0, f.default)("@pie-element:graphing:controller"), L = () => ({
166
+ var L = (0, f.default)("@pie-element:graphing:controller"), R = () => ({
180
167
  point: [],
181
168
  segment: [],
182
169
  line: [],
@@ -188,66 +175,69 @@ var I = (0, f.default)("@pie-element:graphing:controller"), L = () => ({
188
175
  parabola: [],
189
176
  absolute: [],
190
177
  exponential: []
191
- }), R = {
178
+ }), z = {
192
179
  incorrect: 0,
193
180
  correct: 1,
194
181
  missing: 2
195
- }, z = (e, t) => !!(e && t && e.type === t.type && M[e.type] && M[e.type](e, t)), B = (e, t) => e.label === t.label ? "correct" : "incorrect", V = ({ sessionAnswers: t, marks: n, withPointLabel: r = !1 }) => {
196
- t ||= [], n ||= [];
197
- let i = e(t).reduce((e, t) => {
198
- let i = n.find((e) => z(t, e));
199
- return t.correctness = (i && t.type === "point" && r ? h(t, i) : i) ? "correct" : "incorrect", i && (t.correctnesslabel = B(t, i), t.correctlabel = i.label ? i.label : "", t.label = t.label ? t.label : ""), [...e, t];
200
- }, []), a = e(n).reduce((e, n) => t.find((e) => z(n, e)) ? e : [...e, {
201
- ...n,
182
+ }, B = (e, t) => !!(e && t && e.type === t.type && N[e.type] && N[e.type](e, t)), V = (e, t) => e.label === t.label ? "correct" : "incorrect", H = ({ sessionAnswers: t, marks: n, withPointLabel: r = !1 }) => {
183
+ let i = t || [], a = n || [], o = e(i).reduce((e, t) => {
184
+ let n = a.find((e) => B(t, e)), i = (n && t.type === "point" && r ? g(t, n) : n) ? "correct" : "incorrect", o = Object.assign(t, { correctness: i });
185
+ return n && (o.correctnesslabel = V(o, n), o.correctlabel = n.label ? n.label : "", o.label = o.label ? o.label : ""), [...e, o];
186
+ }, []), s = e(a).reduce((e, t) => i.find((e) => B(t, e)) ? e : [...e, {
187
+ ...t,
202
188
  correctness: "missing"
203
189
  }], []);
204
- return [...i, ...a];
205
- }, H = ({ scoringType: e, env: t }) => {
206
- let n = e;
207
- return e && (n = e === "partial scoring"), P.enabled({ partialScoring: n }, t);
208
- }, U = (t, n, r = {}) => {
209
- let { answers: i = {}, scoringType: o } = t || {}, { answer: s } = n || {};
190
+ return [...o, ...s];
191
+ }, U = ({ scoringType: e, env: t }) => {
192
+ let n;
193
+ return e && (n = e === "partial scoring"), F.enabled({ partialScoring: n }, t);
194
+ }, W = (t, n, r = {}) => {
195
+ let i = t?.answers ?? {}, o = t?.scoringType, { answer: s } = n || {};
210
196
  Object.entries(i || {}).forEach(([e, t]) => i[e] = {
211
197
  ...t,
212
198
  marks: t?.marks.filter((e) => !e.building)
213
- }), s ||= [], s = s.filter((e) => !e.building), i = a(i) ? { correctAnswer: L() } : {
199
+ });
200
+ let c = s || [];
201
+ c = c.filter((e) => !e.building);
202
+ let u;
203
+ u = a(i) ? { correctAnswer: R() } : {
214
204
  correctAnswer: i.correctAnswer,
215
- ...v(i)
205
+ ...y(i)
216
206
  };
217
- let c = H({
207
+ let d = U({
218
208
  scoringType: o,
219
209
  env: r
220
- }), u = l(s, z);
221
- return Object.entries(i).reduce((e, t) => {
210
+ }), f = l(c, B);
211
+ return Object.entries(u).reduce((e, t) => {
222
212
  let n = t[0], { marks: r } = t[1] || {};
223
213
  if (!r || !r.length) return e;
224
- let i = V({
225
- sessionAnswers: u,
214
+ let i = H({
215
+ sessionAnswers: f,
226
216
  marks: r
227
- }), a = V({
228
- sessionAnswers: u,
217
+ }), a = H({
218
+ sessionAnswers: f,
229
219
  marks: r,
230
220
  withPointLabel: !0
231
- }), o = a.filter((e) => e.correctness === "correct"), s = a.filter((e) => e.correctness !== "missing"), l = r.length, d = o.length;
232
- return s.length > l && (d -= s.length - l), d < 0 && (d = 0), (d / l > e.bestScore || !e.foundOneSolution) && (c ? e.bestScore = parseFloat((d / l).toFixed(2)) : e.bestScore = Math.floor(d / l), e.bestScoreAnswerKey = n, e.answersCorrected = i, e.foundOneSolution = !0), e;
221
+ }), o = a.filter((e) => e.correctness === "correct"), s = a.filter((e) => e.correctness !== "missing"), c = r.length, l = o.length;
222
+ return s.length > c && (l -= s.length - c), l < 0 && (l = 0), (l / c > e.bestScore || !e.foundOneSolution) && (d ? e.bestScore = parseFloat((l / c).toFixed(2)) : e.bestScore = Math.floor(l / c), e.bestScoreAnswerKey = n, e.answersCorrected = i, e.foundOneSolution = !0), e;
233
223
  }, {
234
224
  bestScore: 0,
235
225
  bestScoreAnswerKey: null,
236
- answersCorrected: e(u).map((e) => ({
226
+ answersCorrected: e(f).map((e) => ({
237
227
  ...e,
238
228
  correctness: "incorrect"
239
229
  })),
240
230
  foundOneSolution: !1
241
231
  });
242
- }, W = (e) => ({
232
+ }, G = (e) => ({
243
233
  ...p,
244
234
  ...e
245
235
  });
246
- function G(e, t, n) {
236
+ function K(e, t, n) {
247
237
  return new Promise((r) => {
248
- let i = W(e);
238
+ let i = G(e);
249
239
  t ??= {};
250
- let { defaultTool: o, extraCSSRules: s, prompt: c, promptEnabled: l, graph: u, answers: d, toolbarTools: f, ...p } = i || {}, { arrows: m } = i, { mode: h, role: g } = n || {};
240
+ let { defaultTool: o, extraCSSRules: s, prompt: c, promptEnabled: l, graph: u, answers: d, toolbarTools: f, ...p } = i, { arrows: m } = i, h = n?.mode, g = n?.role;
251
241
  typeof m == "boolean" && (m = m ? {
252
242
  left: !0,
253
243
  right: !0,
@@ -275,24 +265,24 @@ function G(e, t, n) {
275
265
  extraCSSRules: s
276
266
  };
277
267
  if (g === "instructor" && (h === "view" || h === "evaluate")) {
278
- let { rationale: e, rationaleEnabled: t, teacherInstructions: n, teacherInstructionsEnabled: r } = i || {};
268
+ let { rationale: e, rationaleEnabled: t, teacherInstructions: n, teacherInstructionsEnabled: r } = i;
279
269
  y.rationale = t ? e : null, y.teacherInstructions = r ? n : null;
280
270
  }
281
271
  if (h === "evaluate") if (!a(d) && d.correctAnswer && d.correctAnswer.marks && !a(d.correctAnswer.marks)) {
282
- let { answersCorrected: e, bestScoreAnswerKey: r, bestScore: a } = U(i, t, n);
283
- y.answersCorrected = e.sort((e, t) => R[e.correctness] - R[t.correctness]), y.correctResponse = r ? (d[r] || {}).marks : [], y.showToggle = y.showToggle && a !== 1;
272
+ let { answersCorrected: e, bestScoreAnswerKey: r, bestScore: a } = W(i, t, n);
273
+ y.answersCorrected = e.sort((e, t) => z[e.correctness] - z[t.correctness]), y.correctResponse = r ? (d[r] || {}).marks : [], y.showToggle = y.showToggle && a !== 1;
284
274
  } else y.answersCorrected = t && t.answer || [], y.correctResponse = [];
285
- I("base: ", y), r(y);
275
+ L("base: ", y), r(y);
286
276
  });
287
277
  }
288
- var K = (e, t, n) => {
289
- let r = [], { answers: i = {}, scoringType: a } = e || {}, o = t && t.answer || [];
278
+ var q = (e, t, n) => {
279
+ let r = [], i = e?.answers ?? {}, a = e?.scoringType, o = t && t.answer || [];
290
280
  if (!o.length) return ["Student did not interact with the graph."];
291
281
  r.push(`Student added ${o.length} object(s) to the graph.`);
292
- let s = H({
282
+ let s = U({
293
283
  scoringType: a,
294
284
  env: n
295
- }), { answersCorrected: c, bestScore: l, bestScoreAnswerKey: u } = U(e, t, n), d = u && i[u] && i[u].marks || [], f = 0, p = 0, m = 0;
285
+ }), { answersCorrected: c, bestScore: l, bestScoreAnswerKey: u } = W(e, t, n), d = u && i[u] && i[u].marks || [], f = 0, p = 0, m = 0;
296
286
  for (let e = 0; e < c.length; e++) {
297
287
  let t = c[e].correctness;
298
288
  t === "correct" ? f++ : t === "incorrect" ? p++ : t === "missing" && m++;
@@ -306,7 +296,7 @@ var K = (e, t, n) => {
306
296
  }
307
297
  return s ? r.push("Score calculated using partial scoring.") : r.push("Score calculated using all-or-nothing scoring."), r.push(`Final score: ${l}.`), r;
308
298
  };
309
- function q(e, t, n = {}) {
299
+ function J(e, t, n = {}) {
310
300
  return new Promise((r) => {
311
301
  (!t || a(t)) && r({
312
302
  score: 0,
@@ -317,15 +307,15 @@ function q(e, t, n = {}) {
317
307
  empty: !0,
318
308
  logTrace: ["Student did not interact with the graph."]
319
309
  });
320
- let { bestScore: i } = U(e, t, n);
310
+ let { bestScore: i } = W(e, t, n);
321
311
  r({
322
312
  score: i,
323
313
  empty: !1,
324
- logTrace: K(e, t, n)
314
+ logTrace: q(e, t, n)
325
315
  });
326
316
  });
327
317
  }
328
- var J = (e, t) => new Promise((n) => {
318
+ var Y = (e, t) => new Promise((n) => {
329
319
  if (t.mode !== "evaluate" && t.role === "instructor") {
330
320
  let { answers: t } = e || {}, r = [];
331
321
  t && Object.values(t) && (r = (t.correctAnswer || Object.values(t)[0] || {}).marks || []), n({
@@ -333,14 +323,14 @@ var J = (e, t) => new Promise((n) => {
333
323
  id: "1"
334
324
  });
335
325
  } else n(null);
336
- }), Y = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), X = (e = {}, t = {}) => {
326
+ }), X = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), Z = (e = {}, t = {}) => {
337
327
  let { answers: n, toolbarTools: r } = e, i = {}, o = {};
338
328
  return (r || []).filter((e) => e !== "label").length || (i.toolbarToolsError = "There should be at least 1 tool defined."), [
339
329
  "teacherInstructions",
340
330
  "prompt",
341
331
  "rationale"
342
332
  ].forEach((n) => {
343
- t[n]?.required && !Y(e[n]) && (i[n] = "This field is required.");
333
+ t[n]?.required && !X(e[n]) && (i[n] = "This field is required.");
344
334
  }), Object.entries(n || {}).forEach(([e, t]) => {
345
335
  t.marks.length || (o[e] = "At least 1 graph object should be defined."), t.marks.length > 0 && t.marks.forEach((t) => {
346
336
  t.building && (o[e] = "At least 1 graph object is not correctly defined.");
@@ -348,6 +338,6 @@ var J = (e, t) => new Promise((n) => {
348
338
  }), a(o) || (i.correctAnswerErrors = o), i;
349
339
  };
350
340
  //#endregion
351
- export { B as comparLabelMarks, z as compareMarks, J as createCorrectResponseSession, V as getAnswerCorrected, U as getBestAnswer, K as getLogTrace, G as model, W as normalize, q as outcome, X as validate };
341
+ export { V as comparLabelMarks, B as compareMarks, Y as createCorrectResponseSession, H as getAnswerCorrected, W as getBestAnswer, q as getLogTrace, K as model, G as normalize, J as outcome, Z as validate };
352
342
 
353
343
  //# sourceMappingURL=index.js.map