@pie-element/explicit-constructed-response 4.6.1-beta.1 → 4.6.1-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,517 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.Main = void 0;
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
15
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+ var _react = _interopRequireDefault(require("react"));
18
+ var _propTypes = _interopRequireDefault(require("prop-types"));
19
+ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
20
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
21
+ var _pick = _interopRequireDefault(require("lodash/pick"));
22
+ var _throttle = _interopRequireDefault(require("lodash/throttle"));
23
+ var _editableHtml = _interopRequireWildcard(require("@pie-lib/editable-html"));
24
+ var _configUi = require("@pie-lib/config-ui");
25
+ var _styles = require("@material-ui/core/styles");
26
+ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
27
+ var _Info = _interopRequireDefault(require("@material-ui/icons/Info"));
28
+ var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
29
+ var _ecrToolbar = _interopRequireDefault(require("./ecr-toolbar"));
30
+ var _alternateResponses = _interopRequireDefault(require("./alternateResponses"));
31
+ var _markupUtils = require("./markupUtils");
32
+ var _utils = require("./utils");
33
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
36
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
38
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // import EditableHtmlNew from 'editable-html';
39
+ var toggle = _configUi.settings.toggle,
40
+ Panel = _configUi.settings.Panel;
41
+ var styles = function styles(theme) {
42
+ return {
43
+ promptHolder: {
44
+ width: '100%',
45
+ paddingBottom: theme.spacing.unit * 2,
46
+ marginBottom: theme.spacing.unit * 2
47
+ },
48
+ prompt: {
49
+ paddingTop: theme.spacing.unit * 2,
50
+ width: '100%'
51
+ },
52
+ markup: {
53
+ minHeight: '100px',
54
+ paddingTop: theme.spacing.unit * 2,
55
+ width: '100%',
56
+ '& [data-slate-editor="true"]': {
57
+ minHeight: '100px'
58
+ }
59
+ },
60
+ design: {
61
+ paddingTop: theme.spacing.unit * 3
62
+ },
63
+ choiceConfiguration: {
64
+ paddingTop: theme.spacing.unit * 2,
65
+ paddingBottom: theme.spacing.unit * 2
66
+ },
67
+ switchElement: {
68
+ justifyContent: 'space-between',
69
+ margin: 0
70
+ },
71
+ addButton: {
72
+ "float": 'right'
73
+ },
74
+ text: {
75
+ color: '#495B8F',
76
+ fontFamily: 'Cerebri Sans',
77
+ fontSize: theme.typography.fontSize + 2,
78
+ lineHeight: '19px',
79
+ marginTop: theme.spacing.unit * 4
80
+ },
81
+ tooltip: {
82
+ fontSize: theme.typography.fontSize - 2,
83
+ whiteSpace: 'pre',
84
+ maxWidth: '500px'
85
+ },
86
+ errorText: {
87
+ fontSize: theme.typography.fontSize - 2,
88
+ color: 'red',
89
+ paddingTop: theme.spacing.unit
90
+ },
91
+ flexContainer: {
92
+ display: 'flex',
93
+ alignItems: 'end'
94
+ }
95
+ };
96
+ };
97
+ var createElementFromHTML = function createElementFromHTML(htmlString) {
98
+ var div = document.createElement('div');
99
+ div.innerHTML = htmlString.trim();
100
+ return div;
101
+ };
102
+ var Main = /*#__PURE__*/function (_React$Component) {
103
+ (0, _inherits2["default"])(Main, _React$Component);
104
+ var _super = _createSuper(Main);
105
+ function Main() {
106
+ var _this;
107
+ (0, _classCallCheck2["default"])(this, Main);
108
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
109
+ args[_key] = arguments[_key];
110
+ }
111
+ _this = _super.call.apply(_super, [this].concat(args));
112
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {});
113
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onModelChange", function (newVal) {
114
+ _this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), newVal));
115
+ });
116
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onPromptChanged", function (prompt) {
117
+ _this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
118
+ prompt: prompt
119
+ }));
120
+ });
121
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRationaleChanged", function (rationale) {
122
+ _this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
123
+ rationale: rationale
124
+ }));
125
+ });
126
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onTeacherInstructionsChanged", function (teacherInstructions) {
127
+ var _this$props = _this.props,
128
+ model = _this$props.model,
129
+ onModelChanged = _this$props.onModelChanged;
130
+ onModelChanged(_objectSpread(_objectSpread({}, model), {}, {
131
+ teacherInstructions: teacherInstructions
132
+ }));
133
+ });
134
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMarkupChanged", function (slateMarkup) {
135
+ _this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
136
+ slateMarkup: slateMarkup
137
+ }));
138
+ });
139
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onResponsesChanged", function (choices) {
140
+ _this.props.onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
141
+ choices: choices
142
+ }));
143
+ });
144
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLengthChanged", function (maxLengthPerChoice) {
145
+ var _this$props2 = _this.props,
146
+ model = _this$props2.model,
147
+ onModelChanged = _this$props2.onModelChanged;
148
+ onModelChanged(_objectSpread(_objectSpread({}, model), {}, {
149
+ maxLengthPerChoice: maxLengthPerChoice
150
+ }));
151
+ });
152
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChangeResponse", function (index, newVal) {
153
+ var _this$props3 = _this.props,
154
+ model = _this$props3.model,
155
+ onModelChanged = _this$props3.onModelChanged;
156
+ var choices = model.choices;
157
+ var maxLengthPerChoice = model.maxLengthPerChoice;
158
+ var newValLength = (newVal || '').length;
159
+ if (!choices[index]) {
160
+ choices[index] = [{
161
+ label: newVal || '',
162
+ value: '0'
163
+ }];
164
+
165
+ // add default values for missing choices up to the new index position
166
+ var nbOfMissingChoices = index > maxLengthPerChoice.length ? index - maxLengthPerChoice.length : 0;
167
+ maxLengthPerChoice = [].concat((0, _toConsumableArray2["default"])(maxLengthPerChoice), (0, _toConsumableArray2["default"])(Array(nbOfMissingChoices).fill(1)));
168
+ maxLengthPerChoice.splice(index, 0, (0, _markupUtils.getAdjustedLength)(newValLength));
169
+ } else {
170
+ choices[index][0].label = newVal || '';
171
+ if (maxLengthPerChoice && (maxLengthPerChoice[index] < newValLength || maxLengthPerChoice[index] > newValLength + 10)) {
172
+ maxLengthPerChoice[index] = (0, _markupUtils.getAdjustedLength)(newValLength);
173
+ }
174
+ }
175
+ onModelChanged(_objectSpread(_objectSpread({}, model), {}, {
176
+ choices: choices,
177
+ maxLengthPerChoice: maxLengthPerChoice
178
+ }));
179
+ });
180
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (markup) {
181
+ var _this$props4 = _this.props,
182
+ _this$props4$model = _this$props4.model,
183
+ choices = _this$props4$model.choices,
184
+ maxLengthPerChoice = _this$props4$model.maxLengthPerChoice,
185
+ onModelChanged = _this$props4.onModelChanged;
186
+ var domMarkup = createElementFromHTML(markup);
187
+ var allRespAreas = domMarkup.querySelectorAll('[data-type="explicit_constructed_response"]');
188
+ var allChoices = {};
189
+ var updatedMaxLengthPerChoice = [];
190
+ allRespAreas.forEach(function (el, index) {
191
+ var newChoices = (0, _cloneDeep["default"])(choices[el.dataset.index]);
192
+ if (newChoices) {
193
+ newChoices[0] = {
194
+ label: el.dataset.value || '',
195
+ value: '0'
196
+ };
197
+ updatedMaxLengthPerChoice[index] = maxLengthPerChoice[el.dataset.index];
198
+ }
199
+ allChoices[index] = newChoices;
200
+ el.dataset.index = index;
201
+ });
202
+ var callback = function callback() {
203
+ return onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
204
+ choices: allChoices,
205
+ slateMarkup: domMarkup.innerHTML,
206
+ maxLengthPerChoice: updatedMaxLengthPerChoice
207
+ }));
208
+ };
209
+ _this.setState({
210
+ cachedChoices: undefined
211
+ }, callback);
212
+ });
213
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onHandleAreaChange", (0, _throttle["default"])(function (nodes) {
214
+ var _this$props5 = _this.props,
215
+ choices = _this$props5.model.choices,
216
+ onModelChanged = _this$props5.onModelChanged;
217
+ var cachedChoices = _this.state.cachedChoices;
218
+ if (!nodes) {
219
+ return;
220
+ }
221
+ var newChoices = choices ? (0, _cloneDeep["default"])(choices) : {};
222
+ var newCachedChoices = cachedChoices ? (0, _cloneDeep["default"])(cachedChoices) : {};
223
+ nodes.forEach(function (node) {
224
+ var keyForNode = node.data.index;
225
+ if (!newChoices[keyForNode] && newCachedChoices[keyForNode]) {
226
+ Object.assign(newChoices, (0, _pick["default"])(newCachedChoices, keyForNode));
227
+ if (newCachedChoices.hasOwnProperty(keyForNode)) {
228
+ delete newCachedChoices[keyForNode];
229
+ }
230
+ } else {
231
+ Object.assign(newCachedChoices, (0, _pick["default"])(newChoices, keyForNode));
232
+ if (newChoices.hasOwnProperty(keyForNode)) {
233
+ delete newChoices[keyForNode];
234
+ }
235
+ }
236
+ });
237
+ var callback = function callback() {
238
+ return onModelChanged(_objectSpread(_objectSpread({}, _this.props.model), {}, {
239
+ choices: newChoices
240
+ }));
241
+ };
242
+ _this.setState({
243
+ cachedChoices: newCachedChoices
244
+ }, callback);
245
+ }, 500, {
246
+ trailing: false,
247
+ leading: true
248
+ }));
249
+ return _this;
250
+ }
251
+ (0, _createClass2["default"])(Main, [{
252
+ key: "componentDidMount",
253
+ value: function componentDidMount() {
254
+ var _this$props6 = this.props,
255
+ _this$props6$model = _this$props6.model,
256
+ slateMarkup = _this$props6$model.slateMarkup,
257
+ choices = _this$props6$model.choices,
258
+ _this$props6$model$ma = _this$props6$model.maxLengthPerChoice,
259
+ maxLengthPerChoice = _this$props6$model$ma === void 0 ? [] : _this$props6$model$ma,
260
+ onModelChanged = _this$props6.onModelChanged;
261
+ var undefinedLengths = !maxLengthPerChoice.length;
262
+ this.setState({
263
+ markup: slateMarkup
264
+ });
265
+
266
+ // calculate maxLengthPerChoice array if it is not defined or defined incorrectly
267
+ Object.values(choices).forEach(function (choice, index) {
268
+ var labelLengthsArr = (choice || []).map(function (choice) {
269
+ return (choice.label || '').length;
270
+ });
271
+ var length = Math.max.apply(Math, (0, _toConsumableArray2["default"])(labelLengthsArr));
272
+ if (undefinedLengths || !maxLengthPerChoice[index] || maxLengthPerChoice[index] < length || maxLengthPerChoice[index] > length + 10) {
273
+ maxLengthPerChoice[index] = (0, _markupUtils.getAdjustedLength)(length);
274
+ }
275
+ });
276
+ onModelChanged(_objectSpread(_objectSpread({}, this.props.model), {}, {
277
+ maxLengthPerChoice: maxLengthPerChoice
278
+ }));
279
+ }
280
+ }, {
281
+ key: "render",
282
+ value: function render() {
283
+ var _this2 = this;
284
+ var _this$props7 = this.props,
285
+ classes = _this$props7.classes,
286
+ model = _this$props7.model,
287
+ configuration = _this$props7.configuration,
288
+ onConfigurationChanged = _this$props7.onConfigurationChanged,
289
+ imageSupport = _this$props7.imageSupport,
290
+ uploadSoundSupport = _this$props7.uploadSoundSupport;
291
+ var _ref = configuration || {},
292
+ _ref$maxImageWidth = _ref.maxImageWidth,
293
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
294
+ _ref$maxImageHeight = _ref.maxImageHeight,
295
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight,
296
+ _ref$maxLengthPerChoi = _ref.maxLengthPerChoice,
297
+ maxLengthPerChoice = _ref$maxLengthPerChoi === void 0 ? {} : _ref$maxLengthPerChoi,
298
+ maxResponseAreas = _ref.maxResponseAreas,
299
+ _ref$partialScoring = _ref.partialScoring,
300
+ partialScoring = _ref$partialScoring === void 0 ? {} : _ref$partialScoring,
301
+ _ref$playerSpellCheck = _ref.playerSpellCheck,
302
+ playerSpellCheck = _ref$playerSpellCheck === void 0 ? {} : _ref$playerSpellCheck,
303
+ _ref$prompt = _ref.prompt,
304
+ prompt = _ref$prompt === void 0 ? {} : _ref$prompt,
305
+ _ref$rationale = _ref.rationale,
306
+ rationale = _ref$rationale === void 0 ? {} : _ref$rationale,
307
+ settingsPanelDisabled = _ref.settingsPanelDisabled,
308
+ _ref$spellCheck = _ref.spellCheck,
309
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
310
+ _ref$teacherInstructi = _ref.teacherInstructions,
311
+ teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
312
+ _ref$withRubric = _ref.withRubric,
313
+ withRubric = _ref$withRubric === void 0 ? {} : _ref$withRubric;
314
+ var _ref2 = model || {},
315
+ errors = _ref2.errors,
316
+ maxLengthPerChoiceEnabled = _ref2.maxLengthPerChoiceEnabled,
317
+ promptEnabled = _ref2.promptEnabled,
318
+ rationaleEnabled = _ref2.rationaleEnabled,
319
+ spellCheckEnabled = _ref2.spellCheckEnabled,
320
+ teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
321
+ toolbarEditorPosition = _ref2.toolbarEditorPosition;
322
+ var _ref3 = errors || {},
323
+ _ref3$choicesErrors = _ref3.choicesErrors,
324
+ choicesErrors = _ref3$choicesErrors === void 0 ? {} : _ref3$choicesErrors,
325
+ responseAreasError = _ref3.responseAreasError;
326
+ var validationMessage = (0, _utils.generateValidationMessage)(configuration);
327
+ var defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
328
+ var defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
329
+ var toolbarOpts = {
330
+ position: toolbarEditorPosition === 'top' ? 'top' : 'bottom'
331
+ };
332
+ var panelSettings = {
333
+ partialScoring: partialScoring.settings && toggle(partialScoring.label),
334
+ maxLengthPerChoiceEnabled: maxLengthPerChoice.settings && toggle(maxLengthPerChoice.label)
335
+ };
336
+ var panelProperties = {
337
+ teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
338
+ rationaleEnabled: rationale.settings && toggle(rationale.label),
339
+ promptEnabled: prompt.settings && toggle(prompt.label),
340
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
341
+ playerSpellCheckEnabled: playerSpellCheck.settings && toggle(playerSpellCheck.label),
342
+ rubricEnabled: (withRubric === null || withRubric === void 0 ? void 0 : withRubric.settings) && toggle(withRubric === null || withRubric === void 0 ? void 0 : withRubric.label)
343
+ };
344
+ return /*#__PURE__*/_react["default"].createElement("div", {
345
+ className: classes.design
346
+ }, /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
347
+ hideSettings: settingsPanelDisabled,
348
+ settings: /*#__PURE__*/_react["default"].createElement(Panel, {
349
+ model: model,
350
+ configuration: configuration,
351
+ onChangeModel: function onChangeModel(model) {
352
+ return _this2.onModelChange(model);
353
+ },
354
+ onChangeConfiguration: function onChangeConfiguration(configuration) {
355
+ return onConfigurationChanged(configuration, true);
356
+ },
357
+ groups: {
358
+ Settings: panelSettings,
359
+ Properties: panelProperties
360
+ }
361
+ })
362
+ }, /*#__PURE__*/_react["default"].createElement("div", null, teacherInstructionsEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
363
+ label: teacherInstructions.label,
364
+ className: classes.promptHolder
365
+ }, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
366
+ className: classes.prompt,
367
+ markup: model.teacherInstructions || '',
368
+ onChange: this.onTeacherInstructionsChanged,
369
+ imageSupport: imageSupport,
370
+ nonEmpty: false,
371
+ toolbarOpts: toolbarOpts,
372
+ spellCheck: spellCheckEnabled,
373
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
374
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
375
+ uploadSoundSupport: uploadSoundSupport,
376
+ languageCharactersProps: [{
377
+ language: 'spanish'
378
+ }, {
379
+ language: 'special'
380
+ }]
381
+ })), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
382
+ label: prompt.label,
383
+ className: classes.promptHolder
384
+ }, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
385
+ className: classes.prompt,
386
+ markup: model.prompt,
387
+ onChange: this.onPromptChanged,
388
+ imageSupport: imageSupport,
389
+ nonEmpty: false,
390
+ disableUnderline: true,
391
+ toolbarOpts: toolbarOpts,
392
+ spellCheck: spellCheckEnabled,
393
+ maxImageWidth: defaultImageMaxWidth,
394
+ maxImageHeight: defaultImageMaxHeight,
395
+ uploadSoundSupport: uploadSoundSupport,
396
+ languageCharactersProps: [{
397
+ language: 'spanish'
398
+ }, {
399
+ language: 'special'
400
+ }]
401
+ })), /*#__PURE__*/_react["default"].createElement("div", {
402
+ className: classes.flexContainer
403
+ }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
404
+ className: classes.text
405
+ }, "Define Template, Choices, and Correct Responses"), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
406
+ classes: {
407
+ tooltip: classes.tooltip
408
+ },
409
+ disableFocusListener: true,
410
+ disableTouchListener: true,
411
+ placement: 'right',
412
+ title: validationMessage
413
+ }, /*#__PURE__*/_react["default"].createElement(_Info["default"], {
414
+ fontSize: 'small',
415
+ color: 'primary',
416
+ style: {
417
+ marginLeft: '8px'
418
+ }
419
+ }))), /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
420
+ activePlugins: _editableHtml.ALL_PLUGINS,
421
+ toolbarOpts: {
422
+ position: 'top'
423
+ },
424
+ spellCheck: spellCheckEnabled,
425
+ responseAreaProps: {
426
+ type: 'explicit-constructed-response',
427
+ options: {
428
+ duplicates: true
429
+ },
430
+ maxResponseAreas: maxResponseAreas,
431
+ respAreaToolbar: function respAreaToolbar(node, nodePath, editor, onToolbarDone) {
432
+ var model = _this2.props.model;
433
+ var correctChoice = (model.choices[node.data.index] || [])[0];
434
+ return function () {
435
+ return /*#__PURE__*/_react["default"].createElement(_ecrToolbar["default"], {
436
+ onChangeResponse: function onChangeResponse(newVal) {
437
+ return _this2.onChangeResponse(node.data.index, newVal);
438
+ },
439
+ node: node,
440
+ nodePath: nodePath,
441
+ editor: editor,
442
+ onToolbarDone: onToolbarDone,
443
+ correctChoice: correctChoice
444
+ });
445
+ };
446
+ },
447
+ error: function error() {
448
+ return choicesErrors;
449
+ },
450
+ onHandleAreaChange: this.onHandleAreaChange
451
+ },
452
+ className: classes.markup,
453
+ markup: model.slateMarkup,
454
+ onChange: this.onChange,
455
+ imageSupport: imageSupport,
456
+ disableImageAlignmentButtons: true,
457
+ onBlur: this.onBlur,
458
+ disabled: false,
459
+ highlightShape: false,
460
+ error: responseAreasError,
461
+ uploadSoundSupport: uploadSoundSupport,
462
+ languageCharactersProps: [{
463
+ language: 'spanish'
464
+ }, {
465
+ language: 'special'
466
+ }]
467
+ }), responseAreasError && /*#__PURE__*/_react["default"].createElement("div", {
468
+ className: classes.errorText
469
+ }, responseAreasError), !(0, _isEmpty["default"])(model.choices) && /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
470
+ className: classes.text
471
+ }, "Define Alternates ".concat(maxLengthPerChoiceEnabled ? 'and Character Limits' : '')), /*#__PURE__*/_react["default"].createElement(_alternateResponses["default"], {
472
+ model: model,
473
+ onChange: this.onResponsesChanged,
474
+ onLengthChange: this.onLengthChanged,
475
+ maxLengthPerChoiceEnabled: maxLengthPerChoiceEnabled,
476
+ spellCheck: spellCheckEnabled,
477
+ choicesErrors: choicesErrors
478
+ }), rationaleEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
479
+ label: rationale.label,
480
+ className: classes.promptHolder
481
+ }, /*#__PURE__*/_react["default"].createElement(_editableHtml["default"], {
482
+ className: classes.prompt,
483
+ markup: model.rationale || '',
484
+ onChange: this.onRationaleChanged,
485
+ imageSupport: imageSupport,
486
+ toolbarOpts: toolbarOpts,
487
+ spellCheck: spellCheckEnabled,
488
+ maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
489
+ maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight,
490
+ uploadSoundSupport: uploadSoundSupport,
491
+ languageCharactersProps: [{
492
+ language: 'spanish'
493
+ }, {
494
+ language: 'special'
495
+ }]
496
+ })))));
497
+ }
498
+ }]);
499
+ return Main;
500
+ }(_react["default"].Component);
501
+ exports.Main = Main;
502
+ (0, _defineProperty2["default"])(Main, "propTypes", {
503
+ configuration: _propTypes["default"].object.isRequired,
504
+ model: _propTypes["default"].object.isRequired,
505
+ disableSidePanel: _propTypes["default"].bool,
506
+ onModelChanged: _propTypes["default"].func.isRequired,
507
+ onConfigurationChanged: _propTypes["default"].func.isRequired,
508
+ classes: _propTypes["default"].object.isRequired,
509
+ imageSupport: _propTypes["default"].shape({
510
+ add: _propTypes["default"].func.isRequired,
511
+ "delete": _propTypes["default"].func.isRequired
512
+ })
513
+ });
514
+ var Styled = (0, _styles.withStyles)(styles)(Main);
515
+ var _default = Styled;
516
+ exports["default"] = _default;
517
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","names":["_react","_interopRequireDefault","require","_propTypes","_cloneDeep","_isEmpty","_pick","_throttle","_editableHtml","_interopRequireWildcard","_configUi","_styles","_Typography","_Info","_Tooltip","_ecrToolbar","_alternateResponses","_markupUtils","_utils","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","result","NewTarget","constructor","Reflect","construct","_possibleConstructorReturn2","sham","Proxy","Boolean","valueOf","e","toggle","settings","Panel","styles","theme","promptHolder","width","paddingBottom","spacing","unit","marginBottom","prompt","paddingTop","markup","minHeight","design","choiceConfiguration","switchElement","justifyContent","margin","addButton","text","color","fontFamily","fontSize","typography","lineHeight","marginTop","tooltip","whiteSpace","maxWidth","errorText","flexContainer","display","alignItems","createElementFromHTML","htmlString","div","document","createElement","innerHTML","trim","Main","_React$Component","_inherits2","_super","_this","_classCallCheck2","_len","args","Array","_key","concat","_assertThisInitialized2","newVal","props","onModelChanged","model","rationale","teacherInstructions","_this$props","slateMarkup","choices","maxLengthPerChoice","_this$props2","index","_this$props3","newValLength","label","value","nbOfMissingChoices","_toConsumableArray2","fill","splice","getAdjustedLength","_this$props4","_this$props4$model","domMarkup","allRespAreas","querySelectorAll","allChoices","updatedMaxLengthPerChoice","el","newChoices","cloneDeep","dataset","callback","setState","cachedChoices","undefined","throttle","nodes","_this$props5","state","newCachedChoices","node","keyForNode","data","assign","pick","trailing","leading","_createClass2","componentDidMount","_this$props6","_this$props6$model","_this$props6$model$ma","undefinedLengths","values","choice","labelLengthsArr","map","Math","max","render","_this2","_this$props7","classes","configuration","onConfigurationChanged","imageSupport","uploadSoundSupport","_ref","_ref$maxImageWidth","maxImageWidth","_ref$maxImageHeight","maxImageHeight","_ref$maxLengthPerChoi","maxResponseAreas","_ref$partialScoring","partialScoring","_ref$playerSpellCheck","playerSpellCheck","_ref$prompt","_ref$rationale","settingsPanelDisabled","_ref$spellCheck","spellCheck","_ref$teacherInstructi","_ref$withRubric","withRubric","_ref2","errors","maxLengthPerChoiceEnabled","promptEnabled","rationaleEnabled","spellCheckEnabled","teacherInstructionsEnabled","toolbarEditorPosition","_ref3","_ref3$choicesErrors","choicesErrors","responseAreasError","validationMessage","generateValidationMessage","defaultImageMaxWidth","defaultImageMaxHeight","toolbarOpts","position","panelSettings","panelProperties","playerSpellCheckEnabled","rubricEnabled","className","layout","ConfigLayout","hideSettings","onChangeModel","onModelChange","onChangeConfiguration","groups","Settings","Properties","InputContainer","onChange","onTeacherInstructionsChanged","nonEmpty","languageCharactersProps","language","onPromptChanged","disableUnderline","disableFocusListener","disableTouchListener","placement","title","style","marginLeft","activePlugins","ALL_PLUGINS","responseAreaProps","type","options","duplicates","respAreaToolbar","nodePath","editor","onToolbarDone","correctChoice","onChangeResponse","error","onHandleAreaChange","disableImageAlignmentButtons","onBlur","disabled","highlightShape","isEmpty","onResponsesChanged","onLengthChange","onLengthChanged","onRationaleChanged","React","Component","exports","PropTypes","isRequired","disableSidePanel","bool","func","shape","add","Styled","withStyles","_default"],"sources":["../src/main.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport cloneDeep from 'lodash/cloneDeep';\nimport isEmpty from 'lodash/isEmpty';\nimport pick from 'lodash/pick';\nimport throttle from 'lodash/throttle';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html';\n// import EditableHtmlNew from 'editable-html';\nimport { InputContainer, layout, settings } from '@pie-lib/config-ui';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport Info from '@material-ui/icons/Info';\nimport Tooltip from '@material-ui/core/Tooltip';\n\nimport ECRToolbar from './ecr-toolbar';\nimport AlternateResponses from './alternateResponses';\nimport { getAdjustedLength } from './markupUtils';\nimport { generateValidationMessage } from './utils';\n\nconst { toggle, Panel } = settings;\n\nconst styles = (theme) => ({\n promptHolder: {\n width: '100%',\n paddingBottom: theme.spacing.unit * 2,\n marginBottom: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n markup: {\n minHeight: '100px',\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n '& [data-slate-editor=\"true\"]': {\n minHeight: '100px',\n },\n },\n design: {\n paddingTop: theme.spacing.unit * 3,\n },\n choiceConfiguration: {\n paddingTop: theme.spacing.unit * 2,\n paddingBottom: theme.spacing.unit * 2,\n },\n switchElement: {\n justifyContent: 'space-between',\n margin: 0,\n },\n addButton: {\n float: 'right',\n },\n text: {\n color: '#495B8F',\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize + 2,\n lineHeight: '19px',\n marginTop: theme.spacing.unit * 4,\n },\n tooltip: {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n errorText: {\n fontSize: theme.typography.fontSize - 2,\n color: 'red',\n paddingTop: theme.spacing.unit,\n },\n flexContainer: {\n display: 'flex',\n alignItems: 'end',\n },\n});\n\nconst createElementFromHTML = (htmlString) => {\n const div = document.createElement('div');\n div.innerHTML = htmlString.trim();\n\n return div;\n};\n\nexport class Main extends React.Component {\n static propTypes = {\n configuration: PropTypes.object.isRequired,\n model: PropTypes.object.isRequired,\n disableSidePanel: PropTypes.bool,\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n state = {};\n\n componentDidMount() {\n const {\n model: { slateMarkup, choices, maxLengthPerChoice = [] },\n onModelChanged,\n } = this.props;\n const undefinedLengths = !maxLengthPerChoice.length;\n\n this.setState({ markup: slateMarkup });\n\n // calculate maxLengthPerChoice array if it is not defined or defined incorrectly\n Object.values(choices).forEach((choice, index) => {\n const labelLengthsArr = (choice || []).map((choice) => (choice.label || '').length);\n const length = Math.max(...labelLengthsArr);\n\n if (\n undefinedLengths ||\n !maxLengthPerChoice[index] ||\n maxLengthPerChoice[index] < length ||\n maxLengthPerChoice[index] > length + 10\n ) {\n maxLengthPerChoice[index] = getAdjustedLength(length);\n }\n });\n\n onModelChanged({ ...this.props.model, maxLengthPerChoice });\n }\n\n onModelChange = (newVal) => {\n this.props.onModelChanged({ ...this.props.model, ...newVal });\n };\n\n onPromptChanged = (prompt) => {\n this.props.onModelChanged({ ...this.props.model, prompt });\n };\n\n onRationaleChanged = (rationale) => {\n this.props.onModelChanged({ ...this.props.model, rationale });\n };\n\n onTeacherInstructionsChanged = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, teacherInstructions });\n };\n\n onMarkupChanged = (slateMarkup) => {\n this.props.onModelChanged({ ...this.props.model, slateMarkup });\n };\n\n onResponsesChanged = (choices) => {\n this.props.onModelChanged({ ...this.props.model, choices });\n };\n\n onLengthChanged = (maxLengthPerChoice) => {\n const { model, onModelChanged } = this.props;\n\n onModelChanged({ ...model, maxLengthPerChoice });\n };\n\n onChangeResponse = (index, newVal) => {\n const { model, onModelChanged } = this.props;\n const { choices } = model;\n let { maxLengthPerChoice } = model;\n const newValLength = (newVal || '').length;\n\n if (!choices[index]) {\n choices[index] = [{ label: newVal || '', value: '0' }];\n\n // add default values for missing choices up to the new index position\n const nbOfMissingChoices = index > maxLengthPerChoice.length ? index - maxLengthPerChoice.length : 0;\n\n maxLengthPerChoice = [...maxLengthPerChoice, ...Array(nbOfMissingChoices).fill(1)];\n\n maxLengthPerChoice.splice(index, 0, getAdjustedLength(newValLength));\n } else {\n choices[index][0].label = newVal || '';\n\n if (\n maxLengthPerChoice &&\n (maxLengthPerChoice[index] < newValLength || maxLengthPerChoice[index] > newValLength + 10)\n ) {\n maxLengthPerChoice[index] = getAdjustedLength(newValLength);\n }\n }\n\n onModelChanged({ ...model, choices, maxLengthPerChoice });\n };\n\n onChange = (markup) => {\n const {\n model: { choices, maxLengthPerChoice },\n onModelChanged,\n } = this.props;\n const domMarkup = createElementFromHTML(markup);\n const allRespAreas = domMarkup.querySelectorAll('[data-type=\"explicit_constructed_response\"]');\n\n const allChoices = {};\n const updatedMaxLengthPerChoice = [];\n\n allRespAreas.forEach((el, index) => {\n const newChoices = cloneDeep(choices[el.dataset.index]);\n\n if (newChoices) {\n newChoices[0] = {\n label: el.dataset.value || '',\n value: '0',\n };\n\n updatedMaxLengthPerChoice[index] = maxLengthPerChoice[el.dataset.index];\n }\n\n allChoices[index] = newChoices;\n el.dataset.index = index;\n });\n\n const callback = () =>\n onModelChanged({\n ...this.props.model,\n choices: allChoices,\n slateMarkup: domMarkup.innerHTML,\n maxLengthPerChoice: updatedMaxLengthPerChoice,\n });\n\n this.setState({ cachedChoices: undefined }, callback);\n };\n\n onHandleAreaChange = throttle(\n (nodes) => {\n const {\n model: { choices },\n onModelChanged,\n } = this.props;\n const { cachedChoices } = this.state;\n\n if (!nodes) {\n return;\n }\n\n const newChoices = choices ? cloneDeep(choices) : {};\n const newCachedChoices = cachedChoices ? cloneDeep(cachedChoices) : {};\n\n nodes.forEach((node) => {\n const keyForNode = node.data.index;\n\n if (!newChoices[keyForNode] && newCachedChoices[keyForNode]) {\n Object.assign(newChoices, pick(newCachedChoices, keyForNode));\n\n if (newCachedChoices.hasOwnProperty(keyForNode)) {\n delete newCachedChoices[keyForNode];\n }\n } else {\n Object.assign(newCachedChoices, pick(newChoices, keyForNode));\n\n if (newChoices.hasOwnProperty(keyForNode)) {\n delete newChoices[keyForNode];\n }\n }\n });\n\n const callback = () => onModelChanged({ ...this.props.model, choices: newChoices });\n\n this.setState({ cachedChoices: newCachedChoices }, callback);\n },\n 500,\n { trailing: false, leading: true },\n );\n\n render() {\n const { classes, model, configuration, onConfigurationChanged, imageSupport, uploadSoundSupport } = this.props;\n const {\n maxImageWidth = {},\n maxImageHeight = {},\n maxLengthPerChoice = {},\n maxResponseAreas,\n partialScoring = {},\n playerSpellCheck = {},\n prompt = {},\n rationale = {},\n settingsPanelDisabled,\n spellCheck = {},\n teacherInstructions = {},\n withRubric = {},\n } = configuration || {};\n const {\n errors,\n maxLengthPerChoiceEnabled,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n\n const { choicesErrors = {}, responseAreasError } = errors || {};\n const validationMessage = generateValidationMessage(configuration);\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n maxLengthPerChoiceEnabled: maxLengthPerChoice.settings && toggle(maxLengthPerChoice.label),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n promptEnabled: prompt.settings && toggle(prompt.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckEnabled: playerSpellCheck.settings && toggle(playerSpellCheck.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n return (\n <div className={classes.design}>\n <layout.ConfigLayout\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => this.onModelChange(model)}\n onChangeConfiguration={(configuration) => onConfigurationChanged(configuration, true)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n <div>\n {teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n {promptEnabled && (\n <InputContainer label={prompt.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.prompt}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}\n\n <div className={classes.flexContainer}>\n <Typography className={classes.text}>Define Template, Choices, and Correct Responses</Typography>\n <Tooltip\n classes={{ tooltip: classes.tooltip }}\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '8px' }} />\n </Tooltip>\n </div>\n\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n toolbarOpts={{ position: 'top' }}\n spellCheck={spellCheckEnabled}\n responseAreaProps={{\n type: 'explicit-constructed-response',\n options: {\n duplicates: true,\n },\n maxResponseAreas: maxResponseAreas,\n respAreaToolbar: (node, nodePath, editor, onToolbarDone) => {\n const { model } = this.props;\n const correctChoice = (model.choices[node.data.index] || [])[0];\n\n return () => (\n <ECRToolbar\n onChangeResponse={(newVal) => this.onChangeResponse(node.data.index, newVal)}\n node={node}\n nodePath={nodePath}\n editor={editor}\n onToolbarDone={onToolbarDone}\n correctChoice={correctChoice}\n />\n );\n },\n error: () => choicesErrors,\n onHandleAreaChange: this.onHandleAreaChange,\n }}\n className={classes.markup}\n markup={model.slateMarkup}\n onChange={this.onChange}\n imageSupport={imageSupport}\n disableImageAlignmentButtons={true}\n onBlur={this.onBlur}\n disabled={false}\n highlightShape={false}\n error={responseAreasError}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n {responseAreasError && <div className={classes.errorText}>{responseAreasError}</div>}\n\n {!isEmpty(model.choices) && (\n <Typography className={classes.text}>\n {`Define Alternates ${maxLengthPerChoiceEnabled ? 'and Character Limits' : ''}`}\n </Typography>\n )}\n <AlternateResponses\n model={model}\n onChange={this.onResponsesChanged}\n onLengthChange={this.onLengthChanged}\n maxLengthPerChoiceEnabled={maxLengthPerChoiceEnabled}\n spellCheck={spellCheckEnabled}\n choicesErrors={choicesErrors}\n />\n\n {rationaleEnabled && (\n <InputContainer label={rationale.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.rationale || ''}\n onChange={this.onRationaleChanged}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n />\n </InputContainer>\n )}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