forked from susielu/d3-legend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3-legend.min.js
3 lines (3 loc) · 72.2 KB
/
d3-legend.min.js
1
2
3
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){return a<b?-1:a>b?1:a>=b?0:NaN}function c(a){return 1===a.length&&(a=d(a)),{left:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(null==d&&(d=0),null==e&&(e=b.length);d<e;){var f=d+e>>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function d(a){return function(c,d){return b(a(c),d)}}function e(a,b){return b<a?-1:b>a?1:b>=a?0:NaN}function f(a){return null===a?NaN:+a}function g(a,b){var c,d,e=a.length,g=0,h=0,i=-1,j=0;if(null==b)for(;++i<e;)isNaN(c=f(a[i]))||(d=c-g,g+=d/++j,h+=d*(c-g));else for(;++i<e;)isNaN(c=f(b(a[i],i,a)))||(d=c-g,g+=d/++j,h+=d*(c-g));if(j>1)return h/(j-1)}function h(a,b){var c=g(a,b);return c?Math.sqrt(c):c}function i(a,b){var c,d,e,f=-1,g=a.length;if(null==b){for(;++f<g;)if(null!=(d=a[f])&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=a[f])&&(c>d&&(c=d),e<d&&(e=d))}else{for(;++f<g;)if(null!=(d=b(a[f],f,a))&&d>=d){c=e=d;break}for(;++f<g;)null!=(d=b(a[f],f,a))&&(c>d&&(c=d),e<d&&(e=d))}return[c,e]}function j(a){return function(){return a}}function k(a){return a}function l(a,b,c){a=+a,b=+b,c=(e=arguments.length)<2?(b=a,a=0,1):e<3?1:+c;for(var d=-1,e=0|Math.max(0,Math.ceil((b-a)/c)),f=new Array(e);++d<e;)f[d]=a+d*c;return f}function m(a,b,c){var d=n(a,b,c);return l(Math.ceil(a/d)*d,Math.floor(b/d)*d+d/2,d)}function n(a,b,c){var d=Math.abs(b-a)/Math.max(0,c),e=Math.pow(10,Math.floor(Math.log(d)/Math.LN10)),f=d/e;return f>=M?e*=10:f>=N?e*=5:f>=O&&(e*=2),b<a?-e:e}function o(a){return Math.ceil(Math.log(a.length)/Math.LN2)+1}function p(){function a(a){var e,f,g=a.length,h=new Array(g);for(e=0;e<g;++e)h[e]=b(a[e],e,a);var i=c(h),j=i[0],k=i[1],l=d(h,j,k);Array.isArray(l)||(l=m(j,k,l));for(var n=l.length;l[0]<=j;)l.shift(),--n;for(;l[n-1]>=k;)l.pop(),--n;var o,p=new Array(n+1);for(e=0;e<=n;++e)o=p[e]=[],o.x0=e>0?l[e-1]:j,o.x1=e<n?l[e]:k;for(e=0;e<g;++e)f=h[e],j<=f&&f<=k&&p[H(l,f,0,n)].push(a[e]);return p}var b=k,c=i,d=o;return a.value=function(c){return arguments.length?(b="function"==typeof c?c:j(c),a):b},a.domain=function(b){return arguments.length?(c="function"==typeof b?b:j([b[0],b[1]]),a):c},a.thresholds=function(b){return arguments.length?(d="function"==typeof b?b:j(Array.isArray(b)?K.call(b):b),a):d},a}function q(a,b,c){if(null==c&&(c=f),d=a.length){if((b=+b)<=0||d<2)return+c(a[0],0,a);if(b>=1)return+c(a[d-1],d-1,a);var d,e=(d-1)*b,g=Math.floor(e),h=+c(a[g],g,a),i=+c(a[g+1],g+1,a);return h+(i-h)*(e-g)}}function r(a,c,d){return a=L.call(a,f).sort(b),Math.ceil((d-c)/(2*(q(a,.75)-q(a,.25))*Math.pow(a.length,-1/3)))}function s(a,b,c){return Math.ceil((c-b)/(3.5*h(a)*Math.pow(a.length,-1/3)))}function t(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&d>c&&(c=d)}else{for(;++e<f;)if(null!=(d=b(a[e],e,a))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b(a[e],e,a))&&d>c&&(c=d)}return c}function u(a,b){var c,d=0,e=a.length,g=-1,h=e;if(null==b)for(;++g<e;)isNaN(c=f(a[g]))?--h:d+=c;else for(;++g<e;)isNaN(c=f(b(a[g],g,a)))?--h:d+=c;if(h)return d/h}function v(a,c){var d,e=[],g=a.length,h=-1;if(null==c)for(;++h<g;)isNaN(d=f(a[h]))||e.push(d);else for(;++h<g;)isNaN(d=f(c(a[h],h,a)))||e.push(d);return q(e.sort(b),.5)}function w(a){for(var b,c,d,e=a.length,f=-1,g=0;++f<e;)g+=a[f].length;for(c=new Array(g);--e>=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c}function x(a,b){var c,d,e=-1,f=a.length;if(null==b){for(;++e<f;)if(null!=(d=a[e])&&d>=d){c=d;break}for(;++e<f;)null!=(d=a[e])&&c>d&&(c=d)}else{for(;++e<f;)if(null!=(d=b(a[e],e,a))&&d>=d){c=d;break}for(;++e<f;)null!=(d=b(a[e],e,a))&&c>d&&(c=d)}return c}function y(a){for(var b=0,c=a.length-1,d=a[0],e=new Array(c<0?0:c);b<c;)e[b]=[d,d=a[++b]];return e}function z(a,b){for(var c=b.length,d=new Array(c);c--;)d[c]=a[b[c]];return d}function A(a,c){if(d=a.length){var d,e,f=0,g=0,h=a[g];for(c||(c=b);++f<d;)(c(e=a[f],h)<0||0!==c(h,h))&&(h=e,g=f);return 0===c(h,h)?g:void 0}}function B(a,b,c){for(var d,e,f=(null==c?a.length:c)-(b=null==b?0:+b);f;)e=Math.random()*f--|0,d=a[f+b],a[f+b]=a[e+b],a[e+b]=d;return a}function C(a,b){var c,d=0,e=a.length,f=-1;if(null==b)for(;++f<e;)(c=+a[f])&&(d+=c);else for(;++f<e;)(c=+b(a[f],f,a))&&(d+=c);return d}function D(a){if(!(e=a.length))return[];for(var b=-1,c=x(a,E),d=new Array(c);++b<c;)for(var e,f=-1,g=d[b]=new Array(e);++f<e;)g[f]=a[f][b];return d}function E(a){return a.length}function F(){return D(arguments)}var G=c(b),H=G.right,I=G.left,J=Array.prototype,K=J.slice,L=J.map,M=Math.sqrt(50),N=Math.sqrt(10),O=Math.sqrt(2);a.bisect=H,a.bisectRight=H,a.bisectLeft=I,a.ascending=b,a.bisector=c,a.descending=e,a.deviation=h,a.extent=i,a.histogram=p,a.thresholdFreedmanDiaconis=r,a.thresholdScott=s,a.thresholdSturges=o,a.max=t,a.mean=u,a.median=v,a.merge=w,a.min=x,a.pairs=y,a.permute=z,a.quantile=q,a.range=l,a.scan=A,a.shuffle=B,a.sum=C,a.ticks=m,a.tickStep=n,a.transpose=D,a.variance=g,a.zip=F,Object.defineProperty(a,"__esModule",{value:!0})})},{}],2:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){}function c(a,c){var d=new b;if(a instanceof b)a.each(function(a,b){d.set(b,a)});else if(Array.isArray(a)){var e,f=-1,g=a.length;if(null==c)for(;++f<g;)d.set(f,a[f]);else for(;++f<g;)d.set(c(e=a[f],f,a),e)}else if(a)for(var h in a)d.set(h,a[h]);return d}function d(){function a(b,e,f,g){if(e>=k.length)return null!=i?i(b):null!=d?b.sort(d):b;for(var h,j,l,m=-1,n=b.length,o=k[e++],p=c(),q=f();++m<n;)(l=p.get(h=o(j=b[m])+""))?l.push(j):p.set(h,[j]);return p.each(function(b,c){g(q,c,a(b,e,f,g))}),q}function b(a,c){if(++c>k.length)return a;var d,e=l[c-1];return null!=i&&c>=k.length?d=a.entries():(d=[],a.each(function(a,e){d.push({key:e,values:b(a,c)})})),null!=e?d.sort(function(a,b){return e(a.key,b.key)}):d}var d,i,j,k=[],l=[];return j={object:function(b){return a(b,0,e,f)},map:function(b){return a(b,0,g,h)},entries:function(c){return b(a(c,0,g,h),0)},key:function(a){return k.push(a),j},sortKeys:function(a){return l[k.length-1]=a,j},sortValues:function(a){return d=a,j},rollup:function(a){return i=a,j}}}function e(){return{}}function f(a,b,c){a[b]=c}function g(){return c()}function h(a,b,c){a.set(b,c)}function i(){}function j(a,b){var c=new i;if(a instanceof i)a.each(function(a){c.add(a)});else if(a){var d=-1,e=a.length;if(null==b)for(;++d<e;)c.add(a[d]);else for(;++d<e;)c.add(b(a[d],d,a))}return c}function k(a){var b=[];for(var c in a)b.push(c);return b}function l(a){var b=[];for(var c in a)b.push(a[c]);return b}function m(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b}var n="$";b.prototype=c.prototype={constructor:b,has:function(a){return n+a in this},get:function(a){return this[n+a]},set:function(a,b){return this[n+a]=b,this},remove:function(a){var b=n+a;return b in this&&delete this[b]},clear:function(){for(var a in this)a[0]===n&&delete this[a]},keys:function(){var a=[];for(var b in this)b[0]===n&&a.push(b.slice(1));return a},values:function(){var a=[];for(var b in this)b[0]===n&&a.push(this[b]);return a},entries:function(){var a=[];for(var b in this)b[0]===n&&a.push({key:b.slice(1),value:this[b]});return a},size:function(){var a=0;for(var b in this)b[0]===n&&++a;return a},empty:function(){for(var a in this)if(a[0]===n)return!1;return!0},each:function(a){for(var b in this)b[0]===n&&a(this[b],b.slice(1),this)}};var o=c.prototype;i.prototype=j.prototype={constructor:i,has:o.has,add:function(a){return a+="",this[n+a]=a,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each},a.nest=d,a.set=j,a.map=c,a.keys=k,a.values=l,a.entries=m,Object.defineProperty(a,"__esModule",{value:!0})})},{}],3:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b,c){a.prototype=b.prototype=c,c.constructor=a}function c(a,b){var c=Object.create(a.prototype);for(var d in b)c[d]=b[d];return c}function d(){}function e(a){var b;return a=(a+"").trim().toLowerCase(),(b=E.exec(a))?(b=parseInt(b[1],16),new j(b>>8&15|b>>4&240,b>>4&15|240&b,(15&b)<<4|15&b,1)):(b=F.exec(a))?f(parseInt(b[1],16)):(b=G.exec(a))?new j(b[1],b[2],b[3],1):(b=H.exec(a))?new j(255*b[1]/100,255*b[2]/100,255*b[3]/100,1):(b=I.exec(a))?g(b[1],b[2],b[3],b[4]):(b=J.exec(a))?g(255*b[1]/100,255*b[2]/100,255*b[3]/100,b[4]):(b=K.exec(a))?k(b[1],b[2]/100,b[3]/100,1):(b=L.exec(a))?k(b[1],b[2]/100,b[3]/100,b[4]):M.hasOwnProperty(a)?f(M[a]):"transparent"===a?new j(NaN,NaN,NaN,0):null}function f(a){return new j(a>>16&255,a>>8&255,255&a,1)}function g(a,b,c,d){return d<=0&&(a=b=c=NaN),new j(a,b,c,d)}function h(a){return a instanceof d||(a=e(a)),a?(a=a.rgb(),new j(a.r,a.g,a.b,a.opacity)):new j}function i(a,b,c,d){return 1===arguments.length?h(a):new j(a,b,c,null==d?1:d)}function j(a,b,c,d){this.r=+a,this.g=+b,this.b=+c,this.opacity=+d}function k(a,b,c,d){return d<=0?a=b=c=NaN:c<=0||c>=1?a=b=NaN:b<=0&&(a=NaN),new n(a,b,c,d)}function l(a){if(a instanceof n)return new n(a.h,a.s,a.l,a.opacity);if(a instanceof d||(a=e(a)),!a)return new n;if(a instanceof n)return a;a=a.rgb();var b=a.r/255,c=a.g/255,f=a.b/255,g=Math.min(b,c,f),h=Math.max(b,c,f),i=NaN,j=h-g,k=(h+g)/2;return j?(i=b===h?(c-f)/j+6*(c<f):c===h?(f-b)/j+2:(b-c)/j+4,j/=k<.5?h+g:2-h-g,i*=60):j=k>0&&k<1?0:i,new n(i,j,k,a.opacity)}function m(a,b,c,d){return 1===arguments.length?l(a):new n(a,b,c,null==d?1:d)}function n(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}function o(a,b,c){return 255*(a<60?b+(c-b)*a/60:a<180?c:a<240?b+(c-b)*(240-a)/60:b)}function p(a){if(a instanceof r)return new r(a.l,a.a,a.b,a.opacity);if(a instanceof y){var b=a.h*N;return new r(a.l,Math.cos(b)*a.c,Math.sin(b)*a.c,a.opacity)}a instanceof j||(a=h(a));var c=v(a.r),d=v(a.g),e=v(a.b),f=s((.4124564*c+.3575761*d+.1804375*e)/Q),g=s((.2126729*c+.7151522*d+.072175*e)/R),i=s((.0193339*c+.119192*d+.9503041*e)/S);return new r(116*g-16,500*(f-g),200*(g-i),a.opacity)}function q(a,b,c,d){return 1===arguments.length?p(a):new r(a,b,c,null==d?1:d)}function r(a,b,c,d){this.l=+a,this.a=+b,this.b=+c,this.opacity=+d}function s(a){return a>W?Math.pow(a,1/3):a/V+T}function t(a){return a>U?a*a*a:V*(a-T)}function u(a){return 255*(a<=.0031308?12.92*a:1.055*Math.pow(a,1/2.4)-.055)}function v(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function w(a){if(a instanceof y)return new y(a.h,a.c,a.l,a.opacity);a instanceof r||(a=p(a));var b=Math.atan2(a.b,a.a)*O;return new y(b<0?b+360:b,Math.sqrt(a.a*a.a+a.b*a.b),a.l,a.opacity)}function x(a,b,c,d){return 1===arguments.length?w(a):new y(a,b,c,null==d?1:d)}function y(a,b,c,d){this.h=+a,this.c=+b,this.l=+c,this.opacity=+d}function z(a){if(a instanceof B)return new B(a.h,a.s,a.l,a.opacity);a instanceof j||(a=h(a));var b=a.r/255,c=a.g/255,d=a.b/255,e=(ca*d+aa*b-ba*c)/(ca+aa-ba),f=d-e,g=(_*(c-e)-Z*f)/$,i=Math.sqrt(g*g+f*f)/(_*e*(1-e)),k=i?Math.atan2(g,f)*O-120:NaN;return new B(k<0?k+360:k,i,e,a.opacity)}function A(a,b,c,d){return 1===arguments.length?z(a):new B(a,b,c,null==d?1:d)}function B(a,b,c,d){this.h=+a,this.s=+b,this.l=+c,this.opacity=+d}var C=.7,D=1/C,E=/^#([0-9a-f]{3})$/,F=/^#([0-9a-f]{6})$/,G=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,H=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,I=/^rgba\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,J=/^rgba\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,K=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,L=/^hsla\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)\s*\)$/,M={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};b(d,e,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),b(j,i,c(d,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new j(this.r*a,this.g*a,this.b*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new j(this.r*a,this.g*a,this.b*a,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var a=this.opacity;return a=isNaN(a)?1:Math.max(0,Math.min(1,a)),(1===a?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===a?")":", "+a+")")}})),b(n,m,c(d,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new n(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new n(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=this.h%360+360*(this.h<0),b=isNaN(a)||isNaN(this.s)?0:this.s,c=this.l,d=c+(c<.5?c:1-c)*b,e=2*c-d;return new j(o(a>=240?a-240:a+120,e,d),o(a,e,d),o(a<120?a+240:a-120,e,d),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var N=Math.PI/180,O=180/Math.PI,P=18,Q=.95047,R=1,S=1.08883,T=4/29,U=6/29,V=3*U*U,W=U*U*U;b(r,q,c(d,{brighter:function(a){return new r(this.l+P*(null==a?1:a),this.a,this.b,this.opacity)},darker:function(a){return new r(this.l-P*(null==a?1:a),this.a,this.b,this.opacity)},rgb:function(){var a=(this.l+16)/116,b=isNaN(this.a)?a:a+this.a/500,c=isNaN(this.b)?a:a-this.b/200;return a=R*t(a),b=Q*t(b),c=S*t(c),new j(u(3.2404542*b-1.5371385*a-.4985314*c),u(-.969266*b+1.8760108*a+.041556*c),u(.0556434*b-.2040259*a+1.0572252*c),this.opacity)}})),b(y,x,c(d,{brighter:function(a){return new y(this.h,this.c,this.l+P*(null==a?1:a),this.opacity)},darker:function(a){return new y(this.h,this.c,this.l-P*(null==a?1:a),this.opacity)},rgb:function(){return p(this).rgb()}}));var X=-.14861,Y=1.78277,Z=-.29227,$=-.90649,_=1.97294,aa=_*$,ba=_*Y,ca=Y*Z-$*X;b(B,A,c(d,{brighter:function(a){return a=null==a?D:Math.pow(D,a),new B(this.h,this.s,this.l*a,this.opacity)},darker:function(a){return a=null==a?C:Math.pow(C,a),new B(this.h,this.s,this.l*a,this.opacity)},rgb:function(){var a=isNaN(this.h)?0:(this.h+120)*N,b=+this.l,c=isNaN(this.s)?0:this.s*b*(1-b),d=Math.cos(a),e=Math.sin(a);return new j(255*(b+c*(X*d+Y*e)),255*(b+c*(Z*d+$*e)),255*(b+c*(_*d)),this.opacity)}})),a.color=e,a.rgb=i,a.hsl=m,a.lab=q,a.hcl=x,a.cubehelix=A,Object.defineProperty(a,"__esModule",{value:!0})})},{}],4:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(){for(var a,b=0,d=arguments.length,e={};b<d;++b){if(!(a=arguments[b]+"")||a in e)throw new Error("illegal type: "+a);e[a]=[]}return new c(e)}function c(a){this._=a}function d(a,b){return a.trim().split(/^|\s+/).map(function(a){var c="",d=a.indexOf(".");if(d>=0&&(c=a.slice(d+1),a=a.slice(0,d)),a&&!b.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:c}})}function e(a,b){for(var c,d=0,e=a.length;d<e;++d)if((c=a[d]).name===b)return c.value}function f(a,b,c){for(var d=0,e=a.length;d<e;++d)if(a[d].name===b){a[d]=g,a=a.slice(0,d).concat(a.slice(d+1));break}return null!=c&&a.push({name:b,value:c}),a}var g={value:function(){}};c.prototype=b.prototype={constructor:c,on:function(a,b){var c,g=this._,h=d(a+"",g),i=-1,j=h.length;{if(!(arguments.length<2)){if(null!=b&&"function"!=typeof b)throw new Error("invalid callback: "+b);for(;++i<j;)if(c=(a=h[i]).type)g[c]=f(g[c],a.name,b);else if(null==b)for(c in g)g[c]=f(g[c],a.name,null);return this}for(;++i<j;)if((c=(a=h[i]).type)&&(c=e(g[c],a.name)))return c}},copy:function(){var a={},b=this._;for(var d in b)a[d]=b[d].slice();return new c(a)},call:function(a,b){if((c=arguments.length-2)>0)for(var c,d,e=new Array(c),f=0;f<c;++f)e[f]=arguments[f+2];if(!this._.hasOwnProperty(a))throw new Error("unknown type: "+a);for(d=this._[a],f=0,c=d.length;f<c;++f)d[f].value.apply(b,e)},apply:function(a,b,c){if(!this._.hasOwnProperty(a))throw new Error("unknown type: "+a);for(var d=this._[a],e=0,f=d.length;e<f;++e)d[e].value.apply(b,c)}},a.dispatch=b,Object.defineProperty(a,"__esModule",{value:!0})})},{}],5:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,b){if((c=(a=b?a.toExponential(b-1):a.toExponential()).indexOf("e"))<0)return null;var c,d=a.slice(0,c);return[d.length>1?d[0]+d.slice(2):d,+a.slice(c+1)]}function c(a){return a=b(Math.abs(a)),a?a[1]:NaN}function d(a,b){return function(c,d){for(var e=c.length,f=[],g=0,h=a[0],i=0;e>0&&h>0&&(i+h+1>d&&(h=Math.max(1,d-i)),f.push(c.substring(e-=h,e+h)),!((i+=h+1)>d));)h=a[g=(g+1)%a.length];return f.reverse().join(b)}}function e(a,b){a=a.toPrecision(b);a:for(var c,d=a.length,e=1,f=-1;e<d;++e)switch(a[e]){case".":f=c=e;break;case"0":0===f&&(f=e),c=e;break;case"e":break a;default:f>0&&(f=0)}return f>0?a.slice(0,f)+a.slice(c+1):a}function f(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1],g=f-(p=3*Math.max(-8,Math.min(8,Math.floor(f/3))))+1,h=e.length;return g===h?e:g>h?e+new Array(g-h+1).join("0"):g>0?e.slice(0,g)+"."+e.slice(g):"0."+new Array(1-g).join("0")+b(a,Math.max(0,c+g-1))[0]}function g(a,c){var d=b(a,c);if(!d)return a+"";var e=d[0],f=d[1];return f<0?"0."+new Array((-f)).join("0")+e:e.length>f+1?e.slice(0,f+1)+"."+e.slice(f+1):e+new Array(f-e.length+2).join("0")}function h(a){return new i(a)}function i(a){if(!(b=r.exec(a)))throw new Error("invalid format: "+a);var b,c=b[1]||" ",d=b[2]||">",e=b[3]||"-",f=b[4]||"",g=!!b[5],h=b[6]&&+b[6],i=!!b[7],j=b[8]&&+b[8].slice(1),k=b[9]||"";"n"===k?(i=!0,k="g"):q[k]||(k=""),(g||"0"===c&&"="===d)&&(g=!0,c="0",d="="),this.fill=c,this.align=d,this.sign=e,this.symbol=f,this.zero=g,this.width=h,this.comma=i,this.precision=j,this.type=k}function j(a){return a}function k(a){function b(a){function b(a){var b,g,h,j=r,q=s;if("c"===o)q=u(a)+q,a="";else{a=+a;var w=(a<0||1/a<0)&&(a*=-1,!0);if(a=u(a,n),w)for(b=-1,g=a.length,w=!1;++b<g;)if(h=a.charCodeAt(b),48<h&&h<58||"x"===o&&96<h&&h<103||"X"===o&&64<h&&h<71){w=!0;break}if(j=(w?"("===e?e:"-":"-"===e||"("===e?"":e)+j,q=q+("s"===o?t[8+p/3]:"")+(w&&"("===e?")":""),v)for(b=-1,g=a.length;++b<g;)if(h=a.charCodeAt(b),48>h||h>57){q=(46===h?i+a.slice(b+1):a.slice(b))+q,a=a.slice(0,b);break}}m&&!k&&(a=f(a,1/0));var x=j.length+a.length+q.length,y=x<l?new Array(l-x+1).join(c):"";switch(m&&k&&(a=f(y+a,y.length?l-q.length:1/0),y=""),d){case"<":return j+a+q+y;case"=":return j+y+a+q;case"^":return y.slice(0,x=y.length>>1)+j+a+q+y.slice(x)}return y+j+a+q}a=h(a);var c=a.fill,d=a.align,e=a.sign,j=a.symbol,k=a.zero,l=a.width,m=a.comma,n=a.precision,o=a.type,r="$"===j?g[0]:"#"===j&&/[boxX]/.test(o)?"0"+o.toLowerCase():"",s="$"===j?g[1]:/[%p]/.test(o)?"%":"",u=q[o],v=!o||/[defgprs%]/.test(o);return n=null==n?o?6:12:/[gprs]/.test(o)?Math.max(1,Math.min(21,n)):Math.max(0,Math.min(20,n)),b.toString=function(){return a+""},b}function e(a,d){var e=b((a=h(a),a.type="f",a)),f=3*Math.max(-8,Math.min(8,Math.floor(c(d)/3))),g=Math.pow(10,-f),i=t[8+f/3];return function(a){return e(g*a)+i}}var f=a.grouping&&a.thousands?d(a.grouping,a.thousands):j,g=a.currency,i=a.decimal;return{format:b,formatPrefix:e}}function l(b){return s=k(b),a.format=s.format,a.formatPrefix=s.formatPrefix,s}function m(a){return Math.max(0,-c(Math.abs(a)))}function n(a,b){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(c(b)/3)))-c(Math.abs(a)))}function o(a,b){return a=Math.abs(a),b=Math.abs(b)-a,Math.max(0,c(b)-c(a))+1}var p,q={"":e,"%":function(a,b){return(100*a).toFixed(b)},b:function(a){return Math.round(a).toString(2)},c:function(a){return a+""},d:function(a){return Math.round(a).toString(10)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},g:function(a,b){return a.toPrecision(b)},o:function(a){return Math.round(a).toString(8)},p:function(a,b){return g(100*a,b)},r:g,s:f,X:function(a){return Math.round(a).toString(16).toUpperCase()},x:function(a){return Math.round(a).toString(16)}},r=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;i.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var s,t=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];l({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),a.formatDefaultLocale=l,a.formatLocale=k,a.formatSpecifier=h,a.precisionFixed=m,a.precisionPrefix=n,a.precisionRound=o,Object.defineProperty(a,"__esModule",{value:!0})})},{}],6:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a,b,c,d,e){var f=a*a,g=f*a;return((1-3*a+3*f-g)*b+(4-6*f+3*g)*c+(1+3*a+3*f-3*g)*d+g*e)/6}function d(a){var b=a.length-1;return function(d){var e=d<=0?d=0:d>=1?(d=1,b-1):Math.floor(d*b),f=a[e],g=a[e+1],h=e>0?a[e-1]:2*f-g,i=e<b-1?a[e+2]:2*g-f;return c((d-e/b)*b,h,f,g,i)}}function e(a){var b=a.length;return function(d){var e=Math.floor(((d%=1)<0?++d:d)*b),f=a[(e+b-1)%b],g=a[e%b],h=a[(e+1)%b],i=a[(e+2)%b];return c((d-e/b)*b,f,g,h,i)}}function f(a){return function(){return a}}function g(a,b){return function(c){return a+c*b}}function h(a,b,c){return a=Math.pow(a,c),b=Math.pow(b,c)-a,c=1/c,function(d){return Math.pow(a+d*b,c)}}function i(a,b){var c=b-a;return c?g(a,c>180||c<-180?c-360*Math.round(c/360):c):f(isNaN(a)?b:a)}function j(a){return 1===(a=+a)?k:function(b,c){return c-b?h(b,c,a):f(isNaN(b)?c:b)}}function k(a,b){var c=b-a;return c?g(a,c):f(isNaN(a)?b:a)}function l(a){return function(c){var d,e,f=c.length,g=new Array(f),h=new Array(f),i=new Array(f);for(d=0;d<f;++d)e=b.rgb(c[d]),g[d]=e.r||0,h[d]=e.g||0,i[d]=e.b||0;return g=a(g),h=a(h),i=a(i),e.opacity=1,function(a){return e.r=g(a),e.g=h(a),e.b=i(a),e+""}}}function m(a,b){var c,d=b?b.length:0,e=a?Math.min(d,a.length):0,f=new Array(d),g=new Array(d);for(c=0;c<e;++c)f[c]=t(a[c],b[c]);for(;c<d;++c)g[c]=b[c];return function(a){for(c=0;c<e;++c)g[c]=f[c](a);return g}}function n(a,b){var c=new Date;return a=+a,b-=a,function(d){return c.setTime(a+b*d),c}}function o(a,b){return a=+a,b-=a,function(c){return a+b*c}}function p(a,b){var c,d={},e={};null!==a&&"object"==typeof a||(a={}),null!==b&&"object"==typeof b||(b={});for(c in b)c in a?d[c]=t(a[c],b[c]):e[c]=b[c];return function(a){for(c in d)e[c]=d[c](a);return e}}function q(a){return function(){return a}}function r(a){return function(b){return a(b)+""}}function s(a,b){var c,d,e,f=P.lastIndex=Q.lastIndex=0,g=-1,h=[],i=[];for(a+="",b+="";(c=P.exec(a))&&(d=Q.exec(b));)(e=d.index)>f&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:o(c,d)})),f=Q.lastIndex;return f<b.length&&(e=b.slice(f),h[g]?h[g]+=e:h[++g]=e),h.length<2?i[0]?r(i[0].x):q(b):(b=i.length,function(a){for(var c,d=0;d<b;++d)h[(c=i[d]).i]=c.x(a);return h.join("")})}function t(a,c){var d,e=typeof c;return null==c||"boolean"===e?f(c):("number"===e?o:"string"===e?(d=b.color(c))?(c=d,M):s:c instanceof b.color?M:c instanceof Date?n:Array.isArray(c)?m:isNaN(c)?p:o)(a,c)}function u(a,b){return a=+a,b-=a,function(c){return Math.round(a+b*c)}}function v(a,b,c,d,e,f){var g,h,i;return(g=Math.sqrt(a*a+b*b))&&(a/=g,b/=g),(i=a*c+b*d)&&(c-=a*i,d-=b*i),(h=Math.sqrt(c*c+d*d))&&(c/=h,d/=h,i/=h),a*d<b*c&&(a=-a,b=-b,i=-i,g=-g),{translateX:e,translateY:f,rotate:Math.atan2(b,a)*R,skewX:Math.atan(i)*R,scaleX:g,scaleY:h}}function w(a){return"none"===a?S:(I||(I=document.createElement("DIV"),J=document.documentElement,K=document.defaultView),I.style.transform=a,a=K.getComputedStyle(J.appendChild(I),null).getPropertyValue("transform"),J.removeChild(I),a=a.slice(7,-1).split(","),v(+a[0],+a[1],+a[2],+a[3],+a[4],+a[5]))}function x(a){return null==a?S:(L||(L=document.createElementNS("http://www.w3.org/2000/svg","g")),L.setAttribute("transform",a),(a=L.transform.baseVal.consolidate())?(a=a.matrix,v(a.a,a.b,a.c,a.d,a.e,a.f)):S)}function y(a,b,c,d){function e(a){return a.length?a.pop()+" ":""}function f(a,d,e,f,g,h){if(a!==e||d!==f){var i=g.push("translate(",null,b,null,c);h.push({i:i-4,x:o(a,e)},{i:i-2,x:o(d,f)})}else(e||f)&&g.push("translate("+e+b+f+c)}function g(a,b,c,f){a!==b?(a-b>180?b+=360:b-a>180&&(a+=360),f.push({i:c.push(e(c)+"rotate(",null,d)-2,x:o(a,b)})):b&&c.push(e(c)+"rotate("+b+d)}function h(a,b,c,f){a!==b?f.push({i:c.push(e(c)+"skewX(",null,d)-2,x:o(a,b)}):b&&c.push(e(c)+"skewX("+b+d)}function i(a,b,c,d,f,g){if(a!==c||b!==d){var h=f.push(e(f)+"scale(",null,",",null,")");g.push({i:h-4,x:o(a,c)},{i:h-2,x:o(b,d)})}else 1===c&&1===d||f.push(e(f)+"scale("+c+","+d+")")}return function(b,c){var d=[],e=[];return b=a(b),c=a(c),f(b.translateX,b.translateY,c.translateX,c.translateY,d,e),g(b.rotate,c.rotate,d,e),h(b.skewX,c.skewX,d,e),i(b.scaleX,b.scaleY,c.scaleX,c.scaleY,d,e),b=c=null,function(a){for(var b,c=-1,f=e.length;++c<f;)d[(b=e[c]).i]=b.x(a);return d.join("")}}}function z(a){return((a=Math.exp(a))+1/a)/2}function A(a){return((a=Math.exp(a))-1/a)/2}function B(a){return((a=Math.exp(2*a))-1)/(a+1)}function C(a,b){var c,d,e=a[0],f=a[1],g=a[2],h=b[0],i=b[1],j=b[2],k=h-e,l=i-f,m=k*k+l*l;if(m<Y)d=Math.log(j/g)/V,c=function(a){return[e+a*k,f+a*l,g*Math.exp(V*a*d)]};else{var n=Math.sqrt(m),o=(j*j-g*g+X*m)/(2*g*W*n),p=(j*j-g*g-X*m)/(2*j*W*n),q=Math.log(Math.sqrt(o*o+1)-o),r=Math.log(Math.sqrt(p*p+1)-p);d=(r-q)/V,c=function(a){var b=a*d,c=z(q),h=g/(W*n)*(c*B(V*b+q)-A(q));return[e+h*k,f+h*l,g*c/z(V*b+q)]}}return c.duration=1e3*d,c}function D(a){return function(c,d){var e=a((c=b.hsl(c)).h,(d=b.hsl(d)).h),f=k(c.s,d.s),g=k(c.l,d.l),h=k(c.opacity,d.opacity);return function(a){return c.h=e(a),c.s=f(a),c.l=g(a),c.opacity=h(a),c+""}}}function E(a,c){var d=k((a=b.lab(a)).l,(c=b.lab(c)).l),e=k(a.a,c.a),f=k(a.b,c.b),g=k(a.opacity,c.opacity);return function(b){return a.l=d(b),a.a=e(b),a.b=f(b),a.opacity=g(b),a+""}}function F(a){return function(c,d){var e=a((c=b.hcl(c)).h,(d=b.hcl(d)).h),f=k(c.c,d.c),g=k(c.l,d.l),h=k(c.opacity,d.opacity);return function(a){return c.h=e(a),c.c=f(a),c.l=g(a),c.opacity=h(a),c+""}}}function G(a){return function c(d){function e(c,e){var f=a((c=b.cubehelix(c)).h,(e=b.cubehelix(e)).h),g=k(c.s,e.s),h=k(c.l,e.l),i=k(c.opacity,e.opacity);return function(a){return c.h=f(a),c.s=g(a),c.l=h(Math.pow(a,d)),c.opacity=i(a),c+""}}return d=+d,e.gamma=c,e}(1)}function H(a,b){for(var c=new Array(b),d=0;d<b;++d)c[d]=a(d/(b-1));return c}var I,J,K,L,M=function a(c){function d(a,c){var d=e((a=b.rgb(a)).r,(c=b.rgb(c)).r),f=e(a.g,c.g),g=e(a.b,c.b),h=e(a.opacity,c.opacity);return function(b){return a.r=d(b),a.g=f(b),a.b=g(b),a.opacity=h(b),a+""}}var e=j(c);return d.gamma=a,d}(1),N=l(d),O=l(e),P=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Q=new RegExp(P.source,"g"),R=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},T=y(w,"px, ","px)","deg)"),U=y(x,", ",")",")"),V=Math.SQRT2,W=2,X=4,Y=1e-12,Z=D(i),$=D(k),_=F(i),aa=F(k),ba=G(i),ca=G(k);a.interpolate=t,a.interpolateArray=m,a.interpolateBasis=d,a.interpolateBasisClosed=e,a.interpolateDate=n,a.interpolateNumber=o,a.interpolateObject=p,a.interpolateRound=u,a.interpolateString=s,a.interpolateTransformCss=T,a.interpolateTransformSvg=U,a.interpolateZoom=C,a.interpolateRgb=M,a.interpolateRgbBasis=N,a.interpolateRgbBasisClosed=O,a.interpolateHsl=Z,a.interpolateHslLong=$,a.interpolateLab=E,a.interpolateHcl=_,a.interpolateHclLong=aa,a.interpolateCubehelix=ba,a.interpolateCubehelixLong=ca,a.quantize=H,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-color":3}],7:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-array"),a("d3-collection"),a("d3-interpolate"),a("d3-format"),a("d3-time"),a("d3-time-format"),a("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-collection","d3-interpolate","d3-format","d3-time","d3-time-format","d3-color"],e):e(d.d3=d.d3||{},d.d3,d.d3,d.d3,d.d3,d.d3,d.d3,d.d3)}(this,function(a,b,c,d,e,f,g,h){"use strict";function i(a){function b(b){var c=b+"",g=d.get(c);if(!g){if(f!==Z)return f;d.set(c,g=e.push(b))}return a[(g-1)%a.length]}var d=c.map(),e=[],f=Z;return a=null==a?[]:Y.call(a),b.domain=function(a){if(!arguments.length)return e.slice();e=[],d=c.map();for(var f,g,h=-1,i=a.length;++h<i;)d.has(g=(f=a[h])+"")||d.set(g,e.push(f));return b},b.range=function(c){
return arguments.length?(a=Y.call(c),b):a.slice()},b.unknown=function(a){return arguments.length?(f=a,b):f},b.copy=function(){return i().domain(e).range(a).unknown(f)},b}function j(){function a(){var a=f().length,e=h[1]<h[0],i=h[e-0],j=h[1-e];c=(j-i)/Math.max(1,a-l+2*m),k&&(c=Math.floor(c)),i+=(j-i-c*(a-l))*n,d=c*(1-l),k&&(i=Math.round(i),d=Math.round(d));var o=b.range(a).map(function(a){return i+c*a});return g(e?o.reverse():o)}var c,d,e=i().unknown(void 0),f=e.domain,g=e.range,h=[0,1],k=!1,l=0,m=0,n=.5;return delete e.unknown,e.domain=function(b){return arguments.length?(f(b),a()):f()},e.range=function(b){return arguments.length?(h=[+b[0],+b[1]],a()):h.slice()},e.rangeRound=function(b){return h=[+b[0],+b[1]],k=!0,a()},e.bandwidth=function(){return d},e.step=function(){return c},e.round=function(b){return arguments.length?(k=!!b,a()):k},e.padding=function(b){return arguments.length?(l=m=Math.max(0,Math.min(1,b)),a()):l},e.paddingInner=function(b){return arguments.length?(l=Math.max(0,Math.min(1,b)),a()):l},e.paddingOuter=function(b){return arguments.length?(m=Math.max(0,Math.min(1,b)),a()):m},e.align=function(b){return arguments.length?(n=Math.max(0,Math.min(1,b)),a()):n},e.copy=function(){return j().domain(f()).range(h).round(k).paddingInner(l).paddingOuter(m).align(n)},a()}function k(a){var b=a.copy;return a.padding=a.paddingOuter,delete a.paddingInner,delete a.paddingOuter,a.copy=function(){return k(b())},a}function l(){return k(j().paddingInner(1))}function m(a){return function(){return a}}function n(a){return+a}function o(a,b){return(b-=a=+a)?function(c){return(c-a)/b}:m(b)}function p(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=b?0:a>=c?1:d(a)}}}function q(a){return function(b,c){var d=a(b=+b,c=+c);return function(a){return a<=0?b:a>=1?c:d(a)}}}function r(a,b,c,d){var e=a[0],f=a[1],g=b[0],h=b[1];return f<e?(e=c(f,e),g=d(h,g)):(e=c(e,f),g=d(g,h)),function(a){return g(e(a))}}function s(a,c,d,e){var f=Math.min(a.length,c.length)-1,g=new Array(f),h=new Array(f),i=-1;for(a[f]<a[0]&&(a=a.slice().reverse(),c=c.slice().reverse());++i<f;)g[i]=d(a[i],a[i+1]),h[i]=e(c[i],c[i+1]);return function(c){var d=b.bisect(a,c,1,f)-1;return h[d](g[d](c))}}function t(a,b){return b.domain(a.domain()).range(a.range()).interpolate(a.interpolate()).clamp(a.clamp())}function u(a,b){function c(){return f=Math.min(i.length,j.length)>2?s:r,g=h=null,e}function e(b){return(g||(g=f(i,j,l?p(a):a,k)))(+b)}var f,g,h,i=$,j=$,k=d.interpolate,l=!1;return e.invert=function(a){return(h||(h=f(j,i,o,l?q(b):b)))(+a)},e.domain=function(a){return arguments.length?(i=X.call(a,n),c()):i.slice()},e.range=function(a){return arguments.length?(j=Y.call(a),c()):j.slice()},e.rangeRound=function(a){return j=Y.call(a),k=d.interpolateRound,c()},e.clamp=function(a){return arguments.length?(l=!!a,c()):l},e.interpolate=function(a){return arguments.length?(k=a,c()):k},c()}function v(a,c,d){var f,g=a[0],h=a[a.length-1],i=b.tickStep(g,h,null==c?10:c);switch(d=e.formatSpecifier(null==d?",f":d),d.type){case"s":var j=Math.max(Math.abs(g),Math.abs(h));return null!=d.precision||isNaN(f=e.precisionPrefix(i,j))||(d.precision=f),e.formatPrefix(d,j);case"":case"e":case"g":case"p":case"r":null!=d.precision||isNaN(f=e.precisionRound(i,Math.max(Math.abs(g),Math.abs(h))))||(d.precision=f-("e"===d.type));break;case"f":case"%":null!=d.precision||isNaN(f=e.precisionFixed(i))||(d.precision=f-2*("%"===d.type))}return e.format(d)}function w(a){var c=a.domain;return a.ticks=function(a){var d=c();return b.ticks(d[0],d[d.length-1],null==a?10:a)},a.tickFormat=function(a,b){return v(c(),a,b)},a.nice=function(d){var e=c(),f=e.length-1,g=null==d?10:d,h=e[0],i=e[f],j=b.tickStep(h,i,g);return j&&(j=b.tickStep(Math.floor(h/j)*j,Math.ceil(i/j)*j,g),e[0]=Math.floor(h/j)*j,e[f]=Math.ceil(i/j)*j,c(e)),a},a}function x(){var a=u(o,d.interpolateNumber);return a.copy=function(){return t(a,x())},w(a)}function y(){function a(a){return+a}var b=[0,1];return a.invert=a,a.domain=a.range=function(c){return arguments.length?(b=X.call(c,n),a):b.slice()},a.copy=function(){return y().domain(b)},w(a)}function z(a,b){a=a.slice();var c,d=0,e=a.length-1,f=a[d],g=a[e];return g<f&&(c=d,d=e,e=c,c=f,f=g,g=c),a[d]=b.floor(f),a[e]=b.ceil(g),a}function A(a,b){return(b=Math.log(b/a))?function(c){return Math.log(c/a)/b}:m(b)}function B(a,b){return a<0?function(c){return-Math.pow(-b,c)*Math.pow(-a,1-c)}:function(c){return Math.pow(b,c)*Math.pow(a,1-c)}}function C(a){return isFinite(a)?+("1e"+a):a<0?0:a}function D(a){return 10===a?C:a===Math.E?Math.exp:function(b){return Math.pow(a,b)}}function E(a){return a===Math.E?Math.log:10===a&&Math.log10||2===a&&Math.log2||(a=Math.log(a),function(b){return Math.log(b)/a})}function F(a){return function(b){return-a(-b)}}function G(){function a(){return g=E(f),h=D(f),d()[0]<0&&(g=F(g),h=F(h)),c}var c=u(A,B).domain([1,10]),d=c.domain,f=10,g=E(10),h=D(10);return c.base=function(b){return arguments.length?(f=+b,a()):f},c.domain=function(b){return arguments.length?(d(b),a()):d()},c.ticks=function(a){var c,e=d(),i=e[0],j=e[e.length-1];(c=j<i)&&(n=i,i=j,j=n);var k,l,m,n=g(i),o=g(j),p=null==a?10:+a,q=[];if(!(f%1)&&o-n<p){if(n=Math.round(n)-1,o=Math.round(o)+1,i>0){for(;n<o;++n)for(l=1,k=h(n);l<f;++l)if(m=k*l,!(m<i)){if(m>j)break;q.push(m)}}else for(;n<o;++n)for(l=f-1,k=h(n);l>=1;--l)if(m=k*l,!(m<i)){if(m>j)break;q.push(m)}}else q=b.ticks(n,o,Math.min(o-n,p)).map(h);return c?q.reverse():q},c.tickFormat=function(a,b){if(null==b&&(b=10===f?".0e":","),"function"!=typeof b&&(b=e.format(b)),a===1/0)return b;null==a&&(a=10);var d=Math.max(1,f*a/c.ticks().length);return function(a){var c=a/h(Math.round(g(a)));return c*f<f-.5&&(c*=f),c<=d?b(a):""}},c.nice=function(){return d(z(d(),{floor:function(a){return h(Math.floor(g(a)))},ceil:function(a){return h(Math.ceil(g(a)))}}))},c.copy=function(){return t(c,G().base(f))},c}function H(a,b){return a<0?-Math.pow(-a,b):Math.pow(a,b)}function I(){function a(a,b){return(b=H(b,c)-(a=H(a,c)))?function(d){return(H(d,c)-a)/b}:m(b)}function b(a,b){return b=H(b,c)-(a=H(a,c)),function(d){return H(a+b*d,1/c)}}var c=1,d=u(a,b),e=d.domain;return d.exponent=function(a){return arguments.length?(c=+a,e(e())):c},d.copy=function(){return t(d,I().exponent(c))},w(d)}function J(){return I().exponent(.5)}function K(){function a(){var a=0,g=Math.max(1,e.length);for(f=new Array(g-1);++a<g;)f[a-1]=b.quantile(d,a/g);return c}function c(a){if(!isNaN(a=+a))return e[b.bisect(f,a)]}var d=[],e=[],f=[];return c.invertExtent=function(a){var b=e.indexOf(a);return b<0?[NaN,NaN]:[b>0?f[b-1]:d[0],b<f.length?f[b]:d[d.length-1]]},c.domain=function(c){if(!arguments.length)return d.slice();d=[];for(var e,f=0,g=c.length;f<g;++f)e=c[f],null==e||isNaN(e=+e)||d.push(e);return d.sort(b.ascending),a()},c.range=function(b){return arguments.length?(e=Y.call(b),a()):e.slice()},c.quantiles=function(){return f.slice()},c.copy=function(){return K().domain(d).range(e)},c}function L(){function a(a){if(a<=a)return h[b.bisect(g,a,0,f)]}function c(){var b=-1;for(g=new Array(f);++b<f;)g[b]=((b+1)*e-(b-f)*d)/(f+1);return a}var d=0,e=1,f=1,g=[.5],h=[0,1];return a.domain=function(a){return arguments.length?(d=+a[0],e=+a[1],c()):[d,e]},a.range=function(a){return arguments.length?(f=(h=Y.call(a)).length-1,c()):h.slice()},a.invertExtent=function(a){var b=h.indexOf(a);return b<0?[NaN,NaN]:b<1?[d,g[0]]:b>=f?[g[f-1],e]:[g[b-1],g[b]]},a.copy=function(){return L().domain([d,e]).range(h)},w(a)}function M(){function a(a){if(a<=a)return d[b.bisect(c,a,0,e)]}var c=[.5],d=[0,1],e=1;return a.domain=function(b){return arguments.length?(c=Y.call(b),e=Math.min(c.length,d.length-1),a):c.slice()},a.range=function(b){return arguments.length?(d=Y.call(b),e=Math.min(c.length,d.length-1),a):d.slice()},a.invertExtent=function(a){var b=d.indexOf(a);return[c[b-1],c[b]]},a.copy=function(){return M().domain(c).range(d)},a}function N(a){return new Date(a)}function O(a){return a instanceof Date?+a:+new Date((+a))}function P(a,c,e,f,g,h,i,j,k){function l(b){return(i(b)<b?r:h(b)<b?s:g(b)<b?v:f(b)<b?w:c(b)<b?e(b)<b?x:y:a(b)<b?A:B)(b)}function m(c,d,e,f){if(null==c&&(c=10),"number"==typeof c){var g=Math.abs(e-d)/c,h=b.bisector(function(a){return a[2]}).right(C,g);h===C.length?(f=b.tickStep(d/fa,e/fa,c),c=a):h?(h=C[g/C[h-1][2]<C[h][2]/g?h-1:h],f=h[1],c=h[0]):(f=b.tickStep(d,e,c),c=j)}return null==f?c:c.every(f)}var n=u(o,d.interpolateNumber),p=n.invert,q=n.domain,r=k(".%L"),s=k(":%S"),v=k("%I:%M"),w=k("%I %p"),x=k("%a %d"),y=k("%b %d"),A=k("%B"),B=k("%Y"),C=[[i,1,_],[i,5,5*_],[i,15,15*_],[i,30,30*_],[h,1,aa],[h,5,5*aa],[h,15,15*aa],[h,30,30*aa],[g,1,ba],[g,3,3*ba],[g,6,6*ba],[g,12,12*ba],[f,1,ca],[f,2,2*ca],[e,1,da],[c,1,ea],[c,3,3*ea],[a,1,fa]];return n.invert=function(a){return new Date(p(a))},n.domain=function(a){return arguments.length?q(X.call(a,O)):q().map(N)},n.ticks=function(a,b){var c,d=q(),e=d[0],f=d[d.length-1],g=f<e;return g&&(c=e,e=f,f=c),c=m(a,e,f,b),c=c?c.range(e,f+1):[],g?c.reverse():c},n.tickFormat=function(a,b){return null==b?l:k(b)},n.nice=function(a,b){var c=q();return(a=m(a,c[0],c[c.length-1],b))?q(z(c,a)):n},n.copy=function(){return t(n,P(a,c,e,f,g,h,i,j,k))},n}function Q(){return P(f.timeYear,f.timeMonth,f.timeWeek,f.timeDay,f.timeHour,f.timeMinute,f.timeSecond,f.timeMillisecond,g.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}function R(){return P(f.utcYear,f.utcMonth,f.utcWeek,f.utcDay,f.utcHour,f.utcMinute,f.utcSecond,f.utcMillisecond,g.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function S(a){return a.match(/.{6}/g).map(function(a){return"#"+a})}function T(a){(a<0||a>1)&&(a-=Math.floor(a));var b=Math.abs(a-.5);return na.h=360*a-100,na.s=1.5-1.5*b,na.l=.8-.9*b,na+""}function U(a){var b=a.length;return function(c){return a[Math.max(0,Math.min(b-1,Math.floor(c*b)))]}}function V(a){function b(b){var f=(b-c)/(d-c);return a(e?Math.max(0,Math.min(1,f)):f)}var c=0,d=1,e=!1;return b.domain=function(a){return arguments.length?(c=+a[0],d=+a[1],b):[c,d]},b.clamp=function(a){return arguments.length?(e=!!a,b):e},b.interpolator=function(c){return arguments.length?(a=c,b):a},b.copy=function(){return V(a).domain([c,d]).clamp(e)},w(b)}var W=Array.prototype,X=W.map,Y=W.slice,Z={name:"implicit"},$=[0,1],_=1e3,aa=60*_,ba=60*aa,ca=24*ba,da=7*ca,ea=30*ca,fa=365*ca,ga=S("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ha=S("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),ia=S("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),ja=S("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),ka=d.interpolateCubehelixLong(h.cubehelix(300,.5,0),h.cubehelix(-240,.5,1)),la=d.interpolateCubehelixLong(h.cubehelix(-100,.75,.35),h.cubehelix(80,1.5,.8)),ma=d.interpolateCubehelixLong(h.cubehelix(260,.75,.35),h.cubehelix(80,1.5,.8)),na=h.cubehelix(),oa=U(S("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),pa=U(S("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qa=U(S("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ra=U(S("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.scaleBand=j,a.scalePoint=l,a.scaleIdentity=y,a.scaleLinear=x,a.scaleLog=G,a.scaleOrdinal=i,a.scaleImplicit=Z,a.scalePow=I,a.scaleSqrt=J,a.scaleQuantile=K,a.scaleQuantize=L,a.scaleThreshold=M,a.scaleTime=Q,a.scaleUtc=R,a.schemeCategory10=ga,a.schemeCategory20b=ha,a.schemeCategory20c=ia,a.schemeCategory20=ja,a.interpolateCubehelixDefault=ka,a.interpolateRainbow=T,a.interpolateWarm=la,a.interpolateCool=ma,a.interpolateViridis=oa,a.interpolateMagma=pa,a.interpolateInferno=qa,a.interpolatePlasma=ra,a.scaleSequential=V,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-array":1,"d3-collection":2,"d3-color":3,"d3-format":5,"d3-interpolate":6,"d3-time":9,"d3-time-format":8}],8:[function(a,b,c){!function(d,e){"object"==typeof c&&"undefined"!=typeof b?e(c,a("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],e):e(d.d3=d.d3||{},d.d3)}(this,function(a,b){"use strict";function c(a){if(0<=a.y&&a.y<100){var b=new Date((-1),a.m,a.d,a.H,a.M,a.S,a.L);return b.setFullYear(a.y),b}return new Date(a.y,a.m,a.d,a.H,a.M,a.S,a.L)}function d(a){if(0<=a.y&&a.y<100){var b=new Date(Date.UTC(-1,a.m,a.d,a.H,a.M,a.S,a.L));return b.setUTCFullYear(a.y),b}return new Date(Date.UTC(a.y,a.m,a.d,a.H,a.M,a.S,a.L))}function e(a){return{y:a,m:0,d:1,H:0,M:0,S:0,L:0}}function f(a){function b(a,b){return function(c){var d,e,f,g=[],h=-1,i=0,j=a.length;for(c instanceof Date||(c=new Date((+c)));++h<j;)37===a.charCodeAt(h)&&(g.push(a.slice(i,h)),null!=(e=da[d=a.charAt(++h)])?d=a.charAt(++h):e="e"===d?" ":"0",(f=b[d])&&(d=f(c,e)),g.push(d),i=h+1);return g.push(a.slice(i,h)),g.join("")}}function f(a,b){return function(c){var f=e(1900),h=g(f,a,c+="",0);if(h!=c.length)return null;if("p"in f&&(f.H=f.H%12+12*f.p),"W"in f||"U"in f){"w"in f||(f.w="W"in f?1:0);var i="Z"in f?d(e(f.y)).getUTCDay():b(e(f.y)).getDay();f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(i+5)%7:f.w+7*f.U-(i+6)%7}return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,d(f)):b(f)}}function g(a,b,c,d){for(var e,f,g=0,h=b.length,i=c.length;g<h;){if(d>=i)return-1;if(e=b.charCodeAt(g++),37===e){if(e=b.charAt(g++),f=La[e in da?b.charAt(g++):e],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function h(a,b,c){var d=za.exec(b.slice(c));return d?(a.p=Aa[d[0].toLowerCase()],c+d[0].length):-1}function _(a,b,c){var d=Da.exec(b.slice(c));return d?(a.w=Ea[d[0].toLowerCase()],c+d[0].length):-1}function aa(a,b,c){var d=Ba.exec(b.slice(c));return d?(a.w=Ca[d[0].toLowerCase()],c+d[0].length):-1}function ba(a,b,c){var d=Ha.exec(b.slice(c));return d?(a.m=Ia[d[0].toLowerCase()],c+d[0].length):-1}function ca(a,b,c){var d=Fa.exec(b.slice(c));return d?(a.m=Ga[d[0].toLowerCase()],c+d[0].length):-1}function ea(a,b,c){return g(a,ra,b,c)}function fa(a,b,c){return g(a,sa,b,c)}function ga(a,b,c){return g(a,ta,b,c)}function ha(a){return wa[a.getDay()]}function ia(a){return va[a.getDay()]}function ja(a){return ya[a.getMonth()]}function ka(a){return xa[a.getMonth()]}function la(a){return ua[+(a.getHours()>=12)]}function ma(a){return wa[a.getUTCDay()]}function na(a){return va[a.getUTCDay()]}function oa(a){return ya[a.getUTCMonth()]}function pa(a){return xa[a.getUTCMonth()]}function qa(a){return ua[+(a.getUTCHours()>=12)]}var ra=a.dateTime,sa=a.date,ta=a.time,ua=a.periods,va=a.days,wa=a.shortDays,xa=a.months,ya=a.shortMonths,za=i(ua),Aa=j(ua),Ba=i(va),Ca=j(va),Da=i(wa),Ea=j(wa),Fa=i(xa),Ga=j(xa),Ha=i(ya),Ia=j(ya),Ja={a:ha,A:ia,b:ja,B:ka,c:null,d:y,e:y,H:z,I:A,j:B,L:C,m:D,M:E,p:la,S:F,U:G,w:H,W:I,x:null,X:null,y:J,Y:K,Z:L,"%":$},Ka={a:ma,A:na,b:oa,B:pa,c:null,d:M,e:M,H:N,I:O,j:P,L:Q,m:R,M:S,p:qa,S:T,U:U,w:V,W:W,x:null,X:null,y:X,Y:Y,Z:Z,"%":$},La={a:_,A:aa,b:ba,B:ca,c:ea,d:r,e:r,H:t,I:t,j:s,L:w,m:q,M:u,p:h,S:v,U:l,w:k,W:m,x:fa,X:ga,y:o,Y:n,Z:p,"%":x};return Ja.x=b(sa,Ja),Ja.X=b(ta,Ja),Ja.c=b(ra,Ja),Ka.x=b(sa,Ka),Ka.X=b(ta,Ka),Ka.c=b(ra,Ka),{format:function(a){var c=b(a+="",Ja);return c.toString=function(){return a},c},parse:function(a){var b=f(a+="",c);return b.toString=function(){return a},b},utcFormat:function(a){var c=b(a+="",Ka);return c.toString=function(){return a},c},utcParse:function(a){var b=f(a,d);return b.toString=function(){return a},b}}}function g(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f<c?new Array(c-f+1).join(b)+e:e)}function h(a){return a.replace(ga,"\\$&")}function i(a){return new RegExp("^(?:"+a.map(h).join("|")+")","i")}function j(a){for(var b={},c=-1,d=a.length;++c<d;)b[a[c].toLowerCase()]=c;return b}function k(a,b,c){var d=ea.exec(b.slice(c,c+1));return d?(a.w=+d[0],c+d[0].length):-1}function l(a,b,c){var d=ea.exec(b.slice(c));return d?(a.U=+d[0],c+d[0].length):-1}function m(a,b,c){var d=ea.exec(b.slice(c));return d?(a.W=+d[0],c+d[0].length):-1}function n(a,b,c){var d=ea.exec(b.slice(c,c+4));return d?(a.y=+d[0],c+d[0].length):-1}function o(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.y=+d[0]+(+d[0]>68?1900:2e3),c+d[0].length):-1}function p(a,b,c){var d=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(b.slice(c,c+6));return d?(a.Z=d[1]?0:-(d[2]+(d[3]||"00")),c+d[0].length):-1}function q(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function r(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function s(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.m=0,a.d=+d[0],c+d[0].length):-1}function t(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function u(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function v(a,b,c){var d=ea.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function w(a,b,c){var d=ea.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function x(a,b,c){var d=fa.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function y(a,b){return g(a.getDate(),b,2)}function z(a,b){return g(a.getHours(),b,2)}function A(a,b){return g(a.getHours()%12||12,b,2)}function B(a,c){return g(1+b.timeDay.count(b.timeYear(a),a),c,3)}function C(a,b){return g(a.getMilliseconds(),b,3)}function D(a,b){return g(a.getMonth()+1,b,2)}function E(a,b){return g(a.getMinutes(),b,2)}function F(a,b){return g(a.getSeconds(),b,2)}function G(a,c){return g(b.timeSunday.count(b.timeYear(a),a),c,2)}function H(a){return a.getDay()}function I(a,c){return g(b.timeMonday.count(b.timeYear(a),a),c,2)}function J(a,b){return g(a.getFullYear()%100,b,2)}function K(a,b){return g(a.getFullYear()%1e4,b,4)}function L(a){var b=a.getTimezoneOffset();return(b>0?"-":(b*=-1,"+"))+g(b/60|0,"0",2)+g(b%60,"0",2)}function M(a,b){return g(a.getUTCDate(),b,2)}function N(a,b){return g(a.getUTCHours(),b,2)}function O(a,b){return g(a.getUTCHours()%12||12,b,2)}function P(a,c){return g(1+b.utcDay.count(b.utcYear(a),a),c,3)}function Q(a,b){return g(a.getUTCMilliseconds(),b,3)}function R(a,b){return g(a.getUTCMonth()+1,b,2)}function S(a,b){return g(a.getUTCMinutes(),b,2)}function T(a,b){return g(a.getUTCSeconds(),b,2)}function U(a,c){return g(b.utcSunday.count(b.utcYear(a),a),c,2)}function V(a){return a.getUTCDay()}function W(a,c){return g(b.utcMonday.count(b.utcYear(a),a),c,2)}function X(a,b){return g(a.getUTCFullYear()%100,b,2)}function Y(a,b){return g(a.getUTCFullYear()%1e4,b,4)}function Z(){return"+0000"}function $(){return"%"}function _(b){return ca=f(b),a.timeFormat=ca.format,a.timeParse=ca.parse,a.utcFormat=ca.utcFormat,a.utcParse=ca.utcParse,ca}function aa(a){return a.toISOString()}function ba(a){var b=new Date(a);return isNaN(b)?null:b}var ca,da={"-":"",_:" ",0:"0"},ea=/^\s*\d+/,fa=/^%/,ga=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ha="%Y-%m-%dT%H:%M:%S.%LZ",ia=Date.prototype.toISOString?aa:a.utcFormat(ha),ja=+new Date("2000-01-01T00:00:00.000Z")?ba:a.utcParse(ha);a.timeFormatDefaultLocale=_,a.timeFormatLocale=f,a.isoFormat=ia,a.isoParse=ja,Object.defineProperty(a,"__esModule",{value:!0})})},{"d3-time":9}],9:[function(a,b,c){!function(a,d){"object"==typeof c&&"undefined"!=typeof b?d(c):"function"==typeof define&&define.amd?define(["exports"],d):d(a.d3=a.d3||{})}(this,function(a){"use strict";function b(a,c,d,g){function h(b){return a(b=new Date((+b))),b}return h.floor=h,h.ceil=function(b){return a(b=new Date(b-1)),c(b,1),a(b),b},h.round=function(a){var b=h(a),c=h.ceil(a);return a-b<c-a?b:c},h.offset=function(a,b){return c(a=new Date((+a)),null==b?1:Math.floor(b)),a},h.range=function(b,d,e){var f=[];if(b=h.ceil(b),e=null==e?1:Math.floor(e),!(b<d&&e>0))return f;do f.push(new Date((+b)));while(c(b,e),a(b),b<d);return f},h.filter=function(d){return b(function(b){for(;a(b),!d(b);)b.setTime(b-1)},function(a,b){for(;--b>=0;)for(;c(a,1),!d(a););})},d&&(h.count=function(b,c){return e.setTime(+b),f.setTime(+c),a(e),a(f),Math.floor(d(e,f))},h.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?h.filter(g?function(b){return g(b)%a===0}:function(b){return h.count(0,b)%a===0}):h:null}),h}function c(a){return b(function(b){b.setDate(b.getDate()-(b.getDay()+7-a)%7),b.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+7*b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/m})}function d(a){return b(function(b){b.setUTCDate(b.getUTCDate()-(b.getUTCDay()+7-a)%7),b.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+7*b)},function(a,b){return(b-a)/m})}var e=new Date,f=new Date,g=b(function(){},function(a,b){a.setTime(+a+b)},function(a,b){return b-a});g.every=function(a){return a=Math.floor(a),isFinite(a)&&a>0?a>1?b(function(b){b.setTime(Math.floor(b/a)*a)},function(b,c){b.setTime(+b+c*a)},function(b,c){return(c-b)/a}):g:null};var h=g.range,i=1e3,j=6e4,k=36e5,l=864e5,m=6048e5,n=b(function(a){a.setTime(Math.floor(a/i)*i)},function(a,b){a.setTime(+a+b*i)},function(a,b){return(b-a)/i},function(a){return a.getUTCSeconds()}),o=n.range,p=b(function(a){a.setTime(Math.floor(a/j)*j)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getMinutes()}),q=p.range,r=b(function(a){var b=a.getTimezoneOffset()*j%k;b<0&&(b+=k),a.setTime(Math.floor((+a-b)/k)*k+b)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getHours()}),s=r.range,t=b(function(a){a.setHours(0,0,0,0)},function(a,b){a.setDate(a.getDate()+b)},function(a,b){return(b-a-(b.getTimezoneOffset()-a.getTimezoneOffset())*j)/l},function(a){return a.getDate()-1}),u=t.range,v=c(0),w=c(1),x=c(2),y=c(3),z=c(4),A=c(5),B=c(6),C=v.range,D=w.range,E=x.range,F=y.range,G=z.range,H=A.range,I=B.range,J=b(function(a){a.setDate(1),a.setHours(0,0,0,0)},function(a,b){a.setMonth(a.getMonth()+b)},function(a,b){return b.getMonth()-a.getMonth()+12*(b.getFullYear()-a.getFullYear())},function(a){return a.getMonth()}),K=J.range,L=b(function(a){a.setMonth(0,1),a.setHours(0,0,0,0)},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a,b){return b.getFullYear()-a.getFullYear()},function(a){return a.getFullYear()});L.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setFullYear(Math.floor(b.getFullYear()/a)*a),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,c){b.setFullYear(b.getFullYear()+c*a)}):null};var M=L.range,N=b(function(a){a.setUTCSeconds(0,0)},function(a,b){a.setTime(+a+b*j)},function(a,b){return(b-a)/j},function(a){return a.getUTCMinutes()}),O=N.range,P=b(function(a){a.setUTCMinutes(0,0,0)},function(a,b){a.setTime(+a+b*k)},function(a,b){return(b-a)/k},function(a){return a.getUTCHours()}),Q=P.range,R=b(function(a){a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCDate(a.getUTCDate()+b)},function(a,b){return(b-a)/l},function(a){return a.getUTCDate()-1}),S=R.range,T=d(0),U=d(1),V=d(2),W=d(3),X=d(4),Y=d(5),Z=d(6),$=T.range,_=U.range,aa=V.range,ba=W.range,ca=X.range,da=Y.range,ea=Z.range,fa=b(function(a){a.setUTCDate(1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCMonth(a.getUTCMonth()+b)},function(a,b){return b.getUTCMonth()-a.getUTCMonth()+12*(b.getUTCFullYear()-a.getUTCFullYear())},function(a){return a.getUTCMonth()}),ga=fa.range,ha=b(function(a){a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},function(a,b){a.setUTCFullYear(a.getUTCFullYear()+b)},function(a,b){return b.getUTCFullYear()-a.getUTCFullYear()},function(a){return a.getUTCFullYear()});ha.every=function(a){return isFinite(a=Math.floor(a))&&a>0?b(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/a)*a),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,c){b.setUTCFullYear(b.getUTCFullYear()+c*a)}):null};var ia=ha.range;a.timeInterval=b,a.timeMillisecond=g,a.timeMilliseconds=h,a.utcMillisecond=g,a.utcMilliseconds=h,a.timeSecond=n,a.timeSeconds=o,a.utcSecond=n,a.utcSeconds=o,a.timeMinute=p,a.timeMinutes=q,a.timeHour=r,a.timeHours=s,a.timeDay=t,a.timeDays=u,a.timeWeek=v,a.timeWeeks=C,a.timeSunday=v,a.timeSundays=C,a.timeMonday=w,a.timeMondays=D,a.timeTuesday=x,a.timeTuesdays=E,a.timeWednesday=y,a.timeWednesdays=F,a.timeThursday=z,a.timeThursdays=G,a.timeFriday=A,a.timeFridays=H,a.timeSaturday=B,a.timeSaturdays=I,a.timeMonth=J,a.timeMonths=K,a.timeYear=L,a.timeYears=M,a.utcMinute=N,a.utcMinutes=O,a.utcHour=P,a.utcHours=Q,a.utcDay=R,a.utcDays=S,a.utcWeek=T,a.utcWeeks=$,a.utcSunday=T,a.utcSundays=$,a.utcMonday=U,a.utcMondays=_,a.utcTuesday=V,a.utcTuesdays=aa,a.utcWednesday=W,a.utcWednesdays=ba,a.utcThursday=X,a.utcThursdays=ca,a.utcFriday=Y,a.utcFridays=da,a.utcSaturday=Z,a.utcSaturdays=ea,a.utcMonth=fa,a.utcMonths=ga,a.utcYear=ha,a.utcYears=ia,Object.defineProperty(a,"__esModule",{value:!0})})},{}],10:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(c,w,m,n,r,u),i=a.selectAll("g").data([c]);i.enter().append("g").attr("class",o+"legendCells");var j=a.select("."+o+"legendCells").selectAll("."+o+"cell").data(h.data),y=j.enter().append("g").attr("class",o+"cell"),z=(y.append(d).attr("class",o+"swatch"),a.selectAll("g."+o+"cell "+d));g.default.d3_addEvents(y,x),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(d,z,f,e,k,b),g.default.d3_addText(a,y,h.labels,o);var A=y.selectAll("text"),B=z.nodes().map(function(a){return a.getBBox()});p?z.attr("class",function(a){return o+"swatch "+h.feature(a)}):"line"==d?z.style("stroke",h.feature):z.style("fill",h.feature);var C,D,E="start"==t?0:"middle"==t?.5:1;"vertical"===v?(C=function(a,b){return"translate(0, "+b*(B[b].height+l)+")"},D=function(a,b){return"translate("+(B[b].width+B[b].x+s)+","+(B[b].y+B[b].height/2+5)+")"}):"horizontal"===v&&(C=function(a,b){return"translate("+b*(B[b].width+l)+",0)"},D=function(a,b){return"translate("+(B[b].width*E+B[b].x)+","+(B[b].height+B[b].y+s+8)+")"}),g.default.d3_placement(v,y,C,A,D,t),
g.default.d3_title(a,q,o),j.transition().style("opacity",1)}var b,c=(0,i.scaleLinear)(),d="rect",e=15,f=15,k=10,l=2,m=[5],n=[],o="",p=!1,q="",r=(0,j.format)(".01f"),s=10,t="middle",u="to",v="vertical",w=!1,x=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(b){return arguments.length?(c=b,a):c},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.shape=function(c,e){return arguments.length?(("rect"==c||"circle"==c||"line"==c||"path"==c&&"string"==typeof e)&&(d=c,b=e),a):d},a.shapeWidth=function(b){return arguments.length?(e=+b,a):e},a.shapeHeight=function(b){return arguments.length?(f=+b,a):f},a.shapeRadius=function(b){return arguments.length?(k=+b,a):k},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(n=b,a):n},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(t=b),a):t},a.labelFormat=function(b){return arguments.length?(r=b,a):r},a.labelOffset=function(b){return arguments.length?(s=+b,a):s},a.labelDelimiter=function(b){return arguments.length?(u=b,a):u},a.useClass=function(b){return arguments.length?(b!==!0&&b!==!1||(p=b),a):p},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(v=b),a):v},a.ascending=function(b){return arguments.length?(w=!!b,a):w},a.classPrefix=function(b){return arguments.length?(o=b,a):o},a.title=function(b){return arguments.length?(q=b,a):q},a.on=function(){var b=x.on.apply(x,arguments);return b===x?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format")},{"./legend":11,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],11:[function(a,b,c){"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default={d3_identity:function(a){return a},d3_mergeLabels:function(a,b){if(0===b.length)return a;a=a?a:[];for(var c=b.length;c<a.length;c++)b.push(a[c]);return b},d3_linearLegend:function(a,b,c){var d=[];if(b.length>1)d=b;else for(var e=a.domain(),f=(e[e.length-1]-e[0])/(b-1),g=0;g<b;g++)d.push(e[0]+g*f);var h=d.map(c);return{data:d,labels:h,feature:function(b){return a(b)}}},d3_quantLegend:function(a,b,c){var d=a.range().map(function(d){var e=a.invertExtent(d);b(e[0]),b(e[1]);return b(e[0])+" "+c+" "+b(e[1])});return{data:a.range(),labels:d,feature:this.d3_identity}},d3_ordinalLegend:function(a){return{data:a.domain(),labels:a.domain(),feature:function(b){return a(b)}}},d3_drawShapes:function(a,b,c,d,e,f){"rect"===a?b.attr("height",c).attr("width",d):"circle"===a?b.attr("r",e):"line"===a?b.attr("x1",0).attr("x2",d).attr("y1",0).attr("y2",0):"path"===a&&b.attr("d",f)},d3_addText:function(a,b,c,d){b.append("text").attr("class",d+"label"),a.selectAll("g."+d+"cell text").data(c).text(this.d3_identity)},d3_calcType:function(a,b,c,d,e,f){var g=a.invertExtent?this.d3_quantLegend(a,e,f):a.ticks?this.d3_linearLegend(a,c,e):this.d3_ordinalLegend(a);return g.labels=this.d3_mergeLabels(g.labels,d),b&&(g.labels=this.d3_reverse(g.labels),g.data=this.d3_reverse(g.data)),g},d3_reverse:function(a){for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[d-c-1];return b},d3_placement:function(a,b,c,d,e,f){b.attr("transform",c),d.attr("transform",e),"horizontal"===a&&d.style("text-anchor",f)},d3_addEvents:function(a,b){var c=this;a.on("mouseover.legend",function(a){c.d3_cellOver(b,a,this)}).on("mouseout.legend",function(a){c.d3_cellOut(b,a,this)}).on("click.legend",function(a){c.d3_cellClick(b,a,this)})},d3_cellOver:function(a,b,c){a.call("cellover",c,b)},d3_cellOut:function(a,b,c){a.call("cellout",c,b)},d3_cellClick:function(a,b,c){a.call("cellclick",c,b)},d3_title:function(a,b,c){if(""!==b){var d=a.selectAll("text."+c+"legendTitle");d.data([b]).enter().append("text").attr("class",c+"legendTitle"),a.selectAll("text."+c+"legendTitle").text(b);var e=a.select("."+c+"legendCells"),f=a.select("."+c+"legendTitle").nodes().map(function(a){return a.getBBox().height})[0],g=-e.nodes().map(function(a){return a.getBBox().x})[0];e.attr("transform","translate("+g+","+(f+10)+")")}}}},{}],12:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(c,u,l,m,p,s),i=a.selectAll("g").data([c]);i.enter().append("g").attr("class",n+"legendCells");var j=a.select("."+n+"legendCells").selectAll("."+n+"cell").data(h.data),w=j.enter().append("g").attr("class",n+"cell"),x=(w.append(d).attr("class",n+"swatch"),a.selectAll("g."+n+"cell "+d));g.default.d3_addEvents(w,v),j.exit().transition().style("opacity",0).remove(),"line"===d?(g.default.d3_drawShapes(d,x,0,e),x.attr("stroke-width",h.feature)):g.default.d3_drawShapes(d,x,h.feature,h.feature,h.feature,b),g.default.d3_addText(a,w,h.labels,n);var y,z,A=w.selectAll("text"),B=x.nodes().map(function(a,b){var e=a.getBBox(),f=c(h.data[b]);return"line"===d&&"horizontal"===t?e.height=e.height+f:"line"===d&&"vertical"===t&&(e.width=e.width),e}),C=(0,k.max)(B,function(a){return a.height+a.y}),D=(0,k.max)(B,function(a){return a.width+a.x}),E="start"==r?0:"middle"==r?.5:1;"vertical"===t?(y=function(a,b){var c=(0,k.sum)(B.slice(0,b+1),function(a){return a.height});return"translate(0, "+(c+b*f)+")"},z=function(a,b){return"translate("+(D+q)+","+(B[b].y+B[b].height/2+5)+")"}):"horizontal"===t&&(y=function(a,b){var c=(0,k.sum)(B.slice(0,b+1),function(a){return a.width});return"translate("+(c+b*f)+",0)"},z=function(a,b){return"translate("+(B[b].width*E+B[b].x)+","+(C+q)+")"}),g.default.d3_placement(t,w,y,A,z,r),g.default.d3_title(a,o,n),j.transition().style("opacity",1)}var b,c=(0,i.scaleLinear)(),d="rect",e=15,f=2,l=[5],m=[],n="",o="",p=(0,j.format)(".01f"),q=10,r="middle",s="to",t="vertical",u=!1,v=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(b){return arguments.length?(c=b,a):c},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(l=b),a):l},a.shape=function(c,e){return arguments.length?("rect"!=c&&"circle"!=c&&"line"!=c||(d=c,b=e),a):d},a.shapeWidth=function(b){return arguments.length?(e=+b,a):e},a.shapePadding=function(b){return arguments.length?(f=+b,a):f},a.labels=function(b){return arguments.length?(m=b,a):m},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(p=b,a):p},a.labelOffset=function(b){return arguments.length?(q=+b,a):q},a.labelDelimiter=function(b){return arguments.length?(s=b,a):s},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(t=b),a):t},a.ascending=function(b){return arguments.length?(u=!!b,a):u},a.classPrefix=function(b){return arguments.length?(n=b,a):n},a.title=function(b){return arguments.length?(o=b,a):o},a.on=function(){var b=v.on.apply(v,arguments);return b===v?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":11,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],13:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}function e(){function a(a){var h=g.default.d3_calcType(b,v,m,n,q,t),i=a.selectAll("g").data([b]);i.enter().append("g").attr("class",o+"legendCells");var j=a.select("."+o+"legendCells").selectAll("."+o+"cell").data(h.data),x=j.enter().append("g").attr("class",o+"cell"),y=(x.append(c).attr("class",o+"swatch"),a.selectAll("g."+o+"cell "+c));g.default.d3_addEvents(x,w),j.exit().transition().style("opacity",0).remove(),g.default.d3_drawShapes(c,y,e,d,f,h.feature),g.default.d3_addText(a,x,h.labels,o);var z,A,B=x.selectAll("text"),C=y.nodes().map(function(a){return a.getBBox()}),D=(0,k.max)(C,function(a){return a.height}),E=(0,k.max)(C,function(a){return a.width}),F="start"==r?0:"middle"==r?.5:1;"vertical"===u?(z=function(a,b){return"translate(0, "+b*(D+l)+")"},A=function(a,b){return"translate("+(E+s)+","+(C[b].y+C[b].height/2+5)+")"}):"horizontal"===u&&(z=function(a,b){return"translate("+b*(E+l)+",0)"},A=function(a,b){return"translate("+(C[b].width*F+C[b].x)+","+(D+s)+")"}),g.default.d3_placement(u,x,z,B,A,r),g.default.d3_title(a,p,o),j.transition().style("opacity",1)}var b=(0,i.scaleLinear)(),c="path",d=15,e=15,f=10,l=5,m=[5],n=[],o="",p="",q=(0,j.format)(".01f"),r="middle",s=10,t="to",u="vertical",v=!1,w=(0,h.dispatch)("cellover","cellout","cellclick");return a.scale=function(c){return arguments.length?(b=c,a):b},a.cells=function(b){return arguments.length?((b.length>1||b>=2)&&(m=b),a):m},a.shapePadding=function(b){return arguments.length?(l=+b,a):l},a.labels=function(b){return arguments.length?(n=b,a):n},a.labelAlign=function(b){return arguments.length?("start"!=b&&"end"!=b&&"middle"!=b||(r=b),a):r},a.labelFormat=function(b){return arguments.length?(q=b,a):q},a.labelOffset=function(b){return arguments.length?(s=+b,a):s},a.labelDelimiter=function(b){return arguments.length?(t=b,a):t},a.orient=function(b){return arguments.length?(b=b.toLowerCase(),"horizontal"!=b&&"vertical"!=b||(u=b),a):u},a.ascending=function(b){return arguments.length?(v=!!b,a):v},a.classPrefix=function(b){return arguments.length?(o=b,a):o},a.title=function(b){return arguments.length?(p=b,a):p},a.on=function(){var b=w.on.apply(w,arguments);return b===w?a:b},a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=e;var f=a("./legend"),g=d(f),h=a("d3-dispatch"),i=a("d3-scale"),j=a("d3-format"),k=a("d3-array")},{"./legend":11,"d3-array":1,"d3-dispatch":4,"d3-format":5,"d3-scale":7}],14:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./color"),f=d(e),g=a("./size"),h=d(g),i=a("./symbol"),j=d(i);d3.legendColor=f.default,d3.legendSize=h.default,d3.legendSymbol=j.default},{"./color":10,"./size":12,"./symbol":13}]},{},[14]);