@pie-element/graphing 10.1.2-next.5 → 10.1.2-next.7

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.
@@ -1,4 +1,4 @@
1
- import { D as e, E as t, R as n, b as r, f as i, i as a, l as o, p as s, r as c, s as l, u, w as d } from "../dist-B7TYAggd.js";
1
+ import { D as e, E as t, R as n, b as r, f as i, i as a, l as o, p as s, r as c, s as l, u, w as d } from "../dist-Bqo4KUUX.js";
2
2
  //#region src/controller/defaults.ts
3
3
  var f = /* @__PURE__ */ n(u(), 1), p = {
4
4
  answers: { correctAnswer: {
@@ -149,7 +149,7 @@ var f = /* @__PURE__ */ n(u(), 1), p = {
149
149
  }, j = (e, t) => {
150
150
  let { edge: n } = e, { edge: r } = t, { root: i } = e, { root: a } = t;
151
151
  i = { ...i }, a = { ...a };
152
- let c = n || { ...i }, l = r || { ...a }, { a1: u, b1: d } = o(i, c), { a2: f, b2: p } = o(a, l);
152
+ let c = n || { ...i }, l = r || { ...a }, { a: u, b: d } = o(i, c), { a: f, b: p } = o(a, l);
153
153
  return s(f, u) && s(p, d);
154
154
  }, M = {
155
155
  circle: (e, t) => D(e, t),
@@ -172,7 +172,7 @@ var f = /* @__PURE__ */ n(u(), 1), p = {
172
172
  return t || N(n, Symbol.toStringTag, { value: "Module" }), n;
173
173
  })({ enabled: () => F });
174
174
  function F(e, t, n) {
175
- return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == "boolean" ? n : !0;
175
+ return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n != "boolean" || n;
176
176
  }
177
177
  //#endregion
178
178
  //#region src/controller/index.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/controller/defaults.ts","../../../src/controller/utils.ts","../../../../../shared/controller-utils/dist/index.js","../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\n// TODO: This is lifted from @pie-lib/graphing, however importing this will break a controller build because it has jsx source in that package.\nconst allTools = [\n 'circle',\n 'line',\n 'label',\n 'parabola',\n 'point',\n 'polygon',\n 'ray',\n 'segment',\n 'sine',\n 'vector',\n // 'absolute', // - not available as default\n // 'exponential', // - not available as default\n];\n\n/* model defaults */\nexport default {\n answers: {\n correctAnswer: {\n name: 'Correct Answer',\n marks: [],\n },\n },\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n backgroundMarks: [],\n coordinatesOnHover: false,\n defaultGridConfiguration: 0,\n domain: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'x',\n },\n graph: { width: 500, height: 500 },\n includeAxes: true,\n labels: {},\n labelsEnabled: true,\n padding: true,\n prompt: '',\n promptEnabled: true,\n range: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'y',\n },\n rationale: '',\n rationaleEnabled: true,\n standardGrid: false,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\n titleEnabled: true,\n toolbarTools: allTools,\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { differenceWith, isEqual, uniq, uniqWith } from '@pie-element/shared-lodash';\nimport {\n getAmplitudeAndFreq,\n pointsToABC,\n pointsToAForAbsolute,\n pointsToABForExponential,\n} from '@pie-lib/graphing-utils';\n\nexport const equalPoint = (A, B) => {\n A = { ...A };\n B = { ...B };\n\n return isEqual(A.x, B.x) && isEqual(A.y, B.y);\n};\n\nexport const equalPointWithLabel = (A, B) => {\n // x1 = x2 & y1 = y2\n // A point is only correct if both its position AND its label match.\n // Labels are not scored independently; a point in the correct position\n // with the wrong label is considered incorrect as a whole.\n let equalLabel = true;\n\n A = { ...A };\n B = { ...B };\n\n if (A.label || B.label) {\n equalLabel = isEqual(A.label, B.label);\n }\n\n return isEqual(A.x, B.x) && isEqual(A.y, B.y) && equalLabel;\n};\n\nexport const equalSegment = (segment1, segment2) => {\n // A.from = B.from, A.to = B.to OR A.from = B.to, A.to = B.from\n // x1 = x3 & y1 = y3 & x2 = x4 & y2 = y4\n return (\n (isEqual(segment1.from, segment2.from) && isEqual(segment1.to, segment2.to)) ||\n (isEqual(segment1.to, segment2.from) && isEqual(segment1.from, segment2.to))\n );\n};\n\nexport const equalVector = (vector1, vector2) => {\n // A.from = B.from, A.to = B.to;\n // x1 = x3 & y1 = y3 & x2 = x4 & y2 = y4\n return isEqual(vector1.from, vector2.from) && isEqual(vector1.to, vector2.to);\n};\n\n// this function is implemented in configure as well\nexport const sortedAnswers = (answers) =>\n Object.keys(answers || {})\n .sort()\n .reduce((result, key) => {\n if (key !== 'correctAnswer') {\n result[key] = answers[key];\n }\n\n return result;\n }, {});\n\nconst returnLineEquationCoefficients = (line) => {\n line = { ...line, to: { ...line.to }, from: { ...line.from } };\n\n const xA = line.from.x;\n const yA = line.from.y;\n const xB = line.to.x;\n const yB = line.to.y;\n\n return {\n a: yB - yA,\n b: xA - xB,\n c: xB * yA - xA * yB,\n };\n};\n\nconst getSignificantDecimals = (number) => Math.round(number * 10000) / 10000;\n\nexport const equalLine = (line1, line2) => {\n // line equation: ax + by + c = 0\n // 2 lines are equal if a1/a2 = b1/b2 = c1/c2, where a, b, c are the coefficients in line equation\n\n // line equation knowing 2 points: (y - yA) / (yB - yA) = (x - xA) / (xB - xA)\n // extending this equation, we get: x * (yB - yA) + y * (xA - xB) + (xB * yA - xA * yB) = 0\n // where a = yB - yA; b = xA - xB; c = xB * yA - xA * yB\n\n const { a: a1, b: b1, c: c1 } = returnLineEquationCoefficients(line1);\n const { a: a2, b: b2, c: c2 } = returnLineEquationCoefficients(line2);\n\n const proportions = [];\n\n if (a2 !== 0) {\n proportions.push(getSignificantDecimals(a1 / a2));\n } else if (a1 !== a2) {\n return false;\n }\n\n if (b2 !== 0) {\n proportions.push(getSignificantDecimals(b1 / b2));\n } else if (b1 !== b2) {\n return false;\n }\n\n if (c2 !== 0) {\n proportions.push(getSignificantDecimals(c1 / c2));\n } else if (c1 !== c2) {\n return false;\n }\n\n return uniq(proportions).length === 1;\n\n // (y2 - y1)/(x2 - x1) = (y4 - y3)/(x4 - x3);\n // return ((Math.abs((line1.to.y - line1.from.y) / (line1.to.x - line1.from.x))) === (Math.abs((line2.to.y - line2.from.y) / (line2.to.x - line2.from.x))));\n};\n\nexport const equalRay = (ray1, ray2) => {\n ray1 = { ...ray1, to: { ...ray1.to }, from: { ...ray1.from } };\n ray2 = { ...ray2, to: { ...ray2.to }, from: { ...ray2.from } };\n\n // slope: m = (y2-y1)/(x2-x1)\n // slope & x1 = x3 & y1 = y3 & angle between (x1, y1) (x2, y2) is same as angle between (x3, y3) (x4, y4)\n const mRay1 = (ray1.to.y - ray1.from.y) / (ray1.to.x - ray1.from.x);\n const mRay2 = (ray2.to.y - ray2.from.y) / (ray2.to.x - ray2.from.x);\n const angleRay1 = (Math.atan2(ray1.to.y - ray1.from.y, ray1.to.x - ray1.from.x) * 180) / Math.PI;\n const angleRay2 = (Math.atan2(ray2.to.y - ray2.from.y, ray2.to.x - ray2.from.x) * 180) / Math.PI;\n\n return mRay1 === mRay2 && ray1.from.x === ray2.from.x && ray1.from.y === ray2.from.y && angleRay1 === angleRay2;\n};\n\nexport const constructSegmentsFromPoints = (points) => {\n // takes the list of points that represent a polygon and transforms it into a list of segments; eg.:\n // points: A, B, C, D => segments: AB, BC, CD, DA\n return (points || []).map((point, index) => ({ from: point, to: points[(index + 1) % points.length] }));\n};\n\nexport const removeDuplicateSegments = (segments) => {\n segments = segments || [];\n // removes segments that are duplicates; eg. These segments are the same, so one will be removed:\n // segment1: from: { x: 1, y: 1 }, to: { x: 2, y: 1 }\n // segment2: from: { x: 2, y: 1 }, to: { x: 1, y: 1 }\n return uniqWith(segments, (s1, s2) => equalSegment(s1, s2));\n};\n\nexport const removeInvalidSegments = (segments) => {\n segments = segments || [];\n // removes segments that start in a point and end in the same point (eg.: from: { x: 1, y: 1 }, to: { x: 1, y: 1 })\n\n return segments.filter((segment) => !isEqual(segment.from, segment.to));\n};\n\nexport const equalPolygon = (poly1, poly2) => {\n const { points: points1 } = poly1;\n const { points: points2 } = poly2;\n\n // generate segments\n const segments1 = constructSegmentsFromPoints(points1);\n const segments2 = constructSegmentsFromPoints(points2);\n\n const segments1NoDuplicates = removeDuplicateSegments(removeInvalidSegments(segments1));\n const segments2NoDuplicates = removeDuplicateSegments(removeInvalidSegments(segments2));\n\n const differentSegments1 = differenceWith(segments1NoDuplicates, segments2NoDuplicates, equalSegment);\n const differentSegments2 = differenceWith(segments2NoDuplicates, segments1NoDuplicates, equalSegment);\n\n return (!differentSegments1 || !differentSegments1.length) && (!differentSegments2 || !differentSegments2.length);\n};\n\nexport const equalCircle = (c1, c2) => {\n c1 = { ...c1, root: { ...c1.root }, edge: { ...c1.edge } };\n c2 = { ...c2, root: { ...c2.root }, edge: { ...c2.edge } };\n const equalRootAndEdge = isEqual(c2.edge, c1.edge) && isEqual(c2.root, c1.root);\n\n // if both edge and root are the same, it means the shapes are exactly the same\n if (equalRootAndEdge) return true;\n\n const rC1 = Math.sqrt((c1.edge.x - c1.root.x) ** 2 + (c1.edge.y - c1.root.y) ** 2);\n const rC2 = Math.sqrt((c2.edge.x - c2.root.x) ** 2 + (c2.edge.y - c2.root.y) ** 2);\n\n // if both root and radius are the same, it means the shapes are equal\n return isEqual(c2.root, c1.root) && isEqual(rC1, rC2);\n};\n\nexport const equalSine = (sine1, sine2) => {\n const getPoints = ({ root, edge }) => {\n root = { ...root };\n edge = { ...edge };\n\n const { amplitude, freq } = getAmplitudeAndFreq(root, edge);\n // the height of the sine wave\n const tY = Math.abs(root.y - edge.y) * 2;\n // the distance on x axis between edge and root\n const tXRoot = Math.abs(root.x - edge.x);\n // the distance on x axis between 2 edges for sine wave (min & max)\n const tX = tXRoot * 2;\n // the first edge placed east side of root\n let edgeAboveZeroX = edge.x;\n let edgeAboveZeroY = edge.y;\n\n // if edge less then 0, find out the appropriate edge placed east side of zero (0)\n while (edgeAboveZeroX < 0 && tX !== 0) {\n edgeAboveZeroX = edgeAboveZeroX + tX;\n edgeAboveZeroY = edgeAboveZeroY < root.y ? edgeAboveZeroY + tY : edgeAboveZeroY - tY;\n }\n\n // if edge more then 0, find out the appropriate edge placed east side of zero (0)\n while (edgeAboveZeroX - tX > 0 && tX !== 0) {\n edgeAboveZeroX = edgeAboveZeroX - tX;\n edgeAboveZeroY = edgeAboveZeroY < root.y ? edgeAboveZeroY + tY : edgeAboveZeroY - tY;\n }\n\n return {\n amplitude: getSignificantDecimals(amplitude),\n freq: getSignificantDecimals(freq),\n min: getSignificantDecimals(edge.y < root.y ? edge.y : edge.y - tY),\n max: getSignificantDecimals(edge.y < root.y ? edge.y + tY : edge.y),\n edgeAboveZeroX: getSignificantDecimals(edgeAboveZeroX),\n edgeAboveZeroY: getSignificantDecimals(edgeAboveZeroY),\n };\n };\n\n const studentAnswerBpY = getPoints(sine1);\n const correctAnswerBpY = getPoints(sine2);\n\n const {\n amplitude: amplitude1,\n freq: freq1,\n min: min1,\n max: max1,\n edgeAboveZeroX: edgeAboveZeroX1,\n edgeAboveZeroY: edgeAboveZeroY1,\n } = studentAnswerBpY;\n const {\n amplitude: amplitude2,\n freq: freq2,\n min: min2,\n max: max2,\n edgeAboveZeroX: edgeAboveZeroX2,\n edgeAboveZeroY: edgeAboveZeroY2,\n } = correctAnswerBpY;\n\n return (\n Math.abs(amplitude1) === Math.abs(amplitude2) &&\n Math.abs(freq1) === Math.abs(freq2) &&\n min1 === min2 &&\n max1 === max2 &&\n edgeAboveZeroX1 === edgeAboveZeroX2 &&\n edgeAboveZeroY1 === edgeAboveZeroY2\n );\n // rootDiff1 === rootDiff2);\n};\n\nexport const equalParabola = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const p1mirrorEdge = { x: rootP1.x - (p1edge.x - rootP1.x), y: p1edge.y };\n const p2mirrorEdge = { x: rootP2.x - (p2edge.x - rootP2.x), y: p2edge.y };\n\n if (!edgeP1 || !edgeP2) return false;\n\n const { a: a1, b: b1, c: c1 } = pointsToABC(rootP1, edgeP1, p1mirrorEdge);\n const { a: a2, b: b2, c: c2 } = pointsToABC(rootP2, edgeP2, p2mirrorEdge);\n\n // sometimes numbers have this form: 1.00000000002 because of calculations, we have to round them\n const round = (number) => Math.round(number * 10000) / 10000;\n\n return round(a1) === round(a2) && round(b1) === round(b2) && round(c1) === round(c2);\n};\n\n/*\n * Function to check if given two points for absolute function\n * for correct answer and student answer are equal or not.\n * @param p1 - student answer\n * @param p2 - correct answer\n * */\nexport const equalAbsolute = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const p1a1 = pointsToAForAbsolute(rootP1, p1edge);\n const p2a2 = pointsToAForAbsolute(rootP2, p2edge);\n\n // if both root and a value are equal\n return isEqual(rootP2, rootP1) && isEqual(p2a2, p1a1);\n};\n\n/*\n * Function to check if given two points for exponential function\n * for correct answer and student answer are equal or not.\n * @param p1 - student answer\n * @param p2 - correct answer\n * */\nexport const equalExponential = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const { a1, b1 } = pointsToABForExponential(rootP1, p1edge);\n const { a2, b2 } = pointsToABForExponential(rootP2, p2edge);\n\n // if both a and b value are equal\n return isEqual(a2, a1) && isEqual(b2, b1);\n};\n\nexport const equalMarks = {\n circle: (sessAnswer, mark) => equalCircle(sessAnswer, mark),\n line: (sessAnswer, mark) => equalLine(sessAnswer, mark),\n parabola: (sessAnswer, mark) => equalParabola(sessAnswer, mark),\n absolute: (sessAnswer, mark) => equalAbsolute(sessAnswer, mark),\n exponential: (sessAnswer, mark) => equalExponential(sessAnswer, mark),\n point: (sessAnswer, mark) => equalPoint(sessAnswer, mark),\n polygon: (sessAnswer, poly) => equalPolygon(sessAnswer, poly),\n ray: (sessAnswer, mark) => equalRay(sessAnswer, mark),\n segment: (sessAnswer, mark) => equalSegment(sessAnswer, mark),\n sine: (sessAnswer, mark) => equalSine(sessAnswer, mark),\n vector: (sessAnswer, mark) => equalVector(sessAnswer, mark),\n};\n\nconst completePoint = (point) => point && Number.isFinite(point.x) && Number.isFinite(point.y);\nconst completeFromTo = (item) => item && completeMark.point(item.from) && completeMark.point(item.to);\nconst completeRootEdge = (item) => item && completeMark.point(item.edge) && completeMark.point(item.root);\nconst completePoints = (item) =>\n item &&\n item.points &&\n item.points.length &&\n (item.points.filter((point) => completePoint(point)) || []).length === item.points.length;\n\nconst completeMark = {\n point: completePoint,\n line: completeFromTo,\n ray: completeFromTo,\n segment: completeFromTo,\n vector: completeFromTo,\n circle: completeRootEdge,\n parabola: completeRootEdge,\n absolute: completeRootEdge,\n exponential: completeRootEdge,\n sine: completeRootEdge,\n polygon: completePoints,\n};\n","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\n//#region src/persistence.ts\nfunction n(e) {\n\treturn Array.isArray(e) ? e.filter((e) => e != null) : [];\n}\nfunction r(e) {\n\tlet t = [...e];\n\tfor (let e = t.length - 1; e > 0; e--) {\n\t\tlet n = Math.floor(Math.random() * (e + 1));\n\t\t[t[e], t[n]] = [t[n], t[e]];\n\t}\n\treturn t;\n}\nfunction i(e) {\n\treturn e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == \"object\" ? Object.keys(e).length === 0 : !1;\n}\nasync function a(e, t, a, o = \"value\") {\n\tlet s = n(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);\n\tif (!t) {\n\t\tconsole.warn(\"Unable to save shuffled choices because there's no session.\");\n\t\treturn;\n\t}\n\tif (!i(s)) return n(s.map((t) => e.find((e) => e[o] === t)));\n\tlet c = r(e);\n\tif (a && typeof a == \"function\") try {\n\t\tlet e = n(c.map((e) => e[o]));\n\t\ti(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(c)}, key: ${o}`) : t.id && t.element && await a(t.id, t.element, { shuffledValues: e });\n\t} catch (e) {\n\t\tconsole.warn(\"Unable to save shuffled order for choices\"), console.error(e);\n\t}\n\telse console.warn(\"Unable to save shuffled choices, shuffle will happen every time.\");\n\treturn c;\n}\nfunction o(e, t, n) {\n\treturn !!(e.lockChoiceOrder || n[\"@pie-element\"]?.lockChoiceOrder || (n.role ?? \"student\") === \"instructor\");\n}\n//#endregion\n//#region src/partial-scoring.ts\nvar s = /* @__PURE__ */ t({ enabled: () => c });\nfunction c(e, t, n) {\n\treturn e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == \"boolean\" ? n : !0;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport debug from 'debug';\n\nimport { cloneDeep, isEmpty, uniqWith } from '@pie-element/shared-lodash';\nimport defaults from './defaults.js';\nimport { equalMarks, equalPointWithLabel, sortedAnswers } from './utils.js';\n\nimport { partialScoring } from '@pie-element/shared-controller-utils';\n\nconst log = debug('@pie-element:graphing:controller');\n\nconst initializeGraphMap = () => ({\n point: [],\n segment: [],\n line: [],\n ray: [],\n vector: [],\n polygon: [],\n circle: [],\n sine: [],\n parabola: [],\n absolute: [],\n exponential: [],\n});\n\nconst graphObjectsOrder = {\n incorrect: 0,\n correct: 1,\n missing: 2,\n};\n\nexport const compareMarks = (mark1, mark2) => {\n // marks can be compared with equalMarks[type] function only if they have the same type;\n // if type is different, they are clearly not equal\n return !!(\n mark1 &&\n mark2 &&\n mark1.type === mark2.type &&\n equalMarks[mark1.type] &&\n equalMarks[mark1.type](mark1, mark2)\n );\n};\n\nexport const comparLabelMarks = (mark1, mark2) => {\n return mark1.label === mark2.label ? 'correct' : 'incorrect';\n};\n\nexport const getAnswerCorrected = ({ sessionAnswers, marks: correctAnswers, withPointLabel = false }) => {\n sessionAnswers = sessionAnswers || [];\n correctAnswers = correctAnswers || [];\n\n const rez = cloneDeep(sessionAnswers).reduce((correctedAnswer, answer) => {\n const answerIsCorrect = correctAnswers.find((mark) => compareMarks(answer, mark));\n\n // For scoring points, check if both position AND label match\n const isCorrectForScoring = answerIsCorrect && answer.type === 'point' && withPointLabel \n ? equalPointWithLabel(answer, answerIsCorrect)\n : !!answerIsCorrect;\n\n answer.correctness = isCorrectForScoring ? 'correct' : 'incorrect';\n if (answerIsCorrect) {\n answer.correctnesslabel = comparLabelMarks(answer, answerIsCorrect);\n answer.correctlabel = answerIsCorrect.label ? answerIsCorrect.label : '';\n answer.label = answer.label ? answer.label : '';\n }\n return [...correctedAnswer, answer];\n }, []);\n\n // add missing objects from correct answer\n const missingAnswers = cloneDeep(correctAnswers).reduce((correctedAnswer, answer) => {\n const answerIndex = sessionAnswers.find((mark) => compareMarks(answer, mark));\n\n if (!answerIndex) {\n // means that corrected answer is missing from session, so we mark it as missing object\n return [...correctedAnswer, { ...answer, correctness: 'missing' }];\n }\n\n return correctedAnswer;\n }, []);\n\n return [...rez, ...missingAnswers];\n};\n\nconst getPartialScoring = ({ scoringType, env }) => {\n let pS = scoringType;\n\n // if scoringType is undefined, partialScoring should be considered undefined (not set)\n // because partialScoring.enabled is using that information\n // if it has a value, we check if it is partial scoring or dichotomous\n if (scoringType) {\n pS = scoringType === 'partial scoring';\n }\n\n return partialScoring.enabled({ partialScoring: pS }, env);\n};\n\nexport const getBestAnswer = (question, session, env = {}) => {\n // questionPossibleAnswers contains all possible answers (correct response and alternates);\n let { answers: questionPossibleAnswers = {}, scoringType } = question || {};\n let { answer } = session || {};\n\n // filter the incomplete objects\n Object.entries(questionPossibleAnswers || {}).forEach(\n ([key, value]) =>\n (questionPossibleAnswers[key] = { ...value, marks: value?.marks.filter((mark) => !mark.building) }),\n );\n\n // initialize answer if no values\n answer = answer || [];\n\n //filter the incomplete objects for student response - Fix for SC-33160\n answer = answer.filter((mark) => !mark.building);\n\n // initialize one possible answer if no values\n if (isEmpty(questionPossibleAnswers)) {\n questionPossibleAnswers = { correctAnswer: initializeGraphMap() };\n } else {\n questionPossibleAnswers = {\n correctAnswer: questionPossibleAnswers.correctAnswer,\n ...sortedAnswers(questionPossibleAnswers),\n };\n }\n\n const partialScoringEnabled = getPartialScoring({ scoringType, env });\n\n // student's answers without DUPLICATES\n const sessionAnswers = uniqWith(answer, compareMarks);\n // array of possible answers entries\n const possibleAnswers = Object.entries(questionPossibleAnswers);\n\n return possibleAnswers.reduce(\n (acc, entry) => {\n // iterating each possible answer (main + alternates)\n const possibleAnswerKey = entry[0];\n const possibleAnswer = entry[1] || {};\n let { marks } = possibleAnswer;\n\n if (!marks || !marks.length) {\n return acc;\n }\n\n // returns array of marks, each having 'correctness' property\n const correctedAnswer = getAnswerCorrected({ sessionAnswers, marks });\n const correctedAnswerWithLabels = getAnswerCorrected({ sessionAnswers, marks, withPointLabel: true });\n const correctMarks = correctedAnswerWithLabels.filter((answer) => answer.correctness === 'correct');\n // filter out missing objects because they do not affect the calculation of the score\n // only correct and incorrect are needed\n const scoredCorrectedAnswer = correctedAnswerWithLabels.filter((answer) => answer.correctness !== 'missing');\n\n const maxScore = marks.length;\n let score = correctMarks.length;\n\n // if extra placements\n if (scoredCorrectedAnswer.length > maxScore) {\n score -= scoredCorrectedAnswer.length - maxScore;\n }\n\n if (score < 0) {\n score = 0;\n }\n\n if (score / maxScore > acc.bestScore || !acc.foundOneSolution) {\n if (partialScoringEnabled) {\n acc.bestScore = parseFloat((score / maxScore).toFixed(2));\n } else {\n acc.bestScore = Math.floor(score / maxScore);\n }\n\n acc.bestScoreAnswerKey = possibleAnswerKey;\n acc.answersCorrected = correctedAnswer;\n acc.foundOneSolution = true;\n }\n\n return acc;\n },\n {\n bestScore: 0,\n bestScoreAnswerKey: null,\n // initially we just suppose all the answers are incorrect\n answersCorrected: cloneDeep(sessionAnswers).map((answer) => ({ ...answer, correctness: 'incorrect' })),\n foundOneSolution: false,\n },\n );\n};\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport function model(question, session, env) {\n return new Promise((resolve) => {\n const normalizedQuestion = normalize(question);\n\n // added a sanity check for session for environments where it is not passed initially (ex. pie-website)\n if (session === undefined || session === null) {\n session = {};\n }\n // console.log('normalizedQuestion', normalizedQuestion);\n const { defaultTool, extraCSSRules, prompt, promptEnabled, graph, answers, toolbarTools, ...questionProps } =\n normalizedQuestion || {};\n let { arrows } = normalizedQuestion;\n const { mode, role } = env || {};\n\n // This is used for offering support for old models which have the property arrows: boolean\n // Same thing is set in authoring : packages/graphing/configure/src/configure.jsx - componentDidMount\n if (typeof arrows === 'boolean') {\n if (arrows) {\n arrows = {\n left: true,\n right: true,\n up: true,\n down: true,\n };\n } else {\n arrows = {\n left: false,\n right: false,\n up: false,\n down: false,\n };\n }\n }\n\n // added support for models without defaultTool defined; also used in packages/graphing/configure/src/index.js\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n const normalizedDefaultTool = defaultTool || (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n\n const base = {\n ...questionProps,\n answers,\n arrows,\n defaultTool: normalizedDefaultTool,\n disabled: env.mode !== 'gather',\n prompt: promptEnabled ? prompt : null,\n rationale: null,\n size: graph,\n showKeyLegend: env.mode === 'evaluate',\n showToggle:\n env.mode === 'evaluate' &&\n !isEmpty(answers) &&\n answers.correctAnswer &&\n answers.correctAnswer.marks &&\n !isEmpty(answers.correctAnswer.marks),\n teacherInstructions: null,\n toolbarTools,\n extraCSSRules,\n };\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n const { rationale, rationaleEnabled, teacherInstructions, teacherInstructionsEnabled } = normalizedQuestion || {};\n\n base.rationale = rationaleEnabled ? rationale : null;\n base.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n }\n\n if (mode === 'evaluate') {\n if (\n !isEmpty(answers) &&\n answers.correctAnswer &&\n answers.correctAnswer.marks &&\n !isEmpty(answers.correctAnswer.marks)\n ) {\n const { answersCorrected, bestScoreAnswerKey, bestScore } = getBestAnswer(normalizedQuestion, session, env);\n // array of marks from session with 'correctness' property set\n base.answersCorrected = answersCorrected.sort(\n (a, b) => graphObjectsOrder[a.correctness] - graphObjectsOrder[b.correctness],\n );\n base.correctResponse = bestScoreAnswerKey ? (answers[bestScoreAnswerKey] || {}).marks : [];\n base.showToggle = base.showToggle && bestScore !== 1;\n } else {\n base.answersCorrected = (session && session.answer) || [];\n base.correctResponse = [];\n }\n }\n\n log('base: ', base);\n resolve(base);\n });\n}\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n const { answers = {}, scoringType } = question || {};\n const studentMarks = (session && session.answer) || [];\n\n if (!studentMarks.length) {\n return ['Student did not interact with the graph.'];\n }\n\n traceLog.push(`Student added ${studentMarks.length} object(s) to the graph.`);\n\n const partialScoringEnabled = getPartialScoring({ scoringType, env });\n\n const {\n answersCorrected,\n bestScore,\n bestScoreAnswerKey,\n } = getBestAnswer(question, session, env);\n\n const correctResponse =\n bestScoreAnswerKey && answers[bestScoreAnswerKey]\n ? answers[bestScoreAnswerKey].marks || []\n : [];\n\n let correctCount = 0;\n let incorrectCount = 0;\n let missingCount = 0;\n\n for (let i = 0; i < answersCorrected.length; i++) {\n const c = answersCorrected[i].correctness;\n if (c === 'correct') correctCount++;\n else if (c === 'incorrect') incorrectCount++;\n else if (c === 'missing') missingCount++;\n }\n\n if (correctCount > 0) {\n traceLog.push(`Correct objects: ${correctCount}.`);\n }\n\n if (incorrectCount > 0) {\n traceLog.push(`Incorrect objects: ${incorrectCount}.`);\n }\n\n if (missingCount > 0) {\n traceLog.push(`Missing required objects: ${missingCount}.`);\n }\n\n answersCorrected.forEach((mark, index) => {\n const objectType = mark.type || 'graph object';\n const objectLabel = mark.label ? `'${mark.label}'` : '';\n const objectIndex = `with index ${index + 1}`;\n\n if (mark.correctness === 'correct') {\n traceLog.push(\n `${objectType.charAt(0).toUpperCase() + objectType.slice(1)} ${objectLabel || objectIndex} is correct.`\n );\n }\n\n if (mark.correctness === 'incorrect') {\n traceLog.push(\n `${objectType.charAt(0).toUpperCase() + objectType.slice(1)} ${objectLabel || objectIndex} does not match the expected ${objectType}.`\n );\n }\n\n if (mark.correctness === 'missing') {\n traceLog.push(`Expected ${objectType} ${objectLabel || objectIndex} was not plotted by the student.`);\n }\n });\n\n if (studentMarks.length > correctResponse.length) {\n const extra = studentMarks.length - correctResponse.length;\n traceLog.push(`${extra} extra object(s) were plotted and are penalized in scoring.`);\n }\n\n if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n }\n\n traceLog.push(`Final score: ${bestScore}.`);\n\n return traceLog;\n};\n\n\nexport function outcome(question, session, env = {}) {\n return new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not interact with the graph.'] });\n }\n\n if (\n env.mode !== 'evaluate' ||\n isEmpty(question.answers) ||\n (question.answers && question.answers.correctAnswer && isEmpty(question.answers.correctAnswer.marks))\n ) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not interact with the graph.'] });\n }\n\n const { bestScore } = getBestAnswer(question, session, env);\n\n resolve({ score: bestScore, empty: false, logTrace: getLogTrace(question, session, env) });\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { answers } = question || {};\n let marks = [];\n\n if (answers && Object.values(answers)) {\n const correctAnswer = answers.correctAnswer || Object.values(answers)[0] || {};\n marks = correctAnswer.marks || [];\n }\n\n resolve({\n answer: marks,\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { answers, toolbarTools } = model;\n const errors = {};\n const correctAnswerErrors = {};\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n\n if (!toolbarToolsNoLabel.length) {\n errors.toolbarToolsError = 'There should be at least 1 tool defined.';\n }\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n Object.entries(answers || {}).forEach(([key, value]) => {\n if (!value.marks.length) {\n correctAnswerErrors[key] = 'At least 1 graph object should be defined.';\n }\n\n // check if all graph objects are correctly defined with respect to root, edge and from, to\n if (value.marks.length > 0) {\n value.marks.forEach((mark) => {\n if (mark.building) {\n correctAnswerErrors[key] = 'At least 1 graph object is not correctly defined.';\n }\n });\n }\n });\n\n if (!isEmpty(correctAnswerErrors)) {\n errors.correctAnswerErrors = correctAnswerErrors;\n }\n\n return errors;\n};\n"],"mappings":";;mCA2BA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,GCvDa,KAAc,GAAG,OAC5B,IAAI,EAAE,GAAG,EAAE,GACX,IAAI,EAAE,GAAG,EAAE,GAEJ,EAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,EAAQ,EAAE,GAAG,EAAE,CAAC,IAGjC,KAAuB,GAAG,MAAM;CAK3C,IAAI,IAAa;CASjB,OAPA,IAAI,EAAE,GAAG,EAAE,GACX,IAAI,EAAE,GAAG,EAAE,IAEP,EAAE,SAAS,EAAE,WACf,IAAa,EAAQ,EAAE,OAAO,EAAE,KAAK,IAGhC,EAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,EAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;AACnD,GAEa,KAAgB,GAAU,MAIlC,EAAQ,EAAS,MAAM,EAAS,IAAI,KAAK,EAAQ,EAAS,IAAI,EAAS,EAAE,KACzE,EAAQ,EAAS,IAAI,EAAS,IAAI,KAAK,EAAQ,EAAS,MAAM,EAAS,EAAE,GAIjE,KAAe,GAAS,MAG5B,EAAQ,EAAQ,MAAM,EAAQ,IAAI,KAAK,EAAQ,EAAQ,IAAI,EAAQ,EAAE,GAIjE,KAAiB,MAC5B,OAAO,KAAK,KAAW,CAAC,CAAC,EACtB,KAAK,EACL,QAAQ,GAAQ,OACX,MAAQ,oBACV,EAAO,KAAO,EAAQ,KAGjB,IACN,CAAC,CAAC,GAEH,KAAkC,MAAS;CAC/C,IAAO;EAAE,GAAG;EA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C,MAAM;CACnD,IAAM,EAAE,YAAS,oBAAiB,GAC5B,IAAS,CAAC,GACV,IAAsB,CAAC;CAgC7B,QA/B6B,KAAgB,CAAC,GAAG,QAAQ,MAAS,MAAS,OAEtE,EAAoB,WACvB,EAAO,oBAAoB,6CAG7B;EAAC;EAAuB;EAAU;CAAW,EAAE,SAAS,MAAU;EAChE,AAAI,EAAO,IAAQ,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAED,OAAO,QAAQ,KAAW,CAAC,CAAC,EAAE,SAAS,CAAC,GAAK,OAAW;EAMtD,AALK,EAAM,MAAM,WACf,EAAoB,KAAO,+CAIzB,EAAM,MAAM,SAAS,KACvB,EAAM,MAAM,SAAS,MAAS;GAC5B,AAAI,EAAK,aACP,EAAoB,KAAO;EAE/B,CAAC;CAEL,CAAC,GAEI,EAAQ,CAAmB,MAC9B,EAAO,sBAAsB,IAGxB;AACT"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/controller/defaults.ts","../../../src/controller/utils.ts","../../../../../shared/controller-utils/dist/index.js","../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\n// TODO: This is lifted from @pie-lib/graphing, however importing this will break a controller build because it has jsx source in that package.\nconst allTools = [\n 'circle',\n 'line',\n 'label',\n 'parabola',\n 'point',\n 'polygon',\n 'ray',\n 'segment',\n 'sine',\n 'vector',\n // 'absolute', // - not available as default\n // 'exponential', // - not available as default\n];\n\n/* model defaults */\nexport default {\n answers: {\n correctAnswer: {\n name: 'Correct Answer',\n marks: [],\n },\n },\n arrows: {\n left: true,\n right: true,\n up: true,\n down: true,\n },\n backgroundMarks: [],\n coordinatesOnHover: false,\n defaultGridConfiguration: 0,\n domain: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'x',\n },\n graph: { width: 500, height: 500 },\n includeAxes: true,\n labels: {},\n labelsEnabled: true,\n padding: true,\n prompt: '',\n promptEnabled: true,\n range: {\n min: -5,\n max: 5,\n step: 1,\n labelStep: 1,\n axisLabel: 'y',\n },\n rationale: '',\n rationaleEnabled: true,\n standardGrid: false,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\n titleEnabled: true,\n toolbarTools: allTools,\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { differenceWith, isEqual, uniq, uniqWith } from '@pie-element/shared-lodash';\nimport {\n getAmplitudeAndFreq,\n pointsToABC,\n pointsToAForAbsolute,\n pointsToABForExponential,\n} from '@pie-lib/graphing-utils';\n\nexport const equalPoint = (A, B) => {\n A = { ...A };\n B = { ...B };\n\n return isEqual(A.x, B.x) && isEqual(A.y, B.y);\n};\n\nexport const equalPointWithLabel = (A, B) => {\n // x1 = x2 & y1 = y2\n // A point is only correct if both its position AND its label match.\n // Labels are not scored independently; a point in the correct position\n // with the wrong label is considered incorrect as a whole.\n let equalLabel = true;\n\n A = { ...A };\n B = { ...B };\n\n if (A.label || B.label) {\n equalLabel = isEqual(A.label, B.label);\n }\n\n return isEqual(A.x, B.x) && isEqual(A.y, B.y) && equalLabel;\n};\n\nexport const equalSegment = (segment1, segment2) => {\n // A.from = B.from, A.to = B.to OR A.from = B.to, A.to = B.from\n // x1 = x3 & y1 = y3 & x2 = x4 & y2 = y4\n return (\n (isEqual(segment1.from, segment2.from) && isEqual(segment1.to, segment2.to)) ||\n (isEqual(segment1.to, segment2.from) && isEqual(segment1.from, segment2.to))\n );\n};\n\nexport const equalVector = (vector1, vector2) => {\n // A.from = B.from, A.to = B.to;\n // x1 = x3 & y1 = y3 & x2 = x4 & y2 = y4\n return isEqual(vector1.from, vector2.from) && isEqual(vector1.to, vector2.to);\n};\n\n// this function is implemented in configure as well\nexport const sortedAnswers = (answers) =>\n Object.keys(answers || {})\n .sort()\n .reduce((result, key) => {\n if (key !== 'correctAnswer') {\n result[key] = answers[key];\n }\n\n return result;\n }, {});\n\nconst returnLineEquationCoefficients = (line) => {\n line = { ...line, to: { ...line.to }, from: { ...line.from } };\n\n const xA = line.from.x;\n const yA = line.from.y;\n const xB = line.to.x;\n const yB = line.to.y;\n\n return {\n a: yB - yA,\n b: xA - xB,\n c: xB * yA - xA * yB,\n };\n};\n\nconst getSignificantDecimals = (number) => Math.round(number * 10000) / 10000;\n\nexport const equalLine = (line1, line2) => {\n // line equation: ax + by + c = 0\n // 2 lines are equal if a1/a2 = b1/b2 = c1/c2, where a, b, c are the coefficients in line equation\n\n // line equation knowing 2 points: (y - yA) / (yB - yA) = (x - xA) / (xB - xA)\n // extending this equation, we get: x * (yB - yA) + y * (xA - xB) + (xB * yA - xA * yB) = 0\n // where a = yB - yA; b = xA - xB; c = xB * yA - xA * yB\n\n const { a: a1, b: b1, c: c1 } = returnLineEquationCoefficients(line1);\n const { a: a2, b: b2, c: c2 } = returnLineEquationCoefficients(line2);\n\n const proportions = [];\n\n if (a2 !== 0) {\n proportions.push(getSignificantDecimals(a1 / a2));\n } else if (a1 !== a2) {\n return false;\n }\n\n if (b2 !== 0) {\n proportions.push(getSignificantDecimals(b1 / b2));\n } else if (b1 !== b2) {\n return false;\n }\n\n if (c2 !== 0) {\n proportions.push(getSignificantDecimals(c1 / c2));\n } else if (c1 !== c2) {\n return false;\n }\n\n return uniq(proportions).length === 1;\n\n // (y2 - y1)/(x2 - x1) = (y4 - y3)/(x4 - x3);\n // return ((Math.abs((line1.to.y - line1.from.y) / (line1.to.x - line1.from.x))) === (Math.abs((line2.to.y - line2.from.y) / (line2.to.x - line2.from.x))));\n};\n\nexport const equalRay = (ray1, ray2) => {\n ray1 = { ...ray1, to: { ...ray1.to }, from: { ...ray1.from } };\n ray2 = { ...ray2, to: { ...ray2.to }, from: { ...ray2.from } };\n\n // slope: m = (y2-y1)/(x2-x1)\n // slope & x1 = x3 & y1 = y3 & angle between (x1, y1) (x2, y2) is same as angle between (x3, y3) (x4, y4)\n const mRay1 = (ray1.to.y - ray1.from.y) / (ray1.to.x - ray1.from.x);\n const mRay2 = (ray2.to.y - ray2.from.y) / (ray2.to.x - ray2.from.x);\n const angleRay1 = (Math.atan2(ray1.to.y - ray1.from.y, ray1.to.x - ray1.from.x) * 180) / Math.PI;\n const angleRay2 = (Math.atan2(ray2.to.y - ray2.from.y, ray2.to.x - ray2.from.x) * 180) / Math.PI;\n\n return mRay1 === mRay2 && ray1.from.x === ray2.from.x && ray1.from.y === ray2.from.y && angleRay1 === angleRay2;\n};\n\nexport const constructSegmentsFromPoints = (points) => {\n // takes the list of points that represent a polygon and transforms it into a list of segments; eg.:\n // points: A, B, C, D => segments: AB, BC, CD, DA\n return (points || []).map((point, index) => ({ from: point, to: points[(index + 1) % points.length] }));\n};\n\nexport const removeDuplicateSegments = (segments) => {\n segments = segments || [];\n // removes segments that are duplicates; eg. These segments are the same, so one will be removed:\n // segment1: from: { x: 1, y: 1 }, to: { x: 2, y: 1 }\n // segment2: from: { x: 2, y: 1 }, to: { x: 1, y: 1 }\n return uniqWith(segments, (s1, s2) => equalSegment(s1, s2));\n};\n\nexport const removeInvalidSegments = (segments) => {\n segments = segments || [];\n // removes segments that start in a point and end in the same point (eg.: from: { x: 1, y: 1 }, to: { x: 1, y: 1 })\n\n return segments.filter((segment) => !isEqual(segment.from, segment.to));\n};\n\nexport const equalPolygon = (poly1, poly2) => {\n const { points: points1 } = poly1;\n const { points: points2 } = poly2;\n\n // generate segments\n const segments1 = constructSegmentsFromPoints(points1);\n const segments2 = constructSegmentsFromPoints(points2);\n\n const segments1NoDuplicates = removeDuplicateSegments(removeInvalidSegments(segments1));\n const segments2NoDuplicates = removeDuplicateSegments(removeInvalidSegments(segments2));\n\n const differentSegments1 = differenceWith(segments1NoDuplicates, segments2NoDuplicates, equalSegment);\n const differentSegments2 = differenceWith(segments2NoDuplicates, segments1NoDuplicates, equalSegment);\n\n return (!differentSegments1 || !differentSegments1.length) && (!differentSegments2 || !differentSegments2.length);\n};\n\nexport const equalCircle = (c1, c2) => {\n c1 = { ...c1, root: { ...c1.root }, edge: { ...c1.edge } };\n c2 = { ...c2, root: { ...c2.root }, edge: { ...c2.edge } };\n const equalRootAndEdge = isEqual(c2.edge, c1.edge) && isEqual(c2.root, c1.root);\n\n // if both edge and root are the same, it means the shapes are exactly the same\n if (equalRootAndEdge) return true;\n\n const rC1 = Math.sqrt((c1.edge.x - c1.root.x) ** 2 + (c1.edge.y - c1.root.y) ** 2);\n const rC2 = Math.sqrt((c2.edge.x - c2.root.x) ** 2 + (c2.edge.y - c2.root.y) ** 2);\n\n // if both root and radius are the same, it means the shapes are equal\n return isEqual(c2.root, c1.root) && isEqual(rC1, rC2);\n};\n\nexport const equalSine = (sine1, sine2) => {\n const getPoints = ({ root, edge }) => {\n root = { ...root };\n edge = { ...edge };\n\n const { amplitude, freq } = getAmplitudeAndFreq(root, edge);\n // the height of the sine wave\n const tY = Math.abs(root.y - edge.y) * 2;\n // the distance on x axis between edge and root\n const tXRoot = Math.abs(root.x - edge.x);\n // the distance on x axis between 2 edges for sine wave (min & max)\n const tX = tXRoot * 2;\n // the first edge placed east side of root\n let edgeAboveZeroX = edge.x;\n let edgeAboveZeroY = edge.y;\n\n // if edge less then 0, find out the appropriate edge placed east side of zero (0)\n while (edgeAboveZeroX < 0 && tX !== 0) {\n edgeAboveZeroX = edgeAboveZeroX + tX;\n edgeAboveZeroY = edgeAboveZeroY < root.y ? edgeAboveZeroY + tY : edgeAboveZeroY - tY;\n }\n\n // if edge more then 0, find out the appropriate edge placed east side of zero (0)\n while (edgeAboveZeroX - tX > 0 && tX !== 0) {\n edgeAboveZeroX = edgeAboveZeroX - tX;\n edgeAboveZeroY = edgeAboveZeroY < root.y ? edgeAboveZeroY + tY : edgeAboveZeroY - tY;\n }\n\n return {\n amplitude: getSignificantDecimals(amplitude),\n freq: getSignificantDecimals(freq),\n min: getSignificantDecimals(edge.y < root.y ? edge.y : edge.y - tY),\n max: getSignificantDecimals(edge.y < root.y ? edge.y + tY : edge.y),\n edgeAboveZeroX: getSignificantDecimals(edgeAboveZeroX),\n edgeAboveZeroY: getSignificantDecimals(edgeAboveZeroY),\n };\n };\n\n const studentAnswerBpY = getPoints(sine1);\n const correctAnswerBpY = getPoints(sine2);\n\n const {\n amplitude: amplitude1,\n freq: freq1,\n min: min1,\n max: max1,\n edgeAboveZeroX: edgeAboveZeroX1,\n edgeAboveZeroY: edgeAboveZeroY1,\n } = studentAnswerBpY;\n const {\n amplitude: amplitude2,\n freq: freq2,\n min: min2,\n max: max2,\n edgeAboveZeroX: edgeAboveZeroX2,\n edgeAboveZeroY: edgeAboveZeroY2,\n } = correctAnswerBpY;\n\n return (\n Math.abs(amplitude1) === Math.abs(amplitude2) &&\n Math.abs(freq1) === Math.abs(freq2) &&\n min1 === min2 &&\n max1 === max2 &&\n edgeAboveZeroX1 === edgeAboveZeroX2 &&\n edgeAboveZeroY1 === edgeAboveZeroY2\n );\n // rootDiff1 === rootDiff2);\n};\n\nexport const equalParabola = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const p1mirrorEdge = { x: rootP1.x - (p1edge.x - rootP1.x), y: p1edge.y };\n const p2mirrorEdge = { x: rootP2.x - (p2edge.x - rootP2.x), y: p2edge.y };\n\n if (!edgeP1 || !edgeP2) return false;\n\n const { a: a1, b: b1, c: c1 } = pointsToABC(rootP1, edgeP1, p1mirrorEdge);\n const { a: a2, b: b2, c: c2 } = pointsToABC(rootP2, edgeP2, p2mirrorEdge);\n\n // sometimes numbers have this form: 1.00000000002 because of calculations, we have to round them\n const round = (number) => Math.round(number * 10000) / 10000;\n\n return round(a1) === round(a2) && round(b1) === round(b2) && round(c1) === round(c2);\n};\n\n/*\n * Function to check if given two points for absolute function\n * for correct answer and student answer are equal or not.\n * @param p1 - student answer\n * @param p2 - correct answer\n * */\nexport const equalAbsolute = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const p1a1 = pointsToAForAbsolute(rootP1, p1edge);\n const p2a2 = pointsToAForAbsolute(rootP2, p2edge);\n\n // if both root and a value are equal\n return isEqual(rootP2, rootP1) && isEqual(p2a2, p1a1);\n};\n\n/*\n * Function to check if given two points for exponential function\n * for correct answer and student answer are equal or not.\n * @param p1 - student answer\n * @param p2 - correct answer\n * */\nexport const equalExponential = (p1, p2) => {\n const { edge: edgeP1 } = p1;\n const { edge: edgeP2 } = p2;\n let { root: rootP1 } = p1;\n let { root: rootP2 } = p2;\n\n rootP1 = { ...rootP1 };\n rootP2 = { ...rootP2 };\n\n const p1edge = edgeP1 || { ...rootP1 };\n const p2edge = edgeP2 || { ...rootP2 };\n\n const { a: a1, b: b1 } = pointsToABForExponential(rootP1, p1edge);\n const { a: a2, b: b2 } = pointsToABForExponential(rootP2, p2edge);\n\n // if both a and b value are equal\n return isEqual(a2, a1) && isEqual(b2, b1);\n};\n\nexport const equalMarks = {\n circle: (sessAnswer, mark) => equalCircle(sessAnswer, mark),\n line: (sessAnswer, mark) => equalLine(sessAnswer, mark),\n parabola: (sessAnswer, mark) => equalParabola(sessAnswer, mark),\n absolute: (sessAnswer, mark) => equalAbsolute(sessAnswer, mark),\n exponential: (sessAnswer, mark) => equalExponential(sessAnswer, mark),\n point: (sessAnswer, mark) => equalPoint(sessAnswer, mark),\n polygon: (sessAnswer, poly) => equalPolygon(sessAnswer, poly),\n ray: (sessAnswer, mark) => equalRay(sessAnswer, mark),\n segment: (sessAnswer, mark) => equalSegment(sessAnswer, mark),\n sine: (sessAnswer, mark) => equalSine(sessAnswer, mark),\n vector: (sessAnswer, mark) => equalVector(sessAnswer, mark),\n};\n\nconst completePoint = (point) => point && Number.isFinite(point.x) && Number.isFinite(point.y);\nconst completeFromTo = (item) => item && completeMark.point(item.from) && completeMark.point(item.to);\nconst completeRootEdge = (item) => item && completeMark.point(item.edge) && completeMark.point(item.root);\nconst completePoints = (item) =>\n item &&\n item.points &&\n item.points.length &&\n (item.points.filter((point) => completePoint(point)) || []).length === item.points.length;\n\nconst completeMark = {\n point: completePoint,\n line: completeFromTo,\n ray: completeFromTo,\n segment: completeFromTo,\n vector: completeFromTo,\n circle: completeRootEdge,\n parabola: completeRootEdge,\n absolute: completeRootEdge,\n exponential: completeRootEdge,\n sine: completeRootEdge,\n polygon: completePoints,\n};\n","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\n//#region src/persistence.ts\nfunction n(e) {\n\treturn Array.isArray(e) ? e.filter((e) => e != null) : [];\n}\nfunction r(e) {\n\tlet t = [...e];\n\tfor (let e = t.length - 1; e > 0; e--) {\n\t\tlet n = Math.floor(Math.random() * (e + 1));\n\t\t[t[e], t[n]] = [t[n], t[e]];\n\t}\n\treturn t;\n}\nfunction i(e) {\n\treturn e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == \"object\" && Object.keys(e).length === 0;\n}\nasync function a(e, t, a, o = \"value\") {\n\tlet s = n(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);\n\tif (!t) {\n\t\tconsole.warn(\"Unable to save shuffled choices because there's no session.\");\n\t\treturn;\n\t}\n\tif (!i(s)) return n(s.map((t) => e.find((e) => e[o] === t)));\n\tlet c = r(e);\n\tif (a && typeof a == \"function\") try {\n\t\tlet e = n(c.map((e) => e[o]));\n\t\ti(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(c)}, key: ${o}`) : t.id && t.element && await a(t.id, t.element, { shuffledValues: e });\n\t} catch (e) {\n\t\tconsole.warn(\"Unable to save shuffled order for choices\"), console.error(e);\n\t}\n\telse console.warn(\"Unable to save shuffled choices, shuffle will happen every time.\");\n\treturn c;\n}\nfunction o(e, t, n) {\n\treturn !!(e.lockChoiceOrder || n[\"@pie-element\"]?.lockChoiceOrder || (n.role ?? \"student\") === \"instructor\");\n}\n//#endregion\n//#region src/partial-scoring.ts\nvar s = /* @__PURE__ */ t({ enabled: () => c });\nfunction c(e, t, n) {\n\treturn e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n != \"boolean\" || n;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/controller/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport debug from 'debug';\n\nimport { cloneDeep, isEmpty, uniqWith } from '@pie-element/shared-lodash';\nimport defaults from './defaults.js';\nimport { equalMarks, equalPointWithLabel, sortedAnswers } from './utils.js';\n\nimport { partialScoring } from '@pie-element/shared-controller-utils';\n\nconst log = debug('@pie-element:graphing:controller');\n\nconst initializeGraphMap = () => ({\n point: [],\n segment: [],\n line: [],\n ray: [],\n vector: [],\n polygon: [],\n circle: [],\n sine: [],\n parabola: [],\n absolute: [],\n exponential: [],\n});\n\nconst graphObjectsOrder = {\n incorrect: 0,\n correct: 1,\n missing: 2,\n};\n\nexport const compareMarks = (mark1, mark2) => {\n // marks can be compared with equalMarks[type] function only if they have the same type;\n // if type is different, they are clearly not equal\n return !!(\n mark1 &&\n mark2 &&\n mark1.type === mark2.type &&\n equalMarks[mark1.type] &&\n equalMarks[mark1.type](mark1, mark2)\n );\n};\n\nexport const comparLabelMarks = (mark1, mark2) => {\n return mark1.label === mark2.label ? 'correct' : 'incorrect';\n};\n\nexport const getAnswerCorrected = ({ sessionAnswers, marks: correctAnswers, withPointLabel = false }) => {\n sessionAnswers = sessionAnswers || [];\n correctAnswers = correctAnswers || [];\n\n const rez = cloneDeep(sessionAnswers).reduce((correctedAnswer, answer) => {\n const answerIsCorrect = correctAnswers.find((mark) => compareMarks(answer, mark));\n\n // For scoring points, check if both position AND label match\n const isCorrectForScoring = answerIsCorrect && answer.type === 'point' && withPointLabel \n ? equalPointWithLabel(answer, answerIsCorrect)\n : !!answerIsCorrect;\n\n answer.correctness = isCorrectForScoring ? 'correct' : 'incorrect';\n if (answerIsCorrect) {\n answer.correctnesslabel = comparLabelMarks(answer, answerIsCorrect);\n answer.correctlabel = answerIsCorrect.label ? answerIsCorrect.label : '';\n answer.label = answer.label ? answer.label : '';\n }\n return [...correctedAnswer, answer];\n }, []);\n\n // add missing objects from correct answer\n const missingAnswers = cloneDeep(correctAnswers).reduce((correctedAnswer, answer) => {\n const answerIndex = sessionAnswers.find((mark) => compareMarks(answer, mark));\n\n if (!answerIndex) {\n // means that corrected answer is missing from session, so we mark it as missing object\n return [...correctedAnswer, { ...answer, correctness: 'missing' }];\n }\n\n return correctedAnswer;\n }, []);\n\n return [...rez, ...missingAnswers];\n};\n\nconst getPartialScoring = ({ scoringType, env }) => {\n let pS = scoringType;\n\n // if scoringType is undefined, partialScoring should be considered undefined (not set)\n // because partialScoring.enabled is using that information\n // if it has a value, we check if it is partial scoring or dichotomous\n if (scoringType) {\n pS = scoringType === 'partial scoring';\n }\n\n return partialScoring.enabled({ partialScoring: pS }, env);\n};\n\nexport const getBestAnswer = (question, session, env = {}) => {\n // questionPossibleAnswers contains all possible answers (correct response and alternates);\n let { answers: questionPossibleAnswers = {}, scoringType } = question || {};\n let { answer } = session || {};\n\n // filter the incomplete objects\n Object.entries(questionPossibleAnswers || {}).forEach(\n ([key, value]) =>\n (questionPossibleAnswers[key] = { ...value, marks: value?.marks.filter((mark) => !mark.building) }),\n );\n\n // initialize answer if no values\n answer = answer || [];\n\n //filter the incomplete objects for student response - Fix for SC-33160\n answer = answer.filter((mark) => !mark.building);\n\n // initialize one possible answer if no values\n if (isEmpty(questionPossibleAnswers)) {\n questionPossibleAnswers = { correctAnswer: initializeGraphMap() };\n } else {\n questionPossibleAnswers = {\n correctAnswer: questionPossibleAnswers.correctAnswer,\n ...sortedAnswers(questionPossibleAnswers),\n };\n }\n\n const partialScoringEnabled = getPartialScoring({ scoringType, env });\n\n // student's answers without DUPLICATES\n const sessionAnswers = uniqWith(answer, compareMarks);\n // array of possible answers entries\n const possibleAnswers = Object.entries(questionPossibleAnswers);\n\n return possibleAnswers.reduce(\n (acc, entry) => {\n // iterating each possible answer (main + alternates)\n const possibleAnswerKey = entry[0];\n const possibleAnswer = entry[1] || {};\n let { marks } = possibleAnswer;\n\n if (!marks || !marks.length) {\n return acc;\n }\n\n // returns array of marks, each having 'correctness' property\n const correctedAnswer = getAnswerCorrected({ sessionAnswers, marks });\n const correctedAnswerWithLabels = getAnswerCorrected({ sessionAnswers, marks, withPointLabel: true });\n const correctMarks = correctedAnswerWithLabels.filter((answer) => answer.correctness === 'correct');\n // filter out missing objects because they do not affect the calculation of the score\n // only correct and incorrect are needed\n const scoredCorrectedAnswer = correctedAnswerWithLabels.filter((answer) => answer.correctness !== 'missing');\n\n const maxScore = marks.length;\n let score = correctMarks.length;\n\n // if extra placements\n if (scoredCorrectedAnswer.length > maxScore) {\n score -= scoredCorrectedAnswer.length - maxScore;\n }\n\n if (score < 0) {\n score = 0;\n }\n\n if (score / maxScore > acc.bestScore || !acc.foundOneSolution) {\n if (partialScoringEnabled) {\n acc.bestScore = parseFloat((score / maxScore).toFixed(2));\n } else {\n acc.bestScore = Math.floor(score / maxScore);\n }\n\n acc.bestScoreAnswerKey = possibleAnswerKey;\n acc.answersCorrected = correctedAnswer;\n acc.foundOneSolution = true;\n }\n\n return acc;\n },\n {\n bestScore: 0,\n bestScoreAnswerKey: null,\n // initially we just suppose all the answers are incorrect\n answersCorrected: cloneDeep(sessionAnswers).map((answer) => ({ ...answer, correctness: 'incorrect' })),\n foundOneSolution: false,\n },\n );\n};\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport function model(question, session, env) {\n return new Promise((resolve) => {\n const normalizedQuestion = normalize(question);\n\n // added a sanity check for session for environments where it is not passed initially (ex. pie-website)\n if (session === undefined || session === null) {\n session = {};\n }\n // console.log('normalizedQuestion', normalizedQuestion);\n const { defaultTool, extraCSSRules, prompt, promptEnabled, graph, answers, toolbarTools, ...questionProps } =\n normalizedQuestion || {};\n let { arrows } = normalizedQuestion;\n const { mode, role } = env || {};\n\n // This is used for offering support for old models which have the property arrows: boolean\n // Same thing is set in authoring : packages/graphing/configure/src/configure.jsx - componentDidMount\n if (typeof arrows === 'boolean') {\n if (arrows) {\n arrows = {\n left: true,\n right: true,\n up: true,\n down: true,\n };\n } else {\n arrows = {\n left: false,\n right: false,\n up: false,\n down: false,\n };\n }\n }\n\n // added support for models without defaultTool defined; also used in packages/graphing/configure/src/index.js\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n const normalizedDefaultTool = defaultTool || (toolbarToolsNoLabel.length && toolbarToolsNoLabel[0]) || '';\n\n const base = {\n ...questionProps,\n answers,\n arrows,\n defaultTool: normalizedDefaultTool,\n disabled: env.mode !== 'gather',\n prompt: promptEnabled ? prompt : null,\n rationale: null,\n size: graph,\n showKeyLegend: env.mode === 'evaluate',\n showToggle:\n env.mode === 'evaluate' &&\n !isEmpty(answers) &&\n answers.correctAnswer &&\n answers.correctAnswer.marks &&\n !isEmpty(answers.correctAnswer.marks),\n teacherInstructions: null,\n toolbarTools,\n extraCSSRules,\n };\n\n if (role === 'instructor' && (mode === 'view' || mode === 'evaluate')) {\n const { rationale, rationaleEnabled, teacherInstructions, teacherInstructionsEnabled } = normalizedQuestion || {};\n\n base.rationale = rationaleEnabled ? rationale : null;\n base.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n }\n\n if (mode === 'evaluate') {\n if (\n !isEmpty(answers) &&\n answers.correctAnswer &&\n answers.correctAnswer.marks &&\n !isEmpty(answers.correctAnswer.marks)\n ) {\n const { answersCorrected, bestScoreAnswerKey, bestScore } = getBestAnswer(normalizedQuestion, session, env);\n // array of marks from session with 'correctness' property set\n base.answersCorrected = answersCorrected.sort(\n (a, b) => graphObjectsOrder[a.correctness] - graphObjectsOrder[b.correctness],\n );\n base.correctResponse = bestScoreAnswerKey ? (answers[bestScoreAnswerKey] || {}).marks : [];\n base.showToggle = base.showToggle && bestScore !== 1;\n } else {\n base.answersCorrected = (session && session.answer) || [];\n base.correctResponse = [];\n }\n }\n\n log('base: ', base);\n resolve(base);\n });\n}\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n const { answers = {}, scoringType } = question || {};\n const studentMarks = (session && session.answer) || [];\n\n if (!studentMarks.length) {\n return ['Student did not interact with the graph.'];\n }\n\n traceLog.push(`Student added ${studentMarks.length} object(s) to the graph.`);\n\n const partialScoringEnabled = getPartialScoring({ scoringType, env });\n\n const {\n answersCorrected,\n bestScore,\n bestScoreAnswerKey,\n } = getBestAnswer(question, session, env);\n\n const correctResponse =\n bestScoreAnswerKey && answers[bestScoreAnswerKey]\n ? answers[bestScoreAnswerKey].marks || []\n : [];\n\n let correctCount = 0;\n let incorrectCount = 0;\n let missingCount = 0;\n\n for (let i = 0; i < answersCorrected.length; i++) {\n const c = answersCorrected[i].correctness;\n if (c === 'correct') correctCount++;\n else if (c === 'incorrect') incorrectCount++;\n else if (c === 'missing') missingCount++;\n }\n\n if (correctCount > 0) {\n traceLog.push(`Correct objects: ${correctCount}.`);\n }\n\n if (incorrectCount > 0) {\n traceLog.push(`Incorrect objects: ${incorrectCount}.`);\n }\n\n if (missingCount > 0) {\n traceLog.push(`Missing required objects: ${missingCount}.`);\n }\n\n answersCorrected.forEach((mark, index) => {\n const objectType = mark.type || 'graph object';\n const objectLabel = mark.label ? `'${mark.label}'` : '';\n const objectIndex = `with index ${index + 1}`;\n\n if (mark.correctness === 'correct') {\n traceLog.push(\n `${objectType.charAt(0).toUpperCase() + objectType.slice(1)} ${objectLabel || objectIndex} is correct.`\n );\n }\n\n if (mark.correctness === 'incorrect') {\n traceLog.push(\n `${objectType.charAt(0).toUpperCase() + objectType.slice(1)} ${objectLabel || objectIndex} does not match the expected ${objectType}.`\n );\n }\n\n if (mark.correctness === 'missing') {\n traceLog.push(`Expected ${objectType} ${objectLabel || objectIndex} was not plotted by the student.`);\n }\n });\n\n if (studentMarks.length > correctResponse.length) {\n const extra = studentMarks.length - correctResponse.length;\n traceLog.push(`${extra} extra object(s) were plotted and are penalized in scoring.`);\n }\n\n if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n }\n\n traceLog.push(`Final score: ${bestScore}.`);\n\n return traceLog;\n};\n\n\nexport function outcome(question, session, env = {}) {\n return new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not interact with the graph.'] });\n }\n\n if (\n env.mode !== 'evaluate' ||\n isEmpty(question.answers) ||\n (question.answers && question.answers.correctAnswer && isEmpty(question.answers.correctAnswer.marks))\n ) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not interact with the graph.'] });\n }\n\n const { bestScore } = getBestAnswer(question, session, env);\n\n resolve({ score: bestScore, empty: false, logTrace: getLogTrace(question, session, env) });\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { answers } = question || {};\n let marks = [];\n\n if (answers && Object.values(answers)) {\n const correctAnswer = answers.correctAnswer || Object.values(answers)[0] || {};\n marks = correctAnswer.marks || [];\n }\n\n resolve({\n answer: marks,\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { answers, toolbarTools } = model;\n const errors = {};\n const correctAnswerErrors = {};\n const toolbarToolsNoLabel = (toolbarTools || []).filter((tool) => tool !== 'label');\n\n if (!toolbarToolsNoLabel.length) {\n errors.toolbarToolsError = 'There should be at least 1 tool defined.';\n }\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n Object.entries(answers || {}).forEach(([key, value]) => {\n if (!value.marks.length) {\n correctAnswerErrors[key] = 'At least 1 graph object should be defined.';\n }\n\n // check if all graph objects are correctly defined with respect to root, edge and from, to\n if (value.marks.length > 0) {\n value.marks.forEach((mark) => {\n if (mark.building) {\n correctAnswerErrors[key] = 'At least 1 graph object is not correctly defined.';\n }\n });\n }\n });\n\n if (!isEmpty(correctAnswerErrors)) {\n errors.correctAnswerErrors = correctAnswerErrors;\n }\n\n return errors;\n};\n"],"mappings":";;mCA2BA,IAAe;CACb,SAAS,EACP,eAAe;EACb,MAAM;EACN,OAAO,CAAC;CACV,EACF;CACA,QAAQ;EACN,MAAM;EACN,OAAO;EACP,IAAI;EACJ,MAAM;CACR;CACA,iBAAiB,CAAC;CAClB,oBAAoB;CACpB,0BAA0B;CAC1B,QAAQ;EACN,KA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AC,EAAA,CACvD,SAAS,CAAC,IAGlC,EAAQ;GACN,QAAQ;GACR,IAAI;EACN,CAAC;CACH,OACE,EAAQ,IAAI;AAEhB,CAAC,GAOG,KAAc,OAAU,KAAQ,GAAA,CAAI,QAAQ,sCAAsC,EAAE,GAE7E,KAAY,IAAQ,CAAC,GAAG,IAAS,CAAC,MAAM;CACnD,IAAM,EAAE,YAAS,oBAAiB,GAC5B,IAAS,CAAC,GACV,IAAsB,CAAC;CAgC7B,QA/B6B,KAAgB,CAAC,EAAA,CAAG,QAAQ,MAAS,MAAS,OAEtE,CAAA,CAAoB,WACvB,EAAO,oBAAoB,6CAG7B;EAAC;EAAuB;EAAU;CAAW,CAAC,CAAC,SAAS,MAAU;EAChE,AAAI,EAAO,EAAM,EAAE,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAED,OAAO,QAAQ,KAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAK,OAAW;EAMtD,AALK,EAAM,MAAM,WACf,EAAoB,KAAO,+CAIzB,EAAM,MAAM,SAAS,KACvB,EAAM,MAAM,SAAS,MAAS;GAC5B,AAAI,EAAK,aACP,EAAoB,KAAO;EAE/B,CAAC;CAEL,CAAC,GAEI,EAAQ,CAAmB,MAC9B,EAAO,sBAAsB,IAGxB;AACT"}
@@ -1,5 +1,5 @@
1
- import { R as e } from "../dist-B7TYAggd.js";
2
- import { D as t, E as n, O as r, P as i, T as a, gt as o, ht as s, it as c, nt as l, o as u, t as d, tt as f, w as p, z as m } from "../container-CTkqz7Oi.js";
1
+ import { R as e } from "../dist-Bqo4KUUX.js";
2
+ import { D as t, E as n, O as r, P as i, T as a, gt as o, ht as s, it as c, nt as l, o as u, t as d, tt as f, w as p, z as m } from "../container-p4OO5NnF.js";
3
3
  import h, { useRef as g } from "react";
4
4
  import { createRoot as _ } from "react-dom/client";
5
5
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
@@ -19,7 +19,6 @@ import { jsx as v, jsxs as y } from "react/jsx-runtime";
19
19
  }), this.component = t, this.complete = n;
20
20
  }
21
21
  });
22
- //#region ../../shared/player-events/dist/index.js
23
22
  var b = class e extends CustomEvent {
24
23
  static {
25
24
  this.TYPE = "session-changed";
@@ -644,7 +643,26 @@ var re = K(i, "UiLayout") || K(Z.UiLayout, "UiLayout"), q = K(r, "PreviewPrompt"
644
643
  }
645
644
  }, oe = class extends HTMLElement {
646
645
  constructor() {
647
- super(), this._root = null;
646
+ super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
647
+ }
648
+ _scheduleMathRender = () => {
649
+ this._mathRenderPending || (this._mathRenderPending = !0, requestAnimationFrame(() => {
650
+ this._mathObserver && this._mathObserver.disconnect(), o(this), this._mathRenderPending = !1, setTimeout(() => {
651
+ this._mathObserver && this._mathObserver.observe(this, {
652
+ childList: !0,
653
+ subtree: !0
654
+ });
655
+ }, 50);
656
+ }));
657
+ };
658
+ _initMathObserver() {
659
+ this._mathObserver || (this._mathObserver = new MutationObserver(this._scheduleMathRender), this._mathObserver.observe(this, {
660
+ childList: !0,
661
+ subtree: !0
662
+ }));
663
+ }
664
+ _disconnectMathObserver() {
665
+ this._mathObserver &&= (this._mathObserver.disconnect(), null);
648
666
  }
649
667
  set model(e) {
650
668
  this._model = e, this._render();
@@ -656,7 +674,7 @@ var re = K(i, "UiLayout") || K(Z.UiLayout, "UiLayout"), q = K(r, "PreviewPrompt"
656
674
  return this._session;
657
675
  }
658
676
  connectedCallback() {
659
- this._render();
677
+ this._initMathObserver(), this._render();
660
678
  }
661
679
  isComplete = (e) => Array.isArray(e) && e.length > 0;
662
680
  changeAnswers = (e) => {
@@ -664,17 +682,16 @@ var re = K(i, "UiLayout") || K(Z.UiLayout, "UiLayout"), q = K(r, "PreviewPrompt"
664
682
  };
665
683
  _render() {
666
684
  if (!this._model || !this._session) return;
685
+ this._initMathObserver();
667
686
  let e = h.createElement($, {
668
687
  model: this._model,
669
688
  session: this._session,
670
689
  onAnswersChange: this.changeAnswers
671
690
  });
672
- this._root ||= _(this), this._root.render(e), queueMicrotask(() => {
673
- o(this);
674
- });
691
+ this._root ||= _(this), this._root.render(e);
675
692
  }
676
693
  disconnectedCallback() {
677
- this._root && this._root.unmount();
694
+ this._disconnectMathObserver(), this._root &&= (this._root.unmount(), null);
678
695
  }
679
696
  };
680
697
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/player-events/dist/index.js","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/graphing/dist/key-legend.js","../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/main.tsx","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { e as ModelSetEvent, t as SessionChangedEvent };\n","import \"react\";\nimport e from \"prop-types\";\nimport { jsx as t, jsxs as n } from \"react/jsx-runtime\";\nimport { styled as r } from \"@mui/material/styles\";\n//#region src/correct-response-icon.tsx\nvar i = ({ bgFill: e, fgFill: r }) => /* @__PURE__ */ n(\"svg\", {\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-283 359 34 35\",\n\tstyle: { enableBackground: \"new -283 359 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-266\",\n\t\t\tcy: \"375.9\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\ni.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired\n};\nvar a = ({ bgFill: e, fgFill: r, borderFill: i }) => /* @__PURE__ */ n(\"svg\", {\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-129.5 127 34 35\",\n\tstyle: { enableBackground: \"new -129.5 127 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#D0CAC5\",\n\t\t\t\tstroke: \"#E6E3E0\",\n\t\t\t\tstrokeWidth: .75,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\\n C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#B3ABA4\",\n\t\t\t\tstroke: \"#CDC7C2\",\n\t\t\t\tstrokeWidth: .5,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-114.2\",\n\t\t\tcy: \"143.5\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\",\n\t\t\tfill: i\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\na.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired,\n\tborderFill: e.string.isRequired\n};\nvar o = r(\"div\")(({ size: e }) => ({\n\twidth: e || \"25px\",\n\theight: e || \"25px\"\n})), s = ({ open: e, size: n }) => /* @__PURE__ */ t(o, {\n\tsize: n,\n\tchildren: e ? /* @__PURE__ */ t(i, {\n\t\tbgFill: \"#bce2ff\",\n\t\tfgFill: \"#1a9cff\"\n\t}) : /* @__PURE__ */ t(a, {\n\t\tbgFill: \"white\",\n\t\tfgFill: \"#1a9cff\",\n\t\tborderFill: \"#bce2ff\"\n\t})\n});\ns.propTypes = {\n\topen: e.bool,\n\tsize: e.string\n}, s.defaultProps = { open: !1 };\n//#endregion\nexport { s as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\nimport { color as i } from \"@pie-lib/render-ui\";\n//#region src/key-legend.tsx\nvar a = t(\"div\")(() => ({\n\tbackgroundColor: i.defaults.WHITE,\n\tpadding: \"20px\",\n\twidth: \"355px\",\n\tboxShadow: \"0px 1px 5px 0px #9297A6\"\n})), o = t(\"div\")({\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tpadding: \"10px\"\n}), s = t(\"div\")(({ theme: e }) => ({\n\tfontSize: e.typography.h6.fontSize,\n\tmarginLeft: \"30px\",\n\tfontWeight: \"700\",\n\tmarginBottom: \"10px\"\n})), c = t(\"div\")({\n\ttextAlign: \"right\",\n\tmarginRight: \"10px\",\n\twidth: \"175px\",\n\tfontSize: \"15px\"\n}), l = ({ className: e, isLabelAvailable: t }) => /* @__PURE__ */ r(a, {\n\tclassName: e,\n\tchildren: [\n\t\t/* @__PURE__ */ n(s, { children: \"Key\" }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Missing Required Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"34\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 34 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"33\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\",\n\t\t\t\t\tstroke: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M17.25 6.13965V3.2334C17.25 2.92871 17.4844 2.6709 17.8125 2.6709H20.7188C20.8594 2.6709 21 2.81152 21 2.95215V3.51465C21 3.67871 20.8594 3.7959 20.7188 3.7959H18.375V6.13965C18.375 6.30371 18.2344 6.4209 18.0938 6.4209H17.5312C17.3672 6.4209 17.25 6.30371 17.25 6.13965ZM24 2.95215C24 2.81152 24.1172 2.6709 24.2812 2.6709H27.1875C27.4922 2.6709 27.75 2.92871 27.75 3.2334V6.13965C27.75 6.30371 27.6094 6.4209 27.4688 6.4209H26.9062C26.7422 6.4209 26.625 6.30371 26.625 6.13965V3.7959H24.2812C24.1172 3.7959 24 3.67871 24 3.51465V2.95215ZM27.4688 9.4209C27.6094 9.4209 27.75 9.56152 27.75 9.70215V12.6084C27.75 12.9365 27.4922 13.1709 27.1875 13.1709H24.2812C24.1172 13.1709 24 13.0537 24 12.8896V12.3271C24 12.1865 24.1172 12.0459 24.2812 12.0459H26.625V9.70215C26.625 9.56152 26.7422 9.4209 26.9062 9.4209H27.4688ZM21 12.8896C21 13.0537 20.8594 13.1709 20.7188 13.1709H17.8125C17.4844 13.1709 17.25 12.9365 17.25 12.6084V9.70215C17.25 9.56152 17.3672 9.4209 17.5312 9.4209H18.0938C18.2344 9.4209 18.375 9.56152 18.375 9.70215V12.0459H20.7188C20.8594 12.0459 21 12.1865 21 12.3271V12.8896Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M9.23438 8.21045L10.9219 9.89795C11.0156 9.9917 11.0156 10.1636 10.9219 10.2573L10.5312 10.6479C10.4375 10.7417 10.2656 10.7417 10.1719 10.6479L8.5 8.96045L6.8125 10.6479C6.71875 10.7417 6.54688 10.7417 6.45312 10.6479L6.0625 10.2573C5.96875 10.1636 5.96875 9.9917 6.0625 9.89795L7.75 8.21045L6.0625 6.53857C5.96875 6.44482 5.96875 6.27295 6.0625 6.1792L6.45312 5.78857C6.54688 5.69482 6.71875 5.69482 6.8125 5.78857L8.5 7.47607L10.1719 5.78857C10.2656 5.69482 10.4375 5.69482 10.5312 5.78857L10.9219 6.1792C11.0156 6.27295 11.0156 6.44482 10.9219 6.53857L9.23438 8.21045Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Answer Key Correct \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"75\",\n\t\t\theight: \"15\",\n\t\t\tviewBox: \"0 0 75 15\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"7.5\",\n\t\t\t\t\tcy: \"7.5\",\n\t\t\t\t\tr: \"7.5\",\n\t\t\t\t\tfill: \"#6A78A1\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M3.125 5.76562V3.34375C3.125 3.08984 3.32031 2.875 3.59375 2.875H6.01562C6.13281 2.875 6.25 2.99219 6.25 3.10938V3.89062C6.25 4.02734 6.13281 4.125 6.01562 4.125H4.375V5.76562C4.375 5.90234 4.25781 6 4.14062 6H3.35938C3.22266 6 3.125 5.90234 3.125 5.76562ZM8.75 3.10938C8.75 2.99219 8.84766 2.875 8.98438 2.875H11.4062C11.6602 2.875 11.875 3.08984 11.875 3.34375V5.76562C11.875 5.90234 11.7578 6 11.6406 6H10.8594C10.7227 6 10.625 5.90234 10.625 5.76562V4.125H8.98438C8.84766 4.125 8.75 4.02734 8.75 3.89062V3.10938ZM11.6406 8.5C11.7578 8.5 11.875 8.61719 11.875 8.73438V11.1562C11.875 11.4297 11.6602 11.625 11.4062 11.625H8.98438C8.84766 11.625 8.75 11.5273 8.75 11.3906V10.6094C8.75 10.4922 8.84766 10.375 8.98438 10.375H10.625V8.73438C10.625 8.61719 10.7227 8.5 10.8594 8.5H11.6406ZM6.25 11.3906C6.25 11.5273 6.13281 11.625 6.01562 11.625H3.59375C3.32031 11.625 3.125 11.4297 3.125 11.1562V8.73438C3.125 8.61719 3.22266 8.5 3.35938 8.5H4.14062C4.25781 8.5 4.375 8.61719 4.375 8.73438V10.375H6.01562C6.13281 10.375 6.25 10.4922 6.25 10.6094V11.3906Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M75 7L15 7\",\n\t\t\t\t\tstroke: \"#6A78A1\",\n\t\t\t\t\tstrokeDasharray: \"4 2\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Answer Key Correct Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"30\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 30 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"29\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"29\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#6A78A1\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M4.37793 10.2061H6.58984V11.5H2.91309V4.44434H4.37793V10.2061ZM11.6387 10.1377C11.6387 10.6715 11.6794 11.0801 11.7607 11.3633V11.5H10.4473L10.335 10.9531C10.1559 11.168 9.92155 11.3291 9.63184 11.4365C9.34212 11.5439 9.03939 11.5977 8.72363 11.5977C8.55762 11.5977 8.40137 11.583 8.25488 11.5537C8.1084 11.5244 7.9668 11.4756 7.83008 11.4072C7.69661 11.3356 7.58105 11.2477 7.4834 11.1436C7.38574 11.0394 7.30762 10.9076 7.24902 10.748C7.19043 10.5853 7.16113 10.403 7.16113 10.2012C7.16113 9.99935 7.19206 9.81868 7.25391 9.65918C7.31576 9.49642 7.39714 9.3597 7.49805 9.24902C7.59896 9.13835 7.73079 9.03906 7.89355 8.95117C8.05632 8.86328 8.22233 8.79167 8.3916 8.73633C8.56087 8.68099 8.75944 8.62891 8.9873 8.58008L9.8125 8.39453C9.98828 8.35221 10.112 8.30013 10.1836 8.23828C10.2585 8.17318 10.2959 8.08854 10.2959 7.98438C10.2959 7.75977 10.2129 7.59863 10.0469 7.50098C9.88411 7.40332 9.68555 7.35449 9.45117 7.35449C8.875 7.35449 8.54785 7.61003 8.46973 8.12109L7.22461 7.89648C7.32878 7.37891 7.57129 6.99805 7.95215 6.75391C8.33301 6.50651 8.85872 6.38281 9.5293 6.38281C10.9355 6.38281 11.6387 6.98665 11.6387 8.19434V10.1377ZM9.16309 10.6455C9.5179 10.6455 9.80762 10.5251 10.0322 10.2842C10.2568 10.04 10.3691 9.68034 10.3691 9.20508L9.17773 9.54199C8.95964 9.59408 8.79199 9.66243 8.6748 9.74707C8.56087 9.83171 8.50391 9.95215 8.50391 10.1084C8.50391 10.2809 8.56576 10.4144 8.68945 10.5088C8.81315 10.5999 8.97103 10.6455 9.16309 10.6455ZM15.96 6.38281C16.2887 6.38281 16.5996 6.44303 16.8926 6.56348C17.1855 6.68392 17.4411 6.85482 17.6592 7.07617C17.8805 7.29427 18.0547 7.56934 18.1816 7.90137C18.3086 8.2334 18.3721 8.59961 18.3721 9C18.3721 9.40039 18.3086 9.7666 18.1816 10.0986C18.0547 10.4307 17.8805 10.7074 17.6592 10.9287C17.4411 11.1468 17.1855 11.3161 16.8926 11.4365C16.5996 11.557 16.2887 11.6172 15.96 11.6172C15.6084 11.6172 15.291 11.5505 15.0078 11.417C14.7279 11.2803 14.5179 11.0898 14.3779 10.8457L14.3438 11.5H13.0107V4H14.417V7.09082C14.5602 6.86621 14.7686 6.69206 15.042 6.56836C15.3187 6.44466 15.6247 6.38281 15.96 6.38281ZM15.6328 10.4502C16.0169 10.4502 16.3343 10.3184 16.585 10.0547C16.8389 9.79102 16.9658 9.43945 16.9658 9C16.9658 8.55729 16.8389 8.2041 16.585 7.94043C16.3343 7.67676 16.0169 7.54492 15.6328 7.54492C15.2552 7.54492 14.9395 7.68001 14.6855 7.9502C14.4316 8.21712 14.3047 8.56706 14.3047 9C14.3047 9.43294 14.43 9.78288 14.6807 10.0498C14.9346 10.3167 15.252 10.4502 15.6328 10.4502ZM24.1582 8.91699L24.1436 9.25391H20.4229C20.4521 9.6543 20.5856 9.96029 20.8232 10.1719C21.0609 10.3835 21.3555 10.4893 21.707 10.4893C21.9609 10.4893 22.1807 10.4323 22.3662 10.3184C22.555 10.2012 22.6966 10.0319 22.791 9.81055L24.0801 10.001C23.9141 10.5055 23.6211 10.8978 23.2012 11.1777C22.7812 11.4577 22.2865 11.5977 21.7168 11.5977C20.8965 11.5977 20.2438 11.3682 19.7588 10.9092C19.277 10.4469 19.0361 9.80729 19.0361 8.99023C19.0361 8.17969 19.2786 7.54167 19.7637 7.07617C20.2487 6.60742 20.8851 6.37305 21.6729 6.37305C22.4215 6.37305 23.0221 6.58626 23.4746 7.0127C23.9271 7.43913 24.1549 8.07389 24.1582 8.91699ZM21.6826 7.36914C20.999 7.36914 20.5921 7.69141 20.4619 8.33594H22.7666C22.7308 8.02344 22.6152 7.78418 22.4199 7.61816C22.2246 7.45215 21.9788 7.36914 21.6826 7.36914ZM25.2275 11.5V4H26.6484V11.5H25.2275Z\",\n\t\t\t\t\tfill: \"#6A78A1\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Incorrect \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"77\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 77 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"8\",\n\t\t\t\t\tcy: \"8\",\n\t\t\t\t\tr: \"8\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M9.04688 8.5L11.3906 10.8672C11.6953 11.1484 11.6953 11.6172 11.3906 11.8984L10.875 12.4141C10.5938 12.7188 10.125 12.7188 9.84375 12.4141L7.5 10.0703L5.13281 12.4141C4.85156 12.7188 4.38281 12.7188 4.10156 12.4141L3.58594 11.8984C3.28125 11.6172 3.28125 11.1484 3.58594 10.8672L5.92969 8.5L3.58594 6.15625C3.28125 5.875 3.28125 5.40625 3.58594 5.125L4.10156 4.60938C4.38281 4.30469 4.85156 4.30469 5.13281 4.60938L7.5 6.95312L9.84375 4.60938C10.125 4.30469 10.5938 4.30469 10.875 4.60938L11.3906 5.125C11.6953 5.40625 11.6953 5.875 11.3906 6.15625L9.04688 8.5Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M77 8L15 8\",\n\t\t\t\t\tstroke: \"#BF0D00\",\n\t\t\t\t\tstrokeWidth: \"3\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Incorrect Student Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"42\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 42 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"41\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"41\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M7.23438 8.5L8.92188 10.1875C9.01562 10.2812 9.01562 10.4531 8.92188 10.5469L8.53125 10.9375C8.4375 11.0312 8.26562 11.0312 8.17188 10.9375L6.5 9.25L4.8125 10.9375C4.71875 11.0312 4.54688 11.0312 4.45312 10.9375L4.0625 10.5469C3.96875 10.4531 3.96875 10.2812 4.0625 10.1875L5.75 8.5L4.0625 6.82812C3.96875 6.73438 3.96875 6.5625 4.0625 6.46875L4.45312 6.07812C4.54688 5.98438 4.71875 5.98438 4.8125 6.07812L6.5 7.76562L8.17188 6.07812C8.26562 5.98438 8.4375 5.98438 8.53125 6.07812L8.92188 6.46875C9.01562 6.5625 9.01562 6.73438 8.92188 6.82812L7.23438 8.5Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M14.9531 10.7041H17.3408V11.5H14.0791V4.625H14.9531V10.7041ZM19.5869 11.5928C19.1605 11.5928 18.8089 11.4837 18.5322 11.2656C18.2588 11.0443 18.1221 10.7155 18.1221 10.2793C18.1221 10.0384 18.166 9.83008 18.2539 9.6543C18.3418 9.47526 18.472 9.32878 18.6445 9.21484C18.8171 9.10091 19.0042 9.01139 19.2061 8.94629C19.4111 8.87793 19.6553 8.81934 19.9385 8.77051L20.7148 8.64355C20.998 8.59147 21.1396 8.44336 21.1396 8.19922C21.1396 7.8737 21.0387 7.63607 20.8369 7.48633C20.6383 7.33333 20.3861 7.25684 20.0801 7.25684C19.7806 7.25684 19.5299 7.33008 19.3281 7.47656C19.1263 7.62305 19.0075 7.84766 18.9717 8.15039L18.21 7.98926C18.2816 7.53353 18.4818 7.19173 18.8105 6.96387C19.1393 6.73275 19.5755 6.61719 20.1191 6.61719C20.373 6.61719 20.6042 6.64648 20.8125 6.70508C21.0241 6.76042 21.2178 6.84993 21.3936 6.97363C21.5726 7.09408 21.7109 7.2666 21.8086 7.49121C21.9095 7.71257 21.96 7.97461 21.96 8.27734V10.2598C21.96 10.5072 21.9958 10.6748 22.0674 10.7627C22.1423 10.8473 22.2692 10.8896 22.4482 10.8896H22.5264V11.5H22.1064C21.5889 11.5 21.2861 11.2835 21.1982 10.8506H21.1592C20.7946 11.3454 20.2705 11.5928 19.5869 11.5928ZM19.7822 10.9092C20.2087 10.9092 20.5521 10.7546 20.8125 10.4453C21.0729 10.1361 21.2031 9.71289 21.2031 9.17578L19.9336 9.41992C19.5983 9.47526 19.3493 9.56478 19.1865 9.68848C19.027 9.80892 18.9473 9.98307 18.9473 10.2109C18.9473 10.4486 19.0238 10.6243 19.1768 10.7383C19.333 10.8522 19.5348 10.9092 19.7822 10.9092ZM26.2666 6.60742C26.8916 6.60742 27.4206 6.83854 27.8535 7.30078C28.2865 7.76302 28.5029 8.36361 28.5029 9.10254C28.5029 9.84473 28.2881 10.4469 27.8584 10.9092C27.4287 11.3714 26.8981 11.6025 26.2666 11.6025C25.889 11.6025 25.5472 11.5098 25.2412 11.3242C24.9385 11.1387 24.7106 10.8864 24.5576 10.5674L24.5381 11.5H23.7227V4H24.5625L24.5674 7.61816C24.7236 7.30566 24.9515 7.0599 25.251 6.88086C25.5537 6.69857 25.8923 6.60742 26.2666 6.60742ZM26.0811 10.8701C26.527 10.8701 26.9014 10.7074 27.2041 10.3818C27.5068 10.0531 27.6582 9.62663 27.6582 9.10254C27.6582 8.57845 27.5068 8.15365 27.2041 7.82812C26.9014 7.49935 26.527 7.33496 26.0811 7.33496C25.6416 7.33496 25.2705 7.50423 24.9678 7.84277C24.665 8.18132 24.5137 8.60124 24.5137 9.10254C24.5137 9.6071 24.6634 10.0286 24.9629 10.3672C25.2656 10.7025 25.6383 10.8701 26.0811 10.8701ZM34.0352 9.00488L34.0254 9.23438H30.2754C30.2884 9.76823 30.4414 10.1784 30.7344 10.4648C31.0273 10.748 31.3919 10.8896 31.8281 10.8896C32.1211 10.8896 32.3864 10.8132 32.624 10.6602C32.8617 10.5072 33.0439 10.2956 33.1709 10.0254L33.9326 10.1865C33.7601 10.6227 33.4867 10.9661 33.1123 11.2168C32.738 11.4674 32.3132 11.5928 31.8379 11.5928C31.125 11.5928 30.5488 11.3698 30.1094 10.9238C29.6699 10.4779 29.4502 9.86914 29.4502 9.09766C29.4502 8.32943 29.6699 7.72233 30.1094 7.27637C30.5521 6.8304 31.1201 6.60742 31.8135 6.60742C32.484 6.60742 33.0212 6.8125 33.4248 7.22266C33.8317 7.63281 34.0352 8.22689 34.0352 9.00488ZM31.8135 7.25684C31.4163 7.25684 31.0827 7.37077 30.8125 7.59863C30.5456 7.82324 30.3779 8.15202 30.3096 8.58496H33.1855C33.153 8.15202 33.013 7.82324 32.7656 7.59863C32.5182 7.37077 32.2008 7.25684 31.8135 7.25684ZM35.3633 11.5V4H36.2178V11.5H35.3633Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Correct \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"76\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 76 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M76 8L14 8\",\n\t\t\t\t\tstroke: \"#0B7D38\",\n\t\t\t\t\tstrokeWidth: \"3\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"8\",\n\t\t\t\t\tcy: \"8\",\n\t\t\t\t\tr: \"8\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M12.1953 4.46875C12.3125 4.35156 12.5 4.35156 12.5938 4.46875L13.2734 5.125C13.3672 5.24219 13.3672 5.42969 13.2734 5.52344L6.24219 12.5547C6.125 12.6719 5.96094 12.6719 5.84375 12.5547L2.70312 9.4375C2.60938 9.32031 2.60938 9.13281 2.70312 9.03906L3.38281 8.35938C3.47656 8.26562 3.66406 8.26562 3.78125 8.35938L6.03125 10.6328L12.1953 4.46875Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t\" \"\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Correct Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"43\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 43 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"42\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"42\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M11.7969 5.3125C11.875 5.23438 12 5.23438 12.0625 5.3125L12.5156 5.75C12.5781 5.82812 12.5781 5.95312 12.5156 6.01562L7.82812 10.7031C7.75 10.7812 7.64062 10.7812 7.5625 10.7031L5.46875 8.625C5.40625 8.54688 5.40625 8.42188 5.46875 8.35938L5.92188 7.90625C5.98438 7.84375 6.10938 7.84375 6.1875 7.90625L7.6875 9.42188L11.7969 5.3125Z\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M15.9531 10.7041H18.3408V11.5H15.0791V4.625H15.9531V10.7041ZM20.5869 11.5928C20.1605 11.5928 19.8089 11.4837 19.5322 11.2656C19.2588 11.0443 19.1221 10.7155 19.1221 10.2793C19.1221 10.0384 19.166 9.83008 19.2539 9.6543C19.3418 9.47526 19.472 9.32878 19.6445 9.21484C19.8171 9.10091 20.0042 9.01139 20.2061 8.94629C20.4111 8.87793 20.6553 8.81934 20.9385 8.77051L21.7148 8.64355C21.998 8.59147 22.1396 8.44336 22.1396 8.19922C22.1396 7.8737 22.0387 7.63607 21.8369 7.48633C21.6383 7.33333 21.3861 7.25684 21.0801 7.25684C20.7806 7.25684 20.5299 7.33008 20.3281 7.47656C20.1263 7.62305 20.0075 7.84766 19.9717 8.15039L19.21 7.98926C19.2816 7.53353 19.4818 7.19173 19.8105 6.96387C20.1393 6.73275 20.5755 6.61719 21.1191 6.61719C21.373 6.61719 21.6042 6.64648 21.8125 6.70508C22.0241 6.76042 22.2178 6.84993 22.3936 6.97363C22.5726 7.09408 22.7109 7.2666 22.8086 7.49121C22.9095 7.71257 22.96 7.97461 22.96 8.27734V10.2598C22.96 10.5072 22.9958 10.6748 23.0674 10.7627C23.1423 10.8473 23.2692 10.8896 23.4482 10.8896H23.5264V11.5H23.1064C22.5889 11.5 22.2861 11.2835 22.1982 10.8506H22.1592C21.7946 11.3454 21.2705 11.5928 20.5869 11.5928ZM20.7822 10.9092C21.2087 10.9092 21.5521 10.7546 21.8125 10.4453C22.0729 10.1361 22.2031 9.71289 22.2031 9.17578L20.9336 9.41992C20.5983 9.47526 20.3493 9.56478 20.1865 9.68848C20.027 9.80892 19.9473 9.98307 19.9473 10.2109C19.9473 10.4486 20.0238 10.6243 20.1768 10.7383C20.333 10.8522 20.5348 10.9092 20.7822 10.9092ZM27.2666 6.60742C27.8916 6.60742 28.4206 6.83854 28.8535 7.30078C29.2865 7.76302 29.5029 8.36361 29.5029 9.10254C29.5029 9.84473 29.2881 10.4469 28.8584 10.9092C28.4287 11.3714 27.8981 11.6025 27.2666 11.6025C26.889 11.6025 26.5472 11.5098 26.2412 11.3242C25.9385 11.1387 25.7106 10.8864 25.5576 10.5674L25.5381 11.5H24.7227V4H25.5625L25.5674 7.61816C25.7236 7.30566 25.9515 7.0599 26.251 6.88086C26.5537 6.69857 26.8923 6.60742 27.2666 6.60742ZM27.0811 10.8701C27.527 10.8701 27.9014 10.7074 28.2041 10.3818C28.5068 10.0531 28.6582 9.62663 28.6582 9.10254C28.6582 8.57845 28.5068 8.15365 28.2041 7.82812C27.9014 7.49935 27.527 7.33496 27.0811 7.33496C26.6416 7.33496 26.2705 7.50423 25.9678 7.84277C25.665 8.18132 25.5137 8.60124 25.5137 9.10254C25.5137 9.6071 25.6634 10.0286 25.9629 10.3672C26.2656 10.7025 26.6383 10.8701 27.0811 10.8701ZM35.0352 9.00488L35.0254 9.23438H31.2754C31.2884 9.76823 31.4414 10.1784 31.7344 10.4648C32.0273 10.748 32.3919 10.8896 32.8281 10.8896C33.1211 10.8896 33.3864 10.8132 33.624 10.6602C33.8617 10.5072 34.0439 10.2956 34.1709 10.0254L34.9326 10.1865C34.7601 10.6227 34.4867 10.9661 34.1123 11.2168C33.738 11.4674 33.3132 11.5928 32.8379 11.5928C32.125 11.5928 31.5488 11.3698 31.1094 10.9238C30.6699 10.4779 30.4502 9.86914 30.4502 9.09766C30.4502 8.32943 30.6699 7.72233 31.1094 7.27637C31.5521 6.8304 32.1201 6.60742 32.8135 6.60742C33.484 6.60742 34.0212 6.8125 34.4248 7.22266C34.8317 7.63281 35.0352 8.22689 35.0352 9.00488ZM32.8135 7.25684C32.4163 7.25684 32.0827 7.37077 31.8125 7.59863C31.5456 7.82324 31.3779 8.15202 31.3096 8.58496H34.1855C34.153 8.15202 34.013 7.82324 33.7656 7.59863C33.5182 7.37077 33.2008 7.25684 32.8135 7.25684ZM36.3633 11.5V4H37.2178V11.5H36.3633Z\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] })\n\t]\n});\nl.propTypes = {\n\tclassName: e.string,\n\tisLabelAvailable: e.bool\n};\n//#endregion\nexport { l as default };\n","import { styled as e } from \"@mui/material/styles\";\nimport { CSSTransition as t } from \"react-transition-group\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { useRef as r } from \"react\";\nimport i from \"prop-types\";\n//#region src/expander.tsx\nvar a = \"height ease-in 300ms, opacity ease-in 300ms\", o = e(\"div\")(() => ({\n\tposition: \"relative\",\n\theight: 0,\n\toverflow: \"hidden\",\n\tdisplay: \"flex\",\n\tvisibility: \"hidden\",\n\twidth: 0,\n\t\"&.enter\": {\n\t\ttransition: a,\n\t\topacity: 1,\n\t\theight: \"auto\",\n\t\twidth: \"auto\",\n\t\tvisibility: \"visible\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.enter-done\": {\n\t\theight: \"auto\",\n\t\tvisibility: \"visible\",\n\t\twidth: \"auto\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.exit\": {\n\t\ttransition: a,\n\t\topacity: 0,\n\t\theight: 0,\n\t\tvisibility: \"visible\",\n\t\twidth: 0\n\t},\n\t\"&.exit-done\": {\n\t\topacity: 0,\n\t\tvisibility: \"hidden\",\n\t\theight: 0,\n\t\twidth: 0\n\t}\n})), s = (e) => {\n\tlet { show: i, children: a, className: s } = e, c = r(null);\n\treturn /* @__PURE__ */ n(t, {\n\t\tnodeRef: c,\n\t\tin: i,\n\t\tappear: !0,\n\t\tmountOnEnter: !1,\n\t\ttimeout: 300,\n\t\tclassNames: {\n\t\t\tenter: \"enter\",\n\t\t\tenterDone: \"enter-done\",\n\t\t\texit: \"exit\",\n\t\t\texitDone: \"exit-done\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ n(o, {\n\t\t\tref: c,\n\t\t\tclassName: s,\n\t\t\tchildren: a\n\t\t})\n\t});\n};\ns.propTypes = {\n\tshow: i.bool.isRequired,\n\tclassName: i.string,\n\tchildren: i.oneOfType([i.arrayOf(i.node), i.node]).isRequired\n};\n//#endregion\nexport { s as default };\n","import e from \"./expander.js\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { CSSTransition as n } from \"react-transition-group\";\nimport { CorrectResponse as r } from \"@pie-lib/icons\";\nimport * as i from \"@pie-lib/render-ui\";\nimport { Readable as a, color as o } from \"@pie-lib/render-ui\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport l from \"react\";\nimport u from \"prop-types\";\nimport d from \"@pie-lib/translator\";\n//#region src/index.tsx\nfunction f(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction p(e, t) {\n\treturn !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;\n}\nvar m = p(a, \"Readable\") || p(_.Readable, \"Readable\"), h = i, g = h.default, _ = g && typeof g == \"object\" ? g : h, { translator: v } = d, y = {\n\tWebkitTouchCallout: \"none\",\n\tWebkitUserSelect: \"none\",\n\tKhtmlUserSelect: \"none\",\n\tMozUserSelect: \"none\",\n\tmsUserSelect: \"none\",\n\tuserSelect: \"none\"\n}, b = t(\"div\")(() => ({\n\twidth: \"100%\",\n\tcursor: \"pointer\"\n})), x = t(\"div\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\"\n})), S = t(\"div\")(() => ({\n\twidth: \"fit-content\",\n\tminWidth: \"140px\",\n\talignSelf: \"center\",\n\tverticalAlign: \"middle\",\n\tcolor: `var(--correct-answer-toggle-label-color, ${o.text()})`,\n\tfontWeight: \"normal\",\n\t...y\n})), C = t(\"div\")(() => ({\n\tposition: \"absolute\",\n\twidth: \"25px\",\n\t\"&.enter\": { opacity: \"0\" },\n\t\"&.enter-active\": {\n\t\topacity: \"1\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t},\n\t\"&.exit\": { opacity: \"1\" },\n\t\"&.exit-active\": {\n\t\topacity: \"0\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t}\n})), w = t(\"div\")(() => ({\n\twidth: \"25px\",\n\tmarginRight: \"5px\",\n\tdisplay: \"flex\",\n\talignItems: \"center\"\n})), T = class t extends l.Component {\n\tstatic propTypes = {\n\t\tonToggle: u.func,\n\t\ttoggled: u.bool,\n\t\tshow: u.bool,\n\t\thideMessage: u.string,\n\t\tshowMessage: u.string,\n\t\tclassName: u.string,\n\t\tlanguage: u.string\n\t};\n\tstatic defaultProps = {\n\t\tshowMessage: \"Show correct answer\",\n\t\thideMessage: \"Hide correct answer\",\n\t\tshow: !1,\n\t\ttoggled: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { show: e.show }, this.openIconRef = l.createRef(), this.closedIconRef = l.createRef(), t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t};\n\t}\n\tonClick() {\n\t\tthis.props.onToggle(!this.props.toggled);\n\t}\n\tonTouch(e) {\n\t\te.preventDefault(), this.props.onToggle(!this.props.toggled);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tthis.setState({ show: e.show }), e.language !== this.props?.language && (t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: t, toggled: i, hideMessage: a, showMessage: o } = this.props;\n\t\treturn /* @__PURE__ */ s(b, {\n\t\t\tclassName: t,\n\t\t\tchildren: /* @__PURE__ */ s(e, {\n\t\t\t\tshow: this.state.show,\n\t\t\t\tchildren: /* @__PURE__ */ c(x, {\n\t\t\t\t\tonClick: this.onClick.bind(this),\n\t\t\t\t\tonTouchEnd: this.onTouch.bind(this),\n\t\t\t\t\tchildren: [/* @__PURE__ */ c(w, { children: [/* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.openIconRef,\n\t\t\t\t\t\ttimeout: 400,\n\t\t\t\t\t\tin: i,\n\t\t\t\t\t\texit: !i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.openIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-open\")\n\t\t\t\t\t\t})\n\t\t\t\t\t}), /* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.closedIconRef,\n\t\t\t\t\t\ttimeout: 5e3,\n\t\t\t\t\t\tin: !i,\n\t\t\t\t\t\texit: i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.closedIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-closed\")\n\t\t\t\t\t\t})\n\t\t\t\t\t})] }), /* @__PURE__ */ s(m, {\n\t\t\t\t\t\tfalse: !0,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(S, {\n\t\t\t\t\t\t\t\"aria-hidden\": !this.state.show,\n\t\t\t\t\t\t\tchildren: i ? a : o\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { T as CorrectAnswerToggle, T as default };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/src/main.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer, KeyLegend } from '@pie-lib/graphing';\nimport { color, Collapsible as CollapsibleImport, hasText, hasMedia, PreviewPrompt as PreviewPromptImport, UiLayout as UiLayoutImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nconst MainContainer: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n});\n\nconst TeacherInstructions: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst Graph: any = styled(GraphContainer)(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n };\n\n state = { showingCorrect: false };\n\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n render() {\n const { model, onAnswersChange, session } = this.props;\n const { showingCorrect } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n extraCSSRules,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n showKeyLegend,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n toolbarTools,\n language,\n } = model || {};\n const size = model?.size || model?.graph || {}; // need this for models that are not processed by controller\n const marks = answersCorrected || answer || [];\n const isLabelAvailable = toolbarTools?.includes('label') || false;\n const showRationale = model.rationale && (hasText(model.rationale) || hasMedia(model.rationale));\n const showTeacherInstructions =\n model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions));\n\n return (\n <MainContainer extraCSSRules={extraCSSRules}>\n {showTeacherInstructions && (\n <TeacherInstructions\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n\n {prompt && <PreviewPrompt className=\"prompt\" prompt={prompt} />}\n\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n language={language}\n />\n\n {showingCorrect && showToggle ? (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map((i) => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n language={language}\n />\n ) : (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n language={language}\n limitLabeling={true}\n />\n )}\n {showKeyLegend && !showingCorrect && <KeyLegend isLabelAvailable={isLabelAvailable}></KeyLegend>}\n {showRationale && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n </MainContainer>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Main from './main.js';\n\nexport { Main as Component };\n\nexport default class Graphing extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._render();\n }\n\n isComplete = (answer) => Array.isArray(answer) && answer.length > 0;\n\n changeAnswers: any = (answer) => {\n this._session.answer = answer;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n\n this._render();\n };\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;CACQ,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD;;AAfA,IAeG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAA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CAAA;GAEF;;CAEnB;AACF,GC9JqB,KAArB,cAAsC,YAAY;CAChD,cAAc;EAEZ,AADA,MAAM,GACN,KAAK,QAAQ;CACf;CAEA,IAAI,MAAM,GAAG;EAEX,AADA,KAAK,SAAS,GACd,KAAK,QAAQ;CACf;CAEA,IAAI,QAAQ,GAAG;EAEb,AADA,KAAK,WAAW,GAChB,KAAK,QAAQ;CACf;CAEA,IAAI,UAAU;EACZ,OAAO,KAAK;CACd;CAEA,oBAAoB;EAClB,KAAK,QAAQ;CACf;CAEA,cAAc,MAAW,MAAM,QAAQ,CAAM,KAAK,EAAO,SAAS;CAElE,iBAAsB,MAAW;EAK/B,AAJA,KAAK,SAAS,SAAS,GAEvB,KAAK,cAAc,IAAI,EAAoB,KAAK,QAAQ,YAAY,GAAG,KAAK,WAAW,KAAK,SAAS,MAAM,CAAC,CAAC,GAE7G,KAAK,QAAQ;CACf;CAEA,UAAU;EACR,IAAI,CAAC,KAAK,UAAU,CAAC,KAAK,UACxB;EAGF,IAAM,IAAK,EAAM,cAAc,GAAM;GACnC,OAAO,KAAK;GACZ,SAAS,KAAK;GACd,iBAAiB,KAAK;EACxB,CAAC;EAMD,AAJA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;GACnB,EAAW,IAAI;EACjB,CAAC;CACH;CAEA,uBAAuB;EACrB,AAAI,KAAK,SACP,KAAK,MAAM,QAAQ;CAEvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/player-events/dist/index.js","../../../../../lib-react/icons/dist/correct-response-icon.js","../../../../../lib-react/graphing/dist/key-legend.js","../../../../../lib-react/correct-answer-toggle/dist/expander.js","../../../../../lib-react/correct-answer-toggle/dist/index.js","../../../src/delivery/main.tsx","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { e as ModelSetEvent, t as SessionChangedEvent };\n","import \"react\";\nimport e from \"prop-types\";\nimport { jsx as t, jsxs as n } from \"react/jsx-runtime\";\nimport { styled as r } from \"@mui/material/styles\";\n//#region src/correct-response-icon.tsx\nvar i = ({ bgFill: e, fgFill: r }) => /* @__PURE__ */ n(\"svg\", {\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-283 359 34 35\",\n\tstyle: { enableBackground: \"new -283 359 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-266\",\n\t\t\tcy: \"375.9\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\ni.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired\n};\nvar a = ({ bgFill: e, fgFill: r, borderFill: i }) => /* @__PURE__ */ n(\"svg\", {\n\tpreserveAspectRatio: \"xMinYMin meet\",\n\tversion: \"1.1\",\n\tviewBox: \"-129.5 127 34 35\",\n\tstyle: { enableBackground: \"new -129.5 127 34 35\" },\n\tchildren: [\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#D0CAC5\",\n\t\t\t\tstroke: \"#E6E3E0\",\n\t\t\t\tstrokeWidth: .75,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\\n C-97.4,153.5-104.3,160.4-112.9,160.4z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\tstyle: {\n\t\t\t\tfill: \"#B3ABA4\",\n\t\t\t\tstroke: \"#CDC7C2\",\n\t\t\t\tstrokeWidth: .5,\n\t\t\t\tstrokeMiterlimit: 10\n\t\t\t},\n\t\t\td: \"M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z\"\n\t\t}),\n\t\t/* @__PURE__ */ t(\"circle\", {\n\t\t\tcx: \"-114.2\",\n\t\t\tcy: \"143.5\",\n\t\t\tr: \"14\",\n\t\t\tfill: e\n\t\t}),\n\t\t/* @__PURE__ */ t(\"path\", {\n\t\t\td: \"M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z\",\n\t\t\tfill: i\n\t\t}),\n\t\t/* @__PURE__ */ t(\"polygon\", {\n\t\t\tpoints: \"-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2\",\n\t\t\tfill: r\n\t\t})\n\t]\n});\na.propTypes = {\n\tbgFill: e.string.isRequired,\n\tfgFill: e.string.isRequired,\n\tborderFill: e.string.isRequired\n};\nvar o = r(\"div\")(({ size: e }) => ({\n\twidth: e || \"25px\",\n\theight: e || \"25px\"\n})), s = ({ open: e, size: n }) => /* @__PURE__ */ t(o, {\n\tsize: n,\n\tchildren: e ? /* @__PURE__ */ t(i, {\n\t\tbgFill: \"#bce2ff\",\n\t\tfgFill: \"#1a9cff\"\n\t}) : /* @__PURE__ */ t(a, {\n\t\tbgFill: \"white\",\n\t\tfgFill: \"#1a9cff\",\n\t\tborderFill: \"#bce2ff\"\n\t})\n});\ns.propTypes = {\n\topen: e.bool,\n\tsize: e.string\n}, s.defaultProps = { open: !1 };\n//#endregion\nexport { s as default };\n","import \"react\";\nimport e from \"prop-types\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { jsx as n, jsxs as r } from \"react/jsx-runtime\";\nimport { color as i } from \"@pie-lib/render-ui\";\n//#region src/key-legend.tsx\nvar a = t(\"div\")(() => ({\n\tbackgroundColor: i.defaults.WHITE,\n\tpadding: \"20px\",\n\twidth: \"355px\",\n\tboxShadow: \"0px 1px 5px 0px #9297A6\"\n})), o = t(\"div\")({\n\tdisplay: \"flex\",\n\talignItems: \"center\",\n\tpadding: \"10px\"\n}), s = t(\"div\")(({ theme: e }) => ({\n\tfontSize: e.typography.h6.fontSize,\n\tmarginLeft: \"30px\",\n\tfontWeight: \"700\",\n\tmarginBottom: \"10px\"\n})), c = t(\"div\")({\n\ttextAlign: \"right\",\n\tmarginRight: \"10px\",\n\twidth: \"175px\",\n\tfontSize: \"15px\"\n}), l = ({ className: e, isLabelAvailable: t }) => /* @__PURE__ */ r(a, {\n\tclassName: e,\n\tchildren: [\n\t\t/* @__PURE__ */ n(s, { children: \"Key\" }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Missing Required Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"34\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 34 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"33\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\",\n\t\t\t\t\tstroke: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M17.25 6.13965V3.2334C17.25 2.92871 17.4844 2.6709 17.8125 2.6709H20.7188C20.8594 2.6709 21 2.81152 21 2.95215V3.51465C21 3.67871 20.8594 3.7959 20.7188 3.7959H18.375V6.13965C18.375 6.30371 18.2344 6.4209 18.0938 6.4209H17.5312C17.3672 6.4209 17.25 6.30371 17.25 6.13965ZM24 2.95215C24 2.81152 24.1172 2.6709 24.2812 2.6709H27.1875C27.4922 2.6709 27.75 2.92871 27.75 3.2334V6.13965C27.75 6.30371 27.6094 6.4209 27.4688 6.4209H26.9062C26.7422 6.4209 26.625 6.30371 26.625 6.13965V3.7959H24.2812C24.1172 3.7959 24 3.67871 24 3.51465V2.95215ZM27.4688 9.4209C27.6094 9.4209 27.75 9.56152 27.75 9.70215V12.6084C27.75 12.9365 27.4922 13.1709 27.1875 13.1709H24.2812C24.1172 13.1709 24 13.0537 24 12.8896V12.3271C24 12.1865 24.1172 12.0459 24.2812 12.0459H26.625V9.70215C26.625 9.56152 26.7422 9.4209 26.9062 9.4209H27.4688ZM21 12.8896C21 13.0537 20.8594 13.1709 20.7188 13.1709H17.8125C17.4844 13.1709 17.25 12.9365 17.25 12.6084V9.70215C17.25 9.56152 17.3672 9.4209 17.5312 9.4209H18.0938C18.2344 9.4209 18.375 9.56152 18.375 9.70215V12.0459H20.7188C20.8594 12.0459 21 12.1865 21 12.3271V12.8896Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M9.23438 8.21045L10.9219 9.89795C11.0156 9.9917 11.0156 10.1636 10.9219 10.2573L10.5312 10.6479C10.4375 10.7417 10.2656 10.7417 10.1719 10.6479L8.5 8.96045L6.8125 10.6479C6.71875 10.7417 6.54688 10.7417 6.45312 10.6479L6.0625 10.2573C5.96875 10.1636 5.96875 9.9917 6.0625 9.89795L7.75 8.21045L6.0625 6.53857C5.96875 6.44482 5.96875 6.27295 6.0625 6.1792L6.45312 5.78857C6.54688 5.69482 6.71875 5.69482 6.8125 5.78857L8.5 7.47607L10.1719 5.78857C10.2656 5.69482 10.4375 5.69482 10.5312 5.78857L10.9219 6.1792C11.0156 6.27295 11.0156 6.44482 10.9219 6.53857L9.23438 8.21045Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Answer Key Correct \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"75\",\n\t\t\theight: \"15\",\n\t\t\tviewBox: \"0 0 75 15\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"7.5\",\n\t\t\t\t\tcy: \"7.5\",\n\t\t\t\t\tr: \"7.5\",\n\t\t\t\t\tfill: \"#6A78A1\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M3.125 5.76562V3.34375C3.125 3.08984 3.32031 2.875 3.59375 2.875H6.01562C6.13281 2.875 6.25 2.99219 6.25 3.10938V3.89062C6.25 4.02734 6.13281 4.125 6.01562 4.125H4.375V5.76562C4.375 5.90234 4.25781 6 4.14062 6H3.35938C3.22266 6 3.125 5.90234 3.125 5.76562ZM8.75 3.10938C8.75 2.99219 8.84766 2.875 8.98438 2.875H11.4062C11.6602 2.875 11.875 3.08984 11.875 3.34375V5.76562C11.875 5.90234 11.7578 6 11.6406 6H10.8594C10.7227 6 10.625 5.90234 10.625 5.76562V4.125H8.98438C8.84766 4.125 8.75 4.02734 8.75 3.89062V3.10938ZM11.6406 8.5C11.7578 8.5 11.875 8.61719 11.875 8.73438V11.1562C11.875 11.4297 11.6602 11.625 11.4062 11.625H8.98438C8.84766 11.625 8.75 11.5273 8.75 11.3906V10.6094C8.75 10.4922 8.84766 10.375 8.98438 10.375H10.625V8.73438C10.625 8.61719 10.7227 8.5 10.8594 8.5H11.6406ZM6.25 11.3906C6.25 11.5273 6.13281 11.625 6.01562 11.625H3.59375C3.32031 11.625 3.125 11.4297 3.125 11.1562V8.73438C3.125 8.61719 3.22266 8.5 3.35938 8.5H4.14062C4.25781 8.5 4.375 8.61719 4.375 8.73438V10.375H6.01562C6.13281 10.375 6.25 10.4922 6.25 10.6094V11.3906Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M75 7L15 7\",\n\t\t\t\t\tstroke: \"#6A78A1\",\n\t\t\t\t\tstrokeDasharray: \"4 2\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Answer Key Correct Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"30\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 30 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"29\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"29\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#6A78A1\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M4.37793 10.2061H6.58984V11.5H2.91309V4.44434H4.37793V10.2061ZM11.6387 10.1377C11.6387 10.6715 11.6794 11.0801 11.7607 11.3633V11.5H10.4473L10.335 10.9531C10.1559 11.168 9.92155 11.3291 9.63184 11.4365C9.34212 11.5439 9.03939 11.5977 8.72363 11.5977C8.55762 11.5977 8.40137 11.583 8.25488 11.5537C8.1084 11.5244 7.9668 11.4756 7.83008 11.4072C7.69661 11.3356 7.58105 11.2477 7.4834 11.1436C7.38574 11.0394 7.30762 10.9076 7.24902 10.748C7.19043 10.5853 7.16113 10.403 7.16113 10.2012C7.16113 9.99935 7.19206 9.81868 7.25391 9.65918C7.31576 9.49642 7.39714 9.3597 7.49805 9.24902C7.59896 9.13835 7.73079 9.03906 7.89355 8.95117C8.05632 8.86328 8.22233 8.79167 8.3916 8.73633C8.56087 8.68099 8.75944 8.62891 8.9873 8.58008L9.8125 8.39453C9.98828 8.35221 10.112 8.30013 10.1836 8.23828C10.2585 8.17318 10.2959 8.08854 10.2959 7.98438C10.2959 7.75977 10.2129 7.59863 10.0469 7.50098C9.88411 7.40332 9.68555 7.35449 9.45117 7.35449C8.875 7.35449 8.54785 7.61003 8.46973 8.12109L7.22461 7.89648C7.32878 7.37891 7.57129 6.99805 7.95215 6.75391C8.33301 6.50651 8.85872 6.38281 9.5293 6.38281C10.9355 6.38281 11.6387 6.98665 11.6387 8.19434V10.1377ZM9.16309 10.6455C9.5179 10.6455 9.80762 10.5251 10.0322 10.2842C10.2568 10.04 10.3691 9.68034 10.3691 9.20508L9.17773 9.54199C8.95964 9.59408 8.79199 9.66243 8.6748 9.74707C8.56087 9.83171 8.50391 9.95215 8.50391 10.1084C8.50391 10.2809 8.56576 10.4144 8.68945 10.5088C8.81315 10.5999 8.97103 10.6455 9.16309 10.6455ZM15.96 6.38281C16.2887 6.38281 16.5996 6.44303 16.8926 6.56348C17.1855 6.68392 17.4411 6.85482 17.6592 7.07617C17.8805 7.29427 18.0547 7.56934 18.1816 7.90137C18.3086 8.2334 18.3721 8.59961 18.3721 9C18.3721 9.40039 18.3086 9.7666 18.1816 10.0986C18.0547 10.4307 17.8805 10.7074 17.6592 10.9287C17.4411 11.1468 17.1855 11.3161 16.8926 11.4365C16.5996 11.557 16.2887 11.6172 15.96 11.6172C15.6084 11.6172 15.291 11.5505 15.0078 11.417C14.7279 11.2803 14.5179 11.0898 14.3779 10.8457L14.3438 11.5H13.0107V4H14.417V7.09082C14.5602 6.86621 14.7686 6.69206 15.042 6.56836C15.3187 6.44466 15.6247 6.38281 15.96 6.38281ZM15.6328 10.4502C16.0169 10.4502 16.3343 10.3184 16.585 10.0547C16.8389 9.79102 16.9658 9.43945 16.9658 9C16.9658 8.55729 16.8389 8.2041 16.585 7.94043C16.3343 7.67676 16.0169 7.54492 15.6328 7.54492C15.2552 7.54492 14.9395 7.68001 14.6855 7.9502C14.4316 8.21712 14.3047 8.56706 14.3047 9C14.3047 9.43294 14.43 9.78288 14.6807 10.0498C14.9346 10.3167 15.252 10.4502 15.6328 10.4502ZM24.1582 8.91699L24.1436 9.25391H20.4229C20.4521 9.6543 20.5856 9.96029 20.8232 10.1719C21.0609 10.3835 21.3555 10.4893 21.707 10.4893C21.9609 10.4893 22.1807 10.4323 22.3662 10.3184C22.555 10.2012 22.6966 10.0319 22.791 9.81055L24.0801 10.001C23.9141 10.5055 23.6211 10.8978 23.2012 11.1777C22.7812 11.4577 22.2865 11.5977 21.7168 11.5977C20.8965 11.5977 20.2438 11.3682 19.7588 10.9092C19.277 10.4469 19.0361 9.80729 19.0361 8.99023C19.0361 8.17969 19.2786 7.54167 19.7637 7.07617C20.2487 6.60742 20.8851 6.37305 21.6729 6.37305C22.4215 6.37305 23.0221 6.58626 23.4746 7.0127C23.9271 7.43913 24.1549 8.07389 24.1582 8.91699ZM21.6826 7.36914C20.999 7.36914 20.5921 7.69141 20.4619 8.33594H22.7666C22.7308 8.02344 22.6152 7.78418 22.4199 7.61816C22.2246 7.45215 21.9788 7.36914 21.6826 7.36914ZM25.2275 11.5V4H26.6484V11.5H25.2275Z\",\n\t\t\t\t\tfill: \"#6A78A1\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Incorrect \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"77\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 77 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"8\",\n\t\t\t\t\tcy: \"8\",\n\t\t\t\t\tr: \"8\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M9.04688 8.5L11.3906 10.8672C11.6953 11.1484 11.6953 11.6172 11.3906 11.8984L10.875 12.4141C10.5938 12.7188 10.125 12.7188 9.84375 12.4141L7.5 10.0703L5.13281 12.4141C4.85156 12.7188 4.38281 12.7188 4.10156 12.4141L3.58594 11.8984C3.28125 11.6172 3.28125 11.1484 3.58594 10.8672L5.92969 8.5L3.58594 6.15625C3.28125 5.875 3.28125 5.40625 3.58594 5.125L4.10156 4.60938C4.38281 4.30469 4.85156 4.30469 5.13281 4.60938L7.5 6.95312L9.84375 4.60938C10.125 4.30469 10.5938 4.30469 10.875 4.60938L11.3906 5.125C11.6953 5.40625 11.6953 5.875 11.3906 6.15625L9.04688 8.5Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M77 8L15 8\",\n\t\t\t\t\tstroke: \"#BF0D00\",\n\t\t\t\t\tstrokeWidth: \"3\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Incorrect Student Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"42\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 42 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"41\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"41\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M7.23438 8.5L8.92188 10.1875C9.01562 10.2812 9.01562 10.4531 8.92188 10.5469L8.53125 10.9375C8.4375 11.0312 8.26562 11.0312 8.17188 10.9375L6.5 9.25L4.8125 10.9375C4.71875 11.0312 4.54688 11.0312 4.45312 10.9375L4.0625 10.5469C3.96875 10.4531 3.96875 10.2812 4.0625 10.1875L5.75 8.5L4.0625 6.82812C3.96875 6.73438 3.96875 6.5625 4.0625 6.46875L4.45312 6.07812C4.54688 5.98438 4.71875 5.98438 4.8125 6.07812L6.5 7.76562L8.17188 6.07812C8.26562 5.98438 8.4375 5.98438 8.53125 6.07812L8.92188 6.46875C9.01562 6.5625 9.01562 6.73438 8.92188 6.82812L7.23438 8.5Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M14.9531 10.7041H17.3408V11.5H14.0791V4.625H14.9531V10.7041ZM19.5869 11.5928C19.1605 11.5928 18.8089 11.4837 18.5322 11.2656C18.2588 11.0443 18.1221 10.7155 18.1221 10.2793C18.1221 10.0384 18.166 9.83008 18.2539 9.6543C18.3418 9.47526 18.472 9.32878 18.6445 9.21484C18.8171 9.10091 19.0042 9.01139 19.2061 8.94629C19.4111 8.87793 19.6553 8.81934 19.9385 8.77051L20.7148 8.64355C20.998 8.59147 21.1396 8.44336 21.1396 8.19922C21.1396 7.8737 21.0387 7.63607 20.8369 7.48633C20.6383 7.33333 20.3861 7.25684 20.0801 7.25684C19.7806 7.25684 19.5299 7.33008 19.3281 7.47656C19.1263 7.62305 19.0075 7.84766 18.9717 8.15039L18.21 7.98926C18.2816 7.53353 18.4818 7.19173 18.8105 6.96387C19.1393 6.73275 19.5755 6.61719 20.1191 6.61719C20.373 6.61719 20.6042 6.64648 20.8125 6.70508C21.0241 6.76042 21.2178 6.84993 21.3936 6.97363C21.5726 7.09408 21.7109 7.2666 21.8086 7.49121C21.9095 7.71257 21.96 7.97461 21.96 8.27734V10.2598C21.96 10.5072 21.9958 10.6748 22.0674 10.7627C22.1423 10.8473 22.2692 10.8896 22.4482 10.8896H22.5264V11.5H22.1064C21.5889 11.5 21.2861 11.2835 21.1982 10.8506H21.1592C20.7946 11.3454 20.2705 11.5928 19.5869 11.5928ZM19.7822 10.9092C20.2087 10.9092 20.5521 10.7546 20.8125 10.4453C21.0729 10.1361 21.2031 9.71289 21.2031 9.17578L19.9336 9.41992C19.5983 9.47526 19.3493 9.56478 19.1865 9.68848C19.027 9.80892 18.9473 9.98307 18.9473 10.2109C18.9473 10.4486 19.0238 10.6243 19.1768 10.7383C19.333 10.8522 19.5348 10.9092 19.7822 10.9092ZM26.2666 6.60742C26.8916 6.60742 27.4206 6.83854 27.8535 7.30078C28.2865 7.76302 28.5029 8.36361 28.5029 9.10254C28.5029 9.84473 28.2881 10.4469 27.8584 10.9092C27.4287 11.3714 26.8981 11.6025 26.2666 11.6025C25.889 11.6025 25.5472 11.5098 25.2412 11.3242C24.9385 11.1387 24.7106 10.8864 24.5576 10.5674L24.5381 11.5H23.7227V4H24.5625L24.5674 7.61816C24.7236 7.30566 24.9515 7.0599 25.251 6.88086C25.5537 6.69857 25.8923 6.60742 26.2666 6.60742ZM26.0811 10.8701C26.527 10.8701 26.9014 10.7074 27.2041 10.3818C27.5068 10.0531 27.6582 9.62663 27.6582 9.10254C27.6582 8.57845 27.5068 8.15365 27.2041 7.82812C26.9014 7.49935 26.527 7.33496 26.0811 7.33496C25.6416 7.33496 25.2705 7.50423 24.9678 7.84277C24.665 8.18132 24.5137 8.60124 24.5137 9.10254C24.5137 9.6071 24.6634 10.0286 24.9629 10.3672C25.2656 10.7025 25.6383 10.8701 26.0811 10.8701ZM34.0352 9.00488L34.0254 9.23438H30.2754C30.2884 9.76823 30.4414 10.1784 30.7344 10.4648C31.0273 10.748 31.3919 10.8896 31.8281 10.8896C32.1211 10.8896 32.3864 10.8132 32.624 10.6602C32.8617 10.5072 33.0439 10.2956 33.1709 10.0254L33.9326 10.1865C33.7601 10.6227 33.4867 10.9661 33.1123 11.2168C32.738 11.4674 32.3132 11.5928 31.8379 11.5928C31.125 11.5928 30.5488 11.3698 30.1094 10.9238C29.6699 10.4779 29.4502 9.86914 29.4502 9.09766C29.4502 8.32943 29.6699 7.72233 30.1094 7.27637C30.5521 6.8304 31.1201 6.60742 31.8135 6.60742C32.484 6.60742 33.0212 6.8125 33.4248 7.22266C33.8317 7.63281 34.0352 8.22689 34.0352 9.00488ZM31.8135 7.25684C31.4163 7.25684 31.0827 7.37077 30.8125 7.59863C30.5456 7.82324 30.3779 8.15202 30.3096 8.58496H33.1855C33.153 8.15202 33.013 7.82324 32.7656 7.59863C32.5182 7.37077 32.2008 7.25684 31.8135 7.25684ZM35.3633 11.5V4H36.2178V11.5H35.3633Z\",\n\t\t\t\t\tfill: \"#BF0D00\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] }),\n\t\t/* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Correct \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"76\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 76 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M76 8L14 8\",\n\t\t\t\t\tstroke: \"#0B7D38\",\n\t\t\t\t\tstrokeWidth: \"3\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"circle\", {\n\t\t\t\t\tcx: \"8\",\n\t\t\t\t\tcy: \"8\",\n\t\t\t\t\tr: \"8\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M12.1953 4.46875C12.3125 4.35156 12.5 4.35156 12.5938 4.46875L13.2734 5.125C13.3672 5.24219 13.3672 5.42969 13.2734 5.52344L6.24219 12.5547C6.125 12.6719 5.96094 12.6719 5.84375 12.5547L2.70312 9.4375C2.60938 9.32031 2.60938 9.13281 2.70312 9.03906L3.38281 8.35938C3.47656 8.26562 3.66406 8.26562 3.78125 8.35938L6.03125 10.6328L12.1953 4.46875Z\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t\" \"\n\t\t\t]\n\t\t})] }),\n\t\tt && /* @__PURE__ */ r(o, { children: [/* @__PURE__ */ n(c, { children: \" Student Correct Label \" }), /* @__PURE__ */ r(\"svg\", {\n\t\t\twidth: \"43\",\n\t\t\theight: \"16\",\n\t\t\tviewBox: \"0 0 43 16\",\n\t\t\tfill: \"none\",\n\t\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\t\tchildren: [\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"42\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tfill: \"white\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"rect\", {\n\t\t\t\t\tx: \"0.5\",\n\t\t\t\t\ty: \"0.5\",\n\t\t\t\t\twidth: \"42\",\n\t\t\t\t\theight: \"15\",\n\t\t\t\t\trx: \"3.5\",\n\t\t\t\t\tstroke: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M11.7969 5.3125C11.875 5.23438 12 5.23438 12.0625 5.3125L12.5156 5.75C12.5781 5.82812 12.5781 5.95312 12.5156 6.01562L7.82812 10.7031C7.75 10.7812 7.64062 10.7812 7.5625 10.7031L5.46875 8.625C5.40625 8.54688 5.40625 8.42188 5.46875 8.35938L5.92188 7.90625C5.98438 7.84375 6.10938 7.84375 6.1875 7.90625L7.6875 9.42188L11.7969 5.3125Z\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t}),\n\t\t\t\t/* @__PURE__ */ n(\"path\", {\n\t\t\t\t\td: \"M15.9531 10.7041H18.3408V11.5H15.0791V4.625H15.9531V10.7041ZM20.5869 11.5928C20.1605 11.5928 19.8089 11.4837 19.5322 11.2656C19.2588 11.0443 19.1221 10.7155 19.1221 10.2793C19.1221 10.0384 19.166 9.83008 19.2539 9.6543C19.3418 9.47526 19.472 9.32878 19.6445 9.21484C19.8171 9.10091 20.0042 9.01139 20.2061 8.94629C20.4111 8.87793 20.6553 8.81934 20.9385 8.77051L21.7148 8.64355C21.998 8.59147 22.1396 8.44336 22.1396 8.19922C22.1396 7.8737 22.0387 7.63607 21.8369 7.48633C21.6383 7.33333 21.3861 7.25684 21.0801 7.25684C20.7806 7.25684 20.5299 7.33008 20.3281 7.47656C20.1263 7.62305 20.0075 7.84766 19.9717 8.15039L19.21 7.98926C19.2816 7.53353 19.4818 7.19173 19.8105 6.96387C20.1393 6.73275 20.5755 6.61719 21.1191 6.61719C21.373 6.61719 21.6042 6.64648 21.8125 6.70508C22.0241 6.76042 22.2178 6.84993 22.3936 6.97363C22.5726 7.09408 22.7109 7.2666 22.8086 7.49121C22.9095 7.71257 22.96 7.97461 22.96 8.27734V10.2598C22.96 10.5072 22.9958 10.6748 23.0674 10.7627C23.1423 10.8473 23.2692 10.8896 23.4482 10.8896H23.5264V11.5H23.1064C22.5889 11.5 22.2861 11.2835 22.1982 10.8506H22.1592C21.7946 11.3454 21.2705 11.5928 20.5869 11.5928ZM20.7822 10.9092C21.2087 10.9092 21.5521 10.7546 21.8125 10.4453C22.0729 10.1361 22.2031 9.71289 22.2031 9.17578L20.9336 9.41992C20.5983 9.47526 20.3493 9.56478 20.1865 9.68848C20.027 9.80892 19.9473 9.98307 19.9473 10.2109C19.9473 10.4486 20.0238 10.6243 20.1768 10.7383C20.333 10.8522 20.5348 10.9092 20.7822 10.9092ZM27.2666 6.60742C27.8916 6.60742 28.4206 6.83854 28.8535 7.30078C29.2865 7.76302 29.5029 8.36361 29.5029 9.10254C29.5029 9.84473 29.2881 10.4469 28.8584 10.9092C28.4287 11.3714 27.8981 11.6025 27.2666 11.6025C26.889 11.6025 26.5472 11.5098 26.2412 11.3242C25.9385 11.1387 25.7106 10.8864 25.5576 10.5674L25.5381 11.5H24.7227V4H25.5625L25.5674 7.61816C25.7236 7.30566 25.9515 7.0599 26.251 6.88086C26.5537 6.69857 26.8923 6.60742 27.2666 6.60742ZM27.0811 10.8701C27.527 10.8701 27.9014 10.7074 28.2041 10.3818C28.5068 10.0531 28.6582 9.62663 28.6582 9.10254C28.6582 8.57845 28.5068 8.15365 28.2041 7.82812C27.9014 7.49935 27.527 7.33496 27.0811 7.33496C26.6416 7.33496 26.2705 7.50423 25.9678 7.84277C25.665 8.18132 25.5137 8.60124 25.5137 9.10254C25.5137 9.6071 25.6634 10.0286 25.9629 10.3672C26.2656 10.7025 26.6383 10.8701 27.0811 10.8701ZM35.0352 9.00488L35.0254 9.23438H31.2754C31.2884 9.76823 31.4414 10.1784 31.7344 10.4648C32.0273 10.748 32.3919 10.8896 32.8281 10.8896C33.1211 10.8896 33.3864 10.8132 33.624 10.6602C33.8617 10.5072 34.0439 10.2956 34.1709 10.0254L34.9326 10.1865C34.7601 10.6227 34.4867 10.9661 34.1123 11.2168C33.738 11.4674 33.3132 11.5928 32.8379 11.5928C32.125 11.5928 31.5488 11.3698 31.1094 10.9238C30.6699 10.4779 30.4502 9.86914 30.4502 9.09766C30.4502 8.32943 30.6699 7.72233 31.1094 7.27637C31.5521 6.8304 32.1201 6.60742 32.8135 6.60742C33.484 6.60742 34.0212 6.8125 34.4248 7.22266C34.8317 7.63281 35.0352 8.22689 35.0352 9.00488ZM32.8135 7.25684C32.4163 7.25684 32.0827 7.37077 31.8125 7.59863C31.5456 7.82324 31.3779 8.15202 31.3096 8.58496H34.1855C34.153 8.15202 34.013 7.82324 33.7656 7.59863C33.5182 7.37077 33.2008 7.25684 32.8135 7.25684ZM36.3633 11.5V4H37.2178V11.5H36.3633Z\",\n\t\t\t\t\tfill: \"#0B7D38\"\n\t\t\t\t})\n\t\t\t]\n\t\t})] })\n\t]\n});\nl.propTypes = {\n\tclassName: e.string,\n\tisLabelAvailable: e.bool\n};\n//#endregion\nexport { l as default };\n","import { styled as e } from \"@mui/material/styles\";\nimport { CSSTransition as t } from \"react-transition-group\";\nimport { jsx as n } from \"react/jsx-runtime\";\nimport { useRef as r } from \"react\";\nimport i from \"prop-types\";\n//#region src/expander.tsx\nvar a = \"height ease-in 300ms, opacity ease-in 300ms\", o = e(\"div\")(() => ({\n\tposition: \"relative\",\n\theight: 0,\n\toverflow: \"hidden\",\n\tdisplay: \"flex\",\n\tvisibility: \"hidden\",\n\twidth: 0,\n\t\"&.enter\": {\n\t\ttransition: a,\n\t\topacity: 1,\n\t\theight: \"auto\",\n\t\twidth: \"auto\",\n\t\tvisibility: \"visible\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.enter-done\": {\n\t\theight: \"auto\",\n\t\tvisibility: \"visible\",\n\t\twidth: \"auto\",\n\t\tminHeight: \"25px\"\n\t},\n\t\"&.exit\": {\n\t\ttransition: a,\n\t\topacity: 0,\n\t\theight: 0,\n\t\tvisibility: \"visible\",\n\t\twidth: 0\n\t},\n\t\"&.exit-done\": {\n\t\topacity: 0,\n\t\tvisibility: \"hidden\",\n\t\theight: 0,\n\t\twidth: 0\n\t}\n})), s = (e) => {\n\tlet { show: i, children: a, className: s } = e, c = r(null);\n\treturn /* @__PURE__ */ n(t, {\n\t\tnodeRef: c,\n\t\tin: i,\n\t\tappear: !0,\n\t\tmountOnEnter: !1,\n\t\ttimeout: 300,\n\t\tclassNames: {\n\t\t\tenter: \"enter\",\n\t\t\tenterDone: \"enter-done\",\n\t\t\texit: \"exit\",\n\t\t\texitDone: \"exit-done\"\n\t\t},\n\t\tchildren: /* @__PURE__ */ n(o, {\n\t\t\tref: c,\n\t\t\tclassName: s,\n\t\t\tchildren: a\n\t\t})\n\t});\n};\ns.propTypes = {\n\tshow: i.bool.isRequired,\n\tclassName: i.string,\n\tchildren: i.oneOfType([i.arrayOf(i.node), i.node]).isRequired\n};\n//#endregion\nexport { s as default };\n","import e from \"./expander.js\";\nimport { styled as t } from \"@mui/material/styles\";\nimport { CSSTransition as n } from \"react-transition-group\";\nimport { CorrectResponse as r } from \"@pie-lib/icons\";\nimport * as i from \"@pie-lib/render-ui\";\nimport { Readable as a, color as o } from \"@pie-lib/render-ui\";\nimport { jsx as s, jsxs as c } from \"react/jsx-runtime\";\nimport l from \"react\";\nimport u from \"prop-types\";\nimport d from \"@pie-lib/translator\";\n//#region src/index.tsx\nfunction f(e) {\n\treturn typeof e == \"function\" || typeof e == \"object\" && !!e && typeof e.$$typeof == \"symbol\";\n}\nfunction p(e, t) {\n\treturn !e || f(e) ? e : f(e.default) ? e.default : t && f(e[t]) ? e[t] : t && f(e[t]?.default) ? e[t].default : e;\n}\nvar m = p(a, \"Readable\") || p(_.Readable, \"Readable\"), h = i, g = h.default, _ = g && typeof g == \"object\" ? g : h, { translator: v } = d, y = {\n\tWebkitTouchCallout: \"none\",\n\tWebkitUserSelect: \"none\",\n\tKhtmlUserSelect: \"none\",\n\tMozUserSelect: \"none\",\n\tmsUserSelect: \"none\",\n\tuserSelect: \"none\"\n}, b = t(\"div\")(() => ({\n\twidth: \"100%\",\n\tcursor: \"pointer\"\n})), x = t(\"div\")(() => ({\n\tmargin: \"0 auto\",\n\ttextAlign: \"center\",\n\tdisplay: \"flex\"\n})), S = t(\"div\")(() => ({\n\twidth: \"fit-content\",\n\tminWidth: \"140px\",\n\talignSelf: \"center\",\n\tverticalAlign: \"middle\",\n\tcolor: `var(--correct-answer-toggle-label-color, ${o.text()})`,\n\tfontWeight: \"normal\",\n\t...y\n})), C = t(\"div\")(() => ({\n\tposition: \"absolute\",\n\twidth: \"25px\",\n\t\"&.enter\": { opacity: \"0\" },\n\t\"&.enter-active\": {\n\t\topacity: \"1\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t},\n\t\"&.exit\": { opacity: \"1\" },\n\t\"&.exit-active\": {\n\t\topacity: \"0\",\n\t\ttransition: \"opacity 0.3s ease-in\"\n\t}\n})), w = t(\"div\")(() => ({\n\twidth: \"25px\",\n\tmarginRight: \"5px\",\n\tdisplay: \"flex\",\n\talignItems: \"center\"\n})), T = class t extends l.Component {\n\tstatic propTypes = {\n\t\tonToggle: u.func,\n\t\ttoggled: u.bool,\n\t\tshow: u.bool,\n\t\thideMessage: u.string,\n\t\tshowMessage: u.string,\n\t\tclassName: u.string,\n\t\tlanguage: u.string\n\t};\n\tstatic defaultProps = {\n\t\tshowMessage: \"Show correct answer\",\n\t\thideMessage: \"Hide correct answer\",\n\t\tshow: !1,\n\t\ttoggled: !1\n\t};\n\tconstructor(e) {\n\t\tsuper(e), this.state = { show: e.show }, this.openIconRef = l.createRef(), this.closedIconRef = l.createRef(), t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t};\n\t}\n\tonClick() {\n\t\tthis.props.onToggle(!this.props.toggled);\n\t}\n\tonTouch(e) {\n\t\te.preventDefault(), this.props.onToggle(!this.props.toggled);\n\t}\n\tUNSAFE_componentWillReceiveProps(e) {\n\t\tthis.setState({ show: e.show }), e.language !== this.props?.language && (t.defaultProps = {\n\t\t\t...t.defaultProps,\n\t\t\tshowMessage: v.t(\"common:showCorrectAnswer\", { lng: e.language }),\n\t\t\thideMessage: v.t(\"common:hideCorrectAnswer\", { lng: e.language })\n\t\t});\n\t}\n\trender() {\n\t\tlet { className: t, toggled: i, hideMessage: a, showMessage: o } = this.props;\n\t\treturn /* @__PURE__ */ s(b, {\n\t\t\tclassName: t,\n\t\t\tchildren: /* @__PURE__ */ s(e, {\n\t\t\t\tshow: this.state.show,\n\t\t\t\tchildren: /* @__PURE__ */ c(x, {\n\t\t\t\t\tonClick: this.onClick.bind(this),\n\t\t\t\t\tonTouchEnd: this.onTouch.bind(this),\n\t\t\t\t\tchildren: [/* @__PURE__ */ c(w, { children: [/* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.openIconRef,\n\t\t\t\t\t\ttimeout: 400,\n\t\t\t\t\t\tin: i,\n\t\t\t\t\t\texit: !i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.openIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-open\")\n\t\t\t\t\t\t})\n\t\t\t\t\t}), /* @__PURE__ */ s(n, {\n\t\t\t\t\t\tnodeRef: this.closedIconRef,\n\t\t\t\t\t\ttimeout: 5e3,\n\t\t\t\t\t\tin: !i,\n\t\t\t\t\t\texit: i,\n\t\t\t\t\t\tclassNames: {\n\t\t\t\t\t\t\tenter: \"enter\",\n\t\t\t\t\t\t\tenterActive: \"enter-active\",\n\t\t\t\t\t\t\texit: \"exit\",\n\t\t\t\t\t\t\texitActive: \"exit-active\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(C, {\n\t\t\t\t\t\t\tref: this.closedIconRef,\n\t\t\t\t\t\t\tchildren: /* @__PURE__ */ s(r, { open: i }, \"correct-closed\")\n\t\t\t\t\t\t})\n\t\t\t\t\t})] }), /* @__PURE__ */ s(m, {\n\t\t\t\t\t\tfalse: !0,\n\t\t\t\t\t\tchildren: /* @__PURE__ */ s(S, {\n\t\t\t\t\t\t\t\"aria-hidden\": !this.state.show,\n\t\t\t\t\t\t\tchildren: i ? a : o\n\t\t\t\t\t\t})\n\t\t\t\t\t})]\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n};\n//#endregion\nexport { T as CorrectAnswerToggle, T as default };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/src/main.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { GraphContainer, KeyLegend } from '@pie-lib/graphing';\nimport { color, Collapsible as CollapsibleImport, hasText, hasMedia, PreviewPrompt as PreviewPromptImport, UiLayout as UiLayoutImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst UiLayout = unwrapReactInteropSymbol(UiLayoutImport, 'UiLayout') || unwrapReactInteropSymbol(renderUi.UiLayout, 'UiLayout');\nconst PreviewPrompt = unwrapReactInteropSymbol(PreviewPromptImport, 'PreviewPrompt') || unwrapReactInteropSymbol(renderUi.PreviewPrompt, 'PreviewPrompt');\nconst Collapsible = unwrapReactInteropSymbol(CollapsibleImport, 'Collapsible') || unwrapReactInteropSymbol(renderUi.Collapsible, 'Collapsible');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport CorrectAnswerToggle from '@pie-lib/correct-answer-toggle';\n\nconst MainContainer: any = styled(UiLayout)({\n color: color.text(),\n backgroundColor: color.background(),\n});\n\nconst TeacherInstructions: any = styled(Collapsible)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst Graph: any = styled(GraphContainer)(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n}));\n\nexport class Main extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n session: PropTypes.object.isRequired,\n onAnswersChange: PropTypes.func,\n };\n\n state = { showingCorrect: false };\n\n toggleCorrect = (showingCorrect) => this.setState({ showingCorrect });\n\n render() {\n const { model, onAnswersChange, session } = this.props;\n const { showingCorrect } = this.state;\n const { answer } = session || {};\n const {\n answersCorrected,\n arrows,\n backgroundMarks,\n coordinatesOnHover,\n correctResponse,\n defaultTool,\n disabled,\n domain,\n extraCSSRules,\n labels,\n labelsEnabled,\n prompt,\n range,\n rationale,\n showKeyLegend,\n showToggle,\n title,\n titleEnabled,\n teacherInstructions,\n toolbarTools,\n language,\n } = model || {};\n const size = model?.size || model?.graph || {}; // need this for models that are not processed by controller\n const marks = answersCorrected || answer || [];\n const isLabelAvailable = toolbarTools?.includes('label') || false;\n const showRationale = model.rationale && (hasText(model.rationale) || hasMedia(model.rationale));\n const showTeacherInstructions =\n model.teacherInstructions && (hasText(model.teacherInstructions) || hasMedia(model.teacherInstructions));\n\n return (\n <MainContainer extraCSSRules={extraCSSRules}>\n {showTeacherInstructions && (\n <TeacherInstructions\n labels={{ hidden: 'Show Teacher Instructions', visible: 'Hide Teacher Instructions' }}\n >\n <PreviewPrompt prompt={teacherInstructions} />\n </TeacherInstructions>\n )}\n\n {prompt && <PreviewPrompt className=\"prompt\" prompt={prompt} />}\n\n <CorrectAnswerToggle\n show={showToggle}\n toggled={showingCorrect}\n onToggle={this.toggleCorrect}\n language={language}\n />\n\n {showingCorrect && showToggle ? (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n disabled={true}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={correctResponse.map((i) => ({ ...i, correctness: 'correct' }))}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n language={language}\n />\n ) : (\n <Graph\n axesSettings={{ includeArrows: arrows }}\n backgroundMarks={backgroundMarks.filter((mark) => !mark.building)}\n coordinatesOnHover={coordinatesOnHover}\n defaultTool={defaultTool}\n disabled={disabled}\n disabledLabels={true}\n disabledTitle={true}\n domain={domain}\n labels={labels}\n marks={marks}\n onChangeMarks={onAnswersChange}\n range={range}\n showLabels={labelsEnabled}\n showTitle={titleEnabled}\n size={size}\n title={title}\n toolbarTools={toolbarTools}\n language={language}\n limitLabeling={true}\n />\n )}\n {showKeyLegend && !showingCorrect && <KeyLegend isLabelAvailable={isLabelAvailable}></KeyLegend>}\n {showRationale && (\n <Collapsible labels={{ hidden: 'Show Rationale', visible: 'Hide Rationale' }}>\n <PreviewPrompt prompt={rationale} />\n </Collapsible>\n )}\n </MainContainer>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/graphing/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Main from './main.js';\n\nexport { Main as Component };\n\nexport default class Graphing extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n this._mathObserver = null;\n this._mathRenderPending = false;\n }\n\n // The title and axis labels are injected synchronously via dangerouslySetInnerHTML,\n // but createRoot().render() commits asynchronously, so a queueMicrotask(renderMath)\n // would run before the LaTeX spans are in the DOM and leave raw LaTeX on first render.\n // Observing the DOM and typesetting after each commit keeps math in sync regardless of timing.\n _scheduleMathRender: any = () => {\n if (this._mathRenderPending) return;\n this._mathRenderPending = true;\n\n requestAnimationFrame(() => {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n }\n renderMath(this);\n this._mathRenderPending = false;\n setTimeout(() => {\n if (this._mathObserver) {\n this._mathObserver.observe(this, { childList: true, subtree: true });\n }\n }, 50);\n });\n };\n\n _initMathObserver() {\n if (this._mathObserver) return;\n this._mathObserver = new MutationObserver(this._scheduleMathRender);\n this._mathObserver.observe(this, { childList: true, subtree: true });\n }\n\n _disconnectMathObserver() {\n if (this._mathObserver) {\n this._mathObserver.disconnect();\n this._mathObserver = null;\n }\n }\n\n set model(m) {\n this._model = m;\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n connectedCallback() {\n this._initMathObserver();\n this._render();\n }\n\n isComplete = (answer) => Array.isArray(answer) && answer.length > 0;\n\n changeAnswers: any = (answer) => {\n this._session.answer = answer;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isComplete(this._session.answer)));\n\n this._render();\n };\n\n _render() {\n if (!this._model || !this._session) {\n return;\n }\n\n this._initMathObserver();\n\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onAnswersChange: this.changeAnswers,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n }\n\n disconnectedCallback() {\n this._disconnectMathObserver();\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }\n}\n"],"mappings":";;;;;CACQ,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;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