~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/yui/build/graphics-svg/graphics-svg-min.js

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
YUI 3.5.0 (build 5089)
3
 
Copyright 2012 Yahoo! Inc. All rights reserved.
4
 
Licensed under the BSD License.
5
 
http://yuilibrary.com/license/
6
 
*/
7
 
YUI.add("graphics-svg",function(b){var i="svgShape",c=b.Lang,g=b.AttributeLite,d,l,f,h,k,e,j,m=b.config.doc;function a(){}a.prototype={_type:"path",curveTo:function(s,q,z,w,v,u){var o,t,r,n,p,A;if(this._pathType!=="C"){this._pathType="C";t=["C"];this._pathArray.push(t);}else{t=this._pathArray[Math.max(0,this._pathArray.length-1)];if(!t){t=[];this._pathArray.push(t);}}o=this._pathArray.length-1;this._pathArray[o]=this._pathArray[o].concat([Math.round(s),Math.round(q),Math.round(z),Math.round(w),v,u]);r=Math.max(v,Math.max(s,z));p=Math.max(u,Math.max(q,w));n=Math.min(v,Math.min(s,z));A=Math.min(u,Math.min(q,w));this._trackSize(r,p);this._trackSize(n,A);},quadraticCurveTo:function(s,r,v,u){var o,t,q,n,p,w;if(this._pathType!=="Q"){this._pathType="Q";t=["Q"];this._pathArray.push(t);}else{t=this._pathArray[Math.max(0,this._pathArray.length-1)];if(!t){t=[];this._pathArray.push(t);}}o=this._pathArray.length-1;this._pathArray[o]=this._pathArray[o].concat([Math.round(s),Math.round(r),Math.round(v),Math.round(u)]);q=Math.max(v,s);p=Math.max(u,r);n=Math.min(v,s);w=Math.min(u,r);this._trackSize(q,p);this._trackSize(n,w);},drawRect:function(n,q,o,p){this.moveTo(n,q);this.lineTo(n+o,q);this.lineTo(n+o,q+p);this.lineTo(n,q+p);this.lineTo(n,q);},drawRoundRect:function(n,s,o,q,p,r){this.moveTo(n,s+r);this.lineTo(n,s+q-r);this.quadraticCurveTo(n,s+q,n+p,s+q);this.lineTo(n+o-p,s+q);this.quadraticCurveTo(n+o,s+q,n+o,s+q-r);this.lineTo(n+o,s+r);this.quadraticCurveTo(n+o,s,n+o-p,s);this.lineTo(n+p,s);this.quadraticCurveTo(n,s,n,s+r);},drawCircle:function(o,q,n){var p=n*2;this._drawingComplete=false;this._trackSize(o,q);this._trackSize(o+p,q+p);this._pathArray=this._pathArray||[];this._pathArray.push(["M",o+n,q]);this._pathArray.push(["A",n,n,0,1,0,o+n,q+p]);this._pathArray.push(["A",n,n,0,1,0,o+n,q]);return this;},drawEllipse:function(p,s,q,r){var o=q*0.5,n=r*0.5;this._drawingComplete=false;this._trackSize(p,s);this._trackSize(p+q,s+r);this._pathArray=this._pathArray||[];this._pathArray.push(["M",p+o,s]);this._pathArray.push(["A",o,n,0,1,0,p+o,s+r]);this._pathArray.push(["A",o,n,0,1,0,p+o,s]);return this;},drawDiamond:function(o,s,r,n){var q=r*0.5,p=n*0.5;this.moveTo(o+q,s);this.lineTo(o+r,s+p);this.lineTo(o+q,s+n);this.lineTo(o,s+p);this.lineTo(o+q,s);return this;},drawWedge:function(A,v,F,u,q,r){var E,D,t,J,s,B,z,I,H,p,o,G=0,w=q*2,n,C;r=r||q;if(this._pathType!="M"){this._pathType="M";n=["M"];this._pathArray.push(n);}else{n=this._getCurrentArray();}C=this._pathArray.length-1;this._pathArray[C].push(A);this._pathArray[C].push(A);if(Math.abs(u)>360){u=360;}E=Math.ceil(Math.abs(u)/45);D=u/E;t=-(D/180)*Math.PI;J=(F/180)*Math.PI;if(E>0){B=A+Math.cos(F/180*Math.PI)*q;z=v+Math.sin(F/180*Math.PI)*r;this._pathType="L";C++;this._pathArray[C]=["L"];this._pathArray[C].push(Math.round(B));this._pathArray[C].push(Math.round(z));C++;this._pathType="Q";this._pathArray[C]=["Q"];for(;G<E;++G){J+=t;s=J-(t/2);I=A+Math.cos(J)*q;H=v+Math.sin(J)*r;p=A+Math.cos(s)*(q/Math.cos(t/2));o=v+Math.sin(s)*(r/Math.cos(t/2));this._pathArray[C].push(Math.round(p));this._pathArray[C].push(Math.round(o));this._pathArray[C].push(Math.round(I));this._pathArray[C].push(Math.round(H));}}this._trackSize(w,w);return this;},lineTo:function(s,r,p){var o=arguments,q,n,u,t;this._pathArray=this._pathArray||[];if(typeof s==="string"||typeof s==="number"){o=[[s,r]];}n=o.length;this._shapeType="path";if(this._pathType!=="L"){this._pathType="L";t=["L"];this._pathArray.push(t);}else{t=this._getCurrentArray();}u=this._pathArray.length-1;for(q=0;q<n;++q){this._pathArray[u].push(o[q][0]);this._pathArray[u].push(o[q][1]);this._trackSize.apply(this,o[q]);}},_getCurrentArray:function(){var n=this._pathArray[Math.max(0,this._pathArray.length-1)];if(!n){n=[];this._pathArray.push(n);}return n;},moveTo:function(n,q){var p,o;this._pathArray=this._pathArray||[];this._pathType="M";o=["M"];this._pathArray.push(o);p=this._pathArray.length-1;this._pathArray[p]=this._pathArray[p].concat([n,q]);this._trackSize(n,q);},end:function(){this._closePath();this._graphic.addToRedrawQueue(this);},clear:function(){this._width=0;this._height=0;this._left=0;this._right=0;this._top=0;this._bottom=0;this._pathArray=[];this._path="";},_closePath:function(){var o,s,n,v,p,u,t,y="",r=this.node,q=this._left,w=this._top,x=this.get("fill");if(this._pathArray){o=this._pathArray.concat();while(o&&o.length>0){s=o.shift();v=s.length;n=s[0];if(n==="A"){y+=n+s[1]+","+s[2];}else{if(n!="z"){y+=" "+n+(s[1]-q);}else{y+=" z ";}}switch(n){case"L":case"M":case"Q":for(t=2;t<v;++t){p=(t%2===0)?w:q;p=s[t]-p;y+=", "+p;}break;case"A":p=" "+s[3]+" "+s[4];p+=","+s[5]+" "+(s[6]-q);p+=","+(s[7]-w);y+=" "+p;break;case"C":for(t=2;t<v;++t){p=(t%2===0)?w:q;u=s[t];u-=p;y+=" "+u;}break;}}if(x&&x.color){y+="z";}if(y){r.setAttribute("d",y);}this._path=y;this._fillChangeHandler();this._strokeChangeHandler();this._updateTransform();}},closePath:function(){this._pathArray.push(["z"]);},_trackSize:function(n,o){if(n>this._right){this._right=n;}if(n<this._left){this._left=n;}if(o<this._top){this._top=o;}if(o>this._bottom){this._bottom=o;}this._width=this._right-this._left;this._height=this._bottom-this._top;}};b.SVGDrawing=a;l=function(n){this._transforms=[];this.matrix=new b.Matrix();this._normalizedMatrix=new b.Matrix();l.superclass.constructor.apply(this,arguments);};l.NAME="svgShape";b.extend(l,b.GraphicBase,b.mix({init:function(){this.initializer.apply(this,arguments);},initializer:function(n){var o=this,p=n.graphic;o.createNode();if(p){o._setGraphic(p);}o._updateHandler();},_setGraphic:function(n){var o;if(n instanceof b.SVGGraphic){this._graphic=n;}else{n=b.one(n);o=new b.SVGGraphic({render:n});o._appendShape(this);this._graphic=o;}},addClass:function(n){var o=this.node;o.className.baseVal=c.trim([o.className.baseVal,n].join(" "));},removeClass:function(n){var o=this.node,p=o.className.baseVal;p=p.replace(new RegExp(n+" "),n).replace(new RegExp(n),"");o.className.baseVal=p;},getXY:function(){var q=this._graphic,o=q.getXY(),n=this.get("x"),p=this.get("y");
8
 
return[o[0]+n,o[1]+p];},setXY:function(o){var p=this._graphic,n=p.getXY();this.set("x",o[0]-n[0]);this.set("y",o[1]-n[1]);},contains:function(n){return n===b.one(this.node);},compareTo:function(n){var o=this.node;return o===n;},test:function(n){return b.Selector.test(this.node,n);},_getDefaultFill:function(){return{type:"solid",opacity:1,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};},createNode:function(){var n=m.createElementNS("http://www.w3.org/2000/svg","svg:"+this._type),p=this.get("id"),o=this.get("pointerEvents");this.node=n;this.addClass("yui3-"+i+" yui3-"+this.name);if(p){n.setAttribute("id",p);}if(o){n.setAttribute("pointer-events",o);}if(!this.get("visible")){b.one(n).setStyle("visibility","hidden");}},on:function(o,n){if(b.Node.DOM_EVENTS[o]){return b.one("#"+this.get("id")).on(o,n);}return b.on.apply(this,arguments);},_strokeChangeHandler:function(s){var q=this.node,r=this.get("stroke"),p,n,t,o;if(r&&r.weight&&r.weight>0){o=r.linejoin||"round";p=parseFloat(r.opacity);n=r.dashstyle||"none";t=c.isArray(n)?n.toString():n;r.color=r.color||"#000000";r.weight=r.weight||1;r.opacity=c.isNumber(p)?p:1;r.linecap=r.linecap||"butt";q.setAttribute("stroke-dasharray",t);q.setAttribute("stroke",r.color);q.setAttribute("stroke-linecap",r.linecap);q.setAttribute("stroke-width",r.weight);q.setAttribute("stroke-opacity",r.opacity);if(o=="round"||o=="bevel"){q.setAttribute("stroke-linejoin",o);}else{o=parseInt(o,10);if(c.isNumber(o)){q.setAttribute("stroke-miterlimit",Math.max(o,1));q.setAttribute("stroke-linejoin","miter");}}}else{q.setAttribute("stroke","none");}},_fillChangeHandler:function(r){var p=this.node,q=this.get("fill"),n,o;if(q){o=q.type;if(o=="linear"||o=="radial"){this._setGradientFill(q);p.setAttribute("fill","url(#grad"+this.get("id")+")");}else{if(!q.color){p.setAttribute("fill","none");}else{n=parseFloat(q.opacity);n=c.isNumber(n)?n:1;p.setAttribute("fill",q.color);p.setAttribute("fill-opacity",n);}}}else{p.setAttribute("fill","none");}},_setGradientFill:function(N){var z,v,L,H,p,E=c.isNumber,D=this._graphic,x=N.type,K=D.getGradientNode("grad"+this.get("id"),x),A=N.stops,B=this.get("width"),R=this.get("height"),J=N.rotation,y=Math.PI/180,G=parseFloat(parseFloat(Math.tan(J*y)).toFixed(8)),O,Q,C,I,S="0%",P="100%",t="0%",o="0%",s=N.cx,n=N.cy,u=N.fx,q=N.fy,F=N.r,M=[];if(x=="linear"){s=B/2;n=R/2;if(Math.abs(G)*B/2>=R/2){if(J<180){t=0;o=R;}else{t=R;o=0;}S=s-((n-t)/G);P=s-((n-o)/G);}else{if(J>90&&J<270){S=B;P=0;}else{S=0;P=B;}t=((G*(s-S))-n)*-1;o=((G*(s-P))-n)*-1;}K.setAttribute("spreadMethod","pad");K.setAttribute("width",B);K.setAttribute("height",R);K.setAttribute("x1",Math.round(100*S/B)+"%");K.setAttribute("y1",Math.round(100*t/R)+"%");K.setAttribute("x2",Math.round(100*P/B)+"%");K.setAttribute("y2",Math.round(100*o/R)+"%");}else{K.setAttribute("cx",(s*100)+"%");K.setAttribute("cy",(n*100)+"%");K.setAttribute("fx",(u*100)+"%");K.setAttribute("fy",(q*100)+"%");K.setAttribute("r",(F*100)+"%");}Q=A.length;C=0;for(O=0;O<Q;++O){if(this._stops&&this._stops.length>0){H=this._stops.shift();p=false;}else{H=D._createGraphicNode("stop");p=true;}I=A[O];v=I.opacity;L=I.color;z=I.offset||O/(Q-1);z=Math.round(z*100)+"%";v=E(v)?v:1;v=Math.max(0,Math.min(1,v));C=(O+1)/Q;H.setAttribute("offset",z);H.setAttribute("stop-color",L);H.setAttribute("stop-opacity",v);if(p){K.appendChild(H);}M.push(H);}while(this._stops&&this._stops.length>0){K.removeChild(this._stops.shift());}this._stops=M;},_stops:null,set:function(){var n=this;g.prototype.set.apply(n,arguments);if(n.initialized){n._updateHandler();}},translate:function(n,o){this._addTransform("translate",arguments);},translateX:function(n){this._addTransform("translateX",arguments);},translateY:function(n){this._addTransform("translateY",arguments);},skew:function(n,o){this._addTransform("skew",arguments);},skewX:function(n){this._addTransform("skewX",arguments);},skewY:function(n){this._addTransform("skewY",arguments);},rotate:function(n){this._addTransform("rotate",arguments);},scale:function(n,o){this._addTransform("scale",arguments);},_addTransform:function(o,n){n=b.Array(n);this._transform=c.trim(this._transform+" "+o+"("+n.join(", ")+")");n.unshift(o);this._transforms.push(n);if(this.initialized){this._updateTransform();}},_updateTransform:function(){var v=this._type=="path",p=this.node,B,o,r,A,w,t,q,z=this.matrix,n=this._normalizedMatrix,s=0,u=this._transforms.length;if(v||(this._transforms&&this._transforms.length>0)){A=this.get("x");w=this.get("y");r=this.get("transformOrigin");t=A+(r[0]*this.get("width"));q=w+(r[1]*this.get("height"));if(v){if(!(this instanceof b.SVGPath)){t=this._left+(r[0]*this.get("width"));q=this._top+(r[1]*this.get("height"));}n.init({dx:A+this._left,dy:w+this._top});}n.translate(t,q);for(;s<u;++s){B=this._transforms[s].shift();if(B){n[B].apply(n,this._transforms[s]);z[B].apply(z,this._transforms[s]);}if(v){this._transforms[s].unshift(B);}}n.translate(-t,-q);o="matrix("+n.a+","+n.b+","+n.c+","+n.d+","+n.dx+","+n.dy+")";}this._graphic.addToRedrawQueue(this);if(o){p.setAttribute("transform",o);}if(!v){this._transforms=[];}},_draw:function(){var n=this.node;n.setAttribute("width",this.get("width"));n.setAttribute("height",this.get("height"));n.setAttribute("x",this.get("x"));n.setAttribute("y",this.get("y"));n.style.left=this.get("x")+"px";n.style.top=this.get("y")+"px";this._fillChangeHandler();this._strokeChangeHandler();this._updateTransform();},_updateHandler:function(n){this._draw();},_transform:"",getBounds:function(){var r=this._type,s=this.get("stroke"),p=this.get("width"),q=this.get("height"),o=r=="path"?0:this.get("x"),t=r=="path"?0:this.get("y"),n=0;if(s&&s.weight){n=s.weight;}p=(o+p+n)-(o-n);q=(t+q+n)-(t-n);o-=n;t-=n;return this._normalizedMatrix.getContentRect(p,q,o,t);},destroy:function(){var n=this.get("graphic");if(n){n.removeShape(this);}else{this._destroy();}},_destroy:function(){if(this.node){b.Event.purgeElement(this.node,true);
9
 
if(this.node.parentNode){this.node.parentNode.removeChild(this.node);}this.node=null;}}},b.SVGDrawing.prototype));l.ATTRS={transformOrigin:{valueFn:function(){return[0.5,0.5];}},transform:{setter:function(n){this.matrix.init();this._normalizedMatrix.init();this._transforms=this.matrix.getTransformArray(n);this._transform=n;if(this.initialized){this._updateTransform();}return n;},getter:function(){return this._transform;}},id:{valueFn:function(){return b.guid();},setter:function(o){var n=this.node;if(n){n.setAttribute("id",o);}return o;}},x:{value:0},y:{value:0},width:{value:0},height:{value:0},visible:{value:true,setter:function(o){var n=o?"visible":"hidden";if(this.node){this.node.style.visibility=n;}return o;}},fill:{valueFn:"_getDefaultFill",setter:function(p){var o,n=this.get("fill")||this._getDefaultFill();o=(p)?b.merge(n,p):null;if(o&&o.color){if(o.color===undefined||o.color=="none"){o.color=null;}}return o;}},stroke:{valueFn:"_getDefaultStroke",setter:function(p){var o=this.get("stroke")||this._getDefaultStroke(),n;if(p&&p.hasOwnProperty("weight")){n=parseInt(p.weight,10);if(!isNaN(n)){p.weight=n;}}return(p)?b.merge(o,p):null;}},autoSize:{value:false},pointerEvents:{valueFn:function(){var o="visiblePainted",n=this.node;if(n){n.setAttribute("pointer-events",o);}return o;},setter:function(o){var n=this.node;if(n){n.setAttribute("pointer-events",o);}return o;}},gradientNode:{setter:function(n){if(c.isString(n)){n=this._graphic.getGradientNode("linear",n);}return n;}},autoDraw:{getter:function(){return this._graphic.autoDraw;}},node:{readOnly:true,getter:function(){return this.node;}},graphic:{readOnly:true,getter:function(){return this._graphic;}}};b.SVGShape=l;k=function(n){k.superclass.constructor.apply(this,arguments);};k.NAME="svgPath";b.extend(k,b.SVGShape,{_left:0,_right:0,_top:0,_bottom:0,_type:"path",_path:""});k.ATTRS=b.merge(b.SVGShape.ATTRS,{path:{readOnly:true,getter:function(){return this._path;}},width:{getter:function(){var n=Math.max(this._right-this._left,0);return n;}},height:{getter:function(){return Math.max(this._bottom-this._top,0);}}});b.SVGPath=k;h=function(){h.superclass.constructor.apply(this,arguments);};h.NAME="svgRect";b.extend(h,b.SVGShape,{_type:"rect"});h.ATTRS=b.SVGShape.ATTRS;b.SVGRect=h;e=function(n){e.superclass.constructor.apply(this,arguments);};e.NAME="svgEllipse";b.extend(e,l,{_type:"ellipse",_draw:function(){var n=this.node,v=this.get("width"),q=this.get("height"),u=this.get("x"),s=this.get("y"),t=v*0.5,r=q*0.5,p=u+t,o=s+r;n.setAttribute("rx",t);n.setAttribute("ry",r);n.setAttribute("cx",p);n.setAttribute("cy",o);this._fillChangeHandler();this._strokeChangeHandler();this._updateTransform();}});e.ATTRS=b.merge(l.ATTRS,{xRadius:{setter:function(n){this.set("width",n/2);},getter:function(){var n=this.get("width");if(n){n*=0.5;}return n;}},yRadius:{setter:function(n){this.set("height",n/2);},getter:function(){var n=this.get("height");if(n){n*=0.5;}return n;}}});b.SVGEllipse=e;f=function(n){f.superclass.constructor.apply(this,arguments);};f.NAME="svgCircle";b.extend(f,b.SVGShape,{_type:"circle",_draw:function(){var q=this.node,p=this.get("x"),s=this.get("y"),o=this.get("radius"),n=p+o,r=s+o;q.setAttribute("r",o);q.setAttribute("cx",n);q.setAttribute("cy",r);this._fillChangeHandler();this._strokeChangeHandler();this._updateTransform();}});f.ATTRS=b.merge(b.SVGShape.ATTRS,{width:{setter:function(n){this.set("radius",n/2);return n;},getter:function(){return this.get("radius")*2;}},height:{setter:function(n){this.set("radius",n/2);return n;},getter:function(){return this.get("radius")*2;}},radius:{value:0}});b.SVGCircle=f;j=function(){j.superclass.constructor.apply(this,arguments);};j.NAME="svgPieSlice";b.extend(j,b.SVGShape,b.mix({_type:"path",_draw:function(r){var o=this.get("cx"),s=this.get("cy"),q=this.get("startAngle"),p=this.get("arc"),n=this.get("radius");this.clear();this.drawWedge(o,s,q,p,n);this.end();}},b.SVGDrawing.prototype));j.ATTRS=b.mix({cx:{value:0},cy:{value:0},startAngle:{value:0},arc:{value:0},radius:{value:0}},b.SVGShape.ATTRS);b.SVGPieSlice=j;d=function(n){d.superclass.constructor.apply(this,arguments);};d.NAME="svgGraphic";d.ATTRS={render:{},id:{valueFn:function(){return b.guid();},setter:function(o){var n=this._node;if(n){n.setAttribute("id",o);}return o;}},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(n){if(this._node){this._node.style.width=n+"px";}return n;}},height:{setter:function(n){if(this._node){this._node.style.height=n+"px";}return n;}},autoSize:{value:false},resizeDown:{getter:function(){return this._resizeDown;},setter:function(n){this._resizeDown=n;if(this._contentNode){this._redraw();}return n;}},x:{getter:function(){return this._x;},setter:function(n){this._x=n;if(this._node){this._node.style.left=n+"px";}return n;}},y:{getter:function(){return this._y;},setter:function(n){this._y=n;if(this._node){this._node.style.top=n+"px";}return n;}},autoDraw:{value:true},visible:{value:true,setter:function(n){this._toggleVisible(n);return n;}},pointerEvents:{value:"none"}};b.extend(d,b.GraphicBase,{_x:0,_y:0,getXY:function(){var n=b.one(this._node),o;if(n){o=n.getXY();}return o;},_resizeDown:false,initializer:function(){var n=this.get("render");this._shapes={};this._contentBounds={left:0,top:0,right:0,bottom:0};this._gradients={};this._node=m.createElement("div");this._node.style.position="absolute";this._node.style.left=this.get("x")+"px";this._node.style.top=this.get("y")+"px";this._contentNode=this._createGraphics();this._contentNode.setAttribute("id",this.get("id"));this._node.appendChild(this._contentNode);if(n){this.render(n);}},render:function(q){var n=b.one(q),o=this.get("width")||parseInt(n.getComputedStyle("width"),10),p=this.get("height")||parseInt(n.getComputedStyle("height"),10);n=n||b.one(m.body);n.append(this._node);this.parentNode=n;this.set("width",o);
10
 
this.set("height",p);return this;},destroy:function(){this.removeAllShapes();if(this._contentNode){this._removeChildren(this._contentNode);if(this._contentNode.parentNode){this._contentNode.parentNode.removeChild(this._contentNode);}this._contentNode=null;}if(this._node){this._removeChildren(this._node);b.one(this._node).remove(true);this._node=null;}},addShape:function(n){n.graphic=this;var p=this._getShapeClass(n.type),o=new p(n);this._appendShape(o);return o;},_appendShape:function(o){var p=o.node,n=this._frag||this._contentNode;if(this.get("autoDraw")){n.appendChild(p);}else{this._getDocFrag().appendChild(p);}},removeShape:function(n){if(!(n instanceof l)){if(c.isString(n)){n=this._shapes[n];}}if(n&&n instanceof l){n._destroy();delete this._shapes[n.get("id")];}if(this.get("autoDraw")){this._redraw();}return n;},removeAllShapes:function(){var n=this._shapes,o;for(o in n){if(n.hasOwnProperty(o)){n[o]._destroy();}}this._shapes={};},_removeChildren:function(n){if(n.hasChildNodes()){var o;while(n.firstChild){o=n.firstChild;this._removeChildren(o);n.removeChild(o);}}},clear:function(){this.removeAllShapes();},_toggleVisible:function(q){var p,o=this._shapes,n=q?"visible":"hidden";if(o){for(p in o){if(o.hasOwnProperty(p)){o[p].set("visible",q);}}}this._contentNode.style.visibility=n;this._node.style.visibility=n;},_getShapeClass:function(o){var n=this._shapeClass[o];if(n){return n;}return o;},_shapeClass:{circle:b.SVGCircle,rect:b.SVGRect,path:b.SVGPath,ellipse:b.SVGEllipse,pieslice:b.SVGPieSlice},getShapeById:function(o){var n=this._shapes[o];return n;},batch:function(o){var n=this.get("autoDraw");this.set("autoDraw",false);o();this._redraw();this.set("autoDraw",n);},_getDocFrag:function(){if(!this._frag){this._frag=m.createDocumentFragment();}return this._frag;},_redraw:function(){var n=this.get("resizeDown")?this._getUpdatedContentBounds():this._contentBounds;if(this._contentNode){this._contentNode.style.left=n.left+"px";this._contentNode.style.top=n.top+"px";this._contentNode.setAttribute("width",n.width);this._contentNode.setAttribute("height",n.height);this._contentNode.style.width=n.width+"px";this._contentNode.style.height=n.height+"px";this._contentNode.setAttribute("viewBox",""+n.left+" "+n.top+" "+n.width+" "+n.height+"");}if(this.get("autoSize")){this.set("width",n.right);this.set("height",n.bottom);}if(this._frag){if(this._contentNode){this._contentNode.appendChild(this._frag);}this._frag=null;}},addToRedrawQueue:function(n){var p,o;this._shapes[n.get("id")]=n;if(!this.get("resizeDown")){p=n.getBounds();o=this._contentBounds;o.left=o.left<p.left?o.left:p.left;o.top=o.top<p.top?o.top:p.top;o.right=o.right>p.right?o.right:p.right;o.bottom=o.bottom>p.bottom?o.bottom:p.bottom;o.width=o.right-o.left;o.height=o.bottom-o.top;this._contentBounds=o;}if(this.get("autoDraw")){this._redraw();}},_getUpdatedContentBounds:function(){var r,p,o,n=this._shapes,q={left:0,top:0,right:0,bottom:0};for(p in n){if(n.hasOwnProperty(p)){o=n[p];r=o.getBounds();q.left=Math.min(q.left,r.left);q.top=Math.min(q.top,r.top);q.right=Math.max(q.right,r.right);q.bottom=Math.max(q.bottom,r.bottom);}}q.width=q.right-q.left;q.height=q.bottom-q.top;this._contentBounds=q;return q;},_createGraphics:function(){var n=this._createGraphicNode("svg"),o=this.get("pointerEvents");n.style.position="absolute";n.style.top="0px";n.style.left="0px";n.style.overflow="auto";n.setAttribute("overflow","auto");n.setAttribute("pointer-events",o);return n;},_createGraphicNode:function(p,n){var q=m.createElementNS("http://www.w3.org/2000/svg","svg:"+p),o=n||"none";if(p!=="defs"&&p!=="stop"&&p!=="linearGradient"&&p!="radialGradient"){q.setAttribute("pointer-events",o);}return q;},getGradientNode:function(p,q){var n=this._gradients,r,o=q+"Gradient";if(n.hasOwnProperty(p)&&n[p].tagName.indexOf(q)>-1){r=this._gradients[p];}else{r=this._createGraphicNode(o);if(!this._defs){this._defs=this._createGraphicNode("defs");this._contentNode.appendChild(this._defs);}this._defs.appendChild(r);p=p||"gradient"+Math.round(100000*Math.random());r.setAttribute("id",p);if(n.hasOwnProperty(p)){this._defs.removeChild(n[p]);}n[p]=r;}return r;}});b.SVGGraphic=d;},"3.5.0",{skinnable:false,requires:["graphics"]});
 
 
b'\\ No newline at end of file'