/************************************************************* * * MathJax.js * * The main code for the MathJax math-typesetting library. See * http://www.mathjax.org/ for details. * * --------------------------------------------------------------------- * * Copyright (c) 2009-2013 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ if (!window.MathJax) {window.MathJax = {}} MathJax.isPacked = true; if(document.getElementById&&document.childNodes&&document.createElement){if(!window.MathJax){window.MathJax={}}if(!MathJax.Hub){MathJax.version="2.2";MathJax.fileversion="2.2";(function(d){var b=window[d];if(!b){b=window[d]={}}var f=[];var c=function(g){var h=g.constructor;if(!h){h=new Function("")}for(var i in g){if(i!=="constructor"&&g.hasOwnProperty(i)){h[i]=g[i]}}return h};var a=function(){return new Function("return arguments.callee.Init.call(this,arguments)")};var e=a();e.prototype={bug_test:1};if(!e.prototype.bug_test){a=function(){return function(){return arguments.callee.Init.call(this,arguments)}}}b.Object=c({constructor:a(),Subclass:function(g,i){var h=a();h.SUPER=this;h.Init=this.Init;h.Subclass=this.Subclass;h.Augment=this.Augment;h.protoFunction=this.protoFunction;h.can=this.can;h.has=this.has;h.isa=this.isa;h.prototype=new this(f);h.prototype.constructor=h;h.Augment(g,i);return h},Init:function(g){var h=this;if(g.length===1&&g[0]===f){return h}if(!(h instanceof g.callee)){h=new g.callee(f)}return h.Init.apply(h,g)||h},Augment:function(g,h){var i;if(g!=null){for(i in g){if(g.hasOwnProperty(i)){this.protoFunction(i,g[i])}}if(g.toString!==this.prototype.toString&&g.toString!=={}.toString){this.protoFunction("toString",g.toString)}}if(h!=null){for(i in h){if(h.hasOwnProperty(i)){this[i]=h[i]}}}return this},protoFunction:function(h,g){this.prototype[h]=g;if(typeof g==="function"){g.SUPER=this.SUPER.prototype}},prototype:{Init:function(){},SUPER:function(g){return g.callee.SUPER},can:function(g){return typeof(this[g])==="function"},has:function(g){return typeof(this[g])!=="undefined"},isa:function(g){return(g instanceof Object)&&(this instanceof g)}},can:function(g){return this.prototype.can.call(this,g)},has:function(g){return this.prototype.has.call(this,g)},isa:function(h){var g=this;while(g){if(g===h){return true}else{g=g.SUPER}}return false},SimpleSUPER:c({constructor:function(g){return this.SimpleSUPER.define(g)},define:function(g){var i={};if(g!=null){for(var h in g){if(g.hasOwnProperty(h)){i[h]=this.wrap(h,g[h])}}if(g.toString!==this.prototype.toString&&g.toString!=={}.toString){i.toString=this.wrap("toString",g.toString)}}return i},wrap:function(i,h){if(typeof(h)==="function"&&h.toString().match(/\.\s*SUPER\s*\(/)){var g=new Function(this.wrapper);g.label=i;g.original=h;h=g;g.toString=this.stringify}return h},wrapper:function(){var h=arguments.callee;this.SUPER=h.SUPER[h.label];try{var g=h.original.apply(this,arguments)}catch(i){delete this.SUPER;throw i}delete this.SUPER;return g}.toString().replace(/^\s*function\s*\(\)\s*\{\s*/i,"").replace(/\s*\}\s*$/i,""),toString:function(){return this.original.toString.apply(this.original,arguments)}})})})("MathJax");(function(BASENAME){var BASE=window[BASENAME];if(!BASE){BASE=window[BASENAME]={}}var CALLBACK=function(data){var cb=new Function("return arguments.callee.execute.apply(arguments.callee,arguments)");for(var id in CALLBACK.prototype){if(CALLBACK.prototype.hasOwnProperty(id)){if(typeof(data[id])!=="undefined"){cb[id]=data[id]}else{cb[id]=CALLBACK.prototype[id]}}}cb.toString=CALLBACK.prototype.toString;return cb};CALLBACK.prototype={isCallback:true,hook:function(){},data:[],object:window,execute:function(){if(!this.called||this.autoReset){this.called=!this.autoReset;return this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))}},reset:function(){delete this.called},toString:function(){return this.hook.toString.apply(this.hook,arguments)}};var ISCALLBACK=function(f){return(typeof(f)==="function"&&f.isCallback)};var EVAL=function(code){return eval.call(window,code)};EVAL("var __TeSt_VaR__ = 1");if(window.__TeSt_VaR__){try{delete window.__TeSt_VaR__}catch(error){window.__TeSt_VaR__=null}}else{if(window.execScript){EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";window.execScript(code);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}else{EVAL=function(code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";var head=(document.getElementsByTagName("head"))[0];if(!head){head=document.body}var script=document.createElement("script");script.appendChild(document.createTextNode(code));head.appendChild(script);head.removeChild(script);var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result}}}var USING=function(args,i){if(arguments.length>1){if(arguments.length===2&&!(typeof arguments[0]==="function")&&arguments[0] instanceof Object&&typeof arguments[1]==="number"){args=[].slice.call(args,i)}else{args=[].slice.call(arguments,0)}}if(args instanceof Array&&args.length===1){args=args[0]}if(typeof args==="function"){if(args.execute===CALLBACK.prototype.execute){return args}return CALLBACK({hook:args})}else{if(args instanceof Array){if(typeof(args[0])==="string"&&args[1] instanceof Object&&typeof args[1][args[0]]==="function"){return CALLBACK({hook:args[1][args[0]],object:args[1],data:args.slice(2)})}else{if(typeof args[0]==="function"){return CALLBACK({hook:args[0],data:args.slice(1)})}else{if(typeof args[1]==="function"){return CALLBACK({hook:args[1],object:args[0],data:args.slice(2)})}}}}else{if(typeof(args)==="string"){return CALLBACK({hook:EVAL,data:[args]})}else{if(args instanceof Object){return CALLBACK(args)}else{if(typeof(args)==="undefined"){return CALLBACK({})}}}}}throw Error("Can't make callback from given data")};var DELAY=function(time,callback){callback=USING(callback);callback.timeout=setTimeout(callback,time);return callback};var WAITFOR=function(callback,signal){callback=USING(callback);if(!callback.called){WAITSIGNAL(callback,signal);signal.pending++}};var WAITEXECUTE=function(){var signals=this.signal;delete this.signal;this.execute=this.oldExecute;delete this.oldExecute;var result=this.execute.apply(this,arguments);if(ISCALLBACK(result)&&!result.called){WAITSIGNAL(result,signals)}else{for(var i=0,m=signals.length;i0&&priorityf){f=document.styleSheets.length}if(!h){h=(document.getElementsByTagName("head"))[0];if(!h){h=document.body}}return h};var e=[];var b=function(){for(var j=0,h=e.length;j=this.timeout){h(this.STATUS.ERROR);return 1}return 0},file:function(i,h){if(h<0){a.Ajax.loadTimeout(i)}else{a.Ajax.loadComplete(i)}},execute:function(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function(h,i,j){if(h.time(j)){return}if(document.styleSheets.length>i&&document.styleSheets[i].cssRules&&document.styleSheets[i].cssRules.length){j(h.STATUS.OK)}else{setTimeout(h,h.delay)}},checkLength:function(h,k,m){if(h.time(m)){return}var l=0;var i=(k.sheet||k.styleSheet);try{if((i.cssRules||i.rules||[]).length>0){l=1}}catch(j){if(j.message.match(/protected variable|restricted URI/)){l=1}else{if(j.message.match(/Security error/)){l=1}}}if(l){setTimeout(a.Callback([m,h.STATUS.OK]),0)}else{setTimeout(h,h.delay)}}},loadComplete:function(h){h=this.fileURL(h);var i=this.loading[h];if(i&&!i.preloaded){a.Message.Clear(i.message);clearTimeout(i.timeout);if(i.script){if(e.length===0){setTimeout(b,0)}e.push(i.script)}this.loaded[h]=i.status;delete this.loading[h];this.addHook(h,i.callback)}else{if(i){delete this.loading[h]}this.loaded[h]=this.STATUS.OK;i={status:this.STATUS.OK}}if(!this.loadHooks[h]){return null}return this.loadHooks[h].Execute(i.status)},loadTimeout:function(h){if(this.loading[h].timeout){clearTimeout(this.loading[h].timeout)}this.loading[h].status=this.STATUS.ERROR;this.loadError(h);this.loadComplete(h)},loadError:function(h){a.Message.Set(["LoadFailed","File failed to load: %1",h],null,2000);a.Hub.signal.Post(["file load error",h])},Styles:function(j,k){var h=this.StyleString(j);if(h===""){k=a.Callback(k);k()}else{var i=document.createElement("style");i.type="text/css";this.head=g(this.head);this.head.appendChild(i);if(i.styleSheet&&typeof(i.styleSheet.cssText)!=="undefined"){i.styleSheet.cssText=h}else{i.appendChild(document.createTextNode(h))}k=this.timer.create.call(this,k,i)}return k},StyleString:function(m){if(typeof(m)==="string"){return m}var j="",n,l;for(n in m){if(m.hasOwnProperty(n)){if(typeof m[n]==="string"){j+=n+" {"+m[n]+"}\n"}else{if(m[n] instanceof Array){for(var k=0;k="0"&&p<="9"){f[j]=o[f[j]-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{if(p==="{"){p=f[j].substr(1);if(p>="0"&&p<="9"){f[j]=o[f[j].substr(1,f[j].length-2)-1];if(typeof f[j]==="number"){f[j]=this.number(f[j])}}else{var k=f[j].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(k){if(k[1]==="plural"){var d=o[k[2]-1];if(typeof d==="undefined"){f[j]="???"}else{d=this.plural(d)-1;var h=k[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%\uEFEF").split(/\|/);if(d>=0&&d=3){c.push([f[0],f[1],this.processSnippet(g,f[2])])}else{c.push(e[d])}}}}else{c.push(e[d])}}return c},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function(b,h,d){var j=[],e;var c=b.split(this.markdownPattern);var g=c[0];for(var f=1,a=c.length;f1?d[1]:""));f=null}if(e&&(!b.preJax||d)){c.nodeValue=c.nodeValue.replace(b.postJax,(e.length>1?e[1]:""))}if(f&&!f.nodeValue.match(/\S/)){f=f.previousSibling}}if(b.preRemoveClass&&f&&f.className===b.preRemoveClass){a.MathJax.preview=f}a.MathJax.checked=1},processInput:function(a){var b,i=MathJax.ElementJax.STATE;var h,e,d=a.scripts.length;try{while(a.ithis.processUpdateTime&&a.i1){d.jax[a.outputJax].push(b)}b.MathJax.state=c.OUTPUT},prepareOutput:function(c,f){while(c.jthis.processUpdateTime&&h.i=0;o--){if((b[o].src||"").match(d)){q.script=b[o].innerHTML;if(RegExp.$2){var r=RegExp.$2.substr(1).split(/\&/);for(var n=0,h=r.length;n=parseInt(x[y])}}return true},Select:function(j){var i=j[c.Browser];if(i){return i(c.Browser)}return null}};var g=navigator.userAgent.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");c.Browser=c.Insert(c.Insert(new String("Unknown"),{version:"0.0"}),a);for(var t in a){if(a.hasOwnProperty(t)){if(a[t]&&t.substr(0,2)==="is"){t=t.slice(2);if(t==="Mac"||t==="PC"){continue}c.Browser=c.Insert(new String(t),a);var p=new RegExp(".*(Version)/((?:\\d+\\.)+\\d+)|.*("+t+")"+(t=="MSIE"?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)");var s=p.exec(g)||["","","","unknown","0.0"];c.Browser.name=(s[1]=="Version"?t:(s[3]||s[5]));c.Browser.version=s[2]||s[4]||s[6];break}}}c.Browser.Select({Safari:function(j){var i=parseInt((String(j.version).split("."))[0]);if(i>85){j.webkit=j.version}if(i>=534){j.version="5.1"}else{if(i>=533){j.version="5.0"}else{if(i>=526){j.version="4.0"}else{if(i>=525){j.version="3.1"}else{if(i>500){j.version="3.0"}else{if(i>400){j.version="2.0"}else{if(i>85){j.version="1.0"}}}}}}}j.isMobile=(navigator.appVersion.match(/Mobile/i)!=null);j.noContextMenu=j.isMobile},Firefox:function(j){if((j.version==="0.0"||navigator.userAgent.match(/Firefox/)==null)&&navigator.product==="Gecko"){var m=navigator.userAgent.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(m){j.version=m[1]}else{var i=(navigator.buildID||navigator.productSub||"0").substr(0,8);if(i>="20111220"){j.version="9.0"}else{if(i>="20111120"){j.version="8.0"}else{if(i>="20110927"){j.version="7.0"}else{if(i>="20110816"){j.version="6.0"}else{if(i>="20110621"){j.version="5.0"}else{if(i>="20110320"){j.version="4.0"}else{if(i>="20100121"){j.version="3.6"}else{if(i>="20090630"){j.version="3.5"}else{if(i>="20080617"){j.version="3.0"}else{if(i>="20061024"){j.version="2.0"}}}}}}}}}}}}j.isMobile=(navigator.appVersion.match(/Android/i)!=null||navigator.userAgent.match(/ Fennec\//)!=null||navigator.userAgent.match(/Mobile/)!=null)},Opera:function(i){i.version=opera.version()},MSIE:function(j){j.isIE9=!!(document.documentMode&&(window.performance||window.msPerformance));MathJax.HTML.setScriptBug=!j.isIE9||document.documentMode<9;var v=false;try{new ActiveXObject("MathPlayer.Factory.1");j.hasMathPlayer=v=true}catch(m){}try{if(v&&!q.params.NoMathPlayer){var i=document.createElement("object");i.id="mathplayer";i.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987";document.getElementsByTagName("head")[0].appendChild(i);document.namespaces.add("m","http://www.w3.org/1998/Math/MathML");j.mpNamespace=true;if(document.readyState&&(document.readyState==="loading"||document.readyState==="interactive")){document.write('');j.mpImported=true}}else{document.namespaces.add("mjx_IE_fix","http://www.w3.org/1999/xlink")}}catch(m){}}});c.Browser.Select(MathJax.Message.browsers);c.queue=f.Callback.Queue();c.queue.Push(["Post",q.signal,"Begin"],["Config",q],["Cookie",q],["Styles",q],["Message",q],function(){var i=f.Callback.Queue(q.Jax(),q.Extensions());return i.Push({})},["Menu",q],q.onLoad(),function(){MathJax.isReady=true},["Typeset",q],["Hash",q],["MenuZoom",q],["Post",q.signal,"End"])})("MathJax")}};