summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrefetch2021-02-22 14:17:04 +0100
committerPrefetch2021-02-22 14:17:04 +0100
commitdff483c8ee68f530421814aa5a870ce5272e48ea (patch)
tree67bf0f5c02fc7d0eb020b13355e3422c96455e87
parent15bfb7730801809704c6561e20c5ca47627b2d79 (diff)
Test custom MathJax build
-rw-r--r--latex/Makefile2
-rw-r--r--latex/template.html6
-rw-r--r--static/mathjax/custom-mathjax.min.js1
3 files changed, 2 insertions, 7 deletions
diff --git a/latex/Makefile b/latex/Makefile
index 69bf59f..0679c72 100644
--- a/latex/Makefile
+++ b/latex/Makefile
@@ -1,6 +1,6 @@
CONV = pandoc
-CONVFLAGS = --from markdown --to html --standalone --template template.html --mathjax=/mathjax/tex-svg.js
+CONVFLAGS = --from markdown --to html --standalone --template template.html --mathjax=/mathjax/custom-mathjax.js
know: $(shell find ./know/concept -mindepth 1 -maxdepth 1 -type d -printf "%p/index.html\\n")
for file in $^; do \
diff --git a/latex/template.html b/latex/template.html
index 3764f3a..79a12ee 100644
--- a/latex/template.html
+++ b/latex/template.html
@@ -9,12 +9,6 @@
<style>
$main.css()$
</style>
- <script>
- MathJax = {
- loader: {load: ["[tex]/physics"]},
- tex: {packages: {"[+]": ["physics"]}}
- };
- </script>
$if(math)$
$math$
$endif$
diff --git a/static/mathjax/custom-mathjax.min.js b/static/mathjax/custom-mathjax.min.js
new file mode 100644
index 0000000..5ac0695
--- /dev/null
+++ b/static/mathjax/custom-mathjax.min.js
@@ -0,0 +1 @@
+!function(Q){var t={};function T(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return Q[e].call(r.exports,r,r.exports,T),r.l=!0,r.exports}T.m=Q,T.c=t,T.d=function(Q,t,e){T.o(Q,t)||Object.defineProperty(Q,t,{enumerable:!0,get:e})},T.r=function(Q){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Q,"__esModule",{value:!0})},T.t=function(Q,t){if(1&t&&(Q=T(Q)),8&t)return Q;if(4&t&&"object"==typeof Q&&Q&&Q.__esModule)return Q;var e=Object.create(null);if(T.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:Q}),2&t&&"string"!=typeof Q)for(var r in Q)T.d(e,r,function(t){return Q[t]}.bind(null,r));return e},T.n=function(Q){var t=Q&&Q.__esModule?function(){return Q.default}:function(){return Q};return T.d(t,"a",t),t},T.o=function(Q,t){return Object.prototype.hasOwnProperty.call(Q,t)},T.p="",T(T.s=224)}([function(Q,t,T){"use strict";var e,r=this&&this.__extends||(e=function(Q,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,t){Q.__proto__=t}||function(Q,t){for(var T in t)t.hasOwnProperty(T)&&(Q[T]=t[T])})(Q,t)},function(Q,t){function T(){this.constructor=Q}e(Q,t),Q.prototype=null===t?Object.create(t):(T.prototype=t.prototype,new T)}),n=this&&this.__assign||function(){return(n=Object.assign||function(Q){for(var t,T=1,e=arguments.length;T<e;T++)for(var r in t=arguments[T])Object.prototype.hasOwnProperty.call(t,r)&&(Q[r]=t[r]);return Q}).apply(this,arguments)},i=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.XMLNode=t.TextNode=t.AbstractMmlEmptyNode=t.AbstractMmlBaseNode=t.AbstractMmlLayoutNode=t.AbstractMmlTokenNode=t.AbstractMmlNode=t.indentAttributes=t.TEXCLASSNAMES=t.TEXCLASS=void 0;var a=T(16),s=T(45);t.TEXCLASS={ORD:0,OP:1,BIN:2,REL:3,OPEN:4,CLOSE:5,PUNCT:6,INNER:7,VCENTER:8,NONE:-1},t.TEXCLASSNAMES=["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"];var l=["","thinmathspace","mediummathspace","thickmathspace"],c=[[0,-1,2,3,0,0,0,1],[-1,-1,0,3,0,0,0,1],[2,2,0,0,2,0,0,2],[3,3,0,0,3,0,0,3],[0,0,0,0,0,0,0,0],[0,-1,2,3,0,0,0,1],[1,1,0,1,1,1,1,1],[1,-1,2,3,1,0,1,1]];t.indentAttributes=["indentalign","indentalignfirst","indentshift","indentshiftfirst"];var u=function(Q){function T(t,T,e){void 0===T&&(T={}),void 0===e&&(e=[]);var r=Q.call(this,t)||this;return r.texClass=null,r.prevClass=null,r.prevLevel=null,r.arity<0&&(r.childNodes=[t.create("inferredMrow")],r.childNodes[0].parent=r),r.setChildren(e),r.attributes=new a.Attributes(t.getNodeClass(r.kind).defaults,t.getNodeClass("math").defaults),r.attributes.setList(T),r}return r(T,Q),Object.defineProperty(T.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"arity",{get:function(){return 1/0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"Parent",{get:function(){for(var Q=this.parent;Q&&Q.notParent;)Q=Q.Parent;return Q},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),T.prototype.setChildren=function(t){return this.arity<0?this.childNodes[0].setChildren(t):Q.prototype.setChildren.call(this,t)},T.prototype.appendChild=function(t){return this.arity<0?(this.childNodes[0].appendChild(t),t):Q.prototype.appendChild.call(this,t)},T.prototype.replaceChild=function(t,T){return this.arity<0?(this.childNodes[0].replaceChild(t,T),t):Q.prototype.replaceChild.call(this,t,T)},T.prototype.core=function(){return this},T.prototype.coreMO=function(){return this},T.prototype.coreIndex=function(){return 0},T.prototype.childPosition=function(){for(var Q,t,T=this,e=T.parent;e&&e.notParent;)T=e,e=e.parent;if(e){var r=0;try{for(var n=i(e.childNodes),o=n.next();!o.done;o=n.next()){if(o.value===T)return r;r++}}catch(t){Q={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(Q)throw Q.error}}}return null},T.prototype.setTeXclass=function(Q){return this.getPrevClass(Q),null!=this.texClass?this:Q},T.prototype.updateTeXclass=function(Q){Q&&(this.prevClass=Q.prevClass,this.prevLevel=Q.prevLevel,Q.prevClass=Q.prevLevel=null,this.texClass=Q.texClass)},T.prototype.getPrevClass=function(Q){Q&&(this.prevClass=Q.texClass,this.prevLevel=Q.attributes.get("scriptlevel"))},T.prototype.texSpacing=function(){var Q=null!=this.prevClass?this.prevClass:t.TEXCLASS.NONE,T=this.texClass||t.TEXCLASS.ORD;if(Q===t.TEXCLASS.NONE||T===t.TEXCLASS.NONE)return"";Q===t.TEXCLASS.VCENTER&&(Q=t.TEXCLASS.ORD),T===t.TEXCLASS.VCENTER&&(T=t.TEXCLASS.ORD);var e=c[Q][T];return(this.prevLevel>0||this.attributes.get("scriptlevel")>0)&&e>=0?"":l[Math.abs(e)]},T.prototype.hasSpacingAttributes=function(){return this.isEmbellished&&this.coreMO().hasSpacingAttributes()},T.prototype.setInheritedAttributes=function(Q,t,e,r){var n,a;void 0===Q&&(Q={}),void 0===t&&(t=!1),void 0===e&&(e=0),void 0===r&&(r=!1);var s=this.attributes.getAllDefaults();try{for(var l=i(Object.keys(Q)),c=l.next();!c.done;c=l.next()){var u=c.value;if(s.hasOwnProperty(u)||T.alwaysInherit.hasOwnProperty(u)){var L=o(Q[u],2),h=L[0],p=L[1];((T.noInherit[h]||{})[this.kind]||{})[u]||this.attributes.setInherited(u,p)}}}catch(Q){n={error:Q}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}void 0===this.attributes.getExplicit("displaystyle")&&this.attributes.setInherited("displaystyle",t),void 0===this.attributes.getExplicit("scriptlevel")&&this.attributes.setInherited("scriptlevel",e),r&&this.setProperty("texprimestyle",r);var f=this.arity;if(f>=0&&f!==1/0&&(1===f&&0===this.childNodes.length||1!==f&&this.childNodes.length!==f))if(f<this.childNodes.length)this.childNodes=this.childNodes.slice(0,f);else for(;this.childNodes.length<f;)this.appendChild(this.factory.create("mrow"));this.setChildInheritedAttributes(Q,t,e,r)},T.prototype.setChildInheritedAttributes=function(Q,t,T,e){var r,n;try{for(var o=i(this.childNodes),a=o.next();!a.done;a=o.next()){a.value.setInheritedAttributes(Q,t,T,e)}}catch(Q){r={error:Q}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},T.prototype.addInheritedAttributes=function(Q,t){var T,e,r=n({},Q);try{for(var o=i(Object.keys(t)),a=o.next();!a.done;a=o.next()){var s=a.value;"displaystyle"!==s&&"scriptlevel"!==s&&"style"!==s&&(r[s]=[this.kind,t[s]])}}catch(Q){T={error:Q}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(T)throw T.error}}return r},T.prototype.inheritAttributesFrom=function(Q){var t=Q.attributes,T=t.get("displaystyle"),e=t.get("scriptlevel"),r=t.isSet("mathsize")?{mathsize:["math",t.get("mathsize")]}:{},n=Q.getProperty("texprimestyle")||!1;this.setInheritedAttributes(r,T,e,n)},T.prototype.verifyTree=function(Q){if(void 0===Q&&(Q=null),null!==Q){this.verifyAttributes(Q);var t=this.arity;Q.checkArity&&t>=0&&t!==1/0&&(1===t&&0===this.childNodes.length||1!==t&&this.childNodes.length!==t)&&this.mError('Wrong number of children for "'+this.kind+'" node',Q,!0),this.verifyChildren(Q)}},T.prototype.verifyAttributes=function(Q){var t,T;if(Q.checkAttributes){var e=this.attributes,r=[];try{for(var n=i(e.getExplicitNames()),o=n.next();!o.done;o=n.next()){var a=o.value;"data-"===a.substr(0,5)||void 0!==e.getDefault(a)||a.match(/^(?:class|style|id|(?:xlink:)?href)$/)||r.push(a)}}catch(Q){t={error:Q}}finally{try{o&&!o.done&&(T=n.return)&&T.call(n)}finally{if(t)throw t.error}}r.length&&this.mError("Unknown attributes for "+this.kind+" node: "+r.join(", "),Q)}},T.prototype.verifyChildren=function(Q){var t,T;try{for(var e=i(this.childNodes),r=e.next();!r.done;r=e.next()){r.value.verifyTree(Q)}}catch(Q){t={error:Q}}finally{try{r&&!r.done&&(T=e.return)&&T.call(e)}finally{if(t)throw t.error}}},T.prototype.mError=function(Q,t,T){if(void 0===T&&(T=!1),this.parent&&this.parent.isKind("merror"))return null;var e=this.factory.create("merror");if(t.fullErrors||T){var r=this.factory.create("mtext"),n=this.factory.create("text");n.setText(t.fullErrors?Q:this.kind),r.appendChild(n),e.appendChild(r),this.parent.replaceChild(e,this)}else this.parent.replaceChild(e,this),e.appendChild(this);return e},T.defaults={mathbackground:a.INHERIT,mathcolor:a.INHERIT,mathsize:a.INHERIT,dir:a.INHERIT},T.noInherit={mstyle:{mpadded:{width:!0,height:!0,depth:!0,lspace:!0,voffset:!0},mtable:{width:!0,height:!0,depth:!0,align:!0}},maligngroup:{mrow:{groupalign:!0},mtable:{groupalign:!0}}},T.alwaysInherit={scriptminsize:!0,scriptsizemultiplier:!0},T.verifyDefaults={checkArity:!0,checkAttributes:!1,fullErrors:!1,fixMmultiscripts:!0,fixMtables:!0},T}(s.AbstractNode);t.AbstractMmlNode=u;var L=function(Q){function t(){return null!==Q&&Q.apply(this,arguments)||this}return r(t,Q),Object.defineProperty(t.prototype,"isToken",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getText=function(){var Q,t,T="";try{for(var e=i(this.childNodes),r=e.next();!r.done;r=e.next()){var n=r.value;n instanceof d&&(T+=n.getText())}}catch(t){Q={error:t}}finally{try{r&&!r.done&&(t=e.return)&&t.call(e)}finally{if(Q)throw Q.error}}return T},t.prototype.setChildInheritedAttributes=function(Q,t,T,e){var r,n;try{for(var o=i(this.childNodes),a=o.next();!a.done;a=o.next()){var s=a.value;s instanceof u&&s.setInheritedAttributes(Q,t,T,e)}}catch(Q){r={error:Q}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.walkTree=function(Q,t){var T,e;Q(this,t);try{for(var r=i(this.childNodes),n=r.next();!n.done;n=r.next()){var o=n.value;o instanceof u&&o.walkTree(Q,t)}}catch(Q){T={error:Q}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(T)throw T.error}}return t},t.defaults=n(n({},u.defaults),{mathvariant:"normal",mathsize:a.INHERIT}),t}(u);t.AbstractMmlTokenNode=L;var h=function(Q){function t(){return null!==Q&&Q.apply(this,arguments)||this}return r(t,Q),Object.defineProperty(t.prototype,"isSpacelike",{get:function(){return this.childNodes[0].isSpacelike},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"arity",{get:function(){return-1},enumerable:!1,configurable:!0}),t.prototype.core=function(){return this.childNodes[0]},t.prototype.coreMO=function(){return this.childNodes[0].coreMO()},t.prototype.setTeXclass=function(Q){return Q=this.childNodes[0].setTeXclass(Q),this.updateTeXclass(this.childNodes[0]),Q},t.defaults=u.defaults,t}(u);t.AbstractMmlLayoutNode=h;var p=function(Q){function T(){return null!==Q&&Q.apply(this,arguments)||this}return r(T,Q),Object.defineProperty(T.prototype,"isEmbellished",{get:function(){return this.childNodes[0].isEmbellished},enumerable:!1,configurable:!0}),T.prototype.core=function(){return this.childNodes[0]},T.prototype.coreMO=function(){return this.childNodes[0].coreMO()},T.prototype.setTeXclass=function(Q){var T,e;this.getPrevClass(Q),this.texClass=t.TEXCLASS.ORD;var r=this.childNodes[0];r?this.isEmbellished||r.isKind("mi")?(Q=r.setTeXclass(Q),this.updateTeXclass(this.core())):(r.setTeXclass(null),Q=this):Q=this;try{for(var n=i(this.childNodes.slice(1)),o=n.next();!o.done;o=n.next()){var a=o.value;a&&a.setTeXclass(null)}}catch(Q){T={error:Q}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(T)throw T.error}}return Q},T.defaults=u.defaults,T}(u);t.AbstractMmlBaseNode=p;var f=function(Q){function T(){return null!==Q&&Q.apply(this,arguments)||this}return r(T,Q),Object.defineProperty(T.prototype,"isToken",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isEmbellished",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isSpacelike",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"linebreakContainer",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"hasNewLine",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"arity",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"isInferred",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"notParent",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"Parent",{get:function(){return this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"texClass",{get:function(){return t.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"prevClass",{get:function(){return t.TEXCLASS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"prevLevel",{get:function(){return 0},enumerable:!1,configurable:!0}),T.prototype.hasSpacingAttributes=function(){return!1},Object.defineProperty(T.prototype,"attributes",{get:function(){return null},enumerable:!1,configurable:!0}),T.prototype.core=function(){return this},T.prototype.coreMO=function(){return this},T.prototype.coreIndex=function(){return 0},T.prototype.childPosition=function(){return 0},T.prototype.setTeXclass=function(Q){return Q},T.prototype.texSpacing=function(){return""},T.prototype.setInheritedAttributes=function(Q,t,T,e){},T.prototype.inheritAttributesFrom=function(Q){},T.prototype.verifyTree=function(Q){},T.prototype.mError=function(Q,t,T){void 0===T&&(T=!1)},T}(s.AbstractEmptyNode);t.AbstractMmlEmptyNode=f;var d=function(Q){function t(){var t=null!==Q&&Q.apply(this,arguments)||this;return t.text="",t}return r(t,Q),Object.defineProperty(t.prototype,"kind",{get:function(){return"text"},enumerable:!1,configurable:!0}),t.prototype.getText=function(){return this.text},t.prototype.setText=function(Q){return this.text=Q,this},t.prototype.toString=function(){return this.text},t}(f);t.TextNode=d;var H=function(Q){function t(){var t=null!==Q&&Q.apply(this,arguments)||this;return t.xml=null,t.adaptor=null,t}return r(t,Q),Object.defineProperty(t.prototype,"kind",{get:function(){return"XML"},enumerable:!1,configurable:!0}),t.prototype.getXML=function(){return this.xml},t.prototype.setXML=function(Q,t){return void 0===t&&(t=null),this.xml=Q,this.adaptor=t,this},t.prototype.getSerializedXML=function(){return this.adaptor.outerHTML(this.xml)},t.prototype.toString=function(){return"XML data"},t}(f);t.XMLNode=H},function(Q,t,T){"use strict";var e,r=this&&this.__extends||(e=function(Q,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,t){Q.__proto__=t}||function(Q,t){for(var T in t)t.hasOwnProperty(T)&&(Q[T]=t[T])})(Q,t)},function(Q,t){function T(){this.constructor=Q}e(Q,t),Q.prototype=null===t?Object.create(t):(T.prototype=t.prototype,new T)}),n=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.SVGWrapper=void 0;var o=T(116),a=T(38),s=function(Q){function t(){var t=null!==Q&&Q.apply(this,arguments)||this;return t.element=null,t}return r(t,Q),t.prototype.toSVG=function(Q){this.addChildren(this.standardSVGnode(Q))},t.prototype.addChildren=function(Q){var t,T,e=0;try{for(var r=n(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.toSVG(Q),o.element&&o.place(e+o.bbox.L*o.bbox.rscale,0),e+=(o.bbox.L+o.bbox.w+o.bbox.R)*o.bbox.rscale}}catch(Q){t={error:Q}}finally{try{i&&!i.done&&(T=r.return)&&T.call(r)}finally{if(t)throw t.error}}},t.prototype.standardSVGnode=function(Q){var t=this.createSVGnode(Q);return this.handleStyles(),this.handleScale(),this.handleColor(),this.handleAttributes(),t},t.prototype.createSVGnode=function(Q){var t=this.node.attributes.get("href");if(t){Q=this.adaptor.append(Q,this.svg("a",{href:t}));var T=this.getBBox(),e=T.h,r=T.d,n=T.w;this.adaptor.append(Q,this.svg("rect",{"data-hitbox":!0,fill:"none",stroke:"none","pointer-events":"all",width:this.fixed(n),height:this.fixed(e+r),y:this.fixed(-r)}))}return this.element=this.adaptor.append(Q,this.svg("g",{"data-mml-node":this.node.kind})),this.element},t.prototype.handleStyles=function(){if(this.styles){var Q=this.styles.cssText;Q&&this.adaptor.setAttribute(this.element,"style",Q)}},t.prototype.handleScale=function(){if(1!==this.bbox.rscale){var Q="scale("+this.fixed(this.bbox.rscale/1e3,3)+")";this.adaptor.setAttribute(this.element,"transform",Q)}},t.prototype.handleColor=function(){var Q=this.adaptor,t=this.node.attributes,T=t.getExplicit("mathcolor"),e=t.getExplicit("color"),r=t.getExplicit("mathbackground"),n=t.getExplicit("background");if((T||e)&&(Q.setAttribute(this.element,"fill",T||e),Q.setAttribute(this.element,"stroke",T||e)),r||n){var i=this.getBBox(),o=i.h,a=i.d,s=i.w,l=this.svg("rect",{fill:r||n,x:0,y:this.fixed(-a),width:this.fixed(s),height:this.fixed(o+a),"data-bgcolor":!0}),c=Q.firstChild(this.element);c?Q.insert(l,c):Q.append(this.element,l)}},t.prototype.handleAttributes=function(){var Q,T,e,r,i=this.node.attributes,o=i.getAllDefaults(),a=t.skipAttributes;try{for(var s=n(i.getExplicitNames()),l=s.next();!l.done;l=s.next()){var c=l.value;!1!==a[c]&&(c in o||a[c]||this.adaptor.hasAttribute(this.element,c))||this.adaptor.setAttribute(this.element,c,i.getExplicit(c))}}catch(t){Q={error:t}}finally{try{l&&!l.done&&(T=s.return)&&T.call(s)}finally{if(Q)throw Q.error}}if(i.get("class")){var u=i.get("class").trim().split(/ +/);try{for(var L=n(u),h=L.next();!h.done;h=L.next()){var p=h.value;this.adaptor.addClass(this.element,p)}}catch(Q){e={error:Q}}finally{try{h&&!h.done&&(r=L.return)&&r.call(L)}finally{if(e)throw e.error}}}},t.prototype.place=function(Q,t,T){if(void 0===T&&(T=null),Q||t){T||(T=this.element);var e=this.adaptor.getAttribute(T,"transform")||"";e="translate("+this.fixed(Q)+", "+this.fixed(t)+")"+(e?" "+e:""),this.adaptor.setAttribute(T,"transform",e)}},t.prototype.placeChar=function(Q,t,T,e,r){var o,a;void 0===r&&(r=null),null===r&&(r=this.variant);var s=Q.toString(16).toUpperCase(),l=i(this.getVariantChar(r,Q),4),c=l[2],u=l[3];if("p"in u){var L=u.p?"M"+u.p+"Z":"";this.place(t,T,this.adaptor.append(e,this.charNode(r,s,L)))}else if("c"in u){var h=this.adaptor.append(e,this.svg("g",{"data-c":s}));this.place(t,T,h),t=0;try{for(var p=n(this.unicodeChars(u.c,r)),f=p.next();!f.done;f=p.next()){var d=f.value;t+=this.placeChar(d,t,T,h,r)}}catch(Q){o={error:Q}}finally{try{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(o)throw o.error}}}else if(u.unknown){var H=String.fromCodePoint(Q),y=this.adaptor.append(e,this.jax.unknownText(H,r));return this.place(t,T,y),this.jax.measureTextNodeWithCache(y,H,r).w}return c},t.prototype.charNode=function(Q,t,T){return"none"!==this.jax.options.fontCache?this.useNode(Q,t,T):this.pathNode(t,T)},t.prototype.pathNode=function(Q,t){return this.svg("path",{"data-c":Q,d:t})},t.prototype.useNode=function(Q,t,T){var e=this.svg("use"),r="#"+this.jax.fontCache.cachePath(Q,t,T);return this.adaptor.setAttribute(e,"href",r,a.XLINKNS),e},t.prototype.drawBBox=function(){var Q=this.getBBox(),t=Q.w,T=Q.h,e=Q.d,r=this.svg("g",{style:{opacity:.25}},[this.svg("rect",{fill:"red",height:this.fixed(T),width:this.fixed(t)}),this.svg("rect",{fill:"green",height:this.fixed(e),width:this.fixed(t),y:this.fixed(-e)})]),n=this.element||this.parent.element;this.adaptor.append(n,r)},t.prototype.html=function(Q,t,T){return void 0===t&&(t={}),void 0===T&&(T=[]),this.jax.html(Q,t,T)},t.prototype.svg=function(Q,t,T){return void 0===t&&(t={}),void 0===T&&(T=[]),this.jax.svg(Q,t,T)},t.prototype.text=function(Q){return this.jax.text(Q)},t.prototype.fixed=function(Q,t){return void 0===t&&(t=1),this.jax.fixed(1e3*Q,t)},t.kind="unknown",t}(o.CommonWrapper);t.SVGWrapper=s},function(Q,t,T){"use strict";(function(Q){var T=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function e(Q){return"object"==typeof Q&&null!==Q}function r(Q,t){var n,i;try{for(var o=T(Object.keys(t)),a=o.next();!a.done;a=o.next()){var s=a.value;"__esModule"!==s&&(!e(Q[s])||!e(t[s])||t[s]instanceof Promise?null!==t[s]&&void 0!==t[s]&&(Q[s]=t[s]):r(Q[s],t[s]))}}catch(Q){n={error:Q}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return Q}Object.defineProperty(t,"__esModule",{value:!0}),t.MathJax=t.combineWithMathJax=t.combineDefaults=t.combineConfig=t.isObject=void 0,t.isObject=e,t.combineConfig=r,t.combineDefaults=function Q(t,r,n){var i,o;t[r]||(t[r]={}),t=t[r];try{for(var a=T(Object.keys(n)),s=a.next();!s.done;s=a.next()){var l=s.value;e(t[l])&&e(n[l])?Q(t,l,n[l]):null==t[l]&&null!=n[l]&&(t[l]=n[l])}}catch(Q){i={error:Q}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return t},t.combineWithMathJax=function(Q){return r(t.MathJax,Q)},void 0===Q.MathJax&&(Q.MathJax={}),Q.MathJax.version||(Q.MathJax={version:"3.1.2",_:{},config:Q.MathJax}),t.MathJax=Q.MathJax}).call(this,T(216))},function(Q,t,T){"use strict";var e,r=this&&this.__extends||(e=function(Q,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,t){Q.__proto__=t}||function(Q,t){for(var T in t)t.hasOwnProperty(T)&&(Q[T]=t[T])})(Q,t)},function(Q,t){function T(){this.constructor=Q}e(Q,t),Q.prototype=null===t?Object.create(t):(T.prototype=t.prototype,new T)}),n=this&&this.__createBinding||(Object.create?function(Q,t,T,e){void 0===e&&(e=T),Object.defineProperty(Q,e,{enumerable:!0,get:function(){return t[T]}})}:function(Q,t,T,e){void 0===e&&(e=T),Q[e]=t[T]}),i=this&&this.__exportStar||function(Q,t){for(var T in Q)"default"===T||t.hasOwnProperty(T)||n(t,Q,T)},o=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AddPaths=t.SVGFontData=void 0;var a=T(19);i(T(19),t);var s=function(Q){function t(){return null!==Q&&Q.apply(this,arguments)||this}return r(t,Q),t.charOptions=function(t,T){return Q.charOptions.call(this,t,T)},t}(a.FontData);t.SVGFontData=s,t.AddPaths=function(Q,t,T){var e,r,n,i;try{for(var a=o(Object.keys(t)),l=a.next();!l.done;l=a.next()){var c=l.value,u=parseInt(c);s.charOptions(Q,u).p=t[u]}}catch(Q){e={error:Q}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}try{for(var L=o(Object.keys(T)),h=L.next();!h.done;h=L.next()){c=h.value,u=parseInt(c);s.charOptions(Q,u).c=T[u]}}catch(Q){n={error:Q}}finally{try{h&&!h.done&&(i=L.return)&&i.call(L)}finally{if(n)throw n.error}}return Q}},function(Q,t,T){"use strict";var e=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i},n=this&&this.__spread||function(){for(var Q=[],t=0;t<arguments.length;t++)Q=Q.concat(r(arguments[t]));return Q};Object.defineProperty(t,"__esModule",{value:!0}),t.separateOptions=t.selectOptionsFromKeys=t.selectOptions=t.userOptions=t.defaultOptions=t.insert=t.copy=t.keys=t.makeArray=t.expandable=t.Expandable=t.REMOVE=t.APPEND=void 0;var i={}.constructor;function o(Q){return"object"==typeof Q&&null!==Q&&(Q.constructor===i||Q.constructor===a)}t.APPEND="[+]",t.REMOVE="[-]";var a=function(){};function s(Q){return Object.assign(Object.create(a.prototype),Q)}function l(Q){return Q?Object.keys(Q).concat(Object.getOwnPropertySymbols(Q)):[]}function c(Q){var t,T,r={};try{for(var n=e(l(Q)),i=n.next();!i.done;i=n.next()){var L=i.value,h=Object.getOwnPropertyDescriptor(Q,L),p=h.value;Array.isArray(p)?h.value=u([],p,!1):o(p)&&(h.value=c(p)),h.enumerable&&(r[L]=h)}}catch(Q){t={error:Q}}finally{try{i&&!i.done&&(T=n.return)&&T.call(n)}finally{if(t)throw t.error}}return Object.defineProperties(Q.constructor===a?s({}):{},r)}function u(Q,T,r){var i,s;void 0===r&&(r=!0);var L=function(e){if(r&&void 0===Q[e]&&Q.constructor!==a)throw"symbol"==typeof e&&(e=e.toString()),new Error('Invalid option "'+e+'" (no default value).');var i=T[e],s=Q[e];if(!o(i)||null===s||"object"!=typeof s&&"function"!=typeof s)Array.isArray(i)?(Q[e]=[],u(Q[e],i,!1)):o(i)?Q[e]=c(i):Q[e]=i;else{var L=l(i);Array.isArray(s)&&(1===L.length&&(L[0]===t.APPEND||L[0]===t.REMOVE)&&Array.isArray(i[L[0]])||2===L.length&&L.sort().join(",")===t.APPEND+","+t.REMOVE&&Array.isArray(i[t.APPEND])&&Array.isArray(i[t.REMOVE]))?(i[t.REMOVE]&&(s=Q[e]=s.filter((function(Q){return i[t.REMOVE].indexOf(Q)<0}))),i[t.APPEND]&&(Q[e]=n(s,i[t.APPEND]))):u(s,i,r)}};try{for(var h=e(l(T)),p=h.next();!p.done;p=h.next()){L(p.value)}}catch(Q){i={error:Q}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}return Q}function L(Q){for(var t,T,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i={};try{for(var o=e(r),a=o.next();!a.done;a=o.next()){var s=a.value;Q.hasOwnProperty(s)&&(i[s]=Q[s])}}catch(Q){t={error:Q}}finally{try{a&&!a.done&&(T=o.return)&&T.call(o)}finally{if(t)throw t.error}}return i}t.Expandable=a,t.expandable=s,t.makeArray=function(Q){return Array.isArray(Q)?Q:[Q]},t.keys=l,t.copy=c,t.insert=u,t.defaultOptions=function(Q){for(var t=[],T=1;T<arguments.length;T++)t[T-1]=arguments[T];return t.forEach((function(t){return u(Q,t,!1)})),Q},t.userOptions=function(Q){for(var t=[],T=1;T<arguments.length;T++)t[T-1]=arguments[T];return t.forEach((function(t){return u(Q,t,!0)})),Q},t.selectOptions=L,t.selectOptionsFromKeys=function(Q,t){return L.apply(void 0,n([Q],Object.keys(t)))},t.separateOptions=function(Q){for(var t,T,r,n,i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var a=[];try{for(var s=e(i),l=s.next();!l.done;l=s.next()){var c=l.value,u={},L={};try{for(var h=(r=void 0,e(Object.keys(Q||{}))),p=h.next();!p.done;p=h.next()){var f=p.value;(void 0===c[f]?L:u)[f]=Q[f]}}catch(Q){r={error:Q}}finally{try{p&&!p.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}a.push(u),Q=L}}catch(Q){t={error:Q}}finally{try{l&&!l.done&&(T=s.return)&&T.call(s)}finally{if(t)throw t.error}}return a.unshift(Q),a}},function(Q,t,T){"use strict";var e=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i},n=this&&this.__spread||function(){for(var Q=[],t=0;t<arguments.length;t++)Q=Q.concat(r(arguments[t]));return Q};Object.defineProperty(t,"__esModule",{value:!0});var i,o=T(0),a=T(21);!function(Q){var t=new Map([["autoOP",!0],["fnOP",!0],["movesupsub",!0],["subsupOK",!0],["texprimestyle",!0],["useHeight",!0],["variantForm",!0],["withDelims",!0],["open",!0],["close",!0]]);function T(Q,T){var r,n;try{for(var i=e(Object.keys(T)),o=i.next();!o.done;o=i.next()){var a=o.value,s=T[a];"texClass"===a?(Q.texClass=s,Q.setProperty(a,s)):"movablelimits"===a?(Q.setProperty("movablelimits",s),(Q.isKind("mo")||Q.isKind("mstyle"))&&Q.attributes.set("movablelimits",s)):"inferred"===a||(t.has(a)?Q.setProperty(a,s):Q.attributes.set(a,s))}}catch(Q){r={error:Q}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function r(Q,t,T){Q.childNodes[t]=T,T&&(T.parent=Q)}function i(Q,t){return Q.isKind(t)}Q.createEntity=function(Q){return String.fromCodePoint(parseInt(Q,16))},Q.getChildren=function(Q){return Q.childNodes},Q.getText=function(Q){return Q.getText()},Q.appendChildren=function(Q,t){var T,r;try{for(var n=e(t),i=n.next();!i.done;i=n.next()){var o=i.value;Q.appendChild(o)}}catch(Q){T={error:Q}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(T)throw T.error}}},Q.setAttribute=function(Q,t,T){Q.attributes.set(t,T)},Q.setProperty=function(Q,t,T){Q.setProperty(t,T)},Q.setProperties=T,Q.getProperty=function(Q,t){return Q.getProperty(t)},Q.getAttribute=function(Q,t){return Q.attributes.get(t)},Q.removeProperties=function(Q){for(var t=[],T=1;T<arguments.length;T++)t[T-1]=arguments[T];Q.removeProperty.apply(Q,n(t))},Q.getChildAt=function(Q,t){return Q.childNodes[t]},Q.setChild=r,Q.copyChildren=function(Q,t){for(var T=Q.childNodes,e=0;e<T.length;e++)r(t,e,T[e])},Q.copyAttributes=function(Q,t){t.attributes=Q.attributes,T(t,Q.getAllProperties())},Q.isType=i,Q.isEmbellished=function(Q){return Q.isEmbellished},Q.getTexClass=function(Q){return Q.texClass},Q.getCoreMO=function(Q){return Q.coreMO()},Q.isNode=function(Q){return Q instanceof o.AbstractMmlNode||Q instanceof o.AbstractMmlEmptyNode},Q.isInferred=function(Q){return Q.isInferred},Q.getForm=function(Q){var t,T;if(!i(Q,"mo"))return null;var r=Q,n=r.getForms();try{for(var o=e(n),s=o.next();!s.done;s=o.next()){var l=s.value,c=a.MmlMo.OPTABLE[l][r.getText()];if(c)return c}}catch(Q){t={error:Q}}finally{try{s&&!s.done&&(T=o.return)&&T.call(o)}finally{if(t)throw t.error}}return null}}(i||(i={})),t.default=i},function(Q,t,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function Q(t,T){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];this.id=t,this.message=Q.processString(T,e)}return Q.processString=function(t,T){for(var e=t.split(Q.pattern),r=1,n=e.length;r<n;r+=2){var i=e[r].charAt(0);if(i>="0"&&i<="9")e[r]=T[parseInt(e[r],10)-1],"number"==typeof e[r]&&(e[r]=e[r].toString());else if("{"===i){if((i=e[r].substr(1))>="0"&&i<="9")e[r]=T[parseInt(e[r].substr(1,e[r].length-2),10)-1],"number"==typeof e[r]&&(e[r]=e[r].toString());else e[r].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/)&&(e[r]="%"+e[r])}null==e[r]&&(e[r]="???")}return e.join("")},Q.pattern=/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,Q}();t.default=e},function(Q,t,T){"use strict";var e=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i},r=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var n,i=T(0),o=T(5),a=T(11),s=T(6),l=T(14);T(217),function(Q){var t={em:function(Q){return Q},ex:function(Q){return.43*Q},pt:function(Q){return Q/10},pc:function(Q){return 1.2*Q},px:function(Q){return 7.2*Q/72},in:function(Q){return 7.2*Q},cm:function(Q){return 7.2*Q/2.54},mm:function(Q){return 7.2*Q/25.4},mu:function(Q){return Q/18}},T="([-+]?([.,]\\d+|\\d+([.,]\\d*)?))",n="(pt|em|ex|mu|px|mm|cm|in|pc)",c=RegExp("^\\s*"+T+"\\s*"+n+"\\s*$"),u=RegExp("^\\s*"+T+"\\s*"+n+" ?");function L(Q,T){void 0===T&&(T=!1);var r=Q.match(T?u:c);return r?function(Q){var T=e(Q,3),r=T[0],n=T[1],i=T[2];if("mu"!==n)return[r,n,i];return[h(t[n](parseFloat(r||"1"))).slice(0,-2),"em",i]}([r[1].replace(/,/,"."),r[4],r[0].length]):[null,null,0]}function h(Q){return Math.abs(Q)<6e-4?"0em":Q.toFixed(3).replace(/\.?0+$/,"")+"em"}function p(Q,t,T){"{"!==t&&"}"!==t||(t="\\"+t);var e="{\\bigg"+T+" "+t+"}",r="{\\big"+T+" "+t+"}";return new a.default("\\mathchoice"+e+r+r+r,{},Q).mml()}function f(Q,t,T){t=t.replace(/^\s+/,l.entities.nbsp).replace(/\s+$/,l.entities.nbsp);var e=Q.create("text",t);return Q.create("node","mtext",[],T,e)}function d(Q,t,T){if(T.match(/^[a-z]/i)&&t.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i)&&(t+=" "),t.length+T.length>Q.configuration.options.maxBuffer)throw new s.default("MaxBufferSize","MathJax internal buffer size exceeded; is there a recursive macro call?");return t+T}function H(Q,t){for(;t>0;)Q=Q.trim().slice(1,-1),t--;return Q.trim()}function y(Q,t){for(var T=Q.length,e=0,r="",n=0,i=0,o=!0,a=!1;n<T;){var l=Q[n++];switch(l){case" ":break;case"{":o?i++:(a=!1,i>e&&(i=e)),e++;break;case"}":e&&e--,(o||a)&&(i--,a=!0),o=!1;break;default:if(!e&&-1!==t.indexOf(l))return[a?"true":H(r,i),l,Q.slice(n)];o=!1,a=!1}r+=l}if(e)throw new s.default("ExtraOpenMissingClose","Extra open brace or missing close brace");return[a?"true":H(r,i),"",Q.slice(n)]}Q.matchDimen=L,Q.dimen2em=function(Q){var T=e(L(Q),2),r=T[0],n=T[1],i=parseFloat(r||"1"),o=t[n];return o?o(i):0},Q.Em=h,Q.fenced=function(Q,t,T,e,r){void 0===r&&(r="");var n,s=Q.nodeFactory,l=s.create("node","mrow",[],{open:t,close:e,texClass:i.TEXCLASS.INNER});if(r)n=new a.default("\\"+r+"l"+t,Q.parser.stack.env,Q).mml();else{var c=s.create("text",t);n=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:i.TEXCLASS.OPEN},c)}if(o.default.appendChildren(l,[n]),o.default.isType(T,"mrow")&&o.default.isInferred(T)?o.default.appendChildren(l,o.default.getChildren(T)):o.default.appendChildren(l,[T]),r)n=new a.default("\\"+r+"r"+e,Q.parser.stack.env,Q).mml();else{var u=s.create("text",e);n=s.create("node","mo",[],{fence:!0,stretchy:!0,symmetric:!0,texClass:i.TEXCLASS.CLOSE},u)}return o.default.appendChildren(l,[n]),l},Q.fixedFence=function(Q,t,T,e){var r=Q.nodeFactory.create("node","mrow",[],{open:t,close:e,texClass:i.TEXCLASS.ORD});return t&&o.default.appendChildren(r,[p(Q,t,"l")]),o.default.isType(T,"mrow")?o.default.appendChildren(r,o.default.getChildren(T)):o.default.appendChildren(r,[T]),e&&o.default.appendChildren(r,[p(Q,e,"r")]),r},Q.mathPalette=p,Q.fixInitialMO=function(Q,t){for(var T=0,e=t.length;T<e;T++){var r=t[T];if(r&&!o.default.isType(r,"mspace")&&(!o.default.isType(r,"TeXAtom")||o.default.getChildren(r)[0]&&o.default.getChildren(o.default.getChildren(r)[0]).length)){if(o.default.isEmbellished(r)||o.default.isType(r,"TeXAtom")&&o.default.getTexClass(r)===i.TEXCLASS.REL){var n=Q.nodeFactory.create("node","mi");t.unshift(n)}break}}},Q.internalMath=function(Q,t,T,e){if(Q.configuration.options.internalMath)return Q.configuration.options.internalMath(Q,t,T,e);var r,n,i=e||Q.stack.env.font,o=i?{mathvariant:i}:{},l=[],c=0,u=0,L="",h=0;if(t.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)){for(;c<t.length;)if("$"===(r=t.charAt(c++)))"$"===L&&0===h?(n=Q.create("node","TeXAtom",[new a.default(t.slice(u,c-1),{},Q.configuration).mml()]),l.push(n),L="",u=c):""===L&&(u<c-1&&l.push(f(Q,t.slice(u,c-1),o)),L="$",u=c);else if("{"===r&&""!==L)h++;else if("}"===r)if("}"===L&&0===h){var p=new a.default(t.slice(u,c),{},Q.configuration).mml();n=Q.create("node","TeXAtom",[p],o),l.push(n),L="",u=c}else""!==L&&h&&h--;else if("\\"===r)if(""===L&&t.substr(c).match(/^(eq)?ref\s*\{/)){var d=RegExp["$&"].length;u<c-1&&l.push(f(Q,t.slice(u,c-1),o)),L="}",u=c-1,c+=d}else"("===(r=t.charAt(c++))&&""===L?(u<c-2&&l.push(f(Q,t.slice(u,c-2),o)),L=")",u=c):")"===r&&")"===L&&0===h?(n=Q.create("node","TeXAtom",[new a.default(t.slice(u,c-2),{},Q.configuration).mml()]),l.push(n),L="",u=c):r.match(/[${}\\]/)&&""===L&&(c--,t=t.substr(0,c-1)+t.substr(c));if(""!==L)throw new s.default("MathNotTerminated","Math not terminated in text box")}return u<t.length&&l.push(f(Q,t.slice(u),o)),null!=T?l=[Q.create("node","mstyle",l,{displaystyle:!1,scriptlevel:T})]:l.length>1&&(l=[Q.create("node","mrow",l)]),l},Q.internalText=f,Q.trimSpaces=function(Q){if("string"!=typeof Q)return Q;var t=Q.trim();return t.match(/\\$/)&&Q.match(/ $/)&&(t+=" "),t},Q.setArrayAlign=function(t,T){return"t"===(T=Q.trimSpaces(T||""))?t.arraydef.align="baseline 1":"b"===T?t.arraydef.align="baseline -1":"c"===T?t.arraydef.align="center":T&&(t.arraydef.align=T),t},Q.substituteArgs=function(Q,t,T){for(var e="",r="",n=0;n<T.length;){var i=T.charAt(n++);if("\\"===i)e+=i+T.charAt(n++);else if("#"===i)if("#"===(i=T.charAt(n++)))e+=i;else{if(!i.match(/[1-9]/)||parseInt(i,10)>t.length)throw new s.default("IllegalMacroParam","Illegal macro parameter reference");r=d(Q,d(Q,r,e),t[parseInt(i,10)-1]),e=""}else e+=i}return d(Q,r,e)},Q.addArgs=d,Q.checkEqnEnv=function(Q){if(Q.stack.global.eqnenv)throw new s.default("ErroneousNestingEq","Erroneous nesting of equation structures");Q.stack.global.eqnenv=!0},Q.MmlFilterAttribute=function(Q,t,T){return T},Q.getFontDef=function(Q){var t=Q.stack.env.font;return t?{mathvariant:t}:{}},Q.keyvalOptions=function(Q,t,T){var n,i;void 0===t&&(t=null),void 0===T&&(T=!1);var o=function(Q){var t,T,r,n,i,o={},a=Q;for(;a;)n=(t=e(y(a,["=",","]),3))[0],r=t[1],a=t[2],"="===r?(i=(T=e(y(a,[","]),3))[0],r=T[1],a=T[2],i="false"===i||"true"===i?JSON.parse(i):i,o[n]=i):n&&(o[n]=!0);return o}(Q);if(t)try{for(var a=r(Object.keys(o)),l=a.next();!l.done;l=a.next()){var c=l.value;if(!t.hasOwnProperty(c)){if(T)throw new s.default("InvalidOption","Invalid optional argument: %1",c);delete o[c]}}}catch(Q){n={error:Q}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}}(n||(n={})),t.default=n},function(Q,t,T){"use strict";(function(Q){var e=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.CONFIG=t.MathJax=t.Loader=void 0;var r,n=T(2),i=T(39),o=T(39);Object.defineProperty(t,"Package",{enumerable:!0,get:function(){return o.Package}}),Object.defineProperty(t,"PackageError",{enumerable:!0,get:function(){return o.PackageError}}),function(T){T.ready=function(){for(var Q,t,T=[],r=0;r<arguments.length;r++)T[r]=arguments[r];0===T.length&&(T=Array.from(i.Package.packages.keys()));var n=[];try{for(var o=e(T),a=o.next();!a.done;a=o.next()){var s=a.value,l=i.Package.packages.get(s)||new i.Package(s,!0);n.push(l.promise)}}catch(t){Q={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(Q)throw Q.error}}return Promise.all(n)},T.load=function(){for(var Q,T,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(0===r.length)return Promise.resolve();var o=[];try{for(var a=e(r),s=a.next();!s.done;s=a.next()){var l=s.value,c=i.Package.packages.get(l);c||(c=new i.Package(l)).provides(t.CONFIG.provides[l]),c.checkNoLoad(),o.push(c.promise)}}catch(t){Q={error:t}}finally{try{s&&!s.done&&(T=a.return)&&T.call(a)}finally{if(Q)throw Q.error}}return i.Package.loadAll(),Promise.all(o)},T.preLoad=function(){for(var Q,T,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];try{for(var o=e(r),a=o.next();!a.done;a=o.next()){var s=a.value,l=i.Package.packages.get(s);l||(l=new i.Package(s,!0)).provides(t.CONFIG.provides[s]),l.loaded()}}catch(t){Q={error:t}}finally{try{a&&!a.done&&(T=o.return)&&T.call(o)}finally{if(Q)throw Q.error}}},T.defaultReady=function(){void 0!==t.MathJax.startup&&t.MathJax.config.startup.ready()},T.getRoot=function(){var t=Q+"/../../es5";if("undefined"!=typeof document){var T=document.currentScript||document.getElementById("MathJax-script");T&&(t=T.src.replace(/\/[^\/]*$/,""))}return t}}(r=t.Loader||(t.Loader={})),t.MathJax=n.MathJax,void 0===t.MathJax.loader&&(n.combineDefaults(t.MathJax.config,"loader",{paths:{mathjax:r.getRoot()},source:{},dependencies:{},provides:{},load:[],ready:r.defaultReady.bind(r),failed:function(Q){return console.log("MathJax("+(Q.package||"?")+"): "+Q.message)},require:null}),n.combineWithMathJax({loader:r})),t.CONFIG=t.MathJax.config.loader}).call(this,"/")},function(Q,t,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.split=t.isPercent=t.unicodeChars=t.quotePattern=t.sortLength=void 0,t.sortLength=function(Q,t){return Q.length!==t.length?t.length-Q.length:Q===t?0:Q<t?-1:1},t.quotePattern=function(Q){return Q.replace(/([\^$(){}+*?\-|\[\]\:\\])/g,"\\$1")},t.unicodeChars=function(Q){return Array.from(Q).map((function(Q){return Q.codePointAt(0)}))},t.isPercent=function(Q){return!!Q.match(/%\s*$/)},t.split=function(Q){return Q.trim().split(/\s+/)}},function(Q,t,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BBox=t.BBoxStyleAdjust=void 0;var e=T(22);t.BBoxStyleAdjust=[["borderTopWidth","h"],["borderRightWidth","w"],["borderBottomWidth","d"],["borderLeftWidth","w",0],["paddingTop","h"],["paddingRight","w"],["paddingBottom","d"],["paddingLeft","w",0]];var r=function(){function Q(Q){void 0===Q&&(Q={w:0,h:-e.BIGDIMEN,d:-e.BIGDIMEN}),this.w=Q.w||0,this.h="h"in Q?Q.h:-e.BIGDIMEN,this.d="d"in Q?Q.d:-e.BIGDIMEN,this.L=this.R=this.ic=this.sk=0,this.scale=this.rscale=1,this.pwidth=""}return Q.zero=function(){return new Q({h:0,d:0,w:0})},Q.empty=function(){return new Q},Q.prototype.empty=function(){return this.w=0,this.h=this.d=-e.BIGDIMEN,this},Q.prototype.clean=function(){this.w===-e.BIGDIMEN&&(this.w=0),this.h===-e.BIGDIMEN&&(this.h=0),this.d===-e.BIGDIMEN&&(this.d=0)},Q.prototype.rescale=function(Q){this.w*=Q,this.h*=Q,this.d*=Q},Q.prototype.combine=function(Q,t,T){void 0===t&&(t=0),void 0===T&&(T=0);var e=Q.rscale,r=t+e*(Q.w+Q.L+Q.R),n=T+e*Q.h,i=e*Q.d-T;r>this.w&&(this.w=r),n>this.h&&(this.h=n),i>this.d&&(this.d=i)},Q.prototype.append=function(Q){var t=Q.rscale;this.w+=t*(Q.w+Q.L+Q.R),t*Q.h>this.h&&(this.h=t*Q.h),t*Q.d>this.d&&(this.d=t*Q.d)},Q.prototype.updateFrom=function(Q){this.h=Q.h,this.d=Q.d,this.w=Q.w,Q.pwidth&&(this.pwidth=Q.pwidth)},Q.fullWidth="100%",Q}();t.BBox=r},function(Q,t,T){"use strict";var e=this&&this.__values||function(Q){var t="function"==typeof Symbol&&Symbol.iterator,T=t&&Q[t],e=0;if(T)return T.call(Q);if(Q&&"number"==typeof Q.length)return{next:function(){return Q&&e>=Q.length&&(Q=void 0),{value:Q&&Q[e++],done:!Q}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__read||function(Q,t){var T="function"==typeof Symbol&&Q[Symbol.iterator];if(!T)return Q;var e,r,n=T.call(Q),i=[];try{for(;(void 0===t||t-- >0)&&!(e=n.next()).done;)i.push(e.value)}catch(Q){r={error:Q}}finally{try{e&&!e.done&&(T=n.return)&&T.call(n)}finally{if(r)throw r.error}}return i},n=this&&this.__spread||function(){for(var Q=[],t=0;t<arguments.length;t++)Q=Q.concat(r(arguments[t]));return Q};Object.defineProperty(t,"__esModule",{value:!0});var i=T(7),o=T(108),a=T(6),s=T(0),l=function(){function Q(Q,t,T){var r,n;this._string=Q,this.configuration=T,this.macroCount=0,this.i=0,this.currentCS="";var i,a=t.hasOwnProperty("isInner"),s=t.isInner;if(delete t.isInner,t){i={};try{for(var l=e(Object.keys(t)),c=l.next();!c.done;c=l.next()){var u=c.value;i[u]=t[u]}}catch(Q){r={error:Q}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}this.configuration.pushParser(this),this.stack=new o.default(this.itemFactory,i,!a||s),this.Parse(),this.Push(this.itemFactory.create("stop"))}return Object.defineProperty(Q.prototype,"options",{get:function(){return this.configuration.options},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"itemFactory",{get:function(){return this.configuration.itemFactory},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"tags",{get:function(){return this.configuration.tags},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"string",{get:function(){return this._string},set:function(Q){this._string=Q},enumerable:!1,configurable:!0}),Q.prototype.parse=function(Q,t){return this.configuration.handlers.get(Q).parse(t)},Q.prototype.lookup=function(Q,t){return this.configuration.handlers.get(Q).lookup(t)},Q.prototype.contains=function(Q,t){return this.configuration.handlers.get(Q).contains(t)},Q.prototype.toString=function(){var Q,t,T="";try{for(var r=e(Array.from(this.configuration.handlers.keys())),n=r.next();!n.done;n=r.next()){var i=n.value;T+=i+": "+this.configuration.handlers.get(i)+"\n"}}catch(t){Q={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(Q)throw Q.error}}return T},Q.prototype.Parse=function(){for(var Q;this.i<this.string.length;)Q=this.getCodePoint(),this.i+=Q.length,this.parse("character",[this,Q])},Q.prototype.Push=function(Q){Q instanceof s.AbstractMmlNode&&Q.isInferred?this.PushAll(Q.childNodes):this.stack.Push(Q)},Q.prototype.PushAll=function(Q){var t,T;try{for(var r=e(Q),n=r.next();!n.done;n=r.next()){var i=n.value;this.stack.Push(i)}}catch(Q){t={error:Q}}finally{try{n&&!n.done&&(T=r.return)&&T.call(r)}finally{if(t)throw t.error}}},Q.prototype.mml=function(){if(!this.stack.Top().isKind("mml"))return null;var Q=this.stack.Top().First;return this.configuration.popParser(),Q},Q.prototype.convertDelimiter=function(Q){var t=this.lookup("delimiter",Q);return t?t.char:null},Q.prototype.getCodePoint=function(){var Q=this.string.codePointAt(this.i);return void 0===Q?"":String.fromCodePoint(Q)},Q.prototype.nextIsSpace=function(){return!!this.string.charAt(this.i).match(/\s/)},Q.prototype.GetNext=function(){for(;this.nextIsSpace();)this.i++;return this.getCodePoint()},Q.prototype.GetCS=function(){var Q=this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);return Q?(this.i+=Q[0].length,Q[2]||Q[1]):(this.i++," ")},Q.prototype.GetArgument=function(Q,t){switch(this.GetNext()){case"":if(!t)throw new a.default("MissingArgFor","Missing argument for %1",this.currentCS);return null;case"}":if(!t)throw new a.default("ExtraCloseMissingOpen","Extra close brace or missing open brace");return null;case"\\":return this.i++,"\\"+this.GetCS();case"{":for(var T=++this.i,e=1;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"\\":this.i++;break;case"{":e++;break;case"}":if(0==--e)return this.string.slice(T,this.i-1)}throw new a.default("MissingCloseBrace","Missing close brace")}var r=this.getCodePoint();return this.i+=r.length,r},Q.prototype.GetBrackets=function(Q,t){if("["!==this.GetNext())return t;for(var T=++this.i,e=0;this.i<this.string.length;)switch(this.string.charAt(this.i++)){case"{":e++;break;case"\\":this.i++;break;case"}":if(e--<=0)throw new a.default("ExtraCloseLooking","Extra close brace while looking for %1","']'");break;case"]":if(0===e)return this.string.slice(T,this.i-1)}throw new a.default("MissingCloseBracket","Could not find closing ']' for argument to %1",this.currentCS)},Q.prototype.GetDelimiter=function(Q,t){var T=this.GetNext();if(this.i+=T.length,this.i<=this.string.length&&("\\"===T?T+=this.GetCS():"{"===T&&t&&(this.i--,T=this.GetArgument(Q)),this.contains("delimiter",T)))return this.convertDelimiter(T);throw new a.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},Q.prototype.GetDimen=function(Q){if("{"===this.GetNext()){var t=this.GetArgument(Q),T=r(i.default.matchDimen(t),2),e=T[0],n=T[1];if(e)return e+n}else{t=this.string.slice(this.i);var o=r(i.default.matchDimen(t,!0),3),s=(e=o[0],n=o[1],o[2]);if(e)return this.i+=s,e+n}throw new a.default("MissingDimOrUnits","Missing dimension or its units for %1",this.currentCS)},Q.prototype.GetUpTo=function(Q,t){for(;this.nextIsSpace();)this.i++;for(var T=this.i,e=0;this.i<this.string.length;){var r=this.i,n=this.GetNext();switch(this.i+=n.length,n){case"\\":n+=this.GetCS();break;case"{":e++;break;case"}":if(0===e)throw new a.default("ExtraCloseLooking","Extra close brace while looking for %1",t);e--}if(0===e&&n===t)return this.string.slice(T,r)}throw new a.default("TokenNotFoundForCommand","Could not find %1 for %2",t,this.currentCS)},Q.prototype.ParseArg=function(t){return new Q(this.GetArgument(t),this.stack.env,this.configuration).mml()},Q.prototype.ParseUpTo=function(t,T){return new Q(this.GetUpTo(t,T),this.stack.env,this.configuration).mml()},Q.prototype.GetDelimiterArg=function(Q){var t=i.default.trimSpaces(this.GetArgument(Q));if(""===t)return null;if(this.contains("delimiter",t))return t;throw new a.default("MissingOrUnrecognizedDelim","Missing or unrecognized delimiter for %1",this.currentCS)},Q.prototype.GetStar=function(){var Q="*"===this.GetNext();return Q&&this.i++,Q},Q.prototype.create=function(Q){for(var t,T=[],e=1;e<arguments.length;e++)T[e-1]=arguments[e];return(t=this.configuration.nodeFactory).create.apply(t,n([Q],T))},Q}();t.default=l},function(Q,t,T){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TexConstant=void 0,function(Q){Q.Variant={NORMAL:"normal",BOLD:"bold",ITALIC:"italic",BOLDITALIC:"bold-italic",DOUBLESTRUCK:"double-struck",FRAKTUR:"fraktur",BOLDFRAKTUR:"bold-fraktur",SCRIPT:"script",BOLDSCRIPT:"bold-script",SANSSERIF:"sans-serif",BOLDSANSSERIF:"bold-sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",MONOSPACE:"monospace",INITIAL:"inital",TAILED:"tailed",LOOPED:"looped",STRETCHED:"stretched",CALLIGRAPHIC:"-tex-calligraphic",OLDSTYLE:"-tex-oldstyle"},Q.Form={PREFIX:"prefix",INFIX:"infix",POSTFIX:"postfix"},Q.LineBreak={AUTO:"auto",NEWLINE:"newline",NOBREAK:"nobreak",GOODBREAK:"goodbreak",BADBREAK:"badbreak"},Q.LineBreakStyle={BEFORE:"before",AFTER:"after",DUPLICATE:"duplicate",INFIXLINBREAKSTYLE:"infixlinebreakstyle"},Q.IndentAlign={LEFT:"left",CENTER:"center",RIGHT:"right",AUTO:"auto",ID:"id",INDENTALIGN:"indentalign"},Q.IndentShift={INDENTSHIFT:"indentshift"},Q.LineThickness={THIN:"thin",MEDIUM:"medium",THICK:"thick"},Q.Notation={LONGDIV:"longdiv",ACTUARIAL:"actuarial",PHASORANGLE:"phasorangle",RADICAL:"radical",BOX:"box",ROUNDEDBOX:"roundedbox",CIRCLE:"circle",LEFT:"left",RIGHT:"right",TOP:"top",BOTTOM:"bottom",UPDIAGONALSTRIKE:"updiagonalstrike",DOWNDIAGONALSTRIKE:"downdiagonalstrike",VERTICALSTRIKE:"verticalstrike",HORIZONTALSTRIKE:"horizontalstrike",NORTHEASTARROW:"northeastarrow",MADRUWB:"madruwb",UPDIAGONALARROW:"updiagonalarrow"},Q.Align={TOP:"top",BOTTOM:"bottom",CENTER:"center",BASELINE:"baseline",AXIS:"axis",LEFT:"left",RIGHT:"right"},Q.Lines={NONE:"none",SOLID:"solid",DASHED:"dashed"},Q.Side={LEFT:"left",RIGHT:"right",LEFTOVERLAP:"leftoverlap",RIGHTOVERLAP:"rightoverlap"},Q.Width={AUTO:"auto",FIT:"fit"},Q.Actiontype={TOGGLE:"toggle",STATUSLINE:"statusline",TOOLTIP:"tooltip",INPUT:"input"},Q.Length={VERYVERYTHINMATHSPACE:"veryverythinmathspace",VERYTHINMATHSPACE:"verythinmathspace",THINMATHSPACE:"thinmathspace",MEDIUMMATHSPACE:"mediummathspace",THICKMATHSPACE:"thickmathspace",VERYTHICKMATHSPACE:"verythickmathspace",VERYVERYTHICKMATHSPACE:"veryverythickmathspace",NEGATIVEVERYVERYTHINMATHSPACE:"negativeveryverythinmathspac