Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / MathJax / jax / output / HTML-CSS / jax.js
bloba08b6413ef58fcf0cb8dbe80a086c2c19ad905a0
1 /*
2  *  /MathJax/jax/output/HTML-CSS/jax.js
3  *  
4  *  Copyright (c) 2010 Design Science, Inc.
5  *
6  *  Part of the MathJax library.
7  *  See http://www.mathjax.org for details.
8  * 
9  *  Licensed under the Apache License, Version 2.0;
10  *  you may not use this file except in compliance with the License.
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  */
15 (function(c,d,e){var a;var b=MathJax.Object.Subclass({timeout:5*1000,FontInfo:{STIX:{family:"STIXSizeOneSym",testString:"() {} []"},TeX:{family:"MathJax_Size1",testString:"() {} []"}},comparisonFont:["sans-serif","monospace","script","Times","Courier","Arial","Helvetica"],testSize:["40px","50px","60px","30px","20px"],Init:function(){this.div=MathJax.HTML.addElement(document.body,"div",{style:{position:"absolute",visibility:"hidden",top:0,left:0,width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal",fontSize:this.testSize[0],fontWeight:"normal",fontStyle:"normal"}},[""]);this.text=this.div.firstChild},findFont:function(j,g){if(g&&this.testCollection(g)){return g}for(var h=0,f=j.length;h<f;h++){if(j[h]===g){continue}if(this.testCollection(j[h])){return j[h]}}return null},testCollection:function(f){return this.testFont(this.FontInfo[f])},testFont:function(h){if(h.isWebFont&&e.FontFaceBug){this.div.style.fontWeight=this.div.style.fontStyle="normal"}else{this.div.style.fontWeight=(h.weight||"normal");this.div.style.fontStyle=(h.style||"normal")}var g=this.getComparisonWidths(h.testString,h.noStyleChar);if(g){this.div.style.fontFamily="'"+h.family+"',"+this.comparisonFont[0];if(this.div.offsetWidth==g[0]){this.div.style.fontFamily="'"+h.family+"',"+this.comparisonFont[g[2]];if(this.div.offsetWidth==g[1]){return false}}if(this.div.offsetWidth!=g[3]){if(h.noStyleChar||!e.FONTDATA||!e.FONTDATA.hasStyleChar){return true}for(var j=0,f=this.testSize.length;j<f;j++){if(this.testStyleChar(h,this.testSize[j])){return true}}}}return false},styleChar:String.fromCharCode(61437),versionChar:String.fromCharCode(61438),compChar:String.fromCharCode(61439),testStyleChar:function(h,j){var m=3+(h.weight?2:0)+(h.style?4:0);var g="",i=0;var l=this.div.style.fontSize;this.div.style.fontSize=j;if(e.msieItalicWidthBug&&h.style==="italic"){this.text.nodeValue=g=this.compChar;i=this.div.offsetWidth}if(e.safariTextNodeBug){this.div.innerHTML=this.compChar+g}else{this.text.nodeValue=this.compChar+g}var f=this.div.offsetWidth-i;if(e.safariTextNodeBug){this.div.innerHTML=this.styleChar+g}else{this.text.nodeValue=this.styleChar+g}var k=Math.floor((this.div.offsetWidth-i)/f+0.5);if(k===m){if(e.safariTextNodeBug){this.div.innerHTML=this.versionChar+g}else{this.text.nodeValue=this.versionChar+g}h.version=Math.floor((this.div.offsetWidth-i)/f+1.5)/2}this.div.style.fontSize=l;return(k===m)},getComparisonWidths:function(j,h){if(e.FONTDATA&&e.FONTDATA.hasStyleChar&&!h){j+=this.styleChar+" "+this.compChar}if(e.safariTextNodeBug){this.div.innerHTML=j}else{this.text.nodeValue=j}this.div.style.fontFamily=this.comparisonFont[0];var g=this.div.offsetWidth,l=-1;if(e.safariWebFontSerif){this.div.style.fontFamily=e.safariWebFontSerif[0];l=this.div.offsetWidth}for(var k=1,f=this.comparisonFont.length;k<f;k++){this.div.style.fontFamily=this.comparisonFont[k];if(this.div.offsetWidth!=g){return[g,this.div.offsetWidth,k,l]}}return null},loadWebFont:function(g){d.Startup.signal.Post("HTML-CSS Jax - Web-Font "+e.fontInUse+"/"+g.directory);var i=MathJax.Message.File("Web-Font "+e.fontInUse+"/"+g.directory);var f=MathJax.Callback({});var h=MathJax.Callback(["loadComplete",this,g,i,f]);c.timer.start(c,[this.checkWebFont,g,h],1,this.timeout);return f},loadComplete:function(h,j,g,f){MathJax.Message.Clear(j);if(f===c.STATUS.OK){g();return}this.loadError(h);if(d.Browser.isFirefox&&e.allowWebFonts){var i=document.location.protocol+"//"+document.location.hostname;if(document.location.port!=""){i+=":"+document.location.port}i+="/";if(c.fileURL(e.webfontDir).substr(0,i.length)!==i){this.firefoxFontError(h)}}e.loadWebFontError(h,g)},loadError:function(f){MathJax.Message.Set("Can't load web font "+e.fontInUse+"/"+f.directory,null,2000)},firefoxFontError:function(f){MathJax.Message.Set("Firefox can't load web fonts from a remote host",null,3000)},checkWebFont:function(f,g,h){if(f.time(h)){return}if(e.Font.testFont(g)){h(f.STATUS.OK)}else{setTimeout(f,f.delay)}},fontFace:function(h){var i=e.allowWebFonts;var k=e.FONTDATA.FONTS[h];if(e.msieFontCSSBug&&!k.family.match(/-Web$/)){k.family+="-Web"}var g=c.fileURL(e.webfontDir+"/"+i);var f=h.replace(/-b/,"-B").replace(/-i/,"-I").replace(/-Bold-/,"-Bold");if(!f.match(/-/)){f+="-Regular"}if(i==="svg"){f+=".svg#"+f}else{f+="."+i}var j={"font-family":k.family,src:"url('"+g+"/"+f+"')"};if(i==="svg"){j.src+=" format('svg')"}if(!(e.FontFaceBug&&k.isWebFont)){if(h.match(/-bold/)){j["font-weight"]="bold"}if(h.match(/-italic/)){j["font-style"]="italic"}}return j}});e.Augment({config:{styles:{".MathJax":{display:"inline","font-family":"serif","font-style":"normal","font-weight":"normal","line-height":"normal","font-size":"100%","font-size-adjust":"none","text-indent":0,"text-align":"left","text-transform":"none","letter-spacing":"normal","word-spacing":"normal","word-wrap":"normal","white-space":"nowrap","float":"none",direction:"ltr",border:0,padding:0,margin:0},".MathJax_Display":{position:"relative",display:"block",width:"100%"},".MathJax img, .MathJax nobr, .MathJax a":{border:0,padding:0,margin:0,"max-width":"none","max-height":"none","vertical-align":0,"line-height":"normal","text-decoration":"none"},"img.MathJax_strut":{border:"0 !important",padding:"0 !important",margin:"0 !important","vertical-align":"0 !important"},".MathJax span":{display:"inline",position:"static",border:0,padding:0,margin:0,"vertical-align":0,"line-height":"normal","text-decoration":"none"},".MathJax nobr":{"white-space":"nowrap"},".MathJax img":{display:"inline ! important"},".MathJax_Processing":{visibility:"hidden",position:"fixed",width:0,height:0,overflow:"hidden"},".MathJax .MathJax_HitBox":{cursor:"text"},"#MathJax_Tooltip":{position:"absolute",left:0,top:0,width:"auto",height:"auto",display:"none"},"#MathJax_Tooltip *":{filter:"none",background:"transparent"}}},settings:d.config.menuSettings,LEFTBUTTON:(d.Browser.isMSIE?1:0),MENUKEY:"altKey",Font:null,Config:function(){this.Font=b();this.SUPER(arguments).Config.call(this);var g=this.settings;if(this.adjustAvailableFonts){this.adjustAvailableFonts(this.config.availableFonts)}if(g.scale){this.config.scale=g.scale}if(g.font&&g.font!=="Auto"){if(g.font==="TeX (local)"){this.config.availableFonts=["TeX"];this.config.preferredFont="TeX";this.config.webFont="TeX"}else{if(g.font==="STIX (local)"){this.config.availableFonts=["STIX"];this.config.preferredFont="STIX";this.config.webFont="TeX"}else{if(g.font==="TeX (web)"){this.config.availableFonts=[];this.config.preferredFont="";this.config.webFont="TeX"}else{if(g.font==="TeX (image)"){this.config.availableFonts=[];this.config.preferredFont="";this.config.webFont=""}}}}}var f=this.Font.findFont(this.config.availableFonts,this.config.preferredFont);if(!f&&this.allowWebFonts){f=this.config.webFont;if(f){this.webFonts=true}}if(!f&&this.config.imageFont){f=this.config.imageFont;this.imgFonts=true}if(f){this.fontInUse=f;this.fontDir+="/"+f;this.webfontDir+="/"+f;if(!this.require){this.require=[]}this.require.push(this.fontDir+"/fontdata.js");if(this.imgFonts){this.require.push(this.directory+"/imageFonts.js");d.Startup.signal.Post("HTML-CSS Jax - using image fonts")}}else{MathJax.Message.Set("Can't find a valid font using ["+this.config.availableFonts.join(", ")+"]",null,3000);this.FONTDATA={TeX_factor:1,baselineskip:1.2,lineH:0.8,lineD:0.2,ffLineH:0.8,FONTS:{},VARIANT:{normal:{fonts:[]}},RANGES:[],DELIMITERS:{},RULECHAR:45,REMAP:{}};if(MathJax.InputJax.TeX&&MathJax.InputJax.TeX.Definitions){MathJax.InputJax.TeX.Definitions.macros.overline[1]="002D";MathJax.InputJax.TeX.Definitions.macros.underline[1]="002D"}d.Startup.signal.Post("HTML-CSS Jax - no valid font")}},Startup:function(){var h=[],l=this.FONTDATA.VARIANT.normal.fonts;if(!(l instanceof Array)){l=[l]}for(var g=0,f=l.length;g<f;g++){h[g]=this.FONTDATA.FONTS[l[g]].family;if(!h[g]){h[g]=l[g]}}this.config.styles[".MathJax .math span"]=this.config.styles["#MathJax_getScales"]={"font-family":h.join(",")};this.hiddenDiv=this.Element("div",{style:{visibility:"hidden",overflow:"hidden",position:"absolute",top:0,height:"1px",width:"auto",padding:0,border:0,margin:0,textAlign:"left",textIndent:0,textTransform:"none",lineHeight:"normal",letterSpacing:"normal",wordSpacing:"normal"}});if(!document.body.firstChild){document.body.appendChild(this.hiddenDiv)}else{document.body.insertBefore(this.hiddenDiv,document.body.firstChild)}this.hiddenDiv=this.addElement(this.hiddenDiv,"div",{id:"MathJax_Hidden"});var k=this.addElement(this.hiddenDiv,"div",{style:{width:"5in"}});this.pxPerInch=k.offsetWidth/5;this.hiddenDiv.removeChild(k);this.startMarker=e.createStrut(this.Element("span"),10,true);this.endMarker=this.addText(this.Element("span"),"x").parentNode;this.HDspan=this.Element("span");if(this.operaHeightBug){this.createStrut(this.HDspan,0)}if(this.msieInlineBlockAlignBug){this.HDimg=this.addElement(this.HDspan,"img",{style:{height:"0px",width:"1px"}});try{this.HDimg.src="about:blank"}catch(j){}}else{this.HDimg=e.createStrut(this.HDspan,0)}this.HDMspan=this.Element("span",{style:{position:"absolute","font-size-adjust":"none"}});if(this.msieInlineBlockAlignBug){this.HDMimg=this.addElement(this.HDMspan,"img",{style:{height:"0px",width:"1px","max-width":"none","max-height":"none",border:0,padding:0,margin:0}});try{this.HDMimg.src="about:blank"}catch(j){}}else{this.HDMimg=e.createStrut(this.HDMspan,0);this.HDMimg.style.marginRight=""}this.marginCheck=e.Element("span",null,[["span",{style:{display:"inline-block",width:"5em"}}]]);this.marginMove=e.addElement(this.marginCheck,"span",{style:{display:"inline-block",width:"5em",marginLeft:"-5em"}});return c.Styles(this.config.styles,["PreloadWebFonts",this])},PreloadWebFonts:function(){if(!e.allowWebFonts||!e.config.preloadWebFonts){return}for(var g=0,f=e.config.preloadWebFonts.length;g<f;g++){var h=e.FONTDATA.FONTS[e.config.preloadWebFonts[g]];if(!h.available){e.Font.testFont(h)}}},Translate:function(l){if(!l.parentNode){return}var j=l.previousSibling;if(j&&String(j.className).match(/^MathJax(_MathML|_Display)?$/)){j.parentNode.removeChild(j)}var m=l.MathJax.elementJax.root,n,f,h;n=f=h=this.Element("span",{className:"MathJax",oncontextmenu:this.ContextMenu,onmousedown:this.Mousedown,onmouseover:this.Mouseover,onclick:this.Click,ondblclick:this.DblClick});var i=(m.Get("display")==="block");if(i){f=h=this.Element("div",{className:"MathJax_Display",style:{width:"100%",position:"relative"}});f.appendChild(n)}f.setAttribute("role","textbox");f.setAttribute("aria-readonly","true");if(this.useProcessingFrame){h=this.Element((i?"div":"span"),{className:"MathJax_Processing"});h.appendChild(f)}l.parentNode.insertBefore(h,l);var g;try{this.getScales(n);g=(this.em===0||String(this.em)==="NaN")}catch(k){g=true}if(g){this.hiddenDiv.appendChild(h);this.getScales(n)}this.initImg(n);this.initHTML(m,n);m.setTeXclass();try{m.toHTML(n,f)}catch(k){if(k.restart){h.parentNode.removeChild(h)}throw k}if(g){l.parentNode.insertBefore(h,l)}if(this.useProcessingFrame){h.parentNode.replaceChild(f,h)}},ContextMenu:function(i,j){if(e.config.showMathMenu&&(e.settings.context==="MathJax"||j)){if(e.safariContextMenuBug){setTimeout("window.getSelection().empty()",0)}if(!i||e.msieEventBug){i=window.event}var f=MathJax.Menu;if(f){var h=(this.parentNode.className==="MathJax_Display"?this.parentNode:this);f.jax=d.getJaxFor(h.nextSibling);f.menu.items[1].menu.items[1].name=(f.jax.inputJax.id==="MathML"?"Original":f.jax.inputJax.id);return f.menu.Post(i)}else{if(!c.loadingMathMenu){c.loadingMathMenu=true;var g={pageX:i.pageX,pageY:i.pageY,clientX:i.clientX,clientY:i.clientY};MathJax.Callback.Queue(c.Require("[MathJax]/extensions/MathMenu.js"),function(){delete c.loadingMathMenu},[this,arguments.callee,g,j])}if(!i){i=window.event}if(i.preventDefault){i.preventDefault()}if(i.stopPropagation){i.stopPropagation()}i.cancelBubble=true;i.returnValue=false;return false}}},Mousedown:function(f){if(e.config.showMathMenu){if(!f){f=window.event}if(e.settings.context==="MathJax"){if(!e.noContextMenuBug||f.button!==2){return}}else{if(!f[e.MENUKEY]||f.button!==e.LEFTBUTTON){return}}return e.ContextMenu.call(this,f,true)}},Mouseover:function(f){e.HandleEvent(f,"Mouseover",this)},Click:function(f){e.HandleEvent(f,"Click",this)},DblClick:function(f){e.HandleEvent(f,"DblClick",this)},HandleEvent:function(h,f,g){},initImg:function(f){},initHTML:function(g,f){},initFont:function(f){var h=e.FONTDATA.FONTS,g=e.config.availableFonts;if(g&&g.length&&e.Font.testFont(h[f])){h[f].available=true;return null}if(!this.allowWebFonts){return null}h[f].isWebFont=true;if(e.FontFaceBug){h[f].family=f;if(e.msieFontCSSBug){h[f].family+="-Web"}}return c.Styles({"@font-face":this.Font.fontFace(f)})},Remove:function(f){var g=f.SourceElement();if(!g){return}g=g.previousSibling;if(!g){return}if(g.className.match(/^MathJax/)){g.parentNode.removeChild(g)}},getScales:function(h){h.parentNode.insertBefore(this.HDMspan,h);this.HDMspan.className="";this.HDMspan.id="";this.HDMspan.style.fontSize="";this.HDMimg.style.height="1px";this.HDMimg.style.width="60ex";var g=this.HDMspan.offsetWidth/60;this.HDMspan.className="MathJax";this.HDMspan.id="MathJax_getScales";this.HDMimg.style.width="60em";var f=this.outerEm=this.HDMspan.offsetWidth/60;this.scale=Math.floor(Math.max(this.config.minScaleAdjust/100,(g/this.TeX.x_height)/f)*this.config.scale);h.style.fontSize=this.HDMspan.style.fontSize=this.scale+"%";this.em=a.mbase.prototype.em=this.HDMspan.offsetWidth/60;if(this.operaFontSizeBug&&f===this.em&&this.scale!==100){this.em=a.mbase.prototype.em=f*this.scale/100}h.parentNode.removeChild(this.HDMspan);this.msieMarginScale=this.getMarginScale(h)},getMarginScale:function(f){return 1},getMSIEmarginScale:function(h){h.appendChild(this.marginCheck);var f=this.marginCheck.offsetWidth,g=this.marginMove.offsetWidth;var i=(2*g-f?g/(2*g-f):1);h.removeChild(this.marginCheck);return i},getHD:function(g){var f=g.style.position;g.style.position="absolute";this.HDimg.style.height="0px";g.appendChild(this.HDspan);var h={h:g.offsetHeight};this.HDimg.style.height=h.h+"px";h.d=g.offsetHeight-h.h;h.h-=h.d;h.h/=this.em;h.d/=this.em;g.removeChild(this.HDspan);g.style.position=f;return h},getW:function(i){var g=i.offsetWidth,h=(i.bbox?i.bbox.w:-1),j=i;if((h<0||this.negativeSkipBug)&&g>=0){if(this.negativeSkipBug){var f=i.style.position;i.style.position="absolute";j=this.startMarker;if(i.firstChild){i.insertBefore(j,i.firstChild)}else{i.appendChild(j)}j=this.startMarker}i.appendChild(this.endMarker);g=this.endMarker.offsetLeft-j.offsetLeft;i.removeChild(this.endMarker);if(this.negativeSkipBug){i.removeChild(j);i.style.position=f}}return g/this.em},Measured:function(h,g){if(h.bbox.width==null&&h.bbox.w&&!h.bbox.isMultiline){var f=this.getW(h);h.bbox.rw+=f-h.bbox.w;h.bbox.w=f}if(!g){g=h.parentNode}if(!g.bbox){g.bbox=h.bbox}return h},Remeasured:function(g,f){f.bbox=this.Measured(g,f).bbox},Em:function(f){if(Math.abs(f)<0.0006){return"0em"}return f.toFixed(3).replace(/\.?0+$/,"")+"em"},Percent:function(f){return(100*f).toFixed(1).replace(/\.?0+$/,"")+"%"},length2percent:function(f){return this.Percent(this.length2em(f))},length2em:function(k,i){if(typeof(k)!=="string"){k=k.toString()}if(k===""){return""}if(k===a.SIZE.NORMAL){return 1}if(k===a.SIZE.BIG){return 2}if(k===a.SIZE.SMALL){return 0.71}if(k==="infinity"){return e.BIGDIMEN}var h=this.FONTDATA.TeX_factor;if(k.match(/mathspace$/)){return e.MATHSPACE[k]*h}var g=k.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);var f=parseFloat(g[1]||"1"),j=g[2];if(i==null){i=1}if(j==="em"){return f*h}if(j==="ex"){return f*e.TeX.x_height*h}if(j==="%"){return f/100*i}if(j==="px"){return f/e.em}if(j==="pt"){return f/10*h}if(j==="pc"){return f*1.2*h}if(j==="in"){return f*this.pxPerInch/e.em}if(j==="cm"){return f*this.pxPerInch/e.em/2.54}if(j==="mm"){return f*this.pxPerInch/e.em/25.4}if(j==="mu"){return f/18*h}return f*h*i},thickness2em:function(f){var g=e.TeX.rule_thickness;if(f===a.LINETHICKNESS.MEDIUM){return g}if(f===a.LINETHICKNESS.THIN){return 0.67*g}if(f===a.LINETHICKNESS.THICK){return 1.67*g}return this.length2em(f,g)},createStrut:function(i,g,j){var f=this.Element("span",{style:{display:"inline-block",overflow:"hidden",height:g+"px",width:"1px",marginRight:"-1px"}});if(j){i.insertBefore(f,i.firstChild)}else{i.appendChild(f)}return f},createBlank:function(g,f,h){var i=this.Element("span",{style:{display:"inline-block",overflow:"hidden",height:"1px",width:this.Em(f)}});if(h){g.insertBefore(i,g.firstChild)}else{g.appendChild(i)}return i},createShift:function(g,f,i){var h=this.Element("span",{style:{marginLeft:this.Em(f)}});if(i){g.insertBefore(h,g.firstChild)}else{g.appendChild(h)}return h},createSpace:function(k,j,m,f,g){var i=this.Em(Math.max(0,j+m)),l=this.Em(-m);if(this.msieInlineBlockAlignBug){l=this.Em(e.getHD(k.parentNode).d-m)}if(k.isBox||k.className=="mspace"){k.bbox={h:j*k.scale,d:m*k.scale,w:f*k.scale,rw:f*k.scale,lw:0};k.style.height=i;k.style.verticalAlign=l}else{k=this.addElement(k,"span",{style:{height:i,verticalAlign:l}})}if(f>=0){k.style.width=this.Em(f);k.style.display="inline-block"}else{if(this.msieNegativeSpaceBug){k.style.height=""}k.style.marginLeft=this.Em(f);if(e.safariNegativeSpaceBug&&k.parentNode.firstChild==k){this.createBlank(k,0,true)}}if(g&&g!==a.COLOR.TRANSPARENT){k.style.backgroundColor=g}return k},createRule:function(o,k,m,p,i){var j=e.TeX.min_rule_thickness;if(p>0&&p*this.em<j){p=j/this.em}if(k+m>0&&(k+m)*this.em<j){var l=1/(k+m)*(j/this.em);k*=l;m*=l}if(!i){i="solid"}else{i="solid "+i}i=this.Em(p)+" "+i;var q=this.Em(k+m),g=this.Em(-m);var n=this.addElement(o,"span",{style:{borderLeft:i,display:"inline-block",overflow:"hidden",width:0,height:q,verticalAlign:g},bbox:{h:k,d:m,w:p,rw:p,lw:0},noAdjust:true});if(p>0&&n.offsetWidth==0){n.style.width=this.Em(p)}if(o.isBox||o.className=="mspace"){o.bbox=n.bbox}return n},createFrame:function(o,m,n,p,r,g){var l=(this.msieBorderWidthBug?0:2*r);var q=this.Em(m+n-l),f=this.Em(-n-r),k=this.Em(p-l);var i=this.Em(r)+" "+g;var j=this.addElement(o,"span",{style:{border:i,display:"inline-block",overflow:"hidden",width:k,height:q},bbox:{h:m,d:n,w:p,rw:p,lw:0},noAdjust:true});if(f){j.style.verticalAlign=f}return j},createStack:function(h,j,g){if(this.msiePaddingWidthBug){this.createStrut(h,0)}var i=String(g).match(/%$/);var f=(!i&&g!=null?g:0);h=this.addElement(h,"span",{noAdjust:true,style:{display:"inline-block",position:"relative",width:(i?"100%":this.Em(f)),height:0}});if(!j){h.parentNode.bbox=h.bbox={h:-this.BIGDIMEN,d:-this.BIGDIMEN,w:f,lw:this.BIGDIMEN,rw:(!i&&g!=null?g:-this.BIGDIMEN)};if(i){h.bbox.width=g}}return h},createBox:function(g,f){var h=this.addElement(g,"span",{style:{position:"absolute"},isBox:true});if(f!=null){h.style.width=f}return h},addBox:function(f,g){g.style.position="absolute";g.isBox=true;return f.appendChild(g)},placeBox:function(n,m,k,i){var o=n.parentNode,v=n.bbox,q=o.bbox;if(this.msiePlaceBoxBug){this.addText(n,this.NBSP)}if(this.imgSpaceBug){this.addText(n,this.imgSpace)}var p=n.offsetHeight/this.em+1,z=0;if(n.noAdjust){p-=1}else{if(this.msieInlineBlockAlignBug){this.addElement(n,"img",{className:"MathJax_strut",border:0,src:"about:blank",style:{width:0,height:this.Em(p)}})}else{this.addElement(n,"span",{style:{display:"inline-block",width:0,height:this.Em(p)}})}}n.style.top=this.Em(-k-p);n.style.left=this.Em(m+z);if(v){if(this.negativeSkipBug){if(v.lw<0){z=v.lw;e.createBlank(n,-z,true);h=0}if(v.rw>v.w){e.createBlank(n,v.rw-v.w+0.1)}}if(!this.msieClipRectBug&&!v.noclip&&!i){var u=3/this.em;var s=(v.H==null?v.h:v.H),g=(v.D==null?v.d:v.D);var w=p-s-u,j=p+g+u,h=v.lw-3*u,f=1000;if(v.isFixed){f=v.width-h}n.style.clip="rect("+this.Em(w)+" "+this.Em(f)+" "+this.Em(j)+" "+this.Em(h)+")"}}if(v&&q){if(v.H!=null&&(q.H==null||v.H+k>q.H)){q.H=v.H+k}if(v.D!=null&&(q.D==null||v.D-k>q.D)){q.D=v.D-k}if(v.h+k>q.h){q.h=v.h+k}if(v.d-k>q.d){q.d=v.d-k}if(q.H!=null&&q.H<=q.h){delete q.H}if(q.D!=null&&q.D<=q.d){delete q.D}if(v.w+m>q.w){q.w=v.w+m;if(q.width==null){o.style.width=this.Em(q.w)}}if(v.rw+m>q.rw){q.rw=v.rw+m}if(v.lw+m<q.lw){q.lw=v.lw+m}if(v.width!=null&&!v.isFixed){if(q.width==null){o.style.width=q.width="100%"}n.style.width=v.width}}},alignBox:function(h,n,m){this.placeBox(h,0,m);var j=h.bbox;if(j.isMultiline){return}var g=j.width!=null&&!j.isFixed;var i=0,k=-j.w/2,f="50%";if(this.negativeSkipBug){i=j.w-j.rw-0.1;k+=j.lw}k=this.Em(k*this.msieMarginScale);if(g){k="";f=(50-parseFloat(j.width)/2)+"%"}d.Insert(h.style,({right:{left:"",right:this.Em(i)},center:{left:f,marginLeft:k}})[n])},setStackWidth:function(g,f){if(typeof(f)==="number"){g.style.width=this.Em(Math.max(0,f));if(g.bbox){g.bbox.w=f}if(g.parentNode.bbox){g.parentNode.bbox.w=f}}else{g.style.width=g.parentNode.style.width="100%";if(g.bbox){g.bbox.width=f}if(g.parentNode.bbox){g.parentNode.bbox.width=f}}},createDelimiter:function(q,f,h,l,j){if(!f){q.bbox={h:0,d:0,w:this.TeX.nulldelimiterspace,lw:0};q.bbox.rw=q.bbox.w;this.createSpace(q,q.bbox.h,q.bbox.d,q.bbox.w);return}if(!l){l=1}if(!(h instanceof Array)){h=[h,h]}var p=h[1];h=h[0];var g={alias:f};while(g.alias){f=g.alias;g=this.FONTDATA.DELIMITERS[f];if(!g){g={HW:[0,this.FONTDATA.VARIANT[a.VARIANT.NORMAL]]}}}for(var o=0,k=g.HW.length;o<k;o++){if(g.HW[o][0]*l>=h-0.01||(o==k-1&&!g.stretch)){if(g.HW[o][2]){l*=g.HW[o][2]}if(g.HW[o][3]){f=g.HW[o][3]}var n=this.addElement(q,"span");this.createChar(n,[f,g.HW[o][1]],l,j);q.bbox=n.bbox;q.offset=0.65*q.bbox.w;q.scale=l;return}}if(g.stretch){this["extendDelimiter"+g.dir](q,p,g.stretch,l,j)}},extendDelimiterV:function(v,p,A,B,s){var i=this.createStack(v,true);var r=this.createBox(i),q=this.createBox(i);this.createChar(r,(A.top||A.ext),B,s);this.createChar(q,(A.bot||A.ext),B,s);var g={bbox:{w:0,lw:0,rw:0}},z=g,j;var w=r.bbox.h+r.bbox.d+q.bbox.h+q.bbox.d;var m=-r.bbox.h;this.placeBox(r,0,m,true);m-=r.bbox.d;if(A.mid){z=this.createBox(i);this.createChar(z,A.mid,B,s);w+=z.bbox.h+z.bbox.d}if(p>w){g=this.Element("span");this.createChar(g,A.ext,B,s);var x=g.bbox.h+g.bbox.d,f=x-0.05,t,l,u=(A.mid?2:1);l=t=Math.ceil((p-w)/(u*f));if(!A.fullExtenders){f=(p-w)/(u*t)}var o=(t/(t+1))*(x-f);f=x-o;m+=o+f-g.bbox.h;while(u-->0){while(t-->0){if(!this.msieCloneNodeBug){j=g.cloneNode(true)}else{j=this.Element("span");this.createChar(j,A.ext,B,s)}m-=f;this.placeBox(this.addBox(i,j),0,m,true)}m+=o-g.bbox.d;if(A.mid&&u){this.placeBox(z,0,m-z.bbox.h,true);t=l;m+=-(z.bbox.h+z.bbox.d)+o+f-g.bbox.h}}}else{m+=(w-p)/2;if(A.mid){this.placeBox(z,0,m-z.bbox.h,true);m+=-(z.bbox.h+z.bbox.d)}m+=(w-p)/2}this.placeBox(q,0,m-q.bbox.h,true);m-=q.bbox.h+q.bbox.d;v.bbox={w:Math.max(r.bbox.w,g.bbox.w,q.bbox.w,z.bbox.w),lw:Math.min(r.bbox.lw,g.bbox.lw,q.bbox.lw,z.bbox.lw),rw:Math.max(r.bbox.rw,g.bbox.rw,q.bbox.rw,z.bbox.rw),h:0,d:-m};v.scale=B;v.offset=0.55*v.bbox.w;v.isMultiChar=true;this.setStackWidth(i,v.bbox.w)},extendDelimiterH:function(u,h,z,B,r){var l=this.createStack(u,true);var i=this.createBox(l),v=this.createBox(l);this.createChar(i,(z.left||z.rep),B,r);this.createChar(v,(z.right||z.rep),B,r);var f=this.Element("span");this.createChar(f,z.rep,B,r);var y={bbox:{h:-this.BIGDIMEN,d:-this.BIGDIMEN}},g;this.placeBox(i,-i.bbox.lw,0,true);var p=(i.bbox.rw-i.bbox.lw)+(v.bbox.rw-v.bbox.lw)-0.05,o=i.bbox.rw-i.bbox.lw-0.025,q;if(z.mid){y=this.createBox(l);this.createChar(y,z.mid,B,r);p+=y.bbox.w}if(h>p){var A=f.bbox.rw-f.bbox.lw,j=A-0.05,s,m,t=(z.mid?2:1);m=s=Math.ceil((h-p)/(t*j));j=(h-p)/(t*s);q=(s/(s+1))*(A-j);j=A-q;o-=f.bbox.lw+q;while(t-->0){while(s-->0){if(!this.msieCloneNodeBug){g=f.cloneNode(true)}else{g=this.Element("span");this.createChar(g,z.rep,B,r)}this.placeBox(this.addBox(l,g),o,0,true);o+=j}if(z.mid&&t){this.placeBox(y,o,0,true);o+=y.bbox.w-q;s=m}}}else{q=Math.min(p-h,i.bbox.w/2);o-=q/2;if(z.mid){this.placeBox(y,o,0,true);o+=y.bbox.w}o-=q/2}this.placeBox(v,o,0,true);u.bbox={w:o+v.bbox.rw,lw:0,rw:o+v.bbox.rw,H:Math.max(i.bbox.h,f.bbox.h,v.bbox.h,y.bbox.h),D:Math.max(i.bbox.d,f.bbox.d,v.bbox.d,y.bbox.d),h:f.bbox.h,d:f.bbox.d};u.scale=B;u.isMultiChar=true;this.setStackWidth(l,u.bbox.w)},createChar:function(o,k,h,f){var n=o,p="",j={fonts:[k[1]],noRemap:true};if(f&&f===a.VARIANT.BOLD){j.fonts=[k[1]+"-bold",k[1]]}if(typeof(k[1])!=="string"){j=k[1]}if(k[0] instanceof Array){for(var l=0,g=k[0].length;l<g;l++){p+=String.fromCharCode(k[0][l])}}else{p=String.fromCharCode(k[0])}if(h!==1){n=this.addElement(o,"span",{style:{fontSize:this.Percent(h)},scale:h});this.handleVariant(n,j,p);o.bbox=n.bbox}else{this.handleVariant(o,j,p)}if(k[2]){o.style.marginLeft=this.Em(k[2])}if(this.AccentBug&&o.bbox.w===0){n.firstChild.nodeValue+=this.NBSP;e.createSpace(o,0,0,-o.offsetWidth/e.em)}},positionDelimiter:function(g,f){f-=g.bbox.h;g.bbox.d-=f;g.bbox.h+=f;if(f){if(this.safariVerticalAlignBug||this.msieVerticalAlignBug||this.konquerorVerticalAlignBug||(this.operaVerticalAlignBug&&g.isMultiChar)){if(g.firstChild.style.display===""&&g.style.top!==""){g=g.firstChild;f-=parseFloat(g.style.top)}g.style.position="relative";g.style.top=this.Em(-f)}else{g.style.verticalAlign=this.Em(f);if(e.ffVerticalAlignBug){e.createRule(g.parentNode,g.bbox.h,0,0)}}}},handleVariant:function(v,j,o){var u="",s,y,p,g,x,z,f=v;if(o.length===0){return}if(!v.bbox){v.bbox={w:0,h:-this.BIGDIMEN,d:-this.BIGDIMEN,rw:-this.BIGDIMEN,lw:this.BIGDIMEN}}if(!j){j=this.FONTDATA.VARIANT[a.VARIANT.NORMAL]}z=j;for(var w=0,t=o.length;w<t;w++){j=z;s=o.charCodeAt(w);y=o.charAt(w);if(y===this.PLANE1){w++;s=o.charCodeAt(w)+119808-56320;if(this.FONTDATA.RemapPlane1){var A=this.FONTDATA.RemapPlane1(s,j);s=A.n;j=A.variant}}else{var q,l,r=this.FONTDATA.RANGES;for(q=0,l=r.length;q<l;q++){if(r[q].name==="alpha"&&j.noLowerCase){continue}var k=j["offset"+r[q].offset];if(k&&s>=r[q].low&&s<=r[q].high){if(r[q].remap&&r[q].remap[s]){s=k+r[q].remap[s]}else{s=s-r[q].low+k;if(r[q].add){s+=r[q].add}}if(j["variant"+r[q].offset]){j=this.FONTDATA.VARIANT[j["variant"+r[q].offset]]}break}}}if(j.remap&&j.remap[s]){if(j.remap[s] instanceof Array){var h=j.remap[s];s=h[0];j=this.FONTDATA.VARIANT[h[1]]}else{s=j.remap[s];if(j.remap.variant){j=this.FONTDATA.VARIANT[j.remap.variant]}}}if(this.FONTDATA.REMAP[s]&&!j.noRemap){s=this.FONTDATA.REMAP[s]}p=this.lookupChar(j,s);y=p[s];if(j!==x&&!y[5].img){if(u.length){this.addText(f,u);u=""}f=v;x=g;if(j!==x){if(x){f=this.addElement(v,"span")}else{g=j}}this.handleFont(f,p,f!==v);x=j}u=this.handleChar(f,p,y,s,u);if(y[0]/1000>v.bbox.h){v.bbox.h=y[0]/1000}if(y[1]/1000>v.bbox.d){v.bbox.d=y[1]/1000}if(v.bbox.w+y[3]/1000<v.bbox.lw){v.bbox.lw=v.bbox.w+y[3]/1000}if(v.bbox.w+y[4]/1000>v.bbox.rw){v.bbox.rw=v.bbox.w+y[4]/1000}v.bbox.w+=y[2]/1000}if(u.length){this.addText(f,u)}if(v.scale&&v.scale!==1){v.bbox.h*=v.scale;v.bbox.d*=v.scale;v.bbox.w*=v.scale;v.bbox.lw*=v.scale;v.bbox.rw*=v.scale}if(o.length==1&&p.skew&&p.skew[s]){v.bbox.skew=p.skew[s]}},handleFont:function(h,f,j){h.style.fontFamily=f.family;if(!(e.FontFaceBug&&f.isWebFont)){var g=f.style||"normal",i=f.weight||"normal";if(g!=="normal"||j){h.style.fontStyle=g}if(i!=="normal"||j){h.style.fontWeight=i}}},handleChar:function(g,f,l,k,j){var i=l[5];if(i.img){return this.handleImg(g,f,l,k,j)}if(i.isUnknown&&this.FONTDATA.DELIMITERS[k]){if(j.length){this.addText(g,j)}var h=g.scale;e.createDelimiter(g,k,0,1,f);g.scale=h;l[0]=g.bbox.h*1000;l[1]=g.bbox.d*1000;l[2]=g.bbox.w*1000;l[3]=g.bbox.lw*1000;l[4]=g.bbox.rw*1000;return""}if(i.c==null){if(k<=65535){i.c=String.fromCharCode(k)}else{i.c=this.PLANE1+String.fromCharCode(k-119808+56320)}}if(l[2]||!this.msieAccentBug||j.length){return j+i.c}e.createShift(g,l[3]/1000);e.createShift(g,(l[4]-l[3])/1000);this.addText(g,i.c);e.createShift(g,-l[4]/1000);return""},handleImg:function(g,f,j,i,h){return h},lookupChar:function(j,p){var h,f;if(!j.FONTS){var o=this.FONTDATA.FONTS;var l=(j.fonts||this.FONTDATA.VARIANT.normal.fonts);if(!(l instanceof Array)){l=[l]}if(j.fonts!=l){j.fonts=l}j.FONTS=[];for(h=0,f=l.length;h<f;h++){if(o[l[h]]){j.FONTS.push(o[l[h]]);o[l[h]].name=l[h]}}}for(h=0,f=j.FONTS.length;h<f;h++){var g=j.FONTS[h];if(typeof(g)==="string"){delete j.FONTS;this.loadFont(g)}if(g[p]){if(g[p].length===5){g[p][5]={}}if(e.allowWebFonts&&!g.available){this.loadWebFont(g)}else{return g}}else{this.findBlock(g,p)}}var k=(j.defaultFont||{family:e.config.undefinedFamily});if(j.bold){k.weight="bold"}if(j.italic){k.style="italic"}k[p]=[800,200,500,0,500,{isUnknown:true}];return k},findBlock:function(g,n){if(g.Ranges){for(var l=0,f=g.Ranges.length;l<f;l++){if(n<g.Ranges[l][0]){return}if(n<=g.Ranges[l][1]){var k=g.Ranges[l][2];for(var h=g.Ranges.length-1;h>=0;h--){if(g.Ranges[h][2]==k){g.Ranges.splice(h,1)}}this.loadFont(g.directory+"/"+k+".js")}}}},loadFont:function(g){var f=MathJax.Callback.Queue();f.Push(["Require",c,this.fontDir+"/"+g]);if(this.imgFonts){if(!MathJax.isPacked){g=g.replace(/\/([^\/]*)$/,e.imgPacked+"/$1")}f.Push(["Require",c,this.webfontDir+"/png/"+g])}d.RestartAfter(f.Push({}))},loadWebFont:function(f){f.available=f.isWebFont=true;if(e.FontFaceBug){f.family=f.name;if(e.msieFontCSSBug){f.family+="-Web"}}d.RestartAfter(this.Font.loadWebFont(f))},loadWebFontError:function(g,f){d.Startup.signal.Post("HTML-CSS Jax - disable web fonts");g.isWebFont=false;if(this.config.imageFont&&this.config.imageFont===this.fontInUse){this.imgFonts=true;d.Startup.signal.Post("HTML-CSS Jax - switch to image fonts");d.Startup.signal.Post("HTML-CSS Jax - using image fonts");MathJax.Message.Set("Web-Fonts not available -- using image fonts instead",null,3000);c.Require(this.directory+"/imageFonts.js",f)}else{this.allowWebFonts=false;f()}},Element:MathJax.HTML.Element,addElement:MathJax.HTML.addElement,TextNode:MathJax.HTML.TextNode,addText:MathJax.HTML.addText,ucMatch:MathJax.HTML.ucMatch,BIGDIMEN:10000000,ID:0,idPostfix:"",GetID:function(){this.ID++;return this.ID},MATHSPACE:{veryverythinmathspace:1/18,verythinmathspace:2/18,thinmathspace:3/18,mediummathspace:4/18,thickmathspace:5/18,verythickmathspace:6/18,veryverythickmathspace:7/18,negativeveryverythinmathspace:-1/18,negativeverythinmathspace:-2/18,negativethinmathspace:-3/18,negativemediummathspace:-4/18,negativethickmathspace:-5/18,negativeverythickmathspace:-6/18,negativeveryverythickmathspace:-7/18},TeX:{x_height:0.430554,quad:1,num1:0.676508,num2:0.393732,num3:0.44373,denom1:0.685951,denom2:0.344841,sup1:0.412892,sup2:0.362892,sup3:0.288888,sub1:0.15,sub2:0.247217,sup_drop:0.386108,sub_drop:0.05,delim1:2.39,delim2:1,axis_height:0.25,rule_thickness:0.06,big_op_spacing1:0.111111,big_op_spacing2:0.166666,big_op_spacing3:0.2,big_op_spacing4:0.6,big_op_spacing5:0.1,scriptspace:0.1,nulldelimiterspace:0.12,delimiterfactor:901,delimitershortfall:0.1,min_rule_thickness:1.25},PLANE1:String.fromCharCode(55349),NBSP:String.fromCharCode(160),rfuzz:0});MathJax.Hub.Register.StartupHook("mml Jax Ready",function(){a=MathJax.ElementJax.mml;a.mbase.Augment({toHTML:function(l){var j=this.HTMLlineBreaks();if(j.length>2){return this.toHTMLmultiline(l,j)}l=this.HTMLcreateSpan(l);if(this.type!="mrow"){l=this.HTMLhandleSize(l)}for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]){this.data[g].toHTML(l)}}var o=this.HTMLcomputeBBox(l);var k=l.bbox.h,n=l.bbox.d;for(g=0,f=o.length;g<f;g++){o[g].HTMLstretchV(l,k,n)}if(o.length){this.HTMLcomputeBBox(l,true)}this.HTMLhandleSpace(l);this.HTMLhandleColor(l);return l},HTMLlineBreaks:function(){var k=[[0,this]];for(var h=0,f=this.data.length;h<f;h++){if(this.data[h]){var l=this.data[h].lineBreak();if(l!=="none"){var g=(l==="after"?h+1:h);if(k.length===0||k[k.length-1]!==g){k.push([g,this.data[h]])}else{k[k.length-1]=[g,this.data[h]]}}}}k.push([this.data.length,k[k.length-1][1]]);return k},toHTMLmultiline:function(f){a.mbase.HTMLautoloadFile("multiline")},HTMLcomputeBBox:function(l,k,j,f){if(j==null){j=0}if(f==null){f=this.data.length}var h=l.bbox={},n=[];while(j<f){var g=this.data[j];if(!g){continue}if(!k&&g.HTMLcanStretch("Vertical")){n.push(g);g=(g.CoreMO()||g)}this.HTMLcombineBBoxes(g,h);j++}this.HTMLcleanBBox(h);return n},HTMLcombineBBoxes:function(f,g){if(g.w==null){this.HTMLemptyBBox(g)}var i=f.HTMLspanElement();if(!i||!i.bbox){return}var h=i.bbox;if(h.d>g.d){g.d=h.d}if(h.h>g.h){g.h=h.h}if(h.D!=null&&h.D>g.D){g.D=h.D}if(h.H!=null&&h.H>g.H){g.H=h.H}if(i.style.paddingLeft){g.w+=parseFloat(i.style.paddingLeft)*(i.scale||1)}if(g.w+h.lw<g.lw){g.lw=g.w+h.lw}if(g.w+h.rw>g.rw){g.rw=g.w+h.rw}g.w+=h.w;if(i.style.paddingRight){g.w+=parseFloat(i.style.paddingRight)*(i.scale||1)}if(h.width){g.width=h.width}},HTMLemptyBBox:function(f){f.h=f.d=f.H=f.D=f.rw=-e.BIGDIMEN;f.w=0;f.lw=e.BIGDIMEN;return f},HTMLcleanBBox:function(f){if(f.h===this.BIGDIMEN){f.h=f.d=f.H=f.D=f.w=f.rw=f.lw=0}if(f.D<=f.d){delete f.D}if(f.H<=f.h){delete f.H}},HTMLzeroBBox:function(){return{h:0,d:0,w:0,lw:0,rw:0}},HTMLcanStretch:function(f){if(this.isEmbellished()){return this.Core().HTMLcanStretch(f)}return false},HTMLstretchH:function(g,f){return this.HTMLspanElement()},HTMLstretchV:function(g,f,i){return this.HTMLspanElement()},HTMLnotEmpty:function(f){while(f){if((f.type!=="mrow"&&f.type!=="texatom")||f.data.length>1){return true}f=f.data[0]}return false},HTMLmeasureChild:function(g,f){if(this.data[g]!=null){e.Measured(this.data[g].toHTML(f),f)}else{f.bbox=this.HTMLzeroBBox()}},HTMLcreateSpan:function(f){if(this.spanID){var g=this.HTMLspanElement();if(g){while(g.firstChild){g.removeChild(g.firstChild)}g.bbox={w:0,h:0,d:0,lw:0,rw:0};g.scale=1;g.isMultChar=null;g.style.cssText="";return g}}if(this.href){f=e.addElement(f,"a",{href:this.href})}f=e.addElement(f,"span",{className:this.type});if(e.imgHeightBug){f.style.display="inline-block"}if(this["class"]!=null){f.className+=" "+this["class"]}if(this.style){f.style.cssText=this.style;if(f.style.fontSize){this.mathsize=f.style.fontSize;f.style.fontSize=""}}this.spanID=e.GetID();f.id=(this.id||"MathJax-Span-"+this.spanID)+e.idPostfix;f.bbox={w:0,h:0,d:0,lw:0,lr:0};if(this.href){f.parentNode.bbox=f.bbox}return f},HTMLspanElement:function(){if(!this.spanID){return null}return document.getElementById((this.id||"MathJax-Span-"+this.spanID)+e.idPostfix)},HTMLhandleVariant:function(g,f,h){e.handleVariant(g,f,h)},HTMLhandleSize:function(f){if(!f.scale){f.scale=this.HTMLgetScale();if(f.scale!==1){f.style.fontSize=e.Percent(f.scale)}}return f},HTMLhandleColor:function(k){var m=this.getValues("mathcolor","color");if(this.mathbackground){m.mathbackground=this.mathbackground}if(this.background){m.background=this.background}if(this.style&&k.style.backgroundColor){m.mathbackground=k.style.backgroundColor;k.style.backgroundColor="transparent"}if(m.color&&!this.mathcolor){m.mathcolor=m.color}if(m.background&&!this.mathbackground){m.mathbackground=m.background}if(m.mathcolor){k.style.color=m.mathcolor}if(m.mathbackground&&m.mathbackground!==a.COLOR.TRANSPARENT){var n=1/e.em,j=0,i=0;if(this.isToken){j=k.bbox.lw;i=k.bbox.rw-k.bbox.w}if(k.style.paddingLeft!==""){j+=parseFloat(k.style.paddingLeft)*(k.scale||1)}if(k.style.paddingRight!==""){i-=parseFloat(k.style.paddingRight)*(k.scale||1)}var h=Math.max(0,e.getW(k)+(e.PaddingWidthBug?0:i-j));if(e.msieCharPaddingWidthBug&&k.style.paddingLeft!==""){h+=parseFloat(k.style.paddingLeft)*(k.scale||1)}var l=k.bbox.h+k.bbox.d,f=-k.bbox.d;if(h>0){h+=2*n;j-=n}if(l>0){l+=2*n;f-=n}i=-h-j;var g=e.Element("span",{id:"MathJax-Color-"+this.spanID+e.idPostfix,style:{display:"inline-block",backgroundColor:m.mathbackground,width:e.Em(h),height:e.Em(l),verticalAlign:e.Em(f),marginLeft:e.Em(j),marginRight:e.Em(i)}});if(e.msieInlineBlockAlignBug){g.style.position="relative";g.style.width=g.style.height=0;g.style.verticalAlign=g.style.marginLeft=g.style.marginRight="";e.placeBox(e.addElement(g,"span",{noAdjust:true,style:{display:"inline-block",position:"absolute",overflow:"hidden",width:e.Em(h),height:e.Em(l),background:m.mathbackground}}),j,k.bbox.h+n)}k.parentNode.insertBefore(g,k);if(e.msieColorPositionBug){k.style.position="relative"}return g}return null},HTMLremoveColor:function(){var f=document.getElementById("MathJax-Color-"+this.spanID+e.idPostfix);if(f){f.parentNode.removeChild(f)}},HTMLhandleSpace:function(i){if(this.useMMLspacing){if(this.type!=="mo"){return}var g=this.getValues("scriptlevel","lspace","rspace");if(g.scriptlevel<=0||this.hasValue("lspace")||this.hasValue("rspace")){g.lspace=Math.max(0,e.length2em(g.lspace));g.rspace=Math.max(0,e.length2em(g.rspace));var f=this,h=this.Parent();while(h&&h.isEmbellished()&&h.Core()===f){f=h;h=h.Parent();i=f.HTMLspanElement()}if(g.lspace){i.style.paddingLeft=e.Em(g.lspace)}if(g.rspace){i.style.paddingRight=e.Em(g.rspace)}}}else{var j=this.texSpacing();if(j!==""){j=e.length2em(j)/(i.scale||1);if(i.style.paddingLeft){j+=parseFloat(i.style.paddingLeft)}i.style.paddingLeft=e.Em(j)}}},HTMLgetScale:function(){var h=1,f=this.getValues("mathsize","scriptlevel","fontsize","scriptminsize");if(this.style){var g=this.HTMLspanElement();if(g.style.fontSize!=""){f.fontsize=g.style.fontSize}}if(f.fontsize&&!this.mathsize){f.mathsize=f.fontsize}if(f.scriptlevel!==0){if(f.scriptlevel>2){f.scriptlevel=2}h=Math.pow(this.Get("scriptsizemultiplier"),f.scriptlevel);f.scriptminsize=e.length2em(f.scriptminsize);if(h<f.scriptminsize){h=f.scriptminsize}}h*=e.length2em(f.mathsize);return h},HTMLgetVariant:function(){var f=this.getValues("mathvariant","fontfamily","fontweight","fontstyle");if(this.style){var h=this.HTMLspanElement();if(h.style.fontFamily){f.fontfamily=h.style.fontFamily}if(h.style.fontWeight){f.fontweight=h.style.fontWeight}if(h.style.fontStyle){f.fontStyle=h.style.fontStyle}}var g=f.mathvariant;if(this.variantForm){g="-"+e.fontInUse+"-variant"}if(f.fontfamily&&!this.mathvariant){if(!f.fontweight&&f.mathvariant.match(/bold/)){f.fontweight="bold"}if(!f.fontstyle&&f.mathvariant.match(/italic/)){f.fontstyle="italic"}return{FONTS:[],fonts:[],noRemap:true,defaultFont:{family:f.fontfamily,style:f.fontstyle,weight:f.fontweight}}}if(f.fontweight==="bold"){g={normal:a.VARIANT.BOLD,italic:a.VARIANT.BOLDITALIC,fraktur:a.VARIANT.BOLDFRAKTUR,script:a.VARIANT.BOLDSCRIPT,"sans-serif":a.VARIANT.BOLDSANSSERIF,"sans-serif-italic":a.VARIANT.SANSSERIFBOLDITALIC}[g]||g}else{if(f.fontweight==="normal"){g={bold:a.VARIANT.normal,"bold-italic":a.VARIANT.ITALIC,"bold-fraktur":a.VARIANT.FRAKTUR,"bold-script":a.VARIANT.SCRIPT,"bold-sans-serif":a.VARIANT.SANSSERIF,"sans-serif-bold-italic":a.VARIANT.SANSSERIFITALIC}[g]||g}}if(f.fontstyle==="italic"){g={normal:a.VARIANT.ITALIC,bold:a.VARIANT.BOLDITALIC,"sans-serif":a.VARIANT.SANSSERIFITALIC,"bold-sans-serif":a.VARIANT.SANSSERIFBOLDITALIC}[g]||g}else{if(f.fontstyle==="normal"){g={italic:a.VARIANT.NORMAL,"bold-italic":a.VARIANT.BOLD,"sans-serif-italic":a.VARIANT.SANSSERIF,"sans-serif-bold-italic":a.VARIANT.BOLDSANSSERIF}[g]||g}}return e.FONTDATA.VARIANT[g]}},{HTMLautoload:function(){var f=e.autoloadDir+"/"+this.type+".js";d.RestartAfter(c.Require(f))},HTMLautoloadFile:function(f){var g=e.autoloadDir+"/"+f+".js";d.RestartAfter(c.Require(g))},HTMLstretchH:function(g,f){this.HTMLremoveColor();return this.toHTML(g,f)},HTMLstretchV:function(g,f,i){this.HTMLremoveColor();return this.toHTML(g,f,i)}});a.chars.Augment({toHTML:function(g,f){this.HTMLhandleVariant(g,f,this.data.join("").replace(/[\u2061-\u2064]/g,""))}});a.entity.Augment({toHTML:function(g,f){this.HTMLhandleVariant(g,f,this.toString().replace(/[\u2061-\u2064]/g,""))}});a.mi.Augment({toHTML:function(j){j=this.HTMLhandleSize(this.HTMLcreateSpan(j));j.bbox=null;var h=this.HTMLgetVariant();for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]){this.data[g].toHTML(j,h)}}if(!j.bbox){j.bbox={w:0,h:0,d:0,rw:0,lw:0}}if(this.data.join("").length!==1){delete j.bbox.skew}this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j}});a.mn.Augment({toHTML:function(j){j=this.HTMLhandleSize(this.HTMLcreateSpan(j));j.bbox=null;var h=this.HTMLgetVariant();for(var g=0,f=this.data.length;g<f;g++){if(this.data[g]){this.data[g].toHTML(j,h)}}if(!j.bbox){j.bbox={w:0,h:0,d:0,rw:0,lw:0}}if(this.data.join("").length!==1){delete j.bbox.skew}this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j}});a.mo.Augment({toHTML:function(k){k=this.HTMLhandleSize(this.HTMLcreateSpan(k));if(this.data.length==0){return k}else{k.bbox=null}var n=this.data.join("");var j=this.HTMLgetVariant();var g=this.getValues("largeop","displaystyle");if(g.largeop){j=e.FONTDATA.VARIANT[g.displaystyle?"-largeOp":"-smallOp"]}for(var h=0,f=this.data.length;h<f;h++){if(this.data[h]){this.data[h].toHTML(k,j)}}if(!k.bbox){k.bbox={w:0,h:0,d:0,rw:0,lw:0}}if(n.length!==1){delete k.bbox.skew}if(e.AccentBug&&k.bbox.w===0&&n.length===1&&k.firstChild){k.firstChild.nodeValue+=e.NBSP;e.createSpace(k,0,0,-k.offsetWidth/e.em)}if(g.largeop){var l=(k.bbox.h-k.bbox.d)/2-e.TeX.axis_height*k.scale;if(e.safariVerticalAlignBug&&k.lastChild.nodeName==="IMG"){k.lastChild.style.verticalAlign=e.Em(parseFloat(k.lastChild.style.verticalAlign||0)/e.em-l/k.scale)}else{if(e.konquerorVerticalAlignBug&&k.lastChild.nodeName==="IMG"){k.style.position="relative";k.lastChild.style.position="relative";k.lastChild.style.top=e.Em(l/k.scale)}else{k.style.verticalAlign=e.Em(-l/k.scale)}}k.bbox.h-=l;k.bbox.d+=l;if(k.bbox.rw>k.bbox.w){k.bbox.ic=k.bbox.rw-k.bbox.w;e.createBlank(k,k.bbox.ic);k.bbox.w=k.bbox.rw}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLcanStretch:function(f){if(!this.Get("stretchy")){return false}var g=this.data.join("");if(g.length>1){return false}g=e.FONTDATA.DELIMITERS[g.charCodeAt(0)];return(g&&g.dir==f.substr(0,1))},HTMLstretchV:function(l,k,n){this.HTMLremoveColor();var f=this.getValues("symmetric","maxsize","minsize");var j=this.HTMLspanElement(),g;var i=e.TeX.axis_height,m=j.scale;if(f.symmetric){g=2*Math.max(k-i,n+i)}else{g=k+n}f.maxsize=e.length2em(f.maxsize,j.bbox.h+j.bbox.d);f.minsize=e.length2em(f.minsize,j.bbox.h+j.bbox.d);g=Math.max(f.minsize,Math.min(f.maxsize,g));j=this.HTMLcreateSpan(l);e.createDelimiter(j,this.data.join("").charCodeAt(0),g,m);if(f.symmetric){g=(j.bbox.h+j.bbox.d)/2+i}else{g=(j.bbox.h+j.bbox.d)*k/(k+n)}e.positionDelimiter(j,g);this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j},HTMLstretchH:function(i,f){this.HTMLremoveColor();var g=this.getValues("maxsize","minsize","mathvariant","fontweight");if(g.fontweight==="bold"&&!this.mathvariant){g.mathvariant=a.VARIANT.BOLD}var h=this.HTMLspanElement(),j=h.scale;g.maxsize=e.length2em(g.maxsize,h.bbox.w);g.minsize=e.length2em(g.minsize,h.bbox.w);f=Math.max(g.minsize,Math.min(g.maxsize,f));h=this.HTMLcreateSpan(i);e.createDelimiter(h,this.data.join("").charCodeAt(0),f,j,g.mathvariant);this.HTMLhandleSpace(h);this.HTMLhandleColor(h);return h}});a.mtext.Augment({toHTML:function(k){k=this.HTMLhandleSize(this.HTMLcreateSpan(k));k.bbox=null;if(this.Parent().type==="merror"){e.addText(k,this.data.join(""));var l=e.getHD(k),g=e.getW(k);k.bbox={h:l.h,d:l.d,w:g,lw:0,rw:g}}else{var j=this.HTMLgetVariant();for(var h=0,f=this.data.length;h<f;h++){if(this.data[h]){this.data[h].toHTML(k,j)}}if(!k.bbox){k.bbox={w:0,h:0,d:0,rw:0,lw:0}}if(this.data.join("").length!==1){delete k.bbox.skew}}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k}});a.ms.Augment({toHTML:a.mbase.HTMLautoload});a.mglyph.Augment({toHTML:a.mbase.HTMLautoload});a.mspace.Augment({toHTML:function(j){j=this.HTMLhandleSize(this.HTMLcreateSpan(j));var g=this.getValues("height","depth","width");g.mathbackground=this.mathbackground;if(this.background&&!this.mathbackground){g.mathbackground=this.background}var i=e.length2em(g.height),k=e.length2em(g.depth),f=e.length2em(g.width);e.createSpace(j,i,k,f,g.mathbackground);return j}});a.mphantom.Augment({toHTML:function(j,g,l){j=this.HTMLcreateSpan(j);if(this.data[0]!=null){var k=e.Measured(this.data[0].toHTML(j),j);if(l!=null){e.Remeasured(this.data[0].HTMLstretchV(j,g,l),j)}else{if(g!=null){e.Remeasured(this.data[0].HTMLstretchH(j,g),j)}}j.bbox={w:k.bbox.w,h:k.bbox.h,d:k.bbox.d,lw:0,rw:0};for(var h=0,f=j.childNodes.length;h<f;h++){j.childNodes[h].style.visibility="hidden"}}this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});a.mpadded.Augment({toHTML:function(j,h,l){j=this.HTMLcreateSpan(j);if(this.data[0]!=null){var g=e.createStack(j,true);var k=e.createBox(g);e.Measured(this.data[0].toHTML(k),k);if(l!=null){e.Remeasured(this.data[0].HTMLstretchV(k,h,l),k)}else{if(h!=null){e.Remeasured(this.data[0].HTMLstretchH(k,h),k)}}var i=this.getValues("height","depth","width","lspace","voffset"),f=0,m=0;if(i.lspace){f=this.HTMLlength2em(k,i.lspace)}if(i.voffset){m=this.HTMLlength2em(k,i.voffset)}e.placeBox(k,f,m);j.bbox={h:k.bbox.h,d:k.bbox.d,w:k.bbox.w,lw:Math.min(0,k.bbox.lw+f),rw:Math.max(k.bbox.w,k.bbox.rw+f),H:Math.max((k.bbox.H==null?-e.BIGDIMEN:k.bbox.H),k.bbox.h+m),D:Math.max((k.bbox.D==null?-e.BIGDIMEN:k.bbox.D),k.bbox.d-m)};if(i.height!==""){j.bbox.h=this.HTMLlength2em(k,i.height,"h",0)}if(i.depth!==""){j.bbox.d=this.HTMLlength2em(k,i.depth,"d",0)}if(i.width!==""){j.bbox.w=this.HTMLlength2em(k,i.width,"w",0)}if(j.bbox.H<=j.bbox.h){delete j.bbox.H}if(j.bbox.D<=j.bbox.d){delete j.bbox.D}e.setStackWidth(g,j.bbox.w)}this.HTMLhandleSpace(j);this.HTMLhandleColor(j);return j},HTMLlength2em:function(j,k,l,f){if(f==null){f=-e.BIGDIMEN}var h=String(k).match(/width|height|depth/);var i=(h?j.bbox[h[0].charAt(0)]:(l?j.bbox[l]:null));var g=e.length2em(k,i);if(l&&String(k).match(/^\s*[-+]/)){return Math.max(f,j.bbox[l]+g)}else{return g}},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});a.mrow.Augment({HTMLstretchH:function(h,f){this.HTMLremoveColor();var g=this.HTMLspanElement();this.data[this.core].HTMLstretchH(g,f);this.HTMLcomputeBBox(g,true);this.HTMLhandleColor(g);return g},HTMLstretchV:function(i,g,j){this.HTMLremoveColor();var f=this.HTMLspanElement();this.data[this.core].HTMLstretchV(f,g,j);this.HTMLcomputeBBox(f,true);this.HTMLhandleColor(f);return f}});a.mstyle.Augment({toHTML:function(f){if(this.data[0]!=null){f=this.data[0].toHTML(f);this.spanID=this.data[0].spanID;this.HTMLhandleSpace(f);this.HTMLhandleColor(f)}return f},HTMLspanElement:function(){return(this.data[0]!=null?this.data[0].HTMLspanElement():null)},HTMLstretchH:function(g,f){return(this.data[0]!=null?this.data[0].HTMLstretchH(g,f):g)},HTMLstretchV:function(g,f,i){return(this.data[0]!=null?this.data[0].HTMLstretchV(g,f,i):g)}});a.mfrac.Augment({toHTML:function(y){y=this.HTMLcreateSpan(y);var h=e.createStack(y);var k=e.createBox(h),j=e.createBox(h);this.HTMLmeasureChild(0,k);this.HTMLmeasureChild(1,j);var f=this.getValues("displaystyle","linethickness","numalign","denomalign","bevelled");var C=this.HTMLgetScale(),x=f.displaystyle;var B=e.TeX.axis_height*C;if(f.bevelled){var A=(x?0.4:0.15);var l=Math.max(k.bbox.h+k.bbox.d,j.bbox.h+j.bbox.d)+2*A;var z=e.createBox(h);e.createDelimiter(z,47,l);e.placeBox(k,0,(k.bbox.d-k.bbox.h)/2+B+A);e.placeBox(z,k.bbox.w-A/2,(z.bbox.d-z.bbox.h)/2+B);e.placeBox(j,k.bbox.w+z.bbox.w-A,(j.bbox.d-j.bbox.h)/2+B-A)}else{var g=Math.max(k.bbox.w,j.bbox.w);var o=e.thickness2em(f.linethickness),s,r,n,m;var w=e.TeX.min_rule_thickness/this.em;if(x){n=e.TeX.num1;m=e.TeX.denom1}else{n=(o===0?e.TeX.num3:e.TeX.num2);m=e.TeX.denom2}n*=C;m*=C;if(o===0){s=Math.max((x?7:3)*e.TeX.rule_thickness,2*w);r=(n-k.bbox.d)-(j.bbox.h-m);if(r<s){n+=(s-r)/2;m+=(s-r)/2}}else{s=Math.max((x?2:0)*w+o,o/2+1.5*w);r=(n-k.bbox.d)-(B+o/2);if(r<s){n+=s-r}r=(B-o/2)-(j.bbox.h-m);if(r<s){m+=s-r}var i=e.createBox(h);e.createRule(i,o,0,g+2*o);e.placeBox(i,0,B-o/2)}e.alignBox(k,f.numalign,n);e.alignBox(j,f.denomalign,-m)}this.HTMLhandleSpace(y);this.HTMLhandleColor(y);return y},HTMLcanStretch:function(f){return false},HTMLhandleSpace:function(f){if(!this.texWithDelims){var g=(this.useMMLspacing?0:e.length2em(this.texSpacing()||0))+0.12;f.style.paddingLeft=e.Em(g);f.style.paddingRight=".12em"}}});a.msqrt.Augment({toHTML:function(n){n=this.HTMLcreateSpan(n);var r=e.createStack(n);var h=e.createBox(r),l=e.createBox(r),k=e.createBox(r);this.HTMLmeasureChild(0,h);var j=this.HTMLgetScale();var s=e.TeX.rule_thickness*j,g,f,o,i;if(this.Get("displaystyle")){g=e.TeX.x_height*j}else{g=s}f=Math.max(s+g/4,1.5*e.TeX.min_rule_thickness/this.em);o=h.bbox.h+h.bbox.d+f+s;i=h.bbox.w;e.createDelimiter(k,8730,o,j);e.Measured(k);var m=0;if(k.isMultiChar||(e.AdjustSurd&&e.imgFonts)){k.bbox.w*=0.95}if(k.bbox.h+k.bbox.d>o){f=((k.bbox.h+k.bbox.d)-(o-s))/2}var u=e.FONTDATA.DELIMITERS[e.FONTDATA.RULECHAR];if(!u||i<u.HW[0][0]*j||j<0.75){e.createRule(l,s,0,i)}else{e.createDelimiter(l,e.FONTDATA.RULECHAR,i,j)}o=h.bbox.h+f+s;m=this.HTMLaddRoot(r,k,m,k.bbox.h+k.bbox.d-o,j);e.placeBox(k,m,o-k.bbox.h);e.placeBox(l,m+k.bbox.w,o-l.bbox.h+e.rfuzz);e.placeBox(h,m+k.bbox.w,0);this.HTMLhandleSpace(n);this.HTMLhandleColor(n);return n},HTMLaddRoot:function(h,g,f,j,i){return f}});a.mroot.Augment({toHTML:a.msqrt.prototype.toHTML,HTMLaddRoot:function(o,g,m,k,f){var i=e.createBox(o);if(this.data[1]){var l=this.data[1].toHTML(i);l.style.paddingRight=l.style.paddingLeft="";e.Measured(l,i)}else{i.bbox=this.HTMLzeroBBox()}var j=this.HTMLrootHeight(g.bbox.h+g.bbox.d,f,i)-k;var n=Math.min(i.bbox.w,i.bbox.rw);m=Math.max(n,g.offset);e.placeBox(i,m-n,j);return m-g.offset},HTMLrootHeight:function(h,g,f){return 0.45*(h-0.9*g)+0.6*g+Math.max(0,f.bbox.d-0.075)}});a.mfenced.Augment({toHTML:function(k){k=this.HTMLcreateSpan(k);if(this.data.open){this.data.open.toHTML(k)}if(this.data[0]!=null){this.data[0].toHTML(k)}for(var g=1,f=this.data.length;g<f;g++){if(this.data[g]){if(this.data["sep"+g]){this.data["sep"+g].toHTML(k)}this.data[g].toHTML(k)}}if(this.data.close){this.data.close.toHTML(k)}var n=this.HTMLcomputeBBox(k);var j=k.bbox.h,l=k.bbox.d;for(g=0,f=n.length;g<f;g++){n[g].HTMLstretchV(k,j,l)}if(n.length){this.HTMLcomputeBBox(k,true)}this.HTMLhandleSpace(k);this.HTMLhandleColor(k);return k},HTMLcomputeBBox:function(k,j){var g=k.bbox={},l=[];this.HTMLcheckStretchy(this.data.open,g,l,j);this.HTMLcheckStretchy(this.data[0],g,l,j);for(var h=1,f=this.data.length;h<f;h++){if(this.data[h]){this.HTMLcheckStretchy(this.data["sep"+h],g,l,j);this.HTMLcheckStretchy(this.data[h],g,l,j)}}this.HTMLcheckStretchy(this.data.close,g,l,j);this.HTMLcleanBBox(g);return l},HTMLcheckStretchy:function(f,g,i,h){if(f){if(!h&&f.HTMLcanStretch("Vertical")){i.push(f);f=(f.CoreMO()||f)}this.HTMLcombineBBoxes(f,g)}}});a.menclose.Augment({toHTML:a.mbase.HTMLautoload});a.maction.Augment({toHTML:a.mbase.HTMLautoload});a.semantics.Augment({toHTML:function(f){if(this.data[0]!=null){f=this.data[0].toHTML(f);this.spanID=this.data[0].spanID;this.HTMLhandleSpace(f)}return f},HTMLspanElement:function(){return(this.data[0]!=null?this.data[0].HTMLspanElement():null)},HTMLstretchH:function(g,f){return(this.data[0]!=null?this.data[0].HTMLstretchH(g,f):g)},HTMLstretchV:function(g,f,i){return(this.data[0]!=null?this.data[0].HTMLstretchV(g,f,i):g)}});a.munderover.Augment({toHTML:function(G,B,z){var f=this.getValues("displaystyle","accent","accentunder","align");if(!f.displaystyle&&this.data[this.base]!=null&&this.data[this.base].Get("movablelimits")){return a.msubsup.prototype.toHTML.call(this,G)}G=this.HTMLcreateSpan(G);var K=this.HTMLgetScale();var j=e.createStack(G);var l=[],I=[],q,H,C,g=-e.BIGDIMEN,F=g;for(H=0,C=this.data.length;H<C;H++){if(this.data[H]!=null){q=l[H]=e.createBox(j);e.Measured(this.data[H].toHTML(q),q);if(H==this.base){if(z!=null){e.Remeasured(this.data[this.base].HTMLstretchV(q,B,z),q)}else{if(B!=null){e.Remeasured(this.data[this.base].HTMLstretchH(q,B),q)}}I[H]=(z==null&&B!=null?false:this.data[H].HTMLcanStretch("Horizontal"))}else{I[H]=this.data[H].HTMLcanStretch("Horizontal")}if(q.bbox.w>F){F=q.bbox.w}if(!I[H]&&F>g){g=F}}}if(z==null&&B!=null){g=B}else{if(g==-e.BIGDIMEN){g=F}}for(H=F=0,C=this.data.length;H<C;H++){if(this.data[H]){q=l[H];if(I[H]){q.bbox=this.data[H].HTMLstretchH(q,g).bbox}if(q.bbox.w>F){F=q.bbox.w}}}var w=e.TeX.rule_thickness,A=e.FONTDATA.TeX_factor;var h=l[this.base]||{bbox:this.HTMLzeroBBox()},J=(h.bbox.ic||0);var p,n,s,r,o,v,E;for(H=0,C=this.data.length;H<C;H++){if(this.data[H]!=null){q=l[H];o=e.TeX.big_op_spacing5*K;var u=(H!=this.base&&f[this.ACCENTS[H]]);if(u&&q.bbox.w<=1/e.em+0.0001){q.bbox.w=q.bbox.rw-q.bbox.lw;q.bbox.noclip=true;if(q.bbox.lw&&!e.zeroWidthBug){q.insertBefore(e.createSpace(q.parentNode,0,0,-q.bbox.lw),q.firstChild)}e.createBlank(q,0,0,q.bbox.rw+0.1)}v={left:0,center:(F-q.bbox.w)/2,right:F-q.bbox.w}[f.align];p=v;n=0;if(H==this.over){if(u){E=Math.max(w*K*A,2.5/this.em);o=0;if(h.bbox.skew){p+=h.bbox.skew}}else{s=e.TeX.big_op_spacing1*K*A;r=e.TeX.big_op_spacing3*K*A;E=Math.max(s,r-Math.max(0,q.bbox.d))}E=Math.max(E,1.5/this.em);p+=J;n=h.bbox.h+q.bbox.d+E;q.bbox.h+=o}else{if(H==this.under){if(u){E=3*w*K*A;o=0}else{s=e.TeX.big_op_spacing2*K*A;r=e.TeX.big_op_spacing4*K*A;E=Math.max(s,r-q.bbox.h)}E=Math.max(E,1.5/this.em);p-=J;n=-(h.bbox.d+q.bbox.h+E);q.bbox.d+=o}}e.placeBox(q,p,n)}}this.HTMLhandleSpace(G);this.HTMLhandleColor(G);return G},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});a.msubsup.Augment({toHTML:function(C,A,w){C=this.HTMLcreateSpan(C);var G=this.HTMLgetScale();var j=e.createStack(C),g;var i=e.createBox(j);this.HTMLmeasureChild(this.base,i);if(this.data[this.base]){if(w!=null){e.Remeasured(this.data[this.base].HTMLstretchV(i,A,w),i)}else{if(A!=null){e.Remeasured(this.data[this.base].HTMLstretchH(i,A),i)}}}e.placeBox(i,0,0);var h=(this.data[this.sup]||this.data[this.sub]||this).HTMLgetScale();var E=e.TeX.x_height*G,o=e.TeX.scriptspace*G*0.75;var f,k;if(this.HTMLnotEmpty(this.data[this.sup])){f=e.createBox(j);e.Measured(this.data[this.sup].toHTML(f),f);f.bbox.w+=o;f.bbox.rw=Math.max(f.bbox.w,f.bbox.rw)}if(this.HTMLnotEmpty(this.data[this.sub])){k=e.createBox(j);e.Measured(this.data[this.sub].toHTML(k),k);k.bbox.w+=o;k.bbox.rw=Math.max(k.bbox.w,k.bbox.rw)}var y=e.TeX.sup_drop*h,x=e.TeX.sub_drop*h;var m=i.bbox.h-y,l=i.bbox.d+x,F=0,z;if(i.bbox.ic){F=i.bbox.ic}if(this.data[this.base]&&(this.data[this.base].type==="mi"||this.data[this.base].type==="mo")){if(this.data[this.base].data.join("").length===1&&i.bbox.scale===1&&!this.data[this.base].Get("largeop")){m=l=0}}var B=this.getValues("subscriptshift","superscriptshift");B.subscriptshift=(B.subscriptshift===""?0:e.length2em(B.subscriptshift));B.superscriptshift=(B.superscriptshift===""?0:e.length2em(B.superscriptshift));if(!f){if(k){l=Math.max(l,e.TeX.sub1*G,k.bbox.h-(4/5)*E,B.subscriptshift);e.placeBox(k,i.bbox.w+o-F,-l,k.bbox)}}else{if(!k){g=this.getValues("displaystyle","texprimestyle");z=e.TeX[(g.displaystyle?"sup1":(g.texprimestyle?"sup3":"sup2"))];m=Math.max(m,z*G,f.bbox.d+(1/4)*E,B.superscriptshift);e.placeBox(f,i.bbox.w+o,m,f.bbox)}else{l=Math.max(l,e.TeX.sub2*G);var n=e.TeX.rule_thickness*G;if((m-f.bbox.d)-(k.bbox.h-l)<3*n){l=3*n-m+f.bbox.d+k.bbox.h;y=(4/5)*E-(m-f.bbox.d);if(y>0){m+=y;l-=y}}e.placeBox(f,i.bbox.w+o,Math.max(m,B.superscriptshift));e.placeBox(k,i.bbox.w+o-F,-Math.max(l,B.subscriptshift))}}this.HTMLhandleSpace(C);this.HTMLhandleColor(C);return C},HTMLstretchH:a.mbase.HTMLstretchH,HTMLstretchV:a.mbase.HTMLstretchV});a.mmultiscripts.Augment({toHTML:a.mbase.HTMLautoload});a.mtable.Augment({toHTML:a.mbase.HTMLautoload});a["annotation-xml"].Augment({toHTML:a.mbase.HTMLautoload});a.math.Augment({toHTML:function(n,g){var k=this.Get("alttext");if(k){g.setAttribute("aria-label",k)}var h=e.addElement(n,"nobr");n=this.HTMLcreateSpan(h);var l=e.createStack(n),i=e.createBox(l),m;l.style.fontSize=h.parentNode.style.fontSize;h.parentNode.style.fontSize="";if(this.data[0]!=null){if(e.msieColorBug){if(this.background){this.data[0].background=this.background;delete this.background}if(this.mathbackground){this.data[0].mathbackground=this.mathbackground;delete this.mathbackground}}a.mbase.prototype.displayAlign=d.config.displayAlign;a.mbase.prototype.displayIndent=d.config.displayIndent;m=e.Measured(this.data[0].toHTML(i),i)}e.placeBox(i,0,0);var j=e.em/e.outerEm;e.em/=j;n.bbox.h*=j;n.bbox.d*=j;n.bbox.w*=j;n.bbox.lw*=j;n.bbox.rw*=j;if(m&&m.bbox.width!=null){l.style.width=m.bbox.width;i.style.width="100%"}this.HTMLhandleColor(n);if(m){e.createRule(n,m.bbox.h*j,m.bbox.d*j,0)}if(!this.isMultiline&&this.Get("display")==="block"&&n.bbox.width==null){var o=this.getValues("indentalignfirst","indentshiftfirst","indentalign","indentshift");if(o.indentalignfirst!==a.INDENTALIGN.INDENTALIGN){o.indentalign=o.indentalignfirst}if(o.indentalign===a.INDENTALIGN.AUTO){o.indentalign=this.displayAlign}g.style.textAlign=o.indentalign;if(o.indentshiftfirst!==a.INDENTSHIFT.INDENTSHIFT){o.indentshift=o.indentshiftfirst}if(o.indentshift==="auto"){o.indentshift=this.displayIndent}if(o.indentshift&&o.indentalign!==a.INDENTALIGN.CENTER){n.style[{left:"marginLeft",right:"marginRight"}[o.indentalign]]=e.Em(e.length2em(o.indentshift))}}return n}});a.TeXAtom.Augment({toHTML:function(g){g=this.HTMLcreateSpan(g);if(this.data[0]!=null){if(this.texClass===a.TEXCLASS.VCENTER){var f=e.createStack(g);var h=e.createBox(f);e.Measured(this.data[0].toHTML(h),h);e.placeBox(h,0,e.TeX.axis_height-(h.bbox.h+h.bbox.d)/2+h.bbox.d)}else{g.bbox=this.data[0].toHTML(g).bbox}}this.HTMLhandleSpace(g);this.HTMLhandleColor(g);return g}});MathJax.Hub.Register.StartupHook("onLoad",function(){setTimeout(MathJax.Callback(["loadComplete",e,"jax.js"]),0)})});d.Register.StartupHook("End Config",function(){d.Browser.Select({MSIE:function(f){var i=f.versionAtLeast("7.0");var h=f.versionAtLeast("8.0")&&document.documentMode>7;var g=(document.compatMode==="BackCompat");e.config.styles[".MathJax .MathJax_HitBox"]["background-color"]="white";e.config.styles[".MathJax .MathJax_HitBox"].opacity=0;e.config.styles[".MathJax .MathJax_HitBox"].filter="alpha(opacity=0)";e.Augment({getMarginScale:e.getMSIEmarginScale,PaddingWidthBug:true,msieEventBug:f.isIE9,msieAccentBug:true,msieColorBug:true,msieColorPositionBug:true,msieRelativeWidthBug:g,msieMarginWidthBug:true,msiePaddingWidthBug:true,msieCharPaddingWidthBug:(h&&!g),msieBorderWidthBug:g,msieInlineBlockAlignBug:(!h||g),msieVerticalAlignBug:(h&&!g),msiePlaceBoxBug:(h&&!g),msieClipRectBug:!h,msieNegativeSpaceBug:g,msieCloneNodeBug:(h&&f.version==="8.0"),negativeSkipBug:true,msieIE6:!i,msieItalicWidthBug:true,zeroWidthBug:true,FontFaceBug:true,msieFontCSSBug:f.isIE9,allowWebFonts:"eot"})},Firefox:function(g){var h=false;if(g.versionAtLeast("3.5")){var f=String(document.location).replace(/[^\/]*$/,"");if(document.location.protocol!=="file:"||(d.config.root+"/").substr(0,f.length)===f){h="otf"}}e.Augment({useProcessingFrame:true,ffVerticalAlignBug:true,AccentBug:true,allowWebFonts:h})},Safari:function(j){var h=j.versionAtLeast("3.0");var g=j.versionAtLeast("3.1");j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);var f=(navigator.appVersion.match(/ Android (\d+)\.(\d+)/));var k=(g&&j.isMobile&&((navigator.platform.match(/iPad|iPod|iPhone/)&&!j.versionAtLeast("5.0"))||(f!=null&&(f[1]<2||(f[1]==2&&f[2]<2)))));e.Augment({config:{styles:{".MathJax img, .MathJax nobr, .MathJax a":{"max-width":"5000em","max-height":"5000em"}}},useProcessingFrame:true,rfuzz:0.05,AccentBug:true,AdjustSurd:true,safariContextMenuBug:true,safariNegativeSpaceBug:true,safariVerticalAlignBug:!g,safariTextNodeBug:!h,safariWebFontSerif:["serif"],allowWebFonts:(g&&!k?"otf":false)});if(k){var i=d.config["HTML-CSS"];if(i){i.availableFonts=[];i.preferredFont=null}else{d.config["HTML-CSS"]={availableFonts:[],preferredFont:null}}}},Chrome:function(f){e.Augment({useProcessingFrame:true,rfuzz:0.05,AccentBug:true,AdjustSurd:true,allowWebFonts:(f.versionAtLeast("4.0")?"otf":"svg"),safariNegativeSpaceBug:true,safariWebFontSerif:[""]})},Opera:function(f){f.isMini=(navigator.appVersion.match("Opera Mini")!=null);e.config.styles[".MathJax .merror"]["vertical-align"]=null;e.Augment({useProcessingFrame:true,operaHeightBug:true,operaVerticalAlignBug:true,operaFontSizeBug:f.versionAtLeast("10.61"),negativeSkipBug:true,zeroWidthBug:true,FontFaceBug:true,PaddingWidthBug:true,allowWebFonts:(f.versionAtLeast("10.0")&&!f.isMini?"otf":false),adjustAvailableFonts:function(j){for(var h=0,g=j.length;h<g;h++){if(j[h]==="STIX"){j.splice(h,1);g--;h--}}if(this.config.preferredFont==="STIX"){this.config.preferredFont=j[0]}}})},Konqueror:function(f){e.Augment({konquerorVerticalAlignBug:true,noContextMenuBug:true})}})});MathJax.Hub.Register.StartupHook("End Cookie",function(){if(d.config.menuSettings.zoom!=="None"){c.Require("[MathJax]/extensions/MathZoom.js")}})})(MathJax.Ajax,MathJax.Hub,MathJax.OutputJax["HTML-CSS"]);