@pie-element/charting 12.1.2-next.21 → 12.1.2-next.23

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 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/controller/defaults.ts","../../../../../../shared/controller-utils/dist/index.js","../../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/charting/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/**\n * NOTE: There's no functionality described for graphTitle,\n * rationale, scoringType, studentInstructions, teacherInstructions\n * so there's no implementation (they are only added in model)\n */\n\nexport default {\n addCategoryEnabled: true,\n changeAddCategoryEnabled: false,\n changeEditableEnabled: false,\n changeInteractiveEnabled: false,\n chartType: 'lineCross',\n correctAnswer: {},\n data: [],\n domain: {},\n graph: { width: 480, height: 480 },\n prompt: '',\n promptEnabled: true,\n range: { label: '', max: 1, min: 0, labelStep: 1 },\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'all or nothing',\n studentInstructionsEnabled: true,\n studentNewCategoryDefaultLabel: 'New Category',\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\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/charting/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';\nimport { isEmpty, isEqual, pick } from '@pie-element/shared-lodash';\nimport defaults from './defaults.js';\n\nimport { partialScoring } from '@pie-element/shared-controller-utils';\n\nconst log = debug('@pie-element:graphing:controller');\n\nconst lowerCase = (string) => (string || '').toLowerCase();\n\nexport const checkLabelsEquality = (givenAnswerLabel, correctAnswerLabel) =>\n lowerCase(givenAnswerLabel) === lowerCase(correctAnswerLabel);\n\nexport const setCorrectness = (answers, partialScoring) =>\n answers\n ? answers.map((answer) => ({\n ...answer,\n correctness: {\n value: partialScoring ? 'incorrect' : 'correct',\n label: partialScoring ? 'incorrect' : 'correct',\n },\n }))\n : [];\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport const getScore = (question, session, env = {}) => {\n const { correctAnswer, data: initialData = [], scoringType } = question;\n let correctResponses = [];\n\n const isPartialScoring = partialScoring.enabled(\n { partialScoring: scoringType !== undefined ? scoringType === 'partial scoring' : scoringType },\n env,\n );\n\n const { data: correctAnswers = [] } = correctAnswer || {};\n const defaultAnswers = filterCategories(initialData);\n\n let answers = setCorrectness((session && session.answer) || defaultAnswers, isPartialScoring);\n\n let result = 0;\n\n if (isPartialScoring) {\n // if score type is \"partial scoring\"\n // maxScore is calculated based on the correct response\n // score is calculated based on the given response\n let maxScore = 0;\n let score = 0;\n\n const scoreForLabelAndValueEditable = (answer, corrAnswer) => {\n const { value, label, index } = answer;\n const valueIsCorrect = value === corrAnswer.value;\n const labelIsCorrect = checkLabelsEquality(label, corrAnswer.label);\n maxScore += 2;\n\n if (valueIsCorrect) {\n score += 1;\n answer.correctness.value = 'correct';\n }\n\n if (labelIsCorrect) {\n score += 1;\n answer.correctness.label = 'correct';\n }\n\n if (valueIsCorrect && labelIsCorrect) {\n correctResponses.push({ label: label, index: index });\n }\n };\n\n // if given answer has more categories than the correct answers, the \"extra\" will be ignored\n correctAnswers.forEach((corrAnswer, index) => {\n const defaultAnswer = defaultAnswers[index];\n const answer = answers[index];\n\n // if there is a corresponding category at the same position in the given answer\n if (answer) {\n // if there is a corresponding category at the same position in the default answer\n if (defaultAnswer) {\n // if category's label (in default answer) was not editable\n // it means that this category values only one point (only the value can be changed)\n if (!defaultAnswer.editable && answer.interactive) {\n maxScore += 1;\n\n if (answer.value === corrAnswer.value) {\n score += 1;\n answer.correctness.value = 'correct';\n correctResponses.push({ label: answer.label, index: index });\n }\n answer.correctness.label = 'correct';\n\n // if category's label (in default answer) was editable\n // it means that this category values 2 points (both label and value can be changed)\n } else if (defaultAnswer.editable && answer.interactive) {\n scoreForLabelAndValueEditable(answer, corrAnswer);\n } else if (!answer.interactive) {\n answer.correctness.value = 'correct';\n answer.correctness.label = 'correct';\n correctResponses.push({ label: answer.label, index: index });\n }\n } else {\n // if there is not a corresponding category at the same position in the default answer\n scoreForLabelAndValueEditable(answer, corrAnswer);\n }\n } else {\n // if there is not a corresponding category at the same position in the given answer\n // it means that the given answer has less categories than the correct answer\n maxScore += 2;\n }\n });\n\n result = maxScore ? score / maxScore : 0;\n } else {\n // all-or-nothing scoring: overall score is 1 only if lengths and all values/labels match\n result = correctAnswers.length === answers.length ? 1 : 0;\n\n // regardless of overall result, mark each answer individually for user feedback\n answers = answers.map((answer, index) => {\n const correctAnswer = correctAnswers[index];\n const valueIsCorrect = correctAnswer ? answer.value === correctAnswer.value : false;\n const labelIsCorrect = correctAnswer ? lowerCase(answer.label) === lowerCase(correctAnswer.label) : false;\n\n if (!valueIsCorrect || !labelIsCorrect) {\n result = 0;\n }\n\n if (valueIsCorrect && labelIsCorrect) {\n correctResponses.push({ label: answer.label, index });\n }\n\n return {\n ...answer,\n correctness: {\n value: valueIsCorrect ? 'correct' : 'incorrect',\n label: labelIsCorrect ? 'correct' : 'incorrect',\n },\n };\n });\n }\n\n const score = {\n score: parseFloat(result.toFixed(2)),\n answers,\n };\n\n if (env.extraProps && env.extraProps.correctResponseEnabled) {\n score.correctResponses = correctResponses;\n }\n\n return score;\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 = (model, session, env) => {\n const traceLog = [];\n\n const { correctAnswer, data: initialData = [], scoringType } = model || {};\n const { data: correctAnswers = [] } = correctAnswer || {};\n const studentAnswers = (session && session.answer) || [];\n\n const isPartialScoring = partialScoring.enabled(\n { partialScoring: scoringType !== undefined ? scoringType === 'partial scoring' : scoringType },\n env\n );\n\n const defaultAnswers = filterCategories(initialData);\n const answers = studentAnswers.length > 0 ? filterCategories(studentAnswers) : defaultAnswers;\n\n if (!studentAnswers.length) {\n traceLog.push(`Student did not modify the chart. Initial chart is scored.`);\n }\n\n correctAnswers.forEach((correct, index) => {\n const initial = defaultAnswers[index];\n const student = answers[index];\n\n if (!student) {\n traceLog.push(`Category ${index + 1}: missing (expected value '${correct.value}', label '${correct.label}').`);\n return;\n }\n\n const valueCorrect = student.value === correct.value;\n const labelCorrect = checkLabelsEquality(student.label, correct.label);\n\n if (!student.interactive) {\n traceLog.push(`Category ${index + 1}: non-interactive category treated as correct.`);\n return;\n }\n\n if (studentAnswers.length > 0) {\n const valueChanged = initial ? student.value !== initial.value : true;\n const labelChanged = initial ? !checkLabelsEquality(student.label, initial.label) : true;\n\n if (!valueChanged && !labelChanged) {\n if (valueCorrect && labelCorrect) {\n traceLog.push(`Category ${index + 1}: unchanged from initial value and correct.`);\n } else {\n traceLog.push(`Category ${index + 1}: unchanged from initial value but incorrect.`);\n }\n return;\n }\n\n const parts = [];\n if (valueChanged) {\n parts.push(`value ${valueCorrect ? 'correct' : 'incorrect'}`);\n }\n if (labelChanged) {\n parts.push(`label ${labelCorrect ? 'correct' : 'incorrect'}`);\n }\n traceLog.push(`Category ${index + 1}: modified - ${parts.join(', ')}.`);\n } else {\n if (valueCorrect && labelCorrect) {\n traceLog.push(`Category ${index + 1}: initial values are correct.`);\n } else if (valueCorrect) {\n traceLog.push(`Category ${index + 1}: initial value correct, label incorrect.`);\n } else if (labelCorrect) {\n traceLog.push(`Category ${index + 1}: initial value incorrect, label correct.`);\n } else {\n traceLog.push(`Category ${index + 1}: initial value and label incorrect.`);\n }\n }\n });\n\n if (answers.length > correctAnswers.length) {\n const extra = answers.length - correctAnswers.length;\n traceLog.push(`${extra} extra category(ies) provided beyond expected number.`);\n }\n\n if (isPartialScoring) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push('Student receives credit for each correct value and label independently.');\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push('Student must match all category values and labels exactly for full credit.');\n }\n\n const scoreObject = getScore(model, session, env);\n traceLog.push(`Score: ${scoreObject.score}.`);\n\n return traceLog;\n};\n\n\n// eslint-disable-next-line no-unused-vars\nexport const filterCategories = (categories) => (categories ? categories.map(({ deletable, ...rest }) => rest) : []);\n\nexport function model(question, session, env) {\n return new Promise((resolve) => {\n const normalizedQuestion = normalize(question);\n const {\n addCategoryEnabled,\n chartType,\n data,\n domain,\n graph,\n prompt,\n promptEnabled,\n range,\n rationale,\n title,\n rationaleEnabled,\n teacherInstructions,\n teacherInstructionsEnabled,\n correctAnswer,\n scoringType,\n studentNewCategoryDefaultLabel,\n language,\n extraCSSRules,\n } = normalizedQuestion;\n\n const correctInfo = { correctness: 'incorrect', score: '0%' };\n\n const base = {\n addCategoryEnabled,\n chartType,\n data: filterCategories(data),\n domain,\n graph,\n prompt: promptEnabled ? prompt : null,\n range,\n rationale,\n title,\n size: graph,\n showToggle: false,\n correctness: correctInfo,\n disabled: env.mode !== 'gather',\n scoringType,\n studentNewCategoryDefaultLabel,\n language,\n env,\n extraCSSRules,\n };\n\n const scoreObject = getScore(normalizedQuestion, session, env);\n const answers = filterCategories(scoreObject.answers);\n\n if (env.mode === 'view') {\n // eslint-disable-next-line no-unused-vars\n base.correctedAnswer = answers.map(({ correctness, ...rest }) => {\n return { ...rest, interactive: false };\n });\n\n base.addCategoryEnabled = false;\n }\n\n if (env.mode === 'evaluate') {\n base.correctedAnswer = answers;\n base.correctAnswer = correctAnswer;\n base.showToggle = !!correctAnswer?.data?.length && scoreObject.score !== 1;\n base.addCategoryEnabled = false;\n base.showKeyLegend = true;\n }\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n base.rationale = rationaleEnabled ? rationale : null;\n base.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n } else {\n base.rationale = null;\n base.teacherInstructions = null;\n }\n\n log('base: ', base);\n resolve(base);\n });\n}\n\nexport function outcome(model, session, env) {\n return new Promise((resolve) => {\n const traceLog = getLogTrace(model, session, env);\n const scoreObject = getScore(model, session, env);\n \n const result = {\n score: scoreObject.score,\n empty: !session || isEmpty(session),\n traceLog\n };\n \n if (env.extraProps && env.extraProps.correctResponseEnabled) {\n result.extraProps = { correctResponse: scoreObject.correctResponses };\n }\n \n resolve(result);\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { correctAnswer } = question;\n\n let answers = correctAnswer && correctAnswer.data;\n\n // for IBX preview mode\n if (env.mode === 'gather') {\n const { data } = question;\n\n answers = ((correctAnswer && correctAnswer.data) || []).map((answer, index) => {\n return {\n ...data[index],\n ...answer,\n };\n });\n }\n\n resolve({\n answer: answers,\n id: '1',\n });\n } else {\n return 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 { correctAnswer, data } = model || {};\n const { data: correctData } = correctAnswer || {};\n const categories = correctData || [];\n\n const errors = {};\n const correctAnswerErrors = {};\n const categoryErrors = {};\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 categories.forEach((category, index) => {\n const { label } = category;\n\n if (!getInnerText(label)) {\n categoryErrors[index] = 'Content should not be empty. ';\n } else {\n const identicalAnswer = categories.some((c, i) => c.label === label && index !== i);\n\n if (identicalAnswer) {\n categoryErrors[index] = 'Category names should be unique. ';\n }\n }\n });\n\n if (categories.length < 1 || categories.length > 20) {\n correctAnswerErrors.categoriesError = 'The correct answer should include between 1 and 20 categories.';\n } else if (\n isEqual(\n data.map((category) => pick(category, 'value', 'label')),\n correctData.map((category) => pick(category, 'value', 'label')),\n )\n ) {\n correctAnswerErrors.identicalError = 'Correct answer should not be identical to the chart’s initial state';\n }\n\n if (!isEmpty(categoryErrors)) {\n errors.categoryErrors = categoryErrors;\n }\n\n if (!isEmpty(correctAnswerErrors)) {\n errors.correctAnswerErrors = correctAnswerErrors;\n }\n\n return errors;\n};\n"],"mappings":";;mCAgBA,IAAe;CACb,oBAAoB;CACpB,0BAA0B;CAC1B,uBAAuB;CACvB,0BAA0B;CAC1B,WAAW;CACX,eAAe,CAAC;CAChB,MAAM,CAAC;CACP,QAAQ,CAAC;CACT,OAAO;EAAE,OAAO;EAAK,QAAQ;CAAI;CACjC,QAAQ;CACR,eAAe;CACf,OAAO;EAAE,OAAO;EAAI,KAAK;EAAG,KAAK;EAAG,WAAW;CAAE;CACjD,WAAW;CACX,kBAAkB;CAClB,aAAa;CACb,4BAA4B;CAC5B,gCAAgC;CAChC,qBAAqB;CACrB,4BAA4B;CAC5B,OAAO;AACT,GCpCI,IAAI,OAAO,gBA8CX,IAAoB,kBA9CY,GAAG,MAAM;CAC5C,IAAI,IAAI,CAAC;CACT,KAAK,IAAI,KAAK,GAAG,EAAE,GAAG,GAAG;EACxB,KAAK,EAAE;EACP,YAAY,CAAC;CACd,CAAC;CACD,OAAO,KAAK,EAAE,GAAG,OAAO,aAAa,EAAE,OAAO,SAAS,CAAC,GAAG;AAC5D,EAuCwB,CAAE,EAAE,eAAe,EAAE,CAAC;AAC9C,SAAS,EAAE,GAAG,GAAG,GAAG;CACnB,OAAO,GAAG,mBAAmB,CAAC,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,OAAO,KAAK,aAAa;AAC7F;;;AClCA,IAAM,KAAA,GAAA,EAAA,QAAA,CAAY,kCAAkC,GAE9C,KAAa,OAAY,KAAU,GAAA,CAAI,YAAY,GAE5C,KAAuB,GAAkB,MAC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AAW,CAAC,CAAC,SAAS,MAAU;EAChE,AAAI,EAAO,EAAM,EAAE,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAED,EAAW,SAAS,GAAU,MAAU;EACtC,IAAM,EAAE,aAAU;EAElB,AAAK,EAAa,CAAK,IAGG,EAAW,MAAM,GAAG,MAAM,EAAE,UAAU,KAAS,MAAU,CAE7E,MACF,EAAe,KAAS,uCAL1B,EAAe,KAAS;CAQ5B,CAAC,GAEG,EAAW,SAAS,KAAK,EAAW,SAAS,KAC/C,EAAoB,kBAAkB,mEAEtC,EACE,EAAK,KAAK,MAAa,EAAK,GAAU,SAAS,OAAO,CAAC,GACvD,EAAY,KAAK,MAAa,EAAK,GAAU,SAAS,OAAO,CAAC,CAChE,MAEA,EAAoB,iBAAiB,wEAGlC,EAAQ,CAAc,MACzB,EAAO,iBAAiB,IAGrB,EAAQ,CAAmB,MAC9B,EAAO,sBAAsB,IAGxB;AACT"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/controller/defaults.ts","../../../../../../shared/controller-utils/dist/index.js","../../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/charting/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/**\n * NOTE: There's no functionality described for graphTitle,\n * rationale, scoringType, studentInstructions, teacherInstructions\n * so there's no implementation (they are only added in model)\n */\n\nexport default {\n addCategoryEnabled: true,\n changeAddCategoryEnabled: false,\n changeEditableEnabled: false,\n changeInteractiveEnabled: false,\n chartType: 'lineCross',\n correctAnswer: {},\n data: [],\n domain: {},\n graph: { width: 480, height: 480 },\n prompt: '',\n promptEnabled: true,\n range: { label: '', max: 1, min: 0, labelStep: 1 },\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'all or nothing',\n studentInstructionsEnabled: true,\n studentNewCategoryDefaultLabel: 'New Category',\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n title: '',\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}`) : 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}\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/charting/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';\nimport { isEmpty, isEqual, pick } from '@pie-element/shared-lodash';\nimport defaults from './defaults.js';\n\nimport { partialScoring } from '@pie-element/shared-controller-utils';\n\nconst log = debug('@pie-element:graphing:controller');\n\nconst lowerCase = (string) => (string || '').toLowerCase();\n\nexport const checkLabelsEquality = (givenAnswerLabel, correctAnswerLabel) =>\n lowerCase(givenAnswerLabel) === lowerCase(correctAnswerLabel);\n\nexport const setCorrectness = (answers, partialScoring) =>\n answers\n ? answers.map((answer) => ({\n ...answer,\n correctness: {\n value: partialScoring ? 'incorrect' : 'correct',\n label: partialScoring ? 'incorrect' : 'correct',\n },\n }))\n : [];\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport const getScore = (question, session, env = {}) => {\n const { correctAnswer, data: initialData = [], scoringType } = question;\n let correctResponses = [];\n\n const isPartialScoring = partialScoring.enabled(\n { partialScoring: scoringType !== undefined ? scoringType === 'partial scoring' : scoringType },\n env,\n );\n\n const { data: correctAnswers = [] } = correctAnswer || {};\n const defaultAnswers = filterCategories(initialData);\n\n let answers = setCorrectness((session && session.answer) || defaultAnswers, isPartialScoring);\n\n let result = 0;\n\n if (isPartialScoring) {\n // if score type is \"partial scoring\"\n // maxScore is calculated based on the correct response\n // score is calculated based on the given response\n let maxScore = 0;\n let score = 0;\n\n const scoreForLabelAndValueEditable = (answer, corrAnswer) => {\n const { value, label, index } = answer;\n const valueIsCorrect = value === corrAnswer.value;\n const labelIsCorrect = checkLabelsEquality(label, corrAnswer.label);\n maxScore += 2;\n\n if (valueIsCorrect) {\n score += 1;\n answer.correctness.value = 'correct';\n }\n\n if (labelIsCorrect) {\n score += 1;\n answer.correctness.label = 'correct';\n }\n\n if (valueIsCorrect && labelIsCorrect) {\n correctResponses.push({ label: label, index: index });\n }\n };\n\n // if given answer has more categories than the correct answers, the \"extra\" will be ignored\n correctAnswers.forEach((corrAnswer, index) => {\n const defaultAnswer = defaultAnswers[index];\n const answer = answers[index];\n\n // if there is a corresponding category at the same position in the given answer\n if (answer) {\n // if there is a corresponding category at the same position in the default answer\n if (defaultAnswer) {\n // if category's label (in default answer) was not editable\n // it means that this category values only one point (only the value can be changed)\n if (!defaultAnswer.editable && answer.interactive) {\n maxScore += 1;\n\n if (answer.value === corrAnswer.value) {\n score += 1;\n answer.correctness.value = 'correct';\n correctResponses.push({ label: answer.label, index: index });\n }\n answer.correctness.label = 'correct';\n\n // if category's label (in default answer) was editable\n // it means that this category values 2 points (both label and value can be changed)\n } else if (defaultAnswer.editable && answer.interactive) {\n scoreForLabelAndValueEditable(answer, corrAnswer);\n } else if (!answer.interactive) {\n answer.correctness.value = 'correct';\n answer.correctness.label = 'correct';\n correctResponses.push({ label: answer.label, index: index });\n }\n } else {\n // if there is not a corresponding category at the same position in the default answer\n scoreForLabelAndValueEditable(answer, corrAnswer);\n }\n } else {\n // if there is not a corresponding category at the same position in the given answer\n // it means that the given answer has less categories than the correct answer\n maxScore += 2;\n }\n });\n\n result = maxScore ? score / maxScore : 0;\n } else {\n // all-or-nothing scoring: overall score is 1 only if lengths and all values/labels match\n result = correctAnswers.length === answers.length ? 1 : 0;\n\n // regardless of overall result, mark each answer individually for user feedback\n answers = answers.map((answer, index) => {\n const correctAnswer = correctAnswers[index];\n const valueIsCorrect = correctAnswer ? answer.value === correctAnswer.value : false;\n const labelIsCorrect = correctAnswer ? lowerCase(answer.label) === lowerCase(correctAnswer.label) : false;\n\n if (!valueIsCorrect || !labelIsCorrect) {\n result = 0;\n }\n\n if (valueIsCorrect && labelIsCorrect) {\n correctResponses.push({ label: answer.label, index });\n }\n\n return {\n ...answer,\n correctness: {\n value: valueIsCorrect ? 'correct' : 'incorrect',\n label: labelIsCorrect ? 'correct' : 'incorrect',\n },\n };\n });\n }\n\n const score = {\n score: parseFloat(result.toFixed(2)),\n answers,\n };\n\n if (env.extraProps && env.extraProps.correctResponseEnabled) {\n score.correctResponses = correctResponses;\n }\n\n return score;\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 = (model, session, env) => {\n const traceLog = [];\n\n const { correctAnswer, data: initialData = [], scoringType } = model || {};\n const { data: correctAnswers = [] } = correctAnswer || {};\n const studentAnswers = (session && session.answer) || [];\n\n const isPartialScoring = partialScoring.enabled(\n { partialScoring: scoringType !== undefined ? scoringType === 'partial scoring' : scoringType },\n env\n );\n\n const defaultAnswers = filterCategories(initialData);\n const answers = studentAnswers.length > 0 ? filterCategories(studentAnswers) : defaultAnswers;\n\n if (!studentAnswers.length) {\n traceLog.push(`Student did not modify the chart. Initial chart is scored.`);\n }\n\n correctAnswers.forEach((correct, index) => {\n const initial = defaultAnswers[index];\n const student = answers[index];\n\n if (!student) {\n traceLog.push(`Category ${index + 1}: missing (expected value '${correct.value}', label '${correct.label}').`);\n return;\n }\n\n const valueCorrect = student.value === correct.value;\n const labelCorrect = checkLabelsEquality(student.label, correct.label);\n\n if (!student.interactive) {\n traceLog.push(`Category ${index + 1}: non-interactive category treated as correct.`);\n return;\n }\n\n if (studentAnswers.length > 0) {\n const valueChanged = initial ? student.value !== initial.value : true;\n const labelChanged = initial ? !checkLabelsEquality(student.label, initial.label) : true;\n\n if (!valueChanged && !labelChanged) {\n if (valueCorrect && labelCorrect) {\n traceLog.push(`Category ${index + 1}: unchanged from initial value and correct.`);\n } else {\n traceLog.push(`Category ${index + 1}: unchanged from initial value but incorrect.`);\n }\n return;\n }\n\n const parts = [];\n if (valueChanged) {\n parts.push(`value ${valueCorrect ? 'correct' : 'incorrect'}`);\n }\n if (labelChanged) {\n parts.push(`label ${labelCorrect ? 'correct' : 'incorrect'}`);\n }\n traceLog.push(`Category ${index + 1}: modified - ${parts.join(', ')}.`);\n } else {\n if (valueCorrect && labelCorrect) {\n traceLog.push(`Category ${index + 1}: initial values are correct.`);\n } else if (valueCorrect) {\n traceLog.push(`Category ${index + 1}: initial value correct, label incorrect.`);\n } else if (labelCorrect) {\n traceLog.push(`Category ${index + 1}: initial value incorrect, label correct.`);\n } else {\n traceLog.push(`Category ${index + 1}: initial value and label incorrect.`);\n }\n }\n });\n\n if (answers.length > correctAnswers.length) {\n const extra = answers.length - correctAnswers.length;\n traceLog.push(`${extra} extra category(ies) provided beyond expected number.`);\n }\n\n if (isPartialScoring) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push('Student receives credit for each correct value and label independently.');\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push('Student must match all category values and labels exactly for full credit.');\n }\n\n const scoreObject = getScore(model, session, env);\n traceLog.push(`Score: ${scoreObject.score}.`);\n\n return traceLog;\n};\n\n\n// eslint-disable-next-line no-unused-vars\nexport const filterCategories = (categories) => (categories ? categories.map(({ deletable, ...rest }) => rest) : []);\n\nexport function model(question, session, env) {\n return new Promise((resolve) => {\n const normalizedQuestion = normalize(question);\n const {\n addCategoryEnabled,\n chartType,\n data,\n domain,\n graph,\n prompt,\n promptEnabled,\n range,\n rationale,\n title,\n rationaleEnabled,\n teacherInstructions,\n teacherInstructionsEnabled,\n correctAnswer,\n scoringType,\n studentNewCategoryDefaultLabel,\n language,\n extraCSSRules,\n } = normalizedQuestion;\n\n const correctInfo = { correctness: 'incorrect', score: '0%' };\n\n const base = {\n addCategoryEnabled,\n chartType,\n data: filterCategories(data),\n domain,\n graph,\n prompt: promptEnabled ? prompt : null,\n range,\n rationale,\n title,\n size: graph,\n showToggle: false,\n correctness: correctInfo,\n disabled: env.mode !== 'gather',\n scoringType,\n studentNewCategoryDefaultLabel,\n language,\n env,\n extraCSSRules,\n };\n\n const scoreObject = getScore(normalizedQuestion, session, env);\n const answers = filterCategories(scoreObject.answers);\n\n if (env.mode === 'view') {\n // eslint-disable-next-line no-unused-vars\n base.correctedAnswer = answers.map(({ correctness, ...rest }) => {\n return { ...rest, interactive: false };\n });\n\n base.addCategoryEnabled = false;\n }\n\n if (env.mode === 'evaluate') {\n base.correctedAnswer = answers;\n base.correctAnswer = correctAnswer;\n base.showToggle = !!correctAnswer?.data?.length && scoreObject.score !== 1;\n base.addCategoryEnabled = false;\n base.showKeyLegend = true;\n }\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n base.rationale = rationaleEnabled ? rationale : null;\n base.teacherInstructions = teacherInstructionsEnabled ? teacherInstructions : null;\n } else {\n base.rationale = null;\n base.teacherInstructions = null;\n }\n\n log('base: ', base);\n resolve(base);\n });\n}\n\nexport function outcome(model, session, env) {\n return new Promise((resolve) => {\n const traceLog = getLogTrace(model, session, env);\n const scoreObject = getScore(model, session, env);\n \n const result = {\n score: scoreObject.score,\n empty: !session || isEmpty(session),\n traceLog\n };\n \n if (env.extraProps && env.extraProps.correctResponseEnabled) {\n result.extraProps = { correctResponse: scoreObject.correctResponses };\n }\n \n resolve(result);\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { correctAnswer } = question;\n\n let answers = correctAnswer && correctAnswer.data;\n\n // for IBX preview mode\n if (env.mode === 'gather') {\n const { data } = question;\n\n answers = ((correctAnswer && correctAnswer.data) || []).map((answer, index) => {\n return {\n ...data[index],\n ...answer,\n };\n });\n }\n\n resolve({\n answer: answers,\n id: '1',\n });\n } else {\n return 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 { correctAnswer, data } = model || {};\n const { data: correctData } = correctAnswer || {};\n const categories = correctData || [];\n\n const errors = {};\n const correctAnswerErrors = {};\n const categoryErrors = {};\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 categories.forEach((category, index) => {\n const { label } = category;\n\n if (!getInnerText(label)) {\n categoryErrors[index] = 'Content should not be empty. ';\n } else {\n const identicalAnswer = categories.some((c, i) => c.label === label && index !== i);\n\n if (identicalAnswer) {\n categoryErrors[index] = 'Category names should be unique. ';\n }\n }\n });\n\n if (categories.length < 1 || categories.length > 20) {\n correctAnswerErrors.categoriesError = 'The correct answer should include between 1 and 20 categories.';\n } else if (\n isEqual(\n data.map((category) => pick(category, 'value', 'label')),\n correctData.map((category) => pick(category, 'value', 'label')),\n )\n ) {\n correctAnswerErrors.identicalError = 'Correct answer should not be identical to the chart’s initial state';\n }\n\n if (!isEmpty(categoryErrors)) {\n errors.categoryErrors = categoryErrors;\n }\n\n if (!isEmpty(correctAnswerErrors)) {\n errors.correctAnswerErrors = correctAnswerErrors;\n }\n\n return errors;\n};\n"],"mappings":";;mCAgBA,IAAe;CACb,oBAAoB;CACpB,0BAA0B;CAC1B,uBAAuB;CACvB,0BAA0B;CAC1B,WAAW;CACX,eAAe,CAAC;CAChB,MAAM,CAAC;CACP,QAAQ,CAAC;CACT,OAAO;EAAE,OAAO;EAAK,QAAQ;CAAI;CACjC,QAAQ;CACR,eAAe;CACf,OAAO;EAAE,OAAO;EAAI,KAAK;EAAG,KAAK;EAAG,WAAW;CAAE;CACjD,WAAW;CACX,kBAAkB;CAClB,aAAa;CACb,4BAA4B;CAC5B,gCAAgC;CAChC,qBAAqB;CACrB,4BAA4B;CAC5B,OAAO;AACT,GCpCI,IAAI,OAAO,gBA8CX,IAAoB,kBA9CY,GAAG,MAAM;CAC5C,IAAI,IAAI,CAAC;CACT,KAAK,IAAI,KAAK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AQ;GACN,QAAQ;GACR,IAAI;EACN,CAAC;CACH,OACE,OAAO,EAAQ,IAAI;AAEvB,CAAC,GAIG,KAAgB,OAAU,KAAQ,GAAA,CAAI,WAAW,YAAY,EAAE,GAG/D,KAAc,OAAU,KAAQ,GAAA,CAAI,QAAQ,sCAAsC,EAAE,GAE7E,KAAY,IAAQ,CAAC,GAAG,IAAS,CAAC,MAAM;CACnD,IAAM,EAAE,kBAAe,YAAS,KAAS,CAAC,GACpC,EAAE,MAAM,MAAgB,KAAiB,CAAC,GAC1C,IAAa,KAAe,CAAC,GAE7B,IAAS,CAAC,GACV,IAAsB,CAAC,GACvB,IAAiB,CAAC;CAyCxB,OAvCA;EAAC;EAAuB;EAAU;CAAW,CAAC,CAAC,SAAS,MAAU;EAChE,AAAI,EAAO,EAAM,EAAE,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAED,EAAW,SAAS,GAAU,MAAU;EACtC,IAAM,EAAE,aAAU;EAElB,AAAK,EAAa,CAAK,IAGG,EAAW,MAAM,GAAG,MAAM,EAAE,UAAU,KAAS,MAAU,CAE7E,MACF,EAAe,KAAS,uCAL1B,EAAe,KAAS;CAQ5B,CAAC,GAEG,EAAW,SAAS,KAAK,EAAW,SAAS,KAC/C,EAAoB,kBAAkB,mEAEtC,EACE,EAAK,KAAK,MAAa,EAAK,GAAU,SAAS,OAAO,CAAC,GACvD,EAAY,KAAK,MAAa,EAAK,GAAU,SAAS,OAAO,CAAC,CAChE,MAEA,EAAoB,iBAAiB,wEAGlC,EAAQ,CAAc,MACzB,EAAO,iBAAiB,IAGrB,EAAQ,CAAmB,MAC9B,EAAO,sBAAsB,IAGxB;AACT"}
@@ -1,5 +1,5 @@
1
1
  import { C as e, t } from "../dist-4_gVzyUN.js";
2
- import { B as n, M as r, Q as i, S as a, U as o, V as s, b as c, g as l, j as u, k as d, n as f, o as p, s as m, t as h, v as g, x as _, y as v } from "../chart-BPU7ZEYQ.js";
2
+ import { B as n, M as r, Q as i, S as a, U as o, V as s, b as c, g as l, j as u, k as d, n as f, o as p, s as m, t as h, v as g, x as _, y as v } from "../chart-DTUXrlN0.js";
3
3
  import y, { useRef as b } from "react";
4
4
  import { createRoot as x } from "react-dom/client";
5
5
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
@@ -45,7 +45,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
45
45
  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`,fill:e}),(0,F.jsx)(`polygon`,{points:`-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6`,fill:t})]});Uo.propTypes={bgFill:v.string.isRequired,fgFill:v.string.isRequired};var Wo=({bgFill:e,fgFill:t,borderFill:n})=>(0,F.jsxs)(`svg`,{preserveAspectRatio:`xMinYMin meet`,version:`1.1`,viewBox:`-129.5 127 34 35`,style:{enableBackground:`new -129.5 127 34 35`},children:[(0,F.jsx)(`path`,{style:{fill:`#D0CAC5`,stroke:`#E6E3E0`,strokeWidth:.75,strokeMiterlimit:10},d:`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
46
46
  C-97.4,153.5-104.3,160.4-112.9,160.4z`}),(0,F.jsx)(`path`,{style:{fill:`#B3ABA4`,stroke:`#CDC7C2`,strokeWidth:.5,strokeMiterlimit:10},d:`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`}),(0,F.jsx)(`circle`,{cx:`-114.2`,cy:`143.5`,r:`14`,fill:e}),(0,F.jsx)(`path`,{d:`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
47
47
  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`,fill:n}),(0,F.jsx)(`polygon`,{points:`-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2`,fill:t})]});Wo.propTypes={bgFill:v.string.isRequired,fgFill:v.string.isRequired,borderFill:v.string.isRequired};var Go=R(`div`)(({size:e})=>({width:e||`25px`,height:e||`25px`})),Ko=({open:e,size:t})=>(0,F.jsx)(Go,{size:t,children:e?(0,F.jsx)(Uo,{bgFill:`#bce2ff`,fgFill:`#1a9cff`}):(0,F.jsx)(Wo,{bgFill:`white`,fgFill:`#1a9cff`,borderFill:`#bce2ff`})});Ko.propTypes={open:v.bool,size:v.string},Ko.defaultProps={open:!1};var qo=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,F.jsx)(`rect`,{x:`11`,y:`17.3`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)`,width:`16.6`,height:`3.7`,fill:e}),(0,F.jsx)(`rect`,{x:`17.4`,y:`10.7`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)`,width:`3.7`,height:`16.6`,fill:e})]});qo.propTypes={fill:v.string.isRequired};var Jo=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,F.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,F.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,F.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});Jo.propTypes={fill:v.string.isRequired};var Yo=zo(qo,Jo);Yo.propTypes={iconSet:v.oneOf([`emoji`,`check`]),shape:v.oneOf([`round`,`square`]),category:v.oneOf([`feedback`,void 0]),open:v.bool,fg:v.string,bg:v.string,size:v.oneOfType([v.string,v.number])},Yo.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var Xo=({fill:e})=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,F.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});Xo.propTypes={fill:v.string.isRequired};var Zo=({fill:e})=>(0,F.jsx)(`polygon`,{points:`14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5`,fill:e});Zo.propTypes={fill:v.string.isRequired};var Qo=({fill:e})=>(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,F.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,F.jsx)(`path`,{d:`M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0
48
- C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});Qo.propTypes={fill:v.string.isRequired};var $o=class extends P.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Xo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),feedback:{check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),square:{check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Xo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),open:{check:(0,F.jsx)(No,{children:(0,F.jsx)(Xo,{fill:n})}),emoji:(0,F.jsx)(No,{children:(0,F.jsx)(Qo,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};$o.propTypes={iconSet:v.oneOf([`emoji`,`check`,void 0]),shape:v.oneOf([`square`,void 0]),category:v.oneOf([`feedback`,void 0]),open:v.bool,fg:v.string,bg:v.string},$o.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var es=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,F.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,F.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});es.propTypes={fill:v.string.isRequired};var ts=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,F.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,F.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,F.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});ts.propTypes={fill:v.string.isRequired};var ns=zo(es,ts);ns.propTypes={iconSet:v.oneOf([`emoji`,`check`]),shape:v.oneOf([`round`,`square`]),category:v.oneOf([`feedback`,void 0]),open:v.bool,fg:v.string,bg:v.string,size:v.oneOfType([v.string,v.number])},ns.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function rs(e){return typeof e==`string`}function is(e){return(0,F.jsx)(Nr,{...e,defaultTheme:bo,themeId:b})}function as(e){return function(t){return(0,F.jsx)(is,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function ss(){return Fr}function cs(e){return ji(e)}function ls(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var us=ls;function ds(e){return e&&e.ownerDocument||document}var fs=ds;function ps(e){return ds(e).defaultView||window}var ms=ps,hs={};function gs(e,t){let n=P.useRef(hs);return n.current===hs&&(n.current=e(t)),n}var _s=[];function vs(e){P.useEffect(e,_s)}var ys=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function bs(){let e=gs(ys.create).current;return vs(e.disposeEffect),e}function xs(e){return e?.ref||null}function Ss(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cs(e,t){return Cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cs(e,t)}function ws(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Cs(e,t)}function Ts(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Es(e,t){e.classList?e.classList.add(t):Ts(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Ds(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Os(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Ds(e.className,t):e.setAttribute(`class`,Ds(e.className&&e.className.baseVal||``,t))}var ks={disabled:!1},As=P.createContext(null),js=function(e){return e.scrollTop},Ms=l(h()),Ns=`unmounted`,Ps=`exited`,Fs=`entering`,Is=`entered`,Ls=`exiting`,Rs=function(e){ws(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Ps,r.appearStatus=Fs):o=Is:o=t.unmountOnExit||t.mountOnEnter?Ns:Ps,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Ps}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Fs):(n===`entering`||n===`entered`)&&(t=Ls)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ms.findDOMNode(this);n&&js(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Ns})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ms.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||ks.disabled){this.safeSetState({status:Is},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Fs},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Is},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ms.findDOMNode(this);if(!t||ks.disabled){this.safeSetState({status:Ps},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Ls},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ps},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ms.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ss(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return P.createElement(As.Provider,{value:null},typeof n==`function`?n(e,r):P.cloneElement(P.Children.only(n),r))},t}(P.Component);Rs.contextType=As,Rs.propTypes={};function zs(){}Rs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zs,onEntering:zs,onEntered:zs,onExit:zs,onExiting:zs,onExited:zs},Rs.UNMOUNTED=Ns,Rs.EXITED=Ps,Rs.ENTERING=Fs,Rs.ENTERED=Is,Rs.EXITING=Ls;var Bs=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Es(e,t)})},Vs=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Os(e,t)})},Hs=function(e){ws(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&js(e),r&&(this.appliedClasses[t][n]=r,Bs(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Vs(e,r),i&&Vs(e,i),a&&Vs(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Ss(e,[`classNames`]);return P.createElement(Rs,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(P.Component);Hs.defaultProps={classNames:``},Hs.propTypes={};function Us(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Ws(e,t){var n=function(e){return t&&(0,P.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&P.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Gs(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Ks(e,t,n){return n[t]==null?e.props[t]:n[t]}function qs(e,t){return Ws(e.children,function(n){return(0,P.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ks(n,`appear`,e),enter:Ks(n,`enter`,e),exit:Ks(n,`exit`,e)})})}function Js(e,t,n){var r=Ws(e.children),i=Gs(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,P.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,P.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,P.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Ks(o,`exit`,e),enter:Ks(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,P.cloneElement)(o,{in:!1}):c&&s&&(0,P.isValidElement)(l)&&(i[a]=(0,P.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Ks(o,`exit`,e),enter:Ks(o,`enter`,e)}))}}),i}var Ys=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Xs={component:`div`,childFactory:function(e){return e}},Zs=function(e){ws(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Us(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?qs(e,r):Js(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Ws(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ss(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Ys(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?P.createElement(As.Provider,{value:i},a):P.createElement(As.Provider,{value:i},P.createElement(t,r,a))},t}(P.Component);Zs.propTypes={},Zs.defaultProps=Xs;var Qs=e=>e.scrollTop;function $s(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function ec(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function tc(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function nc(...e){let t=P.useRef(void 0),n=P.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return P.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var rc=nc;function ic(e){return`scale(${e}, ${e**2})`}var ac={entering:{opacity:1,transform:ic(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:ic(.75)},exited:{opacity:0,transform:ic(.75)}},oc={opacity:0,transform:ic(.75),visibility:`hidden`},sc=P.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=bs(),_=P.useRef(),v=xo(),y=P.useRef(null),b=rc(y,xs(i),t),x=$s(y,l),S=$s(y,(e,t)=>{Qs(e);let{duration:n,delay:r,easing:i}=tc({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=$s(y,c),w=$s(y,f),T=$s(y,e=>{let{duration:t,delay:n,easing:r}=tc({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=ic(.75),u&&u(e)}),E=$s(y,e=>{e.style.transition=``,d&&d(e)});return(0,F.jsx)(Rs,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=ec(e,o,ac,oc,p,i.props.style);return P.cloneElement(i,{style:r,ref:b,...n})}})});sc&&(sc.muiSupportAuto=!0);function cc(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function lc(e){let t=ds(e);return t.body===e?ps(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function uc(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function dc(e){return parseFloat(ps(e).getComputedStyle(e).paddingRight)||0}function fc(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function pc(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!fc(e);t&&n&&uc(e,i)})}function mc(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function hc(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(lc(r)){let e=cc(ps(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${dc(r)+e}px`;let t=ds(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${dc(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=ds(r).body;else{let t=r.parentElement,n=ps(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function gc(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var _c=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&uc(e.modalRef,!1);let r=gc(t);pc(t,e.mount,e.modalRef,r,!0);let i=mc(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=mc(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=hc(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=mc(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&uc(e.modalRef,t),pc(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&uc(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function vc(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var yc=vc;function bc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var xc=bc,Sc=`data-mui-focusable`;function Cc(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Sc}]`):null}var wc=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function Tc(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function z(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Ec(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||z(e))}function Dc(e){let t=[],n=[];return Array.from(e.querySelectorAll(wc)).forEach((e,r)=>{let i=Tc(e);i===-1||!Ec(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Oc(){return!0}function kc(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Dc,isEnabled:o=Oc,open:s}=e,c=P.useRef(!1),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=P.useRef(null),p=P.useRef(!1),m=P.useRef(null),h=nc(xs(t),m),g=P.useRef(null);P.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),P.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=xc(ds(m.current)),t=Cc(m.current)??m.current;return yc(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),P.useEffect(()=>{if(!s||!m.current)return;let e=ds(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&xc(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=xc(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(yc(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=xc(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),P.cloneElement(t,{ref:h,onFocus:_}),(0,F.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function Ac(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function jc(e){return typeof e==`function`?e():e}var Mc=P.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=P.useState(null),s=nc(P.isValidElement(n)?xs(n):null,t);if(ti(()=>{i||o(jc(r)||document.body)},[r,i]),ti(()=>{if(a&&!i)return Ac(t,a),()=>{Ac(t,null)}},[t,a,i]),i){if(P.isValidElement(n)){let e={ref:s};return P.cloneElement(n,e)}return n}return a&&Ms.createPortal(n,a)}),Nc=Vi;function Pc(e,t,n){return e===void 0||rs(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Fc(e,t,n){return typeof e==`function`?e(t,n):e}function Ic(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Lc(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Rc(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=I(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Ic({...i,...r}),s=Lc(r),c=Lc(i),l=t(o),u=I(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function zc(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Fc(d[e],i),{props:{component:h,...g},internalRef:_}=Rc({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=nc(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Pc(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var Bc={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Vc={opacity:0,visibility:`hidden`},Hc=P.forwardRef(function(e,t){let n=xo(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=P.useRef(null),y=rc(v,xs(o),t),b=$s(v,d),x=$s(v,(e,t)=>{Qs(e);let r=tc({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=$s(v,u),C=$s(v,m),w=$s(v,e=>{let t=tc({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=$s(v,e=>{e.style.transition=``,p&&p(e)});return(0,F.jsx)(Rs,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=ec(e,c,Bc,Vc,h,o.props.style);return P.cloneElement(o,{style:r,ref:y,...n})}})});function Uc(e){return Br(`MuiBackdrop`,e)}Vr(`MuiBackdrop`,[`root`,`invisible`]);var Wc=e=>{let{classes:t,invisible:n}=e;return ca({root:[`root`,n&&`invisible`]},Uc,t)},Gc=R(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Kc=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=Wc(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=zc(`root`,{elementType:Gc,externalForwardedProps:_,className:I(g.root,i),ownerState:h}),[b,x]=zc(`transition`,{elementType:Hc,externalForwardedProps:_,ownerState:h});return(0,F.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,F.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function qc(e){let t=P.useRef(e);return ti(()=>{t.current=e}),P.useRef((...e)=>(0,t.current)(...e)).current}function Jc(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function Yc(e){return typeof e==`function`?e():e}function Xc(e){return e?e.props.hasOwnProperty(`in`):!1}var Zc=()=>{},Qc=new _c;function $c(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=P.useRef({}),f=P.useRef(null),p=P.useRef(null),m=nc(p,u),[h,g]=P.useState(!l),_=Xc(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>ds(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Qc.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=qc(()=>{let e=Yc(t)||y().body;Qc.add(b(),e),p.current&&x()}),C=()=>Qc.isTopModal(b()),w=qc(e=>{f.current=e,e&&(l&&C()?x():p.current&&uc(p.current,v))}),T=P.useCallback(()=>{Qc.remove(b(),v)},[v]);P.useEffect(()=>()=>{T()},[T]),P.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Ic(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:Jc(()=>{g(!1),a&&a()},s?.props.onEnter??Zc),onExited:Jc(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Zc)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function el(e){return Br(`MuiModal`,e)}Vr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var tl=e=>{let{open:t,exited:n,classes:r}=e;return ca({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},el,r)},nl=R(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Nc(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),rl=R(Kc,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),il=P.forwardRef(function(e,t){let n=cs({name:`MuiModal`,props:e}),{BackdropComponent:r=rl,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:A,getBackdropProps:j,getTransitionProps:M,portalRef:ee,isTopModal:N,exited:te,hasTransition:ne}=$c({...k,rootRef:t}),re={...k,exited:te},ie=tl(re),ae={};if(c.props.tabIndex===void 0&&(ae.tabIndex=`-1`),ne){let{onEnter:e,onExited:t}=M();ae.onEnter=e,ae.onExited=t}let oe={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[se,ce]=zc(`root`,{ref:t,elementType:nl,externalForwardedProps:{...oe,...O,component:u},getSlotProps:A,ownerState:re,className:I(o,ie?.root,!re.open&&re.exited&&ie?.hidden)}),[le,ue]=zc(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:oe,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>j({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:I(i?.className,ie?.backdrop),ownerState:re});return!b&&!w&&(!ne||te)?null:(0,F.jsx)(Mc,{ref:ee,container:l,disablePortal:g,children:(0,F.jsxs)(se,{...ce,children:[!y&&r?(0,F.jsx)(le,{...ue}):null,(0,F.jsx)(kc,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:N,open:w,children:P.cloneElement(c,ae)})]})})});function al(e){return Br(`MuiPaper`,e)}Vr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var ol=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return ca({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},al,i)},sl=R(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Nc(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),cl=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiPaper`}),r=xo(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=ol(u);return(0,F.jsx)(sl,{as:a,ownerState:u,className:I(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${fi(`#fff`,to(o))}, ${fi(`#fff`,to(o))})`}},...l.style}})});function ll(e){return Br(`MuiPopover`,e)}Vr(`MuiPopover`,[`root`,`paper`]);var B=En;function ul(e){return Br(`MuiSvgIcon`,e)}Vr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var dl=e=>{let{color:t,fontSize:n,classes:r}=e;return ca({root:[`root`,t!==`inherit`&&`color${B(t)}`,`fontSize${B(n)}`]},ul,r)},fl=R(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${B(n.color)}`],t[`fontSize${B(n.fontSize)}`]]}})(Nc(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),pl=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=P.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=dl(m);return(0,F.jsxs)(fl,{as:o,className:I(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,F.jsx)(`title`,{children:u}):null]})});pl.muiName=`SvgIcon`;function ml(e,t){function n(t,n){return(0,F.jsx)(pl,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=pl.muiName,P.memo(P.forwardRef(n))}var hl=la,gl=ti,_l=Fi;function vl(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=P.useRef(t!==void 0),[o,s]=P.useState(n);return[a?t:o,P.useCallback(e=>{a||s(e)},[])]}var yl=vl,bl=qc;function xl(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function Sl(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{xl(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=I(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=I(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Cl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function wl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Tl(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function El(e){return typeof e==`function`?e():e}var Dl=e=>{let{classes:t}=e;return ca({root:[`root`],paper:[`paper`]},ll,t)},Ol=R(il,{name:`MuiPopover`,slot:`Root`})({}),kl=R(cl,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Al=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=P.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=Dl(w),E=P.useCallback(()=>{if(s===`anchorPosition`)return o;let e=El(i),t=(e&&e.nodeType===1?e:fs(C.current).body).getBoundingClientRect();return{top:t.top+Cl(t,a.vertical),left:t.left+wl(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=P.useCallback(e=>({vertical:Cl(e,_.vertical),horizontal:wl(e,_.horizontal)}),[_.horizontal,_.vertical]),O=P.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Tl(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=ms(El(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Tl(n)}},[i,s,E,D,f]),[k,A]=P.useState(p),j=P.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[O]);P.useEffect(()=>(x&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,x,j]);let M=()=>{j()},ee=()=>{A(!1)};P.useEffect(()=>{p&&j()}),P.useImperativeHandle(r,()=>p?{updatePosition:()=>{j()}}:null,[p,j]),P.useEffect(()=>{if(!p)return;let e=us(()=>{j()}),t=ms(El(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,j]);let N=y,te={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[ne,re]=zc(`transition`,{elementType:sc,externalForwardedProps:te,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),ee()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!ne.muiSupportAuto&&(N=void 0);let ie=u||(i?fs(El(i)).body:void 0),[ae,{slots:oe,slotProps:se,...ce}]=zc(`root`,{ref:t,elementType:Ol,externalForwardedProps:{...te,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Sl(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:ie,open:p},ownerState:w,className:I(T.root,l)}),[le,ue]=zc(`paper`,{ref:C,className:T.paper,elementType:kl,externalForwardedProps:te,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:w});return(0,F.jsx)(ae,{...ce,...!rs(ae)&&{slots:oe,slotProps:se,disableScrollLock:x},children:(0,F.jsx)(ne,{...re,timeout:N,children:(0,F.jsx)(le,{...ue,children:c})})})}),jl={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},Ml={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},Nl=s({background:()=>iu,backgroundDark:()=>au,black:()=>vu,blueGrey100:()=>Eu,blueGrey300:()=>Du,blueGrey600:()=>Ou,blueGrey900:()=>ku,border:()=>du,borderDark:()=>pu,borderGray:()=>mu,borderLight:()=>fu,buttonBorder:()=>Iu,buttonFocusOutline:()=>Tu,buttonHoverBg:()=>Lu,correct:()=>Bl,correctSecondary:()=>Vl,correctTertiary:()=>Hl,correctWithIcon:()=>Ul,defaults:()=>V,disabled:()=>Ll,disabledSecondary:()=>Rl,disabledText:()=>zl,dropdownBackground:()=>su,fadedPrimary:()=>$l,focusChecked:()=>xu,focusCheckedBorder:()=>Su,focusUnchecked:()=>Cu,focusUncheckedBorder:()=>wu,incorrect:()=>Wl,incorrectSecondary:()=>Kl,incorrectWithIcon:()=>Gl,keyBoardFocusIndicator:()=>Fu,keypadButton:()=>Au,keypadButtonHover:()=>Nu,keypadButtonOperator:()=>ju,keypadButtonOperatorHover:()=>Pu,keypadEmptyPlaceholder:()=>Mu,missing:()=>ql,missingWithIcon:()=>Jl,primary:()=>Yl,primaryDark:()=>Zl,primaryLight:()=>Xl,primaryText:()=>Ql,secondary:()=>eu,secondaryBackground:()=>ou,secondaryDark:()=>nu,secondaryLight:()=>tu,secondaryText:()=>ru,surface:()=>cu,tableGrid:()=>hu,tableGridLight:()=>gu,tableStripe:()=>_u,tertiary:()=>lu,tertiaryLight:()=>uu,text:()=>Il,transparent:()=>bu,v:()=>Pl,visualElementsColors:()=>Ru,white:()=>yu}),V={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:_a[500],CORRECT_SECONDARY:_a[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:ma[500],INCORRECT_SECONDARY:pa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:pa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:Ml[500],PRIMARY_LIGHT:Ml[200],PRIMARY_DARK:Ml[800],SECONDARY:jl.A400,SECONDARY_LIGHT:jl[200],SECONDARY_DARK:jl[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(V);var Pl=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},Fl=Pl(`pie`),Il=()=>Fl(`text`,V.TEXT),Ll=()=>Fl(`disabled`,V.DISABLED),Rl=()=>Fl(`disabled-secondary`,V.DISABLED_SECONDARY),zl=()=>Fl(`disabled-text`,`text`,V.DISABLED_TEXT),Bl=()=>Fl(`correct`,V.CORRECT),Vl=()=>Fl(`correct-secondary`,V.CORRECT_SECONDARY),Hl=()=>Fl(`correct-tertiary`,V.CORRECT_TERTIARY),Ul=()=>Fl(`correct-icon`,V.CORRECT_WITH_ICON),Wl=()=>Fl(`incorrect`,V.INCORRECT),Gl=()=>Fl(`incorrect-icon`,V.INCORRECT_WITH_ICON),Kl=()=>Fl(`incorrect-secondary`,V.INCORRECT_SECONDARY),ql=()=>Fl(`missing`,V.MISSING),Jl=()=>Fl(`missing-icon`,V.MISSING_WITH_ICON),Yl=()=>Fl(`primary`,V.PRIMARY),Xl=()=>Fl(`primary-light`,V.PRIMARY_LIGHT),Zl=()=>Fl(`primary-dark`,V.PRIMARY_DARK),Ql=()=>Fl(`primary-text`,`text`,V.TEXT),$l=()=>Fl(`faded-primary`,V.FADED_PRIMARY),eu=()=>Fl(`secondary`,V.SECONDARY),tu=()=>Fl(`secondary-light`,V.SECONDARY_LIGHT),nu=()=>Fl(`secondary-dark`,V.SECONDARY_DARK),ru=()=>Fl(`secondary-text`,`text`,V.TEXT),iu=()=>Fl(`background`,V.BACKGROUND),au=()=>Fl(`background-dark`,V.BACKGROUND_DARK),ou=()=>Fl(`secondary-background`,V.SECONDARY_BACKGROUND),su=()=>Fl(`dropdown-background`,V.DROPDOWN_BACKGROUND),cu=()=>Fl(`surface`,V.SURFACE),lu=()=>Fl(`tertiary`,V.TERTIARY),uu=()=>Fl(`tertiary-light`,V.TERTIARY_LIGHT),du=()=>Fl(`border`,V.BORDER),fu=()=>Fl(`border-light`,V.BORDER_LIGHT),pu=()=>Fl(`border-dark`,V.BORDER_DARK),mu=()=>Fl(`border-gray`,V.BORDER_GRAY),hu=()=>Fl(`table-grid`,`text`,V.TABLE_GRID),gu=()=>Fl(`table-grid-light`,`border-light`,V.TABLE_GRID_LIGHT),_u=()=>Fl(`table-stripe`,`background-dark`,V.TABLE_STRIPE),vu=()=>Fl(`black`,V.BLACK),yu=()=>Fl(`white`,V.WHITE),bu=()=>V.TRANSPARENT,xu=()=>Fl(`focus-checked`,V.FOCUS_CHECKED),Su=()=>Fl(`focus-checked-border`,V.FOCUS_CHECKED_BORDER),Cu=()=>Fl(`focus-unchecked`,V.FOCUS_UNCHECKED),wu=()=>Fl(`focus-unchecked-border`,V.FOCUS_UNCHECKED_BORDER),Tu=()=>Fl(`button-focus-outline`,V.BUTTON_FOCUS_OUTLINE),Eu=()=>Fl(`blue-grey-100`,V.BLUE_GREY100),Du=()=>Fl(`blue-grey-300`,V.BLUE_GREY300),Ou=()=>Fl(`blue-grey-600`,V.BLUE_GREY600),ku=()=>Fl(`blue-grey-900`,V.BLUE_GREY900),Au=()=>Fl(`keypad-button`,V.KEYPAD_BUTTON),ju=()=>Fl(`keypad-button-operator`,V.KEYPAD_BUTTON_OPERATOR),Mu=()=>Fl(`keypad-empty-placeholder`,V.KEYPAD_EMPTY_PLACEHOLDER),Nu=()=>Fl(`keypad-button-hover`,V.KEYPAD_BUTTON_HOVER),Pu=()=>Fl(`keypad-button-operator-hover`,V.KEYPAD_BUTTON_OPERATOR_HOVER),Fu=()=>Fl(`keyboard-focus-indicator`,V.KEY_BOARD_FOCUS_INDICATOR),Iu=()=>Fl(`button-border`,V.BUTTON_BORDER),Lu=()=>Fl(`button-hover-bg`,V.BUTTON_HOVER_BG),Ru={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},zu=R(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),Bu=R(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${Ll()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Bl()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Wl()})`}}),Vu=R(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),Hu=class extends P.Component{static propTypes={correctness:v.string,feedback:v.string};nodeRef=P.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,F.jsx)(Hs,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,F.jsx)(Vu,{ref:this.nodeRef,children:(0,F.jsx)(zu,{children:(0,F.jsx)(Bu,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,F.jsx)(`div`,{children:(0,F.jsx)(Zs,{children:this.renderFeedback()})})}};function Uu(){return()=>{}}var eee=s({Correct:()=>Yu,Incorrect:()=>Xu,NothingSubmitted:()=>Qu,PartiallyCorrect:()=>Zu}),Wu=Uu(`pie-libs:render-ui:response-indicators`),Gu=R(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),Ku=R(Al)({cursor:`pointer`}),qu=R(`div`)({padding:`0`,borderRadius:`4px`}),Ju=(e,t)=>{class n extends P.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{Wu(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,F.jsxs)(Gu,{hasFeedback:!!n,children:[(0,F.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,F.jsx)(e,{})}),n&&(0,F.jsx)(Ku,{PaperComponent:qu,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,F.jsx)(Hu,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:v.string},n},Yu=Ju(Ho,`correct`),Xu=Ju(Yo,`incorrect`),Zu=Ju(ns,`partially-correct`),Qu=Ju($o,`nothing-submitted`);function $u(e){return Br(`MuiCollapse`,e)}Vr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var ed=e=>{let{orientation:t,classes:n}=e;return ca({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},$u,n)},td=R(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Nc(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),nd=R(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),rd=R(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),id=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=Wa.standard,TransitionComponent:x=Rs,...S}=n,C={...n,orientation:g,collapsedSize:o},w=ed(C),T=xo(),E=bs(),D=P.useRef(null),O=P.useRef(),k=typeof o==`number`?`${o}px`:o,A=g===`horizontal`,j=A?`width`:`height`,M=P.useRef(null),ee=rc(t,M),N=()=>D.current?D.current[A?`clientWidth`:`clientHeight`]:0,te=$s(M,(e,t)=>{D.current&&A&&(D.current.style.position=`absolute`),e.style[j]=k,u&&u(e,t)}),ne=$s(M,(e,t)=>{let n=N();D.current&&A&&(D.current.style.position=``);let{duration:r,easing:i}=tc({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[j]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),re=$s(M,(e,t)=>{e.style[j]=`auto`,d&&d(e,t)}),ie=$s(M,e=>{e.style[j]=`${N()}px`,p&&p(e)}),ae=$s(M,m),oe=$s(M,e=>{let t=N(),{duration:n,easing:r}=tc({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[j]=k,e.style.transitionTimingFunction=r,h&&h(e)}),se=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(M.current,e)},ce={slots:_,slotProps:v,component:s},[le,ue]=zc(`root`,{ref:ee,className:I(w.root,a),elementType:td,externalForwardedProps:ce,ownerState:C,additionalProps:{style:{[A?`minWidth`:`minHeight`]:k,...y}}}),[de,fe]=zc(`wrapper`,{ref:D,className:w.wrapper,elementType:nd,externalForwardedProps:ce,ownerState:C}),[pe,me]=zc(`wrapperInner`,{className:w.wrapperInner,elementType:rd,externalForwardedProps:ce,ownerState:C});return(0,F.jsx)(x,{in:l,onEnter:te,onEntered:re,onEntering:ne,onExit:ie,onExited:ae,onExiting:oe,addEndListener:se,nodeRef:M,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,F.jsx)(le,{...ue,className:I(ue.className,{entered:w.entered,exited:!l&&k===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,F.jsx)(de,{...fe,ownerState:r,children:(0,F.jsx)(pe,{...me,ownerState:r,children:i})})})}})});id&&(id.muiSupportAuto=!0);var ad=`https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js`,od={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},sd=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,cd=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,ld=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,ud=/\\embed\{newLine\}\[\]/g,dd=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],fd=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`);function pd(){return window.MathJax}function md(e){let t=e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e;for(let[e,n]of dd)if(t.startsWith(e)&&t.endsWith(n))return t.substring(e.length,t.length-n.length);return t}function hd(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`))continue;let e=t.textContent;e&&(t.textContent=`\\(${md(e)}\\)`.replace(ud,`\\newline `),t.dataset.mathHandled=`true`)}}function gd(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?ld:cd).test(e.textContent??``)}function _d(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e)},startup:{typeset:!1,ready:()=>{let e=pd()?.startup;e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}},tex:{macros:{...od}},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}}}};r&&s.tex&&(console.warn(sd),s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||ad,c.async=!0,c.onerror=()=>n(Error(`Failed to load MathJax`)),document.head.appendChild(c)})}function vd(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=pd()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function yd(e){let t=pd();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():vd(t):_d(e)}function bd(e){return yd(e).then(()=>{typeof pd()?.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function xd(e){let t=globalThis,n=t[fd];return n||(n=bd(e),t[fd]=n),n}function Sd(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`||(hd(n),!gd(n,t)))return;await xd(e);let r=pd();await r?.startup?.promise,typeof r?.typesetPromise==`function`&&await r.typesetPromise([n])}}var Cd=`@pie-lib/math-rendering`,wd=`@pie-lib/math-rendering@2`,Td=null;function Ed(){return!!window[wd]?.opts?.useSingleDollar}function Dd(){return Td||=Sd({useSingleDollar:Ed()}),Td}function Od(){if(typeof window>`u`)return null;let e=window[Cd];return typeof e?.renderMath==`function`?e:null}var kd=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Od();return r?await r.renderMath?.(n):await Dd()(n),t?n.innerHTML:void 0},Ad=e=>Od()?.wrapMath?.(e)??e,jd=R(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),Md=R(id)(({theme:e})=>({paddingTop:e.spacing(2)})),Nd=class extends P.Component{static propTypes={className:v.string,children:v.object,labels:v.shape({visible:v.string,hidden:v.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){kd(this.root)}componentDidUpdate(){kd(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,F.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,F.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,F.jsx)(jd,{children:r})}),(0,F.jsx)(Md,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function Pd(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var Fd=class e{static create(){return new e}static use(){let t=gs(e.create).current,[n,r]=P.useState(!1);return t.shouldMount=n,t.setShouldMount=r,P.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Ld(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Id(){return Fd.use()}function Ld(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Rd(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=P.useState(!1),f=I(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=I(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),P.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,F.jsx)(`span`,{className:f,style:p,children:(0,F.jsx)(`span`,{className:m})})}var zd=Vr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),Bd=550,Vd=Lt`
48
+ C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});Qo.propTypes={fill:v.string.isRequired};var $o=class extends P.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Xo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),feedback:{check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),square:{check:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Xo,{fill:t})]}),emoji:(0,F.jsxs)(No,{children:[(0,F.jsx)(Zo,{fill:n}),(0,F.jsx)(Qo,{fill:t})]}),open:{check:(0,F.jsx)(No,{children:(0,F.jsx)(Xo,{fill:n})}),emoji:(0,F.jsx)(No,{children:(0,F.jsx)(Qo,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};$o.propTypes={iconSet:v.oneOf([`emoji`,`check`,void 0]),shape:v.oneOf([`square`,void 0]),category:v.oneOf([`feedback`,void 0]),open:v.bool,fg:v.string,bg:v.string},$o.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var es=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,F.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,F.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});es.propTypes={fill:v.string.isRequired};var ts=({fill:e})=>(0,F.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,F.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,F.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,F.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});ts.propTypes={fill:v.string.isRequired};var ns=zo(es,ts);ns.propTypes={iconSet:v.oneOf([`emoji`,`check`]),shape:v.oneOf([`round`,`square`]),category:v.oneOf([`feedback`,void 0]),open:v.bool,fg:v.string,bg:v.string,size:v.oneOfType([v.string,v.number])},ns.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function rs(e){return typeof e==`string`}function is(e){return(0,F.jsx)(Nr,{...e,defaultTheme:bo,themeId:b})}function as(e){return function(t){return(0,F.jsx)(is,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function ss(){return Fr}function cs(e){return ji(e)}function ls(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var us=ls;function ds(e){return e&&e.ownerDocument||document}var fs=ds;function ps(e){return ds(e).defaultView||window}var ms=ps,hs={};function gs(e,t){let n=P.useRef(hs);return n.current===hs&&(n.current=e(t)),n}var _s=[];function vs(e){P.useEffect(e,_s)}var ys=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function bs(){let e=gs(ys.create).current;return vs(e.disposeEffect),e}function xs(e){return e?.ref||null}function Ss(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cs(e,t){return Cs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Cs(e,t)}function ws(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Cs(e,t)}function Ts(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function Es(e,t){e.classList?e.classList.add(t):Ts(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function Ds(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Os(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Ds(e.className,t):e.setAttribute(`class`,Ds(e.className&&e.className.baseVal||``,t))}var ks={disabled:!1},As=P.createContext(null),js=function(e){return e.scrollTop},Ms=l(h()),Ns=`unmounted`,Ps=`exited`,Fs=`entering`,Is=`entered`,Ls=`exiting`,Rs=function(e){ws(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=Ps,r.appearStatus=Fs):o=Is:o=t.unmountOnExit||t.mountOnEnter?Ns:Ps,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:Ps}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=Fs):(n===`entering`||n===`entered`)&&(t=Ls)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:Ms.findDOMNode(this);n&&js(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:Ns})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[Ms.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||ks.disabled){this.safeSetState({status:Is},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:Fs},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:Is},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:Ms.findDOMNode(this);if(!t||ks.disabled){this.safeSetState({status:Ps},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:Ls},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:Ps},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:Ms.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Ss(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return P.createElement(As.Provider,{value:null},typeof n==`function`?n(e,r):P.cloneElement(P.Children.only(n),r))},t}(P.Component);Rs.contextType=As,Rs.propTypes={};function zs(){}Rs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:zs,onEntering:zs,onEntered:zs,onExit:zs,onExiting:zs,onExited:zs},Rs.UNMOUNTED=Ns,Rs.EXITED=Ps,Rs.ENTERING=Fs,Rs.ENTERED=Is,Rs.EXITING=Ls;var Bs=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Es(e,t)})},Vs=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return Os(e,t)})},Hs=function(e){ws(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&js(e),r&&(this.appliedClasses[t][n]=r,Bs(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&Vs(e,r),i&&Vs(e,i),a&&Vs(e,a)},n.render=function(){var e=this.props;e.classNames;var t=Ss(e,[`classNames`]);return P.createElement(Rs,x({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(P.Component);Hs.defaultProps={classNames:``},Hs.propTypes={};function Us(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function Ws(e,t){var n=function(e){return t&&(0,P.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&P.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function Gs(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function Ks(e,t,n){return n[t]==null?e.props[t]:n[t]}function qs(e,t){return Ws(e.children,function(n){return(0,P.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:Ks(n,`appear`,e),enter:Ks(n,`enter`,e),exit:Ks(n,`exit`,e)})})}function Js(e,t,n){var r=Ws(e.children),i=Gs(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,P.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,P.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,P.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:Ks(o,`exit`,e),enter:Ks(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,P.cloneElement)(o,{in:!1}):c&&s&&(0,P.isValidElement)(l)&&(i[a]=(0,P.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:Ks(o,`exit`,e),enter:Ks(o,`enter`,e)}))}}),i}var Ys=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},Xs={component:`div`,childFactory:function(e){return e}},Zs=function(e){ws(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(Us(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?qs(e,r):Js(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=Ws(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=x({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Ss(e,[`component`,`childFactory`]),i=this.state.contextValue,a=Ys(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?P.createElement(As.Provider,{value:i},a):P.createElement(As.Provider,{value:i},P.createElement(t,r,a))},t}(P.Component);Zs.propTypes={},Zs.defaultProps=Xs;var Qs=e=>e.scrollTop;function $s(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function ec(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function tc(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function nc(...e){let t=P.useRef(void 0),n=P.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return P.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var rc=nc;function ic(e){return`scale(${e}, ${e**2})`}var ac={entering:{opacity:1,transform:ic(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:ic(.75)},exited:{opacity:0,transform:ic(.75)}},oc={opacity:0,transform:ic(.75),visibility:`hidden`},sc=P.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=bs(),_=P.useRef(),v=xo(),y=P.useRef(null),b=rc(y,xs(i),t),x=$s(y,l),S=$s(y,(e,t)=>{Qs(e);let{duration:n,delay:r,easing:i}=tc({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=$s(y,c),w=$s(y,f),T=$s(y,e=>{let{duration:t,delay:n,easing:r}=tc({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=ic(.75),u&&u(e)}),E=$s(y,e=>{e.style.transition=``,d&&d(e)});return(0,F.jsx)(Rs,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=ec(e,o,ac,oc,p,i.props.style);return P.cloneElement(i,{style:r,ref:b,...n})}})});sc&&(sc.muiSupportAuto=!0);function cc(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function lc(e){let t=ds(e);return t.body===e?ps(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function uc(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function dc(e){return parseFloat(ps(e).getComputedStyle(e).paddingRight)||0}function fc(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function pc(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!fc(e);t&&n&&uc(e,i)})}function mc(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function hc(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(lc(r)){let e=cc(ps(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${dc(r)+e}px`;let t=ds(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${dc(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=ds(r).body;else{let t=r.parentElement,n=ps(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function gc(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var _c=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&uc(e.modalRef,!1);let r=gc(t);pc(t,e.mount,e.modalRef,r,!0);let i=mc(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=mc(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=hc(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=mc(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&uc(e.modalRef,t),pc(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&uc(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function vc(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var yc=vc;function bc(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var xc=bc,Sc=`data-mui-focusable`;function Cc(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Sc}]`):null}var wc=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function Tc(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function z(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function Ec(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||z(e))}function Dc(e){let t=[],n=[];return Array.from(e.querySelectorAll(wc)).forEach((e,r)=>{let i=Tc(e);i===-1||!Ec(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function Oc(){return!0}function kc(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Dc,isEnabled:o=Oc,open:s}=e,c=P.useRef(!1),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=P.useRef(null),p=P.useRef(!1),m=P.useRef(null),h=nc(xs(t),m),g=P.useRef(null);P.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),P.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=xc(ds(m.current)),t=Cc(m.current)??m.current;return yc(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),P.useEffect(()=>{if(!s||!m.current)return;let e=ds(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&xc(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=xc(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(yc(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=xc(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,F.jsxs)(P.Fragment,{children:[(0,F.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),P.cloneElement(t,{ref:h,onFocus:_}),(0,F.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function Ac(e,t){typeof e==`function`?e(t):e&&(e.current=t)}function jc(e){return typeof e==`function`?e():e}var Mc=P.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=P.useState(null),s=nc(P.isValidElement(n)?xs(n):null,t);if(ti(()=>{i||o(jc(r)||document.body)},[r,i]),ti(()=>{if(a&&!i)return Ac(t,a),()=>{Ac(t,null)}},[t,a,i]),i){if(P.isValidElement(n)){let e={ref:s};return P.cloneElement(n,e)}return n}return a&&Ms.createPortal(n,a)}),Nc=Vi;function Pc(e,t,n){return e===void 0||rs(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Fc(e,t,n){return typeof e==`function`?e(t,n):e}function Ic(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function Lc(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function Rc(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=I(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=Ic({...i,...r}),s=Lc(r),c=Lc(i),l=t(o),u=I(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function zc(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=Fc(d[e],i),{props:{component:h,...g},internalRef:_}=Rc({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=nc(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,Pc(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var Bc={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Vc={opacity:0,visibility:`hidden`},Hc=P.forwardRef(function(e,t){let n=xo(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=P.useRef(null),y=rc(v,xs(o),t),b=$s(v,d),x=$s(v,(e,t)=>{Qs(e);let r=tc({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=$s(v,u),C=$s(v,m),w=$s(v,e=>{let t=tc({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=$s(v,e=>{e.style.transition=``,p&&p(e)});return(0,F.jsx)(Rs,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=ec(e,c,Bc,Vc,h,o.props.style);return P.cloneElement(o,{style:r,ref:y,...n})}})});function Uc(e){return Br(`MuiBackdrop`,e)}Vr(`MuiBackdrop`,[`root`,`invisible`]);var Wc=e=>{let{classes:t,invisible:n}=e;return ca({root:[`root`,n&&`invisible`]},Uc,t)},Gc=R(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),Kc=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=Wc(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=zc(`root`,{elementType:Gc,externalForwardedProps:_,className:I(g.root,i),ownerState:h}),[b,x]=zc(`transition`,{elementType:Hc,externalForwardedProps:_,ownerState:h});return(0,F.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,F.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function qc(e){let t=P.useRef(e);return ti(()=>{t.current=e}),P.useRef((...e)=>(0,t.current)(...e)).current}function Jc(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function Yc(e){return typeof e==`function`?e():e}function Xc(e){return e?e.props.hasOwnProperty(`in`):!1}var Zc=()=>{},Qc=new _c;function $c(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=P.useRef({}),f=P.useRef(null),p=P.useRef(null),m=nc(p,u),[h,g]=P.useState(!l),_=Xc(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>ds(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Qc.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=qc(()=>{let e=Yc(t)||y().body;Qc.add(b(),e),p.current&&x()}),C=()=>Qc.isTopModal(b()),w=qc(e=>{f.current=e,e&&(l&&C()?x():p.current&&uc(p.current,v))}),T=P.useCallback(()=>{Qc.remove(b(),v)},[v]);P.useEffect(()=>()=>{T()},[T]),P.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=Ic(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:Jc(()=>{g(!1),a&&a()},s?.props.onEnter??Zc),onExited:Jc(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Zc)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function el(e){return Br(`MuiModal`,e)}Vr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var tl=e=>{let{open:t,exited:n,classes:r}=e;return ca({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},el,r)},nl=R(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Nc(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),rl=R(Kc,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),il=P.forwardRef(function(e,t){let n=cs({name:`MuiModal`,props:e}),{BackdropComponent:r=rl,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:A,getBackdropProps:j,getTransitionProps:M,portalRef:ee,isTopModal:N,exited:te,hasTransition:ne}=$c({...k,rootRef:t}),re={...k,exited:te},ie=tl(re),ae={};if(c.props.tabIndex===void 0&&(ae.tabIndex=`-1`),ne){let{onEnter:e,onExited:t}=M();ae.onEnter=e,ae.onExited=t}let oe={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[se,ce]=zc(`root`,{ref:t,elementType:nl,externalForwardedProps:{...oe,...O,component:u},getSlotProps:A,ownerState:re,className:I(o,ie?.root,!re.open&&re.exited&&ie?.hidden)}),[le,ue]=zc(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:oe,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>j({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:I(i?.className,ie?.backdrop),ownerState:re});return!b&&!w&&(!ne||te)?null:(0,F.jsx)(Mc,{ref:ee,container:l,disablePortal:g,children:(0,F.jsxs)(se,{...ce,children:[!y&&r?(0,F.jsx)(le,{...ue}):null,(0,F.jsx)(kc,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:N,open:w,children:P.cloneElement(c,ae)})]})})});function al(e){return Br(`MuiPaper`,e)}Vr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var ol=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return ca({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},al,i)},sl=R(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Nc(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),cl=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiPaper`}),r=xo(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=ol(u);return(0,F.jsx)(sl,{as:a,ownerState:u,className:I(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${fi(`#fff`,to(o))}, ${fi(`#fff`,to(o))})`}},...l.style}})});function ll(e){return Br(`MuiPopover`,e)}Vr(`MuiPopover`,[`root`,`paper`]);var B=En;function ul(e){return Br(`MuiSvgIcon`,e)}Vr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var dl=e=>{let{color:t,fontSize:n,classes:r}=e;return ca({root:[`root`,t!==`inherit`&&`color${B(t)}`,`fontSize${B(n)}`]},ul,r)},fl=R(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${B(n.color)}`],t[`fontSize${B(n.fontSize)}`]]}})(Nc(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),pl=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=P.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=dl(m);return(0,F.jsxs)(fl,{as:o,className:I(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,F.jsx)(`title`,{children:u}):null]})});pl.muiName=`SvgIcon`;function ml(e,t){function n(t,n){return(0,F.jsx)(pl,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=pl.muiName,P.memo(P.forwardRef(n))}var hl=la,gl=ti,_l=Fi;function vl(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=P.useRef(t!==void 0),[o,s]=P.useState(n);return[a?t:o,P.useCallback(e=>{a||s(e)},[])]}var yl=vl,bl=qc;function xl(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function Sl(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{xl(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=I(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=I(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function Cl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function wl(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function Tl(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function El(e){return typeof e==`function`?e():e}var Dl=e=>{let{classes:t}=e;return ca({root:[`root`],paper:[`paper`]},ll,t)},Ol=R(il,{name:`MuiPopover`,slot:`Root`})({}),kl=R(cl,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),Al=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=P.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=Dl(w),E=P.useCallback(()=>{if(s===`anchorPosition`)return o;let e=El(i),t=(e&&e.nodeType===1?e:fs(C.current).body).getBoundingClientRect();return{top:t.top+Cl(t,a.vertical),left:t.left+wl(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=P.useCallback(e=>({vertical:Cl(e,_.vertical),horizontal:wl(e,_.horizontal)}),[_.horizontal,_.vertical]),O=P.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:Tl(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=ms(El(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:Tl(n)}},[i,s,E,D,f]),[k,A]=P.useState(p),j=P.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[O]);P.useEffect(()=>(x&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,x,j]);let M=()=>{j()},ee=()=>{A(!1)};P.useEffect(()=>{p&&j()}),P.useImperativeHandle(r,()=>p?{updatePosition:()=>{j()}}:null,[p,j]),P.useEffect(()=>{if(!p)return;let e=us(()=>{j()}),t=ms(El(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,j]);let N=y,te={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[ne,re]=zc(`transition`,{elementType:sc,externalForwardedProps:te,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),ee()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!ne.muiSupportAuto&&(N=void 0);let ie=u||(i?fs(El(i)).body:void 0),[ae,{slots:oe,slotProps:se,...ce}]=zc(`root`,{ref:t,elementType:Ol,externalForwardedProps:{...te,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Sl(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:ie,open:p},ownerState:w,className:I(T.root,l)}),[le,ue]=zc(`paper`,{ref:C,className:T.paper,elementType:kl,externalForwardedProps:te,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:w});return(0,F.jsx)(ae,{...ce,...!rs(ae)&&{slots:oe,slotProps:se,disableScrollLock:x},children:(0,F.jsx)(ne,{...re,timeout:N,children:(0,F.jsx)(le,{...ue,children:c})})})}),jl={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},Ml={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},Nl=s({background:()=>iu,backgroundDark:()=>au,black:()=>vu,blueGrey100:()=>Eu,blueGrey300:()=>Du,blueGrey600:()=>Ou,blueGrey900:()=>ku,border:()=>du,borderDark:()=>pu,borderGray:()=>mu,borderLight:()=>fu,buttonBorder:()=>Iu,buttonFocusOutline:()=>Tu,buttonHoverBg:()=>Lu,correct:()=>Bl,correctSecondary:()=>Vl,correctTertiary:()=>Hl,correctWithIcon:()=>Ul,defaults:()=>V,disabled:()=>Ll,disabledSecondary:()=>Rl,disabledText:()=>zl,dropdownBackground:()=>su,fadedPrimary:()=>$l,focusChecked:()=>xu,focusCheckedBorder:()=>Su,focusUnchecked:()=>Cu,focusUncheckedBorder:()=>wu,incorrect:()=>Wl,incorrectSecondary:()=>Kl,incorrectWithIcon:()=>Gl,keyBoardFocusIndicator:()=>Fu,keypadButton:()=>Au,keypadButtonHover:()=>Nu,keypadButtonOperator:()=>ju,keypadButtonOperatorHover:()=>Pu,keypadEmptyPlaceholder:()=>Mu,missing:()=>ql,missingWithIcon:()=>Jl,primary:()=>Yl,primaryDark:()=>Zl,primaryLight:()=>Xl,primaryText:()=>Ql,secondary:()=>eu,secondaryBackground:()=>ou,secondaryDark:()=>nu,secondaryLight:()=>tu,secondaryText:()=>ru,surface:()=>cu,tableGrid:()=>hu,tableGridLight:()=>gu,tableStripe:()=>_u,tertiary:()=>lu,tertiaryLight:()=>uu,text:()=>Il,transparent:()=>bu,v:()=>Pl,visualElementsColors:()=>Ru,white:()=>yu}),V={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:_a[500],CORRECT_SECONDARY:_a[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:ma[500],INCORRECT_SECONDARY:pa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:pa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:Ml[500],PRIMARY_LIGHT:Ml[200],PRIMARY_DARK:Ml[800],SECONDARY:jl.A400,SECONDARY_LIGHT:jl[200],SECONDARY_DARK:jl[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(V);var Pl=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},Fl=Pl(`pie`),Il=()=>Fl(`text`,V.TEXT),Ll=()=>Fl(`disabled`,V.DISABLED),Rl=()=>Fl(`disabled-secondary`,V.DISABLED_SECONDARY),zl=()=>Fl(`disabled-text`,`text`,V.DISABLED_TEXT),Bl=()=>Fl(`correct`,V.CORRECT),Vl=()=>Fl(`correct-secondary`,V.CORRECT_SECONDARY),Hl=()=>Fl(`correct-tertiary`,V.CORRECT_TERTIARY),Ul=()=>Fl(`correct-icon`,V.CORRECT_WITH_ICON),Wl=()=>Fl(`incorrect`,V.INCORRECT),Gl=()=>Fl(`incorrect-icon`,V.INCORRECT_WITH_ICON),Kl=()=>Fl(`incorrect-secondary`,V.INCORRECT_SECONDARY),ql=()=>Fl(`missing`,V.MISSING),Jl=()=>Fl(`missing-icon`,V.MISSING_WITH_ICON),Yl=()=>Fl(`primary`,V.PRIMARY),Xl=()=>Fl(`primary-light`,V.PRIMARY_LIGHT),Zl=()=>Fl(`primary-dark`,V.PRIMARY_DARK),Ql=()=>Fl(`primary-text`,`text`,V.TEXT),$l=()=>Fl(`faded-primary`,V.FADED_PRIMARY),eu=()=>Fl(`secondary`,V.SECONDARY),tu=()=>Fl(`secondary-light`,V.SECONDARY_LIGHT),nu=()=>Fl(`secondary-dark`,V.SECONDARY_DARK),ru=()=>Fl(`secondary-text`,`text`,V.TEXT),iu=()=>Fl(`background`,V.BACKGROUND),au=()=>Fl(`background-dark`,V.BACKGROUND_DARK),ou=()=>Fl(`secondary-background`,V.SECONDARY_BACKGROUND),su=()=>Fl(`dropdown-background`,V.DROPDOWN_BACKGROUND),cu=()=>Fl(`surface`,V.SURFACE),lu=()=>Fl(`tertiary`,V.TERTIARY),uu=()=>Fl(`tertiary-light`,V.TERTIARY_LIGHT),du=()=>Fl(`border`,V.BORDER),fu=()=>Fl(`border-light`,V.BORDER_LIGHT),pu=()=>Fl(`border-dark`,V.BORDER_DARK),mu=()=>Fl(`border-gray`,V.BORDER_GRAY),hu=()=>Fl(`table-grid`,`text`,V.TABLE_GRID),gu=()=>Fl(`table-grid-light`,`border-light`,V.TABLE_GRID_LIGHT),_u=()=>Fl(`table-stripe`,`background-dark`,V.TABLE_STRIPE),vu=()=>Fl(`black`,V.BLACK),yu=()=>Fl(`white`,V.WHITE),bu=()=>V.TRANSPARENT,xu=()=>Fl(`focus-checked`,V.FOCUS_CHECKED),Su=()=>Fl(`focus-checked-border`,V.FOCUS_CHECKED_BORDER),Cu=()=>Fl(`focus-unchecked`,V.FOCUS_UNCHECKED),wu=()=>Fl(`focus-unchecked-border`,V.FOCUS_UNCHECKED_BORDER),Tu=()=>Fl(`button-focus-outline`,V.BUTTON_FOCUS_OUTLINE),Eu=()=>Fl(`blue-grey-100`,V.BLUE_GREY100),Du=()=>Fl(`blue-grey-300`,V.BLUE_GREY300),Ou=()=>Fl(`blue-grey-600`,V.BLUE_GREY600),ku=()=>Fl(`blue-grey-900`,V.BLUE_GREY900),Au=()=>Fl(`keypad-button`,V.KEYPAD_BUTTON),ju=()=>Fl(`keypad-button-operator`,V.KEYPAD_BUTTON_OPERATOR),Mu=()=>Fl(`keypad-empty-placeholder`,V.KEYPAD_EMPTY_PLACEHOLDER),Nu=()=>Fl(`keypad-button-hover`,V.KEYPAD_BUTTON_HOVER),Pu=()=>Fl(`keypad-button-operator-hover`,V.KEYPAD_BUTTON_OPERATOR_HOVER),Fu=()=>Fl(`keyboard-focus-indicator`,V.KEY_BOARD_FOCUS_INDICATOR),Iu=()=>Fl(`button-border`,V.BUTTON_BORDER),Lu=()=>Fl(`button-hover-bg`,V.BUTTON_HOVER_BG),Ru={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},zu=R(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),Bu=R(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${Ll()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Bl()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${Wl()})`}}),Vu=R(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),Hu=class extends P.Component{static propTypes={correctness:v.string,feedback:v.string};nodeRef=P.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,F.jsx)(Hs,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,F.jsx)(Vu,{ref:this.nodeRef,children:(0,F.jsx)(zu,{children:(0,F.jsx)(Bu,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,F.jsx)(`div`,{children:(0,F.jsx)(Zs,{children:this.renderFeedback()})})}};function Uu(){return()=>{}}var eee=s({Correct:()=>Yu,Incorrect:()=>Xu,NothingSubmitted:()=>Qu,PartiallyCorrect:()=>Zu}),Wu=Uu(`pie-libs:render-ui:response-indicators`),Gu=R(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),Ku=R(Al)({cursor:`pointer`}),qu=R(`div`)({padding:`0`,borderRadius:`4px`}),Ju=(e,t)=>{class n extends P.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{Wu(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,F.jsxs)(Gu,{hasFeedback:!!n,children:[(0,F.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,F.jsx)(e,{})}),n&&(0,F.jsx)(Ku,{PaperComponent:qu,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,F.jsx)(Hu,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:v.string},n},Yu=Ju(Ho,`correct`),Xu=Ju(Yo,`incorrect`),Zu=Ju(ns,`partially-correct`),Qu=Ju($o,`nothing-submitted`);function $u(e){return Br(`MuiCollapse`,e)}Vr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var ed=e=>{let{orientation:t,classes:n}=e;return ca({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},$u,n)},td=R(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Nc(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),nd=R(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),rd=R(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),id=P.forwardRef(function(e,t){let n=cs({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=Wa.standard,TransitionComponent:x=Rs,...S}=n,C={...n,orientation:g,collapsedSize:o},w=ed(C),T=xo(),E=bs(),D=P.useRef(null),O=P.useRef(),k=typeof o==`number`?`${o}px`:o,A=g===`horizontal`,j=A?`width`:`height`,M=P.useRef(null),ee=rc(t,M),N=()=>D.current?D.current[A?`clientWidth`:`clientHeight`]:0,te=$s(M,(e,t)=>{D.current&&A&&(D.current.style.position=`absolute`),e.style[j]=k,u&&u(e,t)}),ne=$s(M,(e,t)=>{let n=N();D.current&&A&&(D.current.style.position=``);let{duration:r,easing:i}=tc({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[j]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),re=$s(M,(e,t)=>{e.style[j]=`auto`,d&&d(e,t)}),ie=$s(M,e=>{e.style[j]=`${N()}px`,p&&p(e)}),ae=$s(M,m),oe=$s(M,e=>{let t=N(),{duration:n,easing:r}=tc({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[j]=k,e.style.transitionTimingFunction=r,h&&h(e)}),se=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(M.current,e)},ce={slots:_,slotProps:v,component:s},[le,ue]=zc(`root`,{ref:ee,className:I(w.root,a),elementType:td,externalForwardedProps:ce,ownerState:C,additionalProps:{style:{[A?`minWidth`:`minHeight`]:k,...y}}}),[de,fe]=zc(`wrapper`,{ref:D,className:w.wrapper,elementType:nd,externalForwardedProps:ce,ownerState:C}),[pe,me]=zc(`wrapperInner`,{className:w.wrapperInner,elementType:rd,externalForwardedProps:ce,ownerState:C});return(0,F.jsx)(x,{in:l,onEnter:te,onEntered:re,onEntering:ne,onExit:ie,onExited:ae,onExiting:oe,addEndListener:se,nodeRef:M,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,F.jsx)(le,{...ue,className:I(ue.className,{entered:w.entered,exited:!l&&k===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,F.jsx)(de,{...fe,ownerState:r,children:(0,F.jsx)(pe,{...me,ownerState:r,children:i})})})}})});id&&(id.muiSupportAuto=!0);var ad=`https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js`,od={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},sd=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,cd=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,ld=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,ud=/\\embed\{newLine\}\[\]/g,dd=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],fd=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`);function pd(){return window.MathJax}function md(e){let t=e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e;for(let[e,n]of dd)if(t.startsWith(e)&&t.endsWith(n))return t.substring(e.length,t.length-n.length);return t}function hd(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`))continue;let e=t.textContent;e&&(t.textContent=`\\(${md(e)}\\)`.replace(ud,`\\newline `),t.dataset.mathHandled=`true`)}}function gd(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?ld:cd).test(e.textContent??``)}function _d(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e)},startup:{typeset:!1,ready:()=>{let e=pd()?.startup;e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}},tex:{macros:{...od}},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}}}};r&&s.tex&&(console.warn(sd),s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||ad,c.async=!0,c.onerror=()=>n(Error(`Failed to load MathJax`)),document.head.appendChild(c)})}function vd(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=pd()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function yd(e){let t=pd();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():vd(t):_d(e)}function bd(e){return yd(e).then(()=>{typeof pd()?.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function xd(e){let t=globalThis,n=t[fd];return n||(n=bd(e),t[fd]=n),n}function Sd(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;hd(n);let r=xd(e);if(!gd(n,t)){r.catch(()=>{});return}await r;let i=pd();await i?.startup?.promise,typeof i?.typesetPromise==`function`&&await i.typesetPromise([n])}}var Cd=`@pie-lib/math-rendering`,wd=`@pie-lib/math-rendering@2`,Td=null;function Ed(){return!!window[wd]?.opts?.useSingleDollar}function Dd(){return Td||=Sd({useSingleDollar:Ed()}),Td}function Od(){if(typeof window>`u`)return null;let e=window[Cd];return typeof e?.renderMath==`function`?e:null}var kd=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Od();return r?await r.renderMath?.(n):await Dd()(n),t?n.innerHTML:void 0},Ad=e=>Od()?.wrapMath?.(e)??e,jd=R(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),Md=R(id)(({theme:e})=>({paddingTop:e.spacing(2)})),Nd=class extends P.Component{static propTypes={className:v.string,children:v.object,labels:v.shape({visible:v.string,hidden:v.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){kd(this.root)}componentDidUpdate(){kd(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,F.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,F.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,F.jsx)(jd,{children:r})}),(0,F.jsx)(Md,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function Pd(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var Fd=class e{static create(){return new e}static use(){let t=gs(e.create).current,[n,r]=P.useState(!1);return t.shouldMount=n,t.setShouldMount=r,P.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Ld(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Id(){return Fd.use()}function Ld(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Rd(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=P.useState(!1),f=I(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=I(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),P.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,F.jsx)(`span`,{className:f,style:p,children:(0,F.jsx)(`span`,{className:m})})}var zd=Vr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),Bd=550,Vd=Lt`
49
49
  0% {
50
50
  transform: scale(0);
51
51
  opacity: 0.1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/charting",
3
- "version": "12.1.2-next.21",
3
+ "version": "12.1.2-next.23",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,17 +11,17 @@
11
11
  "@emotion/react": "^11.14.0",
12
12
  "@mui/icons-material": "^7.3.4",
13
13
  "@mui/material": "^7.3.4",
14
- "@pie-lib/charting": "8.0.0-next.44",
15
- "@pie-lib/correct-answer-toggle": "5.0.0-next.49",
16
- "@pie-lib/render-ui": "6.2.0-next.47",
14
+ "@pie-lib/charting": "8.0.0-next.45",
15
+ "@pie-lib/correct-answer-toggle": "5.0.0-next.50",
16
+ "@pie-lib/render-ui": "6.2.0-next.48",
17
17
  "debug": "^4.1.1",
18
18
  "prop-types": "^15.8.1",
19
- "@pie-lib/config-ui": "14.0.0-next.41",
20
- "@pie-lib/editable-html-tip-tap": "3.0.0-next.41",
19
+ "@pie-lib/config-ui": "14.0.0-next.42",
20
+ "@pie-lib/editable-html-tip-tap": "3.0.0-next.42",
21
21
  "@pie-element/shared-lodash": "0.1.1-next.2",
22
22
  "@pie-element/shared-configure-events": "0.1.1-next.0",
23
- "@pie-element/shared-math-rendering-mathjax": "0.1.1-next.3",
24
- "@pie-element/shared-controller-utils": "0.1.1-next.4",
23
+ "@pie-element/shared-math-rendering-mathjax": "0.1.1-next.4",
24
+ "@pie-element/shared-controller-utils": "0.1.1-next.5",
25
25
  "@pie-element/shared-player-events": "0.1.1-next.2",
26
26
  "react": "^18.2.0",
27
27
  "react-dom": "^18.2.0"