@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/element.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.
|
|
2
|
-
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.
|
|
1
|
+
import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.0/module/index.js";
|
|
2
|
+
import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.10.0/module/index.js";
|
|
3
3
|
function _mergeNamespaces(n, m) {
|
|
4
4
|
m.forEach(function (e) {
|
|
5
5
|
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
@@ -9894,7 +9894,7 @@ function quoteString(value) {
|
|
|
9894
9894
|
function has$1(collection, key) {
|
|
9895
9895
|
return isImmutable(collection) ? collection.has(key) : isDataStructure(collection) && hasOwnProperty$2.call(collection, key);
|
|
9896
9896
|
}
|
|
9897
|
-
function get$
|
|
9897
|
+
function get$2(collection, key, notSetValue) {
|
|
9898
9898
|
return isImmutable(collection) ? collection.get(key, notSetValue) : !has$1(collection, key) ? notSetValue : typeof collection.get === 'function' ? collection.get(key) : collection[key];
|
|
9899
9899
|
}
|
|
9900
9900
|
function shallowCopy(from) {
|
|
@@ -9966,7 +9966,7 @@ function updateInDeeply(inImmutable, existing, keyPath, i, notSetValue, updater)
|
|
|
9966
9966
|
throw new TypeError('Cannot update within non-data-structure value in path [' + keyPath.slice(0, i).map(quoteString) + ']: ' + existing);
|
|
9967
9967
|
}
|
|
9968
9968
|
var key = keyPath[i];
|
|
9969
|
-
var nextExisting = wasNotSet ? NOT_SET : get$
|
|
9969
|
+
var nextExisting = wasNotSet ? NOT_SET : get$2(existing, key, NOT_SET);
|
|
9970
9970
|
var nextUpdated = updateInDeeply(nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), nextExisting, keyPath, i + 1, notSetValue, updater);
|
|
9971
9971
|
return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? remove(existing, key) : set$h(wasNotSet ? inImmutable ? emptyMap() : {} : existing, key, nextUpdated);
|
|
9972
9972
|
}
|
|
@@ -11919,7 +11919,7 @@ function getIn$1(collection, searchKeyPath, notSetValue) {
|
|
|
11919
11919
|
var keyPath = coerceKeyPath(searchKeyPath);
|
|
11920
11920
|
var i = 0;
|
|
11921
11921
|
while (i !== keyPath.length) {
|
|
11922
|
-
collection = get$
|
|
11922
|
+
collection = get$2(collection, keyPath[i++], NOT_SET);
|
|
11923
11923
|
if (collection === NOT_SET) {
|
|
11924
11924
|
return notSetValue;
|
|
11925
11925
|
}
|
|
@@ -12795,7 +12795,7 @@ var Immutable$1 = {
|
|
|
12795
12795
|
isSet: isSet,
|
|
12796
12796
|
isOrderedSet: isOrderedSet,
|
|
12797
12797
|
isRecord: isRecord,
|
|
12798
|
-
get: get$
|
|
12798
|
+
get: get$2,
|
|
12799
12799
|
getIn: getIn$1,
|
|
12800
12800
|
has: has$1,
|
|
12801
12801
|
hasIn: hasIn$1,
|
|
@@ -12827,7 +12827,7 @@ var immutable_es = Object.freeze({
|
|
|
12827
12827
|
Set: Set$1,
|
|
12828
12828
|
Stack: Stack$2,
|
|
12829
12829
|
fromJS: fromJS,
|
|
12830
|
-
get: get$
|
|
12830
|
+
get: get$2,
|
|
12831
12831
|
getIn: getIn$1,
|
|
12832
12832
|
has: has$1,
|
|
12833
12833
|
hasIn: hasIn$1,
|
|
@@ -22215,6 +22215,45 @@ getDefaultExportFromCjs(nonIterableSpread.exports);
|
|
|
22215
22215
|
(module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22216
22216
|
})(toConsumableArray$1);
|
|
22217
22217
|
getDefaultExportFromCjs(toConsumableArray$1.exports);
|
|
22218
|
+
var get$1 = {
|
|
22219
|
+
exports: {}
|
|
22220
|
+
};
|
|
22221
|
+
var superPropBase = {
|
|
22222
|
+
exports: {}
|
|
22223
|
+
};
|
|
22224
|
+
(function (module) {
|
|
22225
|
+
var getPrototypeOf = getPrototypeOf$1.exports;
|
|
22226
|
+
function _superPropBase(object, property) {
|
|
22227
|
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
22228
|
+
object = getPrototypeOf(object);
|
|
22229
|
+
if (object === null) break;
|
|
22230
|
+
}
|
|
22231
|
+
return object;
|
|
22232
|
+
}
|
|
22233
|
+
(module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22234
|
+
})(superPropBase);
|
|
22235
|
+
getDefaultExportFromCjs(superPropBase.exports);
|
|
22236
|
+
(function (module) {
|
|
22237
|
+
var superPropBase$1 = superPropBase.exports;
|
|
22238
|
+
function _get() {
|
|
22239
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
22240
|
+
(module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22241
|
+
} else {
|
|
22242
|
+
(module.exports = _get = function _get(target, property, receiver) {
|
|
22243
|
+
var base = superPropBase$1(target, property);
|
|
22244
|
+
if (!base) return;
|
|
22245
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
22246
|
+
if (desc.get) {
|
|
22247
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
22248
|
+
}
|
|
22249
|
+
return desc.value;
|
|
22250
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22251
|
+
}
|
|
22252
|
+
return _get.apply(this, arguments);
|
|
22253
|
+
}
|
|
22254
|
+
(module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22255
|
+
})(get$1);
|
|
22256
|
+
getDefaultExportFromCjs(get$1.exports);
|
|
22218
22257
|
var mathjax = {};
|
|
22219
22258
|
var version = {};
|
|
22220
22259
|
Object.defineProperty(version, "__esModule", {
|
|
@@ -51814,10 +51853,198 @@ function MenuHandler(handler) {
|
|
|
51814
51853
|
return handler;
|
|
51815
51854
|
}
|
|
51816
51855
|
MenuHandler$1.MenuHandler = MenuHandler;
|
|
51856
|
+
var FindMathML$1 = {};
|
|
51857
|
+
var FindMath = {};
|
|
51858
|
+
Object.defineProperty(FindMath, "__esModule", {
|
|
51859
|
+
value: true
|
|
51860
|
+
});
|
|
51861
|
+
FindMath.AbstractFindMath = void 0;
|
|
51862
|
+
var Options_js_1$d = Options$2;
|
|
51863
|
+
var AbstractFindMath = (function () {
|
|
51864
|
+
function AbstractFindMath(options) {
|
|
51865
|
+
var CLASS = this.constructor;
|
|
51866
|
+
this.options = (0, Options_js_1$d.userOptions)((0, Options_js_1$d.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
51867
|
+
}
|
|
51868
|
+
AbstractFindMath.OPTIONS = {};
|
|
51869
|
+
return AbstractFindMath;
|
|
51870
|
+
})();
|
|
51871
|
+
FindMath.AbstractFindMath = AbstractFindMath;
|
|
51872
|
+
var __extends$1K = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
51873
|
+
var extendStatics = function (d, b) {
|
|
51874
|
+
extendStatics = Object.setPrototypeOf || ({
|
|
51875
|
+
__proto__: []
|
|
51876
|
+
}) instanceof Array && (function (d, b) {
|
|
51877
|
+
d.__proto__ = b;
|
|
51878
|
+
}) || (function (d, b) {
|
|
51879
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
51880
|
+
});
|
|
51881
|
+
return extendStatics(d, b);
|
|
51882
|
+
};
|
|
51883
|
+
return function (d, b) {
|
|
51884
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
51885
|
+
extendStatics(d, b);
|
|
51886
|
+
function __() {
|
|
51887
|
+
this.constructor = d;
|
|
51888
|
+
}
|
|
51889
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51890
|
+
};
|
|
51891
|
+
})();
|
|
51892
|
+
var __values$G = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
51893
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
51894
|
+
if (m) return m.call(o);
|
|
51895
|
+
if (o && typeof o.length === "number") return {
|
|
51896
|
+
next: function () {
|
|
51897
|
+
if (o && i >= o.length) o = void 0;
|
|
51898
|
+
return {
|
|
51899
|
+
value: o && o[i++],
|
|
51900
|
+
done: !o
|
|
51901
|
+
};
|
|
51902
|
+
}
|
|
51903
|
+
};
|
|
51904
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51905
|
+
});
|
|
51906
|
+
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
51907
|
+
value: true
|
|
51908
|
+
});
|
|
51909
|
+
FindMathML$1.FindMathML = void 0;
|
|
51910
|
+
var FindMath_js_1$1 = FindMath;
|
|
51911
|
+
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
51912
|
+
var FindMathML = (function (_super) {
|
|
51913
|
+
__extends$1K(FindMathML, _super);
|
|
51914
|
+
function FindMathML() {
|
|
51915
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
51916
|
+
}
|
|
51917
|
+
FindMathML.prototype.findMath = function (node) {
|
|
51918
|
+
var set = new Set();
|
|
51919
|
+
this.findMathNodes(node, set);
|
|
51920
|
+
this.findMathPrefixed(node, set);
|
|
51921
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
51922
|
+
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
51923
|
+
this.findMathNS(node, set);
|
|
51924
|
+
}
|
|
51925
|
+
return this.processMath(set);
|
|
51926
|
+
};
|
|
51927
|
+
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
51928
|
+
var e_1, _a;
|
|
51929
|
+
try {
|
|
51930
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51931
|
+
var math = _c.value;
|
|
51932
|
+
set.add(math);
|
|
51933
|
+
}
|
|
51934
|
+
} catch (e_1_1) {
|
|
51935
|
+
e_1 = {
|
|
51936
|
+
error: e_1_1
|
|
51937
|
+
};
|
|
51938
|
+
} finally {
|
|
51939
|
+
try {
|
|
51940
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
51941
|
+
} finally {
|
|
51942
|
+
if (e_1) throw e_1.error;
|
|
51943
|
+
}
|
|
51944
|
+
}
|
|
51945
|
+
};
|
|
51946
|
+
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
51947
|
+
var e_2, _a, e_3, _b;
|
|
51948
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
51949
|
+
try {
|
|
51950
|
+
for (var _c = __values$G(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
51951
|
+
var attr = _d.value;
|
|
51952
|
+
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
51953
|
+
var prefix = attr.name.substr(6);
|
|
51954
|
+
try {
|
|
51955
|
+
for (var _e = (e_3 = void 0, __values$G(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
51956
|
+
var math = _f.value;
|
|
51957
|
+
set.add(math);
|
|
51958
|
+
}
|
|
51959
|
+
} catch (e_3_1) {
|
|
51960
|
+
e_3 = {
|
|
51961
|
+
error: e_3_1
|
|
51962
|
+
};
|
|
51963
|
+
} finally {
|
|
51964
|
+
try {
|
|
51965
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
51966
|
+
} finally {
|
|
51967
|
+
if (e_3) throw e_3.error;
|
|
51968
|
+
}
|
|
51969
|
+
}
|
|
51970
|
+
}
|
|
51971
|
+
}
|
|
51972
|
+
} catch (e_2_1) {
|
|
51973
|
+
e_2 = {
|
|
51974
|
+
error: e_2_1
|
|
51975
|
+
};
|
|
51976
|
+
} finally {
|
|
51977
|
+
try {
|
|
51978
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
51979
|
+
} finally {
|
|
51980
|
+
if (e_2) throw e_2.error;
|
|
51981
|
+
}
|
|
51982
|
+
}
|
|
51983
|
+
};
|
|
51984
|
+
FindMathML.prototype.findMathNS = function (node, set) {
|
|
51985
|
+
var e_4, _a;
|
|
51986
|
+
try {
|
|
51987
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51988
|
+
var math = _c.value;
|
|
51989
|
+
set.add(math);
|
|
51990
|
+
}
|
|
51991
|
+
} catch (e_4_1) {
|
|
51992
|
+
e_4 = {
|
|
51993
|
+
error: e_4_1
|
|
51994
|
+
};
|
|
51995
|
+
} finally {
|
|
51996
|
+
try {
|
|
51997
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
51998
|
+
} finally {
|
|
51999
|
+
if (e_4) throw e_4.error;
|
|
52000
|
+
}
|
|
52001
|
+
}
|
|
52002
|
+
};
|
|
52003
|
+
FindMathML.prototype.processMath = function (set) {
|
|
52004
|
+
var e_5, _a;
|
|
52005
|
+
var math = [];
|
|
52006
|
+
try {
|
|
52007
|
+
for (var _b = __values$G(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52008
|
+
var mml = _c.value;
|
|
52009
|
+
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
52010
|
+
var start = {
|
|
52011
|
+
node: mml,
|
|
52012
|
+
n: 0,
|
|
52013
|
+
delim: ''
|
|
52014
|
+
};
|
|
52015
|
+
var end = {
|
|
52016
|
+
node: mml,
|
|
52017
|
+
n: 0,
|
|
52018
|
+
delim: ''
|
|
52019
|
+
};
|
|
52020
|
+
math.push({
|
|
52021
|
+
math: this.adaptor.outerHTML(mml),
|
|
52022
|
+
start: start,
|
|
52023
|
+
end: end,
|
|
52024
|
+
display: display
|
|
52025
|
+
});
|
|
52026
|
+
}
|
|
52027
|
+
} catch (e_5_1) {
|
|
52028
|
+
e_5 = {
|
|
52029
|
+
error: e_5_1
|
|
52030
|
+
};
|
|
52031
|
+
} finally {
|
|
52032
|
+
try {
|
|
52033
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52034
|
+
} finally {
|
|
52035
|
+
if (e_5) throw e_5.error;
|
|
52036
|
+
}
|
|
52037
|
+
}
|
|
52038
|
+
return math;
|
|
52039
|
+
};
|
|
52040
|
+
FindMathML.OPTIONS = {};
|
|
52041
|
+
return FindMathML;
|
|
52042
|
+
})(FindMath_js_1$1.AbstractFindMath);
|
|
52043
|
+
FindMathML$1.FindMathML = FindMathML;
|
|
51817
52044
|
var mathml = {};
|
|
51818
52045
|
var InputJax = {};
|
|
51819
52046
|
var FunctionList$1 = {};
|
|
51820
|
-
var __extends$
|
|
52047
|
+
var __extends$1J = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
51821
52048
|
var extendStatics = function (d, b) {
|
|
51822
52049
|
extendStatics = Object.setPrototypeOf || ({
|
|
51823
52050
|
__proto__: []
|
|
@@ -51837,7 +52064,7 @@ var __extends$1K = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
|
51837
52064
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51838
52065
|
};
|
|
51839
52066
|
})();
|
|
51840
|
-
var __values$
|
|
52067
|
+
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
51841
52068
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
51842
52069
|
if (m) return m.call(o);
|
|
51843
52070
|
if (o && typeof o.length === "number") return {
|
|
@@ -51885,7 +52112,7 @@ Object.defineProperty(FunctionList$1, "__esModule", {
|
|
|
51885
52112
|
FunctionList$1.FunctionList = void 0;
|
|
51886
52113
|
var PrioritizedList_js_1 = PrioritizedList$1;
|
|
51887
52114
|
var FunctionList = (function (_super) {
|
|
51888
|
-
__extends$
|
|
52115
|
+
__extends$1J(FunctionList, _super);
|
|
51889
52116
|
function FunctionList() {
|
|
51890
52117
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
51891
52118
|
}
|
|
@@ -51896,7 +52123,7 @@ var FunctionList = (function (_super) {
|
|
|
51896
52123
|
data[_i] = arguments[_i];
|
|
51897
52124
|
}
|
|
51898
52125
|
try {
|
|
51899
|
-
for (var _b = __values$
|
|
52126
|
+
for (var _b = __values$F(this), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51900
52127
|
var item = _c.value;
|
|
51901
52128
|
var result = item.item.apply(item, __spreadArray$s([], __read$P(data), false));
|
|
51902
52129
|
if (result === false) {
|
|
@@ -51950,7 +52177,7 @@ Object.defineProperty(InputJax, "__esModule", {
|
|
|
51950
52177
|
value: true
|
|
51951
52178
|
});
|
|
51952
52179
|
InputJax.AbstractInputJax = void 0;
|
|
51953
|
-
var Options_js_1$
|
|
52180
|
+
var Options_js_1$c = Options$2;
|
|
51954
52181
|
var FunctionList_js_1$2 = FunctionList$1;
|
|
51955
52182
|
var AbstractInputJax = (function () {
|
|
51956
52183
|
function AbstractInputJax(options) {
|
|
@@ -51960,7 +52187,7 @@ var AbstractInputJax = (function () {
|
|
|
51960
52187
|
this.adaptor = null;
|
|
51961
52188
|
this.mmlFactory = null;
|
|
51962
52189
|
var CLASS = this.constructor;
|
|
51963
|
-
this.options = (0, Options_js_1$
|
|
52190
|
+
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
51964
52191
|
this.preFilters = new FunctionList_js_1$2.FunctionList();
|
|
51965
52192
|
this.postFilters = new FunctionList_js_1$2.FunctionList();
|
|
51966
52193
|
}
|
|
@@ -52008,194 +52235,6 @@ var AbstractInputJax = (function () {
|
|
|
52008
52235
|
return AbstractInputJax;
|
|
52009
52236
|
})();
|
|
52010
52237
|
InputJax.AbstractInputJax = AbstractInputJax;
|
|
52011
|
-
var FindMathML$1 = {};
|
|
52012
|
-
var FindMath = {};
|
|
52013
|
-
Object.defineProperty(FindMath, "__esModule", {
|
|
52014
|
-
value: true
|
|
52015
|
-
});
|
|
52016
|
-
FindMath.AbstractFindMath = void 0;
|
|
52017
|
-
var Options_js_1$c = Options$2;
|
|
52018
|
-
var AbstractFindMath = (function () {
|
|
52019
|
-
function AbstractFindMath(options) {
|
|
52020
|
-
var CLASS = this.constructor;
|
|
52021
|
-
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
52022
|
-
}
|
|
52023
|
-
AbstractFindMath.OPTIONS = {};
|
|
52024
|
-
return AbstractFindMath;
|
|
52025
|
-
})();
|
|
52026
|
-
FindMath.AbstractFindMath = AbstractFindMath;
|
|
52027
|
-
var __extends$1J = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
52028
|
-
var extendStatics = function (d, b) {
|
|
52029
|
-
extendStatics = Object.setPrototypeOf || ({
|
|
52030
|
-
__proto__: []
|
|
52031
|
-
}) instanceof Array && (function (d, b) {
|
|
52032
|
-
d.__proto__ = b;
|
|
52033
|
-
}) || (function (d, b) {
|
|
52034
|
-
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
52035
|
-
});
|
|
52036
|
-
return extendStatics(d, b);
|
|
52037
|
-
};
|
|
52038
|
-
return function (d, b) {
|
|
52039
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
52040
|
-
extendStatics(d, b);
|
|
52041
|
-
function __() {
|
|
52042
|
-
this.constructor = d;
|
|
52043
|
-
}
|
|
52044
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
52045
|
-
};
|
|
52046
|
-
})();
|
|
52047
|
-
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
52048
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
52049
|
-
if (m) return m.call(o);
|
|
52050
|
-
if (o && typeof o.length === "number") return {
|
|
52051
|
-
next: function () {
|
|
52052
|
-
if (o && i >= o.length) o = void 0;
|
|
52053
|
-
return {
|
|
52054
|
-
value: o && o[i++],
|
|
52055
|
-
done: !o
|
|
52056
|
-
};
|
|
52057
|
-
}
|
|
52058
|
-
};
|
|
52059
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52060
|
-
});
|
|
52061
|
-
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
52062
|
-
value: true
|
|
52063
|
-
});
|
|
52064
|
-
FindMathML$1.FindMathML = void 0;
|
|
52065
|
-
var FindMath_js_1$1 = FindMath;
|
|
52066
|
-
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
52067
|
-
var FindMathML = (function (_super) {
|
|
52068
|
-
__extends$1J(FindMathML, _super);
|
|
52069
|
-
function FindMathML() {
|
|
52070
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
52071
|
-
}
|
|
52072
|
-
FindMathML.prototype.findMath = function (node) {
|
|
52073
|
-
var set = new Set();
|
|
52074
|
-
this.findMathNodes(node, set);
|
|
52075
|
-
this.findMathPrefixed(node, set);
|
|
52076
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
52077
|
-
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
52078
|
-
this.findMathNS(node, set);
|
|
52079
|
-
}
|
|
52080
|
-
return this.processMath(set);
|
|
52081
|
-
};
|
|
52082
|
-
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
52083
|
-
var e_1, _a;
|
|
52084
|
-
try {
|
|
52085
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52086
|
-
var math = _c.value;
|
|
52087
|
-
set.add(math);
|
|
52088
|
-
}
|
|
52089
|
-
} catch (e_1_1) {
|
|
52090
|
-
e_1 = {
|
|
52091
|
-
error: e_1_1
|
|
52092
|
-
};
|
|
52093
|
-
} finally {
|
|
52094
|
-
try {
|
|
52095
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52096
|
-
} finally {
|
|
52097
|
-
if (e_1) throw e_1.error;
|
|
52098
|
-
}
|
|
52099
|
-
}
|
|
52100
|
-
};
|
|
52101
|
-
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
52102
|
-
var e_2, _a, e_3, _b;
|
|
52103
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
52104
|
-
try {
|
|
52105
|
-
for (var _c = __values$F(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
52106
|
-
var attr = _d.value;
|
|
52107
|
-
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
52108
|
-
var prefix = attr.name.substr(6);
|
|
52109
|
-
try {
|
|
52110
|
-
for (var _e = (e_3 = void 0, __values$F(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
52111
|
-
var math = _f.value;
|
|
52112
|
-
set.add(math);
|
|
52113
|
-
}
|
|
52114
|
-
} catch (e_3_1) {
|
|
52115
|
-
e_3 = {
|
|
52116
|
-
error: e_3_1
|
|
52117
|
-
};
|
|
52118
|
-
} finally {
|
|
52119
|
-
try {
|
|
52120
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
52121
|
-
} finally {
|
|
52122
|
-
if (e_3) throw e_3.error;
|
|
52123
|
-
}
|
|
52124
|
-
}
|
|
52125
|
-
}
|
|
52126
|
-
}
|
|
52127
|
-
} catch (e_2_1) {
|
|
52128
|
-
e_2 = {
|
|
52129
|
-
error: e_2_1
|
|
52130
|
-
};
|
|
52131
|
-
} finally {
|
|
52132
|
-
try {
|
|
52133
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
52134
|
-
} finally {
|
|
52135
|
-
if (e_2) throw e_2.error;
|
|
52136
|
-
}
|
|
52137
|
-
}
|
|
52138
|
-
};
|
|
52139
|
-
FindMathML.prototype.findMathNS = function (node, set) {
|
|
52140
|
-
var e_4, _a;
|
|
52141
|
-
try {
|
|
52142
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52143
|
-
var math = _c.value;
|
|
52144
|
-
set.add(math);
|
|
52145
|
-
}
|
|
52146
|
-
} catch (e_4_1) {
|
|
52147
|
-
e_4 = {
|
|
52148
|
-
error: e_4_1
|
|
52149
|
-
};
|
|
52150
|
-
} finally {
|
|
52151
|
-
try {
|
|
52152
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52153
|
-
} finally {
|
|
52154
|
-
if (e_4) throw e_4.error;
|
|
52155
|
-
}
|
|
52156
|
-
}
|
|
52157
|
-
};
|
|
52158
|
-
FindMathML.prototype.processMath = function (set) {
|
|
52159
|
-
var e_5, _a;
|
|
52160
|
-
var math = [];
|
|
52161
|
-
try {
|
|
52162
|
-
for (var _b = __values$F(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52163
|
-
var mml = _c.value;
|
|
52164
|
-
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
52165
|
-
var start = {
|
|
52166
|
-
node: mml,
|
|
52167
|
-
n: 0,
|
|
52168
|
-
delim: ''
|
|
52169
|
-
};
|
|
52170
|
-
var end = {
|
|
52171
|
-
node: mml,
|
|
52172
|
-
n: 0,
|
|
52173
|
-
delim: ''
|
|
52174
|
-
};
|
|
52175
|
-
math.push({
|
|
52176
|
-
math: this.adaptor.outerHTML(mml),
|
|
52177
|
-
start: start,
|
|
52178
|
-
end: end,
|
|
52179
|
-
display: display
|
|
52180
|
-
});
|
|
52181
|
-
}
|
|
52182
|
-
} catch (e_5_1) {
|
|
52183
|
-
e_5 = {
|
|
52184
|
-
error: e_5_1
|
|
52185
|
-
};
|
|
52186
|
-
} finally {
|
|
52187
|
-
try {
|
|
52188
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52189
|
-
} finally {
|
|
52190
|
-
if (e_5) throw e_5.error;
|
|
52191
|
-
}
|
|
52192
|
-
}
|
|
52193
|
-
return math;
|
|
52194
|
-
};
|
|
52195
|
-
FindMathML.OPTIONS = {};
|
|
52196
|
-
return FindMathML;
|
|
52197
|
-
})(FindMath_js_1$1.AbstractFindMath);
|
|
52198
|
-
FindMathML$1.FindMathML = FindMathML;
|
|
52199
52238
|
var MathMLCompile$1 = {};
|
|
52200
52239
|
var Entities$1 = {};
|
|
52201
52240
|
var AsyncLoad = {};
|
|
@@ -94787,7 +94826,7 @@ var unWrapMath = function unWrapMath(content) {
|
|
|
94787
94826
|
};
|
|
94788
94827
|
};
|
|
94789
94828
|
normalization.unWrapMath = unWrapMath;
|
|
94790
|
-
const require$$
|
|
94829
|
+
const require$$22$2 = _dll_debug;
|
|
94791
94830
|
(function (exports) {
|
|
94792
94831
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
94793
94832
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -94797,10 +94836,17 @@ const require$$15$4 = _dll_debug;
|
|
|
94797
94836
|
var _toConsumableArray2 = _interopRequireDefault(toConsumableArray$1.exports);
|
|
94798
94837
|
var _typeof2 = _interopRequireDefault(_typeof$e.exports);
|
|
94799
94838
|
var _defineProperty2 = _interopRequireDefault(defineProperty$5.exports);
|
|
94839
|
+
var _classCallCheck2 = _interopRequireDefault(classCallCheck$4.exports);
|
|
94840
|
+
var _createClass2 = _interopRequireDefault(createClass$3.exports);
|
|
94841
|
+
var _get2 = _interopRequireDefault(get$1.exports);
|
|
94842
|
+
var _inherits2 = _interopRequireDefault(inherits$2.exports);
|
|
94843
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(possibleConstructorReturn$2.exports);
|
|
94844
|
+
var _getPrototypeOf2 = _interopRequireDefault(getPrototypeOf$1.exports);
|
|
94800
94845
|
var _mathjax = mathjax;
|
|
94801
94846
|
var _assistiveMml = assistiveMml;
|
|
94802
94847
|
var _semanticEnrich = semanticEnrich;
|
|
94803
94848
|
var _MenuHandler = MenuHandler$1;
|
|
94849
|
+
var _FindMathML2 = FindMathML$1;
|
|
94804
94850
|
var _mathml = mathml;
|
|
94805
94851
|
var _tex = tex$2;
|
|
94806
94852
|
var _chtml = chtml$1;
|
|
@@ -94808,12 +94854,13 @@ const require$$15$4 = _dll_debug;
|
|
|
94808
94854
|
var _browserAdaptor = browserAdaptor$1;
|
|
94809
94855
|
var _AllPackages = AllPackages;
|
|
94810
94856
|
var _mstack = mstack;
|
|
94811
|
-
var _debug = _interopRequireDefault(require$$
|
|
94857
|
+
var _debug = _interopRequireDefault(require$$22$2);
|
|
94812
94858
|
var _normalization = normalization;
|
|
94813
94859
|
var _MmlFactory = MmlFactory$1;
|
|
94814
94860
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
94815
94861
|
var _WrapperFactory = WrapperFactory$2;
|
|
94816
94862
|
var _mspace = mspace$1;
|
|
94863
|
+
var _HTMLDomStrings = HTMLDomStrings$1;
|
|
94817
94864
|
function ownKeys(object, enumerableOnly) {
|
|
94818
94865
|
var keys = Object.keys(object);
|
|
94819
94866
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -94835,6 +94882,30 @@ const require$$15$4 = _dll_debug;
|
|
|
94835
94882
|
}
|
|
94836
94883
|
return target;
|
|
94837
94884
|
}
|
|
94885
|
+
function _createSuper(Derived) {
|
|
94886
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
94887
|
+
return function _createSuperInternal() {
|
|
94888
|
+
var Super = (0, _getPrototypeOf2["default"])(Derived), result;
|
|
94889
|
+
if (hasNativeReflectConstruct) {
|
|
94890
|
+
var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor;
|
|
94891
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
94892
|
+
} else {
|
|
94893
|
+
result = Super.apply(this, arguments);
|
|
94894
|
+
}
|
|
94895
|
+
return (0, _possibleConstructorReturn2["default"])(this, result);
|
|
94896
|
+
};
|
|
94897
|
+
}
|
|
94898
|
+
function _isNativeReflectConstruct() {
|
|
94899
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
94900
|
+
if (Reflect.construct.sham) return false;
|
|
94901
|
+
if (typeof Proxy === "function") return true;
|
|
94902
|
+
try {
|
|
94903
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
94904
|
+
return true;
|
|
94905
|
+
} catch (e) {
|
|
94906
|
+
return false;
|
|
94907
|
+
}
|
|
94908
|
+
}
|
|
94838
94909
|
if (typeof window !== 'undefined') {
|
|
94839
94910
|
(0, _html.RegisterHTMLHandler)((0, _browserAdaptor.browserAdaptor)());
|
|
94840
94911
|
}
|
|
@@ -94889,6 +94960,28 @@ const require$$15$4 = _dll_debug;
|
|
|
94889
94960
|
return node.setAttribute('displaystyle', 'true');
|
|
94890
94961
|
});
|
|
94891
94962
|
};
|
|
94963
|
+
var myFindMathML = (function (_FindMathML) {
|
|
94964
|
+
(0, _inherits2["default"])(myFindMathML, _FindMathML);
|
|
94965
|
+
var _super = _createSuper(myFindMathML);
|
|
94966
|
+
function myFindMathML() {
|
|
94967
|
+
(0, _classCallCheck2["default"])(this, myFindMathML);
|
|
94968
|
+
return _super.apply(this, arguments);
|
|
94969
|
+
}
|
|
94970
|
+
(0, _createClass2["default"])(myFindMathML, [{
|
|
94971
|
+
key: "processMath",
|
|
94972
|
+
value: function processMath(set) {
|
|
94973
|
+
var adaptor = this.adaptor;
|
|
94974
|
+
for (var _i = 0, _Array$from = Array.from(set); _i < _Array$from.length; _i++) {
|
|
94975
|
+
var mml = _Array$from[_i];
|
|
94976
|
+
if (adaptor.kind(adaptor.parent(mml)) === 'mjx-assistive-mml') {
|
|
94977
|
+
set["delete"](mml);
|
|
94978
|
+
}
|
|
94979
|
+
}
|
|
94980
|
+
return (0, _get2["default"])((0, _getPrototypeOf2["default"])(myFindMathML.prototype), "processMath", this).call(this, set);
|
|
94981
|
+
}
|
|
94982
|
+
}]);
|
|
94983
|
+
return myFindMathML;
|
|
94984
|
+
})(_FindMathML2.FindMathML);
|
|
94892
94985
|
var createMathMLInstance = function createMathMLInstance(opts) {
|
|
94893
94986
|
var docProvided = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
|
|
94894
94987
|
opts = opts || defaultOpts();
|
|
@@ -94918,7 +95011,8 @@ const require$$15$4 = _dll_debug;
|
|
|
94918
95011
|
parseError: function parseError(node) {
|
|
94919
95012
|
console.log('error:', node);
|
|
94920
95013
|
this.error(this.adaptor.textContent(node).replace(/\n.*/g, ''));
|
|
94921
|
-
}
|
|
95014
|
+
},
|
|
95015
|
+
FindMathML: new myFindMathML()
|
|
94922
95016
|
};
|
|
94923
95017
|
var fontURL = ("https://unpkg.com/mathjax-full@").concat(_mathjax.mathjax.version, "/ts/output/chtml/fonts/tex-woff-v2");
|
|
94924
95018
|
var htmlConfig = {
|
|
@@ -94943,7 +95037,10 @@ const require$$15$4 = _dll_debug;
|
|
|
94943
95037
|
},
|
|
94944
95038
|
enrichSpeech: 'deep',
|
|
94945
95039
|
InputJax: [new _tex.TeX(texConfig), mml],
|
|
94946
|
-
OutputJax: new _chtml.CHTML(htmlConfig)
|
|
95040
|
+
OutputJax: new _chtml.CHTML(htmlConfig),
|
|
95041
|
+
DomStrings: new _HTMLDomStrings.HTMLDomStrings({
|
|
95042
|
+
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'annotation', 'annotation-xml', 'mjx-assistive-mml', 'mjx-container']
|
|
95043
|
+
})
|
|
94947
95044
|
});
|
|
94948
95045
|
mml.setMmlFactory(customMmlFactory);
|
|
94949
95046
|
return html;
|
package/module/manifest.json
CHANGED