diff options
Diffstat (limited to 'utility')
-rw-r--r-- | utility/date-time.xsl | 243 | ||||
-rw-r--r-- | utility/formatter.xsl | 6 | ||||
-rw-r--r-- | utility/katex/katex.min.js | 1 | ||||
-rwxr-xr-x | utility/katex/wrapper | 16 |
4 files changed, 263 insertions, 3 deletions
diff --git a/utility/date-time.xsl b/utility/date-time.xsl new file mode 100644 index 0000000..ed51869 --- /dev/null +++ b/utility/date-time.xsl @@ -0,0 +1,243 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + +<!-- + +Source: https://www.getsymphony.com/download/xslt-utilities/view/20506/ + +Description: + +This is a date formatting utility. The named template "format-date" takes 2 parameters: + +1. date - [required] takes an ISO date (2005-12-01) +2. format - [optional] takes a format string. + +Format options: + +Y - year in 4 digits e.g. 1981, 1992, 2008 +y - year in 2 digits e.g. 81, 92, 08 +M - month as a full word e.g. January, March, September +m - month in 3 letters e.g. Jan, Mar, Sep +N - month in digits without leading zero +n - month in digits with leading zero +D - day with suffix and no leading zero e.g. 1st, 23rd +d - day in digits with leading zero e.g. 01, 09, 12, 25 +x - day in digits with no leading zero e.g. 1, 9, 12, 25 +T - time in 24-hours e.g. 18:30 +t - time in 12-hours e.g. 6:30pm +W - weekday as a full word e.g. Monday, Tuesday +w - weekday in 3 letters e.g. Mon, Tue, Wed + +Examples: + +M => January +d M => 21 September +m D, y => Sep 21st, 81 +n-d-y => 09-21-81 +d/n/y => 21/09/81 +d/n/y t => 21/09/81 6:30pm + +--> + +<xsl:template name="format-date"> + <xsl:param name="date"/> + <xsl:param name="format" select="'D M, Y'"/> + <xsl:choose> + <xsl:when test="string-length($format) <= 10"> + <xsl:call-template name="date-controller"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$format"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:text>Error: format parameter is not correctly set. You have: </xsl:text> + <xsl:value-of select="string-length($format)"/> + <xsl:text>.</xsl:text> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<xsl:template name="date-controller"> + <xsl:param name="date"/> + <xsl:param name="format"/> + <xsl:param name="letter" select="substring($format,1,1)"/> + <xsl:param name="tletter" select="translate($letter,'DMNYTW','dmnytw')"/> + <xsl:choose> + <xsl:when test="$tletter = 'y'"> + <xsl:call-template name="format-year"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 'm'"> + <xsl:call-template name="format-month"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 'n'"> + <xsl:call-template name="format-month"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 'd'"> + <xsl:call-template name="format-day"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 'x'"> + <xsl:call-template name="format-day"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 't'"> + <xsl:call-template name="format-time"> + <xsl:with-param name="time" select="$date/@time"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:when test="$tletter = 'w'"> + <xsl:call-template name="format-weekday"> + <xsl:with-param name="weekday" select="$date/@weekday"/> + <xsl:with-param name="format" select="$letter"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$letter"/> + </xsl:otherwise> + </xsl:choose> + <xsl:if test="$letter = not('')"> + <xsl:call-template name="date-controller"> + <xsl:with-param name="date" select="$date"/> + <xsl:with-param name="format" select="substring($format,2)"/> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="format-year"> + <xsl:param name="date"/> + <xsl:param name="year" select="substring($date,1,4)"/> + <xsl:param name="format" select="'y'"/> + <xsl:choose> + <xsl:when test="$format = 'y'"> + <xsl:value-of select="substring($year,3)"/> + </xsl:when> + <xsl:when test="$format = 'Y'"> + <xsl:value-of select="$year"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="format-month"> + <xsl:param name="date"/> + <xsl:param name="month" select="format-number(substring($date,6,2), '##')"/> + <xsl:param name="format" select="'m'"/> + <xsl:param name="month-word"> + <xsl:choose> + <xsl:when test="$month = 01">January</xsl:when> + <xsl:when test="$month = 02">February</xsl:when> + <xsl:when test="$month = 03">March</xsl:when> + <xsl:when test="$month = 04">April</xsl:when> + <xsl:when test="$month = 05">May</xsl:when> + <xsl:when test="$month = 06">June</xsl:when> + <xsl:when test="$month = 07">July</xsl:when> + <xsl:when test="$month = 08">August</xsl:when> + <xsl:when test="$month = 09">September</xsl:when> + <xsl:when test="$month = 10">October</xsl:when> + <xsl:when test="$month = 11">November</xsl:when> + <xsl:when test="$month = 12">December</xsl:when> + </xsl:choose> + </xsl:param> + <xsl:choose> + <xsl:when test="$format = 'm'"> + <xsl:value-of select="substring($month-word, 1,3)"/> + </xsl:when> + <xsl:when test="$format = 'M'"> + <xsl:value-of select="$month-word"/> + </xsl:when> + <xsl:when test="$format = 'n'"> + <xsl:value-of select="format-number($month, '00')"/> + </xsl:when> + <xsl:when test="$format = 'N'"> + <xsl:value-of select="format-number($month, '0')"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="format-day"> + <xsl:param name="date"/> + <xsl:param name="day" select="format-number(substring($date,9,2),'00')"/> + <xsl:param name="format" select="'d'"/> + <xsl:param name="suffix"> + <xsl:choose> + <xsl:when test="(substring($day,2) = 1) and not(substring($day,1,1) = 1)">st</xsl:when> + <xsl:when test="(substring($day,2) = 2) and not(substring($day,1,1) = 1)">nd</xsl:when> + <xsl:when test="(substring($day,2) = 3) and not(substring($day,1,1) = 1)">rd</xsl:when> + <xsl:otherwise>th</xsl:otherwise> + </xsl:choose> + </xsl:param> + <xsl:choose> + <xsl:when test="$format = 'd'"> + <xsl:value-of select="$day"/> + </xsl:when> + <xsl:when test="$format = 'x'"> + <xsl:value-of select="format-number($day,'0')"/> + </xsl:when> + <xsl:when test="$format = 'D'"> + <xsl:value-of select="format-number($day,'0')"/> + <xsl:value-of select="$suffix"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="format-time"> + <xsl:param name="time"/> + <xsl:param name="hour" select="substring-before($time, ':')"/> + <xsl:param name="minute" select="substring-after($time, ':')"/> + <xsl:param name="format" select="'T'"/> + <xsl:choose> + <xsl:when test="$format = 'T'"> + <xsl:value-of select="$time"/> + </xsl:when> + <xsl:when test="$format = 't'"> + <xsl:choose> + <xsl:when test="$hour mod 12 = 0">12</xsl:when> + <xsl:otherwise><xsl:value-of select="($hour mod 12)"/></xsl:otherwise> + </xsl:choose> + <xsl:value-of select="concat(':',$minute)"/> + <xsl:choose> + <xsl:when test="$hour < 12">am</xsl:when> + <xsl:otherwise>pm</xsl:otherwise> + </xsl:choose> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template name="format-weekday"> + <xsl:param name="weekday"/> + <xsl:param name="format" select="'w'"/> + <xsl:param name="result"> + <xsl:choose> + <xsl:when test="$weekday = 1">Monday</xsl:when> + <xsl:when test="$weekday = 2">Tuesday</xsl:when> + <xsl:when test="$weekday = 3">Wednesday</xsl:when> + <xsl:when test="$weekday = 4">Thursday</xsl:when> + <xsl:when test="$weekday = 5">Friday</xsl:when> + <xsl:when test="$weekday = 6">Saturday</xsl:when> + <xsl:when test="$weekday = 7">Sunday</xsl:when> + </xsl:choose> + </xsl:param> + <xsl:choose> + <xsl:when test="$format = 'W'"> + <xsl:value-of select="$result"/> + </xsl:when> + <xsl:when test="$format = 'w'"> + <xsl:value-of select="substring($result,1,3)"/> + </xsl:when> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> diff --git a/utility/formatter.xsl b/utility/formatter.xsl index ec6db47..9198f36 100644 --- a/utility/formatter.xsl +++ b/utility/formatter.xsl @@ -25,7 +25,7 @@ <xsl:variable name="formatted_expression"> <xsl:call-template name="plain_formatter"> <xsl:with-param name="format"> - <xsl:text>katex </xsl:text> + <xsl:text>./utility/katex/wrapper </xsl:text> <xsl:value-of select="$arguments"/> </xsl:with-param> <xsl:with-param name="source" select="$source"/> @@ -107,7 +107,7 @@ <xsl:when test="contains(@class, 'display')"> <p class="math"> <xsl:call-template name="math_highlighter"> - <xsl:with-param name="source" select="text()"/> + <xsl:with-param name="source" select="substring(text(),3,string-length(text())-4)"/> <xsl:with-param name="arguments"> <xsl:text>--display-mode</xsl:text> </xsl:with-param> @@ -117,7 +117,7 @@ <xsl:otherwise> <span class="math"> <xsl:call-template name="math_highlighter"> - <xsl:with-param name="source" select="text()"/> + <xsl:with-param name="source" select="substring(text(),3,string-length(text())-4)"/> </xsl:call-template> </span> </xsl:otherwise> diff --git a/utility/katex/katex.min.js b/utility/katex/katex.min.js new file mode 100644 index 0000000..d574cc3 --- /dev/null +++ b/utility/katex/katex.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}(this,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=79)}([function(e,t,r){"use strict";var n=r(31),a=r.n(n),i=r(70),o=r.n(i),s=r(13),l=r(36),u=r(28),c=r(8),h=r(141),p=r(21),m=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xa3"],f=function(e,t,r){return u.a[r][e]&&u.a[r][e].replace&&(e=u.a[r][e].replace),{value:e,metrics:l.a.getCharacterMetrics(e,t,r)}},d=function(e,t,r,n,a){var i=f(e,t,r),o=i.metrics;e=i.value;var l=void 0;if(o){var u=o.italic;"text"===r&&(u=0),l=new s.a.symbolNode(e,o.height,o.depth,u,o.skew,o.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"'"),l=new s.a.symbolNode(e,0,0,0,0,0,a);if(n){l.maxFontSize=n.sizeMultiplier,n.style.isTight()&&l.classes.push("mtight");var c=n.getColor();c&&(l.style.color=c)}return l},v=function(e,t,r,n,a){if("mathord"===a){var i=g(e,t,r,n);return d(e,i.fontName,t,r,n.concat([i.fontClass]))}if("textord"===a){if("ams"===(u.a[t][e]&&u.a[t][e].font)){var o=w("amsrm",r.fontWeight,r.fontShape);return d(e,o,t,r,n.concat("amsrm",r.fontWeight,r.fontShape))}var s=w("textrm",r.fontWeight,r.fontShape);return d(e,s,t,r,n.concat(r.fontWeight,r.fontShape))}throw new Error("unexpected type: "+a+" in mathDefault")},g=function(e,t,r,n){return/[0-9]/.test(e.charAt(0))||c.a.contains(m,e)?{fontName:"Main-Italic",fontClass:"mainit"}:{fontName:"Math-Italic",fontClass:"mathit"}},b=function(e){var t=0,r=0,n=0,i=!0,o=!1,s=void 0;try{for(var l,u=a()(e.children);!(i=(l=u.next()).done);i=!0){var c=l.value;c.height>t&&(t=c.height),c.depth>r&&(r=c.depth),c.maxFontSize>n&&(n=c.maxFontSize)}}catch(e){o=!0,s=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw s}}e.height=t,e.depth=r,e.maxFontSize=n},y=function(e,t,r,n){var a=new s.a.span(e,t,r,n);return b(a),a},x=function(e,t,r,n){return new s.a.span(e,t,r,n)},w=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:throw new Error("Invalid font provided: "+e)}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},k={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},S={vec:["vec",.471,.714]};t.a={fontMap:k,makeSymbol:d,mathsym:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r&&r.font&&"boldsymbol"===r.font&&f(e,"Main-Bold",t).metrics?d(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===u.a[t][e].font?d(e,"Main-Regular",t,r,n):d(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:y,makeSvgSpan:x,makeLineSpan:function(e,t,r){var n=y([e],[],t);return n.height=r||t.fontMetrics().defaultRuleThickness,n.style.borderBottomWidth=n.height+"em",n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new s.a.anchor(e,t,r,n);return b(a),a},makeFragment:function(e){var t=new s.a.documentFragment(e);return b(t),t},makeVList:function(e,t){var r=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,i=n,o=1;o<t.length;o++){var s=-t[o].shift-i-t[o].elem.depth,l=s-(t[o-1].elem.height+t[o-1].elem.depth);i+=s,r.push({type:"kern",size:l}),r.push(t[o])}return{children:r,depth:n}}var u=void 0;if("top"===e.positionType){var c=e.positionData,h=!0,p=!1,m=void 0;try{for(var f,d=a()(e.children);!(h=(f=d.next()).done);h=!0){var v=f.value;c-="kern"===v.type?v.size:v.elem.height+v.elem.depth}}catch(e){p=!0,m=e}finally{try{!h&&d.return&&d.return()}finally{if(p)throw m}}u=c}else if("bottom"===e.positionType)u=-e.positionData;else{var g=e.children[0];if("elem"!==g.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)u=-g.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");u=-g.elem.depth}}return{children:e.children,depth:u}}(e),n=r.children,i=r.depth,o=0,l=!0,u=!1,c=void 0;try{for(var h,p=a()(n);!(l=(h=p.next()).done);l=!0){var m=h.value;if("elem"===m.type){var f=m.elem;o=Math.max(o,f.maxFontSize,f.height)}}}catch(e){u=!0,c=e}finally{try{!l&&p.return&&p.return()}finally{if(u)throw c}}o+=2;var d=y(["pstrut"],[]);d.style.height=o+"em";var v=[],g=i,b=i,x=i,w=!0,k=!1,S=void 0;try{for(var M,z=a()(n);!(w=(M=z.next()).done);w=!0){var T=M.value;if("kern"===T.type)x+=T.size;else{var O=T.elem,A=T.wrapperClasses||[],N=T.wrapperStyle||{},B=y(A,[d,O],void 0,N);B.style.top=-o-x-O.depth+"em",T.marginLeft&&(B.style.marginLeft=T.marginLeft),T.marginRight&&(B.style.marginRight=T.marginRight),v.push(B),x+=O.height+O.depth}g=Math.min(g,x),b=Math.max(b,x)}}catch(e){k=!0,S=e}finally{try{!w&&z.return&&z.return()}finally{if(k)throw S}}var C=y(["vlist"],v);C.style.height=b+"em";var j=void 0;if(g<0){var E=y([],[]),q=y(["vlist"],[E]);q.style.height=-g+"em";var I=y(["vlist-s"],[new s.a.symbolNode("\u200b")]);j=[y(["vlist-r"],[C,I]),y(["vlist-r"],[q])]}else j=[y(["vlist-r"],[C])];var R=y(["vlist-t"],j);return 2===j.length&&R.classes.push("vlist-t2"),R.height=b,R.depth=-g,R},makeOrd:function(e,t,r){var n=e.mode,a=e.value,i=["mord"],s="math"===n||"text"===n&&t.font,l=s?t.font:t.fontFamily;if(55349===a.charCodeAt(0)){var u=Object(h.a)(a,n),p=o()(u,2),b=p[0],y=p[1];return d(a,b,n,t,[y])}if(l){var x=void 0,S=void 0;if("boldsymbol"===l){var M=f(a,"Math-BoldItalic",n).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};x=M.fontName,S=[M.fontClass]}else if("mathit"===l||c.a.contains(m,a)){var z=g(a,n,t,i);x=z.fontName,S=[z.fontClass]}else s?(x=k[l].fontName,S=[l]):(x=w(l,t.fontWeight,t.fontShape),S=[l,t.fontWeight,t.fontShape]);return f(a,x,n).metrics?d(a,x,n,t,i.concat(S)):v(a,n,t,i,r)}return v(a,n,t,i,r)},makeVerb:function(e,t){var r=e.value.body;return r=e.value.star?r.replace(/ /g,"\u2423"):r.replace(/ /g,"\xa0")},makeGlue:function(e,t){var r=y(["mspace"],[],t),n=Object(p.a)(e,t);return r.style.marginRight=n+"em",r},staticSvg:function(e,t){var r=o()(S[e],3),n=r[0],a=r[1],i=r[2],l=new s.a.pathNode(n),u=new s.a.svgNode([l],{width:a+"em",height:i+"em",style:"width:"+a+"em",viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=x(["overlay"],[u],t);return c.height=i,c.style.height=i+"em",c.style.width=a+"em",c},svgData:S,tryCombineChars:function(e){for(var t=0;t<e.length-1;t++)e[t].tryCombine(e[t+1])&&(e.splice(t+1,1),t--);return e},spacingFunctions:{"\\qquad":{size:"2em",className:"qquad"},"\\quad":{size:"1em",className:"quad"},"\\enspace":{size:"0.5em",className:"enspace"},"\\;":{size:"0.277778em",className:"thickspace"},"\\:":{size:"0.22222em",className:"mediumspace"},"\\,":{size:"0.16667em",className:"thinspace"},"\\!":{size:"-0.16667em",className:"negativethinspace"},"\\nobreak":{size:"0em",className:"nobreak"},"\\allowbreak":{size:"0em",className:"allowbreak"}},regularSpace:{" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}}}},function(e,t,r){"use strict";r.d(t,"a",function(){return o}),t.b=function(e){for(var t=e.type,r=(e.nodeType,e.names),i=e.props,s=e.handler,l=e.htmlBuilder,u=e.mathmlBuilder,c={type:t,numArgs:i.numArgs,argTypes:i.argTypes,greediness:void 0===i.greediness?1:i.greediness,allowedInText:!!i.allowedInText,allowedInMath:void 0===i.allowedInMath||i.allowedInMath,numOptionalArgs:i.numOptionalArgs||0,infix:!!i.infix,consumeMode:i.consumeMode,handler:s},h=0;h<r.length;++h)o[r[h]]=c;t&&(l&&(n.d[t]=l),u&&(a.d[t]=u))},r.d(t,"c",function(){return s});var n=r(4),a=r(3),i=r(6),o=(r(13),{});var s=function(e){var t=Object(i.b)(e,"ordgroup");return t?t.value:[e]}},function(e,t,r){"use strict";var n=r(31),a=r.n(n),i=r(9),o=r.n(i),s=r(11),l=r.n(s),u=r(8),c=function(){function e(t,r){o()(this,e),this.type=t,this.attributes={},this.children=r||[]}return l()(e,[{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"toNode",value:function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);var r=!0,n=!1,i=void 0;try{for(var o,s=a()(this.children);!(r=(o=s.next()).done);r=!0){var l=o.value;e.appendChild(l.toNode())}}catch(e){n=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(n)throw i}}return e}},{key:"toMarkup",value:function(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=u.a.escape(this.attributes[t]),e+='"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}},{key:"toText",value:function(){return"mspace"===this.type?"0.16667em"===this.attributes.width?"\u2006":" ":this.children.map(function(e){return e.toText()}).join("")}}]),e}(),h=function(){function e(t){o()(this,e),this.text=t}return l()(e,[{key:"toNode",value:function(){return document.createTextNode(this.text)}},{key:"toMarkup",value:function(){return u.a.escape(this.text)}},{key:"toText",value:function(){return this.text}}]),e}();t.a={MathNode:c,TextNode:h}},function(e,t,r){"use strict";r.d(t,"e",function(){return h}),r.d(t,"f",function(){return p}),r.d(t,"d",function(){return f}),r.d(t,"a",function(){return v}),r.d(t,"b",function(){return g}),t.c=function(e,t,r){var a=v(e,r),o=void 0;o=1===a.length&&u.a.contains(["mrow","mtable"],a[0].type)?a[0]:new i.a.MathNode("mrow",a);var s=new i.a.MathNode("annotation",[new i.a.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new i.a.MathNode("semantics",[o,s]),c=new i.a.MathNode("math",[l]);return n.a.makeSpan(["katex-mathml"],[c])};var n=r(0),a=r(36),i=r(2),o=r(5),s=r(12),l=r(28),u=r(8),c=r(32),h=function(e,t){return l.a[t][e]&&l.a[t][e].replace&&55349!==e.charCodeAt(0)&&(e=l.a[t][e].replace),new i.a.TextNode(e)},p=function(e,t){for(var r=[],n=null,a=0;a<e.length;a++){var o=g(e[a],t);"mtext"===o.type&&null!==n?Array.prototype.push.apply(n.children,o.children):(r.push(o),n="mtext"===o.type?o:null)}return 1===r.length?r[0]:new i.a.MathNode("mrow",r)},m=function(e,t){var r=t.font;if(!r)return null;var i=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"bold-italic";var o=e.value;if(u.a.contains(["\\imath","\\jmath"],o))return null;l.a[i][o]&&l.a[i][o].replace&&(o=l.a[i][o].replace);var s=n.a.fontMap[r].fontName;return a.a.getCharacterMetrics(o,s,i)?n.a.fontMap[r].variant:null},f={},d={mi:"italic",mn:"normal",mtext:"normal"};f.mathord=function(e,t){var r=new i.a.MathNode("mi",[h(e.value,e.mode)]),n=m(e,t)||"italic";return n!==d[r.type]&&r.setAttribute("mathvariant",n),r},f.textord=function(e,t){var r=h(e.value,e.mode),n=m(e,t)||"normal",a=void 0;return a="text"===e.mode?new i.a.MathNode("mtext",[r]):/[0-9]/.test(e.value)?new i.a.MathNode("mn",[r]):"\\prime"===e.value?new i.a.MathNode("mo",[r]):new i.a.MathNode("mi",[r]),n!==d[a.type]&&a.setAttribute("mathvariant",n),a},f.bin=function(e,t){var r=new i.a.MathNode("mo",[h(e.value,e.mode)]),n=m(e,t);return"bold-italic"===n&&r.setAttribute("mathvariant",n),r},f.rel=function(e){return new i.a.MathNode("mo",[h(e.value,e.mode)])},f.open=function(e){return new i.a.MathNode("mo",[h(e.value,e.mode)])},f.close=function(e){return new i.a.MathNode("mo",[h(e.value,e.mode)])},f.inner=function(e){return new i.a.MathNode("mo",[h(e.value,e.mode)])},f.punct=function(e){var t=new i.a.MathNode("mo",[h(e.value,e.mode)]);return t.setAttribute("separator","true"),t},f.ordgroup=function(e,t){var r=v(e.value,t);return new i.a.MathNode("mrow",r)},f.supsub=function(e,t){var r=!1,n=void 0;e.value.base&&"horizBrace"===e.value.base.value.type&&!!e.value.sup===e.value.base.value.isOver&&(r=!0,n=e.value.base.value.isOver);var a=[g(e.value.base,t,!0)];e.value.sub&&a.push(g(e.value.sub,t,!0)),e.value.sup&&a.push(g(e.value.sup,t,!0));var o=void 0;if(r)o=n?"mover":"munder";else if(e.value.sub)if(e.value.sup){var l=e.value.base;o=l&&l.value.limits&&t.style===s.a.DISPLAY?"munderover":"msubsup"}else{var u=e.value.base;o=u&&u.value.limits&&t.style===s.a.DISPLAY?"munder":"msub"}else{var c=e.value.base;o=c&&c.value.limits&&t.style===s.a.DISPLAY?"mover":"msup"}return new i.a.MathNode(o,a)},f.spacing=function(e){var t=void 0;return n.a.regularSpace.hasOwnProperty(e.value)?t=new i.a.MathNode("mtext",[new i.a.TextNode("\xa0")]):(t=new i.a.MathNode("mspace")).setAttribute("width",n.a.spacingFunctions[e.value].size),t},f.horizBrace=function(e,t){var r=c.a.mathMLnode(e.value.label);return new i.a.MathNode(e.value.isOver?"mover":"munder",[g(e.value.base,t),r])},f.xArrow=function(e,t){var r=c.a.mathMLnode(e.value.label),n=void 0,a=void 0;if(e.value.body){var o=g(e.value.body,t);e.value.below?(a=g(e.value.below,t),n=new i.a.MathNode("munderover",[r,a,o])):n=new i.a.MathNode("mover",[r,o])}else e.value.below?(a=g(e.value.below,t),n=new i.a.MathNode("munder",[r,a])):n=new i.a.MathNode("mover",[r]);return n},f.raisebox=function(e,t){var r=new i.a.MathNode("mpadded",[g(e.value.body,t)]),n=e.value.dy.value.number+e.value.dy.value.unit;return r.setAttribute("voffset",n),r},f.tag=function(e,t){var r=new i.a.MathNode("mtable",[new i.a.MathNode("mlabeledtr",[new i.a.MathNode("mtd",v(e.value.tag,t)),new i.a.MathNode("mtd",[new i.a.MathNode("mrow",v(e.value.body,t))])])]);return r.setAttribute("side","right"),r};var v=function(e,t){for(var r=[],n=0;n<e.length;n++){var a=e[n];r.push(g(a,t))}return r},g=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return new i.a.MathNode("mrow");if(f[e.type]){var n=f[e.type](e,t);return r&&"mrow"===n.type&&1===n.children.length?n.children[0]:n}throw new o.a("Got group of unknown type: '"+e.type+"'")}},function(e,t,r){"use strict";r.d(t,"a",function(){return g}),r.d(t,"e",function(){return w}),r.d(t,"d",function(){return k}),r.d(t,"b",function(){return S}),t.c=function(e,t){var r=null;1===(e=JSON.parse(a()(e))).length&&"tag"===e[0].type&&(r=e[0].value.tag,e=e[0].value.body);for(var n=g(e,t,!0),i=[],o=[],s=0;s<n.length;s++)if(o.push(n[s]),n[s].hasClass("mbin")||n[s].hasClass("mrel")||n[s].hasClass("allowbreak")){for(var l=!1;s<n.length-1&&n[s+1].hasClass("mspace");)s++,o.push(n[s]),n[s].hasClass("nobreak")&&(l=!0);l||(i.push(M(o,t)),o=[])}else n[s].hasClass("newline")&&(o.pop(),o.length>0&&(i.push(M(o,t)),o=[]),i.push(n[s]));o.length>0&&i.push(M(o,t));var u=void 0;r&&((u=M(g(r,t,!0))).classes=["tag"],i.push(u));var c=d(["katex-html"],i);if(c.setAttribute("aria-hidden","true"),r){var h=u.children[0];h.style.height=c.height+c.depth+"em",h.style.verticalAlign=-c.depth+"em"}return c};var n=r(90),a=r.n(n),i=r(42),o=r.n(i),s=r(5),l=r(12),u=r(0),c=r(13),h=r(21),p=r(8),m=r(32),f=r(142),d=u.a.makeSpan,v={display:l.a.DISPLAY,text:l.a.TEXT,script:l.a.SCRIPT,scriptscript:l.a.SCRIPTSCRIPT},g=function(e,t,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[null,null],a=[],i=0;i<e.length;i++){var s=S(e[i],t);s instanceof c.a.documentFragment?a.push.apply(a,o()(s.children)):a.push(s)}for(var l,h,m,g,w=[n[0]&&d([n[0]],[],t)].concat(o()(a.filter(function(e){return e&&"mspace"!==e.classes[0]})),[n[1]&&d([n[1]],[],t)]),k=1;k<w.length-1;k++){var M=b(w[k],"left");"mbin"===M.classes[0]&&(m=w[k-1],g=r,m?p.a.contains(["mbin","mopen","mrel","mop","mpunct"],y(m,"right")):g)&&(M.classes[0]="mord");var z=b(w[k],"right");"mbin"===z.classes[0]&&(l=w[k+1],h=r,l?p.a.contains(["mrel","mclose","mpunct"],y(l,"left")):h)&&(z.classes[0]="mord")}for(var T=[],O=0,A=0;A<a.length;A++)if(T.push(a[A]),"mspace"!==a[A].classes[0]&&O<w.length-1){0===O&&(T.pop(),A--);var N=y(w[O],"right"),B=y(w[O+1],"left");if(N&&B&&r){var C=x(w[O+1])?f.b[N][B]:f.a[N][B];if(C){var j=t;1===e.length&&("sizing"===e[0].type?j=t.havingSize(e[0].value.size):"styling"===e[0].type&&(j=t.havingStyle(v[e[0].value.style]))),T.push(u.a.makeGlue(C,j))}}O++}for(var E=0;E<T.length;E++)"\u0338"===T[E].value&&(T[E].style.position="absolute",T[E].style.paddingLeft="0.8em");return T},b=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right";if((t instanceof c.a.documentFragment||t instanceof c.a.anchor)&&t.children.length){if("right"===r)return e(t.children[t.children.length-1]);if("left"===r)return e(t.children[0])}return t},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"right";return e?(e=b(e,t),p.a.contains(["mord","mop","mbin","mrel","mopen","mclose","mpunct","minner"],e.classes[0])?e.classes[0]:null):null},x=function(e){return(e=b(e,"left")).hasClass("mtight")},w=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return d(t.concat(r))},k={mathord:function(e,t){return u.a.makeOrd(e,t,"mathord")},textord:function(e,t){return u.a.makeOrd(e,t,"textord")},bin:function(e,t){return u.a.mathsym(e.value,e.mode,t,["mbin"])},rel:function(e,t){return u.a.mathsym(e.value,e.mode,t,["mrel"])},open:function(e,t){return u.a.mathsym(e.value,e.mode,t,["mopen"])},close:function(e,t){return u.a.mathsym(e.value,e.mode,t,["mclose"])},inner:function(e,t){return u.a.mathsym(e.value,e.mode,t,["minner"])},punct:function(e,t){return u.a.mathsym(e.value,e.mode,t,["mpunct"])},ordgroup:function(e,t){return d(["mord"],g(e.value,t,!0),t)},supsub:function(e,t){if(n=t,(a=(r=e).value.base)&&("op"===a.type?a.value.limits&&(n.style.size===l.a.DISPLAY.size||a.value.alwaysHandleSupSub):"accent"===a.type?p.a.isCharacterBox(a.value.base):"horizBrace"===a.type&&!r.value.sub===a.value.isOver))return k[e.value.base.type](e,t);var r,n,a,i=S(e.value.base,t),o=void 0,s=void 0,h=t.fontMetrics(),m=void 0,f=0,v=0;e.value.sup&&(m=t.havingStyle(t.style.sup()),o=S(e.value.sup,m,t),p.a.isCharacterBox(e.value.base)||(f=i.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)),e.value.sub&&(m=t.havingStyle(t.style.sub()),s=S(e.value.sub,m,t),p.a.isCharacterBox(e.value.base)||(v=i.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier));var g=void 0;g=t.style===l.a.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2;var b=t.sizeMultiplier,x=.5/h.ptPerEm/b+"em",w=void 0;if(e.value.sup)if(e.value.sub){f=Math.max(f,g,o.depth+.25*h.xHeight),v=Math.max(v,h.sub2);var M=4*h.defaultRuleThickness;if(f-o.depth-(s.height-v)<M){v=M-(f-o.depth)+s.height;var z=.8*h.xHeight-(f-o.depth);z>0&&(f+=z,v-=z)}var T=[{type:"elem",elem:s,shift:v,marginRight:x},{type:"elem",elem:o,shift:-f,marginRight:x}];i instanceof c.a.symbolNode&&(T[0].marginLeft=-i.italic+"em"),w=u.a.makeVList({positionType:"individualShift",children:T},t)}else f=Math.max(f,g,o.depth+.25*h.xHeight),w=u.a.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:o,marginRight:x}]},t);else{v=Math.max(v,h.sub1,s.height-.8*h.xHeight);var O=[{type:"elem",elem:s,marginRight:x}];i instanceof c.a.symbolNode&&(O[0].marginLeft=-i.italic+"em"),w=u.a.makeVList({positionType:"shift",positionData:v,children:O},t)}var A=y(i)||"mord";return d([A],[i,d(["msupsub"],[w])],t)},spacing:function(e,t){if(u.a.regularSpace.hasOwnProperty(e.value)){var r=u.a.regularSpace[e.value].className;if("text"===e.mode){var n=u.a.makeOrd(e,t,"textord");return n.classes.push(r),n}return d(["mspace",r],[u.a.mathsym(e.value,e.mode,t)],t)}return d(["mspace",u.a.spacingFunctions[e.value].className],[],t)},horizBrace:function(e,t){var r=t.style,n="supsub"===e.type,a=void 0,i=void 0;n&&(e.value.sup?(i=t.havingStyle(r.sup()),a=S(e.value.sup,i,t)):(i=t.havingStyle(r.sub()),a=S(e.value.sub,i,t)),e=e.value.base);var o=S(e.value.base,t.havingBaseStyle(l.a.DISPLAY)),s=m.a.svgSpan(e,t),c=void 0;if(e.value.isOver?(c=u.a.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(c=u.a.makeVList({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var h=d(["mord",e.value.isOver?"mover":"munder"],[c],t);c=e.value.isOver?u.a.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:a}]},t):u.a.makeVList({positionType:"bottom",positionData:h.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:h}]},t)}return d(["mord",e.value.isOver?"mover":"munder"],[c],t)},xArrow:function(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=S(e.value.body,n,t);a.classes.push("x-arrow-pad");var i=void 0;e.value.below&&(n=t.havingStyle(r.sub()),(i=S(e.value.below,n,t)).classes.push("x-arrow-pad"));var o=m.a.svgSpan(e,t),s=-t.fontMetrics().axisHeight+.5*o.height,l=-t.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||"\\xleftequilibrium"===e.value.label)&&(l-=a.depth);var c=void 0;if(e.value.below){var h=-t.fontMetrics().axisHeight+i.height+.5*o.height+.111;c=u.a.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:o,shift:s},{type:"elem",elem:i,shift:h}]},t)}else c=u.a.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:o,shift:s}]},t);return c.children[0].children[0].children[1].classes.push("svg-align"),d(["mrel","x-arrow"],[c],t)},raisebox:function(e,t){var r=k.sizing({value:{value:[{type:"text",value:{body:e.value.value,font:"mathrm"}}],size:6}},t),n=Object(h.a)(e.value.dy.value,t);return u.a.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)}},S=function(e,t,r){if(!e)return d();if(k[e.type]){var n=k[e.type](e,t);if(r&&t.size!==r.size){n=d(t.sizingClasses(r),[n],t);var a=t.sizeMultiplier/r.sizeMultiplier;n.height*=a,n.depth*=a}return n}throw new s.a("Got group of unknown type: '"+e.type+"'")};function M(e,t){var r=d(["base"],e,t),n=d(["strut"]);return n.style.height=r.height+r.depth+"em",n.style.verticalAlign=-r.depth+"em",r.children.unshift(n),r}},function(e,t,r){"use strict";var n=r(9),a=r.n(n),i=(r(6),r(25),function e(t,r){a()(this,e);var n="KaTeX parse error: "+t,i=void 0,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start;var l=o.end;i===s.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var u=s.slice(i,l).replace(/[^]/g,"$&\u0332");n+=(i>15?"\u2026"+s.slice(i-15,i):s.slice(0,i))+u+(l+15<s.length?s.slice(l,l+15)+"\u2026":s.slice(l))}var c=new Error(n);return c.name="ParseError",c.__proto__=e.prototype,c.position=i,c});i.prototype.__proto__=Error.prototype,t.a=i},function(e,t,r){"use strict";t.a=function(e,t){var r=o(e,t);if(!r)throw new Error("Expected node of type "+t+", but got node of type "+e.type);return r},t.b=o;var n=r(9),a=r.n(n),i=r(37);function o(e,t){return e.type===t?e:null}t.c=function e(t,r,n,o,s){a()(this,e),this.type=t,this.value=r,this.mode=n,this.loc=i.a.range(o,s)}},function(e,t){var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,r){"use strict";var n=Array.prototype.indexOf,a=function(e,t){if(null==e)return-1;if(n&&e.indexOf===n)return e.indexOf(t);for(var r=e.length,a=0;a<r;a++)if(e[a]===t)return a;return-1},i=/([A-Z])/g,o={"&":"&",">":">","<":"<",'"':""","'":"'"},s=/[&><"']/g;var l=void 0;if("undefined"!=typeof document){var u=document.createElement("span");l="textContent"in u?function(e,t){e.textContent=t}:function(e,t){e.innerText=t}}var c=function e(t){return!!t&&("ordgroup"===t.type?1===t.value.length?e(t.value[0]):t:"color"===t.type?1===t.value.value.length?e(t.value.value[0]):t:"font"===t.type?e(t.value.body):t)};t.a={contains:function(e,t){return-1!==a(e,t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(s,function(e){return o[e]})},hyphenate:function(e){return e.replace(i,"-$1").toLowerCase()},indexOf:a,setTextContent:l,clearNode:function(e){l(e,"")},getBaseElem:c,isCharacterBox:function(e){var t=c(e);return"mathord"===t.type||"textord"===t.type||"bin"===t.type||"rel"===t.type||"inner"===t.type||"open"===t.type||"close"===t.type||"punct"===t.type}}},function(e,t,r){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,r){var n=r(49)("wks"),a=r(33),i=r(15).Symbol,o="function"==typeof i;(e.exports=function(e){return n[e]||(n[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=n},function(e,t,r){"use strict";t.__esModule=!0;var n,a=r(86),i=(n=a)&&n.__esModule?n:{default:n};t.default=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),(0,i.default)(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}()},function(e,t,r){"use strict";var n=r(9),a=r.n(n),i=r(11),o=r.n(i),s=function(){function e(t,r,n){a()(this,e),this.id=t,this.size=r,this.cramped=n}return o()(e,[{key:"sup",value:function(){return l[u[this.id]]}},{key:"sub",value:function(){return l[c[this.id]]}},{key:"fracNum",value:function(){return l[h[this.id]]}},{key:"fracDen",value:function(){return l[p[this.id]]}},{key:"cramp",value:function(){return l[m[this.id]]}},{key:"text",value:function(){return l[f[this.id]]}},{key:"isTight",value:function(){return this.size>=2}}]),e}(),l=[new s(0,0,!1),new s(1,0,!0),new s(2,1,!1),new s(3,1,!0),new s(4,2,!1),new s(5,2,!0),new s(6,3,!1),new s(7,3,!0)],u=[4,5,4,5,6,7,6,7],c=[5,5,5,5,7,7,7,7],h=[2,3,4,5,6,7,6,7],p=[3,3,5,5,7,7,7,7],m=[1,1,3,3,5,5,7,7],f=[0,1,2,3,2,3,2,3];t.a={DISPLAY:l[0],TEXT:l[2],SCRIPT:l[4],SCRIPTSCRIPT:l[6]}},function(e,t,r){"use strict";var n=r(113),a=r.n(n),i=r(116),o=r.n(i),s=r(129),l=r.n(s),u=r(74),c=r.n(u),h=r(9),p=r.n(h),m=r(11),f=r.n(m),d=r(56),v=r(8),g=r(140),b=function(e){for(var t=(e=e.slice()).length-1;t>=0;t--)e[t]||e.splice(t,1);return e.join(" ")},y=function(){function e(t,r,n,a){if(p()(this,e),this.classes=t||[],this.children=r||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=c()({},a),n){n.style.isTight()&&this.classes.push("mtight");var i=n.getColor();i&&(this.style.color=i)}}return f()(e,[{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"hasClass",value:function(e){return v.a.contains(this.classes,e)}},{key:"tryCombine",value:function(e){return!1}},{key:"tagName",value:function(){throw new Error("use of generic HtmlDomContainer tagName")}},{key:"toNode",value:function(){var e=document.createElement(this.tagName());e.className=b(this.classes);for(var t in this.style)Object.prototype.hasOwnProperty.call(this.style,t)&&(e.style[t]=this.style[t]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&e.setAttribute(r,this.attributes[r]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}},{key:"toMarkup",value:function(){var e="<"+this.tagName();this.classes.length&&(e+=' class="'+v.a.escape(b(this.classes))+'"');var t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=v.a.hyphenate(r)+":"+this.style[r]+";");t&&(e+=' style="'+v.a.escape(t)+'"');for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&(e+=" "+n+'="',e+=v.a.escape(this.attributes[n]),e+='"');e+=">";for(var a=0;a<this.children.length;a++)e+=this.children[a].toMarkup();return e+="</"+this.tagName()+">"}}]),e}(),x=function(e){function t(e,r,n,i){return p()(this,t),o()(this,(t.__proto__||a()(t)).call(this,e,r,n,i))}return l()(t,e),f()(t,[{key:"tagName",value:function(){return"span"}}]),t}(y),w=function(e){function t(e,r,n,i){p()(this,t);var s=o()(this,(t.__proto__||a()(t)).call(this,r,n,i));return s.setAttribute("href",e),s}return l()(t,e),f()(t,[{key:"tagName",value:function(){return"a"}}]),t}(y),k=function(){function e(t){p()(this,e),this.children=t||[],this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0}return f()(e,[{key:"hasClass",value:function(e){return v.a.contains(this.classes,e)}},{key:"tryCombine",value:function(e){return!1}},{key:"toNode",value:function(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}},{key:"toMarkup",value:function(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}}]),e}(),S={"\xee":"\u0131\u0302","\xef":"\u0131\u0308","\xed":"\u0131\u0301","\xec":"\u0131\u0300"},M=function(){function e(t,r,n,a,i,o,s,l){p()(this,e),this.value=t,this.height=r||0,this.depth=n||0,this.italic=a||0,this.skew=i||0,this.width=o||0,this.classes=s||[],this.style=c()({},l),this.maxFontSize=0;var u=Object(d.a)(this.value.charCodeAt(0));u&&this.classes.push(u+"_fallback"),/[\xee\xef\xed\xec]/.test(this.value)&&(this.value=S[this.value])}return f()(e,[{key:"hasClass",value:function(e){return v.a.contains(this.classes,e)}},{key:"tryCombine",value:function(t){if(!t||!(t instanceof e)||this.italic>0||b(this.classes)!==b(t.classes)||this.skew!==t.skew||this.maxFontSize!==t.maxFontSize)return!1;for(var r in this.style)if(this.style.hasOwnProperty(r)&&this.style[r]!==t.style[r])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&this.style[n]!==t.style[n])return!1;return this.value+=t.value,this.height=Math.max(this.height,t.height),this.depth=Math.max(this.depth,t.depth),this.italic=t.italic,!0}},{key:"toNode",value:function(){var e=document.createTextNode(this.value),t=null;this.italic>0&&((t=document.createElement("span")).style.marginRight=this.italic+"em"),this.classes.length>0&&((t=t||document.createElement("span")).className=b(this.classes));for(var r in this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}},{key:"toMarkup",value:function(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=v.a.escape(b(this.classes)),t+='"');var r="";this.italic>0&&(r+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=v.a.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+v.a.escape(r)+'"');var a=v.a.escape(this.value);return e?(t+=">",t+=a,t+="</span>"):a}}]),e}(),z=function(){function e(t,r){p()(this,e),this.children=t||[],this.attributes=r||{}}return f()(e,[{key:"toNode",value:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}},{key:"toMarkup",value:function(){var e="<svg";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}]),e}(),T=function(){function e(t,r){p()(this,e),this.pathName=t,this.alternate=r}return f()(e,[{key:"toNode",value:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",g.a.path[this.pathName]),e}},{key:"toMarkup",value:function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+g.a.path[this.pathName]+"'/>"}}]),e}(),O=function(){function e(t){p()(this,e),this.attributes=t||{}}return f()(e,[{key:"toNode",value:function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}},{key:"toMarkup",value:function(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+"='"+this.attributes[t]+"'");return e+="/>"}}]),e}();t.a={span:x,anchor:w,documentFragment:k,symbolNode:M,svgNode:z,pathNode:T,lineNode:O}},function(e,t,r){var n=r(18),a=r(60),i=r(38),o=Object.defineProperty;t.f=r(19)?Object.defineProperty:function(e,t,r){if(n(e),t=i(t,!0),n(r),a)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,r){var n=r(15),a=r(7),i=r(40),o=r(24),s="prototype",l=function(e,t,r){var u,c,h,p=e&l.F,m=e&l.G,f=e&l.S,d=e&l.P,v=e&l.B,g=e&l.W,b=m?a:a[t]||(a[t]={}),y=b[s],x=m?n:f?n[t]:(n[t]||{})[s];m&&(r=t);for(u in r)(c=!p&&x&&void 0!==x[u])&&u in b||(h=c?x[u]:r[u],b[u]=m&&"function"!=typeof x[u]?r[u]:v&&c?i(h,n):g&&x[u]==h?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[s]=e[s],t}(h):d&&"function"==typeof h?i(Function.call,h):h,d&&((b.virtual||(b.virtual={}))[u]=h,e&l.R&&y&&!y[u]&&o(y,u,h)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(22);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){e.exports=!r(23)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){var n=r(65),a=r(44);e.exports=function(e){return n(a(e))}},function(e,t,r){"use strict";r.d(t,"b",function(){return o}),r.d(t,"a",function(){return s});var n=r(5),a=(r(57),{pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375}),i={ex:!0,em:!0,mu:!0},o=function(e){return"string"!=typeof e&&(e=e.unit),e in a||e in i||"ex"===e},s=function(e,t){var r=void 0;if(e.unit in a)r=a[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var i=void 0;if(i=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n.a("Invalid unit: '"+e.unit+"'");r=i.fontMetrics().quad}i!==t&&(r*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(14),a=r(29);e.exports=r(19)?function(e,t,r){return n.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";r.d(t,"a",function(){return l});var n=r(9),a=r.n(n),i=r(11),o=r.n(i),s=r(37),l=function(){function e(t,r){a()(this,e),this.text=t,this.loc=r}return o()(e,[{key:"range",value:function(t,r){return new e(r,s.a.range(this,t))}}]),e}()},function(e,t){e.exports={}},function(e,t,r){var n=r(64),a=r(50);e.exports=Object.keys||function(e){return n(e,a)}},function(e,t,r){"use strict";t.b=a,r.d(t,"c",function(){return q});var n={math:{},text:{}};function a(e,t,r,a,i,o){n[e][i]={font:t,group:r,replace:a},o&&a&&(n[e][a]=n[e][i])}t.a=n;var i="math",o="text",s="main",l="ams",u="accent-token",c="bin",h="close",p="inner",m="mathord",f="op-token",d="open",v="punct",g="rel",b="spacing",y="textord";a(i,s,g,"\u2261","\\equiv",!0),a(i,s,g,"\u227a","\\prec",!0),a(i,s,g,"\u227b","\\succ",!0),a(i,s,g,"\u223c","\\sim",!0),a(i,s,g,"\u22a5","\\perp"),a(i,s,g,"\u2aaf","\\preceq",!0),a(i,s,g,"\u2ab0","\\succeq",!0),a(i,s,g,"\u2243","\\simeq",!0),a(i,s,g,"\u2223","\\mid",!0),a(i,s,g,"\u226a","\\ll",!0),a(i,s,g,"\u226b","\\gg",!0),a(i,s,g,"\u224d","\\asymp",!0),a(i,s,g,"\u2225","\\parallel"),a(i,s,g,"\u22c8","\\bowtie",!0),a(i,s,g,"\u2323","\\smile",!0),a(i,s,g,"\u2291","\\sqsubseteq",!0),a(i,s,g,"\u2292","\\sqsupseteq",!0),a(i,s,g,"\u2250","\\doteq",!0),a(i,s,g,"\u2322","\\frown",!0),a(i,s,g,"\u220b","\\ni",!0),a(i,s,g,"\u221d","\\propto",!0),a(i,s,g,"\u22a2","\\vdash",!0),a(i,s,g,"\u22a3","\\dashv",!0),a(i,s,g,"\u220b","\\owns"),a(i,s,v,".","\\ldotp"),a(i,s,v,"\u22c5","\\cdotp"),a(i,s,y,"#","\\#"),a(o,s,y,"#","\\#"),a(i,s,y,"&","\\&"),a(o,s,y,"&","\\&"),a(i,s,y,"\u2135","\\aleph",!0),a(i,s,y,"\u2200","\\forall",!0),a(i,s,y,"\u210f","\\hbar",!0),a(i,s,y,"\u2203","\\exists",!0),a(i,s,y,"\u2207","\\nabla",!0),a(i,s,y,"\u266d","\\flat",!0),a(i,s,y,"\u2113","\\ell",!0),a(i,s,y,"\u266e","\\natural",!0),a(i,s,y,"\u2663","\\clubsuit",!0),a(i,s,y,"\u2118","\\wp",!0),a(i,s,y,"\u266f","\\sharp",!0),a(i,s,y,"\u2662","\\diamondsuit",!0),a(i,s,y,"\u211c","\\Re",!0),a(i,s,y,"\u2661","\\heartsuit",!0),a(i,s,y,"\u2111","\\Im",!0),a(i,s,y,"\u2660","\\spadesuit",!0),a(o,s,y,"\xa7","\\S",!0),a(o,s,y,"\xb6","\\P",!0),a(i,s,y,"\u2020","\\dag"),a(o,s,y,"\u2020","\\dag"),a(o,s,y,"\u2020","\\textdagger"),a(i,s,y,"\u2021","\\ddag"),a(o,s,y,"\u2021","\\ddag"),a(o,s,y,"\u2020","\\textdaggerdbl"),a(i,s,h,"\u23b1","\\rmoustache",!0),a(i,s,d,"\u23b0","\\lmoustache",!0),a(i,s,h,"\u27ef","\\rgroup",!0),a(i,s,d,"\u27ee","\\lgroup",!0),a(i,s,c,"\u2213","\\mp",!0),a(i,s,c,"\u2296","\\ominus",!0),a(i,s,c,"\u228e","\\uplus",!0),a(i,s,c,"\u2293","\\sqcap",!0),a(i,s,c,"\u2217","\\ast"),a(i,s,c,"\u2294","\\sqcup",!0),a(i,s,c,"\u25ef","\\bigcirc"),a(i,s,c,"\u2219","\\bullet"),a(i,s,c,"\u2021","\\ddagger"),a(i,s,c,"\u2240","\\wr",!0),a(i,s,c,"\u2a3f","\\amalg"),a(i,s,c,"&","\\And"),a(i,s,g,"\u27f5","\\longleftarrow",!0),a(i,s,g,"\u21d0","\\Leftarrow",!0),a(i,s,g,"\u27f8","\\Longleftarrow",!0),a(i,s,g,"\u27f6","\\longrightarrow",!0),a(i,s,g,"\u21d2","\\Rightarrow",!0),a(i,s,g,"\u27f9","\\Longrightarrow",!0),a(i,s,g,"\u2194","\\leftrightarrow",!0),a(i,s,g,"\u27f7","\\longleftrightarrow",!0),a(i,s,g,"\u21d4","\\Leftrightarrow",!0),a(i,s,g,"\u27fa","\\Longleftrightarrow",!0),a(i,s,g,"\u21a6","\\mapsto",!0),a(i,s,g,"\u27fc","\\longmapsto",!0),a(i,s,g,"\u2197","\\nearrow",!0),a(i,s,g,"\u21a9","\\hookleftarrow",!0),a(i,s,g,"\u21aa","\\hookrightarrow",!0),a(i,s,g,"\u2198","\\searrow",!0),a(i,s,g,"\u21bc","\\leftharpoonup",!0),a(i,s,g,"\u21c0","\\rightharpoonup",!0),a(i,s,g,"\u2199","\\swarrow",!0),a(i,s,g,"\u21bd","\\leftharpoondown",!0),a(i,s,g,"\u21c1","\\rightharpoondown",!0),a(i,s,g,"\u2196","\\nwarrow",!0),a(i,s,g,"\u21cc","\\rightleftharpoons",!0),a(i,l,g,"\u226e","\\nless",!0),a(i,l,g,"\ue010","\\nleqslant"),a(i,l,g,"\ue011","\\nleqq"),a(i,l,g,"\u2a87","\\lneq",!0),a(i,l,g,"\u2268","\\lneqq",!0),a(i,l,g,"\ue00c","\\lvertneqq"),a(i,l,g,"\u22e6","\\lnsim",!0),a(i,l,g,"\u2a89","\\lnapprox",!0),a(i,l,g,"\u2280","\\nprec",!0),a(i,l,g,"\u22e0","\\npreceq",!0),a(i,l,g,"\u22e8","\\precnsim",!0),a(i,l,g,"\u2ab9","\\precnapprox",!0),a(i,l,g,"\u2241","\\nsim",!0),a(i,l,g,"\ue006","\\nshortmid"),a(i,l,g,"\u2224","\\nmid",!0),a(i,l,g,"\u22ac","\\nvdash",!0),a(i,l,g,"\u22ad","\\nv |