@pie-element/explicit-constructed-response 6.22.3-next.8 → 6.22.3

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.
@@ -193,6 +193,110 @@ Properties of the `h3` object:
193
193
 
194
194
  Indicates if the plugin is disabled or not
195
195
 
196
+ ### `languageCharacters` (object)
197
+
198
+ Properties of the `languageCharacters` object:
199
+
200
+ #### `disabled` (boolean)
201
+
202
+ Indicates if the plugin is disabled or not
203
+
204
+ ### `bold` (object)
205
+
206
+ Properties of the `bold` object:
207
+
208
+ #### `disabled` (boolean)
209
+
210
+ Indicates if the plugin is disabled or not
211
+
212
+ ### `html` (object)
213
+
214
+ Properties of the `html` object:
215
+
216
+ #### `disabled` (boolean)
217
+
218
+ Indicates if the plugin is disabled or not
219
+
220
+ ### `italic` (object)
221
+
222
+ Properties of the `italic` object:
223
+
224
+ #### `disabled` (boolean)
225
+
226
+ Indicates if the plugin is disabled or not
227
+
228
+ ### `ol_list` (object)
229
+
230
+ Properties of the `ol_list` object:
231
+
232
+ #### `disabled` (boolean)
233
+
234
+ Indicates if the plugin is disabled or not
235
+
236
+ ### `redo` (object)
237
+
238
+ Properties of the `redo` object:
239
+
240
+ #### `disabled` (boolean)
241
+
242
+ Indicates if the plugin is disabled or not
243
+
244
+ ### `strikethrough` (object)
245
+
246
+ Properties of the `strikethrough` object:
247
+
248
+ #### `disabled` (boolean)
249
+
250
+ Indicates if the plugin is disabled or not
251
+
252
+ ### `sub` (object)
253
+
254
+ Properties of the `sub` object:
255
+
256
+ #### `disabled` (boolean)
257
+
258
+ Indicates if the plugin is disabled or not
259
+
260
+ ### `sup` (object)
261
+
262
+ Properties of the `sup` object:
263
+
264
+ #### `disabled` (boolean)
265
+
266
+ Indicates if the plugin is disabled or not
267
+
268
+ ### `table` (object)
269
+
270
+ Properties of the `table` object:
271
+
272
+ #### `disabled` (boolean)
273
+
274
+ Indicates if the plugin is disabled or not
275
+
276
+ ### `ul_list` (object)
277
+
278
+ Properties of the `ul_list` object:
279
+
280
+ #### `disabled` (boolean)
281
+
282
+ Indicates if the plugin is disabled or not
283
+
284
+ ### `underline` (object)
285
+
286
+ Properties of the `underline` object:
287
+
288
+ #### `disabled` (boolean)
289
+
290
+ Indicates if the plugin is disabled or not
291
+
292
+ ### `undo` (object)
293
+
294
+ Properties of the `undo` object:
295
+
296
+ #### `disabled` (boolean)
297
+
298
+ Indicates if the plugin is disabled or not
299
+
196
300
  ## `EditableHtmlButtonConfigure` (object)
197
301
 
198
302
  Properties of the `EditableHtmlButtonConfigure` object:
@@ -321,6 +425,110 @@ Properties of the `h3` object:
321
425
 
322
426
  Indicates if the plugin is disabled or not
323
427
 
428
+ #### `languageCharacters` (object)
429
+
430
+ Properties of the `languageCharacters` object:
431
+
432
+ ##### `disabled` (boolean)
433
+
434
+ Indicates if the plugin is disabled or not
435
+
436
+ #### `bold` (object)
437
+
438
+ Properties of the `bold` object:
439
+
440
+ ##### `disabled` (boolean)
441
+
442
+ Indicates if the plugin is disabled or not
443
+
444
+ #### `html` (object)
445
+
446
+ Properties of the `html` object:
447
+
448
+ ##### `disabled` (boolean)
449
+
450
+ Indicates if the plugin is disabled or not
451
+
452
+ #### `italic` (object)
453
+
454
+ Properties of the `italic` object:
455
+
456
+ ##### `disabled` (boolean)
457
+
458
+ Indicates if the plugin is disabled or not
459
+
460
+ #### `ol_list` (object)
461
+
462
+ Properties of the `ol_list` object:
463
+
464
+ ##### `disabled` (boolean)
465
+
466
+ Indicates if the plugin is disabled or not
467
+
468
+ #### `redo` (object)
469
+
470
+ Properties of the `redo` object:
471
+
472
+ ##### `disabled` (boolean)
473
+
474
+ Indicates if the plugin is disabled or not
475
+
476
+ #### `strikethrough` (object)
477
+
478
+ Properties of the `strikethrough` object:
479
+
480
+ ##### `disabled` (boolean)
481
+
482
+ Indicates if the plugin is disabled or not
483
+
484
+ #### `sub` (object)
485
+
486
+ Properties of the `sub` object:
487
+
488
+ ##### `disabled` (boolean)
489
+
490
+ Indicates if the plugin is disabled or not
491
+
492
+ #### `sup` (object)
493
+
494
+ Properties of the `sup` object:
495
+
496
+ ##### `disabled` (boolean)
497
+
498
+ Indicates if the plugin is disabled or not
499
+
500
+ #### `table` (object)
501
+
502
+ Properties of the `table` object:
503
+
504
+ ##### `disabled` (boolean)
505
+
506
+ Indicates if the plugin is disabled or not
507
+
508
+ #### `ul_list` (object)
509
+
510
+ Properties of the `ul_list` object:
511
+
512
+ ##### `disabled` (boolean)
513
+
514
+ Indicates if the plugin is disabled or not
515
+
516
+ #### `underline` (object)
517
+
518
+ Properties of the `underline` object:
519
+
520
+ ##### `disabled` (boolean)
521
+
522
+ Indicates if the plugin is disabled or not
523
+
524
+ #### `undo` (object)
525
+
526
+ Properties of the `undo` object:
527
+
528
+ ##### `disabled` (boolean)
529
+
530
+ Indicates if the plugin is disabled or not
531
+
324
532
  ### `required` (boolean)
325
533
 
326
534
  Indicates if the item is required and the value cannot be empty
@@ -418,6 +626,110 @@ Properties of the `h3` object:
418
626
 
419
627
  Indicates if the plugin is disabled or not
420
628
 
629
+ #### `languageCharacters` (object)
630
+
631
+ Properties of the `languageCharacters` object:
632
+
633
+ ##### `disabled` (boolean)
634
+
635
+ Indicates if the plugin is disabled or not
636
+
637
+ #### `bold` (object)
638
+
639
+ Properties of the `bold` object:
640
+
641
+ ##### `disabled` (boolean)
642
+
643
+ Indicates if the plugin is disabled or not
644
+
645
+ #### `html` (object)
646
+
647
+ Properties of the `html` object:
648
+
649
+ ##### `disabled` (boolean)
650
+
651
+ Indicates if the plugin is disabled or not
652
+
653
+ #### `italic` (object)
654
+
655
+ Properties of the `italic` object:
656
+
657
+ ##### `disabled` (boolean)
658
+
659
+ Indicates if the plugin is disabled or not
660
+
661
+ #### `ol_list` (object)
662
+
663
+ Properties of the `ol_list` object:
664
+
665
+ ##### `disabled` (boolean)
666
+
667
+ Indicates if the plugin is disabled or not
668
+
669
+ #### `redo` (object)
670
+
671
+ Properties of the `redo` object:
672
+
673
+ ##### `disabled` (boolean)
674
+
675
+ Indicates if the plugin is disabled or not
676
+
677
+ #### `strikethrough` (object)
678
+
679
+ Properties of the `strikethrough` object:
680
+
681
+ ##### `disabled` (boolean)
682
+
683
+ Indicates if the plugin is disabled or not
684
+
685
+ #### `sub` (object)
686
+
687
+ Properties of the `sub` object:
688
+
689
+ ##### `disabled` (boolean)
690
+
691
+ Indicates if the plugin is disabled or not
692
+
693
+ #### `sup` (object)
694
+
695
+ Properties of the `sup` object:
696
+
697
+ ##### `disabled` (boolean)
698
+
699
+ Indicates if the plugin is disabled or not
700
+
701
+ #### `table` (object)
702
+
703
+ Properties of the `table` object:
704
+
705
+ ##### `disabled` (boolean)
706
+
707
+ Indicates if the plugin is disabled or not
708
+
709
+ #### `ul_list` (object)
710
+
711
+ Properties of the `ul_list` object:
712
+
713
+ ##### `disabled` (boolean)
714
+
715
+ Indicates if the plugin is disabled or not
716
+
717
+ #### `underline` (object)
718
+
719
+ Properties of the `underline` object:
720
+
721
+ ##### `disabled` (boolean)
722
+
723
+ Indicates if the plugin is disabled or not
724
+
725
+ #### `undo` (object)
726
+
727
+ Properties of the `undo` object:
728
+
729
+ ##### `disabled` (boolean)
730
+
731
+ Indicates if the plugin is disabled or not
732
+
421
733
  ### `settings` (boolean)
422
734
 
423
735
  Indicates if the item has to be displayed in the Settings Panel
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.23.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.24.2/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.24.3/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
package/module/element.js CHANGED
@@ -1,4 +1,4 @@
1
- import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.23.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_react_dom, _dll_classnames, _dll_pie_lib__pie_toolbox_math_rendering_accessible} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.24.2/module/index.js";
2
2
  import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.24.3/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
@@ -19152,49 +19152,34 @@ var mathjaxScript = {};
19152
19152
  Object.defineProperty(mathjaxScript, "__esModule", {
19153
19153
  value: true
19154
19154
  });
19155
- mathjaxScript.mathRenderingKEY = mathjaxScript.mathRenderingAccessibleKEY = mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
19155
+ mathjaxScript.initializeMathJax = mathjaxScript.MathJaxVersion = void 0;
19156
19156
  var _renderMath = renderMath$2;
19157
19157
  var MathJaxVersion = '3.2.2';
19158
19158
  mathjaxScript.MathJaxVersion = MathJaxVersion;
19159
- var mathRenderingKEY = '@pie-lib/math-rendering@2';
19160
- mathjaxScript.mathRenderingKEY = mathRenderingKEY;
19161
- var mathRenderingAccessibleKEY = '@pie-lib/math-rendering-accessible@1';
19162
- mathjaxScript.mathRenderingAccessibleKEY = mathRenderingAccessibleKEY;
19163
- var getMathJaxCustomKey = function getMathJaxCustomKey() {
19164
- var _window, _window$MathJax, _window2, _window2$MathJax, _window2$MathJax$conf;
19165
- return ((_window = window) === null || _window === void 0 ? void 0 : (_window$MathJax = _window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.customKey) || ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$MathJax = _window2.MathJax) === null || _window2$MathJax === void 0 ? void 0 : (_window2$MathJax$conf = _window2$MathJax.config) === null || _window2$MathJax$conf === void 0 ? void 0 : _window2$MathJax$conf.customKey);
19166
- };
19167
- var mathJaxCustomKey = getMathJaxCustomKey();
19168
- var defaultOpts = function defaultOpts() {
19169
- return (0, _renderMath.getGlobal)().opts || ({});
19170
- };
19171
- var initializeMathJax = function initializeMathJax(renderOpts, processMathJaxFullPage) {
19172
- window.MathJaxInitialised = true;
19173
- renderOpts = renderOpts || defaultOpts();
19174
- if ((!window.MathJax || window.MathJax.version !== MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
19175
- var _renderOpts, _renderOpts2;
19176
- if ((_renderOpts = renderOpts) !== null && _renderOpts !== void 0 && _renderOpts.useSingleDollar) {
19177
- console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
19178
- }
19179
- var texConfig = (_renderOpts2 = renderOpts) !== null && _renderOpts2 !== void 0 && _renderOpts2.useSingleDollar ? {
19180
- macros: {
19181
- parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
19182
- overarc: '\\overparen',
19183
- napprox: '\\not\\approx',
19184
- longdiv: '\\enclose{longdiv}'
19185
- },
19186
- inlineMath: [['$', '$'], ['\\(', '\\)']],
19187
- processEscapes: true,
19188
- displayMath: [['$$', '$$'], ['\\[', '\\]']]
19189
- } : {
19190
- macros: {
19191
- parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
19192
- overarc: '\\overparen',
19193
- napprox: '\\not\\approx',
19194
- longdiv: '\\enclose{longdiv}'
19195
- },
19196
- displayMath: [['$$', '$$'], ['\\[', '\\]']]
19197
- };
19159
+ var initializeMathJax = function initializeMathJax(renderOpts) {
19160
+ if (renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar) {
19161
+ console.warn('[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)');
19162
+ }
19163
+ var texConfig = renderOpts !== null && renderOpts !== void 0 && renderOpts.useSingleDollar ? {
19164
+ macros: {
19165
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
19166
+ overarc: '\\overparen',
19167
+ napprox: '\\not\\approx',
19168
+ longdiv: '\\enclose{longdiv}'
19169
+ },
19170
+ inlineMath: [['$', '$'], ['\\(', '\\)']],
19171
+ processEscapes: true,
19172
+ displayMath: [['$$', '$$'], ['\\[', '\\]']]
19173
+ } : {
19174
+ macros: {
19175
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
19176
+ overarc: '\\overparen',
19177
+ napprox: '\\not\\approx',
19178
+ longdiv: '\\enclose{longdiv}'
19179
+ },
19180
+ displayMath: [['$$', '$$'], ['\\[', '\\]']]
19181
+ };
19182
+ window.mathjaxLoadedP = new Promise(function (resolve) {
19198
19183
  window.MathJax = {
19199
19184
  startup: {
19200
19185
  typeset: false,
@@ -19213,10 +19198,7 @@ var initializeMathJax = function initializeMathJax(renderOpts, processMathJaxFul
19213
19198
  MathJax.startup.defaultReady();
19214
19199
  var globalObj = (0, _renderMath.getGlobal)();
19215
19200
  globalObj.instance = MathJax;
19216
- if (processMathJaxFullPage) {
19217
- processMathJaxFullPage();
19218
- }
19219
- window.MathJaxLoaded = true;
19201
+ resolve();
19220
19202
  }
19221
19203
  },
19222
19204
  loader: {
@@ -19247,7 +19229,7 @@ var initializeMathJax = function initializeMathJax(renderOpts, processMathJaxFul
19247
19229
  script.src = ("https://cdn.jsdelivr.net/npm/mathjax@").concat(MathJaxVersion, "/es5/tex-chtml-full.js");
19248
19230
  script.async = true;
19249
19231
  document.body.appendChild(script);
19250
- }
19232
+ });
19251
19233
  };
19252
19234
  mathjaxScript.initializeMathJax = initializeMathJax;
19253
19235
  var normalization$1 = {};
@@ -78925,7 +78907,7 @@ getDefaultExportFromCjs(mathRendering);
78925
78907
  Object.defineProperty(exports, "__esModule", {
78926
78908
  value: true
78927
78909
  });
78928
- exports.initializeMathJaxScript = exports.getGlobal = exports.fixMathElements = exports.fixMathElement = exports["default"] = void 0;
78910
+ exports.getGlobal = exports.fixMathElements = exports.fixMathElement = exports["default"] = void 0;
78929
78911
  var _typeof2 = _interopRequireDefault(_typeof$d.exports);
78930
78912
  var _mathjaxScript = mathjaxScript;
78931
78913
  var _normalization = normalization$1;
@@ -78976,17 +78958,22 @@ getDefaultExportFromCjs(mathRendering);
78976
78958
  };
78977
78959
  var NEWLINE_BLOCK_REGEX = /\\embed\{newLine\}\[\]/g;
78978
78960
  var NEWLINE_LATEX = '\\newline ';
78961
+ var mathRenderingKEY = '@pie-lib/math-rendering@2';
78962
+ var mathRenderingAccessibleKEY = '@pie-lib/math-rendering-accessible@1';
78979
78963
  var getGlobal = function getGlobal() {
78980
78964
  if (typeof window !== 'undefined') {
78981
- if (!window[_mathjaxScript.mathRenderingAccessibleKEY]) {
78982
- window[_mathjaxScript.mathRenderingAccessibleKEY] = {};
78965
+ if (!window[mathRenderingAccessibleKEY]) {
78966
+ window[mathRenderingAccessibleKEY] = {};
78983
78967
  }
78984
- return window[_mathjaxScript.mathRenderingAccessibleKEY];
78968
+ return window[mathRenderingAccessibleKEY];
78985
78969
  } else {
78986
78970
  return {};
78987
78971
  }
78988
78972
  };
78989
78973
  exports.getGlobal = getGlobal;
78974
+ var defaultOpts = function defaultOpts() {
78975
+ return getGlobal().opts || ({});
78976
+ };
78990
78977
  var fixMathElement = function fixMathElement(element) {
78991
78978
  if (element.dataset.mathHandled) {
78992
78979
  return;
@@ -79051,84 +79038,80 @@ getDefaultExportFromCjs(mathRendering);
79051
79038
  }
79052
79039
  });
79053
79040
  };
79054
- var processMathJaxFullPage = function processMathJaxFullPage(executeOn) {
79055
- executeOn = executeOn || document.body;
79056
- var mathJaxInstance = getGlobal().instance;
79057
- if (mathJaxInstance) {
79058
- mathJaxInstance.texReset();
79059
- mathJaxInstance.typesetClear();
79060
- mathJaxInstance.typesetPromise([executeOn]).then(function () {
79061
- try {
79062
- removeExcessMjxContainers(executeOn);
79063
- removePlaceholdersAndRestoreDisplay();
79064
- var updatedDocument = mathJaxInstance.startup.document;
79065
- var list = updatedDocument.math.list;
79066
- for (var item = list.next; (0, _typeof2["default"])(item.data) !== 'symbol'; item = item.next) {
79067
- var mathMl = toMMl(item.data.root);
79068
- var parsedMathMl = mathMl.replaceAll('\n', '');
79069
- item.data.typesetRoot.setAttribute('data-mathml', parsedMathMl);
79070
- }
79071
- } catch (e) {
79072
- console.error('Error post-processing MathJax typesetting:', e.toString());
79073
- }
79074
- mathJaxInstance.startup.document.clear();
79075
- })["catch"](function (error) {
79076
- console.error('Error in typesetting with MathJax:', error);
79077
- });
79078
- }
79079
- };
79080
- var initializeMathJaxScript = function initializeMathJaxScript(renderOpts) {
79081
- if (!window.MathJaxInitialised) {
79082
- (0, _mathjaxScript.initializeMathJax)(renderOpts, processMathJaxFullPage);
79083
- }
79041
+ var getMathJaxCustomKey = function getMathJaxCustomKey() {
79042
+ var _window, _window$MathJax, _window2, _window2$MathJax, _window2$MathJax$conf;
79043
+ return ((_window = window) === null || _window === void 0 ? void 0 : (_window$MathJax = _window.MathJax) === null || _window$MathJax === void 0 ? void 0 : _window$MathJax.customKey) || ((_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$MathJax = _window2.MathJax) === null || _window2$MathJax === void 0 ? void 0 : (_window2$MathJax$conf = _window2$MathJax.config) === null || _window2$MathJax$conf === void 0 ? void 0 : _window2$MathJax$conf.customKey);
79084
79044
  };
79085
- exports.initializeMathJaxScript = initializeMathJaxScript;
79086
79045
  var renderMath = function renderMath(el, renderOpts) {
79087
79046
  var isString = typeof el === 'string';
79088
- var _ref = renderOpts || ({}), skipWaitForMathRenderingLib = _ref.skipWaitForMathRenderingLib;
79089
79047
  var executeOn = document.body;
79090
79048
  if (isString) {
79091
79049
  var div = document.createElement('div');
79092
79050
  div.innerHTML = el;
79093
79051
  executeOn = div;
79094
79052
  }
79053
+ var _ref = renderOpts || ({}), skipWaitForMathRenderingLib = _ref.skipWaitForMathRenderingLib;
79095
79054
  var renderMathAccessible = function renderMathAccessible() {
79096
79055
  fixMathElements(executeOn);
79097
79056
  adjustMathMLStyle(executeOn);
79098
- if (!window.MathJaxInitialised) {
79099
- (0, _mathjaxScript.initializeMathJax)(renderOpts, function () {
79100
- return processMathJaxFullPage(executeOn);
79101
- });
79102
- return;
79057
+ var mathJaxCustomKey = getMathJaxCustomKey();
79058
+ if ((!window.MathJax || window.MathJax.version !== _mathjaxScript.MathJaxVersion) && !window.mathjaxLoadedP || mathJaxCustomKey && mathJaxCustomKey !== mathRenderingAccessibleKEY) {
79059
+ renderOpts = renderOpts || defaultOpts();
79060
+ (0, _mathjaxScript.initializeMathJax)(renderOpts);
79103
79061
  }
79104
- if (window.MathJaxLoaded) {
79105
- if (isString) {
79106
- try {
79107
- MathJax.texReset();
79108
- MathJax.typesetClear();
79109
- window.MathJax.typeset([executeOn]);
79110
- var updatedDocument = window.MathJax.startup.document;
79111
- var list = updatedDocument.math.list;
79112
- var item = list.next;
79113
- var mathMl = toMMl(item.data.root);
79114
- var parsedMathMl = mathMl.replaceAll('\n', '');
79115
- return parsedMathMl;
79116
- } catch (error) {
79117
- console.error('Error rendering math:', error.message);
79118
- return '';
79119
- }
79062
+ if (isString && window.MathJax && window.mathjaxLoadedP) {
79063
+ try {
79064
+ MathJax.texReset();
79065
+ MathJax.typesetClear();
79066
+ window.MathJax.typeset([executeOn]);
79067
+ var updatedDocument = window.MathJax.startup.document;
79068
+ var list = updatedDocument.math.list;
79069
+ var item = list.next;
79070
+ var mathMl = toMMl(item.data.root);
79071
+ var parsedMathMl = mathMl.replaceAll('\n', '');
79072
+ return parsedMathMl;
79073
+ } catch (error) {
79074
+ console.error('Error rendering math:', error.message);
79120
79075
  }
79121
- processMathJaxFullPage(executeOn);
79076
+ }
79077
+ if (window.mathjaxLoadedP) {
79078
+ window.mathjaxLoadedP.then(function () {
79079
+ var mathJaxInstance = getGlobal().instance;
79080
+ if (mathJaxInstance) {
79081
+ mathJaxInstance.texReset();
79082
+ mathJaxInstance.typesetClear();
79083
+ mathJaxInstance.typesetPromise([executeOn]).then(function () {
79084
+ try {
79085
+ removeExcessMjxContainers(executeOn);
79086
+ removePlaceholdersAndRestoreDisplay();
79087
+ var _updatedDocument = mathJaxInstance.startup.document;
79088
+ var _list = _updatedDocument.math.list;
79089
+ for (var _item = _list.next; (0, _typeof2["default"])(_item.data) !== 'symbol'; _item = _item.next) {
79090
+ var _mathMl = toMMl(_item.data.root);
79091
+ var _parsedMathMl = _mathMl.replaceAll('\n', '');
79092
+ _item.data.typesetRoot.setAttribute('data-mathml', _parsedMathMl);
79093
+ }
79094
+ } catch (e) {
79095
+ console.error('Error post-processing MathJax typesetting:', e.toString());
79096
+ }
79097
+ mathJaxInstance.startup.document.clear();
79098
+ })["catch"](function (error) {
79099
+ console.error('Error in typesetting with MathJax:', error);
79100
+ });
79101
+ }
79102
+ })["catch"](function (error) {
79103
+ console.error('Error in initializing MathJax:', error);
79104
+ });
79122
79105
  }
79123
79106
  };
79124
79107
  if (skipWaitForMathRenderingLib) {
79125
79108
  return renderMathAccessible();
79126
79109
  } else {
79127
- if (window.hasOwnProperty(_mathjaxScript.mathRenderingKEY) && window[_mathjaxScript.mathRenderingKEY].instance) {
79110
+ if (window.hasOwnProperty(mathRenderingKEY) && window[mathRenderingKEY].instance) {
79128
79111
  removePlaceholdersAndRestoreDisplay();
79129
79112
  return mr.renderMath(executeOn, renderOpts);
79130
79113
  }
79131
- if (window.hasOwnProperty(_mathjaxScript.mathRenderingAccessibleKEY) && window[_mathjaxScript.mathRenderingAccessibleKEY].instance) {
79114
+ if (window.hasOwnProperty(mathRenderingAccessibleKEY) && window[mathRenderingAccessibleKEY].instance) {
79132
79115
  return renderMathAccessible();
79133
79116
  }
79134
79117
  var waitForMathRenderingLib = function waitForMathRenderingLib(renderMathAccessibleCallback) {
@@ -79138,7 +79121,7 @@ getDefaultExportFromCjs(mathRendering);
79138
79121
  var maxWaitTime = 500;
79139
79122
  var startTime = Date.now();
79140
79123
  var checkForLib = function checkForLib() {
79141
- var mathRenderingHasLoaded = window.hasOwnProperty(_mathjaxScript.mathRenderingKEY) && window[_mathjaxScript.mathRenderingKEY].instance;
79124
+ var mathRenderingHasLoaded = window.hasOwnProperty(mathRenderingKEY) && window[mathRenderingKEY].instance;
79142
79125
  var hasExceededMaxWait = Date.now() - startTime > maxWaitTime;
79143
79126
  if (mathRenderingHasLoaded || hasExceededMaxWait) {
79144
79127
  clearInterval(checkIntervalId);
@@ -79173,16 +79156,9 @@ var mmlToLatex = {};
79173
79156
  getDefaultExportFromCjs(mmlToLatex);
79174
79157
  (function (exports) {
79175
79158
  var _interopRequireDefault = interopRequireDefault.exports;
79176
- var _typeof = _typeof$d.exports;
79177
79159
  Object.defineProperty(exports, "__esModule", {
79178
79160
  value: true
79179
79161
  });
79180
- Object.defineProperty(exports, "initializeMathJaxScript", {
79181
- enumerable: true,
79182
- get: function get() {
79183
- return _renderMath.initializeMathJaxScript;
79184
- }
79185
- });
79186
79162
  Object.defineProperty(exports, "mmlToLatex", {
79187
79163
  enumerable: true,
79188
79164
  get: function get() {
@@ -79207,48 +79183,9 @@ getDefaultExportFromCjs(mmlToLatex);
79207
79183
  return _normalization.wrapMath;
79208
79184
  }
79209
79185
  });
79210
- var _renderMath = _interopRequireWildcard(renderMath$2);
79186
+ var _renderMath = _interopRequireDefault(renderMath$2);
79211
79187
  var _mmlToLatex = _interopRequireDefault(mmlToLatex);
79212
79188
  var _normalization = normalization$1;
79213
- function _getRequireWildcardCache(nodeInterop) {
79214
- if (typeof WeakMap !== "function") return null;
79215
- var cacheBabelInterop = new WeakMap();
79216
- var cacheNodeInterop = new WeakMap();
79217
- return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) {
79218
- return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
79219
- })(nodeInterop);
79220
- }
79221
- function _interopRequireWildcard(obj, nodeInterop) {
79222
- if (!nodeInterop && obj && obj.__esModule) {
79223
- return obj;
79224
- }
79225
- if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
79226
- return {
79227
- "default": obj
79228
- };
79229
- }
79230
- var cache = _getRequireWildcardCache(nodeInterop);
79231
- if (cache && cache.has(obj)) {
79232
- return cache.get(obj);
79233
- }
79234
- var newObj = {};
79235
- var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
79236
- for (var key in obj) {
79237
- if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
79238
- var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
79239
- if (desc && (desc.get || desc.set)) {
79240
- Object.defineProperty(newObj, key, desc);
79241
- } else {
79242
- newObj[key] = obj[key];
79243
- }
79244
- }
79245
- }
79246
- newObj["default"] = obj;
79247
- if (cache) {
79248
- cache.set(obj, newObj);
79249
- }
79250
- return newObj;
79251
- }
79252
79189
  })(mathRenderingAccessible);
79253
79190
  getDefaultExportFromCjs(mathRenderingAccessible);
79254
79191
  var choices = {};