44 lines
31 KiB
JavaScript
44 lines
31 KiB
JavaScript
|
/*************************************************************
|
||
|
*
|
||
|
* MathJax.js
|
||
|
*
|
||
|
* The main code for the MathJax math-typesetting library. See
|
||
|
* http://www.mathjax.org/ for details.
|
||
|
*
|
||
|
* ---------------------------------------------------------------------
|
||
|
*
|
||
|
* Copyright (c) 2009-2010 Design Science, Inc.
|
||
|
*
|
||
|
* 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.Unpack = function (data) {
|
||
|
var k, d, n, m, i;
|
||
|
for (k = 0, m = data.length; k < m; k++) {
|
||
|
d = data[k];
|
||
|
for (i = 0, n = d.length; i < n; i++)
|
||
|
{if (typeof(d[i]) == 'number') {d[i] = d[d[i]]}}
|
||
|
data[k] = d.join('');
|
||
|
}
|
||
|
eval(data.join(''));
|
||
|
};
|
||
|
MathJax.isPacked = true;
|
||
|
|
||
|
MathJax.Unpack([
|
||
|
['if(','document.','getElementById','&&',1,'childNodes&&',1,'createElement','){','if(!','window.MathJax','){',10,'={}}',9,'MathJax.Hub','){MathJax.version="1.0.1";(','function(','d){','var b=','window[d];if(!','b){b','=window[d]={}}var ','f','=[];','var c=',17,'g','){var h=','g.','constructor',';if(!','h){h=','new Function','("")}','for(var ','i in g){if(i!=="',30,'"&&g','.hasOwnProperty','(i)){h[i]=g[i]}}','return ','h};var a=','function(){',41,33,'("',41,'arguments','.callee','.Init','.call(this,',48,')")};var e=a();e','.prototype','={bug_test:1};',9,'e',54,'.bug_test){a=',43,41,43,41,48,49,50,51,48,')}}}b.','Object','=c({',30,':a(),Subclass:',17,'g,i',28,'a();h.SUPER=this;h',50,'=this',50,';h','.Subclass','=this',82,';h.Augment=this.Augment;h.','protoFunction','=this.',86,';h.can=this.can;h.has=this.has;h.isa=this.isa;h',54,'=new this(f);h',54,'.',30,'=h;h.Augment(g,i);',41,'h},Init:',17,'g',28,'this;if(g','.length===','1&&g[0]===f','){return ','h}if(!(h ','instanceof ','g',49,')){h=new g',49,'(f)}',41,'h',50,'.apply(','h,g)||h},Augment:',17,'g,h){var i;if(g','!=null){for(i in ','g){if(g',39,'(i)){this','.',86,'(i,g[i','])}}if(g.toString!==this.prototype.toString&&g.toString!=={}.toString){this.protoFunction("toString",g.toString)}}','if(h',119,'h){if(','h',39,122,'[i]=h[i]}}}',41,'this},',86,':',17,'h,g){this',54,'[h]=g;','if(typeof',' g','==="function"){','g.SUPER=this.SUPER',54,'}},prototype:{Init',':function(){},','SUPER:',17,'g',104,'g',49,'.SUPER},can:',17,'g',104,'typeof(this[g','])==="function"},has:',17,'g',104,159,'])!=="undefined','"},isa:',17,'g){return(g ',106,70,')&&(this ',106,'g)}},can:',17,'g',104,'this',54,'.can',51,'g)},has:',17,'g',104,'this',54,'.has',51,'g)},isa:',17,'h){var g=this;while(',120,'===h',104,'true}else{g=g.SUPER}}',41,'false},SimpleSUPER:c({',30,':',17,'g',104,'this.SimpleSUPER.define(g)},define:',17,'g){var i={};if(g!=null){',35,'h in ',120,39,'(h)){this.',86,'(h,g[h',126,41,'i},wrap:',17,'i,h){',142,'(h',')==="function"&&','h','.toString','().match(/\\.\\s*SUPER\\s*\\(/)){var g=',33,'(this.wrapper);g.label=i;g','.original','=h;h=g;g',222,'=this.stringify}',41,'h},wrapper:',43,'var h=',48,49,';this.SUPER=h.SUPER[h.label];try{var g=h',226,'.apply(this',',',48,')}catch(i){','delete this.','SUPER;','throw i}',242,243,41,'g}.','toString().replace','(/^\\s*function \\(\\)\\s*\\{\\s*/i,"").replace(/\\s*\\}\\s*$/i,""),toString:',43,41,'this',226,222,238,226,',',48,')}})})})("MathJax");(',17,'BASENAME){var ','BASE=window[BASENAME','];',9,'BASE){',263,']={}}var ','CALLBACK','=',17,'data){var cb=',33,'("',41,48,49,'.execute',115,48,49,',',48,')");',35,'id in ','CALLBACK.prototype','){if(',287,39,'(id)){',142,'(data[id',165,'"){cb[id]=data[id]}else{cb[id]=',287,'[id]}}}cb',222,'=',287,222,';',41,'cb};',287,'={isCallback:true,hook',148,'data:[],object:window,execute:',43,9,'this.called||this.autoReset){this.called=!this.autoReset;',41,'this.hook',238,'.object,this','.data.concat([].slice.call(',48,',0)))}},reset:',43,242,'called},toString:',43,41,313,222,238,'.hook,',48,')}};var ISCALLBACK=',17,'f){return(typeof(f',220,'f.isCallback)};var EVAL=',17,'code',104,'eval.call(window,code)};EVAL("var __TeSt_VaR__ = 1','");if(','window.__TeSt_VaR__','){delete ',339,'}else{if(','window.execScript','){EVAL=',17,'code){BASE.__code=code;code="try {"+BASENAME+".__result = eval("+BASENAME+".__code)} catch(err) {"+BASENAME+".__result = err}";',343,'(code',');var result=BASE.__result;delete BASE.__result;delete BASE.__code;if(result instanceof Error){throw result}return result','}}else{EVAL=',17,346,'var head=(',1,'getElementsByTagName("head"))[0];if(!','head){head=',1,'body}var script=',1,7,'("script");','script','.appendChild(',1,'createTextNode','(code));head',363,'script);','head.removeChild(','script',349,'}}}var USING=',17,'args,i','){if(',48,'.length','>1){if(',48,102,'2&&!(typeof ',48,'[0]==="function")&&',48,'[0] ',106,'Object&&typeof ',48,'[1]==="number"){','args=[].slice.call(',374,')}else{',390,48,',0)}}if(args ',106,'Array&&args',102,'1){args=args[0]}',142,' args',144,'if(args',278,'===',287,27
|
||
|
['ng+="."}}}','return ','a},Set',':function','(b,c',',a','){if(this.timer){clearTimeout(this.timer',');','delete ','this.timeout}if(c','==null','){c','=this','.log','.length',';','this.log[','c]={}}',16,'c','].text','=b;b',12,'.filterText(','b,c);','if(typeof','(',16,'c].next',')==="undefined"){',16,28,'=','this.current',';if(',33,'!=null){',16,33,'].prev=','c}',33,'=c}if(',33,'===c&&','MathJax.Hub.config.','messageStyle','!=="none"){','if(this.','Init()){','if(this.textNodeBug){this.div.innerHTML=','b','}else{','this.text','.nodeValue','=b}','this.div.style.display','="";','if(this.status){window.status="";delete this.status}}else{','window.status','=b;this.status=true}}if(a){setTimeout(','MathJax.Callback','(["Clear','",this,','c]),a)}',1,'c},Clear',3,'(b,a){if','(',16,'b].prev',36,16,16,71,'].next=',16,'b].next','}if(',16,78,36,16,16,78,39,16,71,'}if(',33,'===b){',33,'=',16,78,34,53,'){',48,'div','.parentNode',10,'){this.','Init()}if(',33,10,6,')}this.timer=setTimeout(',61,'(["Remove",this]),(a||600))}else{',50,16,33,20,52,53,54,'=',16,33,20,'}}',58,48,'status){',59,'=(',33,10,'?"":',16,33,20,')}}}',8,16,78,';',8,16,71,'},Remove',3,'(){',53,54,57,56,'="none"},File',3,'(b){var a=','MathJax.','Ajax','.config.','root',34,'b','.substr(0,','a',14,')===a){b="[MathJax]"+b.substr(a',14,')}',1,'this.Set("Loading "+b)},Log',3,'(){var b=[];','for(var ','c=1,a',12,13,14,';c<a;c++){b[c]=',16,'c',20,'}',1,'b.join("\\n")}};',152,'Hub={config:{root:"",config',':[],','styleSheets',182,'styles',':{},jax',182,'extensions',182,'preJax',':null,','postJax',191,'displayAlign:"center",displayIndent:"0",','preRemoveClass',':"MathJax_Preview",showProcessingMessages:true,',46,':"normal",','delayStartupUntil',':"none",','skipStartupTypeset',':false,','preProcessors',182,'inputJax',':{},','outputJax',':{},','menuSettings',':{zoom:"None",CTRL:false,ALT:false,CMD:false,Shift:false,zscale:"200%",renderer:"",font:"Auto",context:"MathJax"},','errorSettings',':{message:["[Math Processing Error]"],style:{color:"#CC0000","font-style":"italic"}}},','processUpdateTime',':500,signal:',61,'.Signal("','Hub"),','Config',3,'(a){this','.Insert(','this.config',',a);if(','this.config.','Augment',103,225,'(',224,225,')}},','Register',':{PreProcessor',3,'(a){',45,203,'.push(',61,'(a))},','MessageHook',3,'(){',1,152,'Hub','.signal.',241,'.apply(',152,'Hub','.signal,arguments)},','StartupHook',3,'(){',1,'MathJax.Hub.Startup',247,241,249,257,252,'LoadHook',3,'(){',1,152,'Ajax.',263,249,152,'Ajax,','arguments',231,'getAllJax',3,'(','e){var c=[],b=this.elementScripts(e);for(var d=0,a=b.length;d<a;d++){if(b[d].MathJax&&b[d].MathJax.elementJax','){c.push(b[d].','MathJax.elementJax',')}}',1,'c},getJaxByType',3,'(f,',278,'&&b[d].',280,'.mimeType===f){c.push(b[d].',280,')}}',1,'c},getJaxByInputType',3,'(f,',278,287,'type',287,'type.replace(/ *;(.|\\','s)*/,"")===f){c.push(b[d].',280,')}}',1,'c},getJaxFor',3,'(a){','if(typeof(a)==="string"){a=document.getElementById(a',')}','if(a.MathJax){',1,'a.',280,'}',1,'null},isJax',3,'(a){',308,')}','if(a.tagName!=null&&a.tagName.toLowerCase()==="script"){',310,'return(a','.MathJax.state','===',152,'ElementJax.STATE','.PROCESSED','?1:-1)}if(a.type&&',224,205,'[a.',300,'s)*/,"")]){return -1}}',1,'0},Queue',3,'(){',1,'this.queue','.Push',249,340,',',273,')},','Typeset',3,4,'){if(!',152,'isReady){',1,'null}var ','a','=this.elementCallback(',24,1,61,'.Queue(["','PreProcess',63,'a.element','],["','Process',63,363,']).','Push(a.callback)},',361,3,4,'){var a',356,24,1,61,360,'Post",this.signal',',"Begin ',361,'"],["','ExecuteHooks",',61,',(','arguments.callee.disabled','?[]:',224,203,'),',363,',true','],["Post",this.signal,"End ',361,'"]).',369,365,3,'(a,b){',1,'this.takeAction("',365,'",a,b)},','Update',3,399,1,401,404,403,'Reprocess',3,399,1,401,411,403,'takeAction',3,'(d,c,e){var b',356,'c,e);var a=[];',1,61,360,'Clear",this.signal],["',379,',["Begin "+','d,b.element',']],["','prepareScripts',63,429,',a],["','processScripts',63,'a],["',379,',["End "+',429,']]).Push(b.callback)},','scriptAction',':{',365,3,'(a){},',404,3,151,'b.',280,34,'a
|
||
|
]);
|
||
|
|