@digabi/exam-engine-core 20.0.1-alpha.0 → 20.0.2-images-loading.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. package/dist/__tests__/tsconfig.tsbuildinfo +1 -1
  2. package/dist/components/RenderIf.d.ts.map +1 -1
  3. package/dist/components/context/withContext.d.ts.map +1 -1
  4. package/dist/components/exam/ProceedToExamineAnswers.d.ts +5 -0
  5. package/dist/components/exam/ProceedToExamineAnswers.d.ts.map +1 -0
  6. package/dist/components/exam/ProceedToExamineAnswers.js +20 -0
  7. package/dist/components/exam/ProceedToExamineAnswers.js.map +1 -0
  8. package/dist/components/exam/Question.d.ts.map +1 -1
  9. package/dist/components/grading/GradingAnswer.d.ts.map +1 -1
  10. package/dist/components/grading/GradingAnswer.js +24 -1
  11. package/dist/components/grading/GradingAnswer.js.map +1 -1
  12. package/dist/components/results/isExamExaminePageHook.d.ts +2 -0
  13. package/dist/components/results/isExamExaminePageHook.d.ts.map +1 -0
  14. package/dist/components/results/isExamExaminePageHook.js +7 -0
  15. package/dist/components/results/isExamExaminePageHook.js.map +1 -0
  16. package/dist/main-bundle.js +1 -1
  17. package/dist/store/answers/sagas.d.ts.map +1 -1
  18. package/dist/store/answers/sagas.js +1 -1
  19. package/dist/store/answers/sagas.js.map +1 -1
  20. package/package.json +3 -3
  21. package/dist/components/AttachmentContext.d.ts +0 -14
  22. package/dist/components/AttachmentContext.d.ts.map +0 -1
  23. package/dist/components/AttachmentContext.js +0 -12
  24. package/dist/components/AttachmentContext.js.map +0 -1
  25. package/dist/components/AttachmentLink.d.ts +0 -6
  26. package/dist/components/AttachmentLink.d.ts.map +0 -1
  27. package/dist/components/AttachmentLink.js +0 -24
  28. package/dist/components/AttachmentLink.js.map +0 -1
  29. package/dist/components/AttachmentLinkAnchor.d.ts +0 -7
  30. package/dist/components/AttachmentLinkAnchor.d.ts.map +0 -1
  31. package/dist/components/AttachmentLinkAnchor.js +0 -4
  32. package/dist/components/AttachmentLinkAnchor.js.map +0 -1
  33. package/dist/components/AttachmentLinks.d.ts +0 -6
  34. package/dist/components/AttachmentLinks.d.ts.map +0 -1
  35. package/dist/components/AttachmentLinks.js +0 -58
  36. package/dist/components/AttachmentLinks.js.map +0 -1
  37. package/dist/components/Attachments.d.ts +0 -5
  38. package/dist/components/Attachments.d.ts.map +0 -1
  39. package/dist/components/Attachments.js +0 -43
  40. package/dist/components/Attachments.js.map +0 -1
  41. package/dist/components/AttachmentsAttachment.d.ts +0 -5
  42. package/dist/components/AttachmentsAttachment.d.ts.map +0 -1
  43. package/dist/components/AttachmentsAttachment.js +0 -8
  44. package/dist/components/AttachmentsAttachment.js.map +0 -1
  45. package/dist/components/AttachmentsAttachmentTitle.d.ts +0 -6
  46. package/dist/components/AttachmentsAttachmentTitle.d.ts.map +0 -1
  47. package/dist/components/AttachmentsAttachmentTitle.js +0 -12
  48. package/dist/components/AttachmentsAttachmentTitle.js.map +0 -1
  49. package/dist/components/AttachmentsExternalMaterial.d.ts +0 -9
  50. package/dist/components/AttachmentsExternalMaterial.d.ts.map +0 -1
  51. package/dist/components/AttachmentsExternalMaterial.js +0 -40
  52. package/dist/components/AttachmentsExternalMaterial.js.map +0 -1
  53. package/dist/components/AttachmentsQuestion.d.ts +0 -5
  54. package/dist/components/AttachmentsQuestion.d.ts.map +0 -1
  55. package/dist/components/AttachmentsQuestion.js +0 -16
  56. package/dist/components/AttachmentsQuestion.js.map +0 -1
  57. package/dist/components/AttachmentsQuestionTitle.d.ts +0 -6
  58. package/dist/components/AttachmentsQuestionTitle.d.ts.map +0 -1
  59. package/dist/components/AttachmentsQuestionTitle.js +0 -13
  60. package/dist/components/AttachmentsQuestionTitle.js.map +0 -1
  61. package/dist/components/Audio.d.ts +0 -6
  62. package/dist/components/Audio.d.ts.map +0 -1
  63. package/dist/components/Audio.js +0 -29
  64. package/dist/components/Audio.js.map +0 -1
  65. package/dist/components/AudioGroup.d.ts +0 -6
  66. package/dist/components/AudioGroup.d.ts.map +0 -1
  67. package/dist/components/AudioGroup.js +0 -9
  68. package/dist/components/AudioGroup.js.map +0 -1
  69. package/dist/components/AudioPlaybackError.d.ts +0 -7
  70. package/dist/components/AudioPlaybackError.d.ts.map +0 -1
  71. package/dist/components/AudioPlaybackError.js +0 -12
  72. package/dist/components/AudioPlaybackError.js.map +0 -1
  73. package/dist/components/AudioTest.d.ts +0 -6
  74. package/dist/components/AudioTest.d.ts.map +0 -1
  75. package/dist/components/AudioTest.js +0 -29
  76. package/dist/components/AudioTest.js.map +0 -1
  77. package/dist/components/ChoiceAnswer.d.ts +0 -12
  78. package/dist/components/ChoiceAnswer.d.ts.map +0 -1
  79. package/dist/components/ChoiceAnswer.js +0 -60
  80. package/dist/components/ChoiceAnswer.js.map +0 -1
  81. package/dist/components/CommonExamContext.d.ts +0 -16
  82. package/dist/components/CommonExamContext.d.ts.map +0 -1
  83. package/dist/components/CommonExamContext.js +0 -22
  84. package/dist/components/CommonExamContext.js.map +0 -1
  85. package/dist/components/DropdownAnswer.d.ts +0 -12
  86. package/dist/components/DropdownAnswer.d.ts.map +0 -1
  87. package/dist/components/DropdownAnswer.js +0 -85
  88. package/dist/components/DropdownAnswer.js.map +0 -1
  89. package/dist/components/Exam.d.ts +0 -40
  90. package/dist/components/Exam.d.ts.map +0 -1
  91. package/dist/components/Exam.js +0 -106
  92. package/dist/components/Exam.js.map +0 -1
  93. package/dist/components/ExamAttachment.d.ts +0 -5
  94. package/dist/components/ExamAttachment.d.ts.map +0 -1
  95. package/dist/components/ExamAttachment.js +0 -8
  96. package/dist/components/ExamAttachment.js.map +0 -1
  97. package/dist/components/ExamContext.d.ts +0 -10
  98. package/dist/components/ExamContext.d.ts.map +0 -1
  99. package/dist/components/ExamContext.js +0 -11
  100. package/dist/components/ExamContext.js.map +0 -1
  101. package/dist/components/ExamFooter.d.ts +0 -6
  102. package/dist/components/ExamFooter.d.ts.map +0 -1
  103. package/dist/components/ExamFooter.js +0 -7
  104. package/dist/components/ExamFooter.js.map +0 -1
  105. package/dist/components/ExamInstruction.d.ts +0 -6
  106. package/dist/components/ExamInstruction.d.ts.map +0 -1
  107. package/dist/components/ExamInstruction.js +0 -6
  108. package/dist/components/ExamInstruction.js.map +0 -1
  109. package/dist/components/ExamQuestion.d.ts +0 -5
  110. package/dist/components/ExamQuestion.d.ts.map +0 -1
  111. package/dist/components/ExamQuestion.js +0 -16
  112. package/dist/components/ExamQuestion.js.map +0 -1
  113. package/dist/components/ExamQuestionInstruction.d.ts +0 -6
  114. package/dist/components/ExamQuestionInstruction.d.ts.map +0 -1
  115. package/dist/components/ExamQuestionInstruction.js +0 -6
  116. package/dist/components/ExamQuestionInstruction.js.map +0 -1
  117. package/dist/components/ExamQuestionTitle.d.ts +0 -6
  118. package/dist/components/ExamQuestionTitle.d.ts.map +0 -1
  119. package/dist/components/ExamQuestionTitle.js +0 -25
  120. package/dist/components/ExamQuestionTitle.js.map +0 -1
  121. package/dist/components/ExamSection.d.ts +0 -5
  122. package/dist/components/ExamSection.d.ts.map +0 -1
  123. package/dist/components/ExamSection.js +0 -30
  124. package/dist/components/ExamSection.js.map +0 -1
  125. package/dist/components/ExamSectionTitle.d.ts +0 -6
  126. package/dist/components/ExamSectionTitle.d.ts.map +0 -1
  127. package/dist/components/ExamSectionTitle.js +0 -21
  128. package/dist/components/ExamSectionTitle.js.map +0 -1
  129. package/dist/components/ExternalMaterialList.d.ts +0 -10
  130. package/dist/components/ExternalMaterialList.d.ts.map +0 -1
  131. package/dist/components/ExternalMaterialList.js +0 -31
  132. package/dist/components/ExternalMaterialList.js.map +0 -1
  133. package/dist/components/File.d.ts +0 -6
  134. package/dist/components/File.d.ts.map +0 -1
  135. package/dist/components/File.js +0 -15
  136. package/dist/components/File.js.map +0 -1
  137. package/dist/components/Formula.d.ts +0 -6
  138. package/dist/components/Formula.d.ts.map +0 -1
  139. package/dist/components/Formula.js +0 -12
  140. package/dist/components/Formula.js.map +0 -1
  141. package/dist/components/Hints.d.ts +0 -6
  142. package/dist/components/Hints.d.ts.map +0 -1
  143. package/dist/components/Hints.js +0 -32
  144. package/dist/components/Hints.js.map +0 -1
  145. package/dist/components/Image.d.ts +0 -6
  146. package/dist/components/Image.d.ts.map +0 -1
  147. package/dist/components/Image.js +0 -25
  148. package/dist/components/Image.js.map +0 -1
  149. package/dist/components/ImageOverlay.d.ts +0 -6
  150. package/dist/components/ImageOverlay.d.ts.map +0 -1
  151. package/dist/components/ImageOverlay.js +0 -45
  152. package/dist/components/ImageOverlay.js.map +0 -1
  153. package/dist/components/ProgressBar.d.ts +0 -6
  154. package/dist/components/ProgressBar.d.ts.map +0 -1
  155. package/dist/components/ProgressBar.js +0 -18
  156. package/dist/components/ProgressBar.js.map +0 -1
  157. package/dist/components/QuestionContext.d.ts +0 -14
  158. package/dist/components/QuestionContext.d.ts.map +0 -1
  159. package/dist/components/QuestionContext.js +0 -20
  160. package/dist/components/QuestionContext.js.map +0 -1
  161. package/dist/components/Reference.d.ts +0 -6
  162. package/dist/components/Reference.d.ts.map +0 -1
  163. package/dist/components/Reference.js +0 -63
  164. package/dist/components/Reference.js.map +0 -1
  165. package/dist/components/References.d.ts +0 -6
  166. package/dist/components/References.d.ts.map +0 -1
  167. package/dist/components/References.js +0 -23
  168. package/dist/components/References.js.map +0 -1
  169. package/dist/components/ResponsiveMediaContainer.d.ts +0 -17
  170. package/dist/components/ResponsiveMediaContainer.d.ts.map +0 -1
  171. package/dist/components/ResponsiveMediaContainer.js +0 -20
  172. package/dist/components/ResponsiveMediaContainer.js.map +0 -1
  173. package/dist/components/RestrictedAudioPlayer.d.ts +0 -11
  174. package/dist/components/RestrictedAudioPlayer.d.ts.map +0 -1
  175. package/dist/components/RestrictedAudioPlayer.js +0 -29
  176. package/dist/components/RestrictedAudioPlayer.js.map +0 -1
  177. package/dist/components/RichTextAnswer.d.ts +0 -31
  178. package/dist/components/RichTextAnswer.d.ts.map +0 -1
  179. package/dist/components/RichTextAnswer.js +0 -70
  180. package/dist/components/RichTextAnswer.js.map +0 -1
  181. package/dist/components/SaveIndicator.d.ts +0 -5
  182. package/dist/components/SaveIndicator.d.ts.map +0 -1
  183. package/dist/components/SaveIndicator.js +0 -15
  184. package/dist/components/SaveIndicator.js.map +0 -1
  185. package/dist/components/Score.d.ts +0 -6
  186. package/dist/components/Score.d.ts.map +0 -1
  187. package/dist/components/Score.js +0 -13
  188. package/dist/components/Score.js.map +0 -1
  189. package/dist/components/Section.d.ts +0 -3
  190. package/dist/components/Section.d.ts.map +0 -1
  191. package/dist/components/Section.js +0 -7
  192. package/dist/components/Section.js.map +0 -1
  193. package/dist/components/SectionContext.d.ts +0 -13
  194. package/dist/components/SectionContext.d.ts.map +0 -1
  195. package/dist/components/SectionContext.js +0 -21
  196. package/dist/components/SectionContext.js.map +0 -1
  197. package/dist/components/SectionInstruction.d.ts +0 -6
  198. package/dist/components/SectionInstruction.d.ts.map +0 -1
  199. package/dist/components/SectionInstruction.js +0 -6
  200. package/dist/components/SectionInstruction.js.map +0 -1
  201. package/dist/components/TableOfContents.d.ts +0 -13
  202. package/dist/components/TableOfContents.d.ts.map +0 -1
  203. package/dist/components/TableOfContents.js +0 -66
  204. package/dist/components/TableOfContents.js.map +0 -1
  205. package/dist/components/TextAnswer.d.ts +0 -6
  206. package/dist/components/TextAnswer.d.ts.map +0 -1
  207. package/dist/components/TextAnswer.js +0 -16
  208. package/dist/components/TextAnswer.js.map +0 -1
  209. package/dist/components/TextAnswerInput.d.ts +0 -37
  210. package/dist/components/TextAnswerInput.d.ts.map +0 -1
  211. package/dist/components/TextAnswerInput.js +0 -145
  212. package/dist/components/TextAnswerInput.js.map +0 -1
  213. package/dist/components/Video.d.ts +0 -6
  214. package/dist/components/Video.d.ts.map +0 -1
  215. package/dist/components/Video.js +0 -15
  216. package/dist/components/Video.js.map +0 -1
  217. package/dist/components/results/AnnotationList.d.ts +0 -5
  218. package/dist/components/results/AnnotationList.d.ts.map +0 -1
  219. package/dist/components/results/AnnotationList.js +0 -40
  220. package/dist/components/results/AnnotationList.js.map +0 -1
  221. package/dist/components/results/ResultsChoiceAnswer.d.ts +0 -6
  222. package/dist/components/results/ResultsChoiceAnswer.d.ts.map +0 -1
  223. package/dist/components/results/ResultsChoiceAnswer.js +0 -60
  224. package/dist/components/results/ResultsChoiceAnswer.js.map +0 -1
  225. package/dist/components/results/ResultsContext.d.ts +0 -20
  226. package/dist/components/results/ResultsContext.d.ts.map +0 -1
  227. package/dist/components/results/ResultsContext.js +0 -68
  228. package/dist/components/results/ResultsContext.js.map +0 -1
  229. package/dist/components/results/ResultsDropdownAnswer.d.ts +0 -6
  230. package/dist/components/results/ResultsDropdownAnswer.d.ts.map +0 -1
  231. package/dist/components/results/ResultsDropdownAnswer.js +0 -41
  232. package/dist/components/results/ResultsDropdownAnswer.js.map +0 -1
  233. package/dist/components/results/ResultsExamQuestion.d.ts +0 -5
  234. package/dist/components/results/ResultsExamQuestion.d.ts.map +0 -1
  235. package/dist/components/results/ResultsExamQuestion.js +0 -23
  236. package/dist/components/results/ResultsExamQuestion.js.map +0 -1
  237. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts +0 -10
  238. package/dist/components/results/ResultsExamQuestionAutoScore.d.ts.map +0 -1
  239. package/dist/components/results/ResultsExamQuestionAutoScore.js +0 -16
  240. package/dist/components/results/ResultsExamQuestionAutoScore.js.map +0 -1
  241. package/dist/components/results/ResultsExamQuestionManualScore.d.ts +0 -11
  242. package/dist/components/results/ResultsExamQuestionManualScore.d.ts.map +0 -1
  243. package/dist/components/results/ResultsExamQuestionManualScore.js +0 -62
  244. package/dist/components/results/ResultsExamQuestionManualScore.js.map +0 -1
  245. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts +0 -9
  246. package/dist/components/results/ResultsExamQuestionScoresContainer.d.ts.map +0 -1
  247. package/dist/components/results/ResultsExamQuestionScoresContainer.js +0 -8
  248. package/dist/components/results/ResultsExamQuestionScoresContainer.js.map +0 -1
  249. package/dist/components/results/ResultsExamQuestionTitle.d.ts +0 -6
  250. package/dist/components/results/ResultsExamQuestionTitle.d.ts.map +0 -1
  251. package/dist/components/results/ResultsExamQuestionTitle.js +0 -22
  252. package/dist/components/results/ResultsExamQuestionTitle.js.map +0 -1
  253. package/dist/components/results/ResultsExamSection.d.ts +0 -5
  254. package/dist/components/results/ResultsExamSection.d.ts.map +0 -1
  255. package/dist/components/results/ResultsExamSection.js +0 -17
  256. package/dist/components/results/ResultsExamSection.js.map +0 -1
  257. package/dist/components/results/ResultsScoredTextAnswer.d.ts +0 -6
  258. package/dist/components/results/ResultsScoredTextAnswer.d.ts.map +0 -1
  259. package/dist/components/results/ResultsScoredTextAnswer.js +0 -22
  260. package/dist/components/results/ResultsScoredTextAnswer.js.map +0 -1
  261. package/dist/components/results/ResultsSingleLineAnswer.d.ts +0 -12
  262. package/dist/components/results/ResultsSingleLineAnswer.d.ts.map +0 -1
  263. package/dist/components/results/ResultsSingleLineAnswer.js +0 -12
  264. package/dist/components/results/ResultsSingleLineAnswer.js.map +0 -1
  265. package/dist/components/results/ResultsTextAnswer.d.ts +0 -6
  266. package/dist/components/results/ResultsTextAnswer.d.ts.map +0 -1
  267. package/dist/components/results/ResultsTextAnswer.js +0 -51
  268. package/dist/components/results/ResultsTextAnswer.js.map +0 -1
  269. package/dist/components/results/helpers.d.ts +0 -9
  270. package/dist/components/results/helpers.d.ts.map +0 -1
  271. package/dist/components/results/helpers.js +0 -10
  272. package/dist/components/results/helpers.js.map +0 -1
  273. package/dist/components/types.d.ts +0 -110
  274. package/dist/components/types.d.ts.map +0 -1
  275. package/dist/components/types.js +0 -1
  276. package/dist/components/types.js.map +0 -1
  277. package/dist/components/withContext.d.ts +0 -3
  278. package/dist/components/withContext.d.ts.map +0 -1
  279. package/dist/components/withContext.js +0 -12
  280. package/dist/components/withContext.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioTest.d.ts","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,SAAS,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,eA6BjD;;AAED,wBAAoC"}
@@ -1,29 +0,0 @@
1
- import { faPlay } from '@fortawesome/free-solid-svg-icons/faPlay';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import React from 'react';
4
- import { useTranslation } from 'react-i18next';
5
- import { useDispatch, useSelector } from 'react-redux';
6
- import { getNumericAttribute, NBSP } from '../dom-utils';
7
- import { playAudio } from '../store/audio/actions';
8
- import { getAudioPlaybackError, getAudioState } from '../store/selectors';
9
- import AudioPlaybackError from './AudioPlaybackError';
10
- function AudioTest({ element }) {
11
- const src = element.getAttribute('src');
12
- const duration = getNumericAttribute(element, 'duration');
13
- const { t } = useTranslation();
14
- const audioState = useSelector(getAudioState(src));
15
- const audioPlaybackError = useSelector(getAudioPlaybackError(src));
16
- const dispatch = useDispatch();
17
- return (React.createElement("div", { className: "e-audio-test notification e-pad-2 e-mrg-b-4" },
18
- React.createElement("p", null, t('audio-test.instructions')),
19
- React.createElement("div", { className: "e-columns e-columns--center-v e-mrg-b-2" },
20
- React.createElement("div", { className: "e-column e-column--narrow" },
21
- React.createElement("button", { className: "e-button", disabled: audioState !== 'stopped', onClick: () => audioState === 'stopped' && dispatch(playAudio({ src, duration })) },
22
- React.createElement(FontAwesomeIcon, { className: "e-mrg-r-1", icon: faPlay, fixedWidth: true }),
23
- t('audio-test.play'))),
24
- React.createElement("div", { className: "e-column" },
25
- React.createElement(AudioPlaybackError, { error: audioPlaybackError }, NBSP))),
26
- React.createElement("div", null, t('audio-test.volume'))));
27
- }
28
- export default React.memo(AudioTest);
29
- //# sourceMappingURL=AudioTest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AudioTest.js","sourceRoot":"","sources":["../../src/components/AudioTest.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0CAA0C,CAAA;AACjE,OAAO,E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W,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,SAAG;oBACjE,CAAC,CAAC,iBAAiB,CAAC,CACd,CACL;YACN,6BAAK,SAAS,EAAC,UAAU;gBACvB,oBAAC,kBAAkB,IAAC,KAAK,EAAE,kBAAkB,IAAG,IAAI,CAAsB,CACtE,CACF;QACN,iCAAM,CAAC,CAAC,mBAAmB,CAAC,CAAO,CAC/B,CACP,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA"}
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import * as actions from '../store/answers/actions';
3
- import { ExamComponentProps } from '../createRenderChildNodes';
4
- import { ChoiceAnswer as ChoiceAnswerT } from '../types/ExamAnswer';
5
- interface ChoiceAnswerProps extends ExamComponentProps {
6
- answer?: ChoiceAnswerT;
7
- saveAnswer: typeof actions.saveAnswer;
8
- }
9
- declare function ChoiceAnswer({ answer, saveAnswer, element, renderChildNodes }: ChoiceAnswerProps): JSX.Element;
10
- declare const _default: import("react-redux").ConnectedComponent<typeof ChoiceAnswer, Pick<ChoiceAnswerProps, "className" | "element" | "renderChildNodes"> & ExamComponentProps>;
11
- export default _default;
12
- //# sourceMappingURL=ChoiceAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceAnswer.d.ts","sourceRoot":"","sources":["../../src/components/ChoiceAnswer.tsx"],"names":[],"mappings":";AAKA,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,YAAY,IAAI,aAAa,EAAc,MAAM,qBAAqB,CAAA;AAiE/E,UAAU,iBAAkB,SAAQ,kBAAkB;IACpD,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,UAAU,EAAE,OAAO,OAAO,CAAC,UAAU,CAAA;CACtC;AAED,iBAAS,YAAY,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,iBAAiB,eA2CzF;;AAQD,wBAEgB"}
@@ -1,60 +0,0 @@
1
- import classNames from 'classnames';
2
- import React from 'react';
3
- import { connect } from 'react-redux';
4
- import { getNumericAttribute, mapChildElements, query } from '../dom-utils';
5
- import * as actions from '../store/answers/actions';
6
- import AnswerToolbar from './AnswerToolbar';
7
- function ChoiceAnswerOption({ selected, element, renderChildNodes, questionId, onSelect, direction, }) {
8
- const className = element.getAttribute('class');
9
- const optionId = element.getAttribute('option-id');
10
- const content = (React.createElement("div", { className: classNames('e-choice-answer-option e-column', className, {
11
- 'e-choice-answer-option--selected': selected,
12
- }) }, renderChildNodes(element)));
13
- return direction === 'vertical' ? (React.createElement("div", { className: "e-mrg-b-1" },
14
- React.createElement("label", { className: classNames('e-columns', {
15
- 'e-columns--inline': query(element, ['image', 'video']) == null /* Force full width for options containing responsive media */,
16
- }) },
17
- React.createElement("input", { type: "radio", className: "e-radio-button e-column e-column--narrow", name: String(questionId), onChange: onSelect, value: optionId, checked: selected }),
18
- content))) : (React.createElement("div", { className: "e-column e-mrg-b-1" },
19
- React.createElement("label", { className: "e-block e-text-center" },
20
- React.createElement("input", { type: "radio", className: "e-radio-button", name: String(questionId), onChange: onSelect, value: optionId, checked: selected }),
21
- content)));
22
- }
23
- function ChoiceAnswer({ answer, saveAnswer, element, renderChildNodes }) {
24
- const questionId = getNumericAttribute(element, 'question-id');
25
- const direction = element.getAttribute('direction') || 'vertical';
26
- const className = element.getAttribute('class');
27
- const displayNumber = element.getAttribute('display-number');
28
- const onSelect = (event) => {
29
- saveAnswer({ type: 'choice', questionId, value: event.currentTarget.value, displayNumber });
30
- };
31
- return (React.createElement(React.Fragment, null,
32
- React.createElement("div", { className: classNames('e-choice-answer', className, {
33
- 'e-columns': direction === 'horizontal',
34
- }) }, mapChildElements(element, (childElement) => {
35
- const optionId = childElement.getAttribute('option-id');
36
- const selected = answer != null && answer.value === optionId;
37
- return (React.createElement(ChoiceAnswerOption, Object.assign({}, {
38
- element: childElement,
39
- onSelect,
40
- renderChildNodes,
41
- questionId,
42
- key: optionId,
43
- direction,
44
- selected,
45
- })));
46
- })),
47
- React.createElement(AnswerToolbar, Object.assign({}, {
48
- answer,
49
- element,
50
- }))));
51
- }
52
- function mapStateToProps(state, { element }) {
53
- const questionId = getNumericAttribute(element, 'question-id');
54
- const answer = state.answers.answersById[questionId];
55
- return { answer };
56
- }
57
- export default connect(mapStateToProps, {
58
- saveAnswer: actions.saveAnswer,
59
- })(ChoiceAnswer);
60
- //# sourceMappingURL=ChoiceAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChoiceAnswer.js","sourceRoot":"","sources":["../../src/components/ChoiceAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAE3E,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AACnD,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAW3C,SAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,SAAS,GACe;IACxB,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;IACnD,MAAM,OAAO,GAAG,CACd,6BACE,SAAS,EAAE,UAAU,CAAC,iCAAiC,EAAE,SAAS,EAAE;YAClE,kCAAkC,EAAE,QAAQ;SAC7C,CAAC,IAED,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAA;IAED,OAAO,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAChC,6BAAK,SAAS,EA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AE,CAAC,CAAA;IAC7F,CAAC,CAAA;IAED,OAAO,CACL;QACE,6BACE,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;gBAClD,WAAW,EAAE,SAAS,KAAK,YAAY;aACxC,CAAC,IAED,gBAAgB,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,EAAE;YAC1C,MAAM,QAAQ,GAAG,YAAY,CAAC,YAAY,CAAC,WAAW,CAAE,CAAA;YACxD,MAAM,QAAQ,GAAG,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,CAAA;YAE5D,OAAO,CACL,oBAAC,kBAAkB,oBACb;gBACF,OAAO,EAAE,YAAY;gBACrB,QAAQ;gBACR,gBAAgB;gBAChB,UAAU;gBACV,GAAG,EAAE,QAAQ;gBACb,SAAS;gBACT,QAAQ;aACT,EACD,CACH,CAAA;QACH,CAAC,CAAC,CACE;QACN,oBAAC,aAAa,oBACR;YACF,MAAM;YACN,OAAO;SACR,EACD,CACD,CACJ,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAe,EAAE,EAAE,OAAO,EAAsB;IACvE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAA8B,CAAA;IACjF,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC;AAED,eAAe,OAAO,CAAC,eAAe,EAAE;IACtC,UAAU,EAAE,OAAO,CAAC,UAAU;CAC/B,CAAC,CAAC,YAAY,CAAC,CAAA"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { CommonExamProps } from './Exam';
3
- export interface CommonExamContext {
4
- attachmentsURL: string;
5
- date?: Date;
6
- dateTimeFormatter: Intl.DateTimeFormat;
7
- language: string;
8
- maxAnswers?: number;
9
- maxScore?: number;
10
- numberOfSections: number;
11
- resolveAttachment: (filename: string) => string;
12
- root: Element;
13
- }
14
- export declare const CommonExamContext: React.Context<CommonExamContext>;
15
- export declare function withCommonExamContext<P extends CommonExamProps>(Component: React.ComponentType<P>): React.ComponentType<P>;
16
- //# sourceMappingURL=CommonExamContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommonExamContext.d.ts","sourceRoot":"","sources":["../../src/components/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAGxC,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,iBAAiB,EAAE,IAAI,CAAC,cAAc,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IACxB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,IAAI,EAAE,OAAO,CAAA;CACd;AAED,eAAO,MAAM,iBAAiB,kCAA+C,CAAA;AAE7E,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,eAAe,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,0BAoBjG"}
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { getNumericAttribute, queryAll } from '../dom-utils';
3
- import { withContext } from './withContext';
4
- export const CommonExamContext = React.createContext({});
5
- export function withCommonExamContext(Component) {
6
- return withContext(CommonExamContext, ({ attachmentsURL, resolveAttachment, doc, language }) => {
7
- const root = doc.documentElement;
8
- const maybeDate = root.getAttribute('date');
9
- return {
10
- attachmentsURL,
11
- resolveAttachment,
12
- root,
13
- date: maybeDate ? new Date(maybeDate) : undefined,
14
- dateTimeFormatter: new Intl.DateTimeFormat('fi-FI', { timeZone: 'UTC' }),
15
- language,
16
- maxAnswers: getNumericAttribute(root, 'max-answers'),
17
- maxScore: getNumericAttribute(root, 'max-score'),
18
- numberOfSections: queryAll(root, 'section').length,
19
- };
20
- })(Component);
21
- }
22
- //# sourceMappingURL=CommonExamContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CommonExamContext.js","sourceRoot":"","sources":["../../src/components/CommonExamContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAc3C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAC,EAAuB,CAAC,CAAA;AAE7E,MAAM,UAAU,qBAAqB,CAA4B,SAAiC;IAChG,OAAO,WAAW,CAChB,iBAAiB,EACjB,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvD,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAA;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAA;QAE3C,OAAO;YACL,cAAc;YACd,iBAAiB;YACjB,IAAI;YACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS;YACjD,iBAAiB,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;YACxE,QAAQ;YACR,UAAU,EAAE,mBAAmB,CAAC,IAAI,EAAE,aAAa,CAAC;YACpD,QAAQ,EAAE,mBAAmB,CAAC,IAAI,EAAE,WAAW,CAAC;YAChD,gBAAgB,EAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,MAAM;SACnD,CAAA;IACH,CAAC,CACF,CAAC,SAAS,CAAC,CAAA;AACd,CAAC"}
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import * as actions from '../store/answers/actions';
3
- import { ExamComponentProps } from '../createRenderChildNodes';
4
- import { ChoiceAnswer as ChoiceAnswerT } from '../types/ExamAnswer';
5
- interface DropdownAnswerProps extends ExamComponentProps {
6
- saveAnswer: typeof actions.saveAnswer;
7
- answer?: ChoiceAnswerT;
8
- }
9
- declare function DropdownAnswer({ element, renderChildNodes, saveAnswer, answer }: DropdownAnswerProps): JSX.Element;
10
- declare const _default: import("react-redux").ConnectedComponent<typeof DropdownAnswer, Pick<DropdownAnswerProps, "className" | "element" | "renderChildNodes"> & ExamComponentProps>;
11
- export default _default;
12
- //# sourceMappingURL=DropdownAnswer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownAnswer.d.ts","sourceRoot":"","sources":["../../src/components/DropdownAnswer.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,YAAY,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnE,UAAU,mBAAoB,SAAQ,kBAAkB;IACtD,UAAU,EAAE,OAAO,OAAO,CAAC,UAAU,CAAA;IACrC,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AASD,iBAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,mBAAmB,eAoH7F;;AAQD,wBAEkB"}
@@ -1,85 +0,0 @@
1
- import { faChevronDown } from '@fortawesome/free-solid-svg-icons/faChevronDown';
2
- import { faChevronUp } from '@fortawesome/free-solid-svg-icons/faChevronUp';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import classNames from 'classnames';
5
- import Downshift from 'downshift';
6
- import * as _ from 'lodash-es';
7
- import React, { useContext, useEffect, useRef, useState } from 'react';
8
- import { connect } from 'react-redux';
9
- import { findChildElement, getNumericAttribute, mapChildElements, NBSP } from '../dom-utils';
10
- import * as fonts from '../fonts';
11
- import * as actions from '../store/answers/actions';
12
- import { QuestionContext } from './QuestionContext';
13
- import { Score } from './Score';
14
- const menuBorderWidthPx = 2;
15
- const roundingErrorCompensationPx = 1;
16
- const noAnswer = '';
17
- const runningInBrowser = !navigator.userAgent.includes('jsdom/');
18
- function DropdownAnswer({ element, renderChildNodes, saveAnswer, answer }) {
19
- const questionId = getNumericAttribute(element, 'question-id');
20
- const maxScore = getNumericAttribute(element, 'max-score');
21
- const displayNumber = element.getAttribute('display-number');
22
- const currentlySelectedItem = answer &&
23
- answer.value &&
24
- findChildElement(element, (childElement) => answer.value === childElement.getAttribute('option-id'));
25
- const onChange = (selectedAnswer) => {
26
- const value = selectedAnswer ? selectedAnswer.getAttribute('option-id') : '';
27
- saveAnswer({ type: 'choice', questionId, value, displayNumber });
28
- };
29
- const labelRef = useRef(null);
30
- const menuRef = React.useRef(null);
31
- const [measuring, setMeasuring] = useState(true);
32
- if (runningInBrowser) {
33
- // Force a re-measure if element changes or fonts are loaded after this
34
- // component has been rendered.
35
- const [, setFontsLoaded] = useState(fonts.loaded);
36
- fonts.ready.then(() => setFontsLoaded(true));
37
- useEffect(() => setMeasuring(true), [element]);
38
- useEffect(() => {
39
- if (measuring && menuRef.current && labelRef.current) {
40
- const menuEl = menuRef.current;
41
- const labelEl = labelRef.current;
42
- const preferredWidth = _.max(mapChildElements(menuEl, (el) => el.firstElementChild.scrollWidth));
43
- // Run the DOM mutations on the next frame to avoid layout trashing in exams with lots of dropdowns.
44
- const requestId = requestAnimationFrame(() => {
45
- labelEl.style.width = preferredWidth + menuBorderWidthPx + roundingErrorCompensationPx + 'px';
46
- setMeasuring(false);
47
- });
48
- return () => cancelAnimationFrame(requestId);
49
- }
50
- });
51
- }
52
- const items = [noAnswer, ...element.children];
53
- const { answers } = useContext(QuestionContext);
54
- return (React.createElement("span", { className: "e-nowrap" },
55
- React.createElement(Downshift, { itemToString: (item) => (item ? item.textContent : ''), onChange: onChange, initialSelectedItem: currentlySelectedItem }, ({ getItemProps, getMenuProps, getLabelProps, getToggleButtonProps, highlightedIndex, isOpen, selectedItem, }) => (React.createElement("span", { className: classNames('e-dropdown-answer e-normal') },
56
- React.createElement("div", Object.assign({ className: classNames('e-dropdown-answer__toggle-button e-columns', {
57
- 'e-dropdown-answer__toggle-button--open': isOpen,
58
- }), tabIndex: "0" }, getToggleButtonProps()),
59
- React.createElement("span", Object.assign({ className: "e-dropdown-answer__label e-column e-pad-l-1 e-pad-r-4" }, getLabelProps()),
60
- React.createElement("div", { className: "e-ellipsis", ref: labelRef }, selectedItem ? renderChildNodes(selectedItem) : NBSP)),
61
- React.createElement("span", { className: classNames('e-dropdown-answer__toggle-icon e-text-center e-column e-column--narrow e-column--gapless e-color-link') },
62
- React.createElement(FontAwesomeIcon, { icon: isOpen ? faChevronUp : faChevronDown }))),
63
- React.createElement("div", Object.assign({}, getMenuProps({
64
- className: classNames('e-dropdown-answer__menu', { 'e-dropdown-answer__menu--open': isOpen }),
65
- ref: menuRef,
66
- }, { suppressRefError: !runningInBrowser })), items.map((item, i) => (React.createElement("div", Object.assign({ className: classNames('e-dropdown-answer__menu-item e-pad-l-1 e-pad-r-4', {
67
- 'e-dropdown-answer__menu-item--selected': item === selectedItem,
68
- 'e-bg-color-off-white': highlightedIndex !== i,
69
- 'e-bg-color-lighterblue': highlightedIndex === i,
70
- }), key: i }, getItemProps({
71
- item,
72
- index: i,
73
- })),
74
- React.createElement("div", { className: classNames('e-dropdown-answer__menu-item-inner', { 'e-nowrap': measuring }) }, item ? renderChildNodes(item) : NBSP)))))))),
75
- answers.length > 1 && React.createElement(Score, { score: maxScore, size: 'inline' })));
76
- }
77
- function mapStateToprops(state, { element }) {
78
- const questionId = getNumericAttribute(element, 'question-id');
79
- const answer = state.answers.answersById[questionId];
80
- return { answer };
81
- }
82
- export default connect(mapStateToprops, {
83
- saveAnswer: actions.saveAnswer,
84
- })(DropdownAnswer);
85
- //# sourceMappingURL=DropdownAnswer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DropdownAnswer.js","sourceRoot":"","sources":["../../src/components/DropdownAnswer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,SAAS,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,CAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,KAAK,KAAK,MAAM,UAAU,CAAA;AAEjC,OAAO,KAAK,OAAO,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAS/B,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAC3B,MAAM,2BAA2B,GAAG,CAAC,CAAA;AACrC,MAAM,QAAQ,GAAG,EAAE,CAAA;AACnB,MAAM,gBAAgB,GAAG,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAIhE,SAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAuB;IAC5F,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;I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KAAK,IAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAI,CAC5D,CACR,CAAA;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAe,EAAE,EAAE,OAAO,EAAsB;IACvE,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAE,CAAA;IAC/D,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAA8B,CAAA;IACjF,OAAO,EAAE,MAAM,EAAE,CAAA;AACnB,CAAC;AAED,eAAe,OAAO,CAAC,eAAe,EAAE;IACtC,UAAU,EAAE,OAAO,CAAC,UAAU;CAC/B,CAAC,CAAC,cAAc,CAAC,CAAA"}
@@ -1,40 +0,0 @@
1
- import React, { PureComponent } from 'react';
2
- import { ExamAnswer } from '../types/ExamAnswer';
3
- import { ExamServerAPI, InitialCasStatus, RestrictedAudioPlaybackStats } from '../types/ExamServerAPI';
4
- /** Props common to taking the exams and viewing results */
5
- export interface CommonExamProps {
6
- /** Initial answers */
7
- answers: ExamAnswer[];
8
- /** The URL for the attachments page */
9
- attachmentsURL: string;
10
- /** A function that maps an attachment filename to a full URI. */
11
- resolveAttachment: (filename: string) => string;
12
- /** The exam XML */
13
- doc: XMLDocument;
14
- /** The language of the user interface */
15
- language: string;
16
- }
17
- /** Props related to taking the exam, 'executing' it */
18
- export interface ExamProps extends CommonExamProps {
19
- /** The status of CAS software on the OS */
20
- casStatus: InitialCasStatus;
21
- /** The CAS countdown duration in seconds. 60 seconds by default. */
22
- casCountdownDuration?: number;
23
- /**
24
- * Playback statistics about restricted audio files. Used for calculating
25
- * whether the user can listen to them any more.
26
- */
27
- restrictedAudioPlaybackStats: RestrictedAudioPlaybackStats[];
28
- /** Exam Server API implementation */
29
- examServerApi: ExamServerAPI;
30
- }
31
- export declare class Exam extends PureComponent<ExamProps> {
32
- private store;
33
- private i18n;
34
- constructor(props: ExamProps);
35
- componentDidMount(): void;
36
- render(): JSX.Element;
37
- }
38
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamProps>>;
39
- export default _default;
40
- //# sourceMappingURL=Exam.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Exam.d.ts","sourceRoot":"","sources":["../../src/components/Exam.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAwC5C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAGtG,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,sBAAsB;IACtB,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAA;IACtB,iEAAiE;IACjE,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;IAC/C,mBAAmB;IACnB,GAAG,EAAE,WAAW,CAAA;IAChB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,uDAAuD;AACvD,MAAM,WAAW,SAAU,SAAQ,eAAe;IAChD,2CAA2C;IAC3C,SAAS,EAAE,gBAAgB,CAAA;IAC3B,oEAAoE;IACpE,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B;;;OAGG;IACH,4BAA4B,EAAE,4BAA4B,EAAE,CAAA;IAC5D,qCAAqC;IACrC,aAAa,EAAE,aAAa,CAAA;CAC7B;AA+BD,qBAAa,IAAK,SAAQ,aAAa,CAAC,SAAS,CAAC;IAChD,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,IAAI,CAAM;gBAEN,KAAK,EAAE,SAAS;IAY5B,iBAAiB;IAIjB,MAAM;CA2CP;;AAED,wBAAuE"}
@@ -1,106 +0,0 @@
1
- import React, { PureComponent } from 'react';
2
- import { I18nextProvider } from 'react-i18next';
3
- import { Provider } from 'react-redux';
4
- import { createRenderChildNodes } from '../createRenderChildNodes';
5
- import { findChildElement } from '../dom-utils';
6
- import { initI18n } from '../i18n';
7
- import { scrollToHash } from '../scrollToHash';
8
- import { initializeExamStore } from '../store/index';
9
- import AttachmentLink from './AttachmentLink';
10
- import AttachmentLinks from './AttachmentLinks';
11
- import Audio from './Audio';
12
- import AudioGroup from './AudioGroup';
13
- import AudioTest from './AudioTest';
14
- import ChoiceAnswer from './ChoiceAnswer';
15
- import { CommonExamContext, withCommonExamContext } from './CommonExamContext';
16
- import DocumentTitle from './DocumentTitle';
17
- import DropdownAnswer from './DropdownAnswer';
18
- import ExamAttachment from './ExamAttachment';
19
- import { withExamContext } from './ExamContext';
20
- import ExamFooter from './ExamFooter';
21
- import ExamInstruction from './ExamInstruction';
22
- import ExamQuestion from './ExamQuestion';
23
- import ExamQuestionInstruction from './ExamQuestionInstruction';
24
- import ExamQuestionTitle from './ExamQuestionTitle';
25
- import ExamSection from './ExamSection';
26
- import ExamSectionTitle from './ExamSectionTitle';
27
- import ExternalMaterialList from './ExternalMaterialList';
28
- import File from './File';
29
- import Formula from './Formula';
30
- import mkHints from './Hints';
31
- import Image from './Image';
32
- import References from './References';
33
- import SaveIndicator from './SaveIndicator';
34
- import Section from './Section';
35
- import SectionInstruction from './SectionInstruction';
36
- import TableOfContents from './TableOfContents';
37
- import TextAnswer from './TextAnswer';
38
- import Video from './Video';
39
- import ImageOverlay from './ImageOverlay';
40
- const renderChildNodes = createRenderChildNodes({
41
- attachment: ExamAttachment,
42
- 'attachment-link': AttachmentLink,
43
- 'attachment-links': AttachmentLinks,
44
- audio: Audio,
45
- 'audio-group': AudioGroup,
46
- 'audio-test': AudioTest,
47
- 'choice-answer': ChoiceAnswer,
48
- 'dropdown-answer': DropdownAnswer,
49
- 'exam-footer': ExamFooter,
50
- 'external-material': ExternalMaterialList,
51
- file: File,
52
- formula: Formula,
53
- image: Image,
54
- question: ExamQuestion,
55
- 'question-instruction': ExamQuestionInstruction,
56
- 'question-title': ExamQuestionTitle,
57
- hints: mkHints({ stateful: true }),
58
- references: References,
59
- 'scored-text-answer': TextAnswer,
60
- 'scored-text-answers': mkHints({ stateful: true }),
61
- 'section-instruction': SectionInstruction,
62
- section: ExamSection,
63
- 'section-title': ExamSectionTitle,
64
- 'text-answer': TextAnswer,
65
- video: Video,
66
- 'image-overlay': ImageOverlay,
67
- });
68
- export class Exam extends PureComponent {
69
- constructor(props) {
70
- super(props);
71
- const root = props.doc.documentElement;
72
- this.i18n = initI18n(props.language, root.getAttribute('exam-code'), root.getAttribute('day-code'));
73
- this.store = initializeExamStore(props.casStatus, props.answers, props.restrictedAudioPlaybackStats, props.examServerApi);
74
- }
75
- componentDidMount() {
76
- scrollToHash();
77
- }
78
- render() {
79
- const { doc, language } = this.props;
80
- const root = doc.documentElement;
81
- const examTitle = findChildElement(root, 'exam-title');
82
- const examInstruction = findChildElement(root, 'exam-instruction');
83
- const tableOfContents = findChildElement(root, 'table-of-contents');
84
- const externalMaterial = findChildElement(root, 'external-material');
85
- const examStylesheet = root.getAttribute('exam-stylesheet');
86
- if (this.i18n.language !== language) {
87
- this.i18n.changeLanguage(language);
88
- }
89
- return (React.createElement(Provider, { store: this.store },
90
- React.createElement(I18nextProvider, { i18n: this.i18n },
91
- React.createElement(CommonExamContext.Consumer, null, ({ date, dateTimeFormatter, resolveAttachment }) => (React.createElement("main", { className: "e-exam", lang: language },
92
- React.createElement(React.StrictMode, null),
93
- examStylesheet && React.createElement("link", { rel: "stylesheet", href: resolveAttachment(examStylesheet) }),
94
- React.createElement(Section, { "aria-labelledby": "title" },
95
- examTitle && React.createElement(DocumentTitle, { id: "title" }, renderChildNodes(examTitle)),
96
- date && (React.createElement("p", null,
97
- React.createElement("strong", null, dateTimeFormatter.format(date)))),
98
- examInstruction && React.createElement(ExamInstruction, Object.assign({}, { element: examInstruction, renderChildNodes })),
99
- tableOfContents && React.createElement(TableOfContents, Object.assign({}, { element: tableOfContents, renderChildNodes })),
100
- externalMaterial && (React.createElement(ExternalMaterialList, Object.assign({}, { element: externalMaterial, renderChildNodes, forceRender: true })))),
101
- renderChildNodes(root),
102
- React.createElement(SaveIndicator, null)))))));
103
- }
104
- }
105
- export default React.memo(withExamContext(withCommonExamContext(Exam)));
106
- //# sourceMappingURL=Exam.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Exam.js","sourceRoot":"","sources":["../../src/components/Exam.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,MAAM,SAAS,CAAA;AAC3B,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,SAAS,MAAM,aAAa,CAAA;AACnC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,aAAa,MAAM,iBAAiB,CAAA;AAC3C,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,UAAU,MAAM,cAAc,CAAA;AACrC,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/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,CACT,CACZ,CAAA;IACH,CAAC;CACF;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
- export default _default;
5
- //# sourceMappingURL=ExamAttachment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamAttachment.d.ts","sourceRoot":"","sources":["../../src/components/ExamAttachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;;AAS9D,wBAAgE"}
@@ -1,8 +0,0 @@
1
- import React, { useContext } from 'react';
2
- import { AttachmentContext, withAttachmentContext } from './AttachmentContext';
3
- function ExamAttachment({ element, renderChildNodes }) {
4
- const { isExternal } = useContext(AttachmentContext);
5
- return !isExternal ? (React.createElement("figure", { className: "exam-attachment e-inline e-mrg-0 e-mrg-b-2" }, renderChildNodes(element))) : null;
6
- }
7
- export default React.memo(withAttachmentContext(ExamAttachment));
8
- //# sourceMappingURL=ExamAttachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamAttachment.js","sourceRoot":"","sources":["../../src/components/ExamAttachment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAG9E,SAAS,cAAc,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACvE,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;IACpD,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CACnB,gCAAQ,SAAS,EAAC,4CAA4C,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAU,CACpG,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ExamProps } from './Exam';
3
- import { ExamServerAPI } from '../types/ExamServerAPI';
4
- export interface ExamContext {
5
- casCountdownDuration: number;
6
- examServerApi: ExamServerAPI;
7
- }
8
- export declare const ExamContext: React.Context<ExamContext>;
9
- export declare const withExamContext: (Component: React.ComponentType<ExamProps>) => React.ComponentType<ExamProps>;
10
- //# sourceMappingURL=ExamContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamContext.d.ts","sourceRoot":"","sources":["../../src/components/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAEtD,MAAM,WAAW,WAAW;IAC1B,oBAAoB,EAAE,MAAM,CAAA;IAC5B,aAAa,EAAE,aAAa,CAAA;CAC7B;AAED,eAAO,MAAM,WAAW,4BAAyC,CAAA;AAEjE,eAAO,MAAM,eAAe,+EAO1B,CAAA"}
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { withContext } from './withContext';
3
- export const ExamContext = React.createContext({});
4
- export const withExamContext = withContext(ExamContext, (props) => {
5
- const { casCountdownDuration, examServerApi } = props;
6
- return {
7
- casCountdownDuration: casCountdownDuration || 60,
8
- examServerApi,
9
- };
10
- });
11
- //# sourceMappingURL=ExamContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamContext.js","sourceRoot":"","sources":["../../src/components/ExamContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAQ3C,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,EAAiB,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAyB,WAAW,EAAE,CAAC,KAAgB,EAAE,EAAE;IACnG,MAAM,EAAE,oBAAoB,EAAE,aAAa,EAAE,GAAG,KAAK,CAAA;IAErD,OAAO;QACL,oBAAoB,EAAE,oBAAoB,IAAI,EAAE;QAChD,aAAa;KACd,CAAA;AACH,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare function ExamFooter({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ExamFooter>;
5
- export default _default;
6
- //# sourceMappingURL=ExamFooter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamFooter.d.ts","sourceRoot":"","sources":["../../src/components/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAEpE;;AAED,wBAAqC"}
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import Section from './Section';
3
- function ExamFooter({ element, renderChildNodes }) {
4
- return React.createElement(Section, null, renderChildNodes(element));
5
- }
6
- export default React.memo(ExamFooter);
7
- //# sourceMappingURL=ExamFooter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamFooter.js","sourceRoot":"","sources":["../../src/components/ExamFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,OAAO,MAAM,WAAW,CAAA;AAG/B,SAAS,UAAU,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACnE,OAAO,oBAAC,OAAO,QAAE,gBAAgB,CAAC,OAAO,CAAC,CAAW,CAAA;AACvD,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare function ExamInstruction({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof ExamInstruction>;
5
- export default _default;
6
- //# sourceMappingURL=ExamInstruction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamInstruction.d.ts","sourceRoot":"","sources":["../../src/components/ExamInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,eAAe,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAEzE;;AAED,wBAA0C"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- function ExamInstruction({ element, renderChildNodes }) {
3
- return React.createElement("div", { className: "exam-instruction notification e-pad-4" }, renderChildNodes(element));
4
- }
5
- export default React.memo(ExamInstruction);
6
- //# sourceMappingURL=ExamInstruction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamInstruction.js","sourceRoot":"","sources":["../../src/components/ExamInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,SAAS,eAAe,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACxE,OAAO,6BAAK,SAAS,EAAC,uCAAuC,IAAE,gBAAgB,CAAC,OAAO,CAAC,CAAO,CAAA;AACjG,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA"}
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare const _default: React.MemoExoticComponent<React.ComponentType<ExamComponentProps>>;
4
- export default _default;
5
- //# sourceMappingURL=ExamQuestion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamQuestion.d.ts","sourceRoot":"","sources":["../../src/components/ExamQuestion.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;;AAoB9D,wBAA4D"}
@@ -1,16 +0,0 @@
1
- import classNames from 'classnames';
2
- import React, { useContext } from 'react';
3
- import { useSelector } from 'react-redux';
4
- import { QuestionContext, withQuestionContext } from './QuestionContext';
5
- import { SectionContext } from './SectionContext';
6
- function ExamQuestion({ element, renderChildNodes }) {
7
- const casStatus = useSelector((state) => state.cas.casStatus);
8
- const { casForbidden } = useContext(SectionContext);
9
- const { displayNumber, level } = useContext(QuestionContext);
10
- return !casForbidden || casStatus === 'forbidden' ? (React.createElement("div", { className: classNames('exam-question', {
11
- 'e-mrg-b-8 e-clearfix': level === 0,
12
- 'e-mrg-l-8 e-mrg-y-4': level > 0,
13
- }), id: displayNumber }, renderChildNodes(element))) : null;
14
- }
15
- export default React.memo(withQuestionContext(ExamQuestion));
16
- //# sourceMappingURL=ExamQuestion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamQuestion.js","sourceRoot":"","sources":["../../src/components/ExamQuestion.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,SAAS,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAsB;IACrE,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IACvE,MAAM,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,CAAA;IACnD,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IAE5D,OAAO,CAAC,YAAY,IAAI,SAAS,KAAK,WAAW,CAAC,CAAC,CAAC,CAClD,6BACE,SAAS,EAAE,UAAU,CAAC,eAAe,EAAE;YACrC,sBAAsB,EAAE,KAAK,KAAK,CAAC;YACnC,qBAAqB,EAAE,KAAK,GAAG,CAAC;SACjC,CAAC,EACF,EAAE,EAAE,aAAa,IAEhB,gBAAgB,CAAC,OAAO,CAAC,CACtB,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- import { ExamComponentProps } from '../createRenderChildNodes';
3
- declare function QuestionInstruction({ element, renderChildNodes }: ExamComponentProps): JSX.Element;
4
- declare const _default: React.MemoExoticComponent<typeof QuestionInstruction>;
5
- export default _default;
6
- //# sourceMappingURL=ExamQuestionInstruction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExamQuestionInstruction.d.ts","sourceRoot":"","sources":["../../src/components/ExamQuestionInstruction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D,iBAAS,mBAAmB,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAE7E;;AAED,wBAA8C"}