// Copyright 2006 Google 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.
document.createElement("canvas").getContext||function(){function T(){return this.context_||(this.context_=new A(this))}function U(a,b){var d=K.call(arguments,2);return function(){return a.apply(b,d.concat(K.call(arguments)))}}function L(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function M(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
if(!a.styleSheets.ex_canvas_)a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
"px"}}function W(a){a=a.srcElement;if(a.firstChild)a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px"}function B(){return[[1,0,0],[0,1,0],[0,0,1]]}function r(a,b){for(var d=B(),f=0;f<3;f++)for(var e=0;e<3;e++){for(var i=0,c=0;c<3;c++)i+=a[f][c]*b[c][e];d[f][e]=i}return d}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function O(a){var b=a.indexOf("(",3),d=a.indexOf(")",b+1),b=a.substring(b+1,d).split(",");if(b.length!=4||a.charAt(3)!="a")b[3]=1;return b}function C(a,b,d){return Math.min(d,Math.max(b,a))}function D(a,b,d){d<0&&d++;d>1&&d--;return 6*d<1?a+(b-a)*6*d:
2*d<1?b:3*d<2?a+(b-a)*(2/3-d)*6:a}function E(a){if(a in F)return F[a];var b,d=1,a=String(a);if(a.charAt(0)=="#")b=a;else if(/^rgb/.test(a)){d=O(a);b="#";for(var f,e=0;e<3;e++)f=d[e].indexOf("%")!=-1?Math.floor(parseFloat(d[e])/100*255):+d[e],b+=s[C(f,0,255)];d=+d[3]}else if(/^hsl/.test(a)){e=d=O(a);b=parseFloat(e[0])/360%360;b<0&&b++;f=C(parseFloat(e[1])/100,0,1);e=C(parseFloat(e[2])/100,0,1);if(f==0)f=e=b=e;else{var i=e<0.5?e*(1+f):e+f-e*f,c=2*e-i;f=D(c,i,b+1/3);e=D(c,i,b);b=D(c,i,b-1/3)}b="#"+s[Math.floor(f*
255)]+s[Math.floor(e*255)]+s[Math.floor(b*255)];d=d[3]}else b=X[a]||a;return F[a]={color:b,alpha:d}}function A(a){this.m_=B();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=l*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
d=a.ownerDocument.createElement("div");d.style.cssText=b;a.appendChild(d);b=d.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=d;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function P(a,b,d,f){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:d.x,cp2y:d.y,x:f.x,y:f.y});a.currentX_=f.x;a.currentY_=f.y}function Q(a,b){var d=E(a.strokeStyle),f=d.color,d=d.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;e<1&&(d*=e);b.push("<g_vml_:stroke",
' opacity="',d,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',Y[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',f,'" />')}function R(a,b,d,f){var e=a.fillStyle,i=a.arcScaleX_,c=a.arcScaleY_,g=f.x-d.x,m=f.y-d.y;if(e instanceof v){var h=0,f={x:0,y:0},j=0,p=1;if(e.type_=="gradient"){var h=e.x1_/i,d=e.y1_/c,k=o(a,e.x0_/i,e.y0_/c),h=o(a,h,d),h=Math.atan2(h.x-k.x,h.y-k.y)*180/Math.PI;h<0&&(h+=360);h<1.0E-6&&(h=0)}else k=o(a,e.x0_,e.y0_),f={x:(k.x-d.x)/g,y:(k.y-d.y)/
m},g/=i*l,m/=c*l,p=t.max(g,m),j=2*e.r0_/p,p=2*e.r1_/p-j;i=e.colors_;i.sort(function(a,b){return a.offset-b.offset});for(var c=i.length,k=i[0].color,d=i[c-1].color,g=i[0].alpha*a.globalAlpha,a=i[c-1].alpha*a.globalAlpha,m=[],q=0;q<c;q++){var n=i[q];m.push(n.offset*p+j+" "+n.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',k,'"',' color2="',d,'"',' colors="',m.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',g,'"',' angle="',h,'"',' focusposition="',f.x,",",
f.y,'" />')}else e instanceof G?g&&m&&b.push("<g_vml_:fill",' position="',-d.x/g*i*i,",",-d.y/m*c*c,'"',' type="tile"',' src="',e.src_,'" />'):(e=E(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function o(a,b,d){a=a.m_;return{x:l*(b*a[0][0]+d*a[1][0]+a[2][0])-n,y:l*(b*a[0][1]+d*a[1][1]+a[2][1])-n}}function w(a,b,d){if(isFinite(b[0][0])&&isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1])&&(a.m_=b,d))a.lineScale_=
Z($(b[0][0]*b[1][1]-b[0][1]*b[1][0]))}function v(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function G(a,b){if(!a||a.nodeType!=1||a.tagName!="IMG")throw new x("TYPE_MISMATCH_ERR");if(a.readyState!="complete")throw new x("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new x("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;
this.height_=a.height}function x(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var t=Math,g=t.round,H=t.sin,I=t.cos,$=t.abs,Z=t.sqrt,l=10,n=l/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var K=Array.prototype.slice;M(document);var S={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",U(this.init_,this,a))},init_:function(a){for(var a=a.getElementsByTagName("canvas"),b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
T;M(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",V);a.attachEvent("onresize",W);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};S.init();for(var s=[],c=0;c<16;c++)for(var z=0;z<16;z++)s[c*16+z]=c.toString(16)+z.toString(16);var X={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",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",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",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",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
F={},y={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"},J={},Y={butt:"flat",round:"round"},c=A.prototype;c.clearRect=function(){if(this.textMeasureEl_)this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null;this.element_.innerHTML=""};c.beginPath=function(){this.currentPath_=[]};c.moveTo=function(a,b){var d=o(this,a,b);this.currentPath_.push({type:"moveTo",x:d.x,y:d.y});this.currentX_=d.x;this.currentY_=d.y};c.lineTo=function(a,b){var d=o(this,a,b);this.currentPath_.push({type:"lineTo",
x:d.x,y:d.y});this.currentX_=d.x;this.currentY_=d.y};c.bezierCurveTo=function(a,b,d,f,e,i){e=o(this,e,i);a=o(this,a,b);d=o(this,d,f);P(this,a,d,e)};c.quadraticCurveTo=function(a,b,d,f){a=o(this,a,b);d=o(this,d,f);f={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};P(this,f,{x:f.x+(d.x-this.currentX_)/3,y:f.y+(d.y-this.currentY_)/3},d)};c.arc=function(a,b,d,f,e,i){d*=l;var c=i?"at":"wa",g=a+I(f)*d-n,m=b+H(f)*d-n,f=a+I(e)*d-n,e=b+H(e)*d-n;g==f&&!i&&(g+=0.125);a=o(this,
a,b);g=o(this,g,m);f=o(this,f,e);this.currentPath_.push({type:c,x:a.x,y:a.y,radius:d,xStart:g.x,yStart:g.y,xEnd:f.x,yEnd:f.y})};c.rect=function(a,b,d,f){this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+f);this.lineTo(a,b+f);this.closePath()};c.strokeRect=function(a,b,d,f){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+f);this.lineTo(a,b+f);this.closePath();this.stroke();this.currentPath_=e};c.fillRect=function(a,b,d,f){var e=this.currentPath_;this.beginPath();
this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+f);this.lineTo(a,b+f);this.closePath();this.fill();this.currentPath_=e};c.createLinearGradient=function(a,b,d,f){var e=new v("gradient");e.x0_=a;e.y0_=b;e.x1_=d;e.y1_=f;return e};c.createRadialGradient=function(a,b,d,f,e,i){var c=new v("gradientradial");c.x0_=a;c.y0_=b;c.r0_=d;c.x1_=f;c.y1_=e;c.r1_=i;return c};c.drawImage=function(a){var b,d,f,e,c,u,n,m;f=a.runtimeStyle.width;e=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height=
"auto";var h=a.width,j=a.height;a.runtimeStyle.width=f;a.runtimeStyle.height=e;if(arguments.length==3)b=arguments[1],d=arguments[2],c=u=0,n=f=h,m=e=j;else if(arguments.length==5)b=arguments[1],d=arguments[2],f=arguments[3],e=arguments[4],c=u=0,n=h,m=j;else if(arguments.length==9)c=arguments[1],u=arguments[2],n=arguments[3],m=arguments[4],b=arguments[5],d=arguments[6],f=arguments[7],e=arguments[8];else throw Error("Invalid number of arguments");var p=o(this,b,d),k=[];k.push(" <g_vml_:group",' coordsize="',
l*10,",",l*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]||this.m_[1][1]!=1||this.m_[1][0]){var q=[];q.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",g(p.x/l),",","Dy=",g(p.y/l),"");var r=o(this,b+f,d),s=o(this,b,d+e);b=o(this,b+f,d+e);p.x=t.max(p.x,r.x,s.x,b.x);p.y=t.max(p.y,r.y,s.y,b.y);k.push("padding:0 ",g(p.x/l),"px ",g(p.y/l),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",
q.join(""),", sizingmethod='clip');")}else k.push("top:",g(p.y/l),"px;left:",g(p.x/l),"px;");k.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',l*f,"px;"," height:",l*e,'px"',' cropleft="',c/h,'"',' croptop="',u/j,'"',' cropright="',(h-c-n)/h,'"',' cropbottom="',(j-u-m)/j,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",k.join(""))};c.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',
' coordorigin="0,0"',' coordsize="',l*10,",",l*10,'"',' stroked="',!a,'"',' path="');for(var d={x:null,y:null},f={x:null,y:null},e=0;e<this.currentPath_.length;e++){var c=this.currentPath_[e];switch(c.type){case "moveTo":b.push(" m ",g(c.x),",",g(c.y));break;case "lineTo":b.push(" l ",g(c.x),",",g(c.y));break;case "close":b.push(" x ");c=null;break;case "bezierCurveTo":b.push(" c ",g(c.cp1x),",",g(c.cp1y),",",g(c.cp2x),",",g(c.cp2y),",",g(c.x),",",g(c.y));break;case "at":case "wa":b.push(" ",c.type,
" ",g(c.x-this.arcScaleX_*c.radius),",",g(c.y-this.arcScaleY_*c.radius)," ",g(c.x+this.arcScaleX_*c.radius),",",g(c.y+this.arcScaleY_*c.radius)," ",g(c.xStart),",",g(c.yStart)," ",g(c.xEnd),",",g(c.yEnd))}if(c){if(d.x==null||c.x<d.x)d.x=c.x;if(f.x==null||c.x>f.x)f.x=c.x;if(d.y==null||c.y<d.y)d.y=c.y;if(f.y==null||c.y>f.y)f.y=c.y}}b.push(' ">');a?R(this,b,d,f):Q(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};c.fill=function(){this.stroke(!0)};c.closePath=
function(){this.currentPath_.push({type:"close"})};c.save=function(){var a={};N(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=r(B(),this.m_)};c.restore=function(){if(this.aStack_.length)N(this.aStack_.pop(),this),this.m_=this.mStack_.pop()};c.translate=function(a,b){w(this,r([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};c.rotate=function(a){var b=I(a),a=H(a);w(this,r([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};c.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;w(this,r([[a,0,0],
[0,b,0],[0,0,1]],this.m_),!0)};c.transform=function(a,b,d,c,e,g){w(this,r([[a,b,0],[d,c,0],[e,g,1]],this.m_),!0)};c.setTransform=function(a,b,c,f,e,g){w(this,[[a,b,0],[c,f,0],[e,g,1]],!0)};c.drawText_=function(a,b,c,f,e){var i=this.m_,f=0,n=1E3,r={x:0,y:0},m=[],h;h=this.font;if(J[h])h=J[h];else{var j=document.createElement("div").style;try{j.font=h}catch(p){}h=J[h]={style:j.fontStyle||y.style,variant:j.fontVariant||y.variant,weight:j.fontWeight||y.weight,size:j.fontSize||y.size,family:j.fontFamily||
y.family}}var j=h,k=this.element_;h={};for(var q in j)h[q]=j[q];q=parseFloat(k.currentStyle.fontSize);k=parseFloat(j.size);h.size=typeof j.size=="number"?j.size:j.size.indexOf("px")!=-1?k:j.size.indexOf("em")!=-1?q*k:j.size.indexOf("%")!=-1?q/100*k:j.size.indexOf("pt")!=-1?k/0.75:q;h.size*=0.981;q=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;k=this.element_.currentStyle;j=this.textAlign.toLowerCase();switch(j){case "left":case "center":case "right":break;case "end":j=k.direction==
"ltr"?"right":"left";break;case "start":j=k.direction=="rtl"?"right":"left";break;default:j="left"}switch(this.textBaseline){case "hanging":case "top":r.y=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":r.y=-h.size/2.25}switch(j){case "right":f=1E3;n=0.05;break;case "center":f=n=500}b=o(this,b+r.x,c+r.y);m.push('<g_vml_:line from="',-f,' 0" to="',n,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');
e?Q(this,m):R(this,m,{x:-f,y:0},{x:n,y:h.size});e=i[0][0].toFixed(3)+","+i[1][0].toFixed(3)+","+i[0][1].toFixed(3)+","+i[1][1].toFixed(3)+",0,0";b=g(b.x/l)+","+g(b.y/l);m.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',f,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',L(a),'" style="v-text-align:',j,";font:",L(q),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",m.join(""))};c.fillText=function(a,b,c,f){this.drawText_(a,b,c,
f,!1)};c.strokeText=function(a,b,c,f){this.drawText_(a,b,c,f,!0)};c.measureText=function(a){if(!this.textMeasureEl_)this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild;var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};
c.clip=function(){};c.arcTo=function(){};c.createPattern=function(a,b){return new G(a,b)};v.prototype.addColorStop=function(a,b){b=E(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};c=x.prototype=Error();c.INDEX_SIZE_ERR=1;c.DOMSTRING_SIZE_ERR=2;c.HIERARCHY_REQUEST_ERR=3;c.WRONG_DOCUMENT_ERR=4;c.INVALID_CHARACTER_ERR=5;c.NO_DATA_ALLOWED_ERR=6;c.NO_MODIFICATION_ALLOWED_ERR=7;c.NOT_FOUND_ERR=8;c.NOT_SUPPORTED_ERR=9;c.INUSE_ATTRIBUTE_ERR=10;c.INVALID_STATE_ERR=11;c.SYNTAX_ERR=12;c.INVALID_MODIFICATION_ERR=
13;c.NAMESPACE_ERR=14;c.INVALID_ACCESS_ERR=15;c.VALIDATION_ERR=16;c.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=S;CanvasRenderingContext2D=A;CanvasGradient=v;CanvasPattern=G;DOMException=x}();