(function(c,d,e){vara;varb=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)){returng}for(varh=0,f=j.length;h<f;h++){if(j[h]===g){continue}if(this.testCollection(j[h])){returnj[h]}}returnnull},testCollection:function(f){returnthis.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")}varg=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]){returnfalse}}if(this.div.offsetWidth!=g[3]){if(h.noStyleChar||!e.FONTDATA||!e.FONTDATA.hasStyleChar){returntrue}for(varj=0,f=this.testSize.length;j<f;j++){if(this.testStyleChar(h,this.testSize[j])){returntrue}}}}returnfalse},styleChar:String.fromCharCode(61437),versionChar:String.fromCharCode(61438),compChar:String.fromCharCode(61439),testStyleChar:function(h,j){varm=3+(h.weight?2:0)+(h.style?4:0);varg="",i=0;varl=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}varf=this.div.offsetWidth-i;if(e.safariTextNodeBug){this.div.innerHTML=this.styleChar+g}else{this.text.nodeValue=this.styleChar+g}vark=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];varg=this.div.offsetWidth,l=-1;if(e.safariWebFontSerif){this.div.style.fontFamily=e.safariWebFontSerif[0];l=this.div.offsetWidth}for(vark=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]}}returnnull},loadWebFont:function(g){d.Startup.signal.Post("HTML-CSS Jax - Web-Font "+e.fontInUse+"/"+g.directory);vari=MathJax.Message.File("Web-Font "+e.fontInUse+"/"+g.directory);varf=MathJax.Callback({});varh=MathJax.Callback(["loadComplete",this,g,i,f]);c.timer.start(c,[this.checkWebFont,g,h],1,this.timeout);returnf},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){vari=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){vari=e.all