bd666b645f1429d6c4babd555228025ceabf929cc210b87e439ca613d8c00d76.json 76 KB

1
  1. {"ast":null,"code":"\"use strict\";\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __values = this && this.__values || function (o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = this && this.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AbstractMathDocument = exports.resetAllOptions = exports.resetOptions = exports.RenderList = void 0;\nvar Options_js_1 = require(\"../util/Options.js\");\nvar InputJax_js_1 = require(\"./InputJax.js\");\nvar OutputJax_js_1 = require(\"./OutputJax.js\");\nvar MathList_js_1 = require(\"./MathList.js\");\nvar MathItem_js_1 = require(\"./MathItem.js\");\nvar MmlFactory_js_1 = require(\"../core/MmlTree/MmlFactory.js\");\nvar BitField_js_1 = require(\"../util/BitField.js\");\nvar PrioritizedList_js_1 = require(\"../util/PrioritizedList.js\");\nvar RenderList = function (_super) {\n __extends(RenderList, _super);\n function RenderList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RenderList.create = function (actions) {\n var e_1, _a;\n var list = new this();\n try {\n for (var _b = __values(Object.keys(actions)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.value;\n var _d = __read(this.action(id, actions[id]), 2),\n action = _d[0],\n priority = _d[1];\n if (priority) {\n list.add(action, priority);\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return list;\n };\n RenderList.action = function (id, action) {\n var _a, _b, _c, _d;\n var renderDoc, renderMath;\n var convert = true;\n var priority = action[0];\n if (action.length === 1 || typeof action[1] === 'boolean') {\n action.length === 2 && (convert = action[1]);\n _a = __read(this.methodActions(id), 2), renderDoc = _a[0], renderMath = _a[1];\n } else if (typeof action[1] === 'string') {\n if (typeof action[2] === 'string') {\n action.length === 4 && (convert = action[3]);\n var _e = __read(action.slice(1), 2),\n method1 = _e[0],\n method2 = _e[1];\n _b = __read(this.methodActions(method1, method2), 2), renderDoc = _b[0], renderMath = _b[1];\n } else {\n action.length === 3 && (convert = action[2]);\n _c = __read(this.methodActions(action[1]), 2), renderDoc = _c[0], renderMath = _c[1];\n }\n } else {\n action.length === 4 && (convert = action[3]);\n _d = __read(action.slice(1), 2), renderDoc = _d[0], renderMath = _d[1];\n }\n return [{\n id: id,\n renderDoc: renderDoc,\n renderMath: renderMath,\n convert: convert\n }, priority];\n };\n RenderList.methodActions = function (method1, method2) {\n if (method2 === void 0) {\n method2 = method1;\n }\n return [function (document) {\n method1 && document[method1]();\n return false;\n }, function (math, document) {\n method2 && math[method2](document);\n return false;\n }];\n };\n RenderList.prototype.renderDoc = function (document, start) {\n var e_2, _a;\n if (start === void 0) {\n start = MathItem_js_1.STATE.UNPROCESSED;\n }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority >= start) {\n if (item.item.renderDoc(document)) return;\n }\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n };\n RenderList.prototype.renderMath = function (math, document, start) {\n var e_3, _a;\n if (start === void 0) {\n start = MathItem_js_1.STATE.UNPROCESSED;\n }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority >= start) {\n if (item.item.renderMath(math, document)) return;\n }\n }\n } catch (e_3_1) {\n e_3 = {\n error: e_3_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_3) throw e_3.error;\n }\n }\n };\n RenderList.prototype.renderConvert = function (math, document, end) {\n var e_4, _a;\n if (end === void 0) {\n end = MathItem_js_1.STATE.LAST;\n }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority > end) return;\n if (item.item.convert) {\n if (item.item.renderMath(math, document)) return;\n }\n }\n } catch (e_4_1) {\n e_4 = {\n error: e_4_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_4) throw e_4.error;\n }\n }\n };\n RenderList.prototype.findID = function (id) {\n var e_5, _a;\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.item.id === id) {\n return item.item;\n }\n }\n } catch (e_5_1) {\n e_5 = {\n error: e_5_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_5) throw e_5.error;\n }\n }\n return null;\n };\n return RenderList;\n}(PrioritizedList_js_1.PrioritizedList);\nexports.RenderList = RenderList;\nexports.resetOptions = {\n all: false,\n processed: false,\n inputJax: null,\n outputJax: null\n};\nexports.resetAllOptions = {\n all: true,\n processed: true,\n inputJax: [],\n outputJax: []\n};\nvar DefaultInputJax = function (_super) {\n __extends(DefaultInputJax, _super);\n function DefaultInputJax() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultInputJax.prototype.compile = function (_math) {\n return null;\n };\n return DefaultInputJax;\n}(InputJax_js_1.AbstractInputJax);\nvar DefaultOutputJax = function (_super) {\n __extends(DefaultOutputJax, _super);\n function DefaultOutputJax() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultOutputJax.prototype.typeset = function (_math, _document) {\n if (_document === void 0) {\n _document = null;\n }\n return null;\n };\n DefaultOutputJax.prototype.escaped = function (_math, _document) {\n return null;\n };\n return DefaultOutputJax;\n}(OutputJax_js_1.AbstractOutputJax);\nvar DefaultMathList = function (_super) {\n __extends(DefaultMathList, _super);\n function DefaultMathList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return DefaultMathList;\n}(MathList_js_1.AbstractMathList);\nvar DefaultMathItem = function (_super) {\n __extends(DefaultMathItem, _super);\n function DefaultMathItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return DefaultMathItem;\n}(MathItem_js_1.AbstractMathItem);\nvar AbstractMathDocument = function () {\n function AbstractMathDocument(document, adaptor, options) {\n var _this = this;\n var CLASS = this.constructor;\n this.document = document;\n this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);\n this.math = new (this.options['MathList'] || DefaultMathList)();\n this.renderActions = RenderList.create(this.options['renderActions']);\n this.processed = new AbstractMathDocument.ProcessBits();\n this.outputJax = this.options['OutputJax'] || new DefaultOutputJax();\n var inputJax = this.options['InputJax'] || [new DefaultInputJax()];\n if (!Array.isArray(inputJax)) {\n inputJax = [inputJax];\n }\n this.inputJax = inputJax;\n this.adaptor = adaptor;\n this.outputJax.setAdaptor(adaptor);\n this.inputJax.map(function (jax) {\n return jax.setAdaptor(adaptor);\n });\n this.mmlFactory = this.options['MmlFactory'] || new MmlFactory_js_1.MmlFactory();\n this.inputJax.map(function (jax) {\n return jax.setMmlFactory(_this.mmlFactory);\n });\n this.outputJax.initialize();\n this.inputJax.map(function (jax) {\n return jax.initialize();\n });\n }\n Object.defineProperty(AbstractMathDocument.prototype, \"kind\", {\n get: function () {\n return this.constructor.KIND;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMathDocument.prototype.addRenderAction = function (id) {\n var action = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n action[_i - 1] = arguments[_i];\n }\n var _a = __read(RenderList.action(id, action), 2),\n fn = _a[0],\n p = _a[1];\n this.renderActions.add(fn, p);\n };\n AbstractMathDocument.prototype.removeRenderAction = function (id) {\n var action = this.renderActions.findID(id);\n if (action) {\n this.renderActions.remove(action);\n }\n };\n AbstractMathDocument.prototype.render = function () {\n this.renderActions.renderDoc(this);\n return this;\n };\n AbstractMathDocument.prototype.rerender = function (start) {\n if (start === void 0) {\n start = MathItem_js_1.STATE.RERENDER;\n }\n this.state(start - 1);\n this.render();\n return this;\n };\n AbstractMathDocument.prototype.convert = function (math, options) {\n if (options === void 0) {\n options = {};\n }\n var _a = (0, Options_js_1.userOptions)({\n format: this.inputJax[0].name,\n display: true,\n end: MathItem_js_1.STATE.LAST,\n em: 16,\n ex: 8,\n containerWidth: null,\n lineWidth: 1000000,\n scale: 1,\n family: ''\n }, options),\n format = _a.format,\n display = _a.display,\n end = _a.end,\n ex = _a.ex,\n em = _a.em,\n containerWidth = _a.containerWidth,\n lineWidth = _a.lineWidth,\n scale = _a.scale,\n family = _a.family;\n if (containerWidth === null) {\n containerWidth = 80 * ex;\n }\n var jax = this.inputJax.reduce(function (jax, ijax) {\n return ijax.name === format ? ijax : jax;\n }, null);\n var mitem = new this.options.MathItem(math, jax, display);\n mitem.start.node = this.adaptor.body(this.document);\n mitem.setMetrics(em, ex, containerWidth, lineWidth, scale);\n if (this.outputJax.options.mtextInheritFont) {\n mitem.outputData.mtextFamily = family;\n }\n if (this.outputJax.options.merrorInheritFont) {\n mitem.outputData.merrorFamily = family;\n }\n mitem.convert(this, end);\n return mitem.typesetRoot || mitem.root;\n };\n AbstractMathDocument.prototype.findMath = function (_options) {\n if (_options === void 0) {\n _options = null;\n }\n this.processed.set('findMath');\n return this;\n };\n AbstractMathDocument.prototype.compile = function () {\n var e_6, _a, e_7, _b;\n if (!this.processed.isSet('compile')) {\n var recompile = [];\n try {\n for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {\n var math = _d.value;\n this.compileMath(math);\n if (math.inputData.recompile !== undefined) {\n recompile.push(math);\n }\n }\n } catch (e_6_1) {\n e_6 = {\n error: e_6_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n } finally {\n if (e_6) throw e_6.error;\n }\n }\n try {\n for (var recompile_1 = __values(recompile), recompile_1_1 = recompile_1.next(); !recompile_1_1.done; recompile_1_1 = recompile_1.next()) {\n var math = recompile_1_1.value;\n var data = math.inputData.recompile;\n math.state(data.state);\n math.inputData.recompile = data;\n this.compileMath(math);\n }\n } catch (e_7_1) {\n e_7 = {\n error: e_7_1\n };\n } finally {\n try {\n if (recompile_1_1 && !recompile_1_1.done && (_b = recompile_1.return)) _b.call(recompile_1);\n } finally {\n if (e_7) throw e_7.error;\n }\n }\n this.processed.set('compile');\n }\n return this;\n };\n AbstractMathDocument.prototype.compileMath = function (math) {\n try {\n math.compile(this);\n } catch (err) {\n if (err.retry || err.restart) {\n throw err;\n }\n this.options['compileError'](this, math, err);\n math.inputData['error'] = err;\n }\n };\n AbstractMathDocument.prototype.compileError = function (math, err) {\n math.root = this.mmlFactory.create('math', null, [this.mmlFactory.create('merror', {\n 'data-mjx-error': err.message,\n title: err.message\n }, [this.mmlFactory.create('mtext', null, [this.mmlFactory.create('text').setText('Math input error')])])]);\n if (math.display) {\n math.root.attributes.set('display', 'block');\n }\n math.inputData.error = err.message;\n };\n AbstractMathDocument.prototype.typeset = function () {\n var e_8, _a;\n if (!this.processed.isSet('typeset')) {\n try {\n for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n try {\n math.typeset(this);\n } catch (err) {\n if (err.retry || err.restart) {\n throw err;\n }\n this.options['typesetError'](this, math, err);\n math.outputData['error'] = err;\n }\n }\n } catch (e_8_1) {\n e_8 = {\n error: e_8_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_8) throw e_8.error;\n }\n }\n this.processed.set('typeset');\n }\n return this;\n };\n AbstractMathDocument.prototype.typesetError = function (math, err) {\n math.typesetRoot = this.adaptor.node('mjx-container', {\n class: 'MathJax mjx-output-error',\n jax: this.outputJax.name\n }, [this.adaptor.node('span', {\n 'data-mjx-error': err.message,\n title: err.message,\n style: {\n color: 'red',\n 'background-color': 'yellow',\n 'line-height': 'normal'\n }\n }, [this.adaptor.text('Math output error')])]);\n if (math.display) {\n this.adaptor.setAttributes(math.typesetRoot, {\n style: {\n display: 'block',\n margin: '1em 0',\n 'text-align': 'center'\n }\n });\n }\n math.outputData.error = err.message;\n };\n AbstractMathDocument.prototype.getMetrics = function () {\n if (!this.processed.isSet('getMetrics')) {\n this.outputJax.getMetrics(this);\n this.processed.set('getMetrics');\n }\n return this;\n };\n AbstractMathDocument.prototype.updateDocument = function () {\n var e_9, _a;\n if (!this.processed.isSet('updateDocument')) {\n try {\n for (var _b = __values(this.math.reversed()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n math.updateDocument(this);\n }\n } catch (e_9_1) {\n e_9 = {\n error: e_9_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_9) throw e_9.error;\n }\n }\n this.processed.set('updateDocument');\n }\n return this;\n };\n AbstractMathDocument.prototype.removeFromDocument = function (_restore) {\n if (_restore === void 0) {\n _restore = false;\n }\n return this;\n };\n AbstractMathDocument.prototype.state = function (state, restore) {\n var e_10, _a;\n if (restore === void 0) {\n restore = false;\n }\n try {\n for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n math.state(state, restore);\n }\n } catch (e_10_1) {\n e_10 = {\n error: e_10_1\n };\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_10) throw e_10.error;\n }\n }\n if (state < MathItem_js_1.STATE.INSERTED) {\n this.processed.clear('updateDocument');\n }\n if (state < MathItem_js_1.STATE.TYPESET) {\n this.processed.clear('typeset');\n this.processed.clear('getMetrics');\n }\n if (state < MathItem_js_1.STATE.COMPILED) {\n this.processed.clear('compile');\n }\n return this;\n };\n AbstractMathDocument.prototype.reset = function (options) {\n var _a;\n if (options === void 0) {\n options = {\n processed: true\n };\n }\n options = (0, Options_js_1.userOptions)(Object.assign({}, exports.resetOptions), options);\n options.all && Object.assign(options, exports.resetAllOptions);\n options.processed && this.processed.reset();\n options.inputJax && this.inputJax.forEach(function (jax) {\n return jax.reset.apply(jax, __spreadArray([], __read(options.inputJax), false));\n });\n options.outputJax && (_a = this.outputJax).reset.apply(_a, __spreadArray([], __read(options.outputJax), false));\n return this;\n };\n AbstractMathDocument.prototype.clear = function () {\n this.reset();\n this.math.clear();\n return this;\n };\n AbstractMathDocument.prototype.concat = function (list) {\n this.math.merge(list);\n return this;\n };\n AbstractMathDocument.prototype.clearMathItemsWithin = function (containers) {\n var _a;\n var items = this.getMathItemsWithin(containers);\n (_a = this.math).remove.apply(_a, __spreadArray([], __read(items), false));\n return items;\n };\n AbstractMathDocument.prototype.getMathItemsWithin = function (elements) {\n var e_11, _a, e_12, _b;\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n var adaptor = this.adaptor;\n var items = [];\n var containers = adaptor.getElements(elements, this.document);\n try {\n ITEMS: for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {\n var item = _d.value;\n try {\n for (var containers_1 = (e_12 = void 0, __values(containers)), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {\n var container = containers_1_1.value;\n if (item.start.node && adaptor.contains(container, item.start.node)) {\n items.push(item);\n continue ITEMS;\n }\n }\n } catch (e_12_1) {\n e_12 = {\n error: e_12_1\n };\n } finally {\n try {\n if (containers_1_1 && !containers_1_1.done && (_b = containers_1.return)) _b.call(containers_1);\n } finally {\n if (e_12) throw e_12.error;\n }\n }\n }\n } catch (e_11_1) {\n e_11 = {\n error: e_11_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n } finally {\n if (e_11) throw e_11.error;\n }\n }\n return items;\n };\n AbstractMathDocument.KIND = 'MathDocument';\n AbstractMathDocument.OPTIONS = {\n OutputJax: null,\n InputJax: null,\n MmlFactory: null,\n MathList: DefaultMathList,\n MathItem: DefaultMathItem,\n compileError: function (doc, math, err) {\n doc.compileError(math, err);\n },\n typesetError: function (doc, math, err) {\n doc.typesetError(math, err);\n },\n renderActions: (0, Options_js_1.expandable)({\n find: [MathItem_js_1.STATE.FINDMATH, 'findMath', '', false],\n compile: [MathItem_js_1.STATE.COMPILED],\n metrics: [MathItem_js_1.STATE.METRICS, 'getMetrics', '', false],\n typeset: [MathItem_js_1.STATE.TYPESET],\n update: [MathItem_js_1.STATE.INSERTED, 'updateDocument', false]\n })\n };\n AbstractMathDocument.ProcessBits = (0, BitField_js_1.BitFieldClass)('findMath', 'compile', 'getMetrics', 'typeset', 'updateDocument');\n return AbstractMathDocument;\n}();\nexports.AbstractMathDocument = AbstractMathDocument;","map":{"version":3,"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","TypeError","String","__","constructor","create","__values","o","s","Symbol","iterator","m","i","length","next","value","done","__read","n","r","ar","e","push","error","__spreadArray","to","from","pack","arguments","l","slice","concat","defineProperty","exports","AbstractMathDocument","resetAllOptions","resetOptions","RenderList","Options_js_1","require","InputJax_js_1","OutputJax_js_1","MathList_js_1","MathItem_js_1","MmlFactory_js_1","BitField_js_1","PrioritizedList_js_1","_super","apply","actions","e_1","_a","list","_b","keys","_c","id","_d","action","priority","add","e_1_1","return","renderDoc","renderMath","convert","methodActions","_e","method1","method2","document","math","start","e_2","STATE","UNPROCESSED","items","item","e_2_1","e_3","e_3_1","renderConvert","end","e_4","LAST","e_4_1","findID","e_5","e_5_1","PrioritizedList","all","processed","inputJax","outputJax","DefaultInputJax","compile","_math","AbstractInputJax","DefaultOutputJax","typeset","_document","escaped","AbstractOutputJax","DefaultMathList","AbstractMathList","DefaultMathItem","AbstractMathItem","adaptor","options","_this","CLASS","userOptions","defaultOptions","OPTIONS","renderActions","ProcessBits","isArray","setAdaptor","map","jax","mmlFactory","MmlFactory","setMmlFactory","initialize","get","KIND","enumerable","configurable","addRenderAction","_i","fn","removeRenderAction","remove","render","rerender","RERENDER","state","format","name","display","em","ex","containerWidth","lineWidth","scale","family","reduce","ijax","mitem","MathItem","node","body","setMetrics","mtextInheritFont","outputData","mtextFamily","merrorInheritFont","merrorFamily","typesetRoot","root","findMath","_options","set","e_6","e_7","isSet","recompile","compileMath","inputData","undefined","e_6_1","recompile_1","recompile_1_1","data","e_7_1","err","retry","restart","compileError","message","title","setText","attributes","e_8","e_8_1","typesetError","class","style","color","text","setAttributes","margin","getMetrics","updateDocument","e_9","reversed","e_9_1","removeFromDocument","_restore","restore","e_10","e_10_1","INSERTED","clear","TYPESET","COMPILED","reset","assign","forEach","merge","clearMathItemsWithin","containers","getMathItemsWithin","elements","e_11","e_12","getElements","ITEMS","containers_1","containers_1_1","container","contains","e_12_1","e_11_1","OutputJax","InputJax","MathList","doc","expandable","find","FINDMATH","metrics","METRICS","update","BitFieldClass"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/mathjax-full/js/core/MathDocument.js"],"sourcesContent":["\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractMathDocument = exports.resetAllOptions = exports.resetOptions = exports.RenderList = void 0;\nvar Options_js_1 = require(\"../util/Options.js\");\nvar InputJax_js_1 = require(\"./InputJax.js\");\nvar OutputJax_js_1 = require(\"./OutputJax.js\");\nvar MathList_js_1 = require(\"./MathList.js\");\nvar MathItem_js_1 = require(\"./MathItem.js\");\nvar MmlFactory_js_1 = require(\"../core/MmlTree/MmlFactory.js\");\nvar BitField_js_1 = require(\"../util/BitField.js\");\nvar PrioritizedList_js_1 = require(\"../util/PrioritizedList.js\");\nvar RenderList = (function (_super) {\n __extends(RenderList, _super);\n function RenderList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n RenderList.create = function (actions) {\n var e_1, _a;\n var list = new this();\n try {\n for (var _b = __values(Object.keys(actions)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var id = _c.value;\n var _d = __read(this.action(id, actions[id]), 2), action = _d[0], priority = _d[1];\n if (priority) {\n list.add(action, priority);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return list;\n };\n RenderList.action = function (id, action) {\n var _a, _b, _c, _d;\n var renderDoc, renderMath;\n var convert = true;\n var priority = action[0];\n if (action.length === 1 || typeof action[1] === 'boolean') {\n action.length === 2 && (convert = action[1]);\n _a = __read(this.methodActions(id), 2), renderDoc = _a[0], renderMath = _a[1];\n }\n else if (typeof action[1] === 'string') {\n if (typeof action[2] === 'string') {\n action.length === 4 && (convert = action[3]);\n var _e = __read(action.slice(1), 2), method1 = _e[0], method2 = _e[1];\n _b = __read(this.methodActions(method1, method2), 2), renderDoc = _b[0], renderMath = _b[1];\n }\n else {\n action.length === 3 && (convert = action[2]);\n _c = __read(this.methodActions(action[1]), 2), renderDoc = _c[0], renderMath = _c[1];\n }\n }\n else {\n action.length === 4 && (convert = action[3]);\n _d = __read(action.slice(1), 2), renderDoc = _d[0], renderMath = _d[1];\n }\n return [{ id: id, renderDoc: renderDoc, renderMath: renderMath, convert: convert }, priority];\n };\n RenderList.methodActions = function (method1, method2) {\n if (method2 === void 0) { method2 = method1; }\n return [\n function (document) { method1 && document[method1](); return false; },\n function (math, document) { method2 && math[method2](document); return false; }\n ];\n };\n RenderList.prototype.renderDoc = function (document, start) {\n var e_2, _a;\n if (start === void 0) { start = MathItem_js_1.STATE.UNPROCESSED; }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority >= start) {\n if (item.item.renderDoc(document))\n return;\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_2) throw e_2.error; }\n }\n };\n RenderList.prototype.renderMath = function (math, document, start) {\n var e_3, _a;\n if (start === void 0) { start = MathItem_js_1.STATE.UNPROCESSED; }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority >= start) {\n if (item.item.renderMath(math, document))\n return;\n }\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n };\n RenderList.prototype.renderConvert = function (math, document, end) {\n var e_4, _a;\n if (end === void 0) { end = MathItem_js_1.STATE.LAST; }\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.priority > end)\n return;\n if (item.item.convert) {\n if (item.item.renderMath(math, document))\n return;\n }\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n };\n RenderList.prototype.findID = function (id) {\n var e_5, _a;\n try {\n for (var _b = __values(this.items), _c = _b.next(); !_c.done; _c = _b.next()) {\n var item = _c.value;\n if (item.item.id === id) {\n return item.item;\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_5) throw e_5.error; }\n }\n return null;\n };\n return RenderList;\n}(PrioritizedList_js_1.PrioritizedList));\nexports.RenderList = RenderList;\nexports.resetOptions = {\n all: false,\n processed: false,\n inputJax: null,\n outputJax: null\n};\nexports.resetAllOptions = {\n all: true,\n processed: true,\n inputJax: [],\n outputJax: []\n};\nvar DefaultInputJax = (function (_super) {\n __extends(DefaultInputJax, _super);\n function DefaultInputJax() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultInputJax.prototype.compile = function (_math) {\n return null;\n };\n return DefaultInputJax;\n}(InputJax_js_1.AbstractInputJax));\nvar DefaultOutputJax = (function (_super) {\n __extends(DefaultOutputJax, _super);\n function DefaultOutputJax() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DefaultOutputJax.prototype.typeset = function (_math, _document) {\n if (_document === void 0) { _document = null; }\n return null;\n };\n DefaultOutputJax.prototype.escaped = function (_math, _document) {\n return null;\n };\n return DefaultOutputJax;\n}(OutputJax_js_1.AbstractOutputJax));\nvar DefaultMathList = (function (_super) {\n __extends(DefaultMathList, _super);\n function DefaultMathList() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return DefaultMathList;\n}(MathList_js_1.AbstractMathList));\nvar DefaultMathItem = (function (_super) {\n __extends(DefaultMathItem, _super);\n function DefaultMathItem() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return DefaultMathItem;\n}(MathItem_js_1.AbstractMathItem));\nvar AbstractMathDocument = (function () {\n function AbstractMathDocument(document, adaptor, options) {\n var _this = this;\n var CLASS = this.constructor;\n this.document = document;\n this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);\n this.math = new (this.options['MathList'] || DefaultMathList)();\n this.renderActions = RenderList.create(this.options['renderActions']);\n this.processed = new AbstractMathDocument.ProcessBits();\n this.outputJax = this.options['OutputJax'] || new DefaultOutputJax();\n var inputJax = this.options['InputJax'] || [new DefaultInputJax()];\n if (!Array.isArray(inputJax)) {\n inputJax = [inputJax];\n }\n this.inputJax = inputJax;\n this.adaptor = adaptor;\n this.outputJax.setAdaptor(adaptor);\n this.inputJax.map(function (jax) { return jax.setAdaptor(adaptor); });\n this.mmlFactory = this.options['MmlFactory'] || new MmlFactory_js_1.MmlFactory();\n this.inputJax.map(function (jax) { return jax.setMmlFactory(_this.mmlFactory); });\n this.outputJax.initialize();\n this.inputJax.map(function (jax) { return jax.initialize(); });\n }\n Object.defineProperty(AbstractMathDocument.prototype, \"kind\", {\n get: function () {\n return this.constructor.KIND;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMathDocument.prototype.addRenderAction = function (id) {\n var action = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n action[_i - 1] = arguments[_i];\n }\n var _a = __read(RenderList.action(id, action), 2), fn = _a[0], p = _a[1];\n this.renderActions.add(fn, p);\n };\n AbstractMathDocument.prototype.removeRenderAction = function (id) {\n var action = this.renderActions.findID(id);\n if (action) {\n this.renderActions.remove(action);\n }\n };\n AbstractMathDocument.prototype.render = function () {\n this.renderActions.renderDoc(this);\n return this;\n };\n AbstractMathDocument.prototype.rerender = function (start) {\n if (start === void 0) { start = MathItem_js_1.STATE.RERENDER; }\n this.state(start - 1);\n this.render();\n return this;\n };\n AbstractMathDocument.prototype.convert = function (math, options) {\n if (options === void 0) { options = {}; }\n var _a = (0, Options_js_1.userOptions)({\n format: this.inputJax[0].name, display: true, end: MathItem_js_1.STATE.LAST,\n em: 16, ex: 8, containerWidth: null, lineWidth: 1000000, scale: 1, family: ''\n }, options), format = _a.format, display = _a.display, end = _a.end, ex = _a.ex, em = _a.em, containerWidth = _a.containerWidth, lineWidth = _a.lineWidth, scale = _a.scale, family = _a.family;\n if (containerWidth === null) {\n containerWidth = 80 * ex;\n }\n var jax = this.inputJax.reduce(function (jax, ijax) { return (ijax.name === format ? ijax : jax); }, null);\n var mitem = new this.options.MathItem(math, jax, display);\n mitem.start.node = this.adaptor.body(this.document);\n mitem.setMetrics(em, ex, containerWidth, lineWidth, scale);\n if (this.outputJax.options.mtextInheritFont) {\n mitem.outputData.mtextFamily = family;\n }\n if (this.outputJax.options.merrorInheritFont) {\n mitem.outputData.merrorFamily = family;\n }\n mitem.convert(this, end);\n return (mitem.typesetRoot || mitem.root);\n };\n AbstractMathDocument.prototype.findMath = function (_options) {\n if (_options === void 0) { _options = null; }\n this.processed.set('findMath');\n return this;\n };\n AbstractMathDocument.prototype.compile = function () {\n var e_6, _a, e_7, _b;\n if (!this.processed.isSet('compile')) {\n var recompile = [];\n try {\n for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {\n var math = _d.value;\n this.compileMath(math);\n if (math.inputData.recompile !== undefined) {\n recompile.push(math);\n }\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_6) throw e_6.error; }\n }\n try {\n for (var recompile_1 = __values(recompile), recompile_1_1 = recompile_1.next(); !recompile_1_1.done; recompile_1_1 = recompile_1.next()) {\n var math = recompile_1_1.value;\n var data = math.inputData.recompile;\n math.state(data.state);\n math.inputData.recompile = data;\n this.compileMath(math);\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (recompile_1_1 && !recompile_1_1.done && (_b = recompile_1.return)) _b.call(recompile_1);\n }\n finally { if (e_7) throw e_7.error; }\n }\n this.processed.set('compile');\n }\n return this;\n };\n AbstractMathDocument.prototype.compileMath = function (math) {\n try {\n math.compile(this);\n }\n catch (err) {\n if (err.retry || err.restart) {\n throw err;\n }\n this.options['compileError'](this, math, err);\n math.inputData['error'] = err;\n }\n };\n AbstractMathDocument.prototype.compileError = function (math, err) {\n math.root = this.mmlFactory.create('math', null, [\n this.mmlFactory.create('merror', { 'data-mjx-error': err.message, title: err.message }, [\n this.mmlFactory.create('mtext', null, [\n this.mmlFactory.create('text').setText('Math input error')\n ])\n ])\n ]);\n if (math.display) {\n math.root.attributes.set('display', 'block');\n }\n math.inputData.error = err.message;\n };\n AbstractMathDocument.prototype.typeset = function () {\n var e_8, _a;\n if (!this.processed.isSet('typeset')) {\n try {\n for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n try {\n math.typeset(this);\n }\n catch (err) {\n if (err.retry || err.restart) {\n throw err;\n }\n this.options['typesetError'](this, math, err);\n math.outputData['error'] = err;\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_8) throw e_8.error; }\n }\n this.processed.set('typeset');\n }\n return this;\n };\n AbstractMathDocument.prototype.typesetError = function (math, err) {\n math.typesetRoot = this.adaptor.node('mjx-container', {\n class: 'MathJax mjx-output-error',\n jax: this.outputJax.name,\n }, [\n this.adaptor.node('span', {\n 'data-mjx-error': err.message,\n title: err.message,\n style: {\n color: 'red',\n 'background-color': 'yellow',\n 'line-height': 'normal'\n }\n }, [\n this.adaptor.text('Math output error')\n ])\n ]);\n if (math.display) {\n this.adaptor.setAttributes(math.typesetRoot, {\n style: {\n display: 'block',\n margin: '1em 0',\n 'text-align': 'center'\n }\n });\n }\n math.outputData.error = err.message;\n };\n AbstractMathDocument.prototype.getMetrics = function () {\n if (!this.processed.isSet('getMetrics')) {\n this.outputJax.getMetrics(this);\n this.processed.set('getMetrics');\n }\n return this;\n };\n AbstractMathDocument.prototype.updateDocument = function () {\n var e_9, _a;\n if (!this.processed.isSet('updateDocument')) {\n try {\n for (var _b = __values(this.math.reversed()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n math.updateDocument(this);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_9) throw e_9.error; }\n }\n this.processed.set('updateDocument');\n }\n return this;\n };\n AbstractMathDocument.prototype.removeFromDocument = function (_restore) {\n if (_restore === void 0) { _restore = false; }\n return this;\n };\n AbstractMathDocument.prototype.state = function (state, restore) {\n var e_10, _a;\n if (restore === void 0) { restore = false; }\n try {\n for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {\n var math = _c.value;\n math.state(state, restore);\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_10) throw e_10.error; }\n }\n if (state < MathItem_js_1.STATE.INSERTED) {\n this.processed.clear('updateDocument');\n }\n if (state < MathItem_js_1.STATE.TYPESET) {\n this.processed.clear('typeset');\n this.processed.clear('getMetrics');\n }\n if (state < MathItem_js_1.STATE.COMPILED) {\n this.processed.clear('compile');\n }\n return this;\n };\n AbstractMathDocument.prototype.reset = function (options) {\n var _a;\n if (options === void 0) { options = { processed: true }; }\n options = (0, Options_js_1.userOptions)(Object.assign({}, exports.resetOptions), options);\n options.all && Object.assign(options, exports.resetAllOptions);\n options.processed && this.processed.reset();\n options.inputJax && this.inputJax.forEach(function (jax) { return jax.reset.apply(jax, __spreadArray([], __read(options.inputJax), false)); });\n options.outputJax && (_a = this.outputJax).reset.apply(_a, __spreadArray([], __read(options.outputJax), false));\n return this;\n };\n AbstractMathDocument.prototype.clear = function () {\n this.reset();\n this.math.clear();\n return this;\n };\n AbstractMathDocument.prototype.concat = function (list) {\n this.math.merge(list);\n return this;\n };\n AbstractMathDocument.prototype.clearMathItemsWithin = function (containers) {\n var _a;\n var items = this.getMathItemsWithin(containers);\n (_a = this.math).remove.apply(_a, __spreadArray([], __read(items), false));\n return items;\n };\n AbstractMathDocument.prototype.getMathItemsWithin = function (elements) {\n var e_11, _a, e_12, _b;\n if (!Array.isArray(elements)) {\n elements = [elements];\n }\n var adaptor = this.adaptor;\n var items = [];\n var containers = adaptor.getElements(elements, this.document);\n try {\n ITEMS: for (var _c = __values(this.math), _d = _c.next(); !_d.done; _d = _c.next()) {\n var item = _d.value;\n try {\n for (var containers_1 = (e_12 = void 0, __values(containers)), containers_1_1 = containers_1.next(); !containers_1_1.done; containers_1_1 = containers_1.next()) {\n var container = containers_1_1.value;\n if (item.start.node && adaptor.contains(container, item.start.node)) {\n items.push(item);\n continue ITEMS;\n }\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (containers_1_1 && !containers_1_1.done && (_b = containers_1.return)) _b.call(containers_1);\n }\n finally { if (e_12) throw e_12.error; }\n }\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_11) throw e_11.error; }\n }\n return items;\n };\n AbstractMathDocument.KIND = 'MathDocument';\n AbstractMathDocument.OPTIONS = {\n OutputJax: null,\n InputJax: null,\n MmlFactory: null,\n MathList: DefaultMathList,\n MathItem: DefaultMathItem,\n compileError: function (doc, math, err) {\n doc.compileError(math, err);\n },\n typesetError: function (doc, math, err) {\n doc.typesetError(math, err);\n },\n renderActions: (0, Options_js_1.expandable)({\n find: [MathItem_js_1.STATE.FINDMATH, 'findMath', '', false],\n compile: [MathItem_js_1.STATE.COMPILED],\n metrics: [MathItem_js_1.STATE.METRICS, 'getMetrics', '', false],\n typeset: [MathItem_js_1.STATE.TYPESET],\n update: [MathItem_js_1.STATE.INSERTED, 'updateDocument', false]\n })\n };\n AbstractMathDocument.ProcessBits = (0, BitField_js_1.BitFieldClass)('findMath', 'compile', 'getMetrics', 'typeset', 'updateDocument');\n return AbstractMathDocument;\n}());\nexports.AbstractMathDocument = AbstractMathDocument;\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS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