text: /* Copyright Factmint Ltd, not for distribution without consent; version 3.0.8*/
  /*
   almond 0.3.2 Copyright jQuery Foundation and other contributors.
   Released under MIT license, http://github.com/requirejs/almond/LICENSE
  */
  var requirejs,require,define;
  (function(m){function h(a,f){var b,C,c,d,e,g,k,h,q,p=f&&f.split("/"),m=x.map,r=m&&m["*"]||{};if(a){a=a.split("/");e=a.length-1;x.nodeIdCompat&&A.test(a[e])&&(a[e]=a[e].replace(A,""));"."===a[0].charAt(0)&&p&&(e=p.slice(0,p.length-1),a=e.concat(a));for(e=0;e<a.length;e++)b=a[e],"."===b?(a.splice(e,1),--e):".."===b&&0!==e&&(1!==e||".."!==a[2])&&".."!==a[e-1]&&0<e&&(a.splice(e-1,2),e-=2);a=a.join("/")}if((p||r)&&m){b=a.split("/");for(e=b.length;0<e;--e){C=b.slice(0,e).join("/");if(p)for(q=p.length;0<
  q;--q)if(c=m[p.slice(0,q).join("/")])if(c=c[C]){d=c;g=e;break}if(d)break;!k&&r&&r[C]&&(k=r[C],h=e)}!d&&k&&(d=k,g=h);d&&(b.splice(0,g,d),a=b.join("/"))}return a}function g(a,f){return function(){var b=v.call(arguments,0);"string"!==typeof b[0]&&1===b.length&&b.push(null);return w.apply(m,b.concat([a,f]))}}function d(a){return function(f){return h(f,a)}}function c(a){return function(f){t[a]=f}}function k(a){if(y.call(u,a)){var f=u[a];delete u[a];b[a]=!0;r.apply(m,f)}if(!y.call(t,a)&&!y.call(b,a))throw Error("No "+
  a);return t[a]}function q(a){var f,b=a?a.indexOf("!"):-1;-1<b&&(f=a.substring(0,b),a=a.substring(b+1,a.length));return[f,a]}function e(a){return function(){return x&&x.config&&x.config[a]||{}}}var r,w,n,p,t={},u={},x={},b={},y=Object.prototype.hasOwnProperty,v=[].slice,A=/\.js$/;n=function(a,b){var l,C=q(a),c=C[0];a=C[1];c&&(c=h(c,b),l=k(c));c?a=l&&l.normalize?l.normalize(a,d(b)):h(a,b):(a=h(a,b),C=q(a),c=C[0],a=C[1],c&&(l=k(c)));return{f:c?c+"!"+a:a,n:a,pr:c,p:l}};p={require:function(a){return g(a)},
  exports:function(a){var b=t[a];return"undefined"!==typeof b?b:t[a]={}},module:function(a){return{id:a,uri:"",exports:t[a],config:e(a)}}};r=function(a,f,l,C){var d,e,h,q,r=[];e=typeof l;var w;C=C||a;if("undefined"===e||"function"===e){f=!f.length&&l.length?["require","exports","module"]:f;for(q=0;q<f.length;q+=1)if(h=n(f[q],C),e=h.f,"require"===e)r[q]=p.require(a);else if("exports"===e)r[q]=p.exports(a),w=!0;else if("module"===e)d=r[q]=p.module(a);else if(y.call(t,e)||y.call(u,e)||y.call(b,e))r[q]=
  k(e);else if(h.p)h.p.load(h.n,g(C,!0),c(e),{}),r[q]=t[e];else throw Error(a+" missing "+e);f=l?l.apply(t[a],r):void 0;a&&(d&&d.exports!==m&&d.exports!==t[a]?t[a]=d.exports:f===m&&w||(t[a]=f))}else a&&(t[a]=l)};requirejs=require=w=function(a,b,l,C,c){if("string"===typeof a)return p[a]?p[a](b):k(n(a,b).f);if(!a.splice){x=a;x.deps&&w(x.deps,x.callback);if(!b)return;b.splice?(a=b,b=l,l=null):a=m}b=b||function(){};"function"===typeof l&&(l=C,C=c);C?r(m,a,b,l):setTimeout(function(){r(m,a,b,l)},4);return w};
  w.config=function(a){return w(a)};requirejs._defined=t;define=function(a,b,l){if("string"!==typeof a)throw Error("See almond README: incorrect module build, no module name");b.splice||(l=b,b=[]);y.call(t,a)||y.call(u,a)||(u[a]=[a,b,l])};define.amd={jQuery:!0}})();define("almond",function(){});
  (function(m,h){"function"===typeof define&&define.amd?define("svg-js",[],function(){return h(m,m.document)}):"object"===typeof exports?module.exports=m.document?h(m,m.document):function(g){return h(g,g.document)}:m.SVG=h(m,m.document)})("undefined"!==typeof window?window:this,function(m,h){function g(a){return a.toLowerCase().replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function d(a){return a.charAt(0).toUpperCase()+a.slice(1)}function c(a){return 4==a.length?["#",a.substring(1,2),a.substring(1,
  2),a.substring(2,3),a.substring(2,3),a.substring(3,4),a.substring(3,4)].join(""):a}function k(a){a=a.toString(16);return 1==a.length?"0"+a:a}function q(a,b,l){null==l?l=a.height/a.width*b:null==b&&(b=a.width/a.height*l);return{width:b,height:l}}function e(a){return{a:a[0],b:a[1],c:a[2],d:a[3],e:a[4],f:a[5]}}function r(a){a instanceof b.Matrix||(a=new b.Matrix(a));return a}function w(a,b){a.cx=null==a.cx?b.bbox().cx:a.cx;a.cy=null==a.cy?b.bbox().cy:a.cy}function n(a){a=a.replace(b.regex.whitespace,
  "").replace(b.regex.matrix,"").split(b.regex.matrixElements);return e(b.utils.map(a,function(a){return parseFloat(a)}))}function p(a,f){return"number"==typeof a.from?a.from+(a.to-a.from)*f:a instanceof b.Color||a instanceof b.Number||a instanceof b.Matrix?a.at(f):1>f?a.from:a.to}function t(a){for(var f=a.childNodes.length-1;0<=f;f--)a.childNodes[f]instanceof SVGElement&&t(a.childNodes[f]);return b.adopt(a).id(b.eid(a.nodeName))}function u(a){null==a.x&&(a.x=0,a.y=0,a.width=0,a.height=0);a.w=a.width;
  a.h=a.height;a.x2=a.x+a.width;a.y2=a.y+a.height;a.cx=a.x+a.width/2;a.cy=a.y+a.height/2;return a}function x(a){if(a=a.toString().match(b.regex.reference))return a[1]}var b=this.SVG=function(a){if(b.supported)return a=new b.Doc(a),b.parser||b.prepare(a),a};b.ns="http://www.w3.org/2000/svg";b.xmlns="http://www.w3.org/2000/xmlns/";b.xlink="http://www.w3.org/1999/xlink";b.svgjs="http://svgjs.com/svgjs";b.supported=!!h.createElementNS&&!!h.createElementNS(b.ns,"svg").createSVGRect;if(!b.supported)return!1;
  b.did=1E3;b.eid=function(a){return"Svgjs"+d(a)+b.did++};b.create=function(a){var b=h.createElementNS(this.ns,a);b.setAttribute("id",this.eid(a));return b};b.extend=function(){var a,f,l,c;a=[].slice.call(arguments);f=a.pop();for(c=a.length-1;0<=c;c--)if(a[c])for(l in f)a[c].prototype[l]=f[l];b.Set&&b.Set.inherit&&b.Set.inherit()};b.invent=function(a){var f="function"==typeof a.create?a.create:function(){this.constructor.call(this,b.create(a.create))};a.inherit&&(f.prototype=new a.inherit);a.extend&&
  b.extend(f,a.extend);a.construct&&b.extend(a.parent||b.Container,a.construct);return f};b.adopt=function(a){if(!a)return null;if(a.instance)return a.instance;var f;f="svg"==a.nodeName?a.parentNode instanceof SVGElement?new b.Nested:new b.Doc:"linearGradient"==a.nodeName?new b.Gradient("linear"):"radialGradient"==a.nodeName?new b.Gradient("radial"):b[d(a.nodeName)]?new (b[d(a.nodeName)]):new b.Element(a);f.type=a.nodeName;f.node=a;a.instance=f;f instanceof b.Doc&&f.namespace().defs();f.setData(JSON.parse(a.getAttribute("svgjs:data"))||
  {});return f};b.prepare=function(a){var f=h.getElementsByTagName("body")[0],l=(f?new b.Doc(f):a.nested()).size(2,0),c=b.create("path");l.node.appendChild(c);b.parser={body:f||a.parent(),draw:l.style("opacity:0;position:fixed;left:100%;top:100%;overflow:hidden"),poly:l.polyline().node,path:c}};b.regex={unit:/^(-?[\d\.]+)([a-z%]{0,2})$/,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,matrix:/matrix\(|\)/g,matrixElements:/,*\s+|,/,whitespace:/\s/g,
  isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^-?[\d\.]+$/,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,negExp:/e\-/gi,comma:/,/g,hyphen:/\-/g,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,whitespaces:/\s+/,X:/X/g};b.utils={map:function(a,b){var l,c=a.length,d=[];for(l=0;l<c;l++)d.push(b(a[l]));return d},radians:function(a){return a%360*Math.PI/180},degrees:function(a){return 180*a/Math.PI%360},filterSVGElements:function(a){return[].filter.call(a,
  function(a){return a instanceof SVGElement})}};b.defaults={attrs:{"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"}};b.Color=function(a){this.b=this.g=this.r=0;"string"===typeof a?b.regex.isRgb.test(a)?(a=b.regex.rgb.exec(a.replace(/\s/g,
  "")),this.r=parseInt(a[1]),this.g=parseInt(a[2]),this.b=parseInt(a[3])):b.regex.isHex.test(a)&&(a=b.regex.hex.exec(c(a)),this.r=parseInt(a[1],16),this.g=parseInt(a[2],16),this.b=parseInt(a[3],16)):"object"===typeof a&&(this.r=a.r,this.g=a.g,this.b=a.b)};b.extend(b.Color,{toString:function(){return this.toHex()},toHex:function(){return"#"+k(this.r)+k(this.g)+k(this.b)},toRgb:function(){return"rgb("+[this.r,this.g,this.b].join()+")"},brightness:function(){return this.r/255*.3+this.g/255*.59+this.b/
  255*.11},morph:function(a){this.destination=new b.Color(a);return this},at:function(a){if(!this.destination)return this;a=0>a?0:1<a?1:a;return new b.Color({r:~~(this.r+(this.destination.r-this.r)*a),g:~~(this.g+(this.destination.g-this.g)*a),b:~~(this.b+(this.destination.b-this.b)*a)})}});b.Color.test=function(a){a+="";return b.regex.isHex.test(a)||b.regex.isRgb.test(a)};b.Color.isRgb=function(a){return a&&"number"==typeof a.r&&"number"==typeof a.g&&"number"==typeof a.b};b.Color.isColor=function(a){return b.Color.isRgb(a)||
  b.Color.test(a)};b.Array=function(a,b){a=(a||[]).valueOf();0==a.length&&b&&(a=b.valueOf());this.value=this.parse(a)};b.extend(b.Array,{morph:function(a){this.destination=this.parse(a);if(this.value.length!=this.destination.length){a=this.value[this.value.length-1];for(var b=this.destination[this.destination.length-1];this.value.length>this.destination.length;)this.destination.push(b);for(;this.value.length<this.destination.length;)this.value.push(a)}return this},settle:function(){for(var a=0,b=this.value.length,
  l=[];a<b;a++)-1==l.indexOf(this.value[a])&&l.push(this.value[a]);return this.value=l},at:function(a){if(!this.destination)return this;for(var f=0,l=this.value.length,c=[];f<l;f++)c.push(this.value[f]+(this.destination[f]-this.value[f])*a);return new b.Array(c)},toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(a){a=a.valueOf();return Array.isArray(a)?a:this.split(a)},split:function(a){return a.trim().split(/\s+/)},reverse:function(){this.value.reverse();
  return this}});b.PointArray=function(a,b){this.constructor.call(this,a,b||[[0,0]])};b.PointArray.prototype=new b.Array;b.extend(b.PointArray,{toString:function(){for(var a=0,b=this.value.length,l=[];a<b;a++)l.push(this.value[a].join(","));return l.join(" ")},toLine:function(){return{x1:this.value[0][0],y1:this.value[0][1],x2:this.value[1][0],y2:this.value[1][1]}},at:function(a){if(!this.destination)return this;for(var f=0,l=this.value.length,c=[];f<l;f++)c.push([this.value[f][0]+(this.destination[f][0]-
  this.value[f][0])*a,this.value[f][1]+(this.destination[f][1]-this.value[f][1])*a]);return new b.PointArray(c)},parse:function(a){a=a.valueOf();if(Array.isArray(a))return a;a=this.split(a);for(var b=0,l=a.length,c,d=[];b<l;b++)c=a[b].split(","),d.push([parseFloat(c[0]),parseFloat(c[1])]);return d},move:function(a,b){var l=this.bbox();a-=l.x;b-=l.y;if(!isNaN(a)&&!isNaN(b))for(l=this.value.length-1;0<=l;l--)this.value[l]=[this.value[l][0]+a,this.value[l][1]+b];return this},size:function(a,b){var l,c=
  this.bbox();for(l=this.value.length-1;0<=l;l--)this.value[l][0]=(this.value[l][0]-c.x)*a/c.width+c.x,this.value[l][1]=(this.value[l][1]-c.y)*b/c.height+c.y;return this},bbox:function(){b.parser.poly.setAttribute("points",this.toString());return b.parser.poly.getBBox()}});b.PathArray=function(a,b){this.constructor.call(this,a,b||[["M",0,0]])};b.PathArray.prototype=new b.Array;b.extend(b.PathArray,{toString:function(){for(var a=this.value,b=0,l=a.length,c="";b<l;b++)c+=a[b][0],null!=a[b][1]&&(c+=a[b][1],
  null!=a[b][2]&&(c+=" ",c+=a[b][2],null!=a[b][3]&&(c+=" ",c+=a[b][3],c+=" ",c+=a[b][4],null!=a[b][5]&&(c+=" ",c+=a[b][5],c+=" ",c+=a[b][6],null!=a[b][7]&&(c+=" ",c+=a[b][7])))));return c+" "},move:function(a,b){var l=this.bbox();a-=l.x;b-=l.y;if(!isNaN(a)&&!isNaN(b))for(var c=this.value.length-1;0<=c;c--)l=this.value[c][0],"M"==l||"L"==l||"T"==l?(this.value[c][1]+=a,this.value[c][2]+=b):"H"==l?this.value[c][1]+=a:"V"==l?this.value[c][1]+=b:"C"==l||"S"==l||"Q"==l?(this.value[c][1]+=a,this.value[c][2]+=
  b,this.value[c][3]+=a,this.value[c][4]+=b,"C"==l&&(this.value[c][5]+=a,this.value[c][6]+=b)):"A"==l&&(this.value[c][6]+=a,this.value[c][7]+=b);return this},size:function(a,b){var l,c,d=this.bbox();for(l=this.value.length-1;0<=l;l--)c=this.value[l][0],"M"==c||"L"==c||"T"==c?(this.value[l][1]=(this.value[l][1]-d.x)*a/d.width+d.x,this.value[l][2]=(this.value[l][2]-d.y)*b/d.height+d.y):"H"==c?this.value[l][1]=(this.value[l][1]-d.x)*a/d.width+d.x:"V"==c?this.value[l][1]=(this.value[l][1]-d.y)*b/d.height+
  d.y:"C"==c||"S"==c||"Q"==c?(this.value[l][1]=(this.value[l][1]-d.x)*a/d.width+d.x,this.value[l][2]=(this.value[l][2]-d.y)*b/d.height+d.y,this.value[l][3]=(this.value[l][3]-d.x)*a/d.width+d.x,this.value[l][4]=(this.value[l][4]-d.y)*b/d.height+d.y,"C"==c&&(this.value[l][5]=(this.value[l][5]-d.x)*a/d.width+d.x,this.value[l][6]=(this.value[l][6]-d.y)*b/d.height+d.y)):"A"==c&&(this.value[l][1]=this.value[l][1]*a/d.width,this.value[l][2]=this.value[l][2]*b/d.height,this.value[l][6]=(this.value[l][6]-d.x)*
  a/d.width+d.x,this.value[l][7]=(this.value[l][7]-d.y)*b/d.height+d.y);return this},parse:function(a){if(a instanceof b.PathArray)return a.valueOf();var f,l,c,d,e,g,k=0,h=0,q={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7};if("string"==typeof a)for(a=a.replace(b.regex.negExp,"X").replace(b.regex.pathLetters," $& ").replace(b.regex.hyphen," -").replace(b.regex.comma," ").replace(b.regex.X,"e-").trim().split(b.regex.whitespaces),f=a.length;--f;)a[f].indexOf(".")!=a[f].lastIndexOf(".")&&(e=a[f].split("."),g=[e.shift(),
  e.shift()].join("."),a.splice.apply(a,[f,1].concat(g,e.map(function(a){return"."+a}))));else a=a.reduce(function(a,b){return[].concat.apply(a,b)},[]);g=[];do{b.regex.isPathLetter.test(a[0])?(d=a[0],a.shift()):"M"==d?d="L":"m"==d&&(d="l");e=[d.toUpperCase()];for(f=0;f<q[e[0]];++f)e.push(parseFloat(a.shift()));d==e[0]?"M"==d||"L"==d||"C"==d||"Q"==d?(k=e[q[e[0]]-1],h=e[q[e[0]]]):"V"==d?h=e[1]:"H"==d?k=e[1]:"A"==d&&(k=e[6],h=e[7]):"m"==d||"l"==d||"c"==d||"s"==d||"q"==d||"t"==d?(e[1]+=k,e[2]+=h,null!=
  e[3]&&(e[3]+=k,e[4]+=h),null!=e[5]&&(e[5]+=k,e[6]+=h),k=e[q[e[0]]-1],h=e[q[e[0]]]):"v"==d?(e[1]+=h,h=e[1]):"h"==d?(e[1]+=k,k=e[1]):"a"==d&&(e[6]+=k,e[7]+=h,k=e[6],h=e[7]);"M"==e[0]&&(l=k,c=h);"Z"==e[0]&&(k=l,h=c);g.push(e)}while(a.length);return g},bbox:function(){b.parser.path.setAttribute("d",this.toString());return b.parser.path.getBBox()}});b.Number=b.invent({create:function(a,f){this.value=0;this.unit=f||"";if("number"===typeof a)this.value=isNaN(a)?0:isFinite(a)?a:0>a?-3.4E38:3.4E38;else if("string"===
  typeof a){if(f=a.match(b.regex.unit))this.value=parseFloat(f[1]),"%"==f[2]?this.value/=100:"s"==f[2]&&(this.value*=1E3),this.unit=f[2]}else a instanceof b.Number&&(this.value=a.valueOf(),this.unit=a.unit)},extend:{toString:function(){return("%"==this.unit?~~(1E8*this.value)/1E6:"s"==this.unit?this.value/1E3:this.value)+this.unit},valueOf:function(){return this.value},plus:function(a){return new b.Number(this+new b.Number(a),this.unit)},minus:function(a){return this.plus(-new b.Number(a))},times:function(a){return new b.Number(this*
  new b.Number(a),this.unit)},divide:function(a){return new b.Number(this/new b.Number(a),this.unit)},to:function(a){var f=new b.Number(this);"string"===typeof a&&(f.unit=a);return f},morph:function(a){this.destination=new b.Number(a);return this},at:function(a){return this.destination?(new b.Number(this.destination)).minus(this).times(a).plus(this):this}}});b.ViewBox=function(a){var f,l,c;l=f=1;var d=a.bbox(),e=(a.attr("viewBox")||"").match(/-?[\d\.]+/g),g=a,k=a;c=new b.Number(a.width());for(a=new b.Number(a.height());"%"==
  c.unit;)f*=c.value,c=new b.Number(g instanceof b.Doc?g.parent().offsetWidth:g.parent().width()),g=g.parent();for(;"%"==a.unit;)l*=a.value,a=new b.Number(k instanceof b.Doc?k.parent().offsetHeight:k.parent().height()),k=k.parent();this.x=d.x;this.y=d.y;this.width=c*f;this.height=a*l;this.zoom=1;e&&(f=parseFloat(e[0]),l=parseFloat(e[1]),c=parseFloat(e[2]),a=parseFloat(e[3]),this.zoom=this.width/this.height>c/a?this.height/a:this.width/c,this.x=f,this.y=l,this.width=c,this.height=a)};b.extend(b.ViewBox,
  {toString:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}});b.Element=b.invent({create:function(a){this._stroke=b.defaults.attrs.stroke;this.dom={};if(this.node=a)this.type=a.nodeName,this.node.instance=this,this._stroke=a.getAttribute("stroke")||this._stroke},extend:{x:function(a){return this.attr("x",a)},y:function(a){return this.attr("y",a)},cx:function(a){return null==a?this.x()+this.width()/2:this.x(a-this.width()/2)},cy:function(a){return null==a?this.y()+this.height()/2:
  this.y(a-this.height()/2)},move:function(a,b){return this.x(a).y(b)},center:function(a,b){return this.cx(a).cy(b)},width:function(a){return this.attr("width",a)},height:function(a){return this.attr("height",a)},size:function(a,f){var l=q(this.bbox(),a,f);return this.width(new b.Number(l.width)).height(new b.Number(l.height))},clone:function(){var a=t(this.node.cloneNode(!0));this.after(a);return a},remove:function(){this.parent()&&this.parent().removeElement(this);return this},replace:function(a){this.after(a).remove();
  return a},addTo:function(a){return a.put(this)},putIn:function(a){return a.add(this)},id:function(a){return this.attr("id",a)},inside:function(a,b){var l=this.bbox();return a>l.x&&b>l.y&&a<l.x+l.width&&b<l.y+l.height},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var a=this.attr("class");return null==a?[]:a.trim().split(/\s+/)},
  hasClass:function(a){return-1!=this.classes().indexOf(a)},addClass:function(a){if(!this.hasClass(a)){var b=this.classes();b.push(a);this.attr("class",b.join(" "))}return this},removeClass:function(a){this.hasClass(a)&&this.attr("class",this.classes().filter(function(b){return b!=a}).join(" "));return this},toggleClass:function(a){return this.hasClass(a)?this.removeClass(a):this.addClass(a)},reference:function(a){return b.get(this.attr(a))},parent:function(a){var f=this;if(!f.node.parentNode)return null;
  f=b.adopt(f.node.parentNode);if(!a)return f;for(;f.node instanceof SVGElement;){if("string"===typeof a?f.matches(a):f instanceof a)return f;f=b.adopt(f.node.parentNode)}},doc:function(){return this instanceof b.Doc?this:this.parent(b.Doc)},parents:function(a){var b=[],l=this;do{l=l.parent(a);if(!l||!l.node)break;b.push(l)}while(l.parent);return b},matches:function(a){var b=this.node;return(b.matches||b.matchesSelector||b.msMatchesSelector||b.mozMatchesSelector||b.webkitMatchesSelector||b.oMatchesSelector).call(b,
  a)},"native":function(){return this.node},svg:function(a){var f=h.createElement("svg");if(a&&this instanceof b.Parent){f.innerHTML="<svg>"+a.replace(/\n/,"").replace(/<(\w+)([^<]+?)\/>/g,"<$1$2></$1>")+"</svg>";a=0;for(var l=f.firstChild.childNodes.length;a<l;a++)this.node.appendChild(f.firstChild.firstChild)}else return f.appendChild(a=h.createElement("svg")),this.writeDataToDom(),a.appendChild(this.node.cloneNode(!0)),f.innerHTML.replace(/^<svg>/,"").replace(/<\/svg>$/,"");return this},writeDataToDom:function(){(this.each||
  this.lines)&&(this.each?this:this.lines()).each(function(){this.writeDataToDom()});this.node.removeAttribute("svgjs:data");Object.keys(this.dom).length&&this.node.setAttributeNS(b.svgjs,"svgjs:data",JSON.stringify(this.dom));return this},setData:function(a){this.dom=a;return this}}});b.FX=b.invent({create:function(a){this.target=a},extend:{animate:function(a,f,l){var c,d,e,g=this.target,k=this;"object"==typeof a&&(l=a.delay,f=a.ease,a=a.duration);a="="==a?a:null==a?1E3:(new b.Number(a)).valueOf();
  f=f||"<>";k.at=function(a){var b;a=0>a?0:1<a?1:a;if(null==c){c=[];for(e in k.attrs)c.push(e);if(g.morphArray&&(k.destination.plot||-1<c.indexOf("points"))){var l=new g.morphArray(k.destination.plot||k.attrs.points||g.array());k.destination.size&&l.size(k.destination.size.width.to,k.destination.size.height.to);b=l.bbox();k.destination.x?l.move(k.destination.x.to,b.y):k.destination.cx&&l.move(k.destination.cx.to-b.width/2,b.y);b=l.bbox();k.destination.y?l.move(b.x,k.destination.y.to):k.destination.cy&&
  l.move(b.x,k.destination.cy.to-b.height/2);k.destination={plot:g.array().morph(l)}}}if(null==d)for(e in d=[],k.styles)d.push(e);a="<>"==f?-Math.cos(a*Math.PI)/2+.5:">"==f?Math.sin(a*Math.PI/2):"<"==f?-Math.cos(a*Math.PI/2)+1:"-"==f?a:"function"==typeof f?f(a):a;k.destination.plot?g.plot(k.destination.plot.at(a)):(k.destination.x?g.x(k.destination.x.at(a)):k.destination.cx&&g.cx(k.destination.cx.at(a)),k.destination.y?g.y(k.destination.y.at(a)):k.destination.cy&&g.cy(k.destination.cy.at(a)),k.destination.size&&
  g.size(k.destination.size.width.at(a),k.destination.size.height.at(a)));k.destination.viewbox&&g.viewbox(k.destination.viewbox.x.at(a),k.destination.viewbox.y.at(a),k.destination.viewbox.width.at(a),k.destination.viewbox.height.at(a));k.destination.leading&&g.leading(k.destination.leading.at(a));for(b=c.length-1;0<=b;b--)g.attr(c[b],p(k.attrs[c[b]],a));for(b=d.length-1;0<=b;b--)g.style(d[b],p(k.styles[d[b]],a));k.situation.during&&k.situation.during.call(g,a,function(b,f){return p({from:b,to:f},a)})};
  "number"===typeof a&&(this.timeout=setTimeout(function(){var c=(new Date).getTime();k.situation.start=c;k.situation.play=!0;k.situation.finish=c+a;k.situation.duration=a;k.situation.ease=f;k.render=function(){if(!0===k.situation.play){var c=(new Date).getTime(),d=c>k.situation.finish?1:(c-k.situation.start)/a;k.situation.reversing&&(d=-d+1);k.at(d);c>k.situation.finish?(k.destination.plot&&g.plot((new b.PointArray(k.destination.plot.destination)).settle()),!0===k.situation.loop||"number"==typeof k.situation.loop&&
  0<k.situation.loop?(k.situation.reverse&&(k.situation.reversing=!k.situation.reversing),"number"==typeof k.situation.loop&&(k.situation.reverse&&!k.situation.reversing||--k.situation.loop,k.situation.reverse||1!=k.situation.loop||--k.situation.loop),k.animate(a,f,l)):k.situation.after?k.situation.after.apply(g,[k]):k.stop()):k.animationFrame=requestAnimationFrame(k.render)}else k.animationFrame=requestAnimationFrame(k.render)};k.render()},(new b.Number(l)).valueOf()));return this},bbox:function(){return this.target.bbox()},
  attr:function(a,f){if("object"==typeof a)for(var l in a)this.attr(l,a[l]);else l=this.target.attr(a),"transform"==a?(this.attrs[a]&&(f=this.attrs[a].destination.multiply(f)),this.attrs[a]=(new b.Matrix(this.target)).morph(f),this.param&&(f=this.target.transform("rotation"),this.attrs[a].param={from:this.target.param||{rotation:f,cx:this.param.cx,cy:this.param.cy},to:this.param})):this.attrs[a]=b.Color.isColor(f)?(new b.Color(l)).morph(f):b.regex.unit.test(f)?(new b.Number(l)).morph(f):{from:l,to:f};
  return this},style:function(a,b){if("object"==typeof a)for(var l in a)this.style(l,a[l]);else this.styles[a]={from:this.target.style(a),to:b};return this},x:function(a){this.destination.x=(new b.Number(this.target.x())).morph(a);return this},y:function(a){this.destination.y=(new b.Number(this.target.y())).morph(a);return this},cx:function(a){this.destination.cx=(new b.Number(this.target.cx())).morph(a);return this},cy:function(a){this.destination.cy=(new b.Number(this.target.cy())).morph(a);return this},
  move:function(a,b){return this.x(a).y(b)},center:function(a,b){return this.cx(a).cy(b)},size:function(a,f){if(this.target instanceof b.Text)this.attr("font-size",a);else{var l=this.target.bbox();this.destination.size={width:(new b.Number(l.width)).morph(a),height:(new b.Number(l.height)).morph(f)}}return this},plot:function(a){this.destination.plot=a;return this},leading:function(a){this.target.destination.leading&&(this.destination.leading=(new b.Number(this.target.destination.leading)).morph(a));
  return this},viewbox:function(a,f,l,c){if(this.target instanceof b.Container){var d=this.target.viewbox();this.destination.viewbox={x:(new b.Number(d.x)).morph(a),y:(new b.Number(d.y)).morph(f),width:(new b.Number(d.width)).morph(l),height:(new b.Number(d.height)).morph(c)}}return this},update:function(a){this.target instanceof b.Stop&&(null!=a.opacity&&this.attr("stop-opacity",a.opacity),null!=a.color&&this.attr("stop-color",a.color),null!=a.offset&&this.attr("offset",new b.Number(a.offset)));return this},
  during:function(a){this.situation.during=a;return this},after:function(a){this.situation.after=a;return this},loop:function(a,b){this.situation.loop=this.situation.loops=a||!0;this.situation.reverse=!!b;return this},stop:function(a){!0===a?(this.animate(0),this.situation.after&&this.situation.after.apply(this.target,[this])):(clearTimeout(this.timeout),cancelAnimationFrame(this.animationFrame),this.attrs={},this.styles={},this.situation={},this.destination={});return this},pause:function(){!0===this.situation.play&&
  (this.situation.play=!1,this.situation.pause=(new Date).getTime());return this},play:function(){if(!1===this.situation.play){var a=(new Date).getTime()-this.situation.pause;this.situation.finish+=a;this.situation.start+=a;this.situation.play=!0}return this}},parent:b.Element,construct:{animate:function(a,f,l){return(this.fx||(this.fx=new b.FX(this))).stop().animate(a,f,l)},stop:function(a){this.fx&&this.fx.stop(a);return this},pause:function(){this.fx&&this.fx.pause();return this},play:function(){this.fx&&
  this.fx.play();return this}}});b.BBox=b.invent({create:function(a){if(a){var f;try{f=a.node.getBBox()}catch(l){a instanceof b.Shape?(a=a.clone().addTo(b.parser.draw),f=a.bbox(),a.remove()):f={x:a.node.clientLeft,y:a.node.clientTop,width:a.node.clientWidth,height:a.node.clientHeight}}this.x=f.x;this.y=f.y;this.width=f.width;this.height=f.height}u(this)},parent:b.Element,construct:{bbox:function(){return new b.BBox(this)}}});b.TBox=b.invent({create:function(a){if(a){var b=a.ctm().extract();a=a.bbox();
  this.width=a.width*b.scaleX;this.height=a.height*b.scaleY;this.x=a.x+b.x;this.y=a.y+b.y}u(this)},parent:b.Element,construct:{tbox:function(){return new b.TBox(this)}}});b.RBox=b.invent({create:function(a){if(a){var b=a.doc().parent(),l=a.node.getBoundingClientRect(),c=1;this.x=l.left;this.y=l.top;this.x-=b.offsetLeft;for(this.y-=b.offsetTop;b=b.offsetParent;)this.x-=b.offsetLeft,this.y-=b.offsetTop;for(b=a;b.parent&&(b=b.parent());)b.viewbox&&(c*=b.viewbox().zoom,this.x-=b.x()||0,this.y-=b.y()||0);
  this.width=l.width/=c;this.height=l.height/=c}u(this);this.x+=m.pageXOffset;this.y+=m.pageYOffset},parent:b.Element,construct:{rbox:function(){return new b.RBox(this)}}});[b.BBox,b.TBox,b.RBox].forEach(function(a){b.extend(a,{merge:function(b){var l=new a;l.x=Math.min(this.x,b.x);l.y=Math.min(this.y,b.y);l.width=Math.max(this.x+this.width,b.x+b.width)-l.x;l.height=Math.max(this.y+this.height,b.y+b.height)-l.y;return u(l)}})});b.Matrix=b.invent({create:function(a){var f,l=e([1,0,0,1,0,0]);a=a instanceof
  b.Element?a.matrixify():"string"===typeof a?n(a):6==arguments.length?e([].slice.call(arguments)):"object"===typeof a?a:l;for(f=v.length-1;0<=f;f--)this[v[f]]=a&&"number"===typeof a[v[f]]?a[v[f]]:l[v[f]]},extend:{extract:function(){var a=180/Math.PI*Math.atan2(0*this.b+1*this.d+0,0*this.a+1*this.c+0)-90;return{x:this.e,y:this.f,skewX:-a,skewY:180/Math.PI*Math.atan2(1*this.b+0*this.d+0,1*this.a+0*this.c+0),scaleX:Math.sqrt(this.a*this.a+this.b*this.b),scaleY:Math.sqrt(this.c*this.c+this.d*this.d),rotation:a,
  a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}},clone:function(){return new b.Matrix(this)},morph:function(a){this.destination=new b.Matrix(a);return this},at:function(a){if(!this.destination)return this;var f=new b.Matrix({a:this.a+(this.destination.a-this.a)*a,b:this.b+(this.destination.b-this.b)*a,c:this.c+(this.destination.c-this.c)*a,d:this.d+(this.destination.d-this.d)*a,e:this.e+(this.destination.e-this.e)*a,f:this.f+(this.destination.f-this.f)*a});if(this.param&&this.param.to){var l=
  {rotation:this.param.from.rotation+(this.param.to.rotation-this.param.from.rotation)*a,cx:this.param.from.cx,cy:this.param.from.cy},f=f.rotate((this.param.to.rotation-2*this.param.from.rotation)*a,l.cx,l.cy);f.param=l}return f},multiply:function(a){return new b.Matrix(this["native"]().multiply(r(a)["native"]()))},inverse:function(){return new b.Matrix(this["native"]().inverse())},translate:function(a,f){return new b.Matrix(this["native"]().translate(a||0,f||0))},scale:function(a,f,l,c){if(1==arguments.length||
  3==arguments.length)f=a;3==arguments.length&&(c=l,l=f);return this.around(l,c,new b.Matrix(a,0,0,f,0,0))},rotate:function(a,f,l){a=b.utils.radians(a);return this.around(f,l,new b.Matrix(Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0))},flip:function(a,b){return"x"==a?this.scale(-1,1,b,0):this.scale(1,-1,0,b)},skew:function(a,b,l,c){return this.around(l,c,this["native"]().skewX(a||0).skewY(b||0))},skewX:function(a,b,l){return this.around(b,l,this["native"]().skewX(a||0))},skewY:function(a,b,
  l){return this.around(b,l,this["native"]().skewY(a||0))},around:function(a,f,l){return this.multiply(new b.Matrix(1,0,0,1,a||0,f||0)).multiply(l).multiply(new b.Matrix(1,0,0,1,-a||0,-f||0))},"native":function(){for(var a=b.parser.draw.node.createSVGMatrix(),f=v.length-1;0<=f;f--)a[v[f]]=this[v[f]];return a},toString:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},parent:b.Element,construct:{ctm:function(){return new b.Matrix(this.node.getCTM())},screenCTM:function(){return new b.Matrix(this.node.getScreenCTM())}}});
  b.extend(b.Element,{attr:function(a,f,l){if(null==a){a={};f=this.node.attributes;for(l=f.length-1;0<=l;l--)a[f[l].nodeName]=b.regex.isNumber.test(f[l].nodeValue)?parseFloat(f[l].nodeValue):f[l].nodeValue;return a}if("object"==typeof a)for(f in a)this.attr(f,a[f]);else if(null===f)this.node.removeAttribute(a);else{if(null==f)return f=this.node.getAttribute(a),null==f?b.defaults.attrs[a]:b.regex.isNumber.test(f)?parseFloat(f):f;"stroke-width"==a?this.attr("stroke",0<parseFloat(f)?this._stroke:null):
  "stroke"==a&&(this._stroke=f);if("fill"==a||"stroke"==a)b.regex.isImage.test(f)&&(f=this.doc().defs().image(f,0,0)),f instanceof b.Image&&(f=this.doc().defs().pattern(0,0,function(){this.add(f)}));"number"===typeof f?f=new b.Number(f):b.Color.isColor(f)?f=new b.Color(f):Array.isArray(f)?f=new b.Array(f):f instanceof b.Matrix&&f.param&&(this.param=f.param);"leading"==a?this.leading&&this.leading(f):"string"===typeof l?this.node.setAttributeNS(l,a,f.toString()):this.node.setAttribute(a,f.toString());
  !this.rebuild||"font-size"!=a&&"x"!=a||this.rebuild(a,f)}return this}});b.extend(b.Element,b.FX,{transform:function(a,f){var l=this.target||this,c;if("object"!==typeof a)return c=(new b.Matrix(l)).extract(),"object"===typeof this.param&&(c.rotation=this.param.rotation,c.cx=this.param.cx,c.cy=this.param.cy),"string"===typeof a?c[a]:c;c=this instanceof b.FX&&this.attrs.transform?this.attrs.transform:new b.Matrix(l);f=!!f||!!a.relative;if(null!=a.a)c=f?c.multiply(new b.Matrix(a)):new b.Matrix(a);else if(null!=
  a.rotation)w(a,l),f&&(a.rotation+=this.param&&null!=this.param.rotation?this.param.rotation:c.extract().rotation),this.param=a,this instanceof b.Element&&(c=f?c.rotate(a.rotation,a.cx,a.cy):c.rotate(a.rotation-c.extract().rotation,a.cx,a.cy));else if(null!=a.scale||null!=a.scaleX||null!=a.scaleY)w(a,l),a.scaleX=null!=a.scale?a.scale:null!=a.scaleX?a.scaleX:1,a.scaleY=null!=a.scale?a.scale:null!=a.scaleY?a.scaleY:1,f||(l=c.extract(),a.scaleX=1*a.scaleX/l.scaleX,a.scaleY=1*a.scaleY/l.scaleY),c=c.scale(a.scaleX,
  a.scaleY,a.cx,a.cy);else if(null!=a.skewX||null!=a.skewY)w(a,l),a.skewX=null!=a.skewX?a.skewX:0,a.skewY=null!=a.skewY?a.skewY:0,f||(l=c.extract(),c=c.multiply((new b.Matrix).skew(l.skewX,l.skewY,a.cx,a.cy).inverse())),c=c.skew(a.skewX,a.skewY,a.cx,a.cy);else if(a.flip)c=c.flip(a.flip,null==a.offset?l.bbox()["c"+a.flip]:a.offset);else if(null!=a.x||null!=a.y)f?c=c.translate(a.x,a.y):(null!=a.x&&(c.e=a.x),null!=a.y&&(c.f=a.y));return this.attr(this instanceof b.Pattern?"patternTransform":this instanceof
  b.Gradient?"gradientTransform":"transform",c)}});b.extend(b.Element,{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(/\)\s*/).slice(0,-1).map(function(a){a=a.trim().split("(");return[a[0],a[1].split(b.regex.matrixElements).map(function(a){return parseFloat(a)})]}).reduce(function(a,b){return"matrix"==b[0]?a.multiply(e(b[1])):a[b[0]].apply(a,b[1])},new b.Matrix)},toParent:function(a){if(this==a)return this;var b=this.screenCTM(),
  l=a.rect(1,1),c=l.screenCTM().inverse();l.remove();this.addTo(a).untransform().transform(c.multiply(b));return this},toDoc:function(){return this.toParent(this.doc())}});b.extend(b.Element,{style:function(a,f){if(0==arguments.length)return this.node.style.cssText||"";if(2>arguments.length)if("object"==typeof a)for(f in a)this.style(f,a[f]);else if(b.regex.isCss.test(a)){a=a.split(";");for(var l=0;l<a.length;l++)f=a[l].split(":"),this.style(f[0].replace(/\s+/g,""),f[1])}else return this.node.style[g(a)];
  else this.node.style[g(a)]=null===f||b.regex.isBlank.test(f)?"":f;return this}});b.Parent=b.invent({create:function(a){this.constructor.call(this,a)},inherit:b.Element,extend:{children:function(){return b.utils.map(b.utils.filterSVGElements(this.node.childNodes),function(a){return b.adopt(a)})},add:function(a,b){this.has(a)||(b=null==b?this.children().length:b,this.node.insertBefore(a.node,this.node.childNodes[b]||null));return this},put:function(a,b){this.add(a,b);return a},has:function(a){return 0<=
  this.index(a)},index:function(a){return this.children().indexOf(a)},get:function(a){return this.children()[a]},first:function(){return this.children()[0]},last:function(){return this.children()[this.children().length-1]},each:function(a,f){var l,c,d=this.children();l=0;for(c=d.length;l<c;l++)d[l]instanceof b.Element&&a.apply(d[l],[l,d]),f&&d[l]instanceof b.Container&&d[l].each(a,f);return this},removeElement:function(a){this.node.removeChild(a.node);return this},clear:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);
  delete this._defs;return this},defs:function(){return this.doc().defs()}}});b.extend(b.Parent,{ungroup:function(a,f){if(0===f||this instanceof b.Defs)return this;a=a||(this instanceof b.Doc?this:this.parent(b.Parent));f=f||Infinity;this.each(function(){return this instanceof b.Defs?this:this instanceof b.Parent?this.ungroup(a,f-1):this.toParent(a)});this.node.firstChild||this.remove();return this},flatten:function(a,b){return this.ungroup(a,b)}});b.Container=b.invent({create:function(a){this.constructor.call(this,
  a)},inherit:b.Parent,extend:{viewbox:function(a){if(0==arguments.length)return new b.ViewBox(this);a=1==arguments.length?[a.x,a.y,a.width,a.height]:[].slice.call(arguments);return this.attr("viewBox",a)}}});"click dblclick mousedown mouseup mouseover mouseout mousemove touchstart touchmove touchleave touchend touchcancel".split(" ").forEach(function(a){b.Element.prototype[a]=function(b){var c=this;this.node["on"+a]="function"==typeof b?function(){return b.apply(c,arguments)}:null;return this}});b.listeners=
  [];b.handlerMap=[];b.on=function(a,f,c,d){d=c.bind(d||a.instance||a);var e=(b.handlerMap.indexOf(a)+1||b.handlerMap.push(a))-1,k=f.split(".")[0];f=f.split(".")[1]||"*";b.listeners[e]=b.listeners[e]||{};b.listeners[e][k]=b.listeners[e][k]||{};b.listeners[e][k][f]=b.listeners[e][k][f]||{};b.listeners[e][k][f][c]=d;a.addEventListener(k,d,!1)};b.off=function(a,f,c){var d=b.handlerMap.indexOf(a),e=f&&f.split(".")[0],k=f&&f.split(".")[1];if(-1!=d)if(c)b.listeners[d][e]&&b.listeners[d][e][k||"*"]&&(a.removeEventListener(e,
  b.listeners[d][e][k||"*"][c],!1),delete b.listeners[d][e][k||"*"][c]);else if(k&&e){if(b.listeners[d][e]&&b.listeners[d][e][k]){for(c in b.listeners[d][e][k])b.off(a,[e,k].join("."),c);delete b.listeners[d][e][k]}}else if(k)for(f in b.listeners[d])for(namespace in b.listeners[d][f])k===namespace&&b.off(a,[f,k].join("."));else if(e){if(b.listeners[d][e]){for(namespace in b.listeners[d][e])b.off(a,[e,namespace].join("."));delete b.listeners[d][e]}}else{for(f in b.listeners[d])b.off(a,f);delete b.listeners[d]}};
  b.extend(b.Element,{on:function(a,f,c){b.on(this.node,a,f,c);return this},off:function(a,f){b.off(this.node,a,f);return this},fire:function(a,b){a instanceof Event?this.node.dispatchEvent(a):this.node.dispatchEvent(new A(a,{detail:b}));return this}});b.Defs=b.invent({create:"defs",inherit:b.Container});b.G=b.invent({create:"g",inherit:b.Container,extend:{x:function(a){return null==a?this.transform("x"):this.transform({x:a-this.x()},!0)},y:function(a){return null==a?this.transform("y"):this.transform({y:a-
  this.y()},!0)},cx:function(a){return null==a?this.tbox().cx:this.x(a-this.tbox().width/2)},cy:function(a){return null==a?this.tbox().cy:this.y(a-this.tbox().height/2)},gbox:function(){var a=this.bbox(),b=this.transform();a.x+=b.x;a.x2+=b.x;a.cx+=b.x;a.y+=b.y;a.y2+=b.y;a.cy+=b.y;return a}},construct:{group:function(){return this.put(new b.G)}}});b.extend(b.Element,{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+
  1]},previous:function(){return this.siblings()[this.position()-1]},forward:function(){var a=this.position()+1,f=this.parent();f.removeElement(this).add(this,a);f instanceof b.Doc&&f.node.appendChild(f.defs().node);return this},backward:function(){var a=this.position();0<a&&this.parent().removeElement(this).add(this,a-1);return this},front:function(){var a=this.parent();a.node.appendChild(this.node);a instanceof b.Doc&&a.node.appendChild(a.defs().node);return this},back:function(){0<this.position()&&
  this.parent().removeElement(this).add(this,0);return this},before:function(a){a.remove();var b=this.position();this.parent().add(a,b);return this},after:function(a){a.remove();var b=this.position();this.parent().add(a,b+1);return this}});b.Mask=b.invent({create:function(){this.constructor.call(this,b.create("mask"));this.targets=[]},inherit:b.Container,extend:{remove:function(){for(var a=this.targets.length-1;0<=a;a--)this.targets[a]&&this.targets[a].unmask();this.targets=[];this.parent().removeElement(this);
  return this}},construct:{mask:function(){return this.defs().put(new b.Mask)}}});b.extend(b.Element,{maskWith:function(a){this.masker=a instanceof b.Mask?a:this.parent().mask().add(a);this.masker.targets.push(this);return this.attr("mask",'url("#'+this.masker.attr("id")+'")')},unmask:function(){delete this.masker;return this.attr("mask",null)}});b.ClipPath=b.invent({create:function(){this.constructor.call(this,b.create("clipPath"));this.targets=[]},inherit:b.Container,extend:{remove:function(){for(var a=
  this.targets.length-1;0<=a;a--)this.targets[a]&&this.targets[a].unclip();this.targets=[];this.parent().removeElement(this);return this}},construct:{clip:function(){return this.defs().put(new b.ClipPath)}}});b.extend(b.Element,{clipWith:function(a){this.clipper=a instanceof b.ClipPath?a:this.parent().clip().add(a);this.clipper.targets.push(this);return this.attr("clip-path",'url("#'+this.clipper.attr("id")+'")')},unclip:function(){delete this.clipper;return this.attr("clip-path",null)}});b.Gradient=
  b.invent({create:function(a){this.constructor.call(this,b.create(a+"Gradient"));this.type=a},inherit:b.Container,extend:{at:function(a,f,c){return this.put(new b.Stop).update(a,f,c)},update:function(a){this.clear();"function"==typeof a&&a.call(this,this);return this},fill:function(){return"url(#"+this.id()+")"},toString:function(){return this.fill()},attr:function(a,f,c){"transform"==a&&(a="gradientTransform");return b.Container.prototype.attr.call(this,a,f,c)}},construct:{gradient:function(a,b){return this.defs().gradient(a,
  b)}}});b.extend(b.Gradient,b.FX,{from:function(a,f){return"radial"==(this.target||this).type?this.attr({fx:new b.Number(a),fy:new b.Number(f)}):this.attr({x1:new b.Number(a),y1:new b.Number(f)})},to:function(a,f){return"radial"==(this.target||this).type?this.attr({cx:new b.Number(a),cy:new b.Number(f)}):this.attr({x2:new b.Number(a),y2:new b.Number(f)})}});b.extend(b.Defs,{gradient:function(a,f){return this.put(new b.Gradient(a)).update(f)}});b.Stop=b.invent({create:"stop",inherit:b.Element,extend:{update:function(a,
  f,c){if("number"==typeof a||a instanceof b.Number)a={offset:a,color:f,opacity:c};null!=a.opacity&&this.attr("stop-opacity",a.opacity);null!=a.color&&this.attr("stop-color",a.color);null!=a.offset&&this.attr("offset",new b.Number(a.offset));return this}}});b.Pattern=b.invent({create:"pattern",inherit:b.Container,extend:{fill:function(){return"url(#"+this.id()+")"},update:function(a){this.clear();"function"==typeof a&&a.call(this,this);return this},toString:function(){return this.fill()},attr:function(a,
  f,c){"transform"==a&&(a="patternTransform");return b.Container.prototype.attr.call(this,a,f,c)}},construct:{pattern:function(a,b,c){return this.defs().pattern(a,b,c)}}});b.extend(b.Defs,{pattern:function(a,f,c){return this.put(new b.Pattern).update(c).attr({x:0,y:0,width:a,height:f,patternUnits:"userSpaceOnUse"})}});b.Doc=b.invent({create:function(a){a&&(a="string"==typeof a?h.getElementById(a):a,"svg"==a.nodeName?this.constructor.call(this,a):(this.constructor.call(this,b.create("svg")),a.appendChild(this.node)),
  this.namespace().size("100%","100%").defs())},inherit:b.Container,extend:{namespace:function(){return this.attr({xmlns:b.ns,version:"1.1"}).attr("xmlns:xlink",b.xlink,b.xmlns).attr("xmlns:svgjs",b.svgjs,b.xmlns)},defs:function(){if(!this._defs){var a;(a=this.node.getElementsByTagName("defs")[0])?this._defs=b.adopt(a):this._defs=new b.Defs;this.node.appendChild(this._defs.node)}return this._defs},parent:function(){return"#document"==this.node.parentNode.nodeName?null:this.node.parentNode},spof:function(a){(a=
  this.node.getScreenCTM())&&this.style("left",-a.e%1+"px").style("top",-a.f%1+"px");return this},remove:function(){this.parent()&&this.parent().removeChild(this.node);return this}}});b.Shape=b.invent({create:function(a){this.constructor.call(this,a)},inherit:b.Element});b.Bare=b.invent({create:function(a,f){this.constructor.call(this,b.create(a));if(f)for(var c in f.prototype)"function"===typeof f.prototype[c]&&(this[c]=f.prototype[c])},inherit:b.Element,extend:{words:function(a){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);
  this.node.appendChild(h.createTextNode(a));return this}}});b.extend(b.Parent,{element:function(a,f){return this.put(new b.Bare(a,f))},symbol:function(){return this.defs().element("symbol",b.Container)}});b.Use=b.invent({create:"use",inherit:b.Shape,extend:{element:function(a,f){return this.attr("href",(f||"")+"#"+a,b.xlink)}},construct:{use:function(a,f){return this.put(new b.Use).element(a,f)}}});b.Rect=b.invent({create:"rect",inherit:b.Shape,construct:{rect:function(a,f){return this.put(new b.Rect).size(a,
  f)}}});b.Circle=b.invent({create:"circle",inherit:b.Shape,construct:{circle:function(a){return this.put(new b.Circle).rx((new b.Number(a)).divide(2)).move(0,0)}}});b.extend(b.Circle,b.FX,{rx:function(a){return this.attr("r",a)},ry:function(a){return this.rx(a)}});b.Ellipse=b.invent({create:"ellipse",inherit:b.Shape,construct:{ellipse:function(a,f){return this.put(new b.Ellipse).size(a,f).move(0,0)}}});b.extend(b.Ellipse,b.Rect,b.FX,{rx:function(a){return this.attr("rx",a)},ry:function(a){return this.attr("ry",
  a)}});b.extend(b.Circle,b.Ellipse,{x:function(a){return null==a?this.cx()-this.rx():this.cx(a+this.rx())},y:function(a){return null==a?this.cy()-this.ry():this.cy(a+this.ry())},cx:function(a){return null==a?this.attr("cx"):this.attr("cx",a)},cy:function(a){return null==a?this.attr("cy"):this.attr("cy",a)},width:function(a){return null==a?2*this.rx():this.rx((new b.Number(a)).divide(2))},height:function(a){return null==a?2*this.ry():this.ry((new b.Number(a)).divide(2))},size:function(a,f){var c=q(this.bbox(),
  a,f);return this.rx((new b.Number(c.width)).divide(2)).ry((new b.Number(c.height)).divide(2))}});b.Line=b.invent({create:"line",inherit:b.Shape,extend:{array:function(){return new b.PointArray([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])},plot:function(a,f,c,d){a=4==arguments.length?{x1:a,y1:f,x2:c,y2:d}:(new b.PointArray(a)).toLine();return this.attr(a)},move:function(a,b){return this.attr(this.array().move(a,b).toLine())},size:function(a,b){var c=q(this.bbox(),a,b);return this.attr(this.array().size(c.width,
  c.height).toLine())}},construct:{line:function(a,f,c,d){return this.put(new b.Line).plot(a,f,c,d)}}});b.Polyline=b.invent({create:"polyline",inherit:b.Shape,construct:{polyline:function(a){return this.put(new b.Polyline).plot(a)}}});b.Polygon=b.invent({create:"polygon",inherit:b.Shape,construct:{polygon:function(a){return this.put(new b.Polygon).plot(a)}}});b.extend(b.Polyline,b.Polygon,{array:function(){return this._array||(this._array=new b.PointArray(this.attr("points")))},plot:function(a){return this.attr("points",
  this._array=new b.PointArray(a))},move:function(a,b){return this.attr("points",this.array().move(a,b))},size:function(a,b){var c=q(this.bbox(),a,b);return this.attr("points",this.array().size(c.width,c.height))}});b.extend(b.Line,b.Polyline,b.Polygon,{morphArray:b.PointArray,x:function(a){return null==a?this.bbox().x:this.move(a,this.bbox().y)},y:function(a){return null==a?this.bbox().y:this.move(this.bbox().x,a)},width:function(a){var b=this.bbox();return null==a?b.width:this.size(a,b.height)},height:function(a){var b=
  this.bbox();return null==a?b.height:this.size(b.width,a)}});b.Path=b.invent({create:"path",inherit:b.Shape,extend:{morphArray:b.PathArray,array:function(){return this._array||(this._array=new b.PathArray(this.attr("d")))},plot:function(a){return this.attr("d",this._array=new b.PathArray(a))},move:function(a,b){return this.attr("d",this.array().move(a,b))},x:function(a){return null==a?this.bbox().x:this.move(a,this.bbox().y)},y:function(a){return null==a?this.bbox().y:this.move(this.bbox().x,a)},size:function(a,
  b){var c=q(this.bbox(),a,b);return this.attr("d",this.array().size(c.width,c.height))},width:function(a){return null==a?this.bbox().width:this.size(a,this.bbox().height)},height:function(a){return null==a?this.bbox().height:this.size(this.bbox().width,a)}},construct:{path:function(a){return this.put(new b.Path).plot(a)}}});b.Image=b.invent({create:"image",inherit:b.Shape,extend:{load:function(a){if(!a)return this;var f=this,c=h.createElement("img");c.onload=function(){var d=f.parent(b.Pattern);null!==
  d&&(0==f.width()&&0==f.height()&&f.size(c.width,c.height),d&&0==d.width()&&0==d.height()&&d.size(f.width(),f.height()),"function"===typeof f._loaded&&f._loaded.call(f,{width:c.width,height:c.height,ratio:c.width/c.height,url:a}))};return this.attr("href",c.src=this.src=a,b.xlink)},loaded:function(a){this._loaded=a;return this}},construct:{image:function(a,f,c){return this.put(new b.Image).load(a).size(f||0,c||f||0)}}});b.Text=b.invent({create:function(){this.constructor.call(this,b.create("text"));
  this.dom.leading=new b.Number(1.3);this._rebuild=!0;this._build=!1;this.attr("font-family",b.defaults.attrs["font-family"])},inherit:b.Shape,extend:{clone:function(){var a=t(this.node.cloneNode(!0));this.after(a);return a},x:function(a){if(null==a)return this.attr("x");this.textPath||this.lines().each(function(){this.dom.newLined&&this.x(a)});return this.attr("x",a)},y:function(a){var b=this.attr("y"),c="number"===typeof b?b-this.bbox().y:0;return null==a?"number"===typeof b?b-c:b:this.attr("y","number"===
  typeof a?a+c:a)},cx:function(a){return null==a?this.bbox().cx:this.x(a-this.bbox().width/2)},cy:function(a){return null==a?this.bbox().cy:this.y(a-this.bbox().height/2)},text:function(a){if("undefined"===typeof a){a="";for(var f=this.node.childNodes,c=0,d=f.length;c<d;++c)0!=c&&3!=f[c].nodeType&&1==b.adopt(f[c]).dom.newLined&&(a+="\n"),a+=f[c].textContent;return a}this.clear().build(!0);if("function"===typeof a)a.call(this,this);else for(a=a.split("\n"),c=0,f=a.length;c<f;c++)this.tspan(a[c]).newLine();
  return this.build(!1).rebuild()},size:function(a){return this.attr("font-size",a).rebuild()},leading:function(a){if(null==a)return this.dom.leading;this.dom.leading=new b.Number(a);return this.rebuild()},lines:function(){var a=b.utils.map(b.utils.filterSVGElements(this.node.childNodes),function(a){return b.adopt(a)});return new b.Set(a)},rebuild:function(a){"boolean"==typeof a&&(this._rebuild=a);if(this._rebuild){var f=this,c=0,d=this.dom.leading*new b.Number(this.attr("font-size"));this.lines().each(function(){this.dom.newLined&&
  (this.textPath||this.attr("x",f.attr("x")),"\n"==this.text()?c+=d:(this.attr("dy",d+c),c=0))});this.fire("rebuild")}return this},build:function(a){this._build=!!a;return this},setData:function(a){this.dom=a;this.dom.leading=a.leading?new b.Number(a.leading.value,a.leading.unit):new b.Number(1.3);return this}},construct:{text:function(a){return this.put(new b.Text).text(a)},plain:function(a){return this.put(new b.Text).plain(a)}}});b.Tspan=b.invent({create:"tspan",inherit:b.Shape,extend:{text:function(a){if(null==
  a)return this.node.textContent+(this.dom.newLined?"\n":"");"function"===typeof a?a.call(this,this):this.plain(a);return this},dx:function(a){return this.attr("dx",a)},dy:function(a){return this.attr("dy",a)},newLine:function(){var a=this.parent(b.Text);this.dom.newLined=!0;return this.dy(a.dom.leading*a.attr("font-size")).attr("x",a.x())}}});b.extend(b.Text,b.Tspan,{plain:function(a){!1===this._build&&this.clear();this.node.appendChild(h.createTextNode(a));return this},tspan:function(a){var f=(this.textPath&&
  this.textPath()||this).node,c=new b.Tspan;!1===this._build&&this.clear();f.appendChild(c.node);return c.text(a)},clear:function(){for(var a=(this.textPath&&this.textPath()||this).node;a.hasChildNodes();)a.removeChild(a.lastChild);return this},length:function(){return this.node.getComputedTextLength()}});b.TextPath=b.invent({create:"textPath",inherit:b.Element,parent:b.Text,construct:{path:function(a){var f=new b.TextPath;for(a=this.doc().defs().path(a);this.node.hasChildNodes();)f.node.appendChild(this.node.firstChild);
  this.node.appendChild(f.node);f.attr("href","#"+a,b.xlink);return this},plot:function(a){var b=this.track();b&&b.plot(a);return this},track:function(){var a=this.textPath();if(a)return a.reference("href")},textPath:function(){if(this.node.firstChild&&"textPath"==this.node.firstChild.nodeName)return b.adopt(this.node.firstChild)}}});b.Nested=b.invent({create:function(){this.constructor.call(this,b.create("svg"));this.style("overflow","visible")},inherit:b.Container,construct:{nested:function(){return this.put(new b.Nested)}}});
  b.A=b.invent({create:"a",inherit:b.Container,extend:{to:function(a){return this.attr("href",a,b.xlink)},show:function(a){return this.attr("show",a,b.xlink)},target:function(a){return this.attr("target",a)}},construct:{link:function(a){return this.put(new b.A).to(a)}}});b.extend(b.Element,{linkTo:function(a){var f=new b.A;"function"==typeof a?a.call(f,f):f.to(a);return this.parent().put(f).put(this)}});b.Marker=b.invent({create:"marker",inherit:b.Container,extend:{width:function(a){return this.attr("markerWidth",
  a)},height:function(a){return this.attr("markerHeight",a)},ref:function(a,b){return this.attr("refX",a).attr("refY",b)},update:function(a){this.clear();"function"==typeof a&&a.call(this,this);return this},toString:function(){return"url(#"+this.id()+")"}},construct:{marker:function(a,b,c){return this.defs().marker(a,b,c)}}});b.extend(b.Defs,{marker:function(a,f,c){return this.put(new b.Marker).size(a,f).ref(a/2,f/2).viewbox(0,0,a,f).attr("orient","auto").update(c)}});b.extend(b.Line,b.Polyline,b.Polygon,
  b.Path,{marker:function(a,c,d,e){var k=["marker"];"all"!=a&&k.push(a);k=k.join("-");a=c instanceof b.Marker?c:this.doc().marker(c,d,e);return this.attr(k,a)}});var y={stroke:"color width opacity linecap linejoin miterlimit dasharray dashoffset".split(" "),fill:["color","opacity","rule"],prefix:function(a,b){return"color"==b?a:a+"-"+b}};["fill","stroke"].forEach(function(a){var c,d={};d[a]=function(d){if("string"==typeof d||b.Color.isRgb(d)||d&&"function"===typeof d.fill)this.attr(a,d);else for(c=
  y[a].length-1;0<=c;c--)null!=d[y[a][c]]&&this.attr(y.prefix(a,y[a][c]),d[y[a][c]]);return this};b.extend(b.Element,b.FX,d)});b.extend(b.Element,b.FX,{rotate:function(a,b,c){return this.transform({rotation:a,cx:b,cy:c})},skew:function(a,b,c,d){return this.transform({skewX:a,skewY:b,cx:c,cy:d})},scale:function(a,b,c,d){return 1==arguments.length||3==arguments.length?this.transform({scale:a,cx:b,cy:c}):this.transform({scaleX:a,scaleY:b,cx:c,cy:d})},translate:function(a,b){return this.transform({x:a,
  y:b})},flip:function(a,b){return this.transform({flip:a,offset:b})},matrix:function(a){return this.attr("transform",new b.Matrix(a))},opacity:function(a){return this.attr("opacity",a)},dx:function(a){return this.x((this.target||this).x()+a)},dy:function(a){return this.y((this.target||this).y()+a)},dmove:function(a,b){return this.dx(a).dy(b)}});b.extend(b.Rect,b.Ellipse,b.Circle,b.Gradient,b.FX,{radius:function(a,c){var d=(this.target||this).type;return"radial"==d||"circle"==d?this.attr({r:new b.Number(a)}):
  this.rx(a).ry(null==c?a:c)}});b.extend(b.Path,{length:function(){return this.node.getTotalLength()},pointAt:function(a){return this.node.getPointAtLength(a)}});b.extend(b.Parent,b.Text,b.FX,{font:function(a){for(var b in a)"leading"==b?this.leading(a[b]):"anchor"==b?this.attr("text-anchor",a[b]):"size"==b||"family"==b||"weight"==b||"stretch"==b||"variant"==b||"style"==b?this.attr("font-"+b,a[b]):this.attr(b,a[b]);return this}});b.Set=b.invent({create:function(a){Array.isArray(a)?this.members=a:this.clear()},
  extend:{add:function(){var a,b,c=[].slice.call(arguments);a=0;for(b=c.length;a<b;a++)this.members.push(c[a]);return this},remove:function(a){a=this.index(a);-1<a&&this.members.splice(a,1);return this},each:function(a){for(var b=0,c=this.members.length;b<c;b++)a.apply(this.members[b],[b,this.members]);return this},clear:function(){this.members=[];return this},length:function(){return this.members.length},has:function(a){return 0<=this.index(a)},index:function(a){return this.members.indexOf(a)},get:function(a){return this.members[a]},
  first:function(){return this.get(0)},last:function(){return this.get(this.members.length-1)},valueOf:function(){return this.members},bbox:function(){var a=new b.BBox;if(0==this.members.length)return a;var c=this.members[0].rbox();a.x=c.x;a.y=c.y;a.width=c.width;a.height=c.height;this.each(function(){a=a.merge(this.rbox())});return a}},construct:{set:function(a){return new b.Set(a)}}});b.FX.Set=b.invent({create:function(a){this.set=a}});b.Set.inherit=function(){var a,c=[];for(a in b.Shape.prototype)"function"==
  typeof b.Shape.prototype[a]&&"function"!=typeof b.Set.prototype[a]&&c.push(a);c.forEach(function(a){b.Set.prototype[a]=function(){for(var c=0,f=this.members.length;c<f;c++)this.members[c]&&"function"==typeof this.members[c][a]&&this.members[c][a].apply(this.members[c],arguments);return"animate"==a?this.fx||(this.fx=new b.FX.Set(this)):this}});c=[];for(a in b.FX.prototype)"function"==typeof b.FX.prototype[a]&&"function"!=typeof b.FX.Set.prototype[a]&&c.push(a);c.forEach(function(a){b.FX.Set.prototype[a]=
  function(){for(var b=0,c=this.set.members.length;b<c;b++)this.set.members[b].fx[a].apply(this.set.members[b].fx,arguments);return this}})};b.extend(b.Element,{data:function(a,b,c){if("object"==typeof a)for(b in a)this.data(b,a[b]);else if(2>arguments.length)try{return JSON.parse(this.attr("data-"+a))}catch(d){return this.attr("data-"+a)}else this.attr("data-"+a,null===b?null:!0===c||"string"===typeof b||"number"===typeof b?b:JSON.stringify(b));return this}});b.extend(b.Element,{remember:function(a,
  b){if("object"==typeof arguments[0])for(b in a)this.remember(b,a[b]);else{if(1==arguments.length)return this.memory()[a];this.memory()[a]=b}return this},forget:function(){if(0==arguments.length)this._memory={};else for(var a=arguments.length-1;0<=a;a--)delete this.memory()[arguments[a]];return this},memory:function(){return this._memory||(this._memory={})}});b.get=function(a){a=h.getElementById(x(a)||a);return b.adopt(a)};b.select=function(a,c){return new b.Set(b.utils.map((c||h).querySelectorAll(a),
  function(a){return b.adopt(a)}))};b.extend(b.Parent,{select:function(a){return b.select(a,this.node)}});var v="abcdef".split("");if("function"!==typeof A){var A=function(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=h.createEvent("CustomEvent");c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail);return c};A.prototype=m.Event.prototype;m.CustomEvent=A}(function(a){for(var b=0,c=["moz","webkit"],d=0;d<c.length&&!m.requestAnimationFrame;++d)a.requestAnimationFrame=a[c[d]+"RequestAnimationFrame"],
  a.cancelAnimationFrame=a[c[d]+"CancelAnimationFrame"]||a[c[d]+"CancelRequestAnimationFrame"];a.requestAnimationFrame=a.requestAnimationFrame||function(c){var d=(new Date).getTime(),e=Math.max(0,16-(d-b)),l=a.setTimeout(function(){c(d+e)},e);b=d+e;return l};a.cancelAnimationFrame=a.cancelAnimationFrame||a.clearTimeout})(m);return b});
  define("path",["exports","module"],function(m,h){var g=function(){return function(c,d){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c)){var g=[],e=!0,h=!1,m=void 0;try{for(var n=c[Symbol.iterator](),p;!(e=(p=n.next()).done)&&(g.push(p.value),!d||g.length!==d);e=!0);}catch(t){h=!0,m=t}finally{try{if(!e&&n["return"])n["return"]()}finally{if(h)throw m;}}return g}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),d=function k(d){var e=d||[],h=function(d){var e=
  d.command;d=d.params.map(function(d){d=d.toFixed(6);for(var e=d.length;"0"===d.charAt(e-1);)--e;"."===d.charAt(e-1)&&--e;return d.substr(0,e)});return e+" "+d.join(" ")},m=function(d,e){var k=d.command,h=d.params,b=g(e,2),q=b[0],b=b[1];switch(k){case "M":return[h[0],h[1]];case "L":return[h[0],h[1]];case "H":return[h[0],b];case "V":return[q,h[0]];case "Z":return null;case "C":return[h[4],h[5]];case "S":return[h[2],h[3]];case "Q":return[h[2],h[3]];case "T":return[h[0],h[1]];case "A":return[h[5],h[6]]}};
  d=function(d,e){return function(k){var g="object"===typeof k?d.map(function(b){return k[b]}):arguments;return e.apply(null,g)}};var n=function(d){var g=e.slice(0,e.length);g.push(d);return k(g)};return{moveto:d(["x","y"],function(d,e){return n({command:"M",params:[d,e]})}),lineto:d(["x","y"],function(d,e){return n({command:"L",params:[d,e]})}),hlineto:d(["x"],function(d){return n({command:"H",params:[d]})}),vlineto:d(["y"],function(d){return n({command:"V",params:[d]})}),closepath:function(){return n({command:"Z",
  params:[]})},curveto:d("x1 y1 x2 y2 x y".split(" "),function(d,e,k,g,b,h){return n({command:"C",params:[d,e,k,g,b,h]})}),smoothcurveto:d(["x2","y2","x","y"],function(d,e,k,g){return n({command:"S",params:[d,e,k,g]})}),qcurveto:d(["x1","y1","x","y"],function(d,e,k,g){return n({command:"Q",params:[d,e,k,g]})}),smoothqcurveto:d(["x","y"],function(d,e){return n({command:"T",params:[d,e]})}),arc:d("rx ry xrot largeArcFlag sweepFlag x y".split(" "),function(d,e,k,g,b,h,q){return n({command:"A",params:[d,
  e,k,g,b,h,q]})}),print:function(){return e.map(h).join(" ")},points:function(){var d=[],k=[0,0],g=!0,h=!1,b=void 0;try{for(var q=e[Symbol.iterator](),r;!(g=(r=q.next()).done);g=!0){var n=m(r.value,k);(k=n)&&d.push(n)}}catch(a){h=!0,b=a}finally{try{if(!g&&q["return"])q["return"]()}finally{if(h)throw b;}}return d},instructions:function(){return e.slice(0,e.length)},connect:function(d){var e=this.points(),h=e[e.length-1],e=d.points()[0];d=d.instructions().slice(1);var q=g(h,2),h=q[0],q=q[1],b=g(e,2),
  m=b[1];h===b[0]&&q===m||d.unshift({command:"L",params:e});return k(this.instructions().concat(d))}}};h.exports=function(){return d()}});define("geometry",[],function(){return{circle:{tenth:.2*Math.PI,eighth:.25*Math.PI,quarter:.5*Math.PI,half:Math.PI,whole:2*Math.PI,getPointOnCircumference:function(m,h,g,d){return{x:m+g*Math.sin(d),y:h+-g*Math.cos(d)}},getAngle:function(m,h,g){g="undefined"===typeof g?this.whole:g;return g/h*m}}}});
  define("circle-segment",["svg-js","path","geometry"],function(m,h,g){m.CircleSegment=m.invent({create:"path",inherit:m.Path,construct:{circleSegment:function(d,c,k,q,e){var r=g.circle.getPointOnCircumference(d,c,k,q),w=g.circle.getPointOnCircumference(d,c,k,e);q=e-q>Math.PI?1:0;d=h().moveto(d,c).lineto(r.x,r.y).arc(k,k,0,q,1,w.x,w.y).closepath().print();return this.put(new m.CircleSegment).attr({d:d})}}});return{}});
  define("configuration-builder",[],function(){return function(m){var h={};m.forEach(function(g){for(var d in g)g.hasOwnProperty(d)&&(h[d]=g[d])});return h}});
  define("float",[],function(){return{left:function(){var m=0,h=0,g=0,d=this.xPadding,c=this.yPadding,k=this.flowWidth;this.children().forEach(function(q,e){var r=q.bbox();r.height+h>g&&(g=r.height+h);m+r.width>k&&(m=0,h=g+c);q.move(m,h);m+=r.width+d})},right:function(){var m=this.flowWidth,h=0,g=0,d=this.xPadding,c=this.yPadding,k=this.flowWidth;this.children().forEach(function(q,e){var r=q.bbox();r.height+h>g&&(g=r.height+h);0>m-r.width&&(m=k,h=g+c);m-=r.width;q.move(m,h);m-=d})}}});
  define("grid",[],function(){function m(h){var g={height:0,width:0};h.forEach(function(d){d=d.bbox();d.width>g.width&&(g.width=d.width);d.height>g.height&&(g.height=d.height)});return g}return{left:function(){var h=m(this.children()),g=Math.floor((this.flowWidth+this.xPadding)/(h.width+this.xPadding));1>g&&(g=1);var d=this.xPadding,c=this.yPadding;this.children().forEach(function(k,q){k.move(q%g*(h.width+d),Math.floor(q/g)*(h.height+c))})},right:function(){var h=m(this.children()),g=Math.floor((this.flowWidth+
  this.xPadding)/(h.width+this.xPadding));1>g&&(g=1);var d=this.xPadding,c=this.yPadding,k=this.flowWidth;this.children().forEach(function(q,e){var m=Math.floor(e/g),w=k-e%g*(d+h.width)-q.bbox().width;q.move(w,m*(h.height+c))})}}});
  define("center",[],function(){function m(h){var g=[];h.forEach(function(d){g.push(d.bbox().width)});return g.reduce(function(d,c){return d+c})}return function(){var h=m(this.children())+this.xPadding*(this.children().length-1),g=this.flowWidth/2-h/2,d=this.xPadding;this.children().forEach(function(c){c.move(g,0);g+=c.bbox().width+d})}});
  define("flow",["svg-js","float","grid","center"],function(m,h,g,d){m.Flow=m.invent({create:"g",inherit:m.G,extend:{setWidth:function(c){this.flowWidth=c;return this},setPadding:function(c,d){this.xPadding=c;this.yPadding=d;return this},floatLeft:h.left,floatRight:h.right,gridLeft:g.left,gridRight:g.right,center:d},construct:{flow:function(c,d,g){return this.put(new m.Flow).setWidth(c).setPadding(d,g)}}})});
  define("key",["flow","float","grid","svg-js"],function(m,h,g,d){return function(c,d,g,e,h,m){var n={INDICATOR_SIZE:13,TITLE_PADDING_LEFT:7,KEY_ITEM_PADDING_LEFT:10,PADDING_TOP:20,PADDING_RIGHT:20,PADDING_BOTTOM:20,PADDING_LEFT:20},p=c.group().addClass("fm-key");p.configuration=n;var t=c.line(0,0,d,0).addClass("fm-key-top-border"),u,x=!1;p.backgroundColorClass="fm-datum-color-neutral";p.setValues=function(b,g){p.keyItems&&(x=!0,p.keyItems.clear(),p.keyItems=c.flow(d-n.PADDING_RIGHT-n.PADDING_LEFT,
  n.KEY_ITEM_PADDING_LEFT,n.PADDING_BOTTOM).addClass("fm-key-items"));p.keyItems=c.flow(d-n.PADDING_RIGHT-n.PADDING_LEFT,n.KEY_ITEM_PADDING_LEFT,n.PADDING_BOTTOM).addClass("fm-key-items");b.forEach(function(d,a){var f=c.group(),l=c.text(d).move(n.INDICATOR_SIZE+n.TITLE_PADDING_LEFT,0).addClass("fm-key-value-title"),k=c.rect(n.INDICATOR_SIZE,n.INDICATOR_SIZE).addClass("fm-key-value-indicator");m&&a==b.length-1?k.addClass("fm-datum-color-overflow"):g&&g[a]?k.attr({fill:g[a]}):k.addClass(e[a]);f.add(l);
  f.add(k);p.keyItems.add(f)});p.keyItems.gridLeft();var h=p.keyItems.bbox().height+n.PADDING_TOP+n.PADDING_BOTTOM;x?p.background.attr("height",h):p.background=c.rect(d,h).addClass("fm-key-background "+p.backgroundColorClass);u=c.flow(d,100,100);u.add(p.keyItems);u.center();u.move(0,n.PADDING_TOP);p.add(p.background);p.add(t);p.add(u)};p.clearItems=function(){p.keyItems.clear()};p.setValues(g,h);return p}});
  define("configuration",["circle-segment","configuration-builder","key"],function(m,h,g){return h([m,{ASPECT_RATIO:2/3,ASPECT_RATIO_BREAKPOINT:4/3,MAX_HEIGHT:600,MIN_RADIUS:100,DEBOUNCE_TIMEOUT:200,MIN_RADIANS:Math.PI/20,SPILLOVER_TOP:50,SPILLOVER_RIGHT:15,SPILLOVER_BOTTOM:50,SPILLOVER_LEFT:.15,PADDING_FOR_LABELS:70,OVERFLOW_SPREAD:6,OVERFLOW_INNER_RADIUS:1.2,OVERFLOW_OUTER_RADIUS:1.36,BRACKET_INNER_RADIUS_ADJUST:.03,BRACKET_MIDDLE_RADIUS_ADJUST:.1,BRACKET_OUTER_RADIUS_ADJUST:.15,TOOLTIP_DISTANCE_FROM_CIRCUMFERENCE:3,
  KEY_TOP_MARGIN:30,KEY_LEFT_MARGIN:20}])});
  define("dashed-bracket",["svg-js","path","geometry"],function(m,h,g){m.DashedBracket=m.invent({create:"path",inherit:m.Path,extend:{},construct:{dashedBracket:function(d,c,k,q,e,r,w){g.circle.getPointOnCircumference(d,c,k,r);g.circle.getPointOnCircumference(d,c,k,w);var n=g.circle.getPointOnCircumference(d,c,q,r),p=g.circle.getPointOnCircumference(d,c,q,w),t=g.circle.getPointOnCircumference(d,c,e,r);e=g.circle.getPointOnCircumference(d,c,e,w);var u=g.circle.getPointOnCircumference(d,c,q,w-(w-r)/2);
  d=g.circle.getPointOnCircumference(d,c,k,w-(w-r)/2);q=h().moveto(t.x,t.y).lineto(n.x,n.y).arc(q,q,0,w-r>Math.PI?1:0,1,p.x,p.y).lineto(e.x,e.y).moveto(u.x,u.y).lineto(d.x,d.y).print();return this.put(new m.DashedBracket).attr({d:q}).addClass("fm-dashed-bracket")}}})});
  define("doughnut-segment",["svg-js","path","geometry"],function(m,h,g){m.DoughnutSegment=m.invent({create:"path",inherit:m.Path,construct:{doughnutSegment:function(d,c,k,q,e,r){var w=g.circle.getPointOnCircumference(d,c,k,e),n=g.circle.getPointOnCircumference(d,c,k,r),p=g.circle.getPointOnCircumference(d,c,q,r);d=g.circle.getPointOnCircumference(d,c,q,e);e=r-e>Math.PI?1:0;k=h().moveto(w.x,w.y).arc(k,k,0,e,1,n.x,n.y).lineto(p.x,p.y).arc(q,q,0,e,0,d.x,d.y).closepath().print();return this.put(new m.DoughnutSegment).attr({d:k})}}});
  return{}});
  define("number",[],function(){return{roundToOrder:function(m,h,g){function d(c,k){var h=Math.abs(c);h>=Math.pow(10,g)?(c=d(c/10,k),c*=10):h<Math.pow(10,g-1)?(c=d(10*c,k),c/=10):(h=Math.round(c/k)*k,0===h&&(g++,h=d(c,k)),c=h);return parseFloat(c.toPrecision(g+1))}m=parseFloat(m);if(0==m)return 0;g||(g=2);return 1===h?parseFloat(m.toPrecision(g)):d(m,h)},renderValue:function(m){function h(c){if(0==c)return 0;if(1<=c&&1E3>c)return c;if(1>c)return d-=3,h(1E3*c);if(1E3<=c)return d+=3,h(c/1E3)}if(0===m)return"0";
  if(!m)return"";var g=1;0>m&&(g=-1,m*=-1);m=this.roundToOrder(m,1,3);var d=0,c=new String(g*h(m));return 3==d?c+"k":6==d?c+"m":9==d?c+"bn":12==d?c+" trillion":new String(g*m)},getDataTotal:function(m){for(var h=0,g=0;g<m.length;g++)h+=m[g].value;return h},getAngle:function(m,h,g){g="undefined"===typeof g?Circle.whole:g;return g/h*m},getFactor:function(m){for(var h=m-1;1<h;h--){var g=m/h;if(parseInt(g)==g)return h}return m}}});
  define("scale",[],function(){function m(d,c,k){var g;g=(c-d)/(k-1);var e=Math.pow(10,Math.floor(Math.log(g)/Math.LN10));g=Math.ceil(g/e)*e;if(0>c*d){k=[];for(e=0;e<c;e+=g)k.push(e);k.push(e);for(e=-g;e>d;e-=g)k.unshift(e);k.unshift(e);c=k}else for(e=g*k,e>c&&(d=0<=d&&d<g?0:d-(e-(c-d))/2),c=[];c.length<k+1;)c.push(d),d+=g;return c}var h=function(){this.range=this.domain=null};h.prototype.map=function(d){d=this.domain.getProportion(d);return this.range.getValue(d)};var g=0;return function(){return{withIncrements:function(d){g=
  d;return this},project:function(d){var c=new h;c.domain=d;return{onto:function(d){c.range=d;return c}}},domains:{RealNumbers:function(d,c){0<g?(this.increments=m(d,c,g,!1),this.min=this.increments[0],this.max=this.increments[this.increments.length-1]):(this.min=d,this.max=c);this.getProportion=function(c){return(c-this.min)/(this.max-this.min)};return this}},ranges:{Angle:function(d,c){void 0===d&&(d=0);void 0===c&&(c=2*Math.PI);this.getValue=function(k){k=d+(c-d)*k;if(k>2*Math.PI)k=k%2*Math.PI;else if(0>
  k)for(;0>k;)k+=2*Math.PI;return k};return this},Chromatic:{},Linear:function(d,c){if(void 0===d||void 0===c)throw"Both start and end points must be defined for linear scales.";this.getValue=function(k){return d+(c-d)*k};return this},Logarithmic:{},PointOnPath:{}}}}});
  define("tooltip-background",["svg-js","path"],function(m,h){m.TooltipBackground=m.invent({create:"path",inherit:m.Path,extend:{setConfiguration:function(g){this.configuration=g;return this}},construct:{tooltipBackground:function(g,d,c){function k(){var a=[],f=d-2*b.BORDER_RADIUS;a.push({x:-b.ARROW_THICKNESS/2,y:b.ARROW_LENGTH});a.push({x:-f/2,y:b.ARROW_LENGTH});a.push({x:-d/2,y:b.ARROW_LENGTH});a.push({x:-d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS});a.push({x:-d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS+y});a.push({x:-d/
  2,y:b.ARROW_LENGTH+c});a.push({x:-d/2+b.BORDER_RADIUS,y:b.ARROW_LENGTH+c});a.push({x:f/2,y:b.ARROW_LENGTH+c});a.push({x:d/2,y:b.ARROW_LENGTH+c});a.push({x:d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS+y});a.push({x:d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS});a.push({x:d/2,y:b.ARROW_LENGTH});a.push({x:f/2,y:b.ARROW_LENGTH});a.push({x:b.ARROW_THICKNESS/2,y:b.ARROW_LENGTH});return a}function q(){var a=[];a.push({x:b.ARROW_LENGTH,y:-.5*b.ARROW_THICKNESS});a.push({x:b.ARROW_LENGTH,y:-.5*y});a.push({x:b.ARROW_LENGTH,
  y:-.5*c});a.push({x:b.ARROW_LENGTH+b.BORDER_RADIUS,y:-.5*c});a.push({x:b.ARROW_LENGTH+d-b.BORDER_RADIUS,y:-.5*c});a.push({x:b.ARROW_LENGTH+d,y:-.5*c});a.push({x:b.ARROW_LENGTH+d,y:-.5*y});a.push({x:b.ARROW_LENGTH+d,y:.5*y});a.push({x:b.ARROW_LENGTH+d,y:.5*c});a.push({x:b.ARROW_LENGTH+d-b.BORDER_RADIUS,y:.5*c});a.push({x:b.ARROW_LENGTH+b.BORDER_RADIUS,y:.5*c});a.push({x:b.ARROW_LENGTH,y:.5*c});a.push({x:b.ARROW_LENGTH,y:.5*y});a.push({x:b.ARROW_LENGTH,y:.5*b.ARROW_THICKNESS});return a}function e(){var a=
  [],f=d-2*b.BORDER_RADIUS;a.push({x:-b.ARROW_THICKNESS/2,y:b.ARROW_LENGTH});a.push({x:-f/2,y:b.ARROW_LENGTH});a.push({x:-d/2,y:b.ARROW_LENGTH});a.push({x:-d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS});a.push({x:-d/2,y:b.ARROW_LENGTH+b.BORDER_RADIUS+y});a.push({x:-d/2,y:b.ARROW_LENGTH+c});a.push({x:-d/2+b.BORDER_RADIUS,y:b.ARROW_LENGTH+c});a.push({x:d/2,y:b.ARROW_LENGTH+c});a.push({x:d/2,y:b.ARROW_LENGTH});a.push({x:b.ARROW_THICKNESS/2,y:b.ARROW_LENGTH});return a}function r(){var a=[];a.push({x:b.ARROW_LENGTH,
  y:-.5*b.ARROW_THICKNESS});a.push({x:b.ARROW_LENGTH,y:-.5*y});a.push({x:b.ARROW_LENGTH,y:-.5*c});a.push({x:b.ARROW_LENGTH+b.BORDER_RADIUS,y:-.5*c});a.push({x:b.ARROW_LENGTH+d,y:-.5*c});a.push({x:b.ARROW_LENGTH+d,y:.5*c});a.push({x:b.ARROW_LENGTH+b.BORDER_RADIUS,y:.5*c});a.push({x:b.ARROW_LENGTH,y:.5*c});a.push({x:b.ARROW_LENGTH,y:.5*y});a.push({x:b.ARROW_LENGTH,y:.5*b.ARROW_THICKNESS});return a}function w(){var a=[];a.push({x:-d+b.BORDER_RADIUS,y:0});a.push({x:-d,y:0});a.push({x:-d,y:b.BORDER_RADIUS});
  a.push({x:-d,y:c-b.BORDER_RADIUS});a.push({x:-d,y:c});a.push({x:-d+b.BORDER_RADIUS,y:c});a.push({x:0,y:c});return a}function n(a){return h().moveto(0,0).lineto(a[0].x,a[0].y).lineto(a[1].x,a[1].y).smoothcurveto(a[2].x,a[2].y,a[3].x,a[3].y).lineto(a[4].x,a[4].y).smoothcurveto(a[5].x,a[5].y,a[6].x,a[6].y).lineto(a[7].x,a[7].y).smoothcurveto(a[8].x,a[8].y,a[9].x,a[9].y).lineto(a[10].x,a[10].y).smoothcurveto(a[11].x,a[11].y,a[12].x,a[12].y).lineto(a[13].x,a[13].y).closepath().print()}function p(a){return h().moveto(0,
  0).lineto(a[0].x,a[0].y).lineto(a[1].x,a[1].y).smoothcurveto(a[2].x,a[2].y,a[3].x,a[3].y).lineto(a[4].x,a[4].y).smoothcurveto(a[5].x,a[5].y,a[6].x,a[6].y).lineto(a[7],a[7]).smoothcurveto(a[8].x,a[8].y,a[9].x,a[9].y).lineto(a[10].x,a[10].y).smoothcurveto(a[11].x,a[11].y,a[12].x,a[12].y).lineto(a[13].x,a[13].y).closepath().print()}function t(a){return h().moveto(0,0).lineto(a[0].x,a[0].y).smoothcurveto(a[1].x,a[1].y,a[2].x,a[2].y).lineto(a[3].x,a[3].y).smoothcurveto(a[4].x,a[4].y,a[5].x,a[5].y).lineto(a[6].x,
  a[6].y).closepath().print()}function u(a){return h().moveto(0,0).lineto(a[0].x,a[0].y).lineto(a[1].x,a[1].y).smoothcurveto(a[2].x,a[2].y,a[3].x,a[3].y).lineto(a[4].x,a[4].y).smoothcurveto(a[5].x,a[5].y,a[6].x,a[6].y).lineto(a[7].x,a[7].y).lineto(a[8].x,a[8].y).lineto(a[9].x,a[9].y).lineto(0,0).print()}function x(a){return h().moveto(0,0).lineto(a[0].x,a[0].y).lineto(a[1].x,a[1].y).smoothcurveto(a[2].x,a[2].y,a[3].x,a[3].y).lineto(a[4].x,a[4].y).lineto(a[5].x,a[5].y).lineto(a[6].x,a[6].y).smoothcurveto(a[7].x,
  a[7].y,a[8].x,a[8].y).lineto(a[9].x,a[9].y).closepath().print()}var b={ARROW_LENGTH:7,ARROW_THICKNESS:10,BORDER_RADIUS:5},y=c-2*b.BORDER_RADIUS,v,A=new m.TooltipBackground;if("singleTop"==g||"singleBottom"==g)v=k(),v=n(v);else if("singleLeft"==g||"singleRight"==g)v=q(),v=p(v);else if("leftSection"==g||"rightSection"==g)v=w(),v=t(v);else if("leftSectionWithTopArrow"==g||"rightSectionWithBottomArrow"==g||"rightSectionWithTopArrow"==g||"leftSectionWithBottomArrow"==g)v=e(),v=u(v);else if("leftSectionWithLeftArrow"==
  g||"rightSectionWithRightArrow"==g)v=r(),v=x(v);A.attr({d:v}).addClass("fm-tooltip-background").setConfiguration(b);"singleRight"==g||"rightSection"==g||"rightSectionWithRightArrow"==g||"rightSectionWithTopArrow"==g?A.scale(-1,1):"singleBottom"==g||"leftSectionWithBottomArrow"==g?A.scale(1,-1):"rightSectionWithBottomArrow"==g&&A.scale(-1,-1);return A}}})});define("G.unshift",["svg-js"],function(m){m.extend(m.G,{unshift:function(h){this.node.insertBefore(h.node,this.children()[0].node)}})});
  define("tooltip",["svg-js","tooltip-background","G.unshift"],function(m,h,g){return function(d,c,k,g){var e={PADDING:7,ICON_SPACING:9},h=d.group().addClass("fm-tooltip");h.configuration=e;h.mainTextObject=d.text(""+c);h.add(h.mainTextObject);c=h.mainTextObject.bbox();var m=c.width+2*e.PADDING,n=c.height+2*e.PADDING,p=0,t=0;g&&(n=g.bbox(),p=n.width,t=n.height,m=c.width+p+2*e.ICON_SPACING+e.PADDING,n=Math.max(t,c.height)+2*e.PADDING,h.add(g));var u;switch(k){case "left":u="singleLeft";break;case "right":u=
  "singleRight";break;case "top":u="singleTop";break;case "bottom":u="singleBottom";break;default:u="singleLeft"}h.background=d.tooltipBackground(u,m,n);h.unshift(h.background);"left"==k?(d=h.background.configuration.ARROW_LENGTH,g?(d+=e.ICON_SPACING,g.move(d,-t/2),d+=p+e.ICON_SPACING):d+=e.PADDING,h.mainTextObject.move(d,-c.height/2)):"right"==k?(d=-h.background.configuration.ARROW_LENGTH,g?(d-=e.ICON_SPACING,g.move(d-p,-t/2),d-=p+e.ICON_SPACING):d-=e.PADDING,h.mainTextObject.attr({"text-anchor":"end"}),
  h.mainTextObject.move(d,-c.height/2)):"top"==k?(d=-e.PADDING,g?(d+=e.ICON_SPACING,g.move(d,-t/2),d+=p+e.ICON_SPACING):d+=e.PADDING,h.mainTextObject.attr({"text-anchor":"middle"}),h.mainTextObject.move(d,h.background.configuration.ARROW_LENGTH+c.height/2)):"bottom"==k&&(d=-e.PADDING,g?(d+=e.ICON_SPACING,g.move(d,-t/2),d+=p+e.ICON_SPACING):d+=e.PADDING,h.mainTextObject.attr({"text-anchor":"middle"}),h.mainTextObject.move(d,-h.background.configuration.ARROW_LENGTH-c.height/2-n/2));return h}});
  define("two-section-tooltip",["svg-js","tooltip-background","G.unshift"],function(m,h,g){return function(d,c,k,g){var e=d.group().addClass("fm-tooltip");k=k?k:"";e.mainTextObject=d.text(""+c);e.secondaryTextObject=d.text(""+k);e.background=d.group();e.add(e.mainTextObject);e.add(e.secondaryTextObject);e.unshift(e.background);c=e.mainTextObject.bbox();k=e.secondaryTextObject.bbox();var h=Math.max(c.height,k.height)+14,m=c.width+14,n=k.width+14,p=0;"left"==g?(e.background.leftSection=d.tooltipBackground("leftSectionWithLeftArrow",
  m,h),e.background.rightSection=d.tooltipBackground("rightSection",n,h).move(-(n+m+e.background.leftSection.configuration.ARROW_LENGTH+1),-h/2),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),p=p+e.background.leftSection.configuration.ARROW_LENGTH+7,e.mainTextObject.move(p,-c.height/2),p=p+14+1+c.width,e.secondaryTextObject.move(p,-c.height/2)):"right"==g?(e.background.leftSection=d.tooltipBackground("leftSection",m,h),e.background.rightSection=d.tooltipBackground("rightSectionWithRightArrow",
  n,h),e.background.leftSection.move(-e.background.leftSection.configuration.ARROW_LENGTH-n-m-1,-h/2),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),p=p-e.background.rightSection.configuration.ARROW_LENGTH-7,e.secondaryTextObject.attr({"text-anchor":"end"}),e.secondaryTextObject.move(p,-k.height/2),p=p-14-1-k.width,e.mainTextObject.attr({"text-anchor":"end"}),e.mainTextObject.move(p,-c.height/2)):"topLeft"==g?(e.background.leftSection=d.tooltipBackground("leftSectionWithTopArrow",
  m,h),e.background.rightSection=d.tooltipBackground("rightSection",n,h).move(-(m/2+1+n),e.background.leftSection.configuration.ARROW_LENGTH),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),d=-Math.max(c.height,k.height)/2+e.background.leftSection.configuration.ARROW_LENGTH+h/2,e.mainTextObject.attr({"text-anchor":"middle"}),e.mainTextObject.move(p,d),e.secondaryTextObject.move(p+m/2+1+7,d)):"bottomLeft"==g?(e.background.leftSection=d.tooltipBackground("leftSectionWithBottomArrow",
  m,h),e.background.rightSection=d.tooltipBackground("rightSection",n,h).move(-(m/2+1+n),-h-e.background.leftSection.configuration.ARROW_LENGTH),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),d=-Math.max(c.height,k.height)/2-e.background.leftSection.configuration.ARROW_LENGTH-h/2,e.mainTextObject.attr({"text-anchor":"middle"}),e.mainTextObject.move(p,d),p=p+m/2+k.width+7+1,e.secondaryTextObject.attr({"text-anchor":"end"}),e.secondaryTextObject.move(p,d)):"bottomRight"==
  g?(e.background.leftSection=d.tooltipBackground("leftSection",m,h).move(-n/2-1-m,0),e.background.leftSection.translate(0,-e.background.leftSection.configuration.ARROW_LENGTH-h),e.background.rightSection=d.tooltipBackground("rightSectionWithBottomArrow",n,h),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),d=-Math.max(c.height,k.height)/2-e.background.leftSection.configuration.ARROW_LENGTH-h/2,e.secondaryTextObject.attr({"text-anchor":"middle"}),e.secondaryTextObject.move(p,
  d),p=p-n/2-1-c.width-7,e.mainTextObject.move(p,d)):"topRight"==g&&(e.background.leftSection=d.tooltipBackground("leftSection",m,h).move(-n/2-1-m,0),e.background.leftSection.translate(0,e.background.leftSection.configuration.ARROW_LENGTH),e.background.rightSection=d.tooltipBackground("rightSectionWithTopArrow",n,h),e.background.add(e.background.leftSection),e.background.add(e.background.rightSection),d=-Math.max(c.height,k.height)/2+e.background.leftSection.configuration.ARROW_LENGTH+h/2,e.secondaryTextObject.attr({"text-anchor":"middle"}),
  e.secondaryTextObject.move(p,d),p=p-n/2-1-c.width-7,e.mainTextObject.move(p,d));e.unshift(e.background);return e}});
  define("utilities",["configuration","geometry","number","two-section-tooltip"],function(m,h,g,d){return{checkBBoxFitsInSegment:function(c,d,g,e,h,m){c=c.bbox();var n=!1;[{x:c.x,y:c.y},{x:c.x2,y:c.y},{x:c.x,y:c.y2},{x:c.x2,y:c.y2}].forEach(function(c){if(!n){var t=c.x-g;c=c.y-e;var u=Math.atan2(t,-c);0>u&&(u+=2*Math.PI);u>m||u<h?n=!0:Math.sqrt(Math.pow(t,2)+Math.pow(c,2))>d.radius&&(n=!0)}});return n},createSegmentLabel:function(c,d,g,e,h,m,n){d+=3*c.radius/5*Math.sin(e);g-=3*c.radius/5*Math.cos(e);
  n.bbox();h=c.chart.text(h).move(d,g).addClass("fm-segment-label");n=h.bbox();h.move(d,g-n.height);m=c.chart.text(m).move(d,g).addClass("fm-segment-label");m.attr({y:n.y2-n.height});c=c.chart.group().attr({"pointer-events":"none"});c.add(h);c.add(m);return c},drawBackground:function(c,d,g,e,h){c=c.rect(d,g);c.move(e,h);c.attr({opacity:"0"});return c},drawTestRegions:function(c,d){c.rect(d.drawRegions.pieArea.width,d.drawRegions.pieArea.height).move(d.drawRegions.pieArea.x,d.drawRegions.pieArea.y);
  c.rect(d.drawRegions.keyArea.width,d.drawRegions.keyArea.height).move(d.drawRegions.keyArea.x,d.drawRegions.keyArea.y).attr({fill:"blue"})},getApproximateKeyColumnWidth:function(c,d){var g=0;d.forEach(function(d){d=c.text(""+d.title).addClass("fm-key-value-title");var h=d.bbox().width;d.remove();h>g&&(g=h)});g+=70},getMaxTooltipDimensions:function(c,g){var h=c.group();g.forEach(function(e,g){h.add(d(c,e.title,e.renderedValue,"left"))});var e=h.bbox();h.remove();return{height:e.height,width:e.width}},
  getOverflowItemCount:function(c,d){var g=0;c.forEach(function(c){h.circle.getAngle(c.value,d)<=m.MIN_RADIANS&&g++});return g},processOverflowData:function(c,d,q){var e=[],r=[];c.forEach(function(c,g){2>q||h.circle.getAngle(c.value,d)>m.MIN_RADIANS?e.push(c):r.push(c)});e.sort(function(c,d){return d.value-c.value});r.sort(function(c,d){return d.value-c.value});0<r.length&&(c=g.getDataTotal(r),e.push({title:"Other",value:c,overflow:r}));return e},setDefaultOptions:function(c){"undefined"==typeof c.valuePrefix&&
  (c.valuePrefix="");"undefined"==typeof c.valueSuffix&&(c.valueSuffix="");"undefined"==typeof c.showInnerLabels&&(c.showInnerLabels=!1);"undefined"==typeof c.useOuterLabels&&(c.useOuterLabels=!1);"undefined"==typeof c.hideKey&&(c.hideKey=!1);return c}}});define("G.move",["svg-js"],function(m){m.extend(m.G,{move:function(h,g){this.node.setAttribute("transform","translate("+h+" "+g+")")}})});
  define("chart","circle-segment configuration dashed-bracket doughnut-segment geometry key number path scale svg-js tooltip two-section-tooltip utilities G.move".split(" "),function(m,h,g,d,c,k,q,e,r,w,n,p,t){function u(b,c,d){var e=c.chart.text(b.overflow?b.title:b.title+": "+b.value).addClass("fm-external-details");b.colorOverride?e.attr({fill:b.colorOverride.morph("#000").at(.45).toHex()}):e.addClass(b.colorClass);b=e.bbox();d=d.bbox();e.move(c.layout.drawRegions.pieArea.width/2-b.width/2,d.y2);
  c.chart.externalDetails=e}function x(b,d){var e=d.layout.drawRegions.pieArea.x+d.layout.drawRegions.pieArea.width/2,g=d.layout.drawRegions.pieArea.y+d.layout.drawRegions.pieArea.height/2,a=(b.startAngle+b.endAngle)/2;b.endAngle<b.startAngle&&(a+=Math.PI);var e=c.circle.getPointOnCircumference(e,g,b.isOuterSegment?d.radius*h.OVERFLOW_OUTER_RADIUS+h.TOOLTIP_DISTANCE_FROM_CIRCUMFERENCE:d.radius+h.TOOLTIP_DISTANCE_FROM_CIRCUMFERENCE,a),f;b.overflow?f="bottom":a<c.circle.eighth||a>=7*c.circle.eighth?f=
  a<=1*Math.PI/4?"bottomLeft":"bottomRight":a>=c.circle.eighth&&a<3*c.circle.eighth?f="left":a>=3*c.circle.eighth&&a<5*c.circle.eighth?f=a<=c.circle.half?"topLeft":"topRight":a>=5*c.circle.eighth&&a<7*c.circle.eighth&&(f="right");a="top"==f||"bottom"==f?n(d.chart,b.title,f):p(d.chart,b.title,b.value,f,b.colorOverride?b.colorOverride:null);b.overflow?a.background.addClass(b.colorClass):b.colorOverride?(a.background.leftSection.attr({fill:b.colorOverride}),a.background.rightSection.attr({fill:b.colorOverride.morph("#fff").at(.4).toHex()})):
  (a.background.leftSection.addClass(b.colorClass),a.background.rightSection.addClass(b.colorClass+" tint-5"));a.move(e.x,e.y);d.chart.tooltip=a}return{applyMouseEventHandlers:function(b,c,d,e,a,f,g){function h(){a.each(function(){this.isCurrentlyActive=!1})}e.click(function(){d.transition("Neutral")});var k=function(){if(this.isCurrentlyActive||d.isInState("ShowOverflowAndDataInKey"))d.transition("Neutral");else{h();this.isCurrentlyActive=!0;var a={title:this.title,body:this.details,colorClass:this.colorClass,
  colorOverride:this.colorOverride};this.isOuterSegment?d.transition("ShowingOverflowAndDataInKey",a):d.transition("ShowingDataInKey",a)}};e=function(){d.isInState("ShowingOverflow")?d.transition("Neutral"):d.transition("ShowingOverflow")};a.each(function(){!this.details&&!this.overflow||c.options.hideKey&&!this.overflow?this.addClass("click-disabled"):this.click(k);this.on("mouseover",function(){c.options.useOuterLabels?u(this,c,a):x(this,c,d)});this.on("mouseout",function(){c.options.useOuterLabels?
  c.chart.externalDetails.remove():c.chart.tooltip.remove()})});b[b.length-1].hasOwnProperty("overflow")&&a.get(b.length-1).click(e);f.each(function(){!this.details&&!this.overflow||c.options.hideKey?this.addClass("click-disabled"):this.click(k);this.on("mouseover",function(){c.options.useOuterLabels?u(this,c,a):x(this,c,d)});this.on("mouseout",function(){c.options.useOuterLabels?c.chart.externalDetails.remove():c.chart.tooltip.remove()})})},drawDashedBracket:function(b){return b.chart.dashedBracket(b.layout.drawRegions.pieArea.x+
  b.layout.drawRegions.pieArea.width/2,b.layout.drawRegions.pieArea.y+b.layout.drawRegions.pieArea.height/2,b.radius+b.radius*h.BRACKET_INNER_RADIUS_ADJUST,b.radius+b.radius*h.BRACKET_MIDDLE_RADIUS_ADJUST,b.radius+b.radius*h.BRACKET_OUTER_RADIUS_ADJUST,b.overflowValueScaleStart,b.overflowValueScaleEnd).addClass("fm-hidden")},drawInnerSegments:function(b,c){var d=c.chart.group(),e,a=0,f=c.layout.drawRegions.pieArea.x+c.layout.drawRegions.pieArea.width/2,g=c.layout.drawRegions.pieArea.y+c.layout.drawRegions.pieArea.height/
  2,h=!0;b.forEach(function(b,k){e=a;a+=b.value;var m=c.valueScale.map(e),n=c.valueScale.map(a),p=c.chart.circleSegment(f,g,c.radius,m,n).addClass("fm-segment fm-inner-segment");p.title=b.title;p.value=b.renderedValue;p.details=b.details;p.startAngle=m;p.endAngle=n;var q=(m+n)/2,r;b.hasOwnProperty("overflow")?(r="fm-datum-color-overflow",p.overflow=!0):r=c.colorClasses[k];b.hasOwnProperty("colorOverride")?(p.colorOverride=new w.Color(b.colorOverride),p.attr("fill",b.colorOverride)):(p.addClass(r),p.colorClass=
  r);c.options.showInnerLabels&&h&&(q=t.createSegmentLabel(c,f,g,q,b.title,b.renderedValue,p),t.checkBBoxFitsInSegment(q,c,f,g,m,n)?(q.remove(),h=!1):p.after(q));d.add(p)});return d},drawKey:function(b,c){var d=[],e=[];b.forEach(function(a,b){d.push(a.title);a.colorOverride&&(e[b]=a.colorOverride)});var a=k(c.chart,c.layout.drawRegions.keyArea.width,d,c.colorClasses,e,b[b.length-1].hasOwnProperty("overflow")),f=c.layout.drawRegions.keyArea.y;"landscape"==c.orientation&&(f+=c.layout.drawRegions.keyArea.height/
  2-a.background.bbox().height/2);a.move(c.layout.drawRegions.keyArea.x,f);return a},drawOuterSegments:function(b,c){var d=b[b.length-1].overflow;q.getDataTotal(d);var e=c.chart.group(),a=0;d.forEach(function(b,d){var g=a;a+=b.value;var k=c.layout.drawRegions.pieArea.x+c.layout.drawRegions.pieArea.width/2,m=c.layout.drawRegions.pieArea.y+c.layout.drawRegions.pieArea.height/2,g=c.overflowValueScale.map(g),n=c.overflowValueScale.map(a),k=c.chart.doughnutSegment(k,m,c.radius*h.OVERFLOW_OUTER_RADIUS,c.radius*
  h.OVERFLOW_INNER_RADIUS,g,n).addClass("fm-segment fm-outer-segment "+c.colorClasses[d]);k.title=b.title;k.value=b.renderedValue;k.details=b.details;k.startAngle=g;k.endAngle=n;k.colorClass=c.colorClasses[d];k.isOuterSegment=!0;e.add(k)});return e}}});
  define("color",[],function(){return{colorWheelClasses:"fm-datum-color-wheel-a fm-datum-color-wheel-b fm-datum-color-wheel-c fm-datum-color-wheel-d fm-datum-color-wheel-e fm-datum-color-wheel-f fm-datum-color-wheel-g fm-datum-color-wheel-h fm-datum-color-wheel-i fm-datum-color-wheel-j fm-datum-color-wheel-k fm-datum-color-wheel-l".split(" "),overflowClass:"fm-datum-color-overflow",pad:function(m){return 2>m.length?"0"+m:m},contrasting:function(m){throw"Not yet implemented";},registerTint1Filter:function(){throw"Not yet implemented";
  },registerTint2Filter:function(){throw"Not yet implemented";},lowContrast:function(m,h){h="undefined"===typeof h?0:h;if(m+h>this.colorWheelClasses.length){for(var g=[],d=0;d<m;d++)d<this.colorWheelClasses.length?g.push(this.colorWheelClasses[d]):g.push(this.colorWheelClasses[this.colorWheelClasses.length-d]);return g}return this.colorWheelClasses.splice(h,m)},monochromatic:function(m,h,g){throw"Not yet implemented";},harmonious:function(m){for(var h=Math.min(m,this.colorWheelClasses.length),g=[],
  d=Math.floor(this.colorWheelClasses.length/2),c=function(){return 0==this.colorWheelClasses.length%4}.bind(this),k=function(c,e){c=(c+this.colorWheelClasses.length)%this.colorWheelClasses.length;var k=Math.floor(g.length/4)+1;g.length<h&&g.splice(1*k-1,0,c);g.length<h&&g.splice(2*k-1,0,(c+e+1)%this.colorWheelClasses.length);g.length<h&&g.splice(3*k-1,0,(c+d)%this.colorWheelClasses.length);g.length<h&&g.splice(4*k-1,0,(c+e+1+d)%this.colorWheelClasses.length)}.bind(this),q=function(c,d){c=(c+this.colorWheelClasses.length)%
  this.colorWheelClasses.length;g.splice(d,0,c)}.bind(this),e=1,r=0;e<=d-2;e+=2,r--)k(r,e);k=g.length/4;g.length<h&&q(1,k);g.length<h&&q(1+d,3*k+1);c()&&(g.length<h&&q(1+d/2,2*k+1),g.length<h&&q(1+3*d/2,4*k+3));c=[];for(q=0;q<m;q++)c.push(this.colorWheelClasses[g[q%h]]);return c}}});
  define("mapper",[],function(){var m=function(h){this.keys=h.querySelectorAll("thead > tr > th");this.rows=h.querySelectorAll("tbody > tr")};m.prototype.mapRows=function(h){if("function"!=typeof h)throw new TypeError;for(var g=[],d=0;d<this.keys.length;d++)g.push(this.keys[d].textContent);for(var d=[],c=0;c<this.rows.length;c++){for(var k=this.rows[c],m=[],e=k.classList,r=k.attributes,w=0;w<this.rows[c].children.length;w++)m.push(this.rows[c].children[w].textContent);(k=h(m,c,k,g,e,r))&&d.push(k)}return d};
  m.prototype.forEachRows=function(h){if("function"!=typeof h)throw new TypeError;for(var g=[],d=0;d<this.keys.length;d++)g.push(this.keys[d].textContent);for(d=0;d<this.rows.length;d++){for(var c=this.rows[d],k=[],m=c.classList,e=c.attributes,r=0;r<this.rows[d].children.length;r++)k.push(this.rows[d].children[r].textContent);h(k,d,c,g,m,e)}};m.prototype.reduceRows=function(h,g){if("function"!=typeof h)throw new TypeError;"undefined"===typeof g&&(g=0);for(var d=[],c=0;c<this.keys.length;c++)d.push(this.keys[c].textContent);
  for(c=0;c<this.rows.length;c++){for(var k=this.rows[c],m=[],e=k.classList,r=k.attributes,w=0;w<this.rows[c].children.length;w++)m.push(this.rows[c].children[w].textContent);g=h(g,m,c,k,d,e,r)}return g};return m});
  define("state",[],function(){return{State:function(m,h,g){this.name=m;this.enter=h?h:function(){console.log("No enter() method has been defined for the state "+m)};this.leave=g?g:function(){console.log("No leave() method has been defined for the state "+m)}},StateMachine:function(){this.states=Array.prototype.slice.call(arguments);var m=function(h){var g=!1;this.states.some(function(d,c){if(d.name===h)return this.currentState=d,g=!0}.bind(this));if(g)return!0;throw""+h+" does not exist in this state machine.";
  };this.start=function(h){h?m.call(this,h):this.currentState=this.states[0];this.currentState.enter()};this.transition=function(h,g){var d=this.currentState.name;this.currentState.leave(h);m.call(this,h);this.currentState.enter(g,d)};this.isInState=function(h){return this.currentState.name===h}}}});
  define("text-area",["svg-js"],function(m){return function(h,g,d,c,k){var m=c.split(/\s+/),e=[],r="";m.forEach(function(c,d){var p=0!=d?r+" "+c:c,t=h.text(p).addClass(k),u=t.bbox().width;t.remove();u<g?(r=p,d==m.length-1&&e.push(r)):(e.push(r),d==m.length-1?e.push(c):r=c)});return h.text(function(c){e.forEach(function(e){var g=c.tspan(e).newLine().addClass(k),h=c.bbox().height;g.node.parentNode.removeChild(g.node);h<=d&&c.tspan(e).newLine().addClass(k)})}).addClass("fm-text-area")}});
  define("states",["configuration","key","state","svg-js","text-area"],function(m,h,g,d,c){return function(d,h,e,m,w,n){function p(){var b=d.layout.drawRegions.keyArea.y,b="landscape"==d.orientation?b+(d.layout.drawRegions.keyArea.height/2-n.background.bbox().height/2):b+(d.top+d.height-n.bbox().height);n.move(d.layout.drawRegions.keyArea.x,b)}function t(b){var a=[],c=[];b.forEach(function(b,d){a.push(b.title);b.colorOverride&&(c[d]=b.colorOverride)});n.setValues(a,c);n.background.removeClass(n.backgroundColorClass);
  n.background.attr({fill:"none"});n.background.removeClass("tint-9");n.background.addClass("fm-datum-color-neutral");n.backgroundColorClass="fm-datum-color-neutral";p()}function u(b){n.clearItems();n.titleText&&n.titleText.remove();n.bodyText&&n.bodyText.remove();if(b.title&&b.body){var a=n.bbox(),f=d.chart.text(b.title).addClass("fm-key-title"),e=f.bbox();f.move(a.width/2-e.width/2,10);n.add(f);n.titleText=f;a=c(d.chart,a.width-n.configuration.PADDING_LEFT-n.configuration.PADDING_RIGHT,d.layout.drawRegions.keyArea.height-
  e.height-50,b.body,"fm-key-body");a.move(n.configuration.PADDING_LEFT,e.y2+10);n.background.height(a.bbox().height+e.height+40);p();n.add(a);n.bodyText=a}n.background.removeClass(n.backgroundColorClass);b.colorOverride?(n.background.attr({fill:b.colorOverride.morph("#fff").at(.65).toHex()}),f.attr({fill:b.colorOverride.morph("#000").at(.45).toHex()})):(n.background.addClass(b.colorClass),n.background.hasClass("tint-9")||n.background.addClass("tint-9"),n.backgroundColorClass=b.colorClass,b.title&&
  b.body&&f.addClass(b.colorClass))}var x=new g.State("Neutral");x.enter=function(b,a){e.each(function(){this.isCurrentlyActive=!1});m.addClass("fm-hidden");w.addClass("fm-hidden");a&&"Neutral"!=a&&(n.titleText&&n.titleText.remove(),n.bodyText&&n.bodyText.remove(),t(h))};x.leave=function(){};var b=new g.State("ShowingDataInKey");b.enter=function(b,a){u(b)};b.leave=function(){};var y=new g.State("ShowingOverflow");y.enter=function(){e.each(function(){this.isCurrentlyActive=!1});m.removeClass("fm-hidden");
  w.removeClass("fm-hidden");n.titleText&&n.titleText.remove();n.bodyText&&n.bodyText.remove();t(h[h.length-1].overflow)};y.leave=function(b){"ShowingOverflowAndDataInKey"!=b&&(m.addClass("fm-hidden"),w.addClass("fm-hidden"))};var v=new g.State("ShowingOverflowAndDataInKey");v.enter=function(b){u(b)};v.leave=function(b){"ShowingOverflowAndDataInKey"!=b&&(m.addClass("fm-hidden"),w.addClass("fm-hidden"))};return new g.StateMachine(x,b,y,v)}});
  define("renderer","chart color configuration geometry number mapper scale states utilities".split(" "),function(m,h,g,d,c,k,q,e,r){return function(d,n,p,t,u,x,b,y){u=r.setDefaultOptions(u);var v=function(a,b,d,e,g,h){b=parseFloat(a[1].replace(/,([0-9]{3})/g,"$1"));a={title:a[0],details:a[2],value:b,renderedValue:u.valuePrefix+c.renderValue(b)+u.valueSuffix};(h=h.getNamedItem("data-fm-color"))&&""!==h.value&&(a.colorOverride=h.value);return a},A,a=x;"htmlTable"==y&&(a=(new k(x)).mapRows(v),A=x);(function(a){var k=
  c.getDataTotal(a),x=r.getOverflowItemCount(a,k);a=r.processOverflowData(a,k,x);var v=r.getMaxTooltipDimensions(b,a),G=r.drawBackground(b,p,t,d,n).addClass("fm-whitespace"),D=h.harmonious(a.length),B=u;"undefined"!=typeof B.useOuterLabels&&("false"===B.useOuterLabels?B.useOuterLabels=!1:"true"===B.useOuterLabels&&(B.useOuterLabels=!0));"undefined"!=typeof B.showInnerLabels&&("false"===B.showInnerLabels?B.showInnerLabels=!1:"true"===B.showInnerLabels&&(B.showInnerLabels=!0));"undefined"!=typeof B.hideKey&&
  ("false"===B.hideKey?B.hideKey=!1:"true"===B.hideKey&&(B.hideKey=!0));var z={chart:b,colorClasses:D,height:t,layout:{drawRegions:{}},options:B,radius:z,top:n},z,E;p/t>=g.ASPECT_RATIO_BREAKPOINT?(z.orientation="landscape",D=.3*p,B=p-D,E=t,z.layout.drawRegions.keyArea={x:d+p-D,y:n,width:D,height:t},z.layout.drawRegions.pieArea={x:d,y:n,width:B,height:t},D=m.drawKey(a,z)):(z.orientation="portrait",B=D=p,z.layout.drawRegions.keyArea={x:d,y:0,width:D},D=m.drawKey(a,z),E=D.bbox().height,D.move(0,t-E),E=
  t-E-2*v.height,z.layout.drawRegions.pieArea={x:d,y:n,width:B,height:E},z.layout.drawRegions.keyArea.height=t-E);v.width>.2*p&&(u.hideKey=!0,u.useOuterLabels=!0);var F=0<x?g.OVERFLOW_OUTER_RADIUS:1;z.radius<g.MIN_RADIUS&&(u.hideKey=!0,u.useOuterLabels=!0);u.hideKey||(z.radius=Math.min(B/2-v.width,E/(2*F)),z.radius<g.MIN_RADIUS&&(u.hideKey=!0,u.useOuterLabels=!0));u.hideKey&&(D.remove(),v=t/(2*F),u.useOuterLabels&&(B=b.text("thequickbrownfoxjumpedoverthelazydog").addClass("fm-externalDetails"),E=B.bbox().height,
  B.remove(),v-=E),z.radius=Math.min(p/2,v),z.layout.drawRegions.pieArea={x:d,y:n,width:p,height:t},0==x&&(z.radius*=.9));z.valueScale=q().project((new q).domains.RealNumbers(0,k)).onto((new q).ranges.Angle());a[a.length-1].hasOwnProperty("overflow")?(k=z.valueScale.map(a[a.length-1].value)/2,z.overflowValueScaleStart=-(Math.PI/g.OVERFLOW_SPREAD)-k,z.overflowValueScaleEnd=1*Math.PI/g.OVERFLOW_SPREAD-k,k=c.getDataTotal(a[a.length-1].overflow),z.overflowValueScale=q().project((new q).domains.RealNumbers(0,
  k)).onto((new q).ranges.Angle(z.overflowValueScaleStart,z.overflowValueScaleEnd)),k=m.drawOuterSegments(a,z),v=m.drawDashedBracket(z)):(k=b.group(),v=b.group());x=m.drawInnerSegments(a,z);v=e(z,a,x,k,v,D);v.start("Neutral");m.applyMouseEventHandlers(a,z,v,G,x,k,D);"htmlTable"==y&&A.classList.add("fm-hidden")})(a)}});
  define("svg-builder",["renderer","svg-js","configuration"],function(m,h,g){function d(c){return c.split("-").map(function(c,d){return 0===d?c:c.charAt(0).toUpperCase()+c.substr(1)}).join("")}function c(c,d){var g=document.createElement("div");g.className="fm-powered-by-factmint";g.innerHTML='Powered by <a style="color: #527a92" href="http://factmint.com/charts">Factmint</a>';g.style.fontSize="8px";g.style.lineHeight="12px";g.style.width=d;g.style.textAlign="center";g.style.fontFamily="Lato, sans-serif";
  c.parentNode.insertBefore(g,c.nextSibling)}if(window.addEventListener&&window.document.createEvent){var k=window.document.createEvent("Event");k.initEvent("resizefinished",!1,!1);var q=null;window.addEventListener("resize",function(){clearTimeout(q);return q=setTimeout(function(){window.dispatchEvent(k)},g.DEBOUNCE_TIMEOUT)},!1);return function(e){var k,q="json";1==e.nodeType&&"table"==e.tagName.toLowerCase()&&(k=e,q="htmlTable");var n=function(n){var p=(n="htmlTable"==q?k.getAttribute("data-fm-config"):
  e.config)&&window[n]?window[n]:{};n=[];"htmlTable"==q&&(n=[].filter.call(k.attributes,function(a){return"data-fm-config"===a.name?!1:/^data-fm-/.test(a.name)}));n.forEach(function(a){var b=a.name.replace(/^data-fm-/,""),b=d(b);p[b]=a.value});var b=document.createElementNS("http://www.w3.org/2000/svg","svg");b.className.baseVal+="fm-unrendered-chart fm-chart";"htmlTable"==q?k.parentNode.insertBefore(b,k):document.body.appendChild(b);var t=/([0-9]+)(px|%|rem|em|ex|ch|vw|vh|vmin|vmax|mm|cm|in|pt|pc)/;
  n=function(){var a={};p.width?p.width.replace(t,function(b,c,d){a.value=parseFloat(c);a.units=d}):(a.value=100,a.units="%");return a}();b.style.width=n.value+n.units;var v=function(){var a={};if(p.height)p.height.replace(t,function(b,c,d){a.value=parseFloat(c);a.units=d});else{var c=b.getBoundingClientRect().width/g.ASPECT_RATIO;a.value=Math.min(g.MAX_HEIGHT,c);a.units="px"}return a}();b.style.height=v.value+v.units;var A=b.getBoundingClientRect(),a=A.width,f=A.height;"true"==p.enableSpillover&&(A=
  g.SPILLOVER_LEFT+g.SPILLOVER_RIGHT+a,b.style.height=(g.SPILLOVER_TOP+g.SPILLOVER_BOTTOM+f)/f*v.value+v.units,b.style.width=A/a*n.value+n.units,b.style.margin="-"+g.SPILLOVER_TOP+"px -"+g.SPILLOVER_RIGHT+"px -"+g.SPILLOVER_BOTTOM+"px -"+g.SPILLOVER_LEFT+"px");A=b.getBoundingClientRect();b.setAttribute("viewBox","0 0 "+(A.right-A.left)+" "+(A.bottom-A.top));v=h(b);b.removeAttribute("width");b.removeAttribute("height");m(p.disableSpillover?0:g.SPILLOVER_LEFT,p.disableSpillover?0:g.SPILLOVER_TOP,a,f,
  p,e,v,q);b.className.baseVal=b.className.baseVal.replace("fm-unrendered-chart","");c(b,n.value+n.units);return b},p=n(),t=window.innerWidth;window.addEventListener("resizefinished",function(){var c=window.innerWidth;if(c!=t){p.parentNode.removeChild(p);var d=document.querySelector(".fm-powered-by-factmint");d.parentNode.removeChild(d);p=n();t=c}},!1)}}});
  require.config({paths:{classList:"../../node_modules/classList/classList",path:"../../node_modules/paths-js/dist/amd/path","svg-js":"../../node_modules/svg.js/dist/svg.min",center:"../../../../api/etc/center","circle-segment":"../../../../api/inventions/circle-segment",color:"../../../../api/utilities/color","configuration-builder":"../../../../api/utilities/configuration-builder","dashed-bracket":"../../../../api/inventions/dashed-bracket","doughnut-segment":"../../../../api/inventions/doughnut-segment",
  flow:"../../../../api/inventions/flow","float":"../../../../api/etc/float","G.unshift":"../../../../api/extensions/G.unshift","G.move":"../../../../api/extensions/G.move",geometry:"../../../../api/utilities/geometry",grid:"../../../../api/etc/grid",key:"../../../../api/components/key",number:"../../../../api/utilities/number",mapper:"../../../../api/utilities/mapper",scale:"../../../../api/utilities/scale",state:"../../../../api/utilities/state","text-area":"../../../../api/components/text-area",
  tooltip:"../../../../api/components/tooltip","tooltip-background":"../../../../api/inventions/tooltip-background","two-section-tooltip":"../../../../api/components/two-section-tooltip","two-section-tooltip-background":"../../../../api/inventions/two-section-tooltip-background"}});
  require(["svg-builder"],function(m){var h=document.querySelectorAll("table.fm-pie");if(0<h.length)if(document.createElementNS&&document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect){var g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.style.width="500px";document.body.appendChild(g);var d=g.getBoundingClientRect();g.parentNode.removeChild(g);if(500===d.width)for(g=0;g<h.length;g++){if(window.factmint&&window.factmint.previewVisualizations||!h[g].hasAttribute("data-fm-rendered")){h[g].setAttribute("data-fm-rendered",
  "true");try{m(h[g])}catch(c){console.log("ERROR: chart rendering failed"),c instanceof Error?console.log(c.stack):console.log(c)}}}else console.log("Your browser does not correctly support getBoundingClientRect() for SVG elements: visualizations disabled")}else console.log("SVG not supported: visualizations disabled")});define("main",function(){});
  