Socket
Socket
Sign inDemoInstall

d3-scale

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-scale - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

src/time.js

4

build/scale.min.js

@@ -1,1 +0,3 @@

"undefined"==typeof Map?(Map=function(){this.clear()},Map.prototype={set:function(t,n){return this._[t]=n,this},get:function(t){return this._[t]},has:function(t){return t in this._},"delete":function(t){return t in this._&&delete this._[t]},clear:function(){this._=Object.create(null)},get size(){var t=0;for(var n in this._)++t;return t},forEach:function(t){for(var n in this._)t(this._[n],n,this)}}):function(){var t=new Map;t.set(0,0)!==t&&(t=t.set,Map.prototype.set=function(){return t.apply(this,arguments),this})}(),function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.scale={})}(this,function(t){"use strict";function n(t,n){return n>t?-1:t>n?1:t>=n?0:0/0}function e(t){return function(e,r){return n(t(e),r)}}function r(t){return 1===t.length&&(t=e(t)),{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)<0?r=a+1:i=a}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)>0?i=a:r=a+1}return r}}}function i(t,n,e){function r(r){return r>=r?n[bt(t,r,0,e)]:void 0}return r.domain=function(i){return arguments.length?(t=i.slice(),e=Math.min(t.length,n.length-1),r):t.slice()},r.range=function(i){return arguments.length?(n=i.slice(),e=Math.min(t.length,n.length-1),r):n.slice()},r.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},r.copy=function(){return i(t,n)},r}function a(){return i([.5],[0,1],1)}function u(t,n){return t=+t,n-=t,function(e){return t+n*e}}function o(t,n){var e,r={},i={};for(e in t)e in n?r[e]=x(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function s(t,n){var e,r=[],i=[],a=t.length,u=n.length,o=Math.min(t.length,n.length);for(e=0;o>e;++e)r.push(x(t[e],n[e]));for(;a>e;++e)i[e]=t[e];for(;u>e;++e)i[e]=n[e];return function(t){for(e=0;o>e;++e)i[e]=r[e](t);return i}}function c(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),isNaN(e)&&(e=0),"#"+(16>t?"0"+t.toString(16):t.toString(16))+(16>n?"0"+n.toString(16):n.toString(16))+(16>e?"0"+e.toString(16):e.toString(16))}function l(t,n,e){this.r=Math.max(0,Math.min(255,Math.round(t))),this.g=Math.max(0,Math.min(255,Math.round(n))),this.b=Math.max(0,Math.min(255,Math.round(e)))}function h(){}function f(t){return b(t>>16&255,t>>8&255,255&t)}function g(t,n,e){this.h=+t,this.s=Math.max(0,Math.min(1,+n)),this.l=Math.max(0,Math.min(1,+e))}function d(t,n,e){return 255*(60>t?n+(e-n)*t/60:180>t?e:240>t?n+(e-n)*(240-t)/60:n)}function m(t,n,e){if(1===arguments.length)if(t instanceof g)e=t.l,n=t.s,t=t.h;else if(t instanceof h||(t=p(t)),t){if(t instanceof g)return t;t=t.rgb();var r=t.r/255,i=t.g/255,a=t.b/255,u=Math.min(r,i,a),o=Math.max(r,i,a),s=o-u;e=(o+u)/2,s?(n=.5>e?s/(o+u):s/(2-o-u),t=r===o?(i-a)/s+6*(a>i):i===o?(a-r)/s+2:(r-i)/s+4,t*=60):(t=0/0,n=e>0&&1>e?0:t)}else t=n=e=0/0;return new g(t,n,e)}function p(t){var n;return t=(t+"").trim().toLowerCase(),(n=At.exec(t))?(n=parseInt(n[1],16),b(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n)):(n=jt.exec(t))?f(parseInt(n[1],16)):(n=St.exec(t))?b(n[1],n[2],n[3]):(n=qt.exec(t))?b(2.55*n[1],2.55*n[2],2.55*n[3]):(n=Nt.exec(t))?m(n[1],.01*n[2],.01*n[3]):wt.has(t)?f(wt.get(t)):null}function b(t,n,e){return 1===arguments.length&&(t instanceof h||(t=p(t)),t?(t=t.rgb(),e=t.b,n=t.g,t=t.r):t=n=e=0/0),new l(t,n,e)}function M(t,n){t=b(t),n=b(n);var e=t.r,r=t.g,i=t.b,a=n.r-e,u=n.g-r,o=n.b-i;return function(t){return c(Math.round(e+a*t),Math.round(r+u*t),Math.round(i+o*t))}}function v(t){return function(){return t}}function y(t){return function(n){return t(n)+""}}function w(t,n){var e,r,i,a=Et.lastIndex=$t.lastIndex=0,o=-1,s=[],c=[];for(t+="",n+="";(e=Et.exec(t))&&(r=$t.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(e=e[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:u(e,r)})),a=$t.lastIndex;return a<n.length&&(i=n.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?y(c[0].x):v(n):(n=c.length,function(t){for(var e,r=0;n>r;++r)s[(e=c[r]).i]=e.x(t);return s.join("")})}function x(t,n){for(var e,r=Pt.length;--r>=0&&!(e=Pt[r](t,n)););return e}function k(t,n){null==n&&(n=10);var e=t[0],r=t[t.length-1];e>r&&(u=r,r=e,e=u);var i=r-e,a=Math.pow(10,Math.floor(Math.log(i/n)/Math.LN10)),u=i/n/a;return u>=zt?a*=10:u>=Rt?a*=5:u>=_t&&(a*=2),[Math.ceil(e/a)*a,Math.floor(r/a)*a+a/2,a]}function N(t,n){if(t=t.slice(),!n)return t;var e,r=0,i=t.length-1,a=t[r],u=t[i];return a>u&&(e=r,r=i,i=e,e=a,a=u,u=e),t[r]=Math.floor(a/n)*n,t[i]=Math.ceil(u/n)*n,t}function q(t,n){if((e=(t=t.toExponential(n&&n-1)).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function S(t){return t=q(Math.abs(t)),t?t[1]:0/0}function j(t,n){var e=q(t,n);if(!e)return t+"";var r=e[0],i=e[1],a=i-(kt=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return a===u?r:a>u?r+new Array(a-u+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+q(t,n+a-1)[0]}function A(t,n){var e=q(t,n);if(!e)return t+"";var r=e[0],i=e[1];return 0>i?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function E(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,a=-1;r>i;++i)switch(t[i]){case".":a=e=i;break;case"0":0===a&&(a=i),e=i;break;case"e":break t;default:a>0&&(a=0)}return a>0?t.slice(0,a)+t.slice(e+1):t}function $(t){if(!(n=Bt.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",a=n[4]||"",u=!!n[5],o=n[6]&&+n[6],s=!!n[7],c=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(s=!0,l="g"):Ot[l]||(l=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=a,this.zero=u,this.width=o,this.comma=s,this.precision=c,this.type=l}function P(t){return new $(t)}function _(t){return t}function R(t,n){return function(e,r){for(var i=e.length,a=[],u=0,o=t[0],s=0;i>0&&o>0&&(s+o+1>r&&(o=Math.max(1,r-s)),a.push(e.substring(i-=o,i+o)),!((s+=o+1)>r));)o=t[u=(u+1)%t.length];return a.reverse().join(n)}}function z(t){function n(t){t=P(t);var n=t.fill,e=t.align,u=t.sign,o=t.symbol,s=t.zero,c=t.width,l=t.comma,h=t.precision,f=t.type,g="$"===o?i[0]:"#"===o&&/[boxX]/.test(f)?"0"+f.toLowerCase():"",d="$"===o?i[1]:/[%p]/.test(f)?"%":"",m=Ot[f],p=!f||/[defgprs%]/.test(f);return h=null==h?f?6:12:/[gprs]/.test(f)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),function(t){var i=g,o=d;if("c"===f)o=m(t)+o,t="";else{t=+t;var b=(0>t||0>1/t)&&(t*=-1,!0);if(t=m(t,h),i=(b?"("===u?u:"-":"-"===u||"("===u?"":u)+i,o=o+("s"===f?Ft[8+kt/3]:"")+(b&&"("===u?")":""),p)for(var M,v=-1,y=t.length;++v<y;)if(M=t.charCodeAt(v),48>M||M>57){o=(46===M?a+t.slice(v+1):t.slice(v))+o,t=t.slice(0,v);break}}l&&!s&&(t=r(t,1/0));var w=i.length+t.length+o.length,x=c>w?new Array(c-w+1).join(n):"";switch(l&&s&&(t=r(x+t,x.length?c-o.length:1/0),x=""),e){case"<":return i+t+o+x;case"=":return i+x+t+o;case"^":return x.slice(0,w=x.length>>1)+i+t+o+x.slice(w)}return x+i+t+o}}function e(t,e){var r=n((t=P(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(S(e)/3))),a=Math.pow(10,-i),u=Ft[8+i/3];return function(t){return r(a*t)+u}}var r=t.grouping&&t.thousands?R(t.grouping,t.thousands):_,i=t.currency,a=t.decimal;return{format:n,formatPrefix:e}}function F(t){return Math.max(0,-S(Math.abs(t)))}function O(t,n){return Math.max(0,S(Math.abs(n))-S(Math.abs(t)))+1}function B(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(S(n)/3)))-S(Math.abs(t)))}function I(t,n,e){var r=k(t,n);if(null==e)e=",."+F(r[2])+"f";else switch(e=P(e),e.type){case"s":var i=Math.max(Math.abs(r[0]),Math.abs(r[1]));return null==e.precision&&(e.precision=B(r[2],i)),Lt(e,i);case"":case"e":case"g":case"p":case"r":null==e.precision&&(e.precision=O(r[2],Math.max(Math.abs(r[0]),Math.abs(r[1])))-("e"===e.type));break;case"f":case"%":null==e.precision&&(e.precision=F(r[2])-2*("%"===e.type))}return Ct(e)}function C(t){for(var n=1;t*n%1;)n*=10;return n}function L(t,n,e){(i=arguments.length)<3&&(e=1,2>i&&(n=t,t=0));var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),a=C(Math.abs(e)),u=new Array(i);for(t*=a,e*=a;++r<i;)u[r]=(t+r*e)/a;return u}function X(t,n){return L.apply(null,k(t,n))}function G(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}}function T(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function U(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function Y(t,n,e,r){var i=e(t[0],t[1]),a=r(n[0],n[1]);return function(t){return a(i(t))}}function Z(t,n,e,r){var i=Math.min(t.length,n.length)-1,a=new Array(i),u=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<i;)a[o]=e(t[o],t[o+1]),u[o]=r(n[o],n[o+1]);return function(n){var e=bt(t,n,1,i)-1;return u[e](a[e](n))}}function D(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?Z:Y,c=r?U:T;return o=i(t,n,c,e),s=i(n,t,c,u),a}function a(t){return o(t)}var o,s;return a.invert=function(t){return s(t)},a.domain=function(n){return arguments.length?(t=n.map(Number),i()):t.slice()},a.range=function(t){return arguments.length?(n=t.slice(),i()):n.slice()},a.rangeRound=function(t){return a.range(t).interpolate(G)},a.clamp=function(t){return arguments.length?(r=!!t,i()):r},a.interpolate=function(t){return arguments.length?(e=t,i()):e},a.ticks=function(n){return X(t,n)},a.tickFormat=function(n,e){return I(t,n,e)},a.nice=function(n){return t=N(t,k(t,n)[2]),i()},a.copy=function(){return D(t,n,e,r)},i()}function H(){return D([0,1],[0,1],x,!1)}function J(t,n){return t.range=function(){var e=n.range.apply(n,arguments);return e===n?t:e},t.rangeRound=function(){var e=n.rangeRound.apply(n,arguments);return e===n?t:e},t.clamp=function(){var e=n.clamp.apply(n,arguments);return e===n?t:e},t.interpolate=function(){var e=n.interpolate.apply(n,arguments);return e===n?t:e},t}function K(t,n,e){function r(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}function i(t){return 0>t?-Math.pow(-t,1/n):Math.pow(t,1/n)}function a(n){return t(r(n))}return a.invert=function(n){return i(t.invert(n))},a.exponent=function(t){return arguments.length?(n=+t,a.domain(e)):n},a.domain=function(n){return arguments.length?(e=n.map(Number),t.domain(e.map(r)),a):e.slice()},a.ticks=function(t){return X(e,t)},a.tickFormat=function(t,n){return I(e,t,n)},a.nice=function(t){return a.domain(N(e,k(e,t)[2]))},a.copy=function(){return K(t.copy(),n,e)},J(a,t)}function Q(){return K(H(),.5,[0,1])}function V(t,n,e){function r(n){return e[Math.max(0,Math.min(u,Math.floor(a*(n-t))))]}function i(){return a=e.length/(n-t),u=e.length-1,r}var a,u;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t.slice(),i()):e.slice()},r.invertExtent=function(n){return n=e.indexOf(n),n=0>n?0/0:n/a+t,[n,n+1/a]},r.copy=function(){return V(t,n,e)},i()}function W(){return V(0,1,[0,1])}function tt(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],a=e-r;return a?i+a*(t[r]-i):i}function nt(t,e){function r(){var n=0,r=e.length;for(a=[];++n<r;)a[n-1]=tt(t,n/r);return i}function i(t){return isNaN(t=+t)?void 0:e[bt(a,t)]}var a;return i.domain=function(e){if(!arguments.length)return t;t=[];for(var i,a=0,u=e.length;u>a;++a)i=e[a],null==i||isNaN(i=+i)||t.push(i);return t.sort(n),r()},i.range=function(t){return arguments.length?(e=t.slice(),r()):e.slice()},i.quantiles=function(){return a},i.invertExtent=function(n){return n=e.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:t[0],n<a.length?a[n]:t[t.length-1]]},i.copy=function(){return nt(t,e)},r()}function et(){return nt([],[])}function rt(){return K(H(),1,[0,1])}function it(t,n,e){for(var r=new Array(t),i=-1;++i<t;)r[i]=n+e*i;return r}function at(t,n){function e(e){var a=e+"",u=r.get(a);if(!u){if("range"!==n.t)return;r.set(a,u=t.push(e))}return i[(u-1)%i.length]}var r,i,a;return e.domain=function(i){if(!arguments.length)return t.slice();t=[],r=new Map;for(var a,u,o=-1,s=i.length;++o<s;)r.has(u=(a=i[o])+"")||r.set(u,t.push(a));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(i=t.slice(),a=0,n={t:"range",a:arguments},e):i.slice()},e.rangePoints=function(r,u){u=arguments.length<2?0:+u;var o=+r[0],s=+r[1],c=t.length<2?(o=(o+s)/2,0):(s-o)/(t.length-1+u);return i=it(t.length,o+c*u/2,c),a=0,n={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(r,u){u=arguments.length<2?0:+u;var o=+r[0],s=+r[1],c=t.length<2?(o=s=Math.round((o+s)/2),0):(s-o)/(t.length-1+u)|0;return i=it(t.length,o+Math.round(c*u/2+(s-o-(t.length-1+u)*c)/2),c),a=0,n={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(r,u,o){u=arguments.length<2?0:+u,o=arguments.length<3?u:+o;var s=+r[1]<+r[0],c=+r[s-0],l=+r[1-s],h=(l-c)/(t.length-u+2*o);return i=it(t.length,c+h*o,h),s&&i.reverse(),a=h*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(r,u,o){u=arguments.length<2?0:+u,o=arguments.length<3?u:+o;var s=+r[1]<+r[0],c=+r[s-0],l=+r[1-s],h=Math.floor((l-c)/(t.length-u+2*o));return i=it(t.length,c+Math.round((l-c-(t.length-u)*h)/2),h),s&&i.reverse(),a=Math.round(h*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return a},e.rangeExtent=function(){var t=n.a[0],e=t[0],r=t[t.length-1];return e>r&&(t=r,r=e,e=t),[e,r]},e.copy=function(){return at(t,n)},e.domain(t)}function ut(){return at([],{t:"range",a:[[]]})}function ot(t,n,e){function r(t){return(e[0]<0?-Math.log(t>0?0:-t):Math.log(0>t?0:t))/Math.log(n)}function i(t){return e[0]<0?-Math.pow(n,-t):Math.pow(n,t)}function a(n){return t(r(n))}return a.invert=function(n){return i(t.invert(n))},a.base=function(t){return arguments.length?(n=+t,a.domain(e)):n},a.domain=function(n){return arguments.length?(e=n.map(Number),t.domain(e.map(r)),a):e.slice()},a.nice=function(){var n=N(t.domain(),1);return t.domain(n),e=n.map(i),a},a.ticks=function(){var t=e[0],a=e[e.length-1];t>a&&(s=t,t=a,a=s);var u,o,s=Math.floor(r(t)),c=Math.ceil(r(a)),l=n%1?2:n,h=[];if(isFinite(c-s))if(t>0){for(--c,u=1;l>u;++u){if((o=i(s)*u)<t)continue;h.push(o)}for(;++s<c;)for(u=1;l>u;++u)h.push(i(s)*u);for(u=1;l>u&&!((o=i(s)*u)>a);++u)h.push(o)}else{for(++s,u=l-1;u>=1;--u){if((o=i(s)*u)<t)continue;h.push(o)}for(;++s<c;)for(u=l-1;u>=1;--u)h.push(i(s)*u);for(u=l-1;u>=1&&!((o=i(s)*u)>a);--u)h.push(o)}return h},a.tickFormat=function(t,u){if(null==u?u=10===n?Gt:Xt:"function"!=typeof u&&(u=Ct(u)),null==t)return u;var o,s=Math.min(n,a.ticks().length/t),c=e[0]>0?(o=1e-12,Math.ceil):(o=-1e-12,Math.floor);return function(t){return i(c(r(t)+o))/t>=s?u(t):""}},a.copy=function(){return ot(t.copy(),n,e)},J(a,t)}function st(){return ot(H(),10,[1,10])}function ct(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(Number),n):t.slice()},n.ticks=function(n){return X(t,n)},n.tickFormat=function(n,e){return I(t,n,e)},n.copy=function(){return ct(t)},n}function lt(){return ct([0,1])}function ht(){return ut().range(["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"])}function ft(){return ut().range(["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"])}function gt(){return ut().range(["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"])}function dt(){return ut().range(["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"])}var mt=r(n),pt=mt.right,bt=pt;h.prototype={toString:function(){return this.rgb()+""}};var Mt=l.prototype=new h,vt=.7;Mt.darker=function(t){return t=null==t?vt:Math.pow(vt,t),new l(this.r*t,this.g*t,this.b*t)};var yt=1/vt;Mt.brighter=function(t){return t=null==t?yt:Math.pow(yt,t),new l(this.r*t,this.g*t,this.b*t)},Mt.rgb=function(){return this},Mt.toString=function(){return c(this.r,this.g,this.b)};var wt=(new Map).set("aliceblue",15792383).set("antiquewhite",16444375).set("aqua",65535).set("aquamarine",8388564).set("azure",15794175).set("beige",16119260).set("bisque",16770244).set("black",0).set("blanchedalmond",16772045).set("blue",255).set("blueviolet",9055202).set("brown",10824234).set("burlywood",14596231).set("cadetblue",6266528).set("chartreuse",8388352).set("chocolate",13789470).set("coral",16744272).set("cornflowerblue",6591981).set("cornsilk",16775388).set("crimson",14423100).set("cyan",65535).set("darkblue",139).set("darkcyan",35723).set("darkgoldenrod",12092939).set("darkgray",11119017).set("darkgreen",25600).set("darkgrey",11119017).set("darkkhaki",12433259).set("darkmagenta",9109643).set("darkolivegreen",5597999).set("darkorange",16747520).set("darkorchid",10040012).set("darkred",9109504).set("darksalmon",15308410).set("darkseagreen",9419919).set("darkslateblue",4734347).set("darkslategray",3100495).set("darkslategrey",3100495).set("darkturquoise",52945).set("darkviolet",9699539).set("deeppink",16716947).set("deepskyblue",49151).set("dimgray",6908265).set("dimgrey",6908265).set("dodgerblue",2003199).set("firebrick",11674146).set("floralwhite",16775920).set("forestgreen",2263842).set("fuchsia",16711935).set("gainsboro",14474460).set("ghostwhite",16316671).set("gold",16766720).set("goldenrod",14329120).set("gray",8421504).set("green",32768).set("greenyellow",11403055).set("grey",8421504).set("honeydew",15794160).set("hotpink",16738740).set("indianred",13458524).set("indigo",4915330).set("ivory",16777200).set("khaki",15787660).set("lavender",15132410).set("lavenderblush",16773365).set("lawngreen",8190976).set("lemonchiffon",16775885).set("lightblue",11393254).set("lightcoral",15761536).set("lightcyan",14745599).set("lightgoldenrodyellow",16448210).set("lightgray",13882323).set("lightgreen",9498256).set("lightgrey",13882323).set("lightpink",16758465).set("lightsalmon",16752762).set("lightseagreen",2142890).set("lightskyblue",8900346).set("lightslategray",7833753).set("lightslategrey",7833753).set("lightsteelblue",11584734).set("lightyellow",16777184).set("lime",65280).set("limegreen",3329330).set("linen",16445670).set("magenta",16711935).set("maroon",8388608).set("mediumaquamarine",6737322).set("mediumblue",205).set("mediumorchid",12211667).set("mediumpurple",9662683).set("mediumseagreen",3978097).set("mediumslateblue",8087790).set("mediumspringgreen",64154).set("mediumturquoise",4772300).set("mediumvioletred",13047173).set("midnightblue",1644912).set("mintcream",16121850).set("mistyrose",16770273).set("moccasin",16770229).set("navajowhite",16768685).set("navy",128).set("oldlace",16643558).set("olive",8421376).set("olivedrab",7048739).set("orange",16753920).set("orangered",16729344).set("orchid",14315734).set("palegoldenrod",15657130).set("palegreen",10025880).set("paleturquoise",11529966).set("palevioletred",14381203).set("papayawhip",16773077).set("peachpuff",16767673).set("peru",13468991).set("pink",16761035).set("plum",14524637).set("powderblue",11591910).set("purple",8388736).set("rebeccapurple",6697881).set("red",16711680).set("rosybrown",12357519).set("royalblue",4286945).set("saddlebrown",9127187).set("salmon",16416882).set("sandybrown",16032864).set("seagreen",3050327).set("seashell",16774638).set("sienna",10506797).set("silver",12632256).set("skyblue",8900331).set("slateblue",6970061).set("slategray",7372944).set("slategrey",7372944).set("snow",16775930).set("springgreen",65407).set("steelblue",4620980).set("tan",13808780).set("teal",32896).set("thistle",14204888).set("tomato",16737095).set("turquoise",4251856).set("violet",15631086).set("wheat",16113331).set("white",16777215).set("whitesmoke",16119285).set("yellow",16776960).set("yellowgreen",10145074),xt=g.prototype=new h;xt.brighter=function(t){return t=null==t?yt:Math.pow(yt,t),new g(this.h,this.s,this.l*t)},xt.darker=function(t){return t=null==t?vt:Math.pow(vt,t),new g(this.h,this.s,this.l*t)},xt.rgb=function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=.5>=e?e*(1+n):e+n-e*n,i=2*e-r;return new l(d(t>=240?t-240:t+120,i,r),d(t,i,r),d(120>t?t+240:t-120,i,r))};var kt,Nt=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,qt=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,St=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,jt=/^#([0-9a-f]{6})$/,At=/^#([0-9a-f]{3})$/,Et=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$t=new RegExp(Et.source,"g"),Pt=[function(t,n){var e,r=typeof n;return("string"===r?(e=p(n))?(n=e,M):w:n instanceof p?M:Array.isArray(n)?s:"object"===r&&isNaN(n)?o:u)(t,n)}],_t=Math.sqrt(2),Rt=Math.sqrt(10),zt=Math.sqrt(50),Ft=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ot={"":E,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return A(100*t,n)},r:A,s:j,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bt=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/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 It=z({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Ct=It.format,Lt=It.formatPrefix,Xt=Ct(","),Gt=Ct(".0e");t.category10=dt,t.category20=gt,t.category20b=ft,t.category20c=ht,t.identity=lt,t.linear=H,t.log=st,t.ordinal=ut,t.pow=rt,t.quantile=et,t.quantize=W,t.sqrt=Q,t.threshold=a});
"undefined"==typeof Map?(Map=function(){this.clear()},Map.prototype={set:function(t,n){return this._[t]=n,this},get:function(t){return this._[t]},has:function(t){return t in this._},"delete":function(t){return t in this._&&delete this._[t]},clear:function(){this._=Object.create(null)},get size(){var t=0;for(var n in this._)++t;return t},forEach:function(t){for(var n in this._)t(this._[n],n,this)}}):function(){var t=new Map;t.set(0,0)!==t&&(t=t.set,Map.prototype.set=function(){return t.apply(this,arguments),this})}(),function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.scale={})}(this,function(t){"use strict";function n(){this._=new Kt(arguments.length>1?Kt.UTC.apply(this,arguments):arguments[0])}function e(t,n,e){var r=Vt.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function r(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function u(t,n,e){var r=tn.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function i(t,n,e){var r=tn.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function o(t,n,e){var r=tn.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function a(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function s(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function c(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function f(t,n,e){var r=tn.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function l(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function h(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function g(t,n,e){var r=tn.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function d(t,n,e){var r=tn.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function m(t,n,e){var r=tn.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function p(t,n,e){var r=0>t?"-":"",u=(r?-t:t)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(n)+u:u)}function M(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+p(n/60|0,"0",2)+p(n%60,"0",2)}function y(t,n,e){function r(n){return t(n=new Date(+n)),n}return r.floor=r,r.round=function(e){var r=new Date(+e),u=new Date(e-1);return t(r),t(u),n(u,1),u-e>e-r?r:u},r.ceil=function(e){return t(e=new Date(e-1)),n(e,1),e},r.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},r.range=function(e,r,u){var i=[];if(e=new Date(e-1),r=new Date(+r),u=null==u?1:Math.floor(u),!(r>e&&u>0))return i;for(n(e,1),t(e),r>e&&i.push(new Date(+e));n(e,u),t(e),r>e;)i.push(new Date(+e));return i},r.filter=function(e){return y(function(n){for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(r.count=function(n,r){return n=new Date(+n),r=new Date(+r),t(n),t(r),Math.floor(e(n,r))}),r}function v(t){return y(function(n){n.setHours(0,0,0,0),n.setDate(n.getDate()-(n.getDay()+7-t)%7)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5})}function b(t){for(var n=new Map,e=-1,r=t.length;++e<r;)n.set(t[e].toLowerCase(),e);return n}function w(t){return t.replace(on,"\\$&")}function x(t){return new RegExp("^(?:"+t.map(w).join("|")+")","i")}function T(t){function y(t){function e(n){for(var e,r,u,i=[],o=-1,a=0,s=t.length;++o<s;)37===t.charCodeAt(o)&&(i.push(t.slice(a,o)),null!=(r=Xt[e=t.charAt(++o)])&&(e=t.charAt(++o)),(u=J[e])&&(e=u(n,null==r?"e"===e?" ":"0":r)),i.push(e),a=o+1);return i.push(t.slice(a,o)),i.join("")}return t+="",e.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=w(r,t,e,0);if(u!=e.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&Date!==n,o=new(i?n:Date);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?o._:o},e.toString=function(){return t},e}function v(t){function e(t){try{Date=n;var e=new Date;return e._=t,r(e)}finally{Date=Gt}}var r=y(t);return e.parse=function(t){try{Date=n;var e=r.parse(t);return e&&e._}finally{Date=Gt}},e.toString=r.toString,e}function w(t,n,e,r){for(var u,i,o=0,a=n.length,s=e.length;a>o;){if(r>=s)return-1;if(u=n.charCodeAt(o++),37===u){if(u=n.charAt(o++),i=X[u in Xt?n.charAt(o++):u],!i||(r=i(t,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function T(t,n,e){var r=I.exec(n.slice(e));return r?(t.w=P.get(r[0].toLowerCase()),e+r[0].length):-1}function C(t,n,e){var r=E.exec(n.slice(e));return r?(t.w=$.get(r[0].toLowerCase()),e+r[0].length):-1}function D(t,n,e){var r=W.exec(n.slice(e));return r?(t.m=Z.get(r[0].toLowerCase()),e+r[0].length):-1}function U(t,n,e){var r=B.exec(n.slice(e));return r?(t.m=R.get(r[0].toLowerCase()),e+r[0].length):-1}function k(t,n,e){return w(t,Y,n,e)}function S(t,n,e){return w(t,A,n,e)}function F(t,n,e){return w(t,H,n,e)}function _(t,n,e){var r=z.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}var Y=t.dateTime,A=t.date,H=t.time,N=t.periods,j=t.days,q=t.shortDays,L=t.months,O=t.shortMonths,z=b(N),E=x(j),$=b(j),I=x(q),P=b(q),B=x(L),R=b(L),W=x(O),Z=b(O),J={a:function(t){return q[t.getDay()]},A:function(t){return j[t.getDay()]},b:function(t){return O[t.getMonth()]},B:function(t){return L[t.getMonth()]},c:y(Y),d:function(t,n){return p(t.getDate(),n,2)},e:function(t,n){return p(t.getDate(),n,2)},H:function(t,n){return p(t.getHours(),n,2)},I:function(t,n){return p(t.getHours()%12||12,n,2)},j:function(t,n){return p(1+un.count(nn(t),t),n,3)},L:function(t,n){return p(t.getMilliseconds(),n,3)},m:function(t,n){return p(t.getMonth()+1,n,2)},M:function(t,n){return p(t.getMinutes(),n,2)},p:function(t){return N[+(t.getHours()>=12)]},S:function(t,n){return p(t.getSeconds(),n,2)},U:function(t,n){return p(rn.count(nn(t),t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return p(en.count(nn(t),t),n,2)},x:y(A),X:y(H),y:function(t,n){return p(t.getFullYear()%100,n,2)},Y:function(t,n){return p(t.getFullYear()%1e4,n,4)},Z:M,"%":function(){return"%"}},X={a:T,A:C,b:D,B:U,c:k,d:c,e:c,H:l,I:l,j:f,L:d,m:s,M:h,p:_,S:g,U:i,w:u,W:o,x:S,X:F,y:a,Y:m,Z:r,"%":e};return{format:y,utcFormat:v}}function C(t){return y(function(n){n.setUTCHours(0,0,0,0),n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/6048e5})}function D(t){return(Cn(t)<t?Tn:xn(t)<t?wn:bn(t)<t?vn:yn(t)<t?Mn:pn(t)<t?mn(t)<t?gn:hn:ln(t)<t?fn:cn)(t)}function U(t){return new Date(t)}function k(t,n){return t.range=function(){var e=n.range.apply(n,arguments);return e===n?t:e},t.rangeRound=function(){var e=n.rangeRound.apply(n,arguments);return e===n?t:e},t.clamp=function(){var e=n.clamp.apply(n,arguments);return e===n?t:e},t.interpolate=function(){var e=n.interpolate.apply(n,arguments);return e===n?t:e},t}function S(t,n){null==n&&(n=10);var e=t[0],r=t[t.length-1];e>r&&(o=r,r=e,e=o);var u=r-e,i=Math.pow(10,Math.floor(Math.log(u/n)/Math.LN10)),o=u/n/i;return o>=kn?i*=10:o>=Un?i*=5:o>=Dn&&(i*=2),[Math.ceil(e/i)*i,Math.floor(r/i)*i+i/2,i]}function F(t,n){return n>t?-1:t>n?1:t>=n?0:0/0}function _(t){return function(n,e){return F(t(n),e)}}function Y(t){return 1===t.length&&(t=_(t)),{left:function(n,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=n.length);u>r;){var i=r+u>>>1;t(n[i],e)<0?r=i+1:u=i}return r},right:function(n,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=n.length);u>r;){var i=r+u>>>1;t(n[i],e)>0?u=i:r=i+1}return r}}}function A(t,n,e){var r=Math.abs(n-t)/e,u=qn(jn,r);return u===jn.length?["years",S([t/An,n/An],e)[2]]:u?jn[r/jn[u-1][2]<jn[u][2]/r?u-1:u]:["milliseconds",S([t,n],e)[2]]}function H(t,n,e,r){function u(n){return t(n)}function i(t,e,r,u){return null==t&&(t=10),"number"==typeof t?(t=A(e,r,t),u=t[1],t=t[0]):(u=null==u?1:Math.floor(u),t+=""),isFinite(u)&&u>0?n(t,u):null}return u.invert=function(n){return U(t.invert(n))},u.domain=function(n){return arguments.length?(t.domain(n),u):t.domain().map(U)},u.ticks=function(n,e){var r,u=t.domain(),o=u[0],a=u[u.length-1];return o>a&&(r=o,o=a,a=r),(n=i(n,o,a,e))?n.range(o,a+1):[]},u.tickFormat=function(t){return null==t?e:r(t)},u.nice=function(n,e){var r,o=t.domain(),a=0,s=o.length-1,c=o[a],f=o[s];return c>f&&(r=a,a=s,s=r,r=c,c=f,f=r),(n=i(n,c,f,e))&&(o[a]=+n.floor(c),o[s]=+n.ceil(f),t.domain(o)),u},u.copy=function(){return H(t.copy(),n,e,r)},k(u,t)}function N(t){for(var n=1;t*n%1;)n*=10;return n}function j(t,n,e){(u=arguments.length)<3&&(e=1,2>u&&(n=t,t=0));var r=-1,u=0|Math.max(0,Math.ceil((n-t)/e)),i=N(Math.abs(e)),o=new Array(u);for(t*=i,e*=i;++r<u;)o[r]=(t+r*e)/i;return o}function q(t){return{range:function(n,e){return j(Math.ceil(n/t)*t,e,t).map(U)},floor:function(n){return U(Math.floor(n/t)*t)},ceil:function(n){return U(Math.ceil(n/t)*t)}}}function L(t,n){switch(t){case"milliseconds":return q(n);case"seconds":return n>1?Cn.filter(function(t){return t.getUTCSeconds()%n===0}):Cn;case"minutes":return n>1?xn.filter(function(t){return t.getUTCMinutes()%n===0}):xn;case"hours":return n>1?bn.filter(function(t){return t.getUTCHours()%n===0}):bn;case"days":return n>1?yn.filter(function(t){return(t.getUTCDate()-1)%n===0}):yn;case"weeks":return n>1?mn.filter(function(t){return mn.count(0,t)%n===0}):mn;case"months":return n>1?pn.filter(function(t){return t.getUTCMonth()%n===0}):pn;case"years":return n>1?ln.filter(function(t){return t.getUTCFullYear()%n===0}):ln}}function O(t,n){return t=+t,n-=t,function(e){return t+n*e}}function z(t,n){var e,r={},u={};for(e in t)e in n?r[e]=tt(t[e],n[e]):u[e]=t[e];for(e in n)e in t||(u[e]=n[e]);return function(t){for(e in r)u[e]=r[e](t);return u}}function E(t,n){var e,r=[],u=[],i=t.length,o=n.length,a=Math.min(t.length,n.length);for(e=0;a>e;++e)r.push(tt(t[e],n[e]));for(;i>e;++e)u[e]=t[e];for(;o>e;++e)u[e]=n[e];return function(t){for(e=0;a>e;++e)u[e]=r[e](t);return u}}function $(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),isNaN(e)&&(e=0),"#"+(16>t?"0"+t.toString(16):t.toString(16))+(16>n?"0"+n.toString(16):n.toString(16))+(16>e?"0"+e.toString(16):e.toString(16))}function I(t,n,e){this.r=Math.max(0,Math.min(255,Math.round(t))),this.g=Math.max(0,Math.min(255,Math.round(n))),this.b=Math.max(0,Math.min(255,Math.round(e)))}function P(){}function B(t){return X(t>>16&255,t>>8&255,255&t)}function R(t,n,e){this.h=+t,this.s=Math.max(0,Math.min(1,+n)),this.l=Math.max(0,Math.min(1,+e))}function W(t,n,e){return 255*(60>t?n+(e-n)*t/60:180>t?e:240>t?n+(e-n)*(240-t)/60:n)}function Z(t,n,e){if(1===arguments.length)if(t instanceof R)e=t.l,n=t.s,t=t.h;else if(t instanceof P||(t=J(t)),t){if(t instanceof R)return t;t=t.rgb();var r=t.r/255,u=t.g/255,i=t.b/255,o=Math.min(r,u,i),a=Math.max(r,u,i),s=a-o;e=(a+o)/2,s?(n=.5>e?s/(a+o):s/(2-a-o),t=r===a?(u-i)/s+6*(i>u):u===a?(i-r)/s+2:(r-u)/s+4,t*=60):(t=0/0,n=e>0&&1>e?0:t)}else t=n=e=0/0;return new R(t,n,e)}function J(t){var n;return t=(t+"").trim().toLowerCase(),(n=Zn.exec(t))?(n=parseInt(n[1],16),X(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n)):(n=Wn.exec(t))?B(parseInt(n[1],16)):(n=Rn.exec(t))?X(n[1],n[2],n[3]):(n=Bn.exec(t))?X(2.55*n[1],2.55*n[2],2.55*n[3]):(n=Pn.exec(t))?Z(n[1],.01*n[2],.01*n[3]):En.has(t)?B(En.get(t)):null}function X(t,n,e){return 1===arguments.length&&(t instanceof P||(t=J(t)),t?(t=t.rgb(),e=t.b,n=t.g,t=t.r):t=n=e=0/0),new I(t,n,e)}function G(t,n){t=X(t),n=X(n);var e=t.r,r=t.g,u=t.b,i=n.r-e,o=n.g-r,a=n.b-u;return function(t){return $(Math.round(e+i*t),Math.round(r+o*t),Math.round(u+a*t))}}function K(t){return function(){return t}}function Q(t){return function(n){return t(n)+""}}function V(t,n){var e,r,u,i=Jn.lastIndex=Xn.lastIndex=0,o=-1,a=[],s=[];for(t+="",n+="";(e=Jn.exec(t))&&(r=Xn.exec(n));)(u=r.index)>i&&(u=n.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,s.push({i:o,x:O(e,r)})),i=Xn.lastIndex;return i<n.length&&(u=n.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?s[0]?Q(s[0].x):K(n):(n=s.length,function(t){for(var e,r=0;n>r;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})}function tt(t,n){for(var e,r=Gn.length;--r>=0&&!(e=Gn[r](t,n)););return e}function nt(t,n){if(t=t.slice(),!n)return t;var e,r=0,u=t.length-1,i=t[r],o=t[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),t[r]=Math.floor(i/n)*n,t[u]=Math.ceil(o/n)*n,t}function et(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function rt(t){return t=et(Math.abs(t)),t?t[1]:0/0}function ut(t,n){var e=et(t,n);if(!e)return t+"";var r=e[0],u=e[1],i=u-(In=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+et(t,n+i-1)[0]}function it(t,n){var e=et(t,n);if(!e)return t+"";var r=e[0],u=e[1];return 0>u?"0."+new Array(-u).join("0")+r:r.length>u+1?r.slice(0,u+1)+"."+r.slice(u+1):r+new Array(u-r.length+2).join("0")}function ot(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,u=1,i=-1;r>u;++u)switch(t[u]){case".":i=e=u;break;case"0":0===i&&(i=u),e=u;break;case"e":break t;default:i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function at(t){if(!(n=Vn.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",u=n[3]||"-",i=n[4]||"",o=!!n[5],a=n[6]&&+n[6],s=!!n[7],c=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(s=!0,f="g"):Qn[f]||(f=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=u,this.symbol=i,this.zero=o,this.width=a,this.comma=s,this.precision=c,this.type=f}function st(t){return new at(t)}function ct(t){return t}function ft(t,n){return function(e,r){for(var u=e.length,i=[],o=0,a=t[0],s=0;u>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),i.push(e.substring(u-=a,u+a)),!((s+=a+1)>r));)a=t[o=(o+1)%t.length];return i.reverse().join(n)}}function lt(t){function n(t){t=st(t);var n=t.fill,e=t.align,o=t.sign,a=t.symbol,s=t.zero,c=t.width,f=t.comma,l=t.precision,h=t.type,g="$"===a?u[0]:"#"===a&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",d="$"===a?u[1]:/[%p]/.test(h)?"%":"",m=Qn[h],p=!h||/[defgprs%]/.test(h);return l=null==l?h?6:12:/[gprs]/.test(h)?Math.max(1,Math.min(21,l)):Math.max(0,Math.min(20,l)),function(t){var u=g,a=d;if("c"===h)a=m(t)+a,t="";else{t=+t;var M=(0>t||0>1/t)&&(t*=-1,!0);if(t=m(t,l),u=(M?"("===o?o:"-":"-"===o||"("===o?"":o)+u,a=a+("s"===h?Kn[8+In/3]:"")+(M&&"("===o?")":""),p)for(var y,v=-1,b=t.length;++v<b;)if(y=t.charCodeAt(v),48>y||y>57){a=(46===y?i+t.slice(v+1):t.slice(v))+a,t=t.slice(0,v);break}}f&&!s&&(t=r(t,1/0));var w=u.length+t.length+a.length,x=c>w?new Array(c-w+1).join(n):"";switch(f&&s&&(t=r(x+t,x.length?c-a.length:1/0),x=""),e){case"<":return u+t+a+x;case"=":return u+x+t+a;case"^":return x.slice(0,w=x.length>>1)+u+t+a+x.slice(w)}return x+u+t+a}}function e(t,e){var r=n((t=st(t),t.type="f",t)),u=3*Math.max(-8,Math.min(8,Math.floor(rt(e)/3))),i=Math.pow(10,-u),o=Kn[8+u/3];return function(t){return r(i*t)+o}}var r=t.grouping&&t.thousands?ft(t.grouping,t.thousands):ct,u=t.currency,i=t.decimal;return{format:n,formatPrefix:e}}function ht(t){return Math.max(0,-rt(Math.abs(t)))}function gt(t,n){return Math.max(0,rt(Math.abs(n))-rt(Math.abs(t)))+1}function dt(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(rt(n)/3)))-rt(Math.abs(t)))}function mt(t,n,e){var r=S(t,n);if(null==e)e=",."+ht(r[2])+"f";else switch(e=st(e),e.type){case"s":var u=Math.max(Math.abs(r[0]),Math.abs(r[1]));return null==e.precision&&(e.precision=dt(r[2],u)),ee(e,u);case"":case"e":case"g":case"p":case"r":null==e.precision&&(e.precision=gt(r[2],Math.max(Math.abs(r[0]),Math.abs(r[1])))-("e"===e.type));break;case"f":case"%":null==e.precision&&(e.precision=ht(r[2])-2*("%"===e.type))}return ne(e)}function pt(t,n){return j.apply(null,S(t,n))}function Mt(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}}function yt(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function vt(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function bt(t,n,e,r){var u=e(t[0],t[1]),i=r(n[0],n[1]);return function(t){return i(u(t))}}function wt(t,n,e,r){var u=Math.min(t.length,n.length)-1,i=new Array(u),o=new Array(u),a=-1;for(t[u]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<u;)i[a]=e(t[a],t[a+1]),o[a]=r(n[a],n[a+1]);return function(n){var e=ie(t,n,1,u)-1;return o[e](i[e](n))}}function xt(t,n,e,r){function u(){var u=Math.min(t.length,n.length)>2?wt:bt,s=r?vt:yt;return o=u(t,n,s,e),a=u(n,t,s,O),i}function i(t){return o(t)}var o,a;return i.invert=function(t){return a(t)},i.domain=function(n){return arguments.length?(t=n.map(Number),u()):t.slice()},i.range=function(t){return arguments.length?(n=t.slice(),u()):n.slice()},i.rangeRound=function(t){return i.range(t).interpolate(Mt)},i.clamp=function(t){return arguments.length?(r=!!t,u()):r},i.interpolate=function(t){return arguments.length?(e=t,u()):e},i.ticks=function(n){return pt(t,n)},i.tickFormat=function(n,e){return mt(t,n,e)},i.nice=function(n){return t=nt(t,S(t,n)[2]),u()},i.copy=function(){return xt(t,n,e,r)},u()}function Tt(){return xt([0,1],[0,1],tt,!1)}function Ct(){return H(Tt(),L,D,sn).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function Dt(t){return(ve(t)<t?ye:Me(t)<t?pe:me(t)<t?de:un(t)<t?ge:he(t)<t?le(t)<t?fe:ce:nn(t)<t?se:ae)(t)}function Ut(t,n){switch(t){case"milliseconds":return q(n);case"seconds":return n>1?ve.filter(function(t){return t.getSeconds()%n===0}):ve;case"minutes":return n>1?Me.filter(function(t){return t.getMinutes()%n===0}):Me;case"hours":return n>1?me.filter(function(t){return t.getHours()%n===0}):me;case"days":return n>1?un.filter(function(t){return(t.getDate()-1)%n===0}):un;case"weeks":return n>1?le.filter(function(t){return le.count(0,t)%n===0}):le;case"months":return n>1?he.filter(function(t){return t.getMonth()%n===0}):he;case"years":return n>1?nn.filter(function(t){return t.getFullYear()%n===0}):nn}}function kt(){return H(Tt(),Ut,Dt,oe).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}function St(t,n,e){function r(r){return r>=r?n[ie(t,r,0,e)]:void 0}return r.domain=function(u){return arguments.length?(t=u.slice(),e=Math.min(t.length,n.length-1),r):t.slice()},r.range=function(u){return arguments.length?(n=u.slice(),e=Math.min(t.length,n.length-1),r):n.slice()},r.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},r.copy=function(){return St(t,n)},r}function Ft(){return St([.5],[0,1],1)}function _t(t,n,e){function r(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}function u(t){return 0>t?-Math.pow(-t,1/n):Math.pow(t,1/n)}function i(n){return t(r(n))}return i.invert=function(n){return u(t.invert(n))},i.exponent=function(t){return arguments.length?(n=+t,i.domain(e)):n},i.domain=function(n){return arguments.length?(e=n.map(Number),t.domain(e.map(r)),i):e.slice()},i.ticks=function(t){return pt(e,t)},i.tickFormat=function(t,n){return mt(e,t,n)},i.nice=function(t){return i.domain(nt(e,S(e,t)[2]))},i.copy=function(){return _t(t.copy(),n,e)},k(i,t)}function Yt(){return _t(Tt(),.5,[0,1])}function At(t,n,e){function r(n){return e[Math.max(0,Math.min(o,Math.floor(i*(n-t))))]}function u(){return i=e.length/(n-t),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],u()):[t,n]},r.range=function(t){return arguments.length?(e=t.slice(),u()):e.slice()},r.invertExtent=function(n){return n=e.indexOf(n),n=0>n?0/0:n/i+t,[n,n+1/i]},r.copy=function(){return At(t,n,e)},u()}function Ht(){return At(0,1,[0,1])}function Nt(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),u=+t[r-1],i=e-r;return i?u+i*(t[r]-u):u}function jt(t,n){function e(){var e=0,i=n.length;for(u=[];++e<i;)u[e-1]=Nt(t,e/i);return r}function r(t){return isNaN(t=+t)?void 0:n[ie(u,t)]}var u;return r.domain=function(n){if(!arguments.length)return t;t=[];for(var r,u=0,i=n.length;i>u;++u)r=n[u],null==r||isNaN(r=+r)||t.push(r);return t.sort(F),e()},r.range=function(t){return arguments.length?(n=t.slice(),e()):n.slice()},r.quantiles=function(){return u},r.invertExtent=function(e){return e=n.indexOf(e),0>e?[0/0,0/0]:[e>0?u[e-1]:t[0],e<u.length?u[e]:t[t.length-1]]},r.copy=function(){return jt(t,n)},e()}function qt(){return jt([],[])}function Lt(){return _t(Tt(),1,[0,1])}function Ot(t,n,e){for(var r=new Array(t),u=-1;++u<t;)r[u]=n+e*u;return r}function zt(t,n){function e(e){var i=e+"",o=r.get(i);if(!o){if("range"!==n.t)return;r.set(i,o=t.push(e))}return u[(o-1)%u.length]}var r,u,i;return e.domain=function(u){if(!arguments.length)return t.slice();t=[],r=new Map;for(var i,o,a=-1,s=u.length;++a<s;)r.has(o=(i=u[a])+"")||r.set(o,t.push(i));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(u=t.slice(),i=0,n={t:"range",a:arguments},e):u.slice()},e.rangePoints=function(r,o){o=arguments.length<2?0:+o;var a=+r[0],s=+r[1],c=t.length<2?(a=(a+s)/2,0):(s-a)/(t.length-1+o);return u=Ot(t.length,a+c*o/2,c),i=0,n={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(r,o){o=arguments.length<2?0:+o;var a=+r[0],s=+r[1],c=t.length<2?(a=s=Math.round((a+s)/2),0):(s-a)/(t.length-1+o)|0;return u=Ot(t.length,a+Math.round(c*o/2+(s-a-(t.length-1+o)*c)/2),c),i=0,n={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(r,o,a){o=arguments.length<2?0:+o,a=arguments.length<3?o:+a;var s=+r[1]<+r[0],c=+r[s-0],f=+r[1-s],l=(f-c)/(t.length-o+2*a);return u=Ot(t.length,c+l*a,l),s&&u.reverse(),i=l*(1-o),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(r,o,a){o=arguments.length<2?0:+o,a=arguments.length<3?o:+a;var s=+r[1]<+r[0],c=+r[s-0],f=+r[1-s],l=Math.floor((f-c)/(t.length-o+2*a));return u=Ot(t.length,c+Math.round((f-c-(t.length-o)*l)/2),l),s&&u.reverse(),i=Math.round(l*(1-o)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return i},e.rangeExtent=function(){var t=n.a[0],e=t[0],r=t[t.length-1];return e>r&&(t=r,r=e,e=t),[e,r]},e.copy=function(){return zt(t,n)},e.domain(t)}function Et(){return zt([],{t:"range",a:[[]]})}function $t(t,n,e){function r(t){return(e[0]<0?-Math.log(t>0?0:-t):Math.log(0>t?0:t))/Math.log(n)}function u(t){return e[0]<0?-Math.pow(n,-t):Math.pow(n,t)}function i(n){return t(r(n))}return i.invert=function(n){return u(t.invert(n))},i.base=function(t){return arguments.length?(n=+t,i.domain(e)):n},i.domain=function(n){return arguments.length?(e=n.map(Number),t.domain(e.map(r)),i):e.slice()},i.nice=function(){var n=nt(t.domain(),1);return t.domain(n),e=n.map(u),i},i.ticks=function(){var t=e[0],i=e[e.length-1];t>i&&(s=t,t=i,i=s);var o,a,s=Math.floor(r(t)),c=Math.ceil(r(i)),f=n%1?2:n,l=[];if(isFinite(c-s))if(t>0){for(--c,o=1;f>o;++o){if((a=u(s)*o)<t)continue;l.push(a)}for(;++s<c;)for(o=1;f>o;++o)l.push(u(s)*o);for(o=1;f>o&&!((a=u(s)*o)>i);++o)l.push(a)}else{for(++s,o=f-1;o>=1;--o){if((a=u(s)*o)<t)continue;l.push(a)}for(;++s<c;)for(o=f-1;o>=1;--o)l.push(u(s)*o);for(o=f-1;o>=1&&!((a=u(s)*o)>i);--o)l.push(a)}return l},i.tickFormat=function(t,o){if(null==o?o=10===n?we:be:"function"!=typeof o&&(o=ne(o)),null==t)return o;var a,s=Math.min(n,i.ticks().length/t),c=e[0]>0?(a=1e-12,Math.ceil):(a=-1e-12,Math.floor);return function(t){return u(c(r(t)+a))/t>=s?o(t):""}},i.copy=function(){return $t(t.copy(),n,e)},k(i,t)}function It(){return $t(Tt(),10,[1,10])}function Pt(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(Number),n):t.slice()},n.ticks=function(n){return pt(t,n)},n.tickFormat=function(n,e){return mt(t,n,e)},n.copy=function(){return Pt(t)},n}function Bt(){return Pt([0,1])}function Rt(){return Et().range(["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"])}function Wt(){return Et().range(["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"])}function Zt(){return Et().range(["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"])}function Jt(){return Et().range(["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"])}var Xt={"-":"",_:" ",0:"0"},Gt=Date,Kt=Date,Qt=Kt.prototype;n.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){return Qt.setUTCDate.apply(this._,arguments)},setDay:function(){return Qt.setUTCDay.apply(this._,arguments)},setFullYear:function(){return Qt.setUTCFullYear.apply(this._,arguments)},setHours:function(){return Qt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){return Qt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){return Qt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){return Qt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){return Qt.setUTCSeconds.apply(this._,arguments)},setTime:function(){return Qt.setTime.apply(this._,arguments)}};var Vt=/^%/,tn=/^\s*\d+/,nn=y(function(t){t.setHours(0,0,0,0),t.setMonth(0,1)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()}),en=v(1),rn=v(0),un=y(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),on=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,an=T({dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]}),sn=an.utcFormat,cn=sn("%Y"),fn=sn("%B"),ln=y(function(t){t.setUTCHours(0,0,0,0),t.setUTCMonth(0,1)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),hn=sn("%b %d"),gn=sn("%a %d"),dn=C(0),mn=dn,pn=y(function(t){t.setUTCHours(0,0,0,0),t.setUTCDate(1)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),Mn=sn("%I %p"),yn=y(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5}),vn=sn("%I:%M"),bn=y(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5}),wn=sn(":%S"),xn=y(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+6e4*n)},function(t,n){return(n-t)/6e4}),Tn=sn(".%L"),Cn=y(function(t){t.setUTCMilliseconds(0)},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3}),Dn=Math.sqrt(2),Un=Math.sqrt(10),kn=Math.sqrt(50),Sn=1e3,Fn=60*Sn,_n=60*Fn,Yn=24*_n,An=365*Yn,Hn=30*Yn,Nn=7*Yn,jn=[["seconds",1,Sn],["seconds",5,5*Sn],["seconds",15,15*Sn],["seconds",30,30*Sn],["minutes",1,Fn],["minutes",5,5*Fn],["minutes",15,15*Fn],["minutes",30,30*Fn],["hours",1,_n],["hours",3,3*_n],["hours",6,6*_n],["hours",12,12*_n],["days",1,Yn],["days",2,2*Yn],["weeks",1,Nn],["months",1,Hn],["months",3,3*Hn],["years",1,An]],qn=Y(function(t){return t[2]}).right;P.prototype={toString:function(){return this.rgb()+""}};var Ln=I.prototype=new P,On=.7;Ln.darker=function(t){return t=null==t?On:Math.pow(On,t),new I(this.r*t,this.g*t,this.b*t)};var zn=1/On;Ln.brighter=function(t){return t=null==t?zn:Math.pow(zn,t),new I(this.r*t,this.g*t,this.b*t)},Ln.rgb=function(){return this},Ln.toString=function(){return $(this.r,this.g,this.b)};var En=(new Map).set("aliceblue",15792383).set("antiquewhite",16444375).set("aqua",65535).set("aquamarine",8388564).set("azure",15794175).set("beige",16119260).set("bisque",16770244).set("black",0).set("blanchedalmond",16772045).set("blue",255).set("blueviolet",9055202).set("brown",10824234).set("burlywood",14596231).set("cadetblue",6266528).set("chartreuse",8388352).set("chocolate",13789470).set("coral",16744272).set("cornflowerblue",6591981).set("cornsilk",16775388).set("crimson",14423100).set("cyan",65535).set("darkblue",139).set("darkcyan",35723).set("darkgoldenrod",12092939).set("darkgray",11119017).set("darkgreen",25600).set("darkgrey",11119017).set("darkkhaki",12433259).set("darkmagenta",9109643).set("darkolivegreen",5597999).set("darkorange",16747520).set("darkorchid",10040012).set("darkred",9109504).set("darksalmon",15308410).set("darkseagreen",9419919).set("darkslateblue",4734347).set("darkslategray",3100495).set("darkslategrey",3100495).set("darkturquoise",52945).set("darkviolet",9699539).set("deeppink",16716947).set("deepskyblue",49151).set("dimgray",6908265).set("dimgrey",6908265).set("dodgerblue",2003199).set("firebrick",11674146).set("floralwhite",16775920).set("forestgreen",2263842).set("fuchsia",16711935).set("gainsboro",14474460).set("ghostwhite",16316671).set("gold",16766720).set("goldenrod",14329120).set("gray",8421504).set("green",32768).set("greenyellow",11403055).set("grey",8421504).set("honeydew",15794160).set("hotpink",16738740).set("indianred",13458524).set("indigo",4915330).set("ivory",16777200).set("khaki",15787660).set("lavender",15132410).set("lavenderblush",16773365).set("lawngreen",8190976).set("lemonchiffon",16775885).set("lightblue",11393254).set("lightcoral",15761536).set("lightcyan",14745599).set("lightgoldenrodyellow",16448210).set("lightgray",13882323).set("lightgreen",9498256).set("lightgrey",13882323).set("lightpink",16758465).set("lightsalmon",16752762).set("lightseagreen",2142890).set("lightskyblue",8900346).set("lightslategray",7833753).set("lightslategrey",7833753).set("lightsteelblue",11584734).set("lightyellow",16777184).set("lime",65280).set("limegreen",3329330).set("linen",16445670).set("magenta",16711935).set("maroon",8388608).set("mediumaquamarine",6737322).set("mediumblue",205).set("mediumorchid",12211667).set("mediumpurple",9662683).set("mediumseagreen",3978097).set("mediumslateblue",8087790).set("mediumspringgreen",64154).set("mediumturquoise",4772300).set("mediumvioletred",13047173).set("midnightblue",1644912).set("mintcream",16121850).set("mistyrose",16770273).set("moccasin",16770229).set("navajowhite",16768685).set("navy",128).set("oldlace",16643558).set("olive",8421376).set("olivedrab",7048739).set("orange",16753920).set("orangered",16729344).set("orchid",14315734).set("palegoldenrod",15657130).set("palegreen",10025880).set("paleturquoise",11529966).set("palevioletred",14381203).set("papayawhip",16773077).set("peachpuff",16767673).set("peru",13468991).set("pink",16761035).set("plum",14524637).set("powderblue",11591910).set("purple",8388736).set("rebeccapurple",6697881).set("red",16711680).set("rosybrown",12357519).set("royalblue",4286945).set("saddlebrown",9127187).set("salmon",16416882).set("sandybrown",16032864).set("seagreen",3050327).set("seashell",16774638).set("sienna",10506797).set("silver",12632256).set("skyblue",8900331).set("slateblue",6970061).set("slategray",7372944).set("slategrey",7372944).set("snow",16775930).set("springgreen",65407).set("steelblue",4620980).set("tan",13808780).set("teal",32896).set("thistle",14204888).set("tomato",16737095).set("turquoise",4251856).set("violet",15631086).set("wheat",16113331).set("white",16777215).set("whitesmoke",16119285).set("yellow",16776960).set("yellowgreen",10145074),$n=R.prototype=new P;
$n.brighter=function(t){return t=null==t?zn:Math.pow(zn,t),new R(this.h,this.s,this.l*t)},$n.darker=function(t){return t=null==t?On:Math.pow(On,t),new R(this.h,this.s,this.l*t)},$n.rgb=function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=.5>=e?e*(1+n):e+n-e*n,u=2*e-r;return new I(W(t>=240?t-240:t+120,u,r),W(t,u,r),W(120>t?t+240:t-120,u,r))};var In,Pn=/^hsl\(\s*([-+]?\d+(?:\.\d+)?)\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,Bn=/^rgb\(\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*,\s*([-+]?\d+(?:\.\d+)?)%\s*\)$/,Rn=/^rgb\(\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*,\s*([-+]?\d+)\s*\)$/,Wn=/^#([0-9a-f]{6})$/,Zn=/^#([0-9a-f]{3})$/,Jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xn=new RegExp(Jn.source,"g"),Gn=[function(t,n){var e,r=typeof n;return("string"===r?(e=J(n))?(n=e,G):V:n instanceof J?G:Array.isArray(n)?E:"object"===r&&isNaN(n)?z:O)(t,n)}],Kn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qn={"":ot,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return it(100*t,n)},r:it,s:ut,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Vn=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;at.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 te=lt({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),ne=te.format,ee=te.formatPrefix,re=Y(F),ue=re.right,ie=ue,oe=an.format,ae=oe("%Y"),se=oe("%B"),ce=oe("%b %d"),fe=oe("%a %d"),le=rn,he=y(function(t){t.setHours(0,0,0,0),t.setDate(1)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),ge=oe("%I %p"),de=oe("%I:%M"),me=y(function(t){t.setMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5}),pe=oe(":%S"),Me=y(function(t){t.setSeconds(0,0)},function(t,n){t.setTime(+t+6e4*n)},function(t,n){return(n-t)/6e4}),ye=oe(".%L"),ve=y(function(t){t.setMilliseconds(0)},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3}),be=ne(","),we=ne(".0e");t.category10=Jt,t.category20=Zt,t.category20b=Wt,t.category20c=Rt,t.identity=Bt,t.linear=Tt,t.log=It,t.ordinal=Et,t.pow=Lt,t.quantile=qt,t.quantize=Ht,t.sqrt=Yt,t.threshold=Ft,t.time=kt,t.utcTime=Ct});

@@ -13,2 +13,4 @@ import category10 from "./src/category10";

import threshold from "./src/threshold";
import time from "./src/time";
import utcTime from "./src/utcTime";

@@ -28,3 +30,5 @@ export {

sqrt,
threshold
threshold,
time,
utcTime
};
{
"name": "d3-scale",
"version": "0.0.2",
"version": "0.1.0",
"description": "",

@@ -24,3 +24,3 @@ "keywords": [

"pretest": "mkdir -p build && d3-bundler --polyfill-map --format=umd --name=scale -- index.js > build/scale.js",
"test": "faucet `find test -name '*-test.js'`",
"test": "TZ=America/Los_Angeles faucet `find test -name '*-test.js'`",
"prepublish": "npm run test && uglifyjs build/scale.js -c -m -o build/scale.min.js && rm -f build/scale.zip && zip -j build/scale.zip -- LICENSE README.md build/scale.js build/scale.min.js"

@@ -34,2 +34,4 @@ },

"d3-interpolate": "~0.1.1",
"d3-time": "~0.0.2",
"d3-time-format": "~0.0.1",
"faucet": "0.0",

@@ -36,0 +38,0 @@ "tape": "4",

@@ -9,7 +9,7 @@ export default function(domain, step) {

x1 = domain[i1],
dx;
t;
if (x1 < x0) {
dx = i0, i0 = i1, i1 = dx;
dx = x0, x0 = x1, x1 = dx;
t = i0, i0 = i1, i1 = t;
t = x0, x0 = x1, x1 = t;
}

@@ -16,0 +16,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc