var asciimath={};!function(){var s,id,n,mathcolor="blue",mathfontsize="1em",mathfontfamily="serif",automathrecognize=!1,checkForMathML=!0,notifyIfNoMathML=!0,alertIfNoMathML=!1,translateASCIIMath=!0,displaystyle=!0,showasciiformulaonhover=!0,decimalsign=".",AMdelimiter1="`",AMescape1="\\\\`",AMdocumentId="wikitext",isIE="Microsoft"==navigator.appName.slice(0,9),noMathML=!1,translated=!1;function init(){var msg,warnings=new Array;return null==document.getElementById?(alert("This webpage requires a recent browser such as Mozilla Firefox"),null):(checkForMathML&&(msg=function(){if("Netscape"==navigator.appName.slice(0,8))noMathML=!("5"<=navigator.appVersion.slice(0,1))||null;else if("Microsoft"==navigator.appName.slice(0,9))try{new ActiveXObject("MathPlayer.Factory.1");noMathML=null}catch(e){noMathML=!0}else"Opera"==navigator.appName.slice(0,5)&&(noMathML=!("9.5"<=navigator.appVersion.slice(0,3))||null);if(noMathML&¬ifyIfNoMathML){var msg="To view the ASCIIMathML notation use Internet Explorer + MathPlayer or Mozilla Firefox 2.0 or later.";if(!alertIfNoMathML)return msg;alert(msg)}}())&&warnings.push(msg),0<warnings.length&&function(warnings){var i,frag,nd=createElementXHTML("div");for((body=document.getElementsByTagName("body")[0]).onclick=hideWarning,nd.id="AMMLwarningBox",i=0;i<warnings.length;i++)(frag=createElementXHTML("div")).appendChild(document.createTextNode(warnings[i])),frag.style.paddingBottom="1.0em",nd.appendChild(frag);nd.appendChild(createElementXHTML("p")),nd.appendChild(document.createTextNode("For instructions see the "));var body,an=createElementXHTML("a");an.appendChild(document.createTextNode("ASCIIMathML")),an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"),nd.appendChild(an),nd.appendChild(document.createTextNode(" homepage")),(an=createElementXHTML("div")).id="AMMLcloseDiv",an.appendChild(document.createTextNode("(click anywhere to close this warning)")),nd.appendChild(an),(body=document.getElementsByTagName("body")[0]).insertBefore(nd,body.childNodes[0])}(warnings),noMathML||function(){var i,symlen=AMsymbols.length;for(i=0;i<symlen;i++)AMsymbols[i].tex&&AMsymbols.push({input:AMsymbols[i].tex,tag:AMsymbols[i].tag,output:AMsymbols[i].output,ttype:AMsymbols[i].ttype,acc:AMsymbols[i].acc||!1});refreshSymbols()}(),!0)}function hideWarning(){var body=document.getElementsByTagName("body")[0];body.removeChild(document.getElementById("AMMLwarningBox")),body.onclick=null}function translate(spanclassAM){if(!translated){translated=!0;var body=document.getElementsByTagName("body")[0],processN=document.getElementById(AMdocumentId);translateASCIIMath&&AMprocessNode(null!=processN?processN:body,!1,spanclassAM)}}function createElementXHTML(t){return isIE?document.createElement(t):document.createElementNS("http://www.w3.org/1999/xhtml",t)}isIE&&(document.write('<object id="mathplayer" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"></object>'),document.write('<?import namespace="m" implementation="#mathplayer"?>')),s="#AMMLcloseDiv {font-size:0.8em; padding-top:1em; color:#014}\n#AMMLwarningBox {position:absolute; width:100%; top:0; left:0; z-index:200; text-align:center; font-size:1em; font-weight:bold; padding:0.5em 0 0.5em 0; color:#ffc; background:#c30}",id="AMMLcustomStyleSheet",n=document.getElementById(id),document.createStyleSheet?(n&&n.parentNode.removeChild(n),document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeEnd"," <style id='"+id+"'>"+s+"</style>")):n?n.replaceChild(document.createTextNode(s),n.firstChild):((n=document.createElement("style")).type="text/css",n.id=id,n.appendChild(document.createTextNode(s)),document.getElementsByTagName("head")[0].appendChild(n));var AMmathml="http://www.w3.org/1998/Math/MathML";function createMmlNode(t,frag){var node;return node=isIE?document.createElement("m:"+t):document.createElementNS(AMmathml,t),frag&&node.appendChild(frag),node}var AMcal=["𝒜","ℬ","𝒞","𝒟","ℰ","ℱ","𝒢","ℋ","ℐ","𝒥","𝒦","ℒ","ℳ","𝒩","𝒪","𝒫","𝒬","ℛ","𝒮","𝒯","𝒰","𝒱","𝒲","𝒳","𝒴","𝒵","𝒶","𝒷","𝒸","𝒹","ℯ","𝒻","ℊ","𝒽","𝒾","𝒿","𝓀","𝓁","𝓂","𝓃","ℴ","𝓅","𝓆","𝓇","𝓈","𝓉","𝓊","𝓋","𝓌","𝓍","𝓎","𝓏"],AMfrk=["𝔄","𝔅","ℭ","𝔇","𝔈","𝔉","𝔊","ℌ","ℑ","𝔍","𝔎","𝔏","𝔐","𝔑","𝔒","𝔓","𝔔","ℜ","𝔖","𝔗","𝔘","𝔙","𝔚","𝔛","𝔜","ℨ","𝔞","𝔟","𝔠","𝔡","𝔢","𝔣","𝔤","𝔥","𝔦","𝔧","𝔨","𝔩","𝔪","𝔫","𝔬","𝔭","𝔮","𝔯","𝔰","𝔱","𝔲","𝔳","𝔴","𝔵","𝔶","𝔷"],AMbbb=["𝔸","𝔹","ℂ","𝔻","𝔼","𝔽","𝔾","ℍ","𝕀","𝕁","𝕂","𝕃","𝕄","ℕ","𝕆","ℙ","ℚ","ℝ","𝕊","𝕋","𝕌","𝕍","𝕎","𝕏","𝕐","ℤ","𝕒","𝕓","𝕔","𝕕","𝕖","𝕗","𝕘","𝕙","𝕚","𝕛","𝕜","𝕝","𝕞","𝕟","𝕠","𝕡","𝕢","𝕣","𝕤","𝕥","𝕦","𝕧","𝕨","𝕩","𝕪","𝕫"],CONST=0,UNARY=1,BINARY=2,INFIX=3,LEFTBRACKET=4,RIGHTBRACKET=5,SPACE=6,UNDEROVER=7,DEFINITION=8,LEFTRIGHT=9,TEXT=10,UNARYUNDEROVER=15,AMquote={input:'"',tag:"mtext",output:"mbox",tex:null,ttype:TEXT},AMsymbols=[{input:"alpha",tag:"mi",output:"α",tex:null,ttype:CONST},{input:"beta",tag:"mi",output:"β",tex:null,ttype:CONST},{input:"chi",tag:"mi",output:"χ",tex:null,ttype:CONST},{input:"delta",tag:"mi",output:"δ",tex:null,ttype:CONST},{input:"Delta",tag:"mo",output:"Δ",tex:null,ttype:CONST},{input:"epsi",tag:"mi",output:"ε",tex:"epsilon",ttype:CONST},{input:"varepsilon",tag:"mi",output:"ɛ",tex:null,ttype:CONST},{input:"eta",tag:"mi",output:"η",tex:null,ttype:CONST},{input:"gamma",tag:"mi",output:"γ",tex:null,ttype:CONST},{input:"Gamma",tag:"mo",output:"Γ",tex:null,ttype:CONST},{input:"iota",tag:"mi",output:"ι",tex:null,ttype:CONST},{input:"kappa",tag:"mi",output:"κ",tex:null,ttype:CONST},{input:"lambda",tag:"mi",output:"λ",tex:null,ttype:CONST},{input:"Lambda",tag:"mo",output:"Λ",tex:null,ttype:CONST},{input:"lamda",tag:"mi",output:"λ",tex:null,ttype:CONST},{input:"Lamda",tag:"mo",output:"Λ",tex:null,ttype:CONST},{input:"mu",tag:"mi",output:"μ",tex:null,ttype:CONST},{input:"nu",tag:"mi",output:"ν",tex:null,ttype:CONST},{input:"omega",tag:"mi",output:"ω",tex:null,ttype:CONST},{input:"Omega",tag:"mo",output:"Ω",tex:null,ttype:CONST},{input:"phi",tag:"mi",output:"ϕ",tex:null,ttype:CONST},{input:"varphi",tag:"mi",output:"φ",tex:null,ttype:CONST},{input:"Phi",tag:"mo",output:"Φ",tex:null,ttype:CONST},{input:"pi",tag:"mi",output:"π",tex:null,ttype:CONST},{input:"Pi",tag:"mo",output:"Π",tex:null,ttype:CONST},{input:"psi",tag:"mi",output:"ψ",tex:null,ttype:CONST},{input:"Psi",tag:"mi",output:"Ψ",tex:null,ttype:CONST},{input:"rho",tag:"mi",output:"ρ",tex:null,ttype:CONST},{input:"sigma",tag:"mi",output:"σ",tex:null,ttype:CONST},{input:"Sigma",tag:"mo",output:"Σ",tex:null,ttype:CONST},{input:"tau",tag:"mi",output:"τ",tex:null,ttype:CONST},{input:"theta",tag:"mi",output:"θ",tex:null,ttype:CONST},{input:"vartheta",tag:"mi",output:"ϑ",tex:null,ttype:CONST},{input:"Theta",tag:"mo",output:"Θ",tex:null,ttype:CONST},{input:"upsilon",tag:"mi",output:"υ",tex:null,ttype:CONST},{input:"xi",tag:"mi",output:"ξ",tex:null,ttype:CONST},{input:"Xi",tag:"mo",output:"Ξ",tex:null,ttype:CONST},{input:"zeta",tag:"mi",output:"ζ",tex:null,ttype:CONST},{input:"*",tag:"mo",output:"⋅",tex:"cdot",ttype:CONST},{input:"**",tag:"mo",output:"∗",tex:"ast",ttype:CONST},{input:"***",tag:"mo",output:"⋆",tex:"star",ttype:CONST},{input:"//",tag:"mo",output:"/",tex:null,ttype:CONST},{input:"\\\\",tag:"mo",output:"\\",tex:"backslash",ttype:CONST},{input:"setminus",tag:"mo",output:"\\",tex:null,ttype:CONST},{input:"xx",tag:"mo",output:"×",tex:"times",ttype:CONST},{input:"|><",tag:"mo",output:"⋉",tex:"ltimes",ttype:CONST},{input:"><|",tag:"mo",output:"⋊",tex:"rtimes",ttype:CONST},{input:"|><|",tag:"mo",output:"⋈",tex:"bowtie",ttype:CONST},{input:"-:",tag:"mo",output:"÷",tex:"div",ttype:CONST},{input:"divide",tag:"mo",output:"-:",tex:null,ttype:DEFINITION},{input:"@",tag:"mo",output:"∘",tex:"circ",ttype:CONST},{input:"o+",tag:"mo",output:"⊕",tex:"oplus",ttype:CONST},{input:"ox",tag:"mo",output:"⊗",tex:"otimes",ttype:CONST},{input:"o.",tag:"mo",output:"⊙",tex:"odot",ttype:CONST},{input:"sum",tag:"mo",output:"∑",tex:null,ttype:UNDEROVER},{input:"prod",tag:"mo",output:"∏",tex:null,ttype:UNDEROVER},{input:"^^",tag:"mo",output:"∧",tex:"wedge",ttype:CONST},{input:"^^^",tag:"mo",output:"⋀",tex:"bigwedge",ttype:UNDEROVER},{input:"vv",tag:"mo",output:"∨",tex:"vee",ttype:CONST},{input:"vvv",tag:"mo",output:"⋁",tex:"bigvee",ttype:UNDEROVER},{input:"nn",tag:"mo",output:"∩",tex:"cap",ttype:CONST},{input:"nnn",tag:"mo",output:"⋂",tex:"bigcap",ttype:UNDEROVER},{input:"uu",tag:"mo",output:"∪",tex:"cup",ttype:CONST},{input:"uuu",tag:"mo",output:"⋃",tex:"bigcup",ttype:UNDEROVER},{input:"!=",tag:"mo",output:"≠",tex:"ne",ttype:CONST},{input:":=",tag:"mo",output:":=",tex:null,ttype:CONST},{input:"lt",tag:"mo",output:"<",tex:null,ttype:CONST},{input:"<=",tag:"mo",output:"≤",tex:"le",ttype:CONST},{input:"lt=",tag:"mo",output:"≤",tex:"leq",ttype:CONST},{input:"gt",tag:"mo",output:">",tex:null,ttype:CONST},{input:">=",tag:"mo",output:"≥",tex:"ge",ttype:CONST},{input:"gt=",tag:"mo",output:"≥",tex:"geq",ttype:CONST},{input:"-<",tag:"mo",output:"≺",tex:"prec",ttype:CONST},{input:"-lt",tag:"mo",output:"≺",tex:null,ttype:CONST},{input:">-",tag:"mo",output:"≻",tex:"succ",ttype:CONST},{input:"-<=",tag:"mo",output:"⪯",tex:"preceq",ttype:CONST},{input:">-=",tag:"mo",output:"⪰",tex:"succeq",ttype:CONST},{input:"in",tag:"mo",output:"∈",tex:null,ttype:CONST},{input:"!in",tag:"mo",output:"∉",tex:"notin",ttype:CONST},{input:"sub",tag:"mo",output:"⊂",tex:"subset",ttype:CONST},{input:"sup",tag:"mo",output:"⊃",tex:"supset",ttype:CONST},{input:"sube",tag:"mo",output:"⊆",tex:"subseteq",ttype:CONST},{input:"supe",tag:"mo",output:"⊇",tex:"supseteq",ttype:CONST},{input:"-=",tag:"mo",output:"≡",tex:"equiv",ttype:CONST},{input:"~=",tag:"mo",output:"≅",tex:"cong",ttype:CONST},{input:"~~",tag:"mo",output:"≈",tex:"approx",ttype:CONST},{input:"prop",tag:"mo",output:"∝",tex:"propto",ttype:CONST},{input:"and",tag:"mtext",output:"and",tex:null,ttype:SPACE},{input:"or",tag:"mtext",output:"or",tex:null,ttype:SPACE},{input:"not",tag:"mo",output:"¬",tex:"neg",ttype:CONST},{input:"=>",tag:"mo",output:"⇒",tex:"implies",ttype:CONST},{input:"if",tag:"mo",output:"if",tex:null,ttype:SPACE},{input:"<=>",tag:"mo",output:"⇔",tex:"iff",ttype:CONST},{input:"AA",tag:"mo",output:"∀",tex:"forall",ttype:CONST},{input:"EE",tag:"mo",output:"∃",tex:"exists",ttype:CONST},{input:"_|_",tag:"mo",output:"⊥",tex:"bot",ttype:CONST},{input:"TT",tag:"mo",output:"⊤",tex:"top",ttype:CONST},{input:"|--",tag:"mo",output:"⊢",tex:"vdash",ttype:CONST},{input:"|==",tag:"mo",output:"⊨",tex:"models",ttype:CONST},{input:"(",tag:"mo",output:"(",tex:"left(",ttype:LEFTBRACKET},{input:")",tag:"mo",output:")",tex:"right)",ttype:RIGHTBRACKET},{input:"[",tag:"mo",output:"[",tex:"left[",ttype:LEFTBRACKET},{input:"]",tag:"mo",output:"]",tex:"right]",ttype:RIGHTBRACKET},{input:"{",tag:"mo",output:"{",tex:null,ttype:LEFTBRACKET},{input:"}",tag:"mo",output:"}",tex:null,ttype:RIGHTBRACKET},{input:"|",tag:"mo",output:"|",tex:null,ttype:LEFTRIGHT},{input:":|:",tag:"mo",output:"|",tex:null,ttype:CONST},{input:"|:",tag:"mo",output:"|",tex:null,ttype:LEFTBRACKET},{input:":|",tag:"mo",output:"|",tex:null,ttype:RIGHTBRACKET},{input:"(:",tag:"mo",output:"〈",tex:"langle",ttype:LEFTBRACKET},{input:":)",tag:"mo",output:"〉",tex:"rangle",ttype:RIGHTBRACKET},{input:"<<",tag:"mo",output:"〈",tex:null,ttype:LEFTBRACKET},{input:">>",tag:"mo",output:"〉",tex:null,ttype:RIGHTBRACKET},{input:"{:",tag:"mo",output:"{:",tex:null,ttype:LEFTBRACKET,invisible:!0},{input:":}",tag:"mo",output:":}",tex:null,ttype:RIGHTBRACKET,invisible:!0},{input:"int",tag:"mo",output:"∫",tex:null,ttype:CONST},{input:"dx",tag:"mi",output:"{:d x:}",tex:null,ttype:DEFINITION},{input:"dy",tag:"mi",output:"{:d y:}",tex:null,ttype:DEFINITION},{input:"dz",tag:"mi",output:"{:d z:}",tex:null,ttype:DEFINITION},{input:"dt",tag:"mi",output:"{:d t:}",tex:null,ttype:DEFINITION},{input:"oint",tag:"mo",output:"∮",tex:null,ttype:CONST},{input:"del",tag:"mo",output:"∂",tex:"partial",ttype:CONST},{input:"grad",tag:"mo",output:"∇",tex:"nabla",ttype:CONST},{input:"+-",tag:"mo",output:"±",tex:"pm",ttype:CONST},{input:"O/",tag:"mo",output:"∅",tex:"emptyset",ttype:CONST},{input:"oo",tag:"mo",output:"∞",tex:"infty",ttype:CONST},{input:"aleph",tag:"mo",output:"ℵ",tex:null,ttype:CONST},{input:"...",tag:"mo",output:"...",tex:"ldots",ttype:CONST},{input:":.",tag:"mo",output:"∴",tex:"therefore",ttype:CONST},{input:":'",tag:"mo",output:"∵",tex:"because",ttype:CONST},{input:"/_",tag:"mo",output:"∠",tex:"angle",ttype:CONST},{input:"/_\\",tag:"mo",output:"△",tex:"triangle",ttype:CONST},{input:"'",tag:"mo",output:"′",tex:"prime",ttype:CONST},{input:"tilde",tag:"mover",output:"~",tex:null,ttype:UNARY,acc:!0},{input:"\\ ",tag:"mo",output:" ",tex:null,ttype:CONST},{input:"frown",tag:"mo",output:"⌢",tex:null,ttype:CONST},{input:"quad",tag:"mo",output:" ",tex:null,ttype:CONST},{input:"qquad",tag:"mo",output:" ",tex:null,ttype:CONST},{input:"cdots",tag:"mo",output:"⋯",tex:null,ttype:CONST},{input:"vdots",tag:"mo",output:"⋮",tex:null,ttype:CONST},{input:"ddots",tag:"mo",output:"⋱",tex:null,ttype:CONST},{input:"diamond",tag:"mo",output:"⋄",tex:null,ttype:CONST},{input:"square",tag:"mo",output:"□",tex:null,ttype:CONST},{input:"|__",tag:"mo",output:"⌊",tex:"lfloor",ttype:CONST},{input:"__|",tag:"mo",output:"⌋",tex:"rfloor",ttype:CONST},{input:"|~",tag:"mo",output:"⌈",tex:"lceiling",ttype:CONST},{input:"~|",tag:"mo",output:"⌉",tex:"rceiling",ttype:CONST},{input:"CC",tag:"mo",output:"ℂ",tex:null,ttype:CONST},{input:"NN",tag:"mo",output:"ℕ",tex:null,ttype:CONST},{input:"QQ",tag:"mo",output:"ℚ",tex:null,ttype:CONST},{input:"RR",tag:"mo",output:"ℝ",tex:null,ttype:CONST},{input:"ZZ",tag:"mo",output:"ℤ",tex:null,ttype:CONST},{input:"f",tag:"mi",output:"f",tex:null,ttype:UNARY,func:!0},{input:"g",tag:"mi",output:"g",tex:null,ttype:UNARY,func:!0},{input:"lim",tag:"mo",output:"lim",tex:null,ttype:UNDEROVER},{input:"Lim",tag:"mo",output:"Lim",tex:null,ttype:UNDEROVER},{input:"sin",tag:"mo",output:"sin",tex:null,ttype:UNARY,func:!0},{input:"cos",tag:"mo",output:"cos",tex:null,ttype:UNARY,func:!0},{input:"tan",tag:"mo",output:"tan",tex:null,ttype:UNARY,func:!0},{input:"sinh",tag:"mo",output:"sinh",tex:null,ttype:UNARY,func:!0},{input:"cosh",tag:"mo",output:"cosh",tex:null,ttype:UNARY,func:!0},{input:"tanh",tag:"mo",output:"tanh",tex:null,ttype:UNARY,func:!0},{input:"cot",tag:"mo",output:"cot",tex:null,ttype:UNARY,func:!0},{input:"sec",tag:"mo",output:"sec",tex:null,ttype:UNARY,func:!0},{input:"csc",tag:"mo",output:"csc",tex:null,ttype:UNARY,func:!0},{input:"arcsin",tag:"mo",output:"arcsin",tex:null,ttype:UNARY,func:!0},{input:"arccos",tag:"mo",output:"arccos",tex:null,ttype:UNARY,func:!0},{input:"arctan",tag:"mo",output:"arctan",tex:null,ttype:UNARY,func:!0},{input:"coth",tag:"mo",output:"coth",tex:null,ttype:UNARY,func:!0},{input:"sech",tag:"mo",output:"sech",tex:null,ttype:UNARY,func:!0},{input:"csch",tag:"mo",output:"csch",tex:null,ttype:UNARY,func:!0},{input:"exp",tag:"mo",output:"exp",tex:null,ttype:UNARY,func:!0},{input:"abs",tag:"mo",output:"abs",tex:null,ttype:UNARY,rewriteleftright:["|","|"]},{input:"norm",tag:"mo",output:"norm",tex:null,ttype:UNARY,rewriteleftright:["∥","∥"]},{input:"floor",tag:"mo",output:"floor",tex:null,ttype:UNARY,rewriteleftright:["⌊","⌋"]},{input:"ceil",tag:"mo",output:"ceil",tex:null,ttype:UNARY,rewriteleftright:["⌈","⌉"]},{input:"log",tag:"mo",output:"log",tex:null,ttype:UNARY,func:!0},{input:"ln",tag:"mo",output:"ln",tex:null,ttype:UNARY,func:!0},{input:"det",tag:"mo",output:"det",tex:null,ttype:UNARY,func:!0},{input:"dim",tag:"mo",output:"dim",tex:null,ttype:CONST},{input:"mod",tag:"mo",output:"mod",tex:null,ttype:CONST},{input:"gcd",tag:"mo",output:"gcd",tex:null,ttype:UNARY,func:!0},{input:"lcm",tag:"mo",output:"lcm",tex:null,ttype:UNARY,func:!0},{input:"lub",tag:"mo",output:"lub",tex:null,ttype:CONST},{input:"glb",tag:"mo",output:"glb",tex:null,ttype:CONST},{input:"min",tag:"mo",output:"min",tex:null,ttype:UNDEROVER},{input:"max",tag:"mo",output:"max",tex:null,ttype:UNDEROVER},{input:"Sin",tag:"mo",output:"Sin",tex:null,ttype:UNARY,func:!0},{input:"Cos",tag:"mo",output:"Cos",tex:null,ttype:UNARY,func:!0},{input:"Tan",tag:"mo",output:"Tan",tex:null,ttype:UNARY,func:!0},{input:"Arcsin",tag:"mo",output:"Arcsin",tex:null,ttype:UNARY,func:!0},{input:"Arccos",tag:"mo",output:"Arccos",tex:null,ttype:UNARY,func:!0},{input:"Arctan",tag:"mo",output:"Arctan",tex:null,ttype:UNARY,func:!0},{input:"Sinh",tag:"mo",output:"Sinh",tex:null,ttype:UNARY,func:!0},{input:"Cosh",tag:"mo",output:"Cosh",tex:null,ttype:UNARY,func:!0},{input:"Tanh",tag:"mo",output:"Tanh",tex:null,ttype:UNARY,func:!0},{input:"Cot",tag:"mo",output:"Cot",tex:null,ttype:UNARY,func:!0},{input:"Sec",tag:"mo",output:"Sec",tex:null,ttype:UNARY,func:!0},{input:"Csc",tag:"mo",output:"Csc",tex:null,ttype:UNARY,func:!0},{input:"Log",tag:"mo",output:"Log",tex:null,ttype:UNARY,func:!0},{input:"Ln",tag:"mo",output:"Ln",tex:null,ttype:UNARY,func:!0},{input:"Abs",tag:"mo",output:"abs",tex:null,ttype:UNARY,notexcopy:!0,rewriteleftright:["|","|"]},{input:"uarr",tag:"mo",output:"↑",tex:"uparrow",ttype:CONST},{input:"darr",tag:"mo",output:"↓",tex:"downarrow",ttype:CONST},{input:"rarr",tag:"mo",output:"→",tex:"rightarrow",ttype:CONST},{input:"->",tag:"mo",output:"→",tex:"to",ttype:CONST},{input:">->",tag:"mo",output:"↣",tex:"rightarrowtail",ttype:CONST},{input:"->>",tag:"mo",output:"↠",tex:"twoheadrightarrow",ttype:CONST},{input:">->>",tag:"mo",output:"⤖",tex:"twoheadrightarrowtail",ttype:CONST},{input:"|->",tag:"mo",output:"↦",tex:"mapsto",ttype:CONST},{input:"larr",tag:"mo",output:"←",tex:"leftarrow",ttype:CONST},{input:"harr",tag:"mo",output:"↔",tex:"leftrightarrow",ttype:CONST},{input:"rArr",tag:"mo",output:"⇒",tex:"Rightarrow",ttype:CONST},{input:"lArr",tag:"mo",output:"⇐",tex:"Leftarrow",ttype:CONST},{input:"hArr",tag:"mo",output:"⇔",tex:"Leftrightarrow",ttype:CONST},{input:"sqrt",tag:"msqrt",output:"sqrt",tex:null,ttype:UNARY},{input:"root",tag:"mroot",output:"root",tex:null,ttype:BINARY},{input:"frac",tag:"mfrac",output:"/",tex:null,ttype:BINARY},{input:"/",tag:"mfrac",output:"/",tex:null,ttype:INFIX},{input:"stackrel",tag:"mover",output:"stackrel",tex:null,ttype:BINARY},{input:"overset",tag:"mover",output:"stackrel",tex:null,ttype:BINARY},{input:"underset",tag:"munder",output:"stackrel",tex:null,ttype:BINARY},{input:"_",tag:"msub",output:"_",tex:null,ttype:INFIX},{input:"^",tag:"msup",output:"^",tex:null,ttype:INFIX},{input:"hat",tag:"mover",output:"^",tex:null,ttype:UNARY,acc:!0},{input:"bar",tag:"mover",output:"¯",tex:"overline",ttype:UNARY,acc:!0},{input:"vec",tag:"mover",output:"→",tex:null,ttype:UNARY,acc:!0},{input:"dot",tag:"mover",output:".",tex:null,ttype:UNARY,acc:!0},{input:"ddot",tag:"mover",output:"..",tex:null,ttype:UNARY,acc:!0},{input:"overarc",tag:"mover",output:"⏜",tex:"overparen",ttype:UNARY,acc:!0},{input:"ul",tag:"munder",output:"̲",tex:"underline",ttype:UNARY,acc:!0},{input:"ubrace",tag:"munder",output:"⏟",tex:"underbrace",ttype:UNARYUNDEROVER,acc:!0},{input:"obrace",tag:"mover",output:"⏞",tex:"overbrace",ttype:UNARYUNDEROVER,acc:!0},{input:"text",tag:"mtext",output:"text",tex:null,ttype:TEXT},{input:"mbox",tag:"mtext",output:"mbox",tex:null,ttype:TEXT},{input:"color",tag:"mstyle",ttype:BINARY},{input:"id",tag:"mrow",ttype:BINARY},{input:"class",tag:"mrow",ttype:BINARY},{input:"cancel",tag:"menclose",output:"cancel",tex:null,ttype:UNARY},AMquote,{input:"bb",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"bb",tex:null,ttype:UNARY},{input:"mathbf",tag:"mstyle",atname:"mathvariant",atval:"bold",output:"mathbf",tex:null,ttype:UNARY},{input:"sf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"sf",tex:null,ttype:UNARY},{input:"mathsf",tag:"mstyle",atname:"mathvariant",atval:"sans-serif",output:"mathsf",tex:null,ttype:UNARY},{input:"bbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"bbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"mathbb",tag:"mstyle",atname:"mathvariant",atval:"double-struck",output:"mathbb",tex:null,ttype:UNARY,codes:AMbbb},{input:"cc",tag:"mstyle",atname:"mathvariant",atval:"script",output:"cc",tex:null,ttype:UNARY,codes:AMcal},{input:"mathcal",tag:"mstyle",atname:"mathvariant",atval:"script",output:"mathcal",tex:null,ttype:UNARY,codes:AMcal},{input:"tt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"tt",tex:null,ttype:UNARY},{input:"mathtt",tag:"mstyle",atname:"mathvariant",atval:"monospace",output:"mathtt",tex:null,ttype:UNARY},{input:"fr",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"fr",tex:null,ttype:UNARY,codes:AMfrk},{input:"mathfrak",tag:"mstyle",atname:"mathvariant",atval:"fraktur",output:"mathfrak",tex:null,ttype:UNARY,codes:AMfrk}];function compareNames(s1,s2){return s1.input>s2.input?1:-1}var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol,AMnames=[];function refreshSymbols(){var i;for(AMsymbols.sort(compareNames),i=0;i<AMsymbols.length;i++)AMnames[i]=AMsymbols[i].input}function AMremoveCharsAndBlanks(str,n){var st;st="\\"==str.charAt(n)&&"\\"!=str.charAt(n+1)&&" "!=str.charAt(n+1)?str.slice(n+1):str.slice(n);for(var i=0;i<st.length&&st.charCodeAt(i)<=32;i+=1);return st.slice(i)}function position(arr,str,n){if(0==n){var h,m;for(n=-1,h=arr.length;n+1<h;)arr[m=n+h>>1]<str?n=m:h=m;return h}for(var i=n;i<arr.length&&arr[i]<str;i++);return i}function AMgetSymbol(str){for(var mk,st,tagst,k=0,match="",more=!0,i=1;i<=str.length&&more;i++)st=str.slice(0,i),(k=position(AMnames,st,k))<AMnames.length&&str.slice(0,AMnames[k].length)==AMnames[k]&&(i=(match=AMnames[mk=k]).length),more=k<AMnames.length&&str.slice(0,AMnames[k].length)>=AMnames[k];if(AMpreviousSymbol=AMcurrentSymbol,""!=match)return AMcurrentSymbol=AMsymbols[mk].ttype,AMsymbols[mk];AMcurrentSymbol=CONST,k=1,st=str.slice(0,1);for(var integ=!0;"0"<=st&&st<="9"&&k<=str.length;)st=str.slice(k,k+1),k++;if(st==decimalsign&&"0"<=(st=str.slice(k,k+1))&&st<="9")for(integ=!1,k++;"0"<=st&&st<="9"&&k<=str.length;)st=str.slice(k,k+1),k++;return tagst=integ&&1<k||2<k?(st=str.slice(0,k-1),"mn"):(k=2,((st=str.slice(0,1))<"A"||"Z"<st)&&(st<"a"||"z"<st)?"mo":"mi"),"-"==st&&AMpreviousSymbol==INFIX?(AMcurrentSymbol=INFIX,{input:st,tag:tagst,output:st,ttype:UNARY,func:!0}):{input:st,tag:tagst,output:st,ttype:CONST}}function AMremoveBrackets(node){var st;node.hasChildNodes()&&(!node.firstChild.hasChildNodes()||"mrow"!=node.nodeName&&"M:MROW"!=node.nodeName||"("!=(st=node.firstChild.firstChild.nodeValue)&&"["!=st&&"{"!=st||node.removeChild(node.firstChild),!node.lastChild.hasChildNodes()||"mrow"!=node.nodeName&&"M:MROW"!=node.nodeName||")"!=(st=node.lastChild.firstChild.nodeValue)&&"]"!=st&&"}"!=st||node.removeChild(node.lastChild))}function AMparseSexpr(str){var symbol,node,result,i,st,newFrag=document.createDocumentFragment();if(null==(symbol=AMgetSymbol(str=AMremoveCharsAndBlanks(str,0)))||symbol.ttype==RIGHTBRACKET&&0<AMnestingDepth)return[null,str];switch(symbol.ttype==DEFINITION&&(symbol=AMgetSymbol(str=symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length))),symbol.ttype){case UNDEROVER:case CONST:return str=AMremoveCharsAndBlanks(str,symbol.input.length),[createMmlNode(symbol.tag,document.createTextNode(symbol.output)),str];case LEFTBRACKET:return AMnestingDepth++,result=AMparseExpr(str=AMremoveCharsAndBlanks(str,symbol.input.length),!0),AMnestingDepth--,"boolean"==typeof symbol.invisible&&symbol.invisible?node=createMmlNode("mrow",result[0]):(node=createMmlNode("mrow",node=createMmlNode("mo",document.createTextNode(symbol.output)))).appendChild(result[0]),[node,result[1]];case TEXT:return symbol!=AMquote&&(str=AMremoveCharsAndBlanks(str,symbol.input.length)),-1==(i="{"==str.charAt(0)?str.indexOf("}"):"("==str.charAt(0)?str.indexOf(")"):"["==str.charAt(0)?str.indexOf("]"):symbol==AMquote?str.slice(1).indexOf('"')+1:0)&&(i=str.length)," "==(st=str.slice(1,i)).charAt(0)&&((node=createMmlNode("mspace")).setAttribute("width","1ex"),newFrag.appendChild(node)),newFrag.appendChild(createMmlNode(symbol.tag,document.createTextNode(st)))," "==st.charAt(st.length-1)&&((node=createMmlNode("mspace")).setAttribute("width","1ex"),newFrag.appendChild(node)),str=AMremoveCharsAndBlanks(str,i+1),[createMmlNode("mrow",newFrag),str];case UNARYUNDEROVER:case UNARY:if(null==(result=AMparseSexpr(str=AMremoveCharsAndBlanks(str,symbol.input.length)))[0])return[createMmlNode(symbol.tag,document.createTextNode(symbol.output)),str];if("boolean"==typeof symbol.func&&symbol.func)return"^"==(st=str.charAt(0))||"_"==st||"/"==st||"|"==st||","==st||1==symbol.input.length&&symbol.input.match(/\w/)&&"("!=st?[createMmlNode(symbol.tag,document.createTextNode(symbol.output)),str]:((node=createMmlNode("mrow",createMmlNode(symbol.tag,document.createTextNode(symbol.output)))).appendChild(result[0]),[node,result[1]]);if(AMremoveBrackets(result[0]),"sqrt"==symbol.input)return[createMmlNode(symbol.tag,result[0]),result[1]];if(void 0!==symbol.rewriteleftright)return(node=createMmlNode("mrow",createMmlNode("mo",document.createTextNode(symbol.rewriteleftright[0])))).appendChild(result[0]),node.appendChild(createMmlNode("mo",document.createTextNode(symbol.rewriteleftright[1]))),[node,result[1]];if("cancel"==symbol.input)return(node=createMmlNode(symbol.tag,result[0])).setAttribute("notation","updiagonalstrike"),[node,result[1]];if("boolean"==typeof symbol.acc&&symbol.acc){node=createMmlNode(symbol.tag,result[0]);var accnode=createMmlNode("mo",document.createTextNode(symbol.output));return"vec"==symbol.input&&("mrow"==result[0].nodeName&&1==result[0].childNodes.length&&null!==result[0].firstChild.firstChild.nodeValue&&1==result[0].firstChild.firstChild.nodeValue.length||null!==result[0].firstChild.nodeValue&&1==result[0].firstChild.nodeValue.length)&&accnode.setAttribute("stretchy",!1),node.appendChild(accnode),[node,result[1]]}if(!isIE&&void 0!==symbol.codes)for(i=0;i<result[0].childNodes.length;i++)if("mi"==result[0].childNodes[i].nodeName||"mi"==result[0].nodeName){st="mi"==result[0].nodeName?result[0].firstChild.nodeValue:result[0].childNodes[i].firstChild.nodeValue;for(var newst=[],j=0;j<st.length;j++)64<st.charCodeAt(j)&&st.charCodeAt(j)<91?newst+=symbol.codes[st.charCodeAt(j)-65]:96<st.charCodeAt(j)&&st.charCodeAt(j)<123?newst+=symbol.codes[st.charCodeAt(j)-71]:newst+=st.charAt(j);"mi"==result[0].nodeName?result[0]=createMmlNode("mo").appendChild(document.createTextNode(newst)):result[0].replaceChild(createMmlNode("mo").appendChild(document.createTextNode(newst)),result[0].childNodes[i])}return(node=createMmlNode(symbol.tag,result[0])).setAttribute(symbol.atname,symbol.atval),[node,result[1]];case BINARY:if(null==(result=AMparseSexpr(str=AMremoveCharsAndBlanks(str,symbol.input.length)))[0])return[createMmlNode("mo",document.createTextNode(symbol.input)),str];AMremoveBrackets(result[0]);var result2=AMparseSexpr(result[1]);return null==result2[0]?[createMmlNode("mo",document.createTextNode(symbol.input)),str]:(AMremoveBrackets(result2[0]),0<=["color","class","id"].indexOf(symbol.input)?("{"==str.charAt(0)?i=str.indexOf("}"):"("==str.charAt(0)?i=str.indexOf(")"):"["==str.charAt(0)&&(i=str.indexOf("]")),st=str.slice(1,i),node=createMmlNode(symbol.tag,result2[0]),"color"===symbol.input?node.setAttribute("mathcolor",st):"class"===symbol.input?node.setAttribute("class",st):"id"===symbol.input&&node.setAttribute("id",st),[node,result2[1]]):("root"!=symbol.input&&"stackrel"!=symbol.output||newFrag.appendChild(result2[0]),newFrag.appendChild(result[0]),"frac"==symbol.input&&newFrag.appendChild(result2[0]),[createMmlNode(symbol.tag,newFrag),result2[1]]));case INFIX:return str=AMremoveCharsAndBlanks(str,symbol.input.length),[createMmlNode("mo",document.createTextNode(symbol.output)),str];case SPACE:return str=AMremoveCharsAndBlanks(str,symbol.input.length),(node=createMmlNode("mspace")).setAttribute("width","1ex"),newFrag.appendChild(node),newFrag.appendChild(createMmlNode(symbol.tag,document.createTextNode(symbol.output))),(node=createMmlNode("mspace")).setAttribute("width","1ex"),newFrag.appendChild(node),[createMmlNode("mrow",newFrag),str];case LEFTRIGHT:return AMnestingDepth++,result=AMparseExpr(str=AMremoveCharsAndBlanks(str,symbol.input.length),!1),AMnestingDepth--,st="",null!=result[0].lastChild&&(st=result[0].lastChild.firstChild.nodeValue),"|"==st&&","!==str.charAt(0)?((node=createMmlNode("mrow",node=createMmlNode("mo",document.createTextNode(symbol.output)))).appendChild(result[0]),[node,result[1]]):[node=createMmlNode("mrow",node=createMmlNode("mo",document.createTextNode("∣"))),str];default:return str=AMremoveCharsAndBlanks(str,symbol.input.length),[createMmlNode(symbol.tag,document.createTextNode(symbol.output)),str]}}function AMparseIexpr(str){var symbol,sym1,sym2,node,result,underover;if(sym1=AMgetSymbol(str=AMremoveCharsAndBlanks(str,0)),node=(result=AMparseSexpr(str))[0],(symbol=AMgetSymbol(str=result[1])).ttype==INFIX&&"/"!=symbol.input){if(null==(result=AMparseSexpr(str=AMremoveCharsAndBlanks(str,symbol.input.length)))[0]?result[0]=createMmlNode("mo",document.createTextNode("□")):AMremoveBrackets(result[0]),str=result[1],underover=sym1.ttype==UNDEROVER||sym1.ttype==UNARYUNDEROVER,"_"==symbol.input)if("^"==(sym2=AMgetSymbol(str)).input){var res2=AMparseSexpr(str=AMremoveCharsAndBlanks(str,sym2.input.length));AMremoveBrackets(res2[0]),str=res2[1],(node=createMmlNode(underover?"munderover":"msubsup",node)).appendChild(result[0]),node.appendChild(res2[0]),node=createMmlNode("mrow",node)}else(node=createMmlNode(underover?"munder":"msub",node)).appendChild(result[0]);else"^"==symbol.input&&underover?(node=createMmlNode("mover",node)).appendChild(result[0]):(node=createMmlNode(symbol.tag,node)).appendChild(result[0]);void 0!==sym1.func&&sym1.func&&(sym2=AMgetSymbol(str)).ttype!=INFIX&&sym2.ttype!=RIGHTBRACKET&&(1<sym1.input.length||sym2.ttype==LEFTBRACKET)&&(result=AMparseIexpr(str),(node=createMmlNode("mrow",node)).appendChild(result[0]),str=result[1])}return[node,str]}function AMparseExpr(str,rightbracket){for(var symbol,node,result,i,newFrag=document.createDocumentFragment();node=(result=AMparseIexpr(str=AMremoveCharsAndBlanks(str,0)))[0],(symbol=AMgetSymbol(str=result[1])).ttype==INFIX&&"/"==symbol.input?(null==(result=AMparseIexpr(str=AMremoveCharsAndBlanks(str,symbol.input.length)))[0]?result[0]=createMmlNode("mo",document.createTextNode("□")):AMremoveBrackets(result[0]),str=result[1],AMremoveBrackets(node),(node=createMmlNode(symbol.tag,node)).appendChild(result[0]),newFrag.appendChild(node),symbol=AMgetSymbol(str)):null!=node&&newFrag.appendChild(node),(symbol.ttype!=RIGHTBRACKET&&(symbol.ttype!=LEFTRIGHT||rightbracket)||0==AMnestingDepth)&&null!=symbol&&""!=symbol.output;);if(symbol.ttype==RIGHTBRACKET||symbol.ttype==LEFTRIGHT){var len=newFrag.childNodes.length;if(0<len&&"mrow"==newFrag.childNodes[len-1].nodeName&&newFrag.childNodes[len-1].lastChild&&newFrag.childNodes[len-1].lastChild.firstChild){var right=newFrag.childNodes[len-1].lastChild.firstChild.nodeValue;if(")"==right||"]"==right){var left=newFrag.childNodes[len-1].firstChild.firstChild.nodeValue;if("("==left&&")"==right&&"}"!=symbol.output||"["==left&&"]"==right){var pos=[],matrix=!0,m=newFrag.childNodes.length;for(i=0;matrix&&i<m;i+=2){if(pos[i]=[],node=newFrag.childNodes[i],matrix&&(matrix="mrow"==node.nodeName&&(i==m-1||"mo"==node.nextSibling.nodeName&&","==node.nextSibling.firstChild.nodeValue)&&node.firstChild.firstChild.nodeValue==left&&node.lastChild.firstChild.nodeValue==right),matrix)for(var j=0;j<node.childNodes.length;j++)","==node.childNodes[j].firstChild.nodeValue&&(pos[i][pos[i].length]=j);matrix&&1<i&&(matrix=pos[i].length==pos[i-2].length)}var columnlines=[];if(matrix=matrix&&(1<pos.length||0<pos[0].length)){var row,frag,n,k,table=document.createDocumentFragment();for(i=0;i<m;i+=2){for(row=document.createDocumentFragment(),frag=document.createDocumentFragment(),n=(node=newFrag.firstChild).childNodes.length,k=0,node.removeChild(node.firstChild),j=1;j<n-1;j++)void 0!==pos[i][k]&&j==pos[i][k]?(node.removeChild(node.firstChild),"mrow"==node.firstChild.nodeName&&1==node.firstChild.childNodes.length&&"∣"==node.firstChild.firstChild.firstChild.nodeValue?(0==i&&columnlines.push("solid"),node.removeChild(node.firstChild),node.removeChild(node.firstChild),j+=2,k++):0==i&&columnlines.push("none"),row.appendChild(createMmlNode("mtd",frag)),k++):frag.appendChild(node.firstChild);row.appendChild(createMmlNode("mtd",frag)),0==i&&columnlines.push("none"),2<newFrag.childNodes.length&&(newFrag.removeChild(newFrag.firstChild),newFrag.removeChild(newFrag.firstChild)),table.appendChild(createMmlNode("mtr",row))}(node=createMmlNode("mtable",table)).setAttribute("columnlines",columnlines.join(" ")),"boolean"==typeof symbol.invisible&&symbol.invisible&&node.setAttribute("columnalign","left"),newFrag.replaceChild(node,newFrag.firstChild)}}}}str=AMremoveCharsAndBlanks(str,symbol.input.length),"boolean"==typeof symbol.invisible&&symbol.invisible||(node=createMmlNode("mo",document.createTextNode(symbol.output)),newFrag.appendChild(node))}return[newFrag,str]}function parseMath(str,latex){var node;return AMnestingDepth=0,node=createMmlNode("mstyle",AMparseExpr((str=(str=(str=str.replace(/ /g,"")).replace(/>/g,">")).replace(/</g,"<")).replace(/^\s+/g,""),!1)[0]),""!=mathcolor&&node.setAttribute("mathcolor",mathcolor),""!=mathfontsize&&(node.setAttribute("fontsize",mathfontsize),node.setAttribute("mathsize",mathfontsize)),""!=mathfontfamily&&(node.setAttribute("fontfamily",mathfontfamily),node.setAttribute("mathvariant",mathfontfamily)),displaystyle&&node.setAttribute("displaystyle","true"),node=createMmlNode("math",node),showasciiformulaonhover&&node.setAttribute("title",str.replace(/\s+/g," ")),node}function AMautomathrec(str){var texcommand="\\\\[a-zA-Z]+|\\\\\\s|",ambigAMtoken="\\b(?:oo|lim|ln|int|oint|del|grad|aleph|prod|prop|sinh|cosh|tanh|cos|sec|pi|tt|fr|sf|sube|supe|sub|sup|det|mod|gcd|lcm|min|max|vec|ddot|ul|chi|eta|nu|mu)(?![a-z])|",englishAMtoken="\\b(?:sum|ox|log|sin|tan|dim|hat|bar|dot)(?![a-z])|",simpleAMtoken="NN|ZZ|QQ|RR|CC|TT|AA|EE|sqrt|dx|dy|dz|dt|xx|vv|uu|nn|bb|cc|csc|cot|alpha|beta|delta|Delta|epsilon|gamma|Gamma|kappa|lambda|Lambda|omega|phi|Phi|Pi|psi|Psi|rho|sigma|Sigma|tau|theta|Theta|xi|Xi|zeta",token="[a-zA-HJ-Z](?=(?:[^a-zA-Z]|$|\\b(?:oo|lim|ln|int|oint|del|grad|aleph|prod|prop|sinh|cosh|tanh|cos|sec|pi|tt|fr|sf|sube|supe|sub|sup|det|mod|gcd|lcm|min|max|vec|ddot|ul|chi|eta|nu|mu)(?![a-z])|\\b(?:sum|ox|log|sin|tan|dim|hat|bar|dot)(?![a-z])|NN|ZZ|QQ|RR|CC|TT|AA|EE|sqrt|dx|dy|dz|dt|xx|vv|uu|nn|bb|cc|csc|cot|alpha|beta|delta|Delta|epsilon|gamma|Gamma|kappa|lambda|Lambda|omega|phi|Phi|Pi|psi|Psi|rho|sigma|Sigma|tau|theta|Theta|xi|Xi|zeta))|"+texcommand+"\\d+|[-()[\\]{}+=*&^_%\\@/<>,\\|!:;'~]|\\.(?!(?: |$))|"+ambigAMtoken+englishAMtoken+simpleAMtoken,re=new RegExp("(^|\\s)((("+token+")\\s?)(("+token+"|\\bI\\b|\\bin\\b|\\btext\\b)\\s?)+)([,.?]?(?=\\s|$))","g"),arr=(str=str.replace(re," `$2`$7")).split(AMdelimiter1),re1=new RegExp("(^|\\s)([b-zB-HJ-Z+*<>]|"+texcommand+ambigAMtoken+simpleAMtoken+")(\\s|\\n|$)","g"),re2=new RegExp("(^|\\s)([a-z]|"+texcommand+ambigAMtoken+simpleAMtoken+")([,.])","g");for(i=0;i<arr.length;i++)i%2==0&&(arr[i]=arr[i].replace(re1," `$2`$3"),arr[i]=arr[i].replace(re2," `$2`$3"),arr[i]=arr[i].replace(/([{}[\]])/,"`$1`"));return str=(str=(str=(str=(str=(str=(str=arr.join(AMdelimiter1)).replace(/((^|\s)\([a-zA-Z]{2,}.*?)\)`/g,"$1`)")).replace(/`(\((a\s|in\s))(.*?[a-zA-Z]{2,}\))/g,"$1`$3")).replace(/\sin`/g,"` in")).replace(/`(\(\w\)[,.]?(\s|\n|$))/g,"$1`")).replace(/`([0-9.]+|e.g|i.e)`(\.?)/gi,"$1$2")).replace(/`([0-9.]+:)`/g,"$1")}function processNodeR(n,linebreaks,latex){var mtch,str,arr,frg,i;if(0==n.childNodes.length){if(8==n.nodeType&&!linebreaks||"form"==n.parentNode.nodeName||"FORM"==n.parentNode.nodeName||"textarea"==n.parentNode.nodeName||"TEXTAREA"==n.parentNode.nodeName)return 0;if(null!=(str=n.nodeValue)){if(str=(str=(str=str.replace(/\r\n\r\n/g,"\n\n")).replace(/\x20+/g," ")).replace(/\s*\r\n/g," "),latex)for(mtch=-1!=str.indexOf("$"),arr=(str=(str=str.replace(/([^\\])\$/g,"$1 $")).replace(/^\$/," $")).split(" $"),i=0;i<arr.length;i++)arr[i]=arr[i].replace(/\\\$/g,"$");else{if(mtch=!1,arr=(str=(str=(str=str.replace(new RegExp(AMescape1,"g"),function(){return mtch=!0,"AMescape1"})).replace(/\\?end{?a?math}?/i,function(){return mtch=!(automathrecognize=!1),""})).replace(/amath\b|\\begin{a?math}/i,function(){return mtch=automathrecognize=!0,""})).split(AMdelimiter1),automathrecognize)for(i=0;i<arr.length;i++)i%2==0&&(arr[i]=AMautomathrec(arr[i]));for(arr=(str=arr.join(AMdelimiter1)).split(AMdelimiter1),i=0;i<arr.length;i++)arr[i]=arr[i].replace(/AMescape1/g,AMdelimiter1)}if(1<arr.length||mtch){if(noMathML)return 0;var len=(frg=function(arr,linebreaks,latex){for(var newFrag=document.createDocumentFragment(),expr=!1,i=0;i<arr.length;i++){if(expr)newFrag.appendChild(parseMath(arr[i]));else{var arri=linebreaks?arr[i].split("\n\n"):[arr[i]];newFrag.appendChild(createElementXHTML("span").appendChild(document.createTextNode(arri[0])));for(var j=1;j<arri.length;j++)newFrag.appendChild(createElementXHTML("p")),newFrag.appendChild(createElementXHTML("span").appendChild(document.createTextNode(arri[j])))}expr=!expr}return newFrag}(arr,8==n.nodeType)).childNodes.length;return n.parentNode.replaceChild(frg,n),len-1}}}else if("math"!=n.nodeName)for(i=0;i<n.childNodes.length;i++)i+=processNodeR(n.childNodes[i],linebreaks,latex);return 0}function AMprocessNode(n,linebreaks,spanclassAM){var frag,st;if(null!=spanclassAM){frag=document.getElementsByTagName("span");for(var i=0;i<frag.length;i++)"AM"==frag[i].className&&processNodeR(frag[i],linebreaks,!1)}else{try{st=n.innerHTML}catch(err){}(null==st||/amath\b|\\begin{a?math}/i.test(st)||-1!=st.indexOf(AMdelimiter1+" ")||st.slice(-1)==AMdelimiter1||-1!=st.indexOf(AMdelimiter1+"<")||-1!=st.indexOf(AMdelimiter1+"\n"))&&processNodeR(n,linebreaks,!1)}}function generic(){init()&&translate()}if(void 0!==window.addEventListener)window.addEventListener("load",generic,!1);else if(void 0!==document.addEventListener)document.addEventListener("load",generic,!1);else if(void 0!==window.attachEvent)window.attachEvent("onload",generic);else if("function"==typeof window.onload){var existing=onload;window.onload=function(){existing(),generic()}}else window.onload=generic;asciimath.newcommand=function(oldstr,newstr){AMsymbols.push({input:oldstr,tag:"mo",output:newstr,tex:null,ttype:DEFINITION}),refreshSymbols()},asciimath.newsymbol=function(symbolobj){AMsymbols.push(symbolobj),refreshSymbols()},asciimath.AMprocesssNode=AMprocessNode,asciimath.parseMath=parseMath,asciimath.translate=translate}();