@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/print.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) {
|
|
@@ -9857,7 +9857,7 @@ function quoteString(value) {
|
|
|
9857
9857
|
function has$1(collection, key) {
|
|
9858
9858
|
return isImmutable(collection) ? collection.has(key) : isDataStructure(collection) && hasOwnProperty$2.call(collection, key);
|
|
9859
9859
|
}
|
|
9860
|
-
function get$
|
|
9860
|
+
function get$2(collection, key, notSetValue) {
|
|
9861
9861
|
return isImmutable(collection) ? collection.get(key, notSetValue) : !has$1(collection, key) ? notSetValue : typeof collection.get === 'function' ? collection.get(key) : collection[key];
|
|
9862
9862
|
}
|
|
9863
9863
|
function shallowCopy(from) {
|
|
@@ -9929,7 +9929,7 @@ function updateInDeeply(inImmutable, existing, keyPath, i, notSetValue, updater)
|
|
|
9929
9929
|
throw new TypeError('Cannot update within non-data-structure value in path [' + keyPath.slice(0, i).map(quoteString) + ']: ' + existing);
|
|
9930
9930
|
}
|
|
9931
9931
|
var key = keyPath[i];
|
|
9932
|
-
var nextExisting = wasNotSet ? NOT_SET : get$
|
|
9932
|
+
var nextExisting = wasNotSet ? NOT_SET : get$2(existing, key, NOT_SET);
|
|
9933
9933
|
var nextUpdated = updateInDeeply(nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting), nextExisting, keyPath, i + 1, notSetValue, updater);
|
|
9934
9934
|
return nextUpdated === nextExisting ? existing : nextUpdated === NOT_SET ? remove(existing, key) : set$h(wasNotSet ? inImmutable ? emptyMap() : {} : existing, key, nextUpdated);
|
|
9935
9935
|
}
|
|
@@ -11882,7 +11882,7 @@ function getIn$1(collection, searchKeyPath, notSetValue) {
|
|
|
11882
11882
|
var keyPath = coerceKeyPath(searchKeyPath);
|
|
11883
11883
|
var i = 0;
|
|
11884
11884
|
while (i !== keyPath.length) {
|
|
11885
|
-
collection = get$
|
|
11885
|
+
collection = get$2(collection, keyPath[i++], NOT_SET);
|
|
11886
11886
|
if (collection === NOT_SET) {
|
|
11887
11887
|
return notSetValue;
|
|
11888
11888
|
}
|
|
@@ -12758,7 +12758,7 @@ var Immutable$1 = {
|
|
|
12758
12758
|
isSet: isSet,
|
|
12759
12759
|
isOrderedSet: isOrderedSet,
|
|
12760
12760
|
isRecord: isRecord,
|
|
12761
|
-
get: get$
|
|
12761
|
+
get: get$2,
|
|
12762
12762
|
getIn: getIn$1,
|
|
12763
12763
|
has: has$1,
|
|
12764
12764
|
hasIn: hasIn$1,
|
|
@@ -12790,7 +12790,7 @@ var immutable_es = Object.freeze({
|
|
|
12790
12790
|
Set: Set$1,
|
|
12791
12791
|
Stack: Stack$2,
|
|
12792
12792
|
fromJS: fromJS,
|
|
12793
|
-
get: get$
|
|
12793
|
+
get: get$2,
|
|
12794
12794
|
getIn: getIn$1,
|
|
12795
12795
|
has: has$1,
|
|
12796
12796
|
hasIn: hasIn$1,
|
|
@@ -22178,6 +22178,45 @@ getDefaultExportFromCjs(nonIterableSpread.exports);
|
|
|
22178
22178
|
(module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22179
22179
|
})(toConsumableArray$1);
|
|
22180
22180
|
getDefaultExportFromCjs(toConsumableArray$1.exports);
|
|
22181
|
+
var get$1 = {
|
|
22182
|
+
exports: {}
|
|
22183
|
+
};
|
|
22184
|
+
var superPropBase = {
|
|
22185
|
+
exports: {}
|
|
22186
|
+
};
|
|
22187
|
+
(function (module) {
|
|
22188
|
+
var getPrototypeOf = getPrototypeOf$1.exports;
|
|
22189
|
+
function _superPropBase(object, property) {
|
|
22190
|
+
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
22191
|
+
object = getPrototypeOf(object);
|
|
22192
|
+
if (object === null) break;
|
|
22193
|
+
}
|
|
22194
|
+
return object;
|
|
22195
|
+
}
|
|
22196
|
+
(module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22197
|
+
})(superPropBase);
|
|
22198
|
+
getDefaultExportFromCjs(superPropBase.exports);
|
|
22199
|
+
(function (module) {
|
|
22200
|
+
var superPropBase$1 = superPropBase.exports;
|
|
22201
|
+
function _get() {
|
|
22202
|
+
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
22203
|
+
(module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22204
|
+
} else {
|
|
22205
|
+
(module.exports = _get = function _get(target, property, receiver) {
|
|
22206
|
+
var base = superPropBase$1(target, property);
|
|
22207
|
+
if (!base) return;
|
|
22208
|
+
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
22209
|
+
if (desc.get) {
|
|
22210
|
+
return desc.get.call(arguments.length < 3 ? target : receiver);
|
|
22211
|
+
}
|
|
22212
|
+
return desc.value;
|
|
22213
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22214
|
+
}
|
|
22215
|
+
return _get.apply(this, arguments);
|
|
22216
|
+
}
|
|
22217
|
+
(module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports);
|
|
22218
|
+
})(get$1);
|
|
22219
|
+
getDefaultExportFromCjs(get$1.exports);
|
|
22181
22220
|
var mathjax = {};
|
|
22182
22221
|
var version = {};
|
|
22183
22222
|
Object.defineProperty(version, "__esModule", {
|
|
@@ -51777,10 +51816,198 @@ function MenuHandler(handler) {
|
|
|
51777
51816
|
return handler;
|
|
51778
51817
|
}
|
|
51779
51818
|
MenuHandler$1.MenuHandler = MenuHandler;
|
|
51819
|
+
var FindMathML$1 = {};
|
|
51820
|
+
var FindMath = {};
|
|
51821
|
+
Object.defineProperty(FindMath, "__esModule", {
|
|
51822
|
+
value: true
|
|
51823
|
+
});
|
|
51824
|
+
FindMath.AbstractFindMath = void 0;
|
|
51825
|
+
var Options_js_1$d = Options$2;
|
|
51826
|
+
var AbstractFindMath = (function () {
|
|
51827
|
+
function AbstractFindMath(options) {
|
|
51828
|
+
var CLASS = this.constructor;
|
|
51829
|
+
this.options = (0, Options_js_1$d.userOptions)((0, Options_js_1$d.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
51830
|
+
}
|
|
51831
|
+
AbstractFindMath.OPTIONS = {};
|
|
51832
|
+
return AbstractFindMath;
|
|
51833
|
+
})();
|
|
51834
|
+
FindMath.AbstractFindMath = AbstractFindMath;
|
|
51835
|
+
var __extends$1K = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
51836
|
+
var extendStatics = function (d, b) {
|
|
51837
|
+
extendStatics = Object.setPrototypeOf || ({
|
|
51838
|
+
__proto__: []
|
|
51839
|
+
}) instanceof Array && (function (d, b) {
|
|
51840
|
+
d.__proto__ = b;
|
|
51841
|
+
}) || (function (d, b) {
|
|
51842
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
51843
|
+
});
|
|
51844
|
+
return extendStatics(d, b);
|
|
51845
|
+
};
|
|
51846
|
+
return function (d, b) {
|
|
51847
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
51848
|
+
extendStatics(d, b);
|
|
51849
|
+
function __() {
|
|
51850
|
+
this.constructor = d;
|
|
51851
|
+
}
|
|
51852
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51853
|
+
};
|
|
51854
|
+
})();
|
|
51855
|
+
var __values$G = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
51856
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
51857
|
+
if (m) return m.call(o);
|
|
51858
|
+
if (o && typeof o.length === "number") return {
|
|
51859
|
+
next: function () {
|
|
51860
|
+
if (o && i >= o.length) o = void 0;
|
|
51861
|
+
return {
|
|
51862
|
+
value: o && o[i++],
|
|
51863
|
+
done: !o
|
|
51864
|
+
};
|
|
51865
|
+
}
|
|
51866
|
+
};
|
|
51867
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
51868
|
+
});
|
|
51869
|
+
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
51870
|
+
value: true
|
|
51871
|
+
});
|
|
51872
|
+
FindMathML$1.FindMathML = void 0;
|
|
51873
|
+
var FindMath_js_1$1 = FindMath;
|
|
51874
|
+
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
51875
|
+
var FindMathML = (function (_super) {
|
|
51876
|
+
__extends$1K(FindMathML, _super);
|
|
51877
|
+
function FindMathML() {
|
|
51878
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
51879
|
+
}
|
|
51880
|
+
FindMathML.prototype.findMath = function (node) {
|
|
51881
|
+
var set = new Set();
|
|
51882
|
+
this.findMathNodes(node, set);
|
|
51883
|
+
this.findMathPrefixed(node, set);
|
|
51884
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
51885
|
+
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
51886
|
+
this.findMathNS(node, set);
|
|
51887
|
+
}
|
|
51888
|
+
return this.processMath(set);
|
|
51889
|
+
};
|
|
51890
|
+
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
51891
|
+
var e_1, _a;
|
|
51892
|
+
try {
|
|
51893
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51894
|
+
var math = _c.value;
|
|
51895
|
+
set.add(math);
|
|
51896
|
+
}
|
|
51897
|
+
} catch (e_1_1) {
|
|
51898
|
+
e_1 = {
|
|
51899
|
+
error: e_1_1
|
|
51900
|
+
};
|
|
51901
|
+
} finally {
|
|
51902
|
+
try {
|
|
51903
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
51904
|
+
} finally {
|
|
51905
|
+
if (e_1) throw e_1.error;
|
|
51906
|
+
}
|
|
51907
|
+
}
|
|
51908
|
+
};
|
|
51909
|
+
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
51910
|
+
var e_2, _a, e_3, _b;
|
|
51911
|
+
var html = this.adaptor.root(this.adaptor.document);
|
|
51912
|
+
try {
|
|
51913
|
+
for (var _c = __values$G(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
51914
|
+
var attr = _d.value;
|
|
51915
|
+
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
51916
|
+
var prefix = attr.name.substr(6);
|
|
51917
|
+
try {
|
|
51918
|
+
for (var _e = (e_3 = void 0, __values$G(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
51919
|
+
var math = _f.value;
|
|
51920
|
+
set.add(math);
|
|
51921
|
+
}
|
|
51922
|
+
} catch (e_3_1) {
|
|
51923
|
+
e_3 = {
|
|
51924
|
+
error: e_3_1
|
|
51925
|
+
};
|
|
51926
|
+
} finally {
|
|
51927
|
+
try {
|
|
51928
|
+
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
51929
|
+
} finally {
|
|
51930
|
+
if (e_3) throw e_3.error;
|
|
51931
|
+
}
|
|
51932
|
+
}
|
|
51933
|
+
}
|
|
51934
|
+
}
|
|
51935
|
+
} catch (e_2_1) {
|
|
51936
|
+
e_2 = {
|
|
51937
|
+
error: e_2_1
|
|
51938
|
+
};
|
|
51939
|
+
} finally {
|
|
51940
|
+
try {
|
|
51941
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
51942
|
+
} finally {
|
|
51943
|
+
if (e_2) throw e_2.error;
|
|
51944
|
+
}
|
|
51945
|
+
}
|
|
51946
|
+
};
|
|
51947
|
+
FindMathML.prototype.findMathNS = function (node, set) {
|
|
51948
|
+
var e_4, _a;
|
|
51949
|
+
try {
|
|
51950
|
+
for (var _b = __values$G(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51951
|
+
var math = _c.value;
|
|
51952
|
+
set.add(math);
|
|
51953
|
+
}
|
|
51954
|
+
} catch (e_4_1) {
|
|
51955
|
+
e_4 = {
|
|
51956
|
+
error: e_4_1
|
|
51957
|
+
};
|
|
51958
|
+
} finally {
|
|
51959
|
+
try {
|
|
51960
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
51961
|
+
} finally {
|
|
51962
|
+
if (e_4) throw e_4.error;
|
|
51963
|
+
}
|
|
51964
|
+
}
|
|
51965
|
+
};
|
|
51966
|
+
FindMathML.prototype.processMath = function (set) {
|
|
51967
|
+
var e_5, _a;
|
|
51968
|
+
var math = [];
|
|
51969
|
+
try {
|
|
51970
|
+
for (var _b = __values$G(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51971
|
+
var mml = _c.value;
|
|
51972
|
+
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
51973
|
+
var start = {
|
|
51974
|
+
node: mml,
|
|
51975
|
+
n: 0,
|
|
51976
|
+
delim: ''
|
|
51977
|
+
};
|
|
51978
|
+
var end = {
|
|
51979
|
+
node: mml,
|
|
51980
|
+
n: 0,
|
|
51981
|
+
delim: ''
|
|
51982
|
+
};
|
|
51983
|
+
math.push({
|
|
51984
|
+
math: this.adaptor.outerHTML(mml),
|
|
51985
|
+
start: start,
|
|
51986
|
+
end: end,
|
|
51987
|
+
display: display
|
|
51988
|
+
});
|
|
51989
|
+
}
|
|
51990
|
+
} catch (e_5_1) {
|
|
51991
|
+
e_5 = {
|
|
51992
|
+
error: e_5_1
|
|
51993
|
+
};
|
|
51994
|
+
} finally {
|
|
51995
|
+
try {
|
|
51996
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
51997
|
+
} finally {
|
|
51998
|
+
if (e_5) throw e_5.error;
|
|
51999
|
+
}
|
|
52000
|
+
}
|
|
52001
|
+
return math;
|
|
52002
|
+
};
|
|
52003
|
+
FindMathML.OPTIONS = {};
|
|
52004
|
+
return FindMathML;
|
|
52005
|
+
})(FindMath_js_1$1.AbstractFindMath);
|
|
52006
|
+
FindMathML$1.FindMathML = FindMathML;
|
|
51780
52007
|
var mathml = {};
|
|
51781
52008
|
var InputJax = {};
|
|
51782
52009
|
var FunctionList$1 = {};
|
|
51783
|
-
var __extends$
|
|
52010
|
+
var __extends$1J = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
51784
52011
|
var extendStatics = function (d, b) {
|
|
51785
52012
|
extendStatics = Object.setPrototypeOf || ({
|
|
51786
52013
|
__proto__: []
|
|
@@ -51800,7 +52027,7 @@ var __extends$1K = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
|
51800
52027
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
51801
52028
|
};
|
|
51802
52029
|
})();
|
|
51803
|
-
var __values$
|
|
52030
|
+
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
51804
52031
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
51805
52032
|
if (m) return m.call(o);
|
|
51806
52033
|
if (o && typeof o.length === "number") return {
|
|
@@ -51848,7 +52075,7 @@ Object.defineProperty(FunctionList$1, "__esModule", {
|
|
|
51848
52075
|
FunctionList$1.FunctionList = void 0;
|
|
51849
52076
|
var PrioritizedList_js_1 = PrioritizedList$1;
|
|
51850
52077
|
var FunctionList = (function (_super) {
|
|
51851
|
-
__extends$
|
|
52078
|
+
__extends$1J(FunctionList, _super);
|
|
51852
52079
|
function FunctionList() {
|
|
51853
52080
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
51854
52081
|
}
|
|
@@ -51859,7 +52086,7 @@ var FunctionList = (function (_super) {
|
|
|
51859
52086
|
data[_i] = arguments[_i];
|
|
51860
52087
|
}
|
|
51861
52088
|
try {
|
|
51862
|
-
for (var _b = __values$
|
|
52089
|
+
for (var _b = __values$F(this), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
51863
52090
|
var item = _c.value;
|
|
51864
52091
|
var result = item.item.apply(item, __spreadArray$s([], __read$P(data), false));
|
|
51865
52092
|
if (result === false) {
|
|
@@ -51913,7 +52140,7 @@ Object.defineProperty(InputJax, "__esModule", {
|
|
|
51913
52140
|
value: true
|
|
51914
52141
|
});
|
|
51915
52142
|
InputJax.AbstractInputJax = void 0;
|
|
51916
|
-
var Options_js_1$
|
|
52143
|
+
var Options_js_1$c = Options$2;
|
|
51917
52144
|
var FunctionList_js_1$2 = FunctionList$1;
|
|
51918
52145
|
var AbstractInputJax = (function () {
|
|
51919
52146
|
function AbstractInputJax(options) {
|
|
@@ -51923,7 +52150,7 @@ var AbstractInputJax = (function () {
|
|
|
51923
52150
|
this.adaptor = null;
|
|
51924
52151
|
this.mmlFactory = null;
|
|
51925
52152
|
var CLASS = this.constructor;
|
|
51926
|
-
this.options = (0, Options_js_1$
|
|
52153
|
+
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
51927
52154
|
this.preFilters = new FunctionList_js_1$2.FunctionList();
|
|
51928
52155
|
this.postFilters = new FunctionList_js_1$2.FunctionList();
|
|
51929
52156
|
}
|
|
@@ -51971,194 +52198,6 @@ var AbstractInputJax = (function () {
|
|
|
51971
52198
|
return AbstractInputJax;
|
|
51972
52199
|
})();
|
|
51973
52200
|
InputJax.AbstractInputJax = AbstractInputJax;
|
|
51974
|
-
var FindMathML$1 = {};
|
|
51975
|
-
var FindMath = {};
|
|
51976
|
-
Object.defineProperty(FindMath, "__esModule", {
|
|
51977
|
-
value: true
|
|
51978
|
-
});
|
|
51979
|
-
FindMath.AbstractFindMath = void 0;
|
|
51980
|
-
var Options_js_1$c = Options$2;
|
|
51981
|
-
var AbstractFindMath = (function () {
|
|
51982
|
-
function AbstractFindMath(options) {
|
|
51983
|
-
var CLASS = this.constructor;
|
|
51984
|
-
this.options = (0, Options_js_1$c.userOptions)((0, Options_js_1$c.defaultOptions)({}, CLASS.OPTIONS), options);
|
|
51985
|
-
}
|
|
51986
|
-
AbstractFindMath.OPTIONS = {};
|
|
51987
|
-
return AbstractFindMath;
|
|
51988
|
-
})();
|
|
51989
|
-
FindMath.AbstractFindMath = AbstractFindMath;
|
|
51990
|
-
var __extends$1J = commonjsGlobal && commonjsGlobal.__extends || (function () {
|
|
51991
|
-
var extendStatics = function (d, b) {
|
|
51992
|
-
extendStatics = Object.setPrototypeOf || ({
|
|
51993
|
-
__proto__: []
|
|
51994
|
-
}) instanceof Array && (function (d, b) {
|
|
51995
|
-
d.__proto__ = b;
|
|
51996
|
-
}) || (function (d, b) {
|
|
51997
|
-
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
51998
|
-
});
|
|
51999
|
-
return extendStatics(d, b);
|
|
52000
|
-
};
|
|
52001
|
-
return function (d, b) {
|
|
52002
|
-
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
52003
|
-
extendStatics(d, b);
|
|
52004
|
-
function __() {
|
|
52005
|
-
this.constructor = d;
|
|
52006
|
-
}
|
|
52007
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
52008
|
-
};
|
|
52009
|
-
})();
|
|
52010
|
-
var __values$F = commonjsGlobal && commonjsGlobal.__values || (function (o) {
|
|
52011
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
52012
|
-
if (m) return m.call(o);
|
|
52013
|
-
if (o && typeof o.length === "number") return {
|
|
52014
|
-
next: function () {
|
|
52015
|
-
if (o && i >= o.length) o = void 0;
|
|
52016
|
-
return {
|
|
52017
|
-
value: o && o[i++],
|
|
52018
|
-
done: !o
|
|
52019
|
-
};
|
|
52020
|
-
}
|
|
52021
|
-
};
|
|
52022
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
52023
|
-
});
|
|
52024
|
-
Object.defineProperty(FindMathML$1, "__esModule", {
|
|
52025
|
-
value: true
|
|
52026
|
-
});
|
|
52027
|
-
FindMathML$1.FindMathML = void 0;
|
|
52028
|
-
var FindMath_js_1$1 = FindMath;
|
|
52029
|
-
var NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
|
|
52030
|
-
var FindMathML = (function (_super) {
|
|
52031
|
-
__extends$1J(FindMathML, _super);
|
|
52032
|
-
function FindMathML() {
|
|
52033
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
52034
|
-
}
|
|
52035
|
-
FindMathML.prototype.findMath = function (node) {
|
|
52036
|
-
var set = new Set();
|
|
52037
|
-
this.findMathNodes(node, set);
|
|
52038
|
-
this.findMathPrefixed(node, set);
|
|
52039
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
52040
|
-
if (this.adaptor.kind(html) === 'html' && set.size === 0) {
|
|
52041
|
-
this.findMathNS(node, set);
|
|
52042
|
-
}
|
|
52043
|
-
return this.processMath(set);
|
|
52044
|
-
};
|
|
52045
|
-
FindMathML.prototype.findMathNodes = function (node, set) {
|
|
52046
|
-
var e_1, _a;
|
|
52047
|
-
try {
|
|
52048
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52049
|
-
var math = _c.value;
|
|
52050
|
-
set.add(math);
|
|
52051
|
-
}
|
|
52052
|
-
} catch (e_1_1) {
|
|
52053
|
-
e_1 = {
|
|
52054
|
-
error: e_1_1
|
|
52055
|
-
};
|
|
52056
|
-
} finally {
|
|
52057
|
-
try {
|
|
52058
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52059
|
-
} finally {
|
|
52060
|
-
if (e_1) throw e_1.error;
|
|
52061
|
-
}
|
|
52062
|
-
}
|
|
52063
|
-
};
|
|
52064
|
-
FindMathML.prototype.findMathPrefixed = function (node, set) {
|
|
52065
|
-
var e_2, _a, e_3, _b;
|
|
52066
|
-
var html = this.adaptor.root(this.adaptor.document);
|
|
52067
|
-
try {
|
|
52068
|
-
for (var _c = __values$F(this.adaptor.allAttributes(html)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
52069
|
-
var attr = _d.value;
|
|
52070
|
-
if (attr.name.substr(0, 6) === 'xmlns:' && attr.value === NAMESPACE) {
|
|
52071
|
-
var prefix = attr.name.substr(6);
|
|
52072
|
-
try {
|
|
52073
|
-
for (var _e = (e_3 = void 0, __values$F(this.adaptor.tags(node, prefix + ':math'))), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
52074
|
-
var math = _f.value;
|
|
52075
|
-
set.add(math);
|
|
52076
|
-
}
|
|
52077
|
-
} catch (e_3_1) {
|
|
52078
|
-
e_3 = {
|
|
52079
|
-
error: e_3_1
|
|
52080
|
-
};
|
|
52081
|
-
} finally {
|
|
52082
|
-
try {
|
|
52083
|
-
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
|
|
52084
|
-
} finally {
|
|
52085
|
-
if (e_3) throw e_3.error;
|
|
52086
|
-
}
|
|
52087
|
-
}
|
|
52088
|
-
}
|
|
52089
|
-
}
|
|
52090
|
-
} catch (e_2_1) {
|
|
52091
|
-
e_2 = {
|
|
52092
|
-
error: e_2_1
|
|
52093
|
-
};
|
|
52094
|
-
} finally {
|
|
52095
|
-
try {
|
|
52096
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
52097
|
-
} finally {
|
|
52098
|
-
if (e_2) throw e_2.error;
|
|
52099
|
-
}
|
|
52100
|
-
}
|
|
52101
|
-
};
|
|
52102
|
-
FindMathML.prototype.findMathNS = function (node, set) {
|
|
52103
|
-
var e_4, _a;
|
|
52104
|
-
try {
|
|
52105
|
-
for (var _b = __values$F(this.adaptor.tags(node, 'math', NAMESPACE)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52106
|
-
var math = _c.value;
|
|
52107
|
-
set.add(math);
|
|
52108
|
-
}
|
|
52109
|
-
} catch (e_4_1) {
|
|
52110
|
-
e_4 = {
|
|
52111
|
-
error: e_4_1
|
|
52112
|
-
};
|
|
52113
|
-
} finally {
|
|
52114
|
-
try {
|
|
52115
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52116
|
-
} finally {
|
|
52117
|
-
if (e_4) throw e_4.error;
|
|
52118
|
-
}
|
|
52119
|
-
}
|
|
52120
|
-
};
|
|
52121
|
-
FindMathML.prototype.processMath = function (set) {
|
|
52122
|
-
var e_5, _a;
|
|
52123
|
-
var math = [];
|
|
52124
|
-
try {
|
|
52125
|
-
for (var _b = __values$F(Array.from(set)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
52126
|
-
var mml = _c.value;
|
|
52127
|
-
var display = this.adaptor.getAttribute(mml, 'display') === 'block' || this.adaptor.getAttribute(mml, 'mode') === 'display';
|
|
52128
|
-
var start = {
|
|
52129
|
-
node: mml,
|
|
52130
|
-
n: 0,
|
|
52131
|
-
delim: ''
|
|
52132
|
-
};
|
|
52133
|
-
var end = {
|
|
52134
|
-
node: mml,
|
|
52135
|
-
n: 0,
|
|
52136
|
-
delim: ''
|
|
52137
|
-
};
|
|
52138
|
-
math.push({
|
|
52139
|
-
math: this.adaptor.outerHTML(mml),
|
|
52140
|
-
start: start,
|
|
52141
|
-
end: end,
|
|
52142
|
-
display: display
|
|
52143
|
-
});
|
|
52144
|
-
}
|
|
52145
|
-
} catch (e_5_1) {
|
|
52146
|
-
e_5 = {
|
|
52147
|
-
error: e_5_1
|
|
52148
|
-
};
|
|
52149
|
-
} finally {
|
|
52150
|
-
try {
|
|
52151
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
52152
|
-
} finally {
|
|
52153
|
-
if (e_5) throw e_5.error;
|
|
52154
|
-
}
|
|
52155
|
-
}
|
|
52156
|
-
return math;
|
|
52157
|
-
};
|
|
52158
|
-
FindMathML.OPTIONS = {};
|
|
52159
|
-
return FindMathML;
|
|
52160
|
-
})(FindMath_js_1$1.AbstractFindMath);
|
|
52161
|
-
FindMathML$1.FindMathML = FindMathML;
|
|
52162
52201
|
var MathMLCompile$1 = {};
|
|
52163
52202
|
var Entities$1 = {};
|
|
52164
52203
|
var AsyncLoad = {};
|
|
@@ -94750,7 +94789,7 @@ var unWrapMath = function unWrapMath(content) {
|
|
|
94750
94789
|
};
|
|
94751
94790
|
};
|
|
94752
94791
|
normalization.unWrapMath = unWrapMath;
|
|
94753
|
-
const require$$
|
|
94792
|
+
const require$$22$2 = _dll_debug;
|
|
94754
94793
|
(function (exports) {
|
|
94755
94794
|
var _interopRequireDefault = interopRequireDefault.exports;
|
|
94756
94795
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -94760,10 +94799,17 @@ const require$$15$4 = _dll_debug;
|
|
|
94760
94799
|
var _toConsumableArray2 = _interopRequireDefault(toConsumableArray$1.exports);
|
|
94761
94800
|
var _typeof2 = _interopRequireDefault(_typeof$e.exports);
|
|
94762
94801
|
var _defineProperty2 = _interopRequireDefault(defineProperty$5.exports);
|
|
94802
|
+
var _classCallCheck2 = _interopRequireDefault(classCallCheck$4.exports);
|
|
94803
|
+
var _createClass2 = _interopRequireDefault(createClass$3.exports);
|
|
94804
|
+
var _get2 = _interopRequireDefault(get$1.exports);
|
|
94805
|
+
var _inherits2 = _interopRequireDefault(inherits$2.exports);
|
|
94806
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(possibleConstructorReturn$2.exports);
|
|
94807
|
+
var _getPrototypeOf2 = _interopRequireDefault(getPrototypeOf$1.exports);
|
|
94763
94808
|
var _mathjax = mathjax;
|
|
94764
94809
|
var _assistiveMml = assistiveMml;
|
|
94765
94810
|
var _semanticEnrich = semanticEnrich;
|
|
94766
94811
|
var _MenuHandler = MenuHandler$1;
|
|
94812
|
+
var _FindMathML2 = FindMathML$1;
|
|
94767
94813
|
var _mathml = mathml;
|
|
94768
94814
|
var _tex = tex$2;
|
|
94769
94815
|
var _chtml = chtml$1;
|
|
@@ -94771,12 +94817,13 @@ const require$$15$4 = _dll_debug;
|
|
|
94771
94817
|
var _browserAdaptor = browserAdaptor$1;
|
|
94772
94818
|
var _AllPackages = AllPackages;
|
|
94773
94819
|
var _mstack = mstack;
|
|
94774
|
-
var _debug = _interopRequireDefault(require$$
|
|
94820
|
+
var _debug = _interopRequireDefault(require$$22$2);
|
|
94775
94821
|
var _normalization = normalization;
|
|
94776
94822
|
var _MmlFactory = MmlFactory$1;
|
|
94777
94823
|
var _SerializedMmlVisitor = SerializedMmlVisitor;
|
|
94778
94824
|
var _WrapperFactory = WrapperFactory$2;
|
|
94779
94825
|
var _mspace = mspace$1;
|
|
94826
|
+
var _HTMLDomStrings = HTMLDomStrings$1;
|
|
94780
94827
|
function ownKeys(object, enumerableOnly) {
|
|
94781
94828
|
var keys = Object.keys(object);
|
|
94782
94829
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -94798,6 +94845,30 @@ const require$$15$4 = _dll_debug;
|
|
|
94798
94845
|
}
|
|
94799
94846
|
return target;
|
|
94800
94847
|
}
|
|
94848
|
+
function _createSuper(Derived) {
|
|
94849
|
+
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
94850
|
+
return function _createSuperInternal() {
|
|
94851
|
+
var Super = (0, _getPrototypeOf2["default"])(Derived), result;
|
|
94852
|
+
if (hasNativeReflectConstruct) {
|
|
94853
|
+
var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor;
|
|
94854
|
+
result = Reflect.construct(Super, arguments, NewTarget);
|
|
94855
|
+
} else {
|
|
94856
|
+
result = Super.apply(this, arguments);
|
|
94857
|
+
}
|
|
94858
|
+
return (0, _possibleConstructorReturn2["default"])(this, result);
|
|
94859
|
+
};
|
|
94860
|
+
}
|
|
94861
|
+
function _isNativeReflectConstruct() {
|
|
94862
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
94863
|
+
if (Reflect.construct.sham) return false;
|
|
94864
|
+
if (typeof Proxy === "function") return true;
|
|
94865
|
+
try {
|
|
94866
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
94867
|
+
return true;
|
|
94868
|
+
} catch (e) {
|
|
94869
|
+
return false;
|
|
94870
|
+
}
|
|
94871
|
+
}
|
|
94801
94872
|
if (typeof window !== 'undefined') {
|
|
94802
94873
|
(0, _html.RegisterHTMLHandler)((0, _browserAdaptor.browserAdaptor)());
|
|
94803
94874
|
}
|
|
@@ -94852,6 +94923,28 @@ const require$$15$4 = _dll_debug;
|
|
|
94852
94923
|
return node.setAttribute('displaystyle', 'true');
|
|
94853
94924
|
});
|
|
94854
94925
|
};
|
|
94926
|
+
var myFindMathML = (function (_FindMathML) {
|
|
94927
|
+
(0, _inherits2["default"])(myFindMathML, _FindMathML);
|
|
94928
|
+
var _super = _createSuper(myFindMathML);
|
|
94929
|
+
function myFindMathML() {
|
|
94930
|
+
(0, _classCallCheck2["default"])(this, myFindMathML);
|
|
94931
|
+
return _super.apply(this, arguments);
|
|
94932
|
+
}
|
|
94933
|
+
(0, _createClass2["default"])(myFindMathML, [{
|
|
94934
|
+
key: "processMath",
|
|
94935
|
+
value: function processMath(set) {
|
|
94936
|
+
var adaptor = this.adaptor;
|
|
94937
|
+
for (var _i = 0, _Array$from = Array.from(set); _i < _Array$from.length; _i++) {
|
|
94938
|
+
var mml = _Array$from[_i];
|
|
94939
|
+
if (adaptor.kind(adaptor.parent(mml)) === 'mjx-assistive-mml') {
|
|
94940
|
+
set["delete"](mml);
|
|
94941
|
+
}
|
|
94942
|
+
}
|
|
94943
|
+
return (0, _get2["default"])((0, _getPrototypeOf2["default"])(myFindMathML.prototype), "processMath", this).call(this, set);
|
|
94944
|
+
}
|
|
94945
|
+
}]);
|
|
94946
|
+
return myFindMathML;
|
|
94947
|
+
})(_FindMathML2.FindMathML);
|
|
94855
94948
|
var createMathMLInstance = function createMathMLInstance(opts) {
|
|
94856
94949
|
var docProvided = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
|
|
94857
94950
|
opts = opts || defaultOpts();
|
|
@@ -94881,7 +94974,8 @@ const require$$15$4 = _dll_debug;
|
|
|
94881
94974
|
parseError: function parseError(node) {
|
|
94882
94975
|
console.log('error:', node);
|
|
94883
94976
|
this.error(this.adaptor.textContent(node).replace(/\n.*/g, ''));
|
|
94884
|
-
}
|
|
94977
|
+
},
|
|
94978
|
+
FindMathML: new myFindMathML()
|
|
94885
94979
|
};
|
|
94886
94980
|
var fontURL = ("https://unpkg.com/mathjax-full@").concat(_mathjax.mathjax.version, "/ts/output/chtml/fonts/tex-woff-v2");
|
|
94887
94981
|
var htmlConfig = {
|
|
@@ -94906,7 +95000,10 @@ const require$$15$4 = _dll_debug;
|
|
|
94906
95000
|
},
|
|
94907
95001
|
enrichSpeech: 'deep',
|
|
94908
95002
|
InputJax: [new _tex.TeX(texConfig), mml],
|
|
94909
|
-
OutputJax: new _chtml.CHTML(htmlConfig)
|
|
95003
|
+
OutputJax: new _chtml.CHTML(htmlConfig),
|
|
95004
|
+
DomStrings: new _HTMLDomStrings.HTMLDomStrings({
|
|
95005
|
+
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'annotation', 'annotation-xml', 'mjx-assistive-mml', 'mjx-container']
|
|
95006
|
+
})
|
|
94910
95007
|
});
|
|
94911
95008
|
mml.setMmlFactory(customMmlFactory);
|
|
94912
95009
|
return html;
|
package/package.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"repository": "pie-framework/pie-elements",
|
|
7
|
-
"version": "3.4.2
|
|
7
|
+
"version": "3.4.2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@material-ui/core": "^3.9.2",
|
|
11
11
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
12
|
-
"@pie-lib/pie-toolbox": "2.9.
|
|
12
|
+
"@pie-lib/pie-toolbox": "2.9.1",
|
|
13
13
|
"prop-types": "^15.6.1",
|
|
14
14
|
"react": "^16.8.1",
|
|
15
15
|
"react-dom": "^16.8.1"
|
|
16
16
|
},
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "ISC",
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "6efba1362f19cfb3676f7999b50e04667cf09f97",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postpublish": "../../scripts/postpublish"
|
|
22
22
|
},
|