graphics-vml-min.js revision 11ba9f1486f8345f4ed99c74d8b58be3be37a40e
YUI.add("graphics-vml",function(a){var c=a.Lang,i=c.isNumber,e=c.isArray,g=a.DOM,b=a.Selector,l=a.config.doc,d=a.AttributeLite,o,k,n,j,m,h;function f(){}f.prototype={_currentX:0,_currentY:0,curveTo:function(s,r,z,w,v,u){var t,p,q,A;v=Math.round(v);u=Math.round(u);this._path+=" c "+Math.round(s)+", "+Math.round(r)+", "+Math.round(z)+", "+Math.round(w)+", "+v+", "+u;this._currentX=v;this._currentY=u;t=Math.max(v,Math.max(s,z));q=Math.max(u,Math.max(r,w));p=Math.min(v,Math.min(s,z));A=Math.min(u,Math.min(r,w));this._trackSize(t,q);this._trackSize(p,A);},quadraticCurveTo:function(u,t,w,v){var q=this._currentX,p=this._currentY,s=q+0.67*(u-q),r=p+0.67*(t-p),A=s+(w-q)*0.34,z=r+(v-p)*0.34;this.curveTo(s,r,A,z,w,v);},drawRect:function(p,s,q,r){this.moveTo(p,s);this.lineTo(p+q,s);this.lineTo(p+q,s+r);this.lineTo(p,s+r);this.lineTo(p,s);this._currentX=p;this._currentY=s;return this;},drawRoundRect:function(p,u,q,s,r,t){this.moveTo(p,u+t);this.lineTo(p,u+s-t);this.quadraticCurveTo(p,u+s,p+r,u+s);this.lineTo(p+q-r,u+s);this.quadraticCurveTo(p+q,u+s,p+q,u+s-t);this.lineTo(p+q,u+t);this.quadraticCurveTo(p+q,u,p+q-r,u);this.lineTo(p+r,u);this.quadraticCurveTo(p,u,p,u+t);return this;},drawWedge:function(r,v,t,s,q,p){var u=q*2;p=p||q;if(Math.abs(s)>360){s=360;}t*=-65535;s*=65536;this._path+=" m "+r+" "+v+" ae "+r+" "+v+" "+q+" "+p+" "+t+" "+s;this._trackSize(u,u);this._currentX=r;this._currentY=v;return this;},end:function(){this._draw();},lineTo:function(u,t,r){var q=arguments,s,p;if(typeof u==="string"||typeof u==="number"){q=[[u,t]];}p=q.length;if(!this._path){this._path="";}this._path+=" l ";for(s=0;s<p;++s){this._path+=" "+Math.round(q[s][0])+", "+Math.round(q[s][1]);this._trackSize.apply(this,q[s]);this._currentX=q[s][0];this._currentY=q[s][1];}return this;},moveTo:function(p,q){if(!this._path){this._path="";}this._path+=" m "+Math.round(p)+", "+Math.round(q);this._trackSize(p,q);this._currentX=p;this._currentY=q;},_trackSize:function(p,q){if(p>this._right){this._right=p;}if(p<this._left){this._left=p;}if(q<this._top){this._top=q;}if(q>this._bottom){this._bottom=q;}this._width=this._right-this._left;this._height=this._bottom-this._top;},_left:0,_right:0,_top:0,_bottom:0,_width:0,_height:0};a.VMLDrawing=f;o=function(){o.superclass.constructor.apply(this,arguments);};o.NAME="vmlShape";a.extend(o,a.BaseGraphic,{init:function(){this.initializer.apply(this,arguments);},initializer:function(p){var q=this,r=p.graphic;q._graphic=r;q.createNode();},createNode:function(){var E,A=this.get("x"),v=this.get("y"),B=this.get("width"),G=this.get("height"),D,s,J,I,u,t,C,q,z,H,p,F,r;D=this.get("id");s=this._type;u="vml"+s+" yui3-vmlShape yui3-"+this.constructor.NAME;t=this._getStrokeProps();F=this._getFillProps();J="<"+s+' xmlns="urn:schemas-microsft.com:vml" id="'+D+'" class="'+u+'" style="behavior:url(#default#VML);display:inline-block;position:absolute;left:'+A+"px;top:"+v+"px;width:"+B+"px;height:"+G+'px;"';if(t&&t.weight&&t.weight>0){C=t.endcap;q=parseFloat(t.opacity);z=t.joinstyle;H=t.miterlimit;p=t.dashstyle;J+=' stroked="t" strokecolor="'+t.color+'" strokeWeight="'+t.weight+'px"';I='<stroke class="vmlstroke" xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;"';I+=' opacity="'+q+'"';if(C){I+=' endcap="'+C+'"';}if(z){I+=' joinstyle="'+z+'"';}if(H){I+=' miterlimit="'+H+'"';}if(p){I+=' dashstyle="'+p+'"';}I+="></stroke>";this._strokeNode=l.createElement(I);J+=' stroked="t"';}else{J+=' stroked="f"';}if(F){if(F.node){r=F.node;this._fillNode=l.createElement(r);}if(F.color){J+=' fillcolor="'+F.color+'"';}J+=' filled="'+F.filled+'"';}J+=">";J+="</"+s+">";E=l.createElement(J);if(this._strokeNode){E.appendChild(this._strokeNode);}if(this._fillNode){E.appendChild(this._fillNode);}this.node=E;},addClass:function(p){var q=this.node;g.addClass(q,p);},removeClass:function(p){var q=this.node;g.removeClass(q,p);},getXY:function(){var s=this._graphic,q=s.getXY(),p=this.get("x"),r=this.get("y");return[q[0]+p,q[1]+r];},setXY:function(q){var r=this._graphic,p=r.getXY();this.set("x",q[0]-p[0]);this.set("y",q[1]-p[1]);},contains:function(p){return p===a.one(this.node);},compareTo:function(p){var q=this.node;return q===p;},test:function(p){return b.test(this.node,p);},_getStrokeProps:function(){var w,y=this.get("stroke"),u,q,s="",p,r=0,t,x,v;if(y&&y.weight&&y.weight>0){w={};x=y.linecap||"flat";v=y.linejoin||"round";if(x!="round"&&x!="square"){x="flat";}u=parseFloat(y.opacity);q=y.dashstyle||"none";y.color=y.color||"#000000";y.weight=y.weight||1;y.opacity=i(u)?u:1;w.stroked=true;w.color=y.color;w.weight=y.weight;w.endcap=x;w.opacity=y.opacity;if(e(q)){s=[];t=q.length;for(r=0;r<t;++r){p=q[r];s[r]=p/y.weight;}}if(v=="round"||v=="bevel"){w.joinstyle=v;}else{v=parseInt(v,10);if(i(v)){w.miterlimit=Math.max(v,1);w.joinstyle="miter";}}w.dashstyle=s;}return w;},_strokeChangeHandler:function(v){var r=this.node,z=this.get("stroke"),w,q,t="",p,s=0,u,y,x;if(z&&z.weight&&z.weight>0){y=z.linecap||"flat";x=z.linejoin||"round";if(y!="round"&&y!="square"){y="flat";}w=parseFloat(z.opacity);q=z.dashstyle||"none";z.color=z.color||"#000000";z.weight=z.weight||1;z.opacity=i(w)?w:1;r.stroked=true;r.strokeColor=z.color;r.strokeWeight=z.weight+"px";if(!this._strokeNode){this._strokeNode=this._createGraphicNode("stroke");r.appendChild(this._strokeNode);}this._strokeNode.endcap=y;this._strokeNode.opacity=z.opacity;if(e(q)){t=[];u=q.length;for(s=0;s<u;++s){p=q[s];t[s]=p/z.weight;}}if(x=="round"||x=="bevel"){this._strokeNode.joinstyle=x;}else{x=parseInt(x,10);if(i(x)){this._strokeNode.miterlimit=Math.max(x,1);this._strokeNode.joinstyle="miter";}}this._strokeNode.dashstyle=t;}else{if(this._strokeNode){r.removeChild(this._strokeNode);this._strokeNode=null;}r.stroked=false;}},_getFillProps:function(){var v=this.get("fill"),p,s,u,q,r,t=false;if(v){s={};if(v.type=="radial"||v.type=="linear"){p=parseFloat(v.opacity);p=i(p)?p:1;t=true;u=this._getGradientFill(v);r='<fill xmlns="urn:schemas-microsft.com:vml" class="vmlfill" style="behavior:url(#default#VML);display:inline-block;" opacity="'+p+'"';
for(q in u){if(u.hasOwnProperty(q)){r+=" "+q+'="'+u[q]+'"';}}r+=" />";s.node=r;}else{if(v.color){p=parseFloat(v.opacity);t=true;s.color=v.color;if(i(p)){p=Math.max(Math.min(p,1),0);s.opacity=p;if(p<1){s.node='<fill xmlns="urn:schemas-microsft.com:vml" class="vmlfill" style="behavior:url(#default#VML);display:inline-block;" type="solid" opacity="'+p+'"/>';}}}}s.filled=t;}return s;},_fillChangeHandler:function(u){var r=this.node,t=this.get("fill"),p,q,s=false;if(t){if(t.type=="radial"||t.type=="linear"){s=true;this._setGradientFill(r,t);}else{if(t.color){r.fillcolor=t.color;p=parseFloat(t.opacity);s=true;if(i(p)&&p<1){t.opacity=p;if(this._fillNode){if(this._fillNode.getAttribute("type")!="solid"){this._fillNode.type="solid";}this._fillNode.opacity=p;}else{q='<fill xmlns="urn:schemas-microsft.com:vml" class="vmlfill" style="behavior:url(#default#VML);display:inline-block;" type="solid" opacity="'+p+'"/>';l.create(q);r.appendChild(this._fillNode);}}else{if(this._fillNode){this._fillNode.opacity=1;this._fillNode.type="solid";}}}}}r.filled=s;},_updateFillNode:function(p){if(!this._fillNode){this._fillNode=this._createGraphicNode("fill");p.appendChild(this._fillNode);}},_getGradientFill:function(J){var N={},B,z,y=J.type,C=this.get("width"),M=this.get("height"),D=i,H,A=J.stops,L=A.length,v,I,K=0,E,p="",t=J.cx,q=J.cy,u=J.fx,s=J.fy,F=J.r,x,G=J.rotation||0;if(y==="linear"){if(G>0&&G<=90){G=450-G;}else{if(G<=270){G=270-G;}else{if(G<=360){G=630-G;}else{G=270;}}}N.type="gradient";N.angle=G;}else{if(y==="radial"){B=C*(F*2);z=M*(F*2);u=F*2*(u-0.5);s=F*2*(s-0.5);u+=t;s+=q;N.focussize=(B/C)/10+"% "+(z/M)/10+"%";N.alignshape=false;N.type="gradientradial";N.focus="100%";N.focusposition=Math.round(u*100)+"% "+Math.round(s*100)+"%";}}for(;K<L;++K){H=A[K];I=H.color;v=H.opacity;v=D(v)?v:1;x=H.offset||K/(L-1);x*=(F*2);if(x<=1){x=Math.round(100*x)+"%";E=K>0?K+1:"";N["opacity"+E]=v+"";p+=", "+x+" "+I;}}x=A[1].offset||0;x*=100;if(parseInt(x,10)<100){p+=", 100% "+I;}N.colors=p.substr(2);return N;},_setGradientFill:function(G,K){this._updateFillNode(G);var B,z,y=K.type,C=this.get("width"),N=this.get("height"),D=i,I,A=K.stops,M=A.length,v,J,L=0,E,p="",t=K.cx,q=K.cy,u=K.fx,s=K.fy,F=K.r,x,H=K.rotation||0;if(y==="linear"){if(H>0&&H<=90){H=450-H;}else{if(H<=270){H=270-H;}else{if(H<=360){H=630-H;}else{H=270;}}}this._fillNode.type="gradient";this._fillNode.angle=H;}else{if(y==="radial"){B=C*(F*2);z=N*(F*2);u=F*2*(u-0.5);s=F*2*(s-0.5);u+=t;s+=q;this._fillNode.focussize=(B/C)/10+"% "+(z/N)/10+"%";this._fillNode.alignshape=false;this._fillNode.type="gradientradial";this._fillNode.focus="100%";this._fillNode.focusposition=Math.round(u*100)+"% "+Math.round(s*100)+"%";}}for(;L<M;++L){I=A[L];J=I.color;v=I.opacity;v=D(v)?v:1;x=I.offset||L/(M-1);x*=(F*2);if(x<=1){x=Math.round(100*x)+"%";E=L>0?L+1:"";this._fillNode["opacity"+E]=v+"";p+=", "+x+" "+J;}}x=A[1].offset||0;x*=100;if(parseInt(x,10)<100){p+=", 100% "+J;}this._fillNode.colors.value=p.substr(2);},_addTransform:function(q,p){if(!this._transformArgs){this._transformArgs={};}this._transformArgs[q]=Array.prototype.slice.call(p,0);this._updateTransform();},_updateTransform:function(){var E=this,H=E.node,B,J,A=E.get("x"),z=E.get("y"),D,t,s,M,L,G,F,q,u,C,v,I,r,K,p=E._transformArgs;if(p){B=E.get("width");J=E.get("height");K=H.coordSize;if(p.hasOwnProperty("translate")){t=0-(K.x/B*E._translateX);s=0-(K.y/J*E._translateY);H.coordOrigin=t+","+s;}if(p.hasOwnProperty("rotate")){D=E.get("transformOrigin");M=D[0];L=D[1];G=B*(M-0.5);F=J*(L-0.5);q=Math.abs(E._rotation);u=Math.PI/180;C=parseFloat(parseFloat(Math.sin(q*u)).toFixed(8));v=parseFloat(parseFloat(Math.cos(q*u)).toFixed(8));I=(G*v)-(F*C);r=(G*C)+(F*v);H.style.rotation=E._rotation;A=A+(G-I);z=z+(F-r);}}H.style.left=A+"px";H.style.top=z+"px";this._graphic.addToRedrawQueue(this);},_translateX:0,_translateY:0,translate:function(p,q){this._translateX=p;this._translateY=q;this._addTransform("translate",arguments);},skewX:function(p){},skewY:function(p){},_rotation:0,rotate:function(p){this._rotation=p;this._addTransform("rotate",arguments);},scale:function(p){},matrix:function(q,p,u,t,s,r){},isMouseEvent:function(p){if(p.indexOf("mouse")>-1||p.indexOf("click")>-1){return true;}return false;},before:function(q,p){if(this.isMouseEvent(q)){return a.before(q,p,"#"+this.get("id"));}return a.on.apply(this,arguments);},on:function(q,p){if(this.isMouseEvent(q)){return a.on(q,p,"#"+this.get("id"));}return a.on.apply(this,arguments);},after:function(q,p){if(this.isMouseEvent(q)){return a.after(q,p,"#"+this.get("id"));}return a.on.apply(this,arguments);},_draw:function(){var q=this,p=q.node;if(!p){q.createNode();}else{q._fillChangeHandler();q._strokeChangeHandler();p.style.width=this.get("width")+"px";p.style.height=this.get("height")+"px";}q._updateTransform();},_updateHandler:function(q){var p=this.node;if(p){p.style.visible="hidden";}this._draw();if(p){p.style.visible="visible";}},_createGraphicNode:function(p){p=p||this._type;return l.createElement("<"+p+' xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;" class="vml'+p+'"/>');},_getDefaultFill:function(){return{type:"solid",cx:0.5,cy:0.5,fx:0.5,fy:0.5,r:0.5};},_getDefaultStroke:function(){return{weight:1,dashstyle:"none",color:"#000",opacity:1};},set:function(){var p=this;d.prototype.set.apply(p,arguments);if(p.initialized){p._updateHandler();}},getBounds:function(){var r=this.get("width"),s=this.get("height"),u=this.get("stroke"),q=this.get("x"),v=this.get("y"),p=0,t={};if(u&&u.weight){p=u.weight;}t.left=q-p;t.top=v-p;t.right=q+r+p;t.bottom=v+s+p;return t;},destroy:function(){var p=this._graphic&&this._graphic._node?this._graphic._node:null,q=this.node;if(this.node){if(this._fillNode){q.removeChild(this._fillNode);}if(this._strokeNode){q.removeChild(this._strokeNode);}if(p){p.removeChild(q);}}}});o.ATTRS={transformOrigin:{valueFn:function(){return[0.5,0.5];}},rotation:{setter:function(p){this.rotate(p);},getter:function(){return this._rotation;}},translateX:{getter:function(){return this._translateX;
},setter:function(p){this._translateX=p;this._addTransform("translate",[p,this._translateY]);return p;}},translateY:{getter:function(){return this._translateY;},setter:function(p){this._translateY=p;this._addTransform("translate",[this._translateX,p]);return p;}},x:{value:0},y:{value:0},id:{valueFn:function(){return a.guid();},setter:function(q){var p=this.node;if(p){p.setAttribute("id",q);}return q;}},width:{value:0},height:{value:0},visible:{value:true,setter:function(r){var q=this.node,p=r?"visible":"hidden";if(q){q.style.visibility=p;}return r;}},fill:{valueFn:"_getDefaultFill",setter:function(s){var q,r,p=this.get("fill")||this._getDefaultFill();if(s){if(s.hasOwnProperty("color")){s.type="solid";}for(q in s){if(s.hasOwnProperty(q)){p[q]=s[q];}}}r=p;if(r&&r.color){if(r.color===undefined||r.color=="none"){r.color=null;}}return r;}},stroke:{valueFn:"_getDefaultStroke",setter:function(s){var q,r,p=this.get("stroke")||this._getDefaultStroke();if(s){for(q in s){if(s.hasOwnProperty(q)){p[q]=s[q];}}}r=p;return r;}},autoSize:{value:false},pointerEvents:{value:"visiblePainted"},graphic:{readOnly:true,getter:function(){return this._graphic;}}};a.VMLShape=o;n=function(){n.superclass.constructor.apply(this,arguments);};n.NAME="vmlPath";a.extend(n,a.VMLShape,a.merge(a.VMLDrawing.prototype,{_type:"shape",_draw:function(){var v=this.get("fill"),u=this.get("stroke"),r=this.node,p=this.get("width"),q=this.get("height"),t=this.get("path"),s="";r.style.visible="hidden";this._fillChangeHandler();this._strokeChangeHandler();if(t){if(v&&v.color){s+=" x";}if(u){s+=" e";}}if(t){r.path=t+s;}if(p&&q){r.coordSize=p+", "+q;r.style.position="absolute";r.style.width=p+"px";r.style.height=q+"px";}this._path=t;r.style.visible="visible";this._updateTransform();},end:function(){this._draw();},clear:function(){this._path="";}}));n.ATTRS=a.merge(a.VMLShape.ATTRS,{width:{getter:function(){return this._width;},setter:function(p){this._width=p;return p;}},height:{getter:function(){return this._height;},setter:function(p){this._height=p;return p;}},path:{readOnly:true,getter:function(){return this._path;}}});a.VMLPath=n;j=function(){j.superclass.constructor.apply(this,arguments);};j.NAME="vmlRect";a.extend(j,a.VMLShape,{_type:"rect"});j.ATTRS=a.VMLShape.ATTRS;a.VMLRect=j;m=function(){m.superclass.constructor.apply(this,arguments);};m.NAME="vmlEllipse";a.extend(m,a.VMLShape,{_type:"oval"});m.ATTRS=a.merge(a.VMLShape.ATTRS,{xRadius:{lazyAdd:false,getter:function(){var p=this.get("width");p=Math.round((p/2)*100)/100;return p;},setter:function(q){var p=q*2;this.set("width",p);return q;}},yRadius:{lazyAdd:false,getter:function(){var p=this.get("height");p=Math.round((p/2)*100)/100;return p;},setter:function(q){var p=q*2;this.set("height",p);return q;}}});a.VMLEllipse=m;k=function(p){k.superclass.constructor.apply(this,arguments);};k.NAME="vmlCircle";a.extend(k,o,{_type:"oval"});k.ATTRS=a.merge(o.ATTRS,{radius:{lazyAdd:false,value:0},width:{setter:function(p){this.set("radius",p/2);return p;},getter:function(){var p=this.get("radius"),q=p&&p>0?p*2:0;return q;}},height:{setter:function(p){this.set("radius",p/2);return p;},getter:function(){var p=this.get("radius"),q=p&&p>0?p*2:0;return q;}}});a.VMLCircle=k;VMLPieSlice=function(){VMLPieSlice.superclass.constructor.apply(this,arguments);};VMLPieSlice.NAME="vmlPieSlice";a.extend(VMLPieSlice,a.VMLPath,{_type:"shape",initializer:function(p){var q=this,r=p.graphic;q.createNode();q._graphic=r;q._updateHandler();r.addToRedrawQueue(this);},_updateHandler:function(t){var q=this.get("cx"),u=this.get("cy"),s=this.get("startAngle"),r=this.get("arc"),p=this.get("radius");this.clear();this.drawWedge(q,u,s,r,p);this._draw();}});VMLPieSlice.ATTRS=a.mix(a.VMLPath.ATTRS,{cx:{value:0},cy:{value:0},startAngle:{value:0},arc:{value:0},radius:{value:0}});a.VMLPieSlice=VMLPieSlice;h=function(){h.superclass.constructor.apply(this,arguments);};h.NAME="vmlGraphic";h.ATTRS={render:{},id:{valueFn:function(){return a.guid();},setter:function(q){var p=this._node;if(p){p.setAttribute("id",q);}return q;}},shapes:{readOnly:true,getter:function(){return this._shapes;}},contentBounds:{readOnly:true,getter:function(){return this._contentBounds;}},node:{readOnly:true,getter:function(){return this._node;}},width:{setter:function(p){if(this._node){this._node.style.width=p+"px";}return p;}},height:{setter:function(p){if(this._node){this._node.style.height=p+"px";}return p;}},autoSize:{value:false},resizeDown:{getter:function(){return this._resizeDown;},setter:function(p){this._resizeDown=p;this._redraw();return p;}},x:{getter:function(){return this._x;},setter:function(p){this._x=p;if(this._node){this._node.style.left=p+"px";}return p;}},y:{getter:function(){return this._y;},setter:function(p){this._y=p;if(this._node){this._node.style.top=p+"px";}return p;}},autoDraw:{value:true},visible:{value:true,setter:function(p){this._toggleVisible(p);return p;}}};a.extend(h,a.BaseGraphic,{_x:0,_y:0,getXY:function(){var p=a.one(this._node),q;if(p){q=p.getXY();}return q;},_resizeDown:false,initializer:function(p){var q=this.get("render");this._shapes={};this._contentBounds={left:0,top:0,right:0,bottom:0};this._node=this._createGraphic();this._node.setAttribute("id",this.get("id"));if(q){this.render(q);}},render:function(s){var p=a.one(s),q=this.get("width")||parseInt(p.getComputedStyle("width"),10),r=this.get("height")||parseInt(p.getComputedStyle("height"),10);p=p||l.body;p.appendChild(this._node);this.setSize(q,r);this.parentNode=p;this.set("width",q);this.set("height",r);return this;},destroy:function(){this.clear();this._node.parentNode.removeChild(this._node);},getShape:function(p){p.graphic=this;var q=new this._shapeClass[p.type](p);this.addShape(q);return q;},addShape:function(q){var r=q.node,p=this._frag||this._node;if(this.get("autoDraw")){p.appendChild(r);}else{this._getDocFrag().appendChild(r);}},removeShape:function(p){if(!p instanceof o){if(c.isString(p)){p=this._shapes[p];}}if(p&&p instanceof o){p.destroy();delete this._shapes[p.get("id")];
}if(this.get("autoDraw")){this._redraw();}},removeAllShapes:function(){var p=this._shapes,q;for(q in p){if(p.hasOwnProperty(q)){p[q].destroy();}}this._shapes={};},_removeChildren:function(p){if(p.hasChildNodes()){var q;while(p.firstChild){q=p.firstChild;this._removeChildren(q);p.removeChild(q);}}},clear:function(){this._removeAllShapes();this._removeChildren(this._node);},_toggleVisible:function(s){var r,q=this._shapes,p=s?"visible":"hidden";if(q){for(r in q){if(q.hasOwnProperty(r)){q[r].set("visible",s);}}}this._node.style.visibility=p;},setSize:function(p,q){p=Math.round(p);q=Math.round(q);this._node.style.width=p+"px";this._node.style.height=q+"px";this._node.coordSize=p+" "+q;},setPosition:function(p,q){p=Math.round(p);q=Math.round(q);this._node.style.left=p+"px";this._node.style.top=q+"px";},_createGraphic:function(){var p=l.createElement('<group xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:block;zoom:1;" />');p.style.display="block";p.style.position="absolute";return p;},_createGraphicNode:function(p){return l.createElement("<"+p+' xmlns="urn:schemas-microsft.com:vml" style="behavior:url(#default#VML);display:inline-block;zoom:1;" />');},getShapeById:function(p){return this._shapes[p];},_shapeClass:{circle:a.VMLCircle,rect:a.VMLRect,path:a.VMLPath,ellipse:a.VMLEllipse,pieslice:a.VMLPieSlice},batch:function(q){var p=this.get("autoDraw");this.set("autoDraw",false);q.apply();this._redraw();this.set("autoDraw",p);},_getDocFrag:function(){if(!this._frag){this._frag=l.createDocumentFragment();}return this._frag;},addToRedrawQueue:function(p){var r,q;this._shapes[p.get("id")]=p;if(!this.get("resizeDown")){r=p.getBounds();q=this._contentBounds;q.left=q.left<r.left?q.left:r.left;q.top=q.top<r.top?q.top:r.top;q.right=q.right>r.right?q.right:r.right;q.bottom=q.bottom>r.bottom?q.bottom:r.bottom;q.width=q.right-q.left;q.height=q.bottom-q.top;this._contentBounds=q;}if(this.get("autoDraw")){this._redraw();}},_redraw:function(){var p=this.get("resizeDown")?this._getUpdatedContentBounds():this._contentBounds;if(this.get("autoSize")){this.setSize(p.right,p.bottom);}if(this._frag){this._node.appendChild(this._frag);this._frag=null;}},_getUpdatedContentBounds:function(){var t,r,q,p=this._shapes,s={left:0,top:0,right:0,bottom:0};for(r in p){if(p.hasOwnProperty(r)){q=p[r];t=q.getBounds();s.left=Math.min(s.left,t.left);s.top=Math.min(s.top,t.top);s.right=Math.max(s.right,t.right);s.bottom=Math.max(s.bottom,t.bottom);}}s.width=s.right-s.left;s.height=s.bottom-s.top;this._contentBounds=s;return s;}});a.VMLGraphic=h;},"@VERSION@",{requires:["graphics"],skinnable:false});