!function(){var f={r:function(t){if(f[t].inited)return f[t].value;if("function"!=typeof f[t].value)return f[t].inited=!0,f[t].value;var e={exports:{}},i=f[t].value(null,e.exports,e);if(f[t].inited=!0,void 0!==(f[t].value=i))return i;for(var n in e.exports)if(e.exports.hasOwnProperty(n))return f[t].inited=!0,f[t].value=e.exports,e.exports}};f[0]={value:function(t){function p(t){this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var u={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var e in u)t==e&&(t=u[e]);for(var c=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],i=0;i "+o.toRGB()+" -> "+o.toHex());a.appendChild(h),a.appendChild(l),s.appendChild(a)}catch(t){}return s}}var W=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],$=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function c(t,e,i,n,r,s){if(!(isNaN(s)||s<1)){s|=0;var a,o=document.getElementById(t).getContext("2d");try{try{a=o.getImageData(e,i,n,r)}catch(t){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),a=o.getImageData(e,i,n,r)}catch(t){throw alert("Cannot access local image"),new Error("unable to access local image data: "+t)}}}catch(t){throw alert("Cannot access image"),new Error("unable to access image data: "+t)}var h,l,u,c,p,f,d,x,g,m,y,b,v,w,E,P,B,S,C,M,k,T,O,V,R=a.data,A=s+s+1,F=n-1,q=r-1,N=s+1,D=N*(N+1)/2,z=new j,I=z;for(u=1;u>G,0!=O?(O=255/O,R[f]=(x*X>>G)*O,R[f+1]=(g*X>>G)*O,R[f+2]=(m*X>>G)*O):R[f]=R[f+1]=R[f+2]=0,x-=b,g-=v,m-=w,y-=E,b-=H.r,v-=H.g,w-=H.b,E-=H.a,c=d+((c=h+s+1)>G,0>G)*O,R[c+1]=(g*X>>G)*O,R[c+2]=(m*X>>G)*O):R[c]=R[c+1]=R[c+2]=0,x-=b,g-=v,m-=w,y-=E,b-=H.r,v-=H.g,w-=H.b,E-=H.a,c=h+((c=l+N)]*>/,"");var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e},R.Property=function(t,e){this.name=t,this.value=e},R.Property.prototype.getValue=function(){return this.value},R.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},R.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},R.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},R.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},R.Property.prototype.addOpacity=function(t){var e=this.value;if(null!=t&&""!=t&&"string"==typeof this.value){var i=new p(this.value);i.ok&&(e="rgba("+i.r+", "+i.g+", "+i.b+", "+t+")")}return new R.Property(this.name,e)},R.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t=(t=t&&t[1])||this.value,R.Definitions[t]},R.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},R.Property.prototype.getFillStyleDefinition=function(t,e){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(R.ctx,t,e);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(R.ctx,t)}return null},R.Property.prototype.getDPI=function(t){return 96},R.Property.prototype.getEM=function(t){var e=12,i=new R.Property("fontSize",R.Font.Parse(R.ctx.font).fontSize);return i.hasValue()&&(e=i.toPixels(t)),e},R.Property.prototype.getUnits=function(){return(this.value+"").replace(/[0-9\.\-]/g,"")},R.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/em$/))return this.numValue()*this.getEM(t);if(i.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(t);if(i.match(/%$/))return this.numValue()*R.ViewPort.ComputeSize(t);var n=this.numValue();return e&&n<1?n*R.ViewPort.ComputeSize(t):n},R.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},R.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)},R.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,e,i,n,r,s){var a=null!=s?this.Parse(s):this.CreateFont("","","","","",R.ctx.font);return{fontFamily:r||a.fontFamily,fontSize:n||a.fontSize,fontStyle:t||a.fontStyle,fontWeight:i||a.fontWeight,fontVariant:e||a.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(t){for(var e={},i=R.trim(R.compressSpaces(t||"")).split(" "),n={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},r="",s=0;sthis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,r,s){var a=t+2/3*(i-t),o=e+2/3*(n-e),h=a+1/3*(r-t),l=o+1/3*(s-e);this.addBezierCurve(t,e,a,h,o,l,r,s)},this.addBezierCurve=function(t,e,n,r,s,a,o,h){var l=[t,e],u=[n,r],c=[s,a],p=[o,h];for(this.addPoint(l[0],l[1]),this.addPoint(p[0],p[1]),i=0;i<=1;i++){function f(t){return Math.pow(1-t,3)*l[i]+3*Math.pow(1-t,2)*t*u[i]+3*(1-t)*Math.pow(t,2)*c[i]+Math.pow(t,3)*p[i]}var d=6*l[i]-12*u[i]+6*c[i],x=-3*l[i]+9*u[i]-9*c[i]+3*p[i],g=3*u[i]-3*l[i];if(0!=x){var m=Math.pow(d,2)-4*g*x;if(!(m<0)){var y=(-d+Math.sqrt(m))/(2*x);0=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new R.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new R.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,i){null!=i&&0this.maxDuration){if("indefinite"!=this.attribute("repeatCount").value&&"indefinite"!=this.attribute("repeatDur").value)return"remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed&&(this.removed=!0,this.getProperty().value=this.initialValue,!0);this.duration=0}this.duration=this.duration+t;var e=!1;if(this.begin'],r.appendChild(n.cloneNode(!0)),r.innerHTML.replace(/]+?>/i,s.join("")).replace(/ /g,""))},e,i)}function a(t,e,i,n){var r=t.createElement("canvas"),s=r.getContext("2d");return r.width=e,r.height=i,"image/png"!==n&&(s.fillStyle="white",s.fillRect(0,0,r.width,r.height)),r}function o(t,e,i,n){var r=a(t,e.width,e.height,i);r.style.cssText="position: absolute; top: 0; left: 100000px; z-index: -1;",window.setTimeout(function(){t.body.appendChild(r),s(r,e.content),t.body.removeChild(r),n(r.toDataURL(i))},0)}}},f[2]={value:function(){return["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","ȷ","ı","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϕ","ϖ","Ϟ","Ϝ","ϵ","ϱ","Ϲ","ℜ","ℵ","ℑ","℧","ℶ","ℷ","ℸ","ð","ℏ","⅁","ℎ","∂","℘","⅌","Ⅎ","∁","ℓ","Ⓢ","(",")","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","Α","Β","#","!","$","%","&","∠","′","‵","★","◆","■","▲","▼","⊤","⊥","♣","♠","♢","♡","∃","∄","♭","♮","♯","∀","∞","∡","∇","¬","∢","√","△","▽","∅","ø","◇","◀","▸","[","]","{","}","〈","〉","ϰ",",",".","/",":",";","?","\\","⋮","⋯","⋰","…","@",""","'","|","^","`","“","_","*","+","-","∐","⊼","⊻","◯","⊡","⊟","⊞","⊠","•","∩","∪","⋒","⋓","⋐","⋑","·","▪","◦","⊛","⊚","⊖","⊙","⊝","⊕","⊗","⊘","±","∓","⋏","⋎","†","‡","⋄","÷","⋇","∔","⌭","⋗","⋖","⋉","⋊","⋋","⋌","⊓","⊔","⊑","⊒","⊏","⊐","⋆","×","⊳","⊲","⊵","⊴","⊎","∨","∧","≀","<","=",">","≈","≇","≍","≒","≓","≊","∽","≁","≂","≃","⋍","≏","≎","≗","≅","⋞","⋟","≐","≑","≖","⪖","⪕","≡","≥","≤","≦","≧","⩾","⩽","≫","≪","≨","≩","⋘","⋙","⪇","⪈","⪉","⪊","⋧","⋦","⪆","⪅","⋛","⋚","⪋","⪌","≷","≶","≳","≲","⌮","⌯","≯","≱","≰","≮","⌱","⌰","⌲","⌳","≬","⊀","⊁","⋠","⋡","≺","≻","≼","≽","≾","≿","⊂","⊃","⊈","⊉","⊆","⊇","⊊","⊋","⪷","⪸","⪯","⪰","⪹","⪺","⪵","⪶","⋨","⋩","∼","≜","↶","↷","↺","↻","↾","↿","⇂","⇃","⇄","⇆","⇈","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇚","⇛","⇝","↫","↬","↭","↮","←","↑","→","↓","↔","↕","↖","↗","↘","↙","↞","↠","↢","↣","↰","↱","⊢","⊣","⊨","⊩","⊪","⊭","⊯","⊸","⊺","⋔","⋪","⋫","⋬","⋭","⌈","⌉","⌊","⌋","⫋","⫌","⫅","⫆","∈","∋","∝","∤","∦","∴","∵","∍","⋈","⌢","⌣","∣","∥","⏐","⏑","⏒","⏓","⫇","⫈","⊮","⊬","⫉","⏔","⏕","⏖","⏗","⇇","⇉","↼","↽","⇀","⇁","↚","↛","⟵","⟶","⟷","⟹","⟸","⟺","≢","≠","∉"]}},f[3]={value:function(){return{defaultFont:"KF AMS MAIN"}}},f[4]={value:function(t){var n=f.r(34),r=document.createElement("div");function e(t){var e,i=new n.Text;return"innerHTML"in i.node?i.node.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"):-1!=t.indexOf(" ")&&(e=t,r.innerHTML=''+e.replace(/\s/gi," ")+"",t=r.firstChild.firstChild.textContent),i.setContent(t),i}return{create:function(t){return e(t)}}}},f[5]={value:function(t){var i=f.r(34),e=f.r(47).font,r=f.r(25),n=f.r(4);return i.createClass("Text",{base:f.r(46),constructor:function(t,e){this.callBase(),this.fontFamily=e,this.fontSize=50,this.content=t||"",this.box.remove(),this.translationContent=this.translation(this.content),this.contentShape=new i.Group,this.contentNode=this.createContent(),this.contentShape.addShape(this.contentNode),this.addShape(this.contentShape)},createContent:function(){var t=n.create(this.translationContent);return t.setAttr({"font-family":this.fontFamily,"font-size":50,x:0,y:e.offset}),t},setFamily:function(t){this.fontFamily=t,this.contentNode.setAttr("font-family",t)},setFontSize:function(t){this.fontSize=t,this.contentNode.setAttr("font-size",t+"px"),this.contentNode.setAttr("y",t/50*e.offset)},getBaseHeight:function(){for(var t=this.contentShape.getItems(),e=null,i=0,n=0;e=t[i];)n=Math.max(n,e.getHeight()),i++;return n},translation:function(t){var n=this.fontFamily;return t.replace(/``/g,"“").replace(/\\([a-zA-Z,]+)\\/g,function(t,e){if(","===e)return" ";var i=r.getCharacterValue(e,n);return i||""})}})}},f[6]={value:function(){return{UNKNOWN:-1,EXP:0,COMPOUND_EXP:1,OP:2}}},f[7]={value:function(){return{SIDE:"side",FOLLOW:"follow"}}},f[8]={value:function(t){return f.r(34).createClass("SubscriptExpression",{base:f.r(17),constructor:function(t,e){this.callBase(t,null,e),this.setFlag("Subscript")}})}},f[9]={value:function(t){return f.r(34).createClass("SuperscriptExpression",{base:f.r(17),constructor:function(t,e){this.callBase(t,e,null),this.setFlag("Superscript")}})}},f[10]={value:function(t){return f.r(34).createClass("BinaryExpression",{base:f.r(19),constructor:function(t,e){this.callBase(),this.setFirstOperand(t),this.setLastOperand(e)},setFirstOperand:function(t){return this.setOperand(t,0)},getFirstOperand:function(){return this.getOperand(0)},setLastOperand:function(t){return this.setOperand(t,1)},getLastOperand:function(){return this.getOperand(1)}})}},f[11]={value:function(t){var e=f.r(34),n=f.r(35);return e.createClass("BracketsExpression",{base:f.r(19),constructor:function(t,e,i){this.callBase(),this.setFlag("Brackets"),2===arguments.length&&(i=e,e=t),this.leftSymbol=t,this.rightSymbol=e,this.setOperator(new n),this.setOperand(i,0)},getLeftSymbol:function(){return this.leftSymbol},getRightSymbol:function(){return this.rightSymbol}})}},f[12]={value:function(t){var n=f.r(34),i=f.r(47).font,e=f.r(36);return n.createClass("CombinationExpression",{base:f.r(19),constructor:function(){this.callBase(),this.setFlag("Combination"),this.setOperator(new e),n.Utils.each(arguments,function(t,e){this.setOperand(t,e)},this)},getRenderBox:function(t){var e=this.callBase(t);return 0===this.getOperands().length&&(e.height=i.spaceHeight),e},getBaseline:function(e){var i=0,t=this.getOperands();return 0===t.length?this.callBase(e):(n.Utils.each(t,function(t){i=Math.max(t.getBaseline(e),i)}),i)},getMeanline:function(e){var i=1e7,t=this.getOperands();return 0===t.length?this.callBase(e):(n.Utils.each(t,function(t){i=Math.min(t.getMeanline(e),i)}),i)}})}},f[13]={value:function(t){var e=f.r(34),i=f.r(38);return e.createClass("FractionExpression",{base:f.r(10),constructor:function(t,e){this.callBase(t,e),this.setFlag("Fraction"),this.setOperator(new i)},getBaseline:function(t){var e=this.getOperand(1),i=e.getRenderBox(t);return i.y+e.getBaselineProportion()*i.height},getMeanline:function(t){var e=this.getOperand(0),i=e.getRenderBox(t);return e.getMeanlineProportion()*i.height}})}},f[14]={value:function(t){var e=f.r(34),i=f.r(47).func,r=f.r(39);return e.createClass("FunctionExpression",{base:f.r(19),constructor:function(t,e,i,n){this.callBase(),this.setFlag("Func"),this.funcName=t,this.setOperator(new r(t)),this.setExpr(e),this.setSuperscript(i),this.setSubscript(n)},isSideScript:function(){return!i["ud-script"][this.funcName]},setExpr:function(t){return this.setOperand(t,0)},setSuperscript:function(t){return this.setOperand(t,1)},setSubscript:function(t){return this.setOperand(t,2)}})}},f[15]={value:function(t){var e=f.r(34),n=f.r(40);return e.createClass("IntegrationExpression",{base:f.r(19),constructor:function(t,e,i){this.callBase(),this.setFlag("Integration"),this.setOperator(new n),this.setIntegrand(t),this.setSuperscript(e),this.setSubscript(i)},setType:function(t){return this.getOperator().setType(t),this},resetType:function(){return this.getOperator().resetType(),this},setIntegrand:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},f[16]={value:function(t){var e=f.r(34),i=f.r(42);return e.createClass("RadicalExpression",{base:f.r(10),constructor:function(t,e){this.callBase(t,e),this.setFlag("Radicand"),this.setOperator(new i)},setRadicand:function(t){return this.setFirstOperand(t)},getRadicand:function(){return this.getFirstOperand()},setExponent:function(t){return this.setLastOperand(t)},getExponent:function(){return this.getLastOperand()}})}},f[17]={value:function(t){var e=f.r(34),n=f.r(43);return e.createClass("ScriptExpression",{base:f.r(19),constructor:function(t,e,i){this.callBase(),this.setFlag("Script"),this.setOperator(new n),this.setOpd(t),this.setSuperscript(e),this.setSubscript(i)},setOpd:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},f[18]={value:function(t){var e=f.r(34),n=f.r(44);return e.createClass("SummationExpression",{base:f.r(19),constructor:function(t,e,i){this.callBase(),this.setFlag("Summation"),this.setOperator(new n),this.setExpr(t),this.setSuperscript(e),this.setSubscript(i)},setExpr:function(t){this.setOperand(t,0)},setSuperscript:function(t){this.setOperand(t,1)},setSubscript:function(t){this.setOperand(t,2)}})}},f[19]={value:function(t){var e=f.r(34),i=f.r(6),n=f.r(21);return e.createClass("CompoundExpression",{base:f.r(21),constructor:function(){this.callBase(),this.type=i.COMPOUND_EXP,this.operands=[],this.operator=null,this.operatorBox=new e.Group,this.operatorBox.setAttr("data-type","kf-editor-exp-op-box"),this.operandBox=new e.Group,this.operandBox.setAttr("data-type","kf-editor-exp-operand-box"),this.setChildren(0,this.operatorBox),this.setChildren(1,this.operandBox)},setOperator:function(t){return void 0===t?this:(this.operator&&this.operator.remove(),this.operatorBox.addShape(t),this.operator=t,this.operator.setParentExpression(this),t.expression=this)},getOperator:function(){return this.operator},setOperand:function(t,e,i){return!1===i?this.operands[e]=t:(t=n.wrap(t),this.operands[e]&&this.operands[e].remove(),this.operands[e]=t,this.operandBox.addShape(t)),this},getOperand:function(t){return this.operands[t]},getOperands:function(){return this.operands},addedCall:function(){return this.operator.applyOperand.apply(this.operator,this.operands),this}})}},f[20]={value:function(t){var e=f.r(34),i=f.r(47).font,n=f.r(21),r=e.createClass("EmptyExpression",{base:n,constructor:function(){this.callBase(),this.setFlag("Empty")},getRenderBox:function(){return{width:0,height:i.spaceHeight,x:0,y:0}}});return r.isEmpty=function(t){return t instanceof r},n.registerWrap("empty",function(t){if(null==t)return new r}),r}},f[21]={value:function(t){var n=f.r(34),e=f.r(6),i=f.r(47).font,r=[],s={},a=n.createClass("Expression",{base:f.r(46),constructor:function(){this.callBase(),this.type=e.EXP,this._offset={top:0,bottom:0},this.children=[],this.box.fill("transparent").setAttr("data-type","kf-editor-exp-box"),this.box.setAttr("data-type","kf-editor-exp-bg-box"),this.expContent=new n.Group,this.expContent.setAttr("data-type","kf-editor-exp-content-box"),this.addShape(this.expContent)},getChildren:function(){return this.children},getChild:function(t){return this.children[t]||null},getTopOffset:function(){return this._offset.top},getBottomOffset:function(){return this._offset.bottom},getOffset:function(){return this._offset},setTopOffset:function(t){this._offset.top=t},setBottomOffset:function(t){this._offset.bottom=t},setOffset:function(t,e){this._offset.top=t,this._offset.bottom=e},setFlag:function(t){this.setAttr("data-flag",t||"Expression")},setChildren:function(t,e){this.children[t]&&this.children[t].remove(),this.children[t]=e,this.expContent.addShape(e)},getBaselineProportion:function(){return i.baselinePosition},getMeanlineProportion:function(){return i.meanlinePosition},getBaseline:function(t){return this.getRenderBox(t).height*i.baselinePosition-3},getMeanline:function(t){return this.getRenderBox(t).height*i.meanlinePosition-1},getAscenderline:function(){return this.getFixRenderBox().height*i.ascenderPosition},getDescenderline:function(){return this.getFixRenderBox().height*i.descenderPosition},translateElement:function(t,e){this.expContent.translate(t,e)},expand:function(t,e){var i=this.getFixRenderBox();this.setBoxSize(i.width+t,i.height+e)},getBaseWidth:function(){return this.getWidth()},getBaseHeight:function(){return this.getHeight()},updateBoxSize:function(){var t=this.expContent.getFixRenderBox();this.setBoxSize(t.width,t.height)},getBox:function(){return this.box}});return n.Utils.extend(a,{registerWrap:function(t,e){s[t]=r.length,r.push(e)},revokeWrap:function(t){var e=null;return t in s&&(e=r[s[t]],r[s[t]]=null,delete s[t]),e},wrap:function(e){var i;return n.Utils.each(r,function(t){if(t)return!(i=t(e))&&void 0}),i}}),a}},f[22]={value:function(t){var i=f.r(5),n=f.r(34),r=f.r(3),e=f.r(21),s=n.createClass("TextExpression",{base:f.r(21),constructor:function(t,e){this.callBase(),this.fontFamily=e||r.defaultFont,this.setFlag("Text"),this.content=t+"",this.textContent=new i(this.content,this.fontFamily),this.setChildren(0,this.textContent),this.setChildren(1,new n.Rect(0,0,0,0).fill("transparent"))},setFamily:function(t){this.textContent.setFamily(t)},setFontSize:function(t){this.textContent.setFontSize(t)},addedCall:function(){var t=this.textContent.getFixRenderBox();return this.getChild(1).setSize(t.width,t.height),this.updateBoxSize(),this}});return e.registerWrap("text",function(t){var e=typeof t;return"number"!=e&&"string"!=e||(t=new s(t)),t}),s}},f[23]={value:function(){return['','x',""]}},f[24]={value:function(t){var s=f.r(34),e=f.r(25),l=f.r(33),u=f.r(47).font,c=f.r(2),p=[];return s.createClass("FontInstaller",{constructor:function(t,e){this.callBase(),this.resource=e||"../src/resource/",this.doc=t},mount:function(i){var t=e.getFontList(),n=0,r=this;s.Utils.each(t,function(t){var a,o,h;n++,t.meta.src=r.resource+t.meta.src,r.createFontStyle(t),a=r.doc,o=t,h=function(){var t,e;0===--n&&(t=r.doc,e=i,window.setTimeout(function(){!function(t){var e=t.createElement("div");e.style.cssText="position: absolute; top: 0; left: -100000px;",e.innerHTML=f.r(23).join(""),t.body.appendChild(e);var i=e.getElementsByTagName("text")[0].getBBox();u.spaceHeight=i.height,u.topSpace=-i.y-u.baseline,u.bottomSpace=u.spaceHeight-u.topSpace-u.baseHeight,u.offset=u.baseline+u.topSpace,u.baselinePosition=(u.topSpace+u.baseline)/u.spaceHeight,u.meanlinePosition=(u.topSpace+u.meanline)/u.spaceHeight,u.ascenderPosition=u.topSpace/u.spaceHeight,u.descenderPosition=(u.topSpace+u.baseHeight)/u.spaceHeight,t.body.removeChild(e)}(t),s.Utils.each(p,function(t){t.parentNode.removeChild(t)}),p=[],e()},100))},l.get(o.meta.src,function(t,e){var i,n,r,s;"success"===e&&(i=a,n=o,r=document.createElement("div"),s=n.meta.fontFamily,r.style.cssText="position: absolute; top: -10000px; left: -100000px;",r.style.fontFamily=s,r.innerHTML=c.join(""),i.body.appendChild(r),p.push(r)),h()})})},createFontStyle:function(t){var e=this.doc.createElement("style");e.setAttribute("type","text/css"),e.innerHTML='@font-face{\nfont-family: "${fontFamily}";\nsrc: url("${src}");\n}'.replace("${fontFamily}",t.meta.fontFamily).replace("${src}",t.meta.src),this.doc.head.appendChild(e)}})}},f[25]={value:function(t){var i={},e=f.r(34),n=f.r(47).font.list;return e.Utils.each(n,function(t){i[t.meta.fontFamily]=t}),{getFontList:function(){return i},getCharacterValue:function(t,e){return i[e]&&i[e].map[t]||null}}}},f[26]={value:function(){return{meta:{fontFamily:"KF AMS BB",src:"KF_AMS_BB.woff"}}}},f[27]={value:function(){return{meta:{fontFamily:"KF AMS CAL",src:"KF_AMS_CAL.woff"}}}},f[28]={value:function(){return{meta:{fontFamily:"KF AMS FRAK",src:"KF_AMS_FRAK.woff"}}}},f[29]={value:function(){return{meta:{fontFamily:"KF AMS MAIN",src:"KF_AMS_MAIN.woff"},map:{Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",varkappa:"ϰ",chi:"χ",psi:"ψ",omega:"ω",digamma:"Ϝ",varepsilon:"ϵ",varrho:"ϱ",varphi:"ϕ",vartheta:"ϑ",varpi:"ϖ",varsigma:"Ϲ",aleph:"ℵ",beth:"ℶ",daleth:"ℸ",gimel:"ℷ",eth:"ð",hbar:"ℎ",hslash:"ℏ",mho:"℧",partial:"∂",wp:"℘",Game:"⅁",Bbbk:"⅌",Finv:"Ⅎ",Im:"ℑ",Re:"ℜ",complement:"∁",ell:"ℓ",circledS:"Ⓢ",imath:"ı",jmath:"ȷ",doublecap:"⋒",Cap:"⋒",doublecup:"⋓",Cup:"⋓",ast:"*",divideontimes:"⋇",rightthreetimes:"⋌",leftthreetimes:"⋋",cdot:"·",odot:"⊙",dotplus:"∔",rtimes:"⋊",ltimes:"⋉",centerdot:"▪",doublebarwedge:"⌭",setminus:"⒁",amalg:"∐",circ:"◦",bigcirc:"◯",gtrdot:"⋗",lessdot:"⋖",smallsetminus:"⒅",circledast:"⊛",circledcirc:"⊚",sqcap:"⊓",sqcup:"⊔",barwedge:"⊼",circleddash:"⊝",star:"⋆",bigtriangledown:"▽",bigtriangleup:"△",cup:"∪",cap:"∩",times:"×",mp:"∓",pm:"±",triangleleft:"⊲",triangleright:"⊳",boxdot:"⊡",curlyvee:"⋏",curlywedge:"⋎",boxminus:"⊟",boxtimes:"⊠",ominus:"⊖",oplus:"⊕",oslash:"⊘",otimes:"⊗",uplus:"⊎",boxplus:"⊞",dagger:"†",ddagger:"‡",vee:"∨",lor:"∨",veebar:"⊻",bullet:"•",diamond:"⋄",wedge:"∧",land:"∧",div:"÷",wr:"≀",geqq:"≧",lll:"⋘",llless:"⋘",ggg:"⋙",gggtr:"⋙",preccurlyeq:"≼",geqslant:"⩾",lnapprox:"⪉",preceq:"⪯",gg:"≫",lneq:"⪇",precnapprox:"⪹",approx:"≈",lneqq:"≨",precneqq:"⪵",approxeq:"≊",gnapprox:"⪊",lnsim:"⋦",precnsim:"⋨",asymp:"≍",gneq:"⪈",lvertneqq:"⌮",precsim:"≾",backsim:"∽",gneqq:"≩",ncong:"≇",risingdotseq:"≓",backsimeq:"⋍",gnsim:"⋧",sim:"∼",simeq:"≃",bumpeq:"≏",gtrapprox:"⪆",ngeq:"≱",Bumpeq:"≎",gtreqless:"⋛",ngeqq:"⌱",succ:"≻",circeq:"≗",gtreqqless:"⪌",ngeqslant:"⌳",succapprox:"⪸",cong:"≅",gtrless:"≷",ngtr:"≯",succcurlyeq:"≽",curlyeqprec:"⋞",gtrsim:"≳",nleq:"≰",succeq:"⪰",curlyeqsucc:"⋟",gvertneqq:"⌯",neq:"≠",ne:"≠",nequiv:"≢",nleqq:"⌰",succnapprox:"⪺",doteq:"≐",leq:"≤",le:"≤",nleqslant:"⌲",succneqq:"⪶",doteqdot:"≑",Doteq:"≑",leqq:"≦",nless:"≮",succnsim:"⋩",leqslant:"⩽",nprec:"⊀",succsim:"≿",eqsim:"≂",lessapprox:"⪅",npreceq:"⋠",eqslantgtr:"⪖",lesseqgtr:"⋚",nsim:"≁",eqslantless:"⪕",lesseqqgtr:"⪋",nsucc:"⊁",triangleq:"≜",eqcirc:"≖",equiv:"≡",lessgtr:"≶",nsucceq:"⋡",fallingdotseq:"≒",lesssim:"≲",prec:"≺",geq:"≥",ge:"≥",ll:"≪",precapprox:"⪷",uparrow:"↑",downarrow:"↓",updownarrow:"↕",Uparrow:"⇑",Downarrow:"⇓",Updownarrow:"⇕",circlearrowleft:"↺",circlearrowright:"↻",curvearrowleft:"↶",curvearrowright:"↷",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",leftarrow:"←",gets:"←",Leftarrow:"⇐",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇄",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",Lleftarrow:"⇚",looparrowleft:"↫",looparrowright:"↬",multimap:"⊸",nLeftarrow:"⇍",nRightarrow:"⇏",nLeftrightarrow:"⇎",nearrow:"↗",nleftarrow:"↚",nleftrightarrow:"↮",nrightarrow:"↛",nwarrow:"↖",rightarrow:"→",to:"→",Rightarrow:"⇒",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇆",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"⇝",Rrightarrow:"⇛",searrow:"↘",swarrow:"↙",twoheadleftarrow:"↞",twoheadrightarrow:"↠",upharpoonleft:"↿",upharpoonright:"↾",restriction:"↾",upuparrows:"⇈",Lsh:"↰",Rsh:"↱",longleftarrow:"⟵",longrightarrow:"⟶",Longleftarrow:"⟸",Longrightarrow:"⟹",implies:"⟹",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",backepsilon:"∍",because:"∵",therefore:"∴",between:"≬",blacktriangleleft:"◀",blacktriangleright:"▸",dashv:"⊣",bowtie:"⋈",frown:"⌢",in:"∈",notin:"∉",mid:"∣",parallel:"∥",models:"⊨",ni:"∋",owns:"∋",nmid:"∤",nparallel:"∦",nshortmid:"⏒",nshortparallel:"⏓",nsubseteq:"⊈",nsubseteqq:"⫇",nsupseteq:"⊉",nsupseteqq:"⫈",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nvdash:"⊬",nVdash:"⊮",nvDash:"⊭",nVDash:"⊯",perp:"⊥",pitchfork:"⋔",propto:"∝",shortmid:"⏐",shortparallel:"⏑",smile:"⌣",sqsubset:"⊏",sqsubseteq:"⊑",sqsupset:"⊐",sqsupseteq:"⊒",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",trianglelefteq:"⊴",trianglerighteq:"⊵",varpropto:"⫉",varsubsetneq:"⏔",varsubsetneqq:"⏖",varsupsetneq:"⏕",varsupsetneqq:"⏗",vdash:"⊢",Vdash:"⊩",vDash:"⊨",Vvdash:"⊪",vert:"|",Vert:"ǁ","|":"ǁ","{":"{","}":"}",backslash:"\\",langle:"〈",rangle:"〉",lceil:"⌈",rceil:"⌉",lbrace:"{",rbrace:"}",lfloor:"⌊",rfloor:"⌋",cdots:"⋯",ddots:"⋰",vdots:"⋮",dots:"…",ldots:"…","#":"#",bot:"⊥",angle:"∠",backprime:"‵",bigstar:"★",blacklozenge:"◆",blacksquare:"■",blacktriangle:"▲",blacktriangledown:"▼",clubsuit:"♣",diagdown:"⒁",diagup:"⒂",diamondsuit:"♢",emptyset:"ø",exists:"∃",flat:"♭",forall:"∀",heartsuit:"♡",infty:"∞",lozenge:"◇",measuredangle:"∡",nabla:"∇",natural:"♮",neg:"¬",lnot:"¬",nexists:"∄",prime:"′",sharp:"♯",spadesuit:"♠",sphericalangle:"∢",surd:"√",top:"⊤",varnothing:"∅",triangle:"△",triangledown:"▽"}}}},f[30]={value:function(){return{meta:{fontFamily:"KF AMS ROMAN",src:"KF_AMS_ROMAN.woff"}}}},f[31]={value:function(t){var r=f.r(34),s=f.r(6),e=f.r(25),i=f.r(24),n={fontsize:50,autoresize:!0,padding:[0]},a=f.r(1),o=r.createClass("ExpressionWrap",{constructor:function(t,e){this.wrap=new r.Group,this.bg=new r.Rect(0,0,0,0).fill("transparent"),this.exp=t,this.config=e,this.wrap.setAttr("data-type","kf-exp-wrap"),this.bg.setAttr("data-type","kf-exp-wrap-bg"),this.wrap.addShape(this.bg),this.wrap.addShape(this.exp)},getWrapShape:function(){return this.wrap},getExpression:function(){return this.exp},getBackground:function(){return this.bg},resize:function(){var t=this.config.padding,e=this.exp.getFixRenderBox();1===t.length&&(t[1]=t[0]),this.bg.setSize(2*t[1]+e.width,2*t[0]+e.height),this.exp.translate(t[1],t[0])}}),h=r.createClass("Formula",{base:f.r(32),constructor:function(t,e){this.callBase(t),this.expressions=[],this.fontInstaller=new i(this),this.config=r.Utils.extend({},n,e),this.initEnvironment(),this.initInnerFont()},getContentContainer:function(){return this.container},initEnvironment:function(){this.zoom=this.config.fontsize/50,"width"in this.config&&this.setWidth(this.config.width),"height"in this.config&&this.setHeight(this.config.height),this.node.setAttribute("font-size",n.fontsize)},initInnerFont:function(){var t=e.getFontList(),n=this;r.Utils.each(t,function(t){var e,i;e=t,(i=n.doc.createElement("style")).setAttribute("type","text/css"),i.innerHTML='@font-face{font-family: "${fontFamily}";font-style: normal;src: url("${src}") format("woff");}'.replace("${fontFamily}",e.meta.fontFamily).replace("${src}",e.meta.src),n.resourceNode.appendChild(i)})},insertExpression:function(t,e){var i=this.wrap(t);this.container.clearTransform(),this.expressions.splice(e,0,i.getWrapShape()),this.addShape(i.getWrapShape()),function t(e){var i=0;if(!e)return;if(e.getType()===s.EXP)for(var n=0,i=e.getChildren().length;n