@pie-element/math-templated 3.4.2-next.9 → 3.4.2
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.
- package/CHANGELOG.md +11 -0
- package/configure/CHANGELOG.md +11 -0
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +11 -0
- package/controller/package.json +2 -2
- package/module/configure.js +299 -202
- package/module/element.js +302 -205
- package/module/manifest.json +2 -2
- package/module/print.js +302 -205
- package/package.json +3 -3
package/module/configure.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_config_ui, _dll_pie_lib__pie_toolbox_math_toolbar, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_editable_html} from "../../../@pie-lib/pie-toolbox-module@5.10.0/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) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -42647,7 +42647,7 @@ const require$$12$5 = _dll_prop_types;
|
|
|
42647
42647
|
getDefaultExportFromCjs(feedback);
|
|
42648
42648
|
const require$$9$8 = _dll_react;
|
|
42649
42649
|
const require$$10$4 = _dll_prop_types;
|
|
42650
|
-
const require$$15$
|
|
42650
|
+
const require$$15$1 = _dll_debug;
|
|
42651
42651
|
var _interopRequireDefault$p = interopRequireDefault.exports;
|
|
42652
42652
|
var _typeof = _typeof$3.exports;
|
|
42653
42653
|
Object.defineProperty(responseIndicators, "__esModule", {
|
|
@@ -42667,7 +42667,7 @@ var icons = _interopRequireWildcard(icons$1);
|
|
|
42667
42667
|
var _Popover = _interopRequireDefault$p(Popover$2);
|
|
42668
42668
|
var _styles$1 = styles$E;
|
|
42669
42669
|
var _feedback = _interopRequireDefault$p(feedback);
|
|
42670
|
-
var _debug = _interopRequireDefault$p(require$$15$
|
|
42670
|
+
var _debug = _interopRequireDefault$p(require$$15$1);
|
|
42671
42671
|
function _getRequireWildcardCache(nodeInterop) {
|
|
42672
42672
|
if (typeof WeakMap !== "function") return null;
|
|
42673
42673
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -43032,6 +43032,45 @@ Collapse$1.default = _default$l;
|
|
|
43032
43032
|
getDefaultExportFromCjs(Collapse$2);
|
|
43033
43033
|
var mathRendering = {};
|
|
43034
43034
|
var renderMath = {};
|
|
43035
|
+
var get = {
|
|
43036
|
+
exports: {}
|
|
43037
|
+
};
|
|
43038
|
+
var superPropBase = {
|
|
43039
|
+
exports: {}
|
|
43040
|
+
};
|
|
43041
|
+
(function (module) {
|
|
43042
|
+
var getPrototypeOf = getPrototypeOf$1.exports;
|
|
43043
|
+
function _superPropBase(object, property) {
|
|
43044
|
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
43045
|
+
object = getPrototypeOf(object);
|
|
43046
|
+
if (object === null) break;
|
|
43047
|
+
}
|
|
43048
|
+
return object;
|
|
43049
|
+
}
|
|
43050
|
+
(module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
43051
|
+
})(superPropBase);
|
|
43052
|
+
getDefaultExportFromCjs(superPropBase.exports);
|
|
43053
|
+
(function (module) {
|
|
43054
|
+
var superPropBase$1 = superPropBase.exports;
|
|
43055
|
+
function _get() {
|
|
43056
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
43057
|
+
(module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
43058
|
+
} else {
|
|
43059
|
+
(module.exports = _get = function _get(target, property, receiver) {
|
|
43060
|
+
var base = superPropBase$1(target, property);
|
|
43061
|
+
if (!base) return;
|
|
43062
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
43063
|
+
if (desc.get) {
|
|
43064
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
43065
|
+
}
|
|
43066
|
+
return desc.value;
|
|
43067
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
43068
|
+
}
|
|
43069
|
+
return _get.apply(this, arguments);
|
|
43070
|
+
}
|
|
43071
|
+
(module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
43072
|
+
})(get);
|
|
43073
|
+
getDefaultExportFromCjs(get.exports);
|
|
43035
43074
|
var mathjax = {};
|
|
43036
43075
|
var version = {};
|
|
43037
43076
|
Object.defineProperty(version, "__esModule", {
|
|
@@ -72631,10 +72670,198 @@ function MenuHandler(handler) {
|
|
|
72631
72670
|
return handler;
|
|
72632
72671
|
}
|
|
72633
72672
|
MenuHandler$1.MenuHandler = MenuHandler;
|
|
72673
|
+
var FindMathML$1 = {};
|
|
72674
|
+
var FindMath = {};
|
|
72675
|
+
Object.defineProperty(FindMath, "__esModule", {
|
|
72676
|
+
value: true
|
|
72677
|
+
});
|
|
72678
|
+
FindMath.AbstractFindMath = void 0;
|
|
72679
|
+
var Options_js_1$d = Options;
|
|
72680
|
+
var AbstractFindMath = (function () {
|
|
72681
|
+
function AbstractFindMath(options) {
|
|
72682
|
+
var CLASS = this.constructor;
|
|
72683
|
+
this.options = (0, Options_js_1$d.userOptions)((0, Options_js_1$d.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
72684
|
+
}
|
|
72685
|
+
AbstractFindMath.OPTIONS = {};
|
|
72686
|
+
return AbstractFindMath;
|
|
72687
|
+
})();
|
|
72688
|
+
FindMath.AbstractFindMath = AbstractFindMath;
|
|
72689
|
+
var __extends$1m = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
72690
|
+
var extendStatics = function (d, b) {
|
|
72691
|
+
extendStatics = Object.setPrototypeOf || ({
|
|
72692
|
+
__proto__: []
|
|
72693
|
+
}) instanceof Array && (function (d, b) {
|
|
72694
|
+
d.__proto__ = b;
|
|
72695
|
+
}) || (function (d, b) {
|
|
72696
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
72697
|
+
});
|
|
72698
|
+
return extendStatics(d, b);
|
|
72699
|
+
};
|
|
72700
|
+
return function (d, b) {
|
|
72701
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
72702
|
+
extendStatics(d, b);
|
|
72703
|
+
function __() {
|
|
72704
|
+
this.constructor = d;
|
|
72705
|
+
}
|
|
72706
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
72707
|
+
};
|
|
72708
|
+
})();
|
|
72709
|
+
var __values$G = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
72710
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
72711
|
+
if (m) return m.call(o);
|
|
72712
|
+
if (o && typeof o.length === "number") return {
|
|
72713
|
+
next: function () {
|
|
72714
|
+
if (o && i >= o.length) o = void 0;
|
|
72715
|
+
return {
|
|
72716
|
+
value: o && o[i++],
|
|
72717
|
+
done: !o
|
|
72718
|
+
};
|
|
72719
|
+
}
|
|
72720
|
+
};
|
|
72721
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
72722
|
+
});
|
|
72723
|
+
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
72724
|
+
value: true
|
|
72725
|
+
});
|
|
72726
|
+
FindMathML$1.FindMathML = void 0;
|
|
72727
|
+
var FindMath_js_1$1 = FindMath;
|
|
72728
|
+
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
72729
|
+
var FindMathML = (function (_super) {
|
|
72730
|
+
__extends$1m(FindMathML, _super);
|
|
72731
|
+
function FindMathML() {
|
|
72732
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
72733
|
+
}
|
|
72734
|
+
FindMathML.prototype.findMath = function (node) {
|
|
72735
|
+
var set = new Set();
|
|
72736
|
+
this.findMathNodes(node, set);
|
|
72737
|
+
this.findMathPrefixed(node, set);
|
|
72738
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
72739
|
+
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
72740
|
+
this.findMathNS(node, set);
|
|
72741
|
+
}
|
|
72742
|
+
return this.processMath(set);
|
|
72743
|
+
};
|
|
72744
|
+
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
72745
|
+
var e_1, _a;
|
|
72746
|
+
try {
|
|
72747
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72748
|
+
var math = _c.value;
|
|
72749
|
+
set.add(math);
|
|
72750
|
+
}
|
|
72751
|
+
} catch (e_1_1) {
|
|
72752
|
+
e_1 = {
|
|
72753
|
+
error: e_1_1
|
|
72754
|
+
};
|
|
72755
|
+
} finally {
|
|
72756
|
+
try {
|
|
72757
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72758
|
+
} finally {
|
|
72759
|
+
if (e_1) throw e_1.error;
|
|
72760
|
+
}
|
|
72761
|
+
}
|
|
72762
|
+
};
|
|
72763
|
+
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
72764
|
+
var e_2, _a, e_3, _b;
|
|
72765
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
72766
|
+
try {
|
|
72767
|
+
for (var _c = __values$G(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
72768
|
+
var attr = _d.value;
|
|
72769
|
+
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
72770
|
+
var prefix = attr.name.substr(6);
|
|
72771
|
+
try {
|
|
72772
|
+
for (var _e = (e_3 = void 0, __values$G(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
72773
|
+
var math = _f.value;
|
|
72774
|
+
set.add(math);
|
|
72775
|
+
}
|
|
72776
|
+
} catch (e_3_1) {
|
|
72777
|
+
e_3 = {
|
|
72778
|
+
error: e_3_1
|
|
72779
|
+
};
|
|
72780
|
+
} finally {
|
|
72781
|
+
try {
|
|
72782
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
72783
|
+
} finally {
|
|
72784
|
+
if (e_3) throw e_3.error;
|
|
72785
|
+
}
|
|
72786
|
+
}
|
|
72787
|
+
}
|
|
72788
|
+
}
|
|
72789
|
+
} catch (e_2_1) {
|
|
72790
|
+
e_2 = {
|
|
72791
|
+
error: e_2_1
|
|
72792
|
+
};
|
|
72793
|
+
} finally {
|
|
72794
|
+
try {
|
|
72795
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
72796
|
+
} finally {
|
|
72797
|
+
if (e_2) throw e_2.error;
|
|
72798
|
+
}
|
|
72799
|
+
}
|
|
72800
|
+
};
|
|
72801
|
+
FindMathML.prototype.findMathNS = function (node, set) {
|
|
72802
|
+
var e_4, _a;
|
|
72803
|
+
try {
|
|
72804
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72805
|
+
var math = _c.value;
|
|
72806
|
+
set.add(math);
|
|
72807
|
+
}
|
|
72808
|
+
} catch (e_4_1) {
|
|
72809
|
+
e_4 = {
|
|
72810
|
+
error: e_4_1
|
|
72811
|
+
};
|
|
72812
|
+
} finally {
|
|
72813
|
+
try {
|
|
72814
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72815
|
+
} finally {
|
|
72816
|
+
if (e_4) throw e_4.error;
|
|
72817
|
+
}
|
|
72818
|
+
}
|
|
72819
|
+
};
|
|
72820
|
+
FindMathML.prototype.processMath = function (set) {
|
|
72821
|
+
var e_5, _a;
|
|
72822
|
+
var math = [];
|
|
72823
|
+
try {
|
|
72824
|
+
for (var _b = __values$G(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72825
|
+
var mml = _c.value;
|
|
72826
|
+
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
72827
|
+
var start = {
|
|
72828
|
+
node: mml,
|
|
72829
|
+
n: 0,
|
|
72830
|
+
delim: ''
|
|
72831
|
+
};
|
|
72832
|
+
var end = {
|
|
72833
|
+
node: mml,
|
|
72834
|
+
n: 0,
|
|
72835
|
+
delim: ''
|
|
72836
|
+
};
|
|
72837
|
+
math.push({
|
|
72838
|
+
math: this.adaptor.outerHTML(mml),
|
|
72839
|
+
start: start,
|
|
72840
|
+
end: end,
|
|
72841
|
+
display: display
|
|
72842
|
+
});
|
|
72843
|
+
}
|
|
72844
|
+
} catch (e_5_1) {
|
|
72845
|
+
e_5 = {
|
|
72846
|
+
error: e_5_1
|
|
72847
|
+
};
|
|
72848
|
+
} finally {
|
|
72849
|
+
try {
|
|
72850
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72851
|
+
} finally {
|
|
72852
|
+
if (e_5) throw e_5.error;
|
|
72853
|
+
}
|
|
72854
|
+
}
|
|
72855
|
+
return math;
|
|
72856
|
+
};
|
|
72857
|
+
FindMathML.OPTIONS = {};
|
|
72858
|
+
return FindMathML;
|
|
72859
|
+
})(FindMath_js_1$1.AbstractFindMath);
|
|
72860
|
+
FindMathML$1.FindMathML = FindMathML;
|
|
72634
72861
|
var mathml = {};
|
|
72635
72862
|
var InputJax = {};
|
|
72636
72863
|
var FunctionList$1 = {};
|
|
72637
|
-
var __extends$
|
|
72864
|
+
var __extends$1l = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
72638
72865
|
var extendStatics = function (d, b) {
|
|
72639
72866
|
extendStatics = Object.setPrototypeOf || ({
|
|
72640
72867
|
__proto__: []
|
|
@@ -72654,7 +72881,7 @@ var __extends$1m = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
|
72654
72881
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
72655
72882
|
};
|
|
72656
72883
|
})();
|
|
72657
|
-
var __values$
|
|
72884
|
+
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
72658
72885
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
72659
72886
|
if (m) return m.call(o);
|
|
72660
72887
|
if (o && typeof o.length === "number") return {
|
|
@@ -72702,7 +72929,7 @@ Object.defineProperty(FunctionList$1, "__esModule", {
|
|
|
72702
72929
|
FunctionList$1.FunctionList = void 0;
|
|
72703
72930
|
var PrioritizedList_js_1 = PrioritizedList$1;
|
|
72704
72931
|
var FunctionList = (function (_super) {
|
|
72705
|
-
__extends$
|
|
72932
|
+
__extends$1l(FunctionList, _super);
|
|
72706
72933
|
function FunctionList() {
|
|
72707
72934
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
72708
72935
|
}
|
|
@@ -72713,7 +72940,7 @@ var FunctionList = (function (_super) {
|
|
|
72713
72940
|
data[_i] = arguments[_i];
|
|
72714
72941
|
}
|
|
72715
72942
|
try {
|
|
72716
|
-
for (var _b = __values$
|
|
72943
|
+
for (var _b = __values$F(this), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72717
72944
|
var item = _c.value;
|
|
72718
72945
|
var result = item.item.apply(item, __spreadArray$s([], __read$P(data), false));
|
|
72719
72946
|
if (result === false) {
|
|
@@ -72767,7 +72994,7 @@ Object.defineProperty(InputJax, "__esModule", {
|
|
|
72767
72994
|
value: true
|
|
72768
72995
|
});
|
|
72769
72996
|
InputJax.AbstractInputJax = void 0;
|
|
72770
|
-
var Options_js_1$
|
|
72997
|
+
var Options_js_1$c = Options;
|
|
72771
72998
|
var FunctionList_js_1$2 = FunctionList$1;
|
|
72772
72999
|
var AbstractInputJax = (function () {
|
|
72773
73000
|
function AbstractInputJax(options) {
|
|
@@ -72777,7 +73004,7 @@ var AbstractInputJax = (function () {
|
|
|
72777
73004
|
this.adaptor = null;
|
|
72778
73005
|
this.mmlFactory = null;
|
|
72779
73006
|
var CLASS = this.constructor;
|
|
72780
|
-
this.options = (0, Options_js_1$
|
|
73007
|
+
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
72781
73008
|
this.preFilters = new FunctionList_js_1$2.FunctionList();
|
|
72782
73009
|
this.postFilters = new FunctionList_js_1$2.FunctionList();
|
|
72783
73010
|
}
|
|
@@ -72825,194 +73052,6 @@ var AbstractInputJax = (function () {
|
|
|
72825
73052
|
return AbstractInputJax;
|
|
72826
73053
|
})();
|
|
72827
73054
|
InputJax.AbstractInputJax = AbstractInputJax;
|
|
72828
|
-
var FindMathML$1 = {};
|
|
72829
|
-
var FindMath = {};
|
|
72830
|
-
Object.defineProperty(FindMath, "__esModule", {
|
|
72831
|
-
value: true
|
|
72832
|
-
});
|
|
72833
|
-
FindMath.AbstractFindMath = void 0;
|
|
72834
|
-
var Options_js_1$c = Options;
|
|
72835
|
-
var AbstractFindMath = (function () {
|
|
72836
|
-
function AbstractFindMath(options) {
|
|
72837
|
-
var CLASS = this.constructor;
|
|
72838
|
-
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
72839
|
-
}
|
|
72840
|
-
AbstractFindMath.OPTIONS = {};
|
|
72841
|
-
return AbstractFindMath;
|
|
72842
|
-
})();
|
|
72843
|
-
FindMath.AbstractFindMath = AbstractFindMath;
|
|
72844
|
-
var __extends$1l = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
72845
|
-
var extendStatics = function (d, b) {
|
|
72846
|
-
extendStatics = Object.setPrototypeOf || ({
|
|
72847
|
-
__proto__: []
|
|
72848
|
-
}) instanceof Array && (function (d, b) {
|
|
72849
|
-
d.__proto__ = b;
|
|
72850
|
-
}) || (function (d, b) {
|
|
72851
|
-
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
72852
|
-
});
|
|
72853
|
-
return extendStatics(d, b);
|
|
72854
|
-
};
|
|
72855
|
-
return function (d, b) {
|
|
72856
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
72857
|
-
extendStatics(d, b);
|
|
72858
|
-
function __() {
|
|
72859
|
-
this.constructor = d;
|
|
72860
|
-
}
|
|
72861
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
72862
|
-
};
|
|
72863
|
-
})();
|
|
72864
|
-
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
72865
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
72866
|
-
if (m) return m.call(o);
|
|
72867
|
-
if (o && typeof o.length === "number") return {
|
|
72868
|
-
next: function () {
|
|
72869
|
-
if (o && i >= o.length) o = void 0;
|
|
72870
|
-
return {
|
|
72871
|
-
value: o && o[i++],
|
|
72872
|
-
done: !o
|
|
72873
|
-
};
|
|
72874
|
-
}
|
|
72875
|
-
};
|
|
72876
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
72877
|
-
});
|
|
72878
|
-
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
72879
|
-
value: true
|
|
72880
|
-
});
|
|
72881
|
-
FindMathML$1.FindMathML = void 0;
|
|
72882
|
-
var FindMath_js_1$1 = FindMath;
|
|
72883
|
-
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
72884
|
-
var FindMathML = (function (_super) {
|
|
72885
|
-
__extends$1l(FindMathML, _super);
|
|
72886
|
-
function FindMathML() {
|
|
72887
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
72888
|
-
}
|
|
72889
|
-
FindMathML.prototype.findMath = function (node) {
|
|
72890
|
-
var set = new Set();
|
|
72891
|
-
this.findMathNodes(node, set);
|
|
72892
|
-
this.findMathPrefixed(node, set);
|
|
72893
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
72894
|
-
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
72895
|
-
this.findMathNS(node, set);
|
|
72896
|
-
}
|
|
72897
|
-
return this.processMath(set);
|
|
72898
|
-
};
|
|
72899
|
-
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
72900
|
-
var e_1, _a;
|
|
72901
|
-
try {
|
|
72902
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72903
|
-
var math = _c.value;
|
|
72904
|
-
set.add(math);
|
|
72905
|
-
}
|
|
72906
|
-
} catch (e_1_1) {
|
|
72907
|
-
e_1 = {
|
|
72908
|
-
error: e_1_1
|
|
72909
|
-
};
|
|
72910
|
-
} finally {
|
|
72911
|
-
try {
|
|
72912
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72913
|
-
} finally {
|
|
72914
|
-
if (e_1) throw e_1.error;
|
|
72915
|
-
}
|
|
72916
|
-
}
|
|
72917
|
-
};
|
|
72918
|
-
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
72919
|
-
var e_2, _a, e_3, _b;
|
|
72920
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
72921
|
-
try {
|
|
72922
|
-
for (var _c = __values$F(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
72923
|
-
var attr = _d.value;
|
|
72924
|
-
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
72925
|
-
var prefix = attr.name.substr(6);
|
|
72926
|
-
try {
|
|
72927
|
-
for (var _e = (e_3 = void 0, __values$F(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
72928
|
-
var math = _f.value;
|
|
72929
|
-
set.add(math);
|
|
72930
|
-
}
|
|
72931
|
-
} catch (e_3_1) {
|
|
72932
|
-
e_3 = {
|
|
72933
|
-
error: e_3_1
|
|
72934
|
-
};
|
|
72935
|
-
} finally {
|
|
72936
|
-
try {
|
|
72937
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
72938
|
-
} finally {
|
|
72939
|
-
if (e_3) throw e_3.error;
|
|
72940
|
-
}
|
|
72941
|
-
}
|
|
72942
|
-
}
|
|
72943
|
-
}
|
|
72944
|
-
} catch (e_2_1) {
|
|
72945
|
-
e_2 = {
|
|
72946
|
-
error: e_2_1
|
|
72947
|
-
};
|
|
72948
|
-
} finally {
|
|
72949
|
-
try {
|
|
72950
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
72951
|
-
} finally {
|
|
72952
|
-
if (e_2) throw e_2.error;
|
|
72953
|
-
}
|
|
72954
|
-
}
|
|
72955
|
-
};
|
|
72956
|
-
FindMathML.prototype.findMathNS = function (node, set) {
|
|
72957
|
-
var e_4, _a;
|
|
72958
|
-
try {
|
|
72959
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72960
|
-
var math = _c.value;
|
|
72961
|
-
set.add(math);
|
|
72962
|
-
}
|
|
72963
|
-
} catch (e_4_1) {
|
|
72964
|
-
e_4 = {
|
|
72965
|
-
error: e_4_1
|
|
72966
|
-
};
|
|
72967
|
-
} finally {
|
|
72968
|
-
try {
|
|
72969
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
72970
|
-
} finally {
|
|
72971
|
-
if (e_4) throw e_4.error;
|
|
72972
|
-
}
|
|
72973
|
-
}
|
|
72974
|
-
};
|
|
72975
|
-
FindMathML.prototype.processMath = function (set) {
|
|
72976
|
-
var e_5, _a;
|
|
72977
|
-
var math = [];
|
|
72978
|
-
try {
|
|
72979
|
-
for (var _b = __values$F(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
72980
|
-
var mml = _c.value;
|
|
72981
|
-
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
72982
|
-
var start = {
|
|
72983
|
-
node: mml,
|
|
72984
|
-
n: 0,
|
|
72985
|
-
delim: ''
|
|
72986
|
-
};
|
|
72987
|
-
var end = {
|
|
72988
|
-
node: mml,
|
|
72989
|
-
n: 0,
|
|
72990
|
-
delim: ''
|
|
72991
|
-
};
|
|
72992
|
-
math.push({
|
|
72993
|
-
math: this.adaptor.outerHTML(mml),
|
|
72994
|
-
start: start,
|
|
72995
|
-
end: end,
|
|
72996
|
-
display: display
|
|
72997
|
-
});
|
|
72998
|
-
}
|
|
72999
|
-
} catch (e_5_1) {
|
|
73000
|
-
e_5 = {
|
|
73001
|
-
error: e_5_1
|
|
73002
|
-
};
|
|
73003
|
-
} finally {
|
|
73004
|
-
try {
|
|
73005
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
73006
|
-
} finally {
|
|
73007
|
-
if (e_5) throw e_5.error;
|
|
73008
|
-
}
|
|
73009
|
-
}
|
|
73010
|
-
return math;
|
|
73011
|
-
};
|
|
73012
|
-
FindMathML.OPTIONS = {};
|
|
73013
|
-
return FindMathML;
|
|
73014
|
-
})(FindMath_js_1$1.AbstractFindMath);
|
|
73015
|
-
FindMathML$1.FindMathML = FindMathML;
|
|
73016
73055
|
var MathMLCompile$1 = {};
|
|
73017
73056
|
var Entities$1 = {};
|
|
73018
73057
|
var AsyncLoad = {};
|
|
@@ -115539,7 +115578,7 @@ var unWrapMath = function unWrapMath(content) {
|
|
|
115539
115578
|
};
|
|
115540
115579
|
};
|
|
115541
115580
|
normalization.unWrapMath = unWrapMath;
|
|
115542
|
-
const require$$
|
|
115581
|
+
const require$$22 = _dll_debug;
|
|
115543
115582
|
(function (exports) {
|
|
115544
115583
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
115545
115584
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -115549,10 +115588,17 @@ const require$$15$1 = _dll_debug;
|
|
|
115549
115588
|
var _toConsumableArray2 = _interopRequireDefault(toConsumableArray.exports);
|
|
115550
115589
|
var _typeof2 = _interopRequireDefault(_typeof$3.exports);
|
|
115551
115590
|
var _defineProperty2 = _interopRequireDefault(defineProperty$3.exports);
|
|
115591
|
+
var _classCallCheck2 = _interopRequireDefault(classCallCheck$1.exports);
|
|
115592
|
+
var _createClass2 = _interopRequireDefault(createClass$1.exports);
|
|
115593
|
+
var _get2 = _interopRequireDefault(get.exports);
|
|
115594
|
+
var _inherits2 = _interopRequireDefault(inherits.exports);
|
|
115595
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(possibleConstructorReturn.exports);
|
|
115596
|
+
var _getPrototypeOf2 = _interopRequireDefault(getPrototypeOf$1.exports);
|
|
115552
115597
|
var _mathjax = mathjax;
|
|
115553
115598
|
var _assistiveMml = assistiveMml;
|
|
115554
115599
|
var _semanticEnrich = semanticEnrich;
|
|
115555
115600
|
var _MenuHandler = MenuHandler$1;
|
|
115601
|
+
var _FindMathML2 = FindMathML$1;
|
|
115556
115602
|
var _mathml = mathml;
|
|
115557
115603
|
var _tex = tex$2;
|
|
115558
115604
|
var _chtml = chtml$1;
|
|
@@ -115560,12 +115606,13 @@ const require$$15$1 = _dll_debug;
|
|
|
115560
115606
|
var _browserAdaptor = browserAdaptor$1;
|
|
115561
115607
|
var _AllPackages = AllPackages;
|
|
115562
115608
|
var _mstack = mstack;
|
|
115563
|
-
var _debug = _interopRequireDefault(require$$
|
|
115609
|
+
var _debug = _interopRequireDefault(require$$22);
|
|
115564
115610
|
var _normalization = normalization;
|
|
115565
115611
|
var _MmlFactory = MmlFactory$1;
|
|
115566
115612
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
115567
115613
|
var _WrapperFactory = WrapperFactory$2;
|
|
115568
115614
|
var _mspace = mspace$1;
|
|
115615
|
+
var _HTMLDomStrings = HTMLDomStrings$1;
|
|
115569
115616
|
function ownKeys(object, enumerableOnly) {
|
|
115570
115617
|
var keys = Object.keys(object);
|
|
115571
115618
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -115587,6 +115634,30 @@ const require$$15$1 = _dll_debug;
|
|
|
115587
115634
|
}
|
|
115588
115635
|
return target;
|
|
115589
115636
|
}
|
|
115637
|
+
function _createSuper(Derived) {
|
|
115638
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
115639
|
+
return function _createSuperInternal() {
|
|
115640
|
+
var Super = (0, _getPrototypeOf2["default"])(Derived), result;
|
|
115641
|
+
if (hasNativeReflectConstruct) {
|
|
115642
|
+
var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor;
|
|
115643
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
115644
|
+
} else {
|
|
115645
|
+
result = Super.apply(this, arguments);
|
|
115646
|
+
}
|
|
115647
|
+
return (0, _possibleConstructorReturn2["default"])(this, result);
|
|
115648
|
+
};
|
|
115649
|
+
}
|
|
115650
|
+
function _isNativeReflectConstruct() {
|
|
115651
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
115652
|
+
if (Reflect.construct.sham) return false;
|
|
115653
|
+
if (typeof Proxy === "function") return true;
|
|
115654
|
+
try {
|
|
115655
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
115656
|
+
return true;
|
|
115657
|
+
} catch (e) {
|
|
115658
|
+
return false;
|
|
115659
|
+
}
|
|
115660
|
+
}
|
|
115590
115661
|
if (typeof window !== 'undefined') {
|
|
115591
115662
|
(0, _html.RegisterHTMLHandler)((0, _browserAdaptor.browserAdaptor)());
|
|
115592
115663
|
}
|
|
@@ -115641,6 +115712,28 @@ const require$$15$1 = _dll_debug;
|
|
|
115641
115712
|
return node.setAttribute('displaystyle', 'true');
|
|
115642
115713
|
});
|
|
115643
115714
|
};
|
|
115715
|
+
var myFindMathML = (function (_FindMathML) {
|
|
115716
|
+
(0, _inherits2["default"])(myFindMathML, _FindMathML);
|
|
115717
|
+
var _super = _createSuper(myFindMathML);
|
|
115718
|
+
function myFindMathML() {
|
|
115719
|
+
(0, _classCallCheck2["default"])(this, myFindMathML);
|
|
115720
|
+
return _super.apply(this, arguments);
|
|
115721
|
+
}
|
|
115722
|
+
(0, _createClass2["default"])(myFindMathML, [{
|
|
115723
|
+
key: "processMath",
|
|
115724
|
+
value: function processMath(set) {
|
|
115725
|
+
var adaptor = this.adaptor;
|
|
115726
|
+
for (var _i = 0, _Array$from = Array.from(set); _i < _Array$from.length; _i++) {
|
|
115727
|
+
var mml = _Array$from[_i];
|
|
115728
|
+
if (adaptor.kind(adaptor.parent(mml)) === 'mjx-assistive-mml') {
|
|
115729
|
+
set["delete"](mml);
|
|
115730
|
+
}
|
|
115731
|
+
}
|
|
115732
|
+
return (0, _get2["default"])((0, _getPrototypeOf2["default"])(myFindMathML.prototype), "processMath", this).call(this, set);
|
|
115733
|
+
}
|
|
115734
|
+
}]);
|
|
115735
|
+
return myFindMathML;
|
|
115736
|
+
})(_FindMathML2.FindMathML);
|
|
115644
115737
|
var createMathMLInstance = function createMathMLInstance(opts) {
|
|
115645
115738
|
var docProvided = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
|
|
115646
115739
|
opts = opts || defaultOpts();
|
|
@@ -115670,7 +115763,8 @@ const require$$15$1 = _dll_debug;
|
|
|
115670
115763
|
parseError: function parseError(node) {
|
|
115671
115764
|
console.log('error:', node);
|
|
115672
115765
|
this.error(this.adaptor.textContent(node).replace(/\n.*/g, ''));
|
|
115673
|
-
}
|
|
115766
|
+
},
|
|
115767
|
+
FindMathML: new myFindMathML()
|
|
115674
115768
|
};
|
|
115675
115769
|
var fontURL = ("https://unpkg.com/mathjax-full@").concat(_mathjax.mathjax.version, "/ts/output/chtml/fonts/tex-woff-v2");
|
|
115676
115770
|
var htmlConfig = {
|
|
@@ -115695,7 +115789,10 @@ const require$$15$1 = _dll_debug;
|
|
|
115695
115789
|
},
|
|
115696
115790
|
enrichSpeech: 'deep',
|
|
115697
115791
|
InputJax: [new _tex.TeX(texConfig), mml],
|
|
115698
|
-
OutputJax: new _chtml.CHTML(htmlConfig)
|
|
115792
|
+
OutputJax: new _chtml.CHTML(htmlConfig),
|
|
115793
|
+
DomStrings: new _HTMLDomStrings.HTMLDomStrings({
|
|
115794
|
+
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'annotation', 'annotation-xml', 'mjx-assistive-mml', 'mjx-container']
|
|
115795
|
+
})
|
|
115699
115796
|
});
|
|
115700
115797
|
mml.setMmlFactory(customMmlFactory);
|
|
115701
115798
|
return html;
|