From 0510d77e8f72c8c352cfec9b51497aabcb028046 Mon Sep 17 00:00:00 2001 From: Jake Zatecky Date: Sat, 13 Oct 2018 02:57:43 -0400 Subject: [PATCH] Release v1.2.1 --- CHANGELOG.md | 2 +- dist/d3-funnel.js | 7391 ++++++++++++++++++++++++++++++++++++++++- dist/d3-funnel.min.js | 4 +- package.json | 2 +- 4 files changed, 7394 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8eaa78b..e062de4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v1.2.1 (TBA) +## [v1.2.1](https://github.com/jakezatecky/d3-funnel/compare/v1.2.0...v1.2.1) (2018-10-13) ### Build Process diff --git a/dist/d3-funnel.js b/dist/d3-funnel.js index b7afa9d..52b2bf7 100644 --- a/dist/d3-funnel.js +++ b/dist/d3-funnel.js @@ -1 +1,7390 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3")):"function"==typeof define&&define.amd?define(["d3"],e):"object"==typeof exports?exports.D3Funnel=e(require("d3")):t.D3Funnel=e(t.d3)}(window,function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(t,e,n){"use strict";n.r(e);var r="http://www.w3.org/1999/xhtml",i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),i.hasOwnProperty(e)?{space:i[e],local:t}:t};var a=function(t){var e=o(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===r&&e.documentElement.namespaceURI===r?e.createElement(t):e.createElementNS(n,t)}})(e)};function u(){}var s=function(t){return null==t?u:function(){return this.querySelector(t)}};function l(){return[]}var c=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},h=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var f=document.documentElement;if(!f.matches){var p=f.webkitMatchesSelector||f.msMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector;h=function(t){return function(){return p.call(this,t)}}}}var d=h,v=function(t){return new Array(t.length)};function g(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}g.prototype={constructor:g,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var y="$";function m(t,e,n,r,i,o){for(var a,u=0,s=e.length,l=o.length;ue?1:t>=e?0:NaN}var _=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function k(t,e){return t.style.getPropertyValue(e)||_(t).getComputedStyle(t,null).getPropertyValue(e)}function x(t){return t.trim().split(/^|\s+/)}function M(t){return t.classList||new A(t)}function A(t){this._node=t,this._names=x(t.getAttribute("class")||"")}function E(t,e){for(var n=M(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function P(){this.textContent=""}function N(){this.innerHTML=""}function S(){this.nextSibling&&this.parentNode.appendChild(this)}function C(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function j(){return null}function L(){var t=this.parentNode;t&&t.removeChild(this)}function T(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function B(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var I={},D=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(I={mouseenter:"mouseover",mouseleave:"mouseout"}));function H(t,e,n){return t=z(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function z(t,e,n){return function(r){var i=D;D=r;try{t.call(this,this.__data__,e,n)}finally{D=i}}}function F(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=k&&(k=_+1);!(w=g[k])&&++k=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=w);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):k(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=x(t+"");if(arguments.length<2){for(var r=M(this.node()),i=-1,o=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=e?X:F,null==n&&(n=!1),r=0;r0;)i=a.nextValue(),t=Math.floor(i*e.length),n.push(e.splice(t,1)[0]);return n.join("")}())}t.exports={characters:function(t){return l(t),r},seed:function(t){a.seed(t),i!==t&&(s(),i=t)},lookup:function(t){return c()[t]},shuffled:c}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e){for(var n,i=0,o="";!n;)o+=t(e>>4*i&15|r()),n=e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var n,r,i=new Array(n),o=0;o=0&&e._call.call(null,t),e=e._next;--f}()}finally{f=0,function(){var t,e,n=l,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:l=e);c=t,O(r)}(),y=0}}function E(){var t=b.now(),e=t-g;e>v&&(m-=e,g=t)}function O(t){f||(p&&(p=clearTimeout(p)),t-y>24?(t<1/0&&(p=setTimeout(A,t-b.now()-m)),d&&(d=clearInterval(d))):(d||(g=b.now(),d=setInterval(E,v)),f=1,w(A)))}x.prototype=M.prototype={constructor:x,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?_():+n)+(null==e?0:+e),this._next||c===this||(c?c._next=this:l=this,c=this),this._call=t,this._time=n,O()},stop:function(){this._call&&(this._call=null,this._time=1/0,O())}};var P=function(t,e,n){var r=new x;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},N=h("start","end","interrupt"),S=[],C=0,j=1,L=2,T=3,B=4,I=5,D=6,H=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(s){var l,c,h,f;if(n.state!==j)return u();for(l in i)if((f=i[l]).name===n.name){if(f.state===T)return P(o);f.state===B?(f.state=D,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+lC)throw new Error("too late; already scheduled");return n}function F(t,e){var n=X(t,e);if(n.state>L)throw new Error("too late; already started");return n}function X(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var R=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function q(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function V(){}var Y="\\s*([+-]?\\d+)\\s*",Q="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",G="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$=/^#([0-9a-f]{3})$/,W=/^#([0-9a-f]{6})$/,U=new RegExp("^rgb\\("+[Y,Y,Y]+"\\)$"),J=new RegExp("^rgb\\("+[G,G,G]+"\\)$"),K=new RegExp("^rgba\\("+[Y,Y,Y,Q]+"\\)$"),Z=new RegExp("^rgba\\("+[G,G,G,Q]+"\\)$"),tt=new RegExp("^hsl\\("+[Q,G,G]+"\\)$"),et=new RegExp("^hsla\\("+[Q,G,G,Q]+"\\)$"),nt={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};function rt(t){var e;return t=(t+"").trim().toLowerCase(),(e=$.exec(t))?new st((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=W.exec(t))?it(parseInt(e[1],16)):(e=U.exec(t))?new st(e[1],e[2],e[3],1):(e=J.exec(t))?new st(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=K.exec(t))?ot(e[1],e[2],e[3],e[4]):(e=Z.exec(t))?ot(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tt.exec(t))?ct(e[1],e[2]/100,e[3]/100,1):(e=et.exec(t))?ct(e[1],e[2]/100,e[3]/100,e[4]):nt.hasOwnProperty(t)?it(nt[t]):"transparent"===t?new st(NaN,NaN,NaN,0):null}function it(t){return new st(t>>16&255,t>>8&255,255&t,1)}function ot(t,e,n,r){return r<=0&&(t=e=n=NaN),new st(t,e,n,r)}function at(t){return t instanceof V||(t=rt(t)),t?new st((t=t.rgb()).r,t.g,t.b,t.opacity):new st}function ut(t,e,n,r){return 1===arguments.length?at(t):new st(t,e,n,null==r?1:r)}function st(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function lt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ct(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ft(t,e,n,r)}function ht(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof ft)return new ft(t.h,t.s,t.l,t.opacity);if(t instanceof V||(t=rt(t)),!t)return new ft;if(t instanceof ft)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n0&&s<1?0:a,new ft(a,u,s,t.opacity)}(t):new ft(t,e,n,null==r?1:r)}function ft(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function pt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}R(V,rt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),R(st,ut,q(V,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new st(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new st(this.r*t,this.g*t,this.b*t,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},hex:function(){return"#"+lt(this.r)+lt(this.g)+lt(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),R(ft,ht,q(V,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ft(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new st(pt(t>=240?t-240:t+120,i,r),pt(t,i,r),pt(t<120?t+240:t-120,i,r),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 dt=Math.PI/180,vt=180/Math.PI,gt=.96422,yt=1,mt=.82521,bt=4/29,wt=6/29,_t=3*wt*wt,kt=wt*wt*wt;function xt(t){if(t instanceof At)return new At(t.l,t.a,t.b,t.opacity);if(t instanceof jt){if(isNaN(t.h))return new At(t.l,0,0,t.opacity);var e=t.h*dt;return new At(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof st||(t=at(t));var n,r,i=Nt(t.r),o=Nt(t.g),a=Nt(t.b),u=Et((.2225045*i+.7168786*o+.0606169*a)/yt);return i===o&&o===a?n=r=u:(n=Et((.4360747*i+.3850649*o+.1430804*a)/gt),r=Et((.0139322*i+.0971045*o+.7141733*a)/mt)),new At(116*u-16,500*(n-u),200*(u-r),t.opacity)}function Mt(t,e,n,r){return 1===arguments.length?xt(t):new At(t,e,n,null==r?1:r)}function At(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Et(t){return t>kt?Math.pow(t,1/3):t/_t+bt}function Ot(t){return t>wt?t*t*t:_t*(t-bt)}function Pt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){if(t instanceof jt)return new jt(t.h,t.c,t.l,t.opacity);if(t instanceof At||(t=xt(t)),0===t.a&&0===t.b)return new jt(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*vt;return new jt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ct(t,e,n,r){return 1===arguments.length?St(t):new jt(t,e,n,null==r?1:r)}function jt(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}R(At,Mt,q(V,{brighter:function(t){return new At(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new At(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new st(Pt(3.1338561*(e=gt*Ot(e))-1.6168667*(t=yt*Ot(t))-.4906146*(n=mt*Ot(n))),Pt(-.9787684*e+1.9161415*t+.033454*n),Pt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),R(jt,Ct,q(V,{brighter:function(t){return new jt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new jt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return xt(this).rgb()}}));var Lt=-.14861,Tt=1.78277,Bt=-.29227,It=-.90649,Dt=1.97294,Ht=Dt*It,zt=Dt*Tt,Ft=Tt*Bt-It*Lt;function Xt(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Rt)return new Rt(t.h,t.s,t.l,t.opacity);t instanceof st||(t=at(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Ft*r+Ht*e-zt*n)/(Ft+Ht-zt),o=r-i,a=(Dt*(n-i)-Bt*o)/It,u=Math.sqrt(a*a+o*o)/(Dt*i*(1-i)),s=u?Math.atan2(a,o)*vt-120:NaN;return new Rt(s<0?s+360:s,u,i,t.opacity)}(t):new Rt(t,e,n,null==r?1:r)}function Rt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function qt(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}R(Rt,Xt,q(V,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*dt,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new st(255*(e+n*(Lt*r+Tt*i)),255*(e+n*(Bt*r+It*i)),255*(e+n*(Dt*r)),this.opacity)}}));var Vt=function(t){return function(){return t}};function Yt(t,e){return function(n){return t+n*e}}function Qt(t,e){var n=e-t;return n?Yt(t,n>180||n<-180?n-360*Math.round(n/360):n):Vt(isNaN(t)?e:t)}function Gt(t){return 1==(t=+t)?$t:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Vt(isNaN(e)?n:e)}}function $t(t,e){var n=e-t;return n?Yt(t,n):Vt(isNaN(t)?e:t)}var Wt=function t(e){var n=Gt(e);function r(t,e){var r=n((t=ut(t)).r,(e=ut(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=$t(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ut(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),u=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=ro&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:Jt(n,r)})),o=Zt.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Jt(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Jt(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:Jt(t,n)},{i:u-2,x:Jt(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var e,n=-1,r=s.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?z:F;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=Object(r.namespace)(t),i="transform"===n?ce:ve;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===u?null:a===r&&u===i?o:o=e(r=a,i=u);this.removeAttributeNS(t.space,t.local)}}:function(t,e,n){var r,i,o;return function(){var a,u=n(this);if(null!=u)return(a=this.getAttribute(t))===u?null:a===r&&u===i?o:o=e(r=a,i=u);this.removeAttribute(t)}})(n,i,de(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}:function(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}})(n,i,e+""))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Object(r.namespace)(t);return this.tween(n,(i.local?function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}:function(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n})(i,e))},style:function(t,e,n){var i="transform"==(t+="")?le:ve;return null==e?this.styleTween(t,function(t,e){var n,i,o;return function(){var a=Object(r.style)(this,t),u=(this.style.removeProperty(t),Object(r.style)(this,t));return a===u?null:a===n&&u===i?o:o=e(n=a,i=u)}}(t,i)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof e?function(t,e,n){var i,o,a;return function(){var u=Object(r.style)(this,t),s=n(this);return null==s&&(this.style.removeProperty(t),s=Object(r.style)(this,t)),u===s?null:u===i&&s===o?a:a=e(i=u,o=s)}}(t,i,de(this,"style."+t,e)):function(t,e,n){var i,o;return function(){var a=Object(r.style)(this,t);return a===n?null:a===i?o:o=e(i=a,n)}}(t,i,e+""),n)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(de(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=X(this.node(),n).tween,o=0,a=i.length;oL&&n.state0&&(r=t.extend({},e)),Object.keys(n).forEach(function(i){t.isExtendableObject(n[i])?t.isExtendableObject(e[i])?r[i]=t.extend(e[i],n[i]):r[i]=t.extend({},n[i]):r[i]=n[i]}),r}},{key:"convertLegacyBlock",value:function(e){return{label:e[0],value:t.getRawBlockCount(e),formattedValue:Array.isArray(e[1])?e[1][1]:null,backgroundColor:e[2],labelColor:e[3]}}},{key:"getRawBlockCount",value:function(t){return Array.isArray(t)?Array.isArray(t[1])?t[1][0]:t[1]:t.value}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.makeBezierPoints(t);return e?this.makeBezierPath(n,t.ratio):this.makeBezierPath(n)}},{key:"makeBezierPoints",value:function(t){var e=t.centerX,n=t.prevLeftX,r=t.prevRightX,i=t.prevHeight,o=t.nextLeftX,a=t.nextRightX,u=t.nextHeight,s=t.curveHeight;return{p00:{x:n,y:i},p01:{x:e,y:i+s/2},p02:{x:r,y:i},p10:{x:o,y:u},p11:{x:e,y:u+s},p12:{x:a,y:u}}}},{key:"makeBezierPath",value:function(t){var e=t.p00,n=t.p01,r=t.p02,i=t.p10,o=t.p11,a=t.p12,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=this.getQuadraticBezierCurve(e,n,r,u),l=this.getQuadraticBezierCurve(i,o,a,u);return[[s.p0.x,s.p0.y,"M"],[s.p1.x,s.p1.y,"Q"],[s.p2.x,s.p2.y,""],[l.p2.x,l.p2.y,"L"],[l.p2.x,l.p2.y,"M"],[l.p1.x,l.p1.y,"Q"],[l.p0.x,l.p0.y,""],[s.p0.x,s.p0.y,"L"]]}},{key:"getQuadraticBezierCurve",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return{p0:t,p1:{x:this.getLinearInterpolation(t,e,r,"x"),y:this.getLinearInterpolation(t,e,r,"y")},p2:{x:this.getQuadraticInterpolation(t,e,n,r,"x"),y:this.getQuadraticInterpolation(t,e,n,r,"y")}}}},{key:"getLinearInterpolation",value:function(t,e,n,r){return t[r]+n*(e[r]-t[r])}},{key:"getQuadraticInterpolation",value:function(t,e,n,r,i){return Math.pow(1-r,2)*t[i]+2*(1-r)*r*e[i]+Math.pow(r,2)*n[i]}},{key:"makeStraightPaths",value:function(t){var e=t.prevLeftX,n=t.prevRightX,r=t.prevHeight,i=t.nextLeftX,o=t.nextRightX,a=t.nextHeight,u=t.ratio;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var s=n-e,l=o-i,c=s*(u||0)+e,h=l*(u||0)+i;return[[e,r,"M"],[c=Math.min(c,s),r,"L"],[h=Math.min(h,l),a,"L"],[i,a,"L"],[e,r,"L"]]}return[[e,r,"M"],[n,r,"L"],[o,a,"L"],[i,a,"L"],[e,r,"L"]]}}]),t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n>16,G:n>>8&255,B:255&n}}},{key:"expandHex",value:function(t){return t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}}]),t}();e.default=i},function(e,n){e.exports=t},function(t,e,n){"use strict";t.exports=0},function(t,e,n){"use strict";var r=n(1);t.exports=function(t){if(!t||"string"!=typeof t||t.length<6)return!1;for(var e=r.characters(),n=t.length,i=0;i0&&(e+=o(a.lookup,r)),e+=o(a.lookup,n)}},function(t,e,n){"use strict";var r=n(1);t.exports=function(t){var e=r.shuffled();return{version:15&e.indexOf(t.substr(0,1)),worker:15&e.indexOf(t.substr(1,1))}}},function(t,e,n){"use strict";var r="object"==typeof window&&(window.crypto||window.msCrypto);t.exports=function(){if(!r||!r.getRandomValues)return 48&Math.floor(256*Math.random());var t=new Uint8Array(1);return r.getRandomValues(t),48&t[0]}},function(t,e,n){"use strict";var r=1;t.exports={nextValue:function(){return(r=(9301*r+49297)%233280)/233280},seed:function(t){r=t}}},function(t,e,n){"use strict";var r=n(1),i=(n(2),n(12)),o=n(11),a=n(10),u=n(9)||0;function s(){return o(u)}t.exports=s,t.exports.generate=s,t.exports.seed=function(e){return r.seed(e),t.exports},t.exports.worker=function(e){return u=e,t.exports},t.exports.characters=function(t){return void 0!==t&&r.characters(t),r.shuffled()},t.exports.decode=i,t.exports.isValid=a},function(t,e,n){"use strict";t.exports=n(15)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};this.destroy(),this.initialize(t,e),this.drawOntoDom()}},{key:"initialize",value:function(t,e){this.validateData(t);var n=this.getSettings(e);this.id="d3-funnel-"+u.default.generate(),this.labelFormatter=this.formatter.getFormatter(n.label.format),this.tooltipFormatter=this.formatter.getFormatter(n.tooltip.format),this.colorizer.setInstanceId(this.id),this.colorizer.setLabelFill(n.label.fill),this.colorizer.setScale(n.block.fill.scale),this.settings={width:n.chart.width,height:n.chart.height,bottomWidth:n.chart.width*n.chart.bottomWidth,bottomPinch:n.chart.bottomPinch,isInverted:n.chart.inverted,isCurved:n.chart.curve.enabled,curveHeight:n.chart.curve.height,curveShade:n.chart.curve.shade,addValueOverlay:n.block.barOverlay,animation:n.chart.animate,totalCount:n.chart.totalCount,fillType:n.block.fill.type,hoverEffects:n.block.highlight,dynamicHeight:n.block.dynamicHeight,dynamicSlope:n.block.dynamicSlope,minHeight:n.block.minHeight,label:n.label,tooltip:n.tooltip,onBlockClick:n.events.click.block},this.setBlocks(t)}},{key:"validateData",value:function(t){if(!1===Array.isArray(t))throw new Error("Data must be an array.");if(0===t.length)throw new Error("Data array must contain at least one element.");if("object"!==o(t[0]))throw new Error("Data array elements must be an object.");if(Array.isArray(t[0])&&t[0].length<2||!1===Array.isArray(t[0])&&(void 0===t[0].label||void 0===t[0].value))throw new Error("Data array elements must contain a label and value.")}},{key:"getSettings",value:function(t){var e=this.getContainerDimensions(),n=this.getDefaultSettings(e),r=p.default.extend({},n);return(r=p.default.extend(r,t)).chart=i({},r.chart,this.castDimensions(r,e)),r}},{key:"getDefaultSettings",value:function(e){var n=t.defaults;return n.chart=i({},n.chart,e),n}},{key:"getContainerDimensions",value:function(){var t={width:parseFloat((0,l.select)(this.container).style("width")),height:parseFloat((0,l.select)(this.container).style("height"))};return["width","height"].forEach(function(e){0===t[e]&&delete t[e]}),t}},{key:"castDimensions",value:function(e,n){var r=e.chart,i={};return Object.keys(n).forEach(function(e){var o=r[e],a=n[e];/%$/.test(String(o))?i[e]=parseFloat(o)/100*a:i[e]=o<=0?t.defaults.chart[e]:o}),i}},{key:"setBlocks",value:function(t){var e=this.getTotalCount(t);this.blocks=this.standardizeData(t,e)}},{key:"getTotalCount",value:function(t){return null!==this.settings.totalCount?this.settings.totalCount||0:t.reduce(function(t,e){return t+p.default.getRawBlockCount(e)},0)}},{key:"standardizeData",value:function(t,e){var n=this;return t.map(function(r,i){var o=Array.isArray(r)?p.default.convertLegacyBlock(r):r,a=e>0?o.value/e||0:1/t.length;return{index:i,ratio:a,value:o.value,height:n.settings.height*a,fill:n.colorizer.getBlockFill(o.backgroundColor,i,n.settings.fillType),label:{enabled:!o.hideLabel,raw:o.label,formatted:n.formatter.format(o,n.labelFormatter),color:n.colorizer.getLabelColor(o.labelColor)},tooltip:{enabled:o.enabled,formatted:n.formatter.format(o,n.tooltipFormatter)}}})}},{key:"drawOntoDom",value:function(){this.svg=(0,l.select)(this.container).append("svg").attr("id",this.id).attr("width",this.settings.width).attr("height",this.settings.height);var t=this.makePaths(),e=r(t,2);this.blockPaths=e[0],this.overlayPaths=e[1],"gradient"===this.settings.fillType&&this.defineColorGradients(this.svg),this.settings.isCurved&&this.drawTopOval(this.svg,this.blockPaths),this.drawBlock(0)}},{key:"makePaths",value:function(){var t=this,e=(this.settings.width-this.settings.bottomWidth)/2,n=this.settings.width/2,r=[],i=[];this.dx=this.getDx(e),this.dy=this.getDy();var o=this.dx,a=this.dy,u=0,s=this.settings.width,l=0;this.settings.isInverted&&(u=e,s=this.settings.width-e);var c=0,h=0,f=0;this.settings.isCurved&&(l=this.settings.curveHeight/2);var p=this.settings.height;0!==this.settings.minHeight&&(p=this.settings.height-this.settings.minHeight*this.blocks.length);var d=this.settings.height;this.settings.bottomPinch>0&&this.blocks.forEach(function(e,n){var r=p*e.ratio;0!==t.settings.minHeight&&(r+=t.settings.minHeight),t.settings.isCurved&&(r+=t.settings.curveHeight/t.blocks.length),t.settings.isInverted?n=t.blocks.length-t.settings.bottomPinch&&(d-=r)});var g=d/e;return this.blocks.forEach(function(e,d){if(t.settings.dynamicHeight&&(a=p*e.ratio,0!==t.settings.minHeight&&(a+=t.settings.minHeight),t.settings.isCurved&&(a-=t.settings.curveHeight/t.blocks.length),c=(l+a)/g,t.settings.isInverted&&(c=(l+a-t.settings.height)/(-1*g)),0===t.settings.bottomWidth&&d===t.blocks.length-1&&(c=t.settings.width/2,t.settings.isInverted&&(c=0)),t.settings.bottomWidth===t.settings.width&&(c=u),!Number.isNaN(c)&&Number.isFinite(c)||(c=0),o=c-u,t.settings.isInverted&&(o=u-c)),t.settings.dynamicSlope&&!t.settings.isInverted){var y=(t.blocks[d+1]?t.blocks[d+1].value:e.value)/e.value;o=(1-y)*(n-u)}t.settings.bottomPinch>0&&(t.settings.isInverted?(t.settings.dynamicHeight||(o=t.dx),o=d=t.blocks.length-t.settings.bottomPinch&&(o=0)),c=u+o,h=s-o,f=l+a,t.blocks[d].height=a,t.settings.isInverted&&(c=u-o,h=s+o);var m={centerX:n,prevLeftX:u,prevRightX:s,prevHeight:l,nextLeftX:c,nextRightX:h,nextHeight:f,curveHeight:t.settings.curveHeight,ratio:e.ratio};t.settings.isCurved?(r=[].concat(v(r),[t.navigator.makeCurvedPaths(m)]),t.settings.addValueOverlay&&(i=[].concat(v(i),[t.navigator.makeCurvedPaths(m,!0)]))):(r=[].concat(v(r),[t.navigator.makeStraightPaths(m)]),t.settings.addValueOverlay&&(i=[].concat(v(i),[t.navigator.makeStraightPaths(m,!0)]))),u=c,s=h,l=f}),[r,i]}},{key:"getDx",value:function(t){return this.settings.bottomPinch>0?t/(this.blocks.length-this.settings.bottomPinch):t/this.blocks.length}},{key:"getDy",value:function(){return this.settings.isCurved?(this.settings.height-this.settings.curveHeight)/this.blocks.length:this.settings.height/this.blocks.length}},{key:"defineColorGradients",value:function(t){var e=this,n=t.append("defs");this.blocks.forEach(function(t,r){var i=t.fill.raw,o=e.colorizer.shade(i,-.2),a=n.append("linearGradient").attr("id",e.colorizer.getGradientId(r));[[0,o],[40,i],[60,i],[100,o]].forEach(function(t){a.append("stop").attrs({offset:t[0]+"%",style:"stop-color: "+t[1]})})})}},{key:"drawTopOval",value:function(t,e){var n=this.settings.width/2,r=e[0],i=r[1][1]+this.settings.curveHeight/2,o=this.navigator.plot([["M",r[0][0],r[0][1]],["Q",n,i],[" ",r[2][0],r[2][1]],["M",r[2][0],this.settings.curveHeight/2],["Q",n,0],[" ",r[0][0],this.settings.curveHeight/2]]);t.append("path").attr("fill",this.colorizer.shade(this.blocks[0].fill.raw,this.settings.curveShade)).attr("d",o)}},{key:"drawBlock",value:function(t){var e=this;if(t!==this.blocks.length){var n=this.svg.append("g"),r=this.blocks[t],i=this.getBlockPath(n,t);this.attachData(i,r);var o=null,a=r.fill.actual;this.settings.addValueOverlay&&(o=this.getOverlayPath(n,t),this.attachData(o,r),i.node().setAttribute("pathType","background"),o.node().setAttribute("pathType","foreground"),a=this.colorizer.shade(r.fill.raw,.3)),0!==this.settings.animation?i.transition().duration(this.settings.animation).ease(s.easeLinear).attr("fill",a).attr("d",this.getPathDefinition(t)).on("end",function(){e.drawBlock(t+1)}):(i.attr("fill",a).attr("d",this.getPathDefinition(t)),this.drawBlock(t+1)),this.settings.addValueOverlay&&(i.attr("stroke",this.blocks[t].fill.raw),0!==this.settings.animation?o.transition().duration(this.settings.animation).ease(s.easeLinear).attr("fill",r.fill.actual).attr("d",this.getOverlayPathDefinition(t)):o.attr("fill",r.fill.actual).attr("d",this.getOverlayPathDefinition(t))),this.settings.hoverEffects&&[i,o].forEach(function(t){t&&t.on("mouseover",e.onMouseOver).on("mouseout",e.onMouseOut)}),null!==this.settings.onBlockClick&&[i,o].forEach(function(t){t&&t.style("cursor","pointer").on("click",e.settings.onBlockClick)}),this.settings.tooltip.enabled&&[i,o].forEach(function(t){t&&(t.node().addEventListener("mouseout",function(){e.tooltip&&(e.container.removeChild(e.tooltip),e.tooltip=null)}),t.node().addEventListener("mousemove",function(t){e.tooltip||(e.tooltip=document.createElement("div"),e.tooltip.setAttribute("class","d3-funnel-tooltip"),e.container.appendChild(e.tooltip)),e.tooltip.innerText=r.tooltip.formatted;var n=e.tooltip.offsetWidth,i=e.tooltip.offsetHeight+5,o=e.container.getBoundingClientRect().y+window.scrollY,a=t.layerY-i0?this.blocks[e-1].fill.actual:this.blocks[e].fill.actual,t.attr("d",i).attr("fill",o)}},{key:"attachData",value:function(t,e){var n=i({},e,{node:t.node()});t.data([n])}},{key:"getPathDefinition",value:function(t){var e=[];return this.blockPaths[t].forEach(function(t){e.push([t[2],t[0],t[1]])}),this.navigator.plot(e)}},{key:"getOverlayPathDefinition",value:function(t){var e=[];return this.overlayPaths[t].forEach(function(t){e.push([t[2],t[0],t[1]])}),this.navigator.plot(e)}},{key:"onMouseOver",value:function(t,e,n){var r=this,i=n[0].parentElement.childNodes;[].slice.call(i).forEach(function(e){"path"===e.nodeName.toLowerCase()&&("foreground"===(e.getAttribute("pathType")||"")?(0,l.select)(e).attr("fill",r.colorizer.shade(t.fill.raw,-.5)):(0,l.select)(e).attr("fill",r.colorizer.shade(t.fill.raw,-.2)))})}},{key:"onMouseOut",value:function(t,e,n){var r=this,i=n[0].parentElement.childNodes;[].slice.call(i).forEach(function(e){if("path"===e.nodeName.toLowerCase())if("background"===(e.getAttribute("pathType")||"")){var n=r.colorizer.shade(t.fill.raw,.3);(0,l.select)(e).attr("fill",n)}else(0,l.select)(e).attr("fill",t.fill.actual)})}},{key:"addBlockLabel",value:function(t,e){var n=this.blockPaths[e],r=this.blocks[e].label.formatted,i=this.blocks[e].label.color,o=this.settings.width/2,a=this.getTextY(n),u=t.append("text").attrs({x:o,y:a,fill:i,"font-size":this.settings.label.fontSize,"text-anchor":"middle","dominant-baseline":"middle","pointer-events":"none"});null!==this.settings.label.fontFamily&&u.attr("font-family",this.settings.label.fontFamily),this.addLabelLines(u,r,o)}},{key:"addLabelLines",value:function(t,e,n){var r=e.split("\n"),i=-20*(r.length-1)/2;r.forEach(function(e,r){var o=0===r?i:20;t.append("tspan").attrs({x:n,dy:o}).text(e)})}},{key:"getTextY",value:function(t){var e=this.settings,n=e.isCurved,r=e.curveHeight;return n?(t[2][1]+t[3][1])/2+1.5*r/this.blocks.length:(t[1][1]+t[2][1])/2}}]),t}();g.defaults={chart:{width:350,height:400,bottomWidth:1/3,bottomPinch:0,inverted:!1,horizontal:!1,animate:0,curve:{enabled:!1,height:20,shade:-.4},totalCount:null},block:{dynamicHeight:!1,dynamicSlope:!1,barOverlay:!1,fill:{scale:(0,s.scaleOrdinal)(s.schemeCategory10).domain((0,s.range)(0,10)),type:"solid"},minHeight:0,highlight:!1},label:{enabled:!0,fontFamily:null,fontSize:"14px",fill:"#fff",format:"{l}: {f}"},tooltip:{enabled:!1,format:"{l}: {f}"},events:{click:{block:null}}},e.default=g},function(t,e,n){"use strict";t.exports=n(17).default}])}); \ No newline at end of file +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("d3")); + else if(typeof define === 'function' && define.amd) + define(["d3"], factory); + else if(typeof exports === 'object') + exports["D3Funnel"] = factory(require("d3")); + else + root["D3Funnel"] = factory(root["d3"]); +})(window, function(__WEBPACK_EXTERNAL_MODULE__12__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +// Export default to provide support for non-ES6 solutions +module.exports = __webpack_require__(1).default; + +/***/ }), +/* 1 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var shortid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); +/* harmony import */ var shortid__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(shortid__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13); +/* harmony import */ var d3_selection_multi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(63); +/* harmony import */ var _Colorizer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(143); +/* harmony import */ var _Formatter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(144); +/* harmony import */ var _Navigator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(145); +/* harmony import */ var _Utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(146); +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } + +function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } + +function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } + +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + + + + + + + + + + +var D3Funnel = +/*#__PURE__*/ +function () { + /** + * @param {string|HTMLElement} selector A selector for the container element. + * + * @return {void} + */ + function D3Funnel(selector) { + _classCallCheck(this, D3Funnel); + + this.container = Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(selector).node(); + this.colorizer = new _Colorizer__WEBPACK_IMPORTED_MODULE_4__["default"](); + this.formatter = new _Formatter__WEBPACK_IMPORTED_MODULE_5__["default"](); + this.navigator = new _Navigator__WEBPACK_IMPORTED_MODULE_6__["default"](); + this.id = null; // Bind event handlers + + this.onMouseOver = this.onMouseOver.bind(this); + this.onMouseOut = this.onMouseOut.bind(this); + } + /** + * Remove the funnel and its events from the DOM. + * + * @return {void} + */ + + + _createClass(D3Funnel, [{ + key: "destroy", + value: function destroy() { + var container = Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(this.container); // D3's remove method appears to be sufficient for removing the events + + container.selectAll('svg').remove(); // Remove other elements from container + + container.selectAll('*').remove(); // Remove inner text from container + + container.text(''); + } + /** + * Draw the chart inside the container with the data and configuration + * specified. This will remove any previous SVG elements in the container + * and draw a new funnel chart on top of it. + * + * @param {Array} data A list of rows containing a category, a count, + * and optionally a color (in hex). + * @param {Object} options An optional configuration object to override + * defaults. See the docs. + * + * @return {void} + */ + + }, { + key: "draw", + value: function draw(data) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + this.destroy(); + this.initialize(data, options); + this.drawOntoDom(); + } + /** + * Initialize and calculate important variables for drawing the chart. + * + * @param {Array} data + * @param {Object} options + * + * @return {void} + */ + + }, { + key: "initialize", + value: function initialize(data, options) { + this.validateData(data); + var settings = this.getSettings(options); + this.id = "d3-funnel-".concat(shortid__WEBPACK_IMPORTED_MODULE_0___default.a.generate()); // Set labels + + this.labelFormatter = this.formatter.getFormatter(settings.label.format); + this.tooltipFormatter = this.formatter.getFormatter(settings.tooltip.format); // Set color scales + + this.colorizer.setInstanceId(this.id); + this.colorizer.setLabelFill(settings.label.fill); + this.colorizer.setScale(settings.block.fill.scale); // Initialize funnel chart settings + + this.settings = { + width: settings.chart.width, + height: settings.chart.height, + bottomWidth: settings.chart.width * settings.chart.bottomWidth, + bottomPinch: settings.chart.bottomPinch, + isInverted: settings.chart.inverted, + isCurved: settings.chart.curve.enabled, + curveHeight: settings.chart.curve.height, + curveShade: settings.chart.curve.shade, + addValueOverlay: settings.block.barOverlay, + animation: settings.chart.animate, + totalCount: settings.chart.totalCount, + fillType: settings.block.fill.type, + hoverEffects: settings.block.highlight, + dynamicHeight: settings.block.dynamicHeight, + dynamicSlope: settings.block.dynamicSlope, + minHeight: settings.block.minHeight, + label: settings.label, + tooltip: settings.tooltip, + onBlockClick: settings.events.click.block + }; + this.setBlocks(data); + } + /** + * @param {Array} data + * + * @return void + */ + + }, { + key: "validateData", + value: function validateData(data) { + if (Array.isArray(data) === false) { + throw new Error('Data must be an array.'); + } + + if (data.length === 0) { + throw new Error('Data array must contain at least one element.'); + } + + if (_typeof(data[0]) !== 'object') { + throw new Error('Data array elements must be an object.'); + } + + if (Array.isArray(data[0]) && data[0].length < 2 || Array.isArray(data[0]) === false && (data[0].label === undefined || data[0].value === undefined)) { + throw new Error('Data array elements must contain a label and value.'); + } + } + /** + * @param {Object} options + * + * @return {Object} + */ + + }, { + key: "getSettings", + value: function getSettings(options) { + var containerDimensions = this.getContainerDimensions(); + var defaults = this.getDefaultSettings(containerDimensions); // Prepare the configuration settings based on the defaults + + var settings = _Utils__WEBPACK_IMPORTED_MODULE_7__["default"].extend({}, defaults); // Override default settings with user options + + settings = _Utils__WEBPACK_IMPORTED_MODULE_7__["default"].extend(settings, options); // Account for any percentage-based dimensions + + settings.chart = _objectSpread({}, settings.chart, this.castDimensions(settings, containerDimensions)); + return settings; + } + /** + * Return default settings. + * + * @param {Object} containerDimensions + * + * @return {Object} + */ + + }, { + key: "getDefaultSettings", + value: function getDefaultSettings(containerDimensions) { + var settings = D3Funnel.defaults; // Set the default width and height based on the container + + settings.chart = _objectSpread({}, settings.chart, containerDimensions); + return settings; + } + /** + * Get the width/height dimensions of the container. + * + * @return {{width: Number, height: Number}} + */ + + }, { + key: "getContainerDimensions", + value: function getContainerDimensions() { + var dimensions = { + width: parseFloat(Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(this.container).style('width')), + height: parseFloat(Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(this.container).style('height')) + }; // Remove container dimensions that resolve to zero + + ['width', 'height'].forEach(function (direction) { + if (dimensions[direction] === 0) { + delete dimensions[direction]; + } + }); + return dimensions; + } + /** + * Cast dimensions into tangible or meaningful numbers. + * + * @param {Object} chart + * @param {Object} containerDimensions + * + * @return {{width: Number, height: Number}} + */ + + }, { + key: "castDimensions", + value: function castDimensions(_ref, containerDimensions) { + var chart = _ref.chart; + var dimensions = {}; + Object.keys(containerDimensions).forEach(function (direction) { + var chartDimension = chart[direction]; + var containerDimension = containerDimensions[direction]; + + if (/%$/.test(String(chartDimension))) { + // Convert string into a percentage of the container + dimensions[direction] = parseFloat(chartDimension) / 100 * containerDimension; + } else if (chartDimension <= 0) { + // If case of non-positive number, set to a usable number + dimensions[direction] = D3Funnel.defaults.chart[direction]; + } else { + dimensions[direction] = chartDimension; + } + }); + return dimensions; + } + /** + * Register the raw data into a standard block format and pre-calculate + * some values. + * + * @param {Array} data + * + * @return void + */ + + }, { + key: "setBlocks", + value: function setBlocks(data) { + var totalCount = this.getTotalCount(data); + this.blocks = this.standardizeData(data, totalCount); + } + /** + * Return the total count of all blocks. + * + * @param {Array} data + * + * @return {Number} + */ + + }, { + key: "getTotalCount", + value: function getTotalCount(data) { + if (this.settings.totalCount !== null) { + return this.settings.totalCount || 0; + } + + return data.reduce(function (a, b) { + return a + _Utils__WEBPACK_IMPORTED_MODULE_7__["default"].getRawBlockCount(b); + }, 0); + } + /** + * Convert the raw data into a standardized format. + * + * @param {Array} data + * @param {Number} totalCount + * + * @return {Array} + */ + + }, { + key: "standardizeData", + value: function standardizeData(data, totalCount) { + var _this = this; + + return data.map(function (rawBlock, index) { + var block = Array.isArray(rawBlock) ? _Utils__WEBPACK_IMPORTED_MODULE_7__["default"].convertLegacyBlock(rawBlock) : rawBlock; + var ratio = totalCount > 0 ? block.value / totalCount || 0 : 1 / data.length; + return { + index: index, + ratio: ratio, + value: block.value, + height: _this.settings.height * ratio, + fill: _this.colorizer.getBlockFill(block.backgroundColor, index, _this.settings.fillType), + label: { + enabled: !block.hideLabel, + raw: block.label, + formatted: _this.formatter.format(block, _this.labelFormatter), + color: _this.colorizer.getLabelColor(block.labelColor) + }, + tooltip: { + enabled: block.enabled, + formatted: _this.formatter.format(block, _this.tooltipFormatter) + } + }; + }); + } + /** + * Draw the chart onto the DOM. + * + * @return {void} + */ + + }, { + key: "drawOntoDom", + value: function drawOntoDom() { + // Add the SVG + this.svg = Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(this.container).append('svg').attr('id', this.id).attr('width', this.settings.width).attr('height', this.settings.height); + + var _this$makePaths = this.makePaths(); + + var _this$makePaths2 = _slicedToArray(_this$makePaths, 2); + + this.blockPaths = _this$makePaths2[0]; + this.overlayPaths = _this$makePaths2[1]; + + // Define color gradients + if (this.settings.fillType === 'gradient') { + this.defineColorGradients(this.svg); + } // Add top oval if curved + + + if (this.settings.isCurved) { + this.drawTopOval(this.svg, this.blockPaths); + } // Add each block + + + this.drawBlock(0); + } + /** + * Create the paths to be used to define the discrete funnel blocks and + * returns the results in an array. + * + * @return {Array, Array} + */ + + }, { + key: "makePaths", + value: function makePaths() { + var _this2 = this; + + // Calculate the important fixed positions + var bottomLeftX = (this.settings.width - this.settings.bottomWidth) / 2; + var centerX = this.settings.width / 2; + var paths = []; + var overlayPaths = []; // Calculate change in x, y direction + + this.dx = this.getDx(bottomLeftX); + this.dy = this.getDy(); // Initialize velocity + + var dx = this.dx, + dy = this.dy; // Initialize starting positions + + var prevLeftX = 0; + var prevRightX = this.settings.width; + var prevHeight = 0; // Start from the bottom for inverted + + if (this.settings.isInverted) { + prevLeftX = bottomLeftX; + prevRightX = this.settings.width - bottomLeftX; + } // Initialize next positions + + + var nextLeftX = 0; + var nextRightX = 0; + var nextHeight = 0; // Move down if there is an initial curve + + if (this.settings.isCurved) { + prevHeight = this.settings.curveHeight / 2; + } + + var totalHeight = this.settings.height; // This is greedy in that the block will have a guaranteed height + // and the remaining is shared among the ratio, instead of being + // shared according to the remaining minus the guaranteed + + if (this.settings.minHeight !== 0) { + totalHeight = this.settings.height - this.settings.minHeight * this.blocks.length; + } + + var slopeHeight = this.settings.height; // Correct slope height if there are blocks being pinched (and thus + // requiring a sharper curve) + + if (this.settings.bottomPinch > 0) { + this.blocks.forEach(function (block, i) { + var height = totalHeight * block.ratio; // Add greedy minimum height + + if (_this2.settings.minHeight !== 0) { + height += _this2.settings.minHeight; + } // Account for any curvature + + + if (_this2.settings.isCurved) { + height += _this2.settings.curveHeight / _this2.blocks.length; + } + + if (_this2.settings.isInverted) { + if (i < _this2.settings.bottomPinch) { + slopeHeight -= height; + } + } else if (i >= _this2.blocks.length - _this2.settings.bottomPinch) { + slopeHeight -= height; + } + }); + } // The slope will determine the x points on each block iteration + // Given: slope = (y1 - y2) / (x1 - x2) + // (x1, y1) = (bottomLeftX, height) + // (x2, y2) = (0, 0) + + + var slope = slopeHeight / bottomLeftX; // Create the path definition for each funnel block + // Remember to loop back to the beginning point for a closed path + + this.blocks.forEach(function (block, i) { + // Make heights proportional to block weight + if (_this2.settings.dynamicHeight) { + // Slice off the height proportional to this block + dy = totalHeight * block.ratio; // Add greedy minimum height + + if (_this2.settings.minHeight !== 0) { + dy += _this2.settings.minHeight; + } // Account for any curvature + + + if (_this2.settings.isCurved) { + dy -= _this2.settings.curveHeight / _this2.blocks.length; + } // Given: y = mx + b + // Given: b = 0 (when funnel), b = this.settings.height (when pyramid) + // For funnel, x_i = y_i / slope + + + nextLeftX = (prevHeight + dy) / slope; // For pyramid, x_i = y_i - this.settings.height / -slope + + if (_this2.settings.isInverted) { + nextLeftX = (prevHeight + dy - _this2.settings.height) / (-1 * slope); + } // If bottomWidth is 0, adjust last x position (to circumvent + // errors associated with rounding) + + + if (_this2.settings.bottomWidth === 0 && i === _this2.blocks.length - 1) { + // For funnel, last position is the center + nextLeftX = _this2.settings.width / 2; // For pyramid, last position is the origin + + if (_this2.settings.isInverted) { + nextLeftX = 0; + } + } // If bottomWidth is same as width, stop x velocity + + + if (_this2.settings.bottomWidth === _this2.settings.width) { + nextLeftX = prevLeftX; + } // Prevent NaN or Infinite values (caused by zero heights) + + + if (Number.isNaN(nextLeftX) || !Number.isFinite(nextLeftX)) { + nextLeftX = 0; + } // Calculate the shift necessary for both x points + + + dx = nextLeftX - prevLeftX; + + if (_this2.settings.isInverted) { + dx = prevLeftX - nextLeftX; + } + } // Make slope width proportional to change in block value + + + if (_this2.settings.dynamicSlope && !_this2.settings.isInverted) { + var nextBlockValue = _this2.blocks[i + 1] ? _this2.blocks[i + 1].value : block.value; + var widthRatio = nextBlockValue / block.value; + dx = (1 - widthRatio) * (centerX - prevLeftX); + } // Stop velocity for pinched blocks + + + if (_this2.settings.bottomPinch > 0) { + // Check if we've reached the bottom of the pinch + // If so, stop changing on x + if (!_this2.settings.isInverted) { + if (i >= _this2.blocks.length - _this2.settings.bottomPinch) { + dx = 0; + } // Pinch at the first blocks relating to the bottom pinch + // Revert back to normal velocity after pinch + + } else { + // Revert velocity back to the initial if we are using + // static heights (prevents zero velocity if isInverted + // and bottomPinch are non trivial and dynamicHeight is + // false) + if (!_this2.settings.dynamicHeight) { + dx = _this2.dx; + } + + dx = i < _this2.settings.bottomPinch ? 0 : dx; + } + } // Calculate the position of next block + + + nextLeftX = prevLeftX + dx; + nextRightX = prevRightX - dx; + nextHeight = prevHeight + dy; + _this2.blocks[i].height = dy; // Expand outward if inverted + + if (_this2.settings.isInverted) { + nextLeftX = prevLeftX - dx; + nextRightX = prevRightX + dx; + } + + var dimensions = { + centerX: centerX, + prevLeftX: prevLeftX, + prevRightX: prevRightX, + prevHeight: prevHeight, + nextLeftX: nextLeftX, + nextRightX: nextRightX, + nextHeight: nextHeight, + curveHeight: _this2.settings.curveHeight, + ratio: block.ratio + }; + + if (_this2.settings.isCurved) { + paths = _toConsumableArray(paths).concat([_this2.navigator.makeCurvedPaths(dimensions)]); + + if (_this2.settings.addValueOverlay) { + overlayPaths = _toConsumableArray(overlayPaths).concat([_this2.navigator.makeCurvedPaths(dimensions, true)]); + } + } else { + paths = _toConsumableArray(paths).concat([_this2.navigator.makeStraightPaths(dimensions)]); + + if (_this2.settings.addValueOverlay) { + overlayPaths = _toConsumableArray(overlayPaths).concat([_this2.navigator.makeStraightPaths(dimensions, true)]); + } + } // Set the next block's previous position + + + prevLeftX = nextLeftX; + prevRightX = nextRightX; + prevHeight = nextHeight; + }); + return [paths, overlayPaths]; + } + /** + * @param {Number} bottomLeftX + * + * @return {Number} + */ + + }, { + key: "getDx", + value: function getDx(bottomLeftX) { + // Will be sharper if there is a pinch + if (this.settings.bottomPinch > 0) { + return bottomLeftX / (this.blocks.length - this.settings.bottomPinch); + } + + return bottomLeftX / this.blocks.length; + } + /** + * @return {Number} + */ + + }, { + key: "getDy", + value: function getDy() { + // Curved chart needs reserved pixels to account for curvature + if (this.settings.isCurved) { + return (this.settings.height - this.settings.curveHeight) / this.blocks.length; + } + + return this.settings.height / this.blocks.length; + } + /** + * Define the linear color gradients. + * + * @param {Object} svg + * + * @return {void} + */ + + }, { + key: "defineColorGradients", + value: function defineColorGradients(svg) { + var _this3 = this; + + var defs = svg.append('defs'); // Create a gradient for each block + + this.blocks.forEach(function (block, index) { + var color = block.fill.raw; + + var shade = _this3.colorizer.shade(color, -0.2); // Create linear gradient + + + var gradient = defs.append('linearGradient').attr('id', _this3.colorizer.getGradientId(index)); // Define the gradient stops + + var stops = [[0, shade], [40, color], [60, color], [100, shade]]; // Add the gradient stops + + stops.forEach(function (stop) { + gradient.append('stop').attrs({ + offset: "".concat(stop[0], "%"), + style: "stop-color: ".concat(stop[1]) + }); + }); + }); + } + /** + * Draw the top oval of a curved funnel. + * + * @param {Object} svg + * @param {Array} blockPaths + * + * @return {void} + */ + + }, { + key: "drawTopOval", + value: function drawTopOval(svg, blockPaths) { + var centerX = this.settings.width / 2; // Create path from top-most block + + var paths = blockPaths[0]; + var topCurve = paths[1][1] + this.settings.curveHeight / 2; + var path = this.navigator.plot([['M', paths[0][0], paths[0][1]], ['Q', centerX, topCurve], [' ', paths[2][0], paths[2][1]], ['M', paths[2][0], this.settings.curveHeight / 2], ['Q', centerX, 0], [' ', paths[0][0], this.settings.curveHeight / 2]]); // Draw top oval + + svg.append('path').attr('fill', this.colorizer.shade(this.blocks[0].fill.raw, this.settings.curveShade)).attr('d', path); + } + /** + * Draw the next block in the iteration. + * + * @param {int} index + * + * @return {void} + */ + + }, { + key: "drawBlock", + value: function drawBlock(index) { + var _this4 = this; + + if (index === this.blocks.length) { + return; + } // Create a group just for this block + + + var group = this.svg.append('g'); + var block = this.blocks[index]; // Fetch path element + + var path = this.getBlockPath(group, index); // Attach data to the element + + this.attachData(path, block); + var overlayPath = null; + var pathColor = block.fill.actual; + + if (this.settings.addValueOverlay) { + overlayPath = this.getOverlayPath(group, index); + this.attachData(overlayPath, block); // Add data attribute to distinguish between paths + + path.node().setAttribute('pathType', 'background'); + overlayPath.node().setAttribute('pathType', 'foreground'); // Default path becomes background of lighter shade + + pathColor = this.colorizer.shade(block.fill.raw, 0.3); + } // Add animation components + + + if (this.settings.animation !== 0) { + path.transition().duration(this.settings.animation).ease(d3__WEBPACK_IMPORTED_MODULE_1__["easeLinear"]).attr('fill', pathColor).attr('d', this.getPathDefinition(index)).on('end', function () { + _this4.drawBlock(index + 1); + }); + } else { + path.attr('fill', pathColor).attr('d', this.getPathDefinition(index)); + this.drawBlock(index + 1); + } // Add path overlay + + + if (this.settings.addValueOverlay) { + path.attr('stroke', this.blocks[index].fill.raw); + + if (this.settings.animation !== 0) { + overlayPath.transition().duration(this.settings.animation).ease(d3__WEBPACK_IMPORTED_MODULE_1__["easeLinear"]).attr('fill', block.fill.actual).attr('d', this.getOverlayPathDefinition(index)); + } else { + overlayPath.attr('fill', block.fill.actual).attr('d', this.getOverlayPathDefinition(index)); + } + } // Add the hover events + + + if (this.settings.hoverEffects) { + [path, overlayPath].forEach(function (target) { + if (!target) { + return; + } + + target.on('mouseover', _this4.onMouseOver).on('mouseout', _this4.onMouseOut); + }); + } // Add block click event + + + if (this.settings.onBlockClick !== null) { + [path, overlayPath].forEach(function (target) { + if (!target) { + return; + } + + target.style('cursor', 'pointer').on('click', _this4.settings.onBlockClick); + }); + } // Add tooltips + + + if (this.settings.tooltip.enabled) { + [path, overlayPath].forEach(function (target) { + if (!target) { + return; + } + + target.node().addEventListener('mouseout', function () { + if (_this4.tooltip) { + _this4.container.removeChild(_this4.tooltip); + + _this4.tooltip = null; + } + }); + target.node().addEventListener('mousemove', function (e) { + if (!_this4.tooltip) { + _this4.tooltip = document.createElement('div'); + + _this4.tooltip.setAttribute('class', 'd3-funnel-tooltip'); + + _this4.container.appendChild(_this4.tooltip); + } + + _this4.tooltip.innerText = block.tooltip.formatted; + var width = _this4.tooltip.offsetWidth; + var height = _this4.tooltip.offsetHeight; + + var rect = _this4.container.getBoundingClientRect(); + + var heightOffset = height + 5; + var containerY = rect.y + window.scrollY; + var isAbove = e.layerY - heightOffset < containerY; + var top = isAbove ? e.layerY + 5 : e.layerY - heightOffset; + var styles = ['display: inline-block', 'position: absolute', "left: ".concat(e.layerX - width / 2, "px"), "top: ".concat(top, "px"), "border: 1px solid ".concat(block.fill.raw), 'background: rgb(255,255,255,0.75)', 'padding: 5px 15px', 'color: #000', 'font-size: 14px', 'font-weight: bold', 'text-align: center', 'cursor: default', 'pointer-events: none']; + + _this4.tooltip.setAttribute('style', styles.join(';')); + }); + }); + } + + if (this.settings.label.enabled && block.label.enabled) { + this.addBlockLabel(group, index); + } + } + /** + * @param {Object} group + * @param {int} index + * + * @return {Object} + */ + + }, { + key: "getBlockPath", + value: function getBlockPath(group, index) { + var path = group.append('path'); + + if (this.settings.animation !== 0) { + this.addBeforeTransition(path, index, false); + } + + return path; + } + /** + * @param {Object} group + * @param {int} index + * + * @return {Object} + */ + + }, { + key: "getOverlayPath", + value: function getOverlayPath(group, index) { + var path = group.append('path'); + + if (this.settings.animation !== 0) { + this.addBeforeTransition(path, index, true); + } + + return path; + } + /** + * Set the attributes of a path element before its animation. + * + * @param {Object} path + * @param {int} index + * @param {boolean} isOverlay + * + * @return {void} + */ + + }, { + key: "addBeforeTransition", + value: function addBeforeTransition(path, index, isOverlay) { + var paths = isOverlay ? this.overlayPaths[index] : this.blockPaths[index]; + var beforePath = ''; + var beforeFill = ''; // Construct the top of the trapezoid and leave the other elements + // hovering around to expand downward on animation + + if (!this.settings.isCurved) { + beforePath = this.navigator.plot([['M', paths[0][0], paths[0][1]], ['L', paths[1][0], paths[1][1]], ['L', paths[1][0], paths[1][1]], ['L', paths[0][0], paths[0][1]]]); + } else { + beforePath = this.navigator.plot([['M', paths[0][0], paths[0][1]], ['Q', paths[1][0], paths[1][1]], [' ', paths[2][0], paths[2][1]], ['L', paths[2][0], paths[2][1]], ['M', paths[2][0], paths[2][1]], ['Q', paths[1][0], paths[1][1]], [' ', paths[0][0], paths[0][1]]]); + } // Use previous fill color, if available + + + if (this.settings.fillType === 'solid' && index > 0) { + beforeFill = this.blocks[index - 1].fill.actual; // Otherwise use current background + } else { + beforeFill = this.blocks[index].fill.actual; + } + + path.attr('d', beforePath).attr('fill', beforeFill); + } + /** + * Attach data to the target element. Also attach the current node to the + * data object. + * + * @param {Object} element + * @param {Object} data + * + * @return {void} + */ + + }, { + key: "attachData", + value: function attachData(element, data) { + var nodeData = _objectSpread({}, data, { + node: element.node() + }); + + element.data([nodeData]); + } + /** + * @param {int} index + * + * @return {string} + */ + + }, { + key: "getPathDefinition", + value: function getPathDefinition(index) { + var commands = []; + this.blockPaths[index].forEach(function (command) { + commands.push([command[2], command[0], command[1]]); + }); + return this.navigator.plot(commands); + } + /** + * @param {int} index + * + * @return {string} + */ + + }, { + key: "getOverlayPathDefinition", + value: function getOverlayPathDefinition(index) { + var commands = []; + this.overlayPaths[index].forEach(function (command) { + commands.push([command[2], command[0], command[1]]); + }); + return this.navigator.plot(commands); + } + /** + * @param {Object} data + * @param {Number} groupIndex + * @param {Array} nodes + * + * @return {void} + */ + + }, { + key: "onMouseOver", + value: function onMouseOver(data, groupIndex, nodes) { + var _this5 = this; + + var children = nodes[0].parentElement.childNodes; // Highlight all paths within one block + + [].slice.call(children).forEach(function (node) { + if (node.nodeName.toLowerCase() === 'path') { + var type = node.getAttribute('pathType') || ''; + + if (type === 'foreground') { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(node).attr('fill', _this5.colorizer.shade(data.fill.raw, -0.5)); + } else { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(node).attr('fill', _this5.colorizer.shade(data.fill.raw, -0.2)); + } + } + }); + } + /** + * @param {Object} data + * @param {Number} groupIndex + * @param {Array} nodes + * + * @return {void} + */ + + }, { + key: "onMouseOut", + value: function onMouseOut(data, groupIndex, nodes) { + var _this6 = this; + + var children = nodes[0].parentElement.childNodes; // Restore original color for all paths of a block + + [].slice.call(children).forEach(function (node) { + if (node.nodeName.toLowerCase() === 'path') { + var type = node.getAttribute('pathType') || ''; + + if (type === 'background') { + var backgroundColor = _this6.colorizer.shade(data.fill.raw, 0.3); + + Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(node).attr('fill', backgroundColor); + } else { + Object(d3_selection__WEBPACK_IMPORTED_MODULE_2__["select"])(node).attr('fill', data.fill.actual); + } + } + }); + } + /** + * @param {Object} group + * @param {int} index + * + * @return {void} + */ + + }, { + key: "addBlockLabel", + value: function addBlockLabel(group, index) { + var paths = this.blockPaths[index]; + var formattedLabel = this.blocks[index].label.formatted; + var fill = this.blocks[index].label.color; // Center the text + + var x = this.settings.width / 2; + var y = this.getTextY(paths); + var text = group.append('text').attrs({ + x: x, + y: y, + fill: fill, + 'font-size': this.settings.label.fontSize, + 'text-anchor': 'middle', + 'dominant-baseline': 'middle', + 'pointer-events': 'none' + }); // Add font-family, if exists + + if (this.settings.label.fontFamily !== null) { + text.attr('font-family', this.settings.label.fontFamily); + } + + this.addLabelLines(text, formattedLabel, x); + } + /** + * Add elements for each line of the formatted label. + * + * @param {Object} text + * @param {String} formattedLabel + * @param {Number} x + * + * @return {void} + */ + + }, { + key: "addLabelLines", + value: function addLabelLines(text, formattedLabel, x) { + var lines = formattedLabel.split('\n'); + var lineHeight = 20; // dy will signify the change from the initial height y + // We need to initially start the first line at the very top, factoring + // in the other number of lines + + var initialDy = -1 * lineHeight * (lines.length - 1) / 2; + lines.forEach(function (line, i) { + var dy = i === 0 ? initialDy : lineHeight; + text.append('tspan').attrs({ + x: x, + dy: dy + }).text(line); + }); + } + /** + * Returns the y position of the given label's text. This is determined by + * taking the mean of the bases. + * + * @param {Array} paths + * + * @return {Number} + */ + + }, { + key: "getTextY", + value: function getTextY(paths) { + var _this$settings = this.settings, + isCurved = _this$settings.isCurved, + curveHeight = _this$settings.curveHeight; + + if (isCurved) { + return (paths[2][1] + paths[3][1]) / 2 + 1.5 * curveHeight / this.blocks.length; + } + + return (paths[1][1] + paths[2][1]) / 2; + } + }]); + + return D3Funnel; +}(); + +_defineProperty(D3Funnel, "defaults", { + chart: { + width: 350, + height: 400, + bottomWidth: 1 / 3, + bottomPinch: 0, + inverted: false, + horizontal: false, + animate: 0, + curve: { + enabled: false, + height: 20, + shade: -0.4 + }, + totalCount: null + }, + block: { + dynamicHeight: false, + dynamicSlope: false, + barOverlay: false, + fill: { + scale: Object(d3__WEBPACK_IMPORTED_MODULE_1__["scaleOrdinal"])(d3__WEBPACK_IMPORTED_MODULE_1__["schemeCategory10"]).domain(Object(d3__WEBPACK_IMPORTED_MODULE_1__["range"])(0, 10)), + type: 'solid' + }, + minHeight: 0, + highlight: false + }, + label: { + enabled: true, + fontFamily: null, + fontSize: '14px', + fill: '#fff', + format: '{l}: {f}' + }, + tooltip: { + enabled: false, + format: '{l}: {f}' + }, + events: { + click: { + block: null + } + } +}); + +/* harmony default export */ __webpack_exports__["default"] = (D3Funnel); + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = __webpack_require__(3); + + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var alphabet = __webpack_require__(4); +var build = __webpack_require__(6); +var isValid = __webpack_require__(10); + +// if you are using cluster or multiple servers use this to make each instance +// has a unique value for worker +// Note: I don't know if this is automatically set when using third +// party cluster solutions such as pm2. +var clusterWorkerId = __webpack_require__(11) || 0; + +/** + * Set the seed. + * Highly recommended if you don't want people to try to figure out your id schema. + * exposed as shortid.seed(int) + * @param seed Integer value to seed the random alphabet. ALWAYS USE THE SAME SEED or you might get overlaps. + */ +function seed(seedValue) { + alphabet.seed(seedValue); + return module.exports; +} + +/** + * Set the cluster worker or machine id + * exposed as shortid.worker(int) + * @param workerId worker must be positive integer. Number less than 16 is recommended. + * returns shortid module so it can be chained. + */ +function worker(workerId) { + clusterWorkerId = workerId; + return module.exports; +} + +/** + * + * sets new characters to use in the alphabet + * returns the shuffled alphabet + */ +function characters(newCharacters) { + if (newCharacters !== undefined) { + alphabet.characters(newCharacters); + } + + return alphabet.shuffled(); +} + +/** + * Generate unique id + * Returns string id + */ +function generate() { + return build(clusterWorkerId); +} + +// Export all other functions as properties of the generate function +module.exports = generate; +module.exports.generate = generate; +module.exports.seed = seed; +module.exports.worker = worker; +module.exports.characters = characters; +module.exports.isValid = isValid; + + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var randomFromSeed = __webpack_require__(5); + +var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-'; +var alphabet; +var previousSeed; + +var shuffled; + +function reset() { + shuffled = false; +} + +function setCharacters(_alphabet_) { + if (!_alphabet_) { + if (alphabet !== ORIGINAL) { + alphabet = ORIGINAL; + reset(); + } + return; + } + + if (_alphabet_ === alphabet) { + return; + } + + if (_alphabet_.length !== ORIGINAL.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_); + } + + var unique = _alphabet_.split('').filter(function(item, ind, arr){ + return ind !== arr.lastIndexOf(item); + }); + + if (unique.length) { + throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', ')); + } + + alphabet = _alphabet_; + reset(); +} + +function characters(_alphabet_) { + setCharacters(_alphabet_); + return alphabet; +} + +function setSeed(seed) { + randomFromSeed.seed(seed); + if (previousSeed !== seed) { + reset(); + previousSeed = seed; + } +} + +function shuffle() { + if (!alphabet) { + setCharacters(ORIGINAL); + } + + var sourceArray = alphabet.split(''); + var targetArray = []; + var r = randomFromSeed.nextValue(); + var characterIndex; + + while (sourceArray.length > 0) { + r = randomFromSeed.nextValue(); + characterIndex = Math.floor(r * sourceArray.length); + targetArray.push(sourceArray.splice(characterIndex, 1)[0]); + } + return targetArray.join(''); +} + +function getShuffled() { + if (shuffled) { + return shuffled; + } + shuffled = shuffle(); + return shuffled; +} + +/** + * lookup shuffled letter + * @param index + * @returns {string} + */ +function lookup(index) { + var alphabetShuffled = getShuffled(); + return alphabetShuffled[index]; +} + +function get () { + return alphabet || ORIGINAL; +} + +module.exports = { + get: get, + characters: characters, + seed: setSeed, + lookup: lookup, + shuffled: getShuffled +}; + + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Found this seed-based random generator somewhere +// Based on The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu) + +var seed = 1; + +/** + * return a random number based on a seed + * @param seed + * @returns {number} + */ +function getNextValue() { + seed = (seed * 9301 + 49297) % 233280; + return seed/(233280.0); +} + +function setSeed(_seed_) { + seed = _seed_; +} + +module.exports = { + nextValue: getNextValue, + seed: setSeed +}; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var generate = __webpack_require__(7); +var alphabet = __webpack_require__(4); + +// Ignore all milliseconds before a certain time to reduce the size of the date entropy without sacrificing uniqueness. +// This number should be updated every year or so to keep the generated id short. +// To regenerate `new Date() - 0` and bump the version. Always bump the version! +var REDUCE_TIME = 1459707606518; + +// don't change unless we change the algos or REDUCE_TIME +// must be an integer and less than 16 +var version = 6; + +// Counter is used when shortid is called multiple times in one second. +var counter; + +// Remember the last time shortid was called in case counter is needed. +var previousSeconds; + +/** + * Generate unique id + * Returns string id + */ +function build(clusterWorkerId) { + var str = ''; + + var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001); + + if (seconds === previousSeconds) { + counter++; + } else { + counter = 0; + previousSeconds = seconds; + } + + str = str + generate(version); + str = str + generate(clusterWorkerId); + if (counter > 0) { + str = str + generate(counter); + } + str = str + generate(seconds); + return str; +} + +module.exports = build; + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var alphabet = __webpack_require__(4); +var random = __webpack_require__(8); +var format = __webpack_require__(9); + +function generate(number) { + var loopCounter = 0; + var done; + + var str = ''; + + while (!done) { + str = str + format(random, alphabet.get(), 1); + done = number < (Math.pow(16, loopCounter + 1 ) ); + loopCounter++; + } + return str; +} + +module.exports = generate; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var crypto = typeof window === 'object' && (window.crypto || window.msCrypto); // IE 11 uses window.msCrypto + +var randomByte; + +if (!crypto || !crypto.getRandomValues) { + randomByte = function(size) { + var bytes = []; + for (var i = 0; i < size; i++) { + bytes.push(Math.floor(Math.random() * 256)); + } + return bytes; + }; +} else { + randomByte = function(size) { + return crypto.getRandomValues(new Uint8Array(size)); + }; +} + +module.exports = randomByte; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +/** + * Secure random string generator with custom alphabet. + * + * Alphabet must contain 256 symbols or less. Otherwise, the generator + * will not be secure. + * + * @param {generator} random The random bytes generator. + * @param {string} alphabet Symbols to be used in new random string. + * @param {size} size The number of symbols in new random string. + * + * @return {string} Random string. + * + * @example + * const format = require('nanoid/format') + * + * function random (size) { + * const result = [] + * for (let i = 0; i < size; i++) { + * result.push(randomByte()) + * } + * return result + * } + * + * format(random, "abcdef", 5) //=> "fbaef" + * + * @name format + * @function + */ +module.exports = function (random, alphabet, size) { + var mask = (2 << Math.log(alphabet.length - 1) / Math.LN2) - 1 + var step = Math.ceil(1.6 * mask * size / alphabet.length) + + var id = '' + while (true) { + var bytes = random(step) + for (var i = 0; i < step; i++) { + var byte = bytes[i] & mask + if (alphabet[byte]) { + id += alphabet[byte] + if (id.length === size) return id + } + } + } +} + +/** + * @callback generator + * @param {number} bytes The number of bytes to generate. + * @return {number[]} Random bytes. + */ + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var alphabet = __webpack_require__(4); + +function isShortId(id) { + if (!id || typeof id !== 'string' || id.length < 6 ) { + return false; + } + + var nonAlphabetic = new RegExp('[^' + + alphabet.get().replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') + + ']'); + return !nonAlphabetic.test(id); +} + +module.exports = isShortId; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = 0; + + +/***/ }), +/* 12 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__12__; + +/***/ }), +/* 13 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(17); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return _point__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(60); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(19); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(21); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(23); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(41); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; }); + +/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(61); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(62); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return _touches__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(42); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(54); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["event"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["customEvent"]; }); + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 14 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + return Object(_select__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement)); +}); + + +/***/ }), +/* 15 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17); + + + +function creatorInherit(name) { + return function() { + var document = this.ownerDocument, + uri = this.namespaceURI; + return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] + ? document.createElement(name) + : document.createElementNS(uri, name); + }; +} + +function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); +}); + + +/***/ }), +/* 16 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17); + + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name; +}); + + +/***/ }), +/* 17 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; }); +var xhtml = "http://www.w3.org/1999/xhtml"; + +/* harmony default export */ __webpack_exports__["default"] = ({ + svg: "http://www.w3.org/2000/svg", + xhtml: xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}); + + +/***/ }), +/* 18 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); + + +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return typeof selector === "string" + ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement]) + : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); +}); + + +/***/ }), +/* 19 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; }); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20); +/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22); +/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(24); +/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(26); +/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27); +/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31); +/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(32); +/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(33); +/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(34); +/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(35); +/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(36); +/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(37); +/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38); +/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(39); +/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(40); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(41); +/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(43); +/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(44); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(45); +/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(46); +/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(47); +/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(48); +/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(49); +/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(50); +/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(51); +/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(52); +/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(53); +/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(54); +/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(55); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var root = [null]; + +function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; +} + +function selection() { + return new Selection([[document.documentElement]], root); +} + +Selection.prototype = selection.prototype = { + constructor: Selection, + select: _select__WEBPACK_IMPORTED_MODULE_0__["default"], + selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__["default"], + filter: _filter__WEBPACK_IMPORTED_MODULE_2__["default"], + data: _data__WEBPACK_IMPORTED_MODULE_3__["default"], + enter: _enter__WEBPACK_IMPORTED_MODULE_4__["default"], + exit: _exit__WEBPACK_IMPORTED_MODULE_5__["default"], + merge: _merge__WEBPACK_IMPORTED_MODULE_6__["default"], + order: _order__WEBPACK_IMPORTED_MODULE_7__["default"], + sort: _sort__WEBPACK_IMPORTED_MODULE_8__["default"], + call: _call__WEBPACK_IMPORTED_MODULE_9__["default"], + nodes: _nodes__WEBPACK_IMPORTED_MODULE_10__["default"], + node: _node__WEBPACK_IMPORTED_MODULE_11__["default"], + size: _size__WEBPACK_IMPORTED_MODULE_12__["default"], + empty: _empty__WEBPACK_IMPORTED_MODULE_13__["default"], + each: _each__WEBPACK_IMPORTED_MODULE_14__["default"], + attr: _attr__WEBPACK_IMPORTED_MODULE_15__["default"], + style: _style__WEBPACK_IMPORTED_MODULE_16__["default"], + property: _property__WEBPACK_IMPORTED_MODULE_17__["default"], + classed: _classed__WEBPACK_IMPORTED_MODULE_18__["default"], + text: _text__WEBPACK_IMPORTED_MODULE_19__["default"], + html: _html__WEBPACK_IMPORTED_MODULE_20__["default"], + raise: _raise__WEBPACK_IMPORTED_MODULE_21__["default"], + lower: _lower__WEBPACK_IMPORTED_MODULE_22__["default"], + append: _append__WEBPACK_IMPORTED_MODULE_23__["default"], + insert: _insert__WEBPACK_IMPORTED_MODULE_24__["default"], + remove: _remove__WEBPACK_IMPORTED_MODULE_25__["default"], + clone: _clone__WEBPACK_IMPORTED_MODULE_26__["default"], + datum: _datum__WEBPACK_IMPORTED_MODULE_27__["default"], + on: _on__WEBPACK_IMPORTED_MODULE_28__["default"], + dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_29__["default"] +}; + +/* harmony default export */ __webpack_exports__["default"] = (selection); + + +/***/ }), +/* 20 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + if (typeof select !== "function") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); +}); + + +/***/ }), +/* 21 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function none() {} + +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; +}); + + +/***/ }), +/* 22 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); +/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + if (typeof select !== "function") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__["default"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + subgroups.push(select.call(node, node.__data__, i, group)); + parents.push(node); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents); +}); + + +/***/ }), +/* 23 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function empty() { + return []; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; +}); + + +/***/ }), +/* 24 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); +/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(match) { + if (typeof match !== "function") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__["default"])(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents); +}); + + +/***/ }), +/* 25 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var matcher = function(selector) { + return function() { + return this.matches(selector); + }; +}; + +if (typeof document !== "undefined") { + var element = document.documentElement; + if (!element.matches) { + var vendorMatches = element.webkitMatchesSelector + || element.msMatchesSelector + || element.mozMatchesSelector + || element.oMatchesSelector; + matcher = function(selector) { + return function() { + return vendorMatches.call(this, selector); + }; + }; + } +} + +/* harmony default export */ __webpack_exports__["default"] = (matcher); + + +/***/ }), +/* 26 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); +/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(27); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29); + + + + +var keyPrefix = "$"; // Protect against keys like “__proto__”. + +function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, + node, + groupLength = group.length, + dataLength = data.length; + + // Put any non-null nodes that fit into update. + // Put any null nodes into enter. + // Put any remaining data into enter. + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); + } + } + + // Put any non-null nodes that don’t fit into exit. + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } +} + +function bindKey(parent, group, enter, update, exit, data, key) { + var i, + node, + nodeByKeyValue = {}, + groupLength = group.length, + dataLength = data.length, + keyValues = new Array(groupLength), + keyValue; + + // Compute the key for each node. + // If multiple nodes have the same key, the duplicates are added to exit. + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[keyValue] = node; + } + } + } + + // Compute the key for each datum. + // If there a node associated with this key, join and add it to update. + // If there is not (or the key is a duplicate), add it to enter. + for (i = 0; i < dataLength; ++i) { + keyValue = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } else { + enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]); + } + } + + // Add any remaining nodes that were not bound to data to exit. + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { + exit[i] = node; + } + } +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } + + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + + if (typeof value !== "function") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(value); + + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], + group = groups[j], + groupLength = group.length, + data = value.call(parent, parent && parent.__data__, j, parents), + dataLength = data.length, + enterGroup = enter[j] = new Array(dataLength), + updateGroup = update[j] = new Array(dataLength), + exitGroup = exit[j] = new Array(groupLength); + + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); + + // Now connect the enter nodes to their following update node, such that + // appendChild can insert the materialized enter node before this node, + // rather than at the end of the parent node. + for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { + if (previous = enterGroup[i0]) { + if (i0 >= i1) i1 = i0 + 1; + while (!(next = updateGroup[i1]) && ++i1 < dataLength); + previous._next = next || null; + } + } + } + + update = new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents); + update._enter = enter; + update._exit = exit; + return update; +}); + + +/***/ }), +/* 27 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; }); +/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19); + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); +}); + +function EnterNode(parent, datum) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum; +} + +EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, + insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, + querySelector: function(selector) { return this._parent.querySelector(selector); }, + querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } +}; + + +/***/ }), +/* 28 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(update) { + return new Array(update.length); +}); + + +/***/ }), +/* 29 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); + + +/***/ }), +/* 30 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19); + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents); +}); + + +/***/ }), +/* 31 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); + + +/* harmony default export */ __webpack_exports__["default"] = (function(selection) { + + for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents); +}); + + +/***/ }), +/* 32 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + + for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { + for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { + if (node = group[i]) { + if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next); + next = node; + } + } + } + + return this; +}); + + +/***/ }), +/* 33 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); + + +/* harmony default export */ __webpack_exports__["default"] = (function(compare) { + if (!compare) compare = ascending; + + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group[i]) { + sortgroup[i] = node; + } + } + sortgroup.sort(compareNode); + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order(); +}); + +function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} + + +/***/ }), +/* 34 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; +}); + + +/***/ }), +/* 35 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; +}); + + +/***/ }), +/* 36 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) return node; + } + } + + return null; +}); + + +/***/ }), +/* 37 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + var size = 0; + this.each(function() { ++size; }); + return size; +}); + + +/***/ }), +/* 38 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() { + return !this.node(); +}); + + +/***/ }), +/* 39 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(callback) { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { + if (node = group[i]) callback.call(node, node.__data__, i, group); + } + } + + return this; +}); + + +/***/ }), +/* 40 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16); + + +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} + +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} + +function attrConstant(name, value) { + return function() { + this.setAttribute(name, value); + }; +} + +function attrConstantNS(fullname, value) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value); + }; +} + +function attrFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttribute(name); + else this.setAttribute(name, v); + }; +} + +function attrFunctionNS(fullname, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttributeNS(fullname.space, fullname.local); + else this.setAttributeNS(fullname.space, fullname.local, v); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name); + + if (arguments.length < 2) { + var node = this.node(); + return fullname.local + ? node.getAttributeNS(fullname.space, fullname.local) + : node.getAttribute(fullname); + } + + return this.each((value == null + ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction) + : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); +}); + + +/***/ }), +/* 41 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; }); +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); + + +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} + +function styleConstant(name, value, priority) { + return function() { + this.style.setProperty(name, value, priority); + }; +} + +function styleFunction(name, value, priority) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.style.removeProperty(name); + else this.style.setProperty(name, v, priority); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + return arguments.length > 1 + ? this.each((value == null + ? styleRemove : typeof value === "function" + ? styleFunction + : styleConstant)(name, value, priority == null ? "" : priority)) + : styleValue(this.node(), name); +}); + +function styleValue(node, name) { + return node.style.getPropertyValue(name) + || Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name); +} + + +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document +}); + + +/***/ }), +/* 43 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function propertyRemove(name) { + return function() { + delete this[name]; + }; +} + +function propertyConstant(name, value) { + return function() { + this[name] = value; + }; +} + +function propertyFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) delete this[name]; + else this[name] = v; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; +}); + + +/***/ }), +/* 44 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function classArray(string) { + return string.trim().split(/^|\s+/); +} + +function classList(node) { + return node.classList || new ClassList(node); +} + +function ClassList(node) { + this._node = node; + this._names = classArray(node.getAttribute("class") || ""); +} + +ClassList.prototype = { + add: function(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name) { + return this._names.indexOf(name) >= 0; + } +}; + +function classedAdd(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.add(names[i]); +} + +function classedRemove(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.remove(names[i]); +} + +function classedTrue(names) { + return function() { + classedAdd(this, names); + }; +} + +function classedFalse(names) { + return function() { + classedRemove(this, names); + }; +} + +function classedFunction(names, value) { + return function() { + (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var names = classArray(name + ""); + + if (arguments.length < 2) { + var list = classList(this.node()), i = -1, n = names.length; + while (++i < n) if (!list.contains(names[i])) return false; + return true; + } + + return this.each((typeof value === "function" + ? classedFunction : value + ? classedTrue + : classedFalse)(names, value)); +}); + + +/***/ }), +/* 45 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function textRemove() { + this.textContent = ""; +} + +function textConstant(value) { + return function() { + this.textContent = value; + }; +} + +function textFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; +}); + + +/***/ }), +/* 46 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function htmlRemove() { + this.innerHTML = ""; +} + +function htmlConstant(value) { + return function() { + this.innerHTML = value; + }; +} + +function htmlFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; +}); + + +/***/ }), +/* 47 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(raise); +}); + + +/***/ }), +/* 48 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(lower); +}); + + +/***/ }), +/* 49 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); + + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); +}); + + +/***/ }), +/* 50 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15); +/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21); + + + +function constantNull() { + return null; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, before) { + var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name), + select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(before); + return this.select(function() { + return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); + }); +}); + + +/***/ }), +/* 51 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.each(remove); +}); + + +/***/ }), +/* 52 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function selection_cloneShallow() { + return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling); +} + +function selection_cloneDeep() { + return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling); +} + +/* harmony default export */ __webpack_exports__["default"] = (function(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +}); + + +/***/ }), +/* 53 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; +}); + + +/***/ }), +/* 54 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return customEvent; }); +var filterEvents = {}; + +var event = null; + +if (typeof document !== "undefined") { + var element = document.documentElement; + if (!("onmouseenter" in element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } +} + +function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; +} + +function contextListener(listener, index, group) { + return function(event1) { + var event0 = event; // Events can be reentrant (e.g., focus). + event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + event = event0; + } + }; +} + +function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + return {type: t, name: name}; + }); +} + +function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; +} + +function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + if (on) for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(typename, value, capture) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + + if (arguments.length < 2) { + var on = this.node().__on; + if (on) for (var j = 0, m = on.length, o; j < m; ++j) { + for (i = 0, o = on[j]; i < n; ++i) { + if ((t = typenames[i]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + + on = value ? onAdd : onRemove; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; +}); + +function customEvent(event1, listener, that, args) { + var event0 = event; + event1.sourceEvent = event; + event = event1; + try { + return listener.apply(that, args); + } finally { + event = event0; + } +} + + +/***/ }), +/* 55 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42); + + +function dispatchEvent(node, type, params) { + var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node), + event = window.CustomEvent; + + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window.document.createEvent("Event"); + if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else event.initEvent(type, false, false); + } + + node.dispatchEvent(event); +} + +function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; +} + +function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); +}); + + +/***/ }), +/* 56 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; }); +var nextId = 0; + +function local() { + return new Local; +} + +function Local() { + this._ = "@" + (++nextId).toString(36); +} + +Local.prototype = local.prototype = { + constructor: Local, + get: function(node) { + var id = this._; + while (!(id in node)) if (!(node = node.parentNode)) return; + return node[id]; + }, + set: function(node, value) { + return node[this._] = value; + }, + remove: function(node) { + return this._ in node && delete node[this._]; + }, + toString: function() { + return this._; + } +}; + + +/***/ }), +/* 57 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(node) { + var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])(); + if (event.changedTouches) event = event.changedTouches[0]; + return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, event); +}); + + +/***/ }), +/* 58 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54); + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__["event"], source; + while (source = current.sourceEvent) current = source; + return current; +}); + + +/***/ }), +/* 59 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(node, event) { + var svg = node.ownerSVGElement || node; + + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } + + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; +}); + + +/***/ }), +/* 60 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19); + + +/* harmony default export */ __webpack_exports__["default"] = (function(selector) { + return typeof selector === "string" + ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([document.querySelectorAll(selector)], [document.documentElement]) + : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]); +}); + + +/***/ }), +/* 61 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().changedTouches; + + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touch); + } + } + + return null; +}); + + +/***/ }), +/* 62 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(58); +/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(node, touches) { + if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().touches; + + for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) { + points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touches[i]); + } + + return points; +}); + + +/***/ }), +/* 63 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(64); +/* harmony import */ var _src_selection_attrs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(138); +/* harmony import */ var _src_selection_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(139); +/* harmony import */ var _src_selection_properties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(140); +/* harmony import */ var _src_transition_attrs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(141); +/* harmony import */ var _src_transition_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(142); + + + + + + + + +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.attrs = _src_selection_attrs__WEBPACK_IMPORTED_MODULE_2__["default"]; +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.styles = _src_selection_styles__WEBPACK_IMPORTED_MODULE_3__["default"]; +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.properties = _src_selection_properties__WEBPACK_IMPORTED_MODULE_4__["default"]; +d3_transition__WEBPACK_IMPORTED_MODULE_1__["transition"].prototype.attrs = _src_transition_attrs__WEBPACK_IMPORTED_MODULE_5__["default"]; +d3_transition__WEBPACK_IMPORTED_MODULE_1__["transition"].prototype.styles = _src_transition_styles__WEBPACK_IMPORTED_MODULE_6__["default"]; + + +/***/ }), +/* 64 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(65); +/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _active__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(137); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _interrupt__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + + + + + + + +/***/ }), +/* 65 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var _interrupt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66); +/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75); + + + + +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt__WEBPACK_IMPORTED_MODULE_1__["default"]; +d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition__WEBPACK_IMPORTED_MODULE_2__["default"]; + + +/***/ }), +/* 66 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _interrupt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(67); + + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + return this.each(function() { + Object(_interrupt__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name); + }); +}); + + +/***/ }), +/* 67 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { + var schedules = node.__transition, + schedule, + active, + empty = true, + i; + + if (!schedules) return; + + name = name == null ? null : name + ""; + + for (i in schedules) { + if ((schedule = schedules[i]).name !== name) { empty = false; continue; } + active = schedule.state > _transition_schedule__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule__WEBPACK_IMPORTED_MODULE_0__["ENDING"]; + schedule.state = _transition_schedule__WEBPACK_IMPORTED_MODULE_0__["ENDED"]; + schedule.timer.stop(); + if (active) schedule.on.call("interrupt", node, node.__data__, schedule.index, schedule.group); + delete schedules[i]; + } + + if (empty) delete node.__transition; +}); + + +/***/ }), +/* 68 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; }); +/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(69); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71); + + + +var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "interrupt"); +var emptyTween = []; + +var CREATED = 0; +var SCHEDULED = 1; +var STARTING = 2; +var STARTED = 3; +var RUNNING = 4; +var ENDING = 5; +var ENDED = 6; + +/* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) { + var schedules = node.__transition; + if (!schedules) node.__transition = {}; + else if (id in schedules) return; + create(node, id, { + name: name, + index: index, // For context during callback. + group: group, // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); +}); + +function init(node, id) { + var schedule = get(node, id); + if (schedule.state > CREATED) throw new Error("too late; already scheduled"); + return schedule; +} + +function set(node, id) { + var schedule = get(node, id); + if (schedule.state > STARTING) throw new Error("too late; already started"); + return schedule; +} + +function get(node, id) { + var schedule = node.__transition; + if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); + return schedule; +} + +function create(node, id, self) { + var schedules = node.__transition, + tween; + + // Initialize the self timer when the transition is created. + // Note the actual delay is not known until the first callback! + schedules[id] = self; + self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time); + + function schedule(elapsed) { + self.state = SCHEDULED; + self.timer.restart(start, self.delay, self.time); + + // If the elapsed delay is less than our first sleep, start immediately. + if (self.delay <= elapsed) start(elapsed - self.delay); + } + + function start(elapsed) { + var i, j, n, o; + + // If the state is not SCHEDULED, then we previously errored on start. + if (self.state !== SCHEDULED) return stop(); + + for (i in schedules) { + o = schedules[i]; + if (o.name !== self.name) continue; + + // While this element already has a starting transition during this frame, + // defer starting an interrupting transition until that transition has a + // chance to tick (and possibly end); see d3/d3-transition#54! + if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start); + + // Interrupt the active transition, if any. + // Dispatch the interrupt event. + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + + // Cancel any pre-empted transitions. No interrupt event is dispatched + // because the cancelled transitions never started. Note that this also + // removes this transition from the pending list! + else if (+i < id) { + o.state = ENDED; + o.timer.stop(); + delete schedules[i]; + } + } + + // Defer the first tick to end of the current frame; see d3/d3#1576. + // Note the transition may be canceled after start and before the first tick! + // Note this must be scheduled before the start event; see d3/d3-transition#16! + // Assuming this is successful, subsequent callbacks go straight to tick. + Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() { + if (self.state === STARTED) { + self.state = RUNNING; + self.timer.restart(tick, self.delay, self.time); + tick(elapsed); + } + }); + + // Dispatch the start event. + // Note this must be done before the tween are initialized. + self.state = STARTING; + self.on.call("start", node, node.__data__, self.index, self.group); + if (self.state !== STARTING) return; // interrupted + self.state = STARTED; + + // Initialize the tween, deleting null tween. + tween = new Array(n = self.tween.length); + for (i = 0, j = -1; i < n; ++i) { + if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + + function tick(elapsed) { + var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), + i = -1, + n = tween.length; + + while (++i < n) { + tween[i].call(null, t); + } + + // Dispatch the end event. + if (self.state === ENDING) { + self.on.call("end", node, node.__data__, self.index, self.group); + stop(); + } + } + + function stop() { + self.state = ENDED; + self.timer.stop(); + delete schedules[id]; + for (var i in schedules) return; // eslint-disable-line no-unused-vars + delete node.__transition; + } +} + + +/***/ }), +/* 69 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(70); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + + +/***/ }), +/* 70 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var noop = {value: function() {}}; + +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} + +function Dispatch(_) { + this._ = _; +} + +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} + +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} + +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; +} + +/* harmony default export */ __webpack_exports__["default"] = (dispatch); + + +/***/ }), +/* 71 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer__WEBPACK_IMPORTED_MODULE_0__["now"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer__WEBPACK_IMPORTED_MODULE_0__["timer"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; }); + +/* harmony import */ var _timeout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _interval__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(74); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + + + +/***/ }), +/* 72 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; }); +var frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; + +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} + +function clearNow() { + clockNow = 0; +} + +function Timer() { + this._call = + this._time = + this._next = null; +} + +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) taskTail._next = this; + else taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; + +function timer(callback, delay, time) { + var t = new Timer; + t.restart(callback, delay, time); + return t; +} + +function timerFlush() { + now(); // Get the current time, if not already set. + ++frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, e); + t = t._next; + } + --frame; +} + +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + frame = timeout = 0; + try { + timerFlush(); + } finally { + frame = 0; + nap(); + clockNow = 0; + } +} + +function poke() { + var now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; +} + +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} + +function sleep(time) { + if (frame) return; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed clockNow. + if (delay > 24) { + if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); + if (interval) interval = clearInterval(interval); + } else { + if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + frame = 1, setFrame(wake); + } +} + + +/***/ }), +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72); + + +/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { + var t = new _timer__WEBPACK_IMPORTED_MODULE_0__["Timer"]; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +}); + + +/***/ }), +/* 74 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _timer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72); + + +/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) { + var t = new _timer__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay; + if (delay == null) return t.restart(callback, delay, time), t; + delay = +delay, time = time == null ? Object(_timer__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time; + t.restart(function tick(elapsed) { + elapsed += total; + t.restart(tick, total += delay, time); + callback(elapsed); + }, delay, time); + return t; +}); + + +/***/ }), +/* 75 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76); +/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68); +/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(126); +/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(71); + + + + + +var defaultTiming = { + time: null, // Set on use. + delay: 0, + duration: 250, + ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"] +}; + +function inherit(node, id) { + var timing; + while (!(timing = node.__transition) || !(timing = timing[id])) { + if (!(node = node.parentNode)) { + return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), defaultTiming; + } + } + return timing; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name) { + var id, + timing; + + if (name instanceof _transition_index__WEBPACK_IMPORTED_MODULE_0__["Transition"]) { + id = name._id, name = name._name; + } else { + id = Object(_transition_index__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + ""; + } + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + Object(_transition_schedule__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id)); + } + } + } + + return new _transition_index__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id); +}); + + +/***/ }), +/* 76 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; }); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(77); +/* harmony import */ var _attrTween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(111); +/* harmony import */ var _delay__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(112); +/* harmony import */ var _duration__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(113); +/* harmony import */ var _ease__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(114); +/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(115); +/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(116); +/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(117); +/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(118); +/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(119); +/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(120); +/* harmony import */ var _selection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(121); +/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(122); +/* harmony import */ var _styleTween__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(123); +/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(124); +/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(125); +/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(109); + + + + + + + + + + + + + + + + + + + +var id = 0; + +function Transition(groups, parents, name, id) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id; +} + +function transition(name) { + return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name); +} + +function newId() { + return ++id; +} + +var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype; + +Transition.prototype = transition.prototype = { + constructor: Transition, + select: _select__WEBPACK_IMPORTED_MODULE_10__["default"], + selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_11__["default"], + filter: _filter__WEBPACK_IMPORTED_MODULE_6__["default"], + merge: _merge__WEBPACK_IMPORTED_MODULE_7__["default"], + selection: _selection__WEBPACK_IMPORTED_MODULE_12__["default"], + transition: _transition__WEBPACK_IMPORTED_MODULE_16__["default"], + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: _on__WEBPACK_IMPORTED_MODULE_8__["default"], + attr: _attr__WEBPACK_IMPORTED_MODULE_1__["default"], + attrTween: _attrTween__WEBPACK_IMPORTED_MODULE_2__["default"], + style: _style__WEBPACK_IMPORTED_MODULE_13__["default"], + styleTween: _styleTween__WEBPACK_IMPORTED_MODULE_14__["default"], + text: _text__WEBPACK_IMPORTED_MODULE_15__["default"], + remove: _remove__WEBPACK_IMPORTED_MODULE_9__["default"], + tween: _tween__WEBPACK_IMPORTED_MODULE_17__["default"], + delay: _delay__WEBPACK_IMPORTED_MODULE_3__["default"], + duration: _duration__WEBPACK_IMPORTED_MODULE_4__["default"], + ease: _ease__WEBPACK_IMPORTED_MODULE_5__["default"] +}; + + +/***/ }), +/* 77 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); +/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109); +/* harmony import */ var _interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110); + + + + + +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} + +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} + +function attrConstant(name, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = this.getAttribute(name); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function attrConstantNS(fullname, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = this.getAttributeNS(fullname.space, fullname.local); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function attrFunction(name, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0, value1 = value(this); + if (value1 == null) return void this.removeAttribute(name); + value0 = this.getAttribute(name); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +function attrFunctionNS(fullname, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0, value1 = value(this); + if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); + value0 = this.getAttributeNS(fullname.space, fullname.local); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate__WEBPACK_IMPORTED_MODULE_3__["default"]; + return this.attrTween(name, typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value)) + : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) + : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + "")); +}); + + +/***/ }), +/* 78 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(91); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _basisClosed__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(88); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(92); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _discrete__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _hue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(93); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(94); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _round__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(98); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(95); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _transform_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index__WEBPACK_IMPORTED_MODULE_11__["interpolateTransformCss"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index__WEBPACK_IMPORTED_MODULE_11__["interpolateTransformSvg"]; }); + +/* harmony import */ var _zoom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(102); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _rgb__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(86); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb__WEBPACK_IMPORTED_MODULE_13__["rgbBasis"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb__WEBPACK_IMPORTED_MODULE_13__["rgbBasisClosed"]; }); + +/* harmony import */ var _hsl__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(103); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl__WEBPACK_IMPORTED_MODULE_14__["hslLong"]; }); + +/* harmony import */ var _lab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(104); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _hcl__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(105); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl__WEBPACK_IMPORTED_MODULE_16__["hclLong"]; }); + +/* harmony import */ var _cubehelix__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(106); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix__WEBPACK_IMPORTED_MODULE_17__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix__WEBPACK_IMPORTED_MODULE_17__["cubehelixLong"]; }); + +/* harmony import */ var _piecewise__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(107); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise__WEBPACK_IMPORTED_MODULE_18__["default"]; }); + +/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(108); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 79 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _rgb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86); +/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91); +/* harmony import */ var _date__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93); +/* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(94); +/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(95); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(90); + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? Object(_constant__WEBPACK_IMPORTED_MODULE_7__["default"])(b) + : (t === "number" ? _number__WEBPACK_IMPORTED_MODULE_4__["default"] + : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string__WEBPACK_IMPORTED_MODULE_6__["default"]) + : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb__WEBPACK_IMPORTED_MODULE_1__["default"] + : b instanceof Date ? _date__WEBPACK_IMPORTED_MODULE_3__["default"] + : Array.isArray(b) ? _array__WEBPACK_IMPORTED_MODULE_2__["default"] + : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object__WEBPACK_IMPORTED_MODULE_5__["default"] + : _number__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b); +}); + + +/***/ }), +/* 80 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color__WEBPACK_IMPORTED_MODULE_0__["rgb"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color__WEBPACK_IMPORTED_MODULE_0__["hsl"]; }); + +/* harmony import */ var _lab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(83); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab__WEBPACK_IMPORTED_MODULE_1__["hcl"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab__WEBPACK_IMPORTED_MODULE_1__["lch"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab__WEBPACK_IMPORTED_MODULE_1__["gray"]; }); + +/* harmony import */ var _cubehelix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + +/***/ }), +/* 81 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); +/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82); + + +function Color() {} + +var darker = 0.7; +var brighter = 1 / darker; + +var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex3 = /^#([0-9a-f]{3})$/, + reHex6 = /^#([0-9a-f]{6})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, { + displayable: function() { + return this.rgb().displayable(); + }, + hex: function() { + return this.rgb().hex(); + }, + toString: function() { + return this.rgb() + ""; + } +}); + +function color(format) { + var m; + format = (format + "").trim().toLowerCase(); + return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 + : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; +} + +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} + +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} + +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} + +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} + +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, 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); + }, + hex: function() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); + }, + toString: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "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)) + + (a === 1 ? ")" : ", " + a + ")"); + } +})); + +function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); +} + +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} + +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} + +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} + +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + 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); + } +})); + +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; +} + + +/***/ }), +/* 82 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); +/* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +}); + +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} + + +/***/ }), +/* 83 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; }); +/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81); +/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84); + + + + +// https://beta.observablehq.com/@mbostock/lab-and-rgb +var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; + +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * _math__WEBPACK_IMPORTED_MODULE_2__["deg2rad"]; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + if (!(o instanceof _color__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) x = z = y; else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} + +function gray(l, opacity) { + return new Lab(l, 0, 0, opacity == null ? 1 : opacity); +} + +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} + +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new _color__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( + lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), + lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } +})); + +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} + +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} + +function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} + +function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} + +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * _math__WEBPACK_IMPORTED_MODULE_2__["rad2deg"]; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} + +function lch(l, c, h, opacity) { + return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return labConvert(this).rgb(); + } +})); + + +/***/ }), +/* 84 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deg2rad", function() { return deg2rad; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rad2deg", function() { return rad2deg; }); +var deg2rad = Math.PI / 180; +var rad2deg = 180 / Math.PI; + + +/***/ }), +/* 85 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; }); +/* harmony import */ var _define__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81); +/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84); + + + + +var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; + +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof _color__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * _math__WEBPACK_IMPORTED_MODULE_2__["rad2deg"] - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} + +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} + +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +Object(_define__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color__WEBPACK_IMPORTED_MODULE_1__["Color"], { + brighter: function(k) { + k = k == null ? _color__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color__WEBPACK_IMPORTED_MODULE_1__["brighter"], k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? _color__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color__WEBPACK_IMPORTED_MODULE_1__["darker"], k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * _math__WEBPACK_IMPORTED_MODULE_2__["deg2rad"], + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new _color__WEBPACK_IMPORTED_MODULE_1__["Rgb"]( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } +})); + + +/***/ }), +/* 86 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87); +/* harmony import */ var _basisClosed__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89); + + + + + +/* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) { + var color = Object(_color__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y); + + function rgb(start, end) { + var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = Object(_color__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb.gamma = rgbGamma; + + return rgb; +})(1)); + +function rgbSpline(spline) { + return function(colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, color; + for (i = 0; i < n; ++i) { + color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]); + r[i] = color.r || 0; + g[i] = color.g || 0; + b[i] = color.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color.opacity = 1; + return function(t) { + color.r = r(t); + color.g = g(t); + color.b = b(t); + return color + ""; + }; + }; +} + +var rgbBasis = rgbSpline(_basis__WEBPACK_IMPORTED_MODULE_1__["default"]); +var rgbBasisClosed = rgbSpline(_basisClosed__WEBPACK_IMPORTED_MODULE_2__["default"]); + + +/***/ }), +/* 87 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; }); +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}); + + +/***/ }), +/* 88 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _basis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87); + + +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + var n = values.length; + return function(t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return Object(_basis__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3); + }; +}); + + +/***/ }), +/* 89 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; }); +/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90); + + +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} + +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} + +function hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); +} + +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); + }; +} + +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a); +} + + +/***/ }), +/* 90 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); + + +/***/ }), +/* 91 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79); + + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = Object(_value__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; +}); + + +/***/ }), +/* 92 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var d = new Date; + return a = +a, b -= a, function(t) { + return d.setTime(a + b * t), d; + }; +}); + + +/***/ }), +/* 93 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return a = +a, b -= a, function(t) { + return a + b * t; + }; +}); + + +/***/ }), +/* 94 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _value__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(79); + + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var i = {}, + c = {}, + k; + + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = Object(_value__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; +}); + + +/***/ }), +/* 95 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93); + + +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + +function zero(b) { + return function() { + return b; + }; +} + +function one(b) { + return function(t) { + return b(t) + ""; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); +}); + + +/***/ }), +/* 96 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(range) { + var n = range.length; + return function(t) { + return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; + }; +}); + + +/***/ }), +/* 97 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(89); + + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var i = Object(_color__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b); + return function(t) { + var x = i(t); + return x - 360 * Math.floor(x / 360); + }; +}); + + +/***/ }), +/* 98 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return a = +a, b -= a, function(t) { + return Math.round(a + b * t); + }; +}); + + +/***/ }), +/* 99 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); +/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93); +/* harmony import */ var _parse__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(100); + + + +function interpolateTransform(parse, pxComma, pxParen, degParen) { + + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({i: i - 4, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)}); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({i: i - 4, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} + +var interpolateTransformCss = interpolateTransform(_parse__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(_parse__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")"); + + +/***/ }), +/* 100 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; }); +/* harmony import */ var _decompose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(101); + + +var cssNode, + cssRoot, + cssView, + svgNode; + +function parseCss(value) { + if (value === "none") return _decompose__WEBPACK_IMPORTED_MODULE_0__["identity"]; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return Object(_decompose__WEBPACK_IMPORTED_MODULE_0__["default"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); +} + +function parseSvg(value) { + if (value == null) return _decompose__WEBPACK_IMPORTED_MODULE_0__["identity"]; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose__WEBPACK_IMPORTED_MODULE_0__["identity"]; + value = value.matrix; + return Object(_decompose__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f); +} + + +/***/ }), +/* 101 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; }); +var degrees = 180 / Math.PI; + +var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; +}); + + +/***/ }), +/* 102 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var rho = Math.SQRT2, + rho2 = 2, + rho4 = 4, + epsilon2 = 1e-12; + +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} + +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} + +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} + +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +/* harmony default export */ __webpack_exports__["default"] = (function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; + + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + } + } + + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + } + } + + i.duration = S * 1000; + + return i; +}); + + +/***/ }), +/* 103 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89); + + + +function hsl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h), + s = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), + l = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +/* harmony default export */ __webpack_exports__["default"] = (hsl(_color__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var hslLong = hsl(_color__WEBPACK_IMPORTED_MODULE_1__["default"]); + + +/***/ }), +/* 104 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89); + + + +function lab(start, end) { + var l = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l), + a = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a), + b = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b), + opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; +} + + +/***/ }), +/* 105 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89); + + + +function hcl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h), + c = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c), + l = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +/* harmony default export */ __webpack_exports__["default"] = (hcl(_color__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var hclLong = hcl(_color__WEBPACK_IMPORTED_MODULE_1__["default"]); + + +/***/ }), +/* 106 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; }); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89); + + + +function cubehelix(hue) { + return (function cubehelixGamma(y) { + y = +y; + + function cubehelix(start, end) { + var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h), + s = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s), + l = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l), + opacity = Object(_color__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + + cubehelix.gamma = cubehelixGamma; + + return cubehelix; + })(1); +} + +/* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color__WEBPACK_IMPORTED_MODULE_1__["hue"])); +var cubehelixLong = cubehelix(_color__WEBPACK_IMPORTED_MODULE_1__["default"]); + + +/***/ }), +/* 107 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; }); +function piecewise(interpolate, values) { + var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); + while (i < n) I[i] = interpolate(v, v = values[++i]); + return function(t) { + var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); + return I[i](t - i); + }; +} + + +/***/ }), +/* 108 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +}); + + +/***/ }), +/* 109 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; }); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +function tweenRemove(id, name) { + var tween0, tween1; + return function() { + var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1 = tween1.slice(); + tween1.splice(i, 1); + break; + } + } + } + + schedule.tween = tween1; + }; +} + +function tweenFunction(id, name, value) { + var tween0, tween1; + if (typeof value !== "function") throw new Error; + return function() { + var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1[i] = t; + break; + } + } + if (i === n) tween1.push(t); + } + + schedule.tween = tween1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var id = this._id; + + name += ""; + + if (arguments.length < 2) { + var tween = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween; + for (var i = 0, n = tween.length, t; i < n; ++i) { + if ((t = tween[i]).name === name) { + return t.value; + } + } + return null; + } + + return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); +}); + +function tweenValue(transition, name, value) { + var id = transition._id; + + transition.each(function() { + var schedule = Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id); + (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); + }); + + return function(node) { + return Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name]; + }; +} + + +/***/ }), +/* 110 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + var c; + return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"] + : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"] + : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]) + : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b); +}); + + +/***/ }), +/* 111 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function attrTweenNS(fullname, value) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.setAttributeNS(fullname.space, fullname.local, i(t)); + }; + } + tween._value = value; + return tween; +} + +function attrTween(name, value) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.setAttribute(name, i(t)); + }; + } + tween._value = value; + return tween; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value) { + var key = "attr." + name; + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); +}); + + +/***/ }), +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +function delayFunction(id, value) { + return function() { + Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments); + }; +} + +function delayConstant(id, value) { + return value = +value, function() { + Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? delayFunction + : delayConstant)(id, value)) + : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay; +}); + + +/***/ }), +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +function durationFunction(id, value) { + return function() { + Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments); + }; +} + +function durationConstant(id, value) { + return value = +value, function() { + Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? durationFunction + : durationConstant)(id, value)) + : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration; +}); + + +/***/ }), +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +function easeConstant(id, value) { + if (typeof value !== "function") throw new Error; + return function() { + Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + var id = this._id; + + return arguments.length + ? this.each(easeConstant(id, value)) + : Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease; +}); + + +/***/ }), +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(match) { + if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id); +}); + + +/***/ }), +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76); + + +/* harmony default export */ __webpack_exports__["default"] = (function(transition) { + if (transition._id !== this._id) throw new Error; + + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id); +}); + + +/***/ }), +/* 117 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68); + + +function start(name) { + return (name + "").trim().split(/^|\s+/).every(function(t) { + var i = t.indexOf("."); + if (i >= 0) t = t.slice(0, i); + return !t || t === "start"; + }); +} + +function onFunction(id, name, listener) { + var on0, on1, sit = start(name) ? _schedule__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule__WEBPACK_IMPORTED_MODULE_0__["set"]; + return function() { + var schedule = sit(this, id), + on = schedule.on; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); + + schedule.on = on1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, listener) { + var id = this._id; + + return arguments.length < 2 + ? Object(_schedule__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name) + : this.each(onFunction(id, name, listener)); +}); + + +/***/ }), +/* 118 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function removeFunction(id) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) if (+i !== id) return; + if (parent) parent.removeChild(this); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return this.on("end.remove", removeFunction(this._id)); +}); + + +/***/ }), +/* 119 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68); + + + + +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + Object(_schedule__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id)); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id); +}); + + +/***/ }), +/* 120 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68); + + + + +/* harmony default export */ __webpack_exports__["default"] = (function(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) { + if (child = children[k]) { + Object(_schedule__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit); + } + } + subgroups.push(children); + parents.push(node); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id); +}); + + +/***/ }), +/* 121 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor; + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return new Selection(this._groups, this._parents); +}); + + +/***/ }), +/* 122 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13); +/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(109); +/* harmony import */ var _interpolate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(110); + + + + + +function styleRemove(name, interpolate) { + var value00, + value10, + interpolate0; + return function() { + var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), + value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +function styleRemoveEnd(name) { + return function() { + this.style.removeProperty(name); + }; +} + +function styleConstant(name, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function styleFunction(name, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name), + value1 = value(this); + if (value1 == null) value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name)); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate__WEBPACK_IMPORTED_MODULE_3__["default"]; + return value == null ? this + .styleTween(name, styleRemove(name, i)) + .on("end.style." + name, styleRemoveEnd(name)) + : this.styleTween(name, typeof value === "function" + ? styleFunction(name, i, Object(_tween__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "style." + name, value)) + : styleConstant(name, i, value + ""), priority); +}); + + +/***/ }), +/* 123 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function styleTween(name, value, priority) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.style.setProperty(name, i(t), priority); + }; + } + tween._value = value; + return tween; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) { + var key = "style." + (name += ""); + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); +}); + + +/***/ }), +/* 124 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _tween__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(109); + + +function textConstant(value) { + return function() { + this.textContent = value; + }; +} + +function textFunction(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(value) { + return this.tween("text", typeof value === "function" + ? textFunction(Object(_tween__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value)) + : textConstant(value == null ? "" : value + "")); +}); + + +/***/ }), +/* 125 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76); +/* harmony import */ var _schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68); + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var name = this._name, + id0 = this._id, + id1 = Object(_index__WEBPACK_IMPORTED_MODULE_0__["newId"])(); + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + var inherit = Object(_schedule__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0); + Object(_schedule__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, { + time: inherit.time + inherit.delay + inherit.duration, + delay: 0, + duration: inherit.duration, + ease: inherit.ease + }); + } + } + } + + return new _index__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1); +}); + + +/***/ }), +/* 126 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(127); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear__WEBPACK_IMPORTED_MODULE_0__["linear"]; }); + +/* harmony import */ var _quad__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(128); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; }); + +/* harmony import */ var _cubic__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(129); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; }); + +/* harmony import */ var _poly__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(130); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; }); + +/* harmony import */ var _sin__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(131); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; }); + +/* harmony import */ var _exp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(132); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp__WEBPACK_IMPORTED_MODULE_5__["expIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp__WEBPACK_IMPORTED_MODULE_5__["expOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; }); + +/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(133); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; }); + +/* harmony import */ var _bounce__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(134); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; }); + +/* harmony import */ var _back__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(135); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back__WEBPACK_IMPORTED_MODULE_8__["backIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back__WEBPACK_IMPORTED_MODULE_8__["backOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; }); + +/* harmony import */ var _elastic__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(136); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; }); + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 127 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; }); +function linear(t) { + return +t; +} + + +/***/ }), +/* 128 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; }); +function quadIn(t) { + return t * t; +} + +function quadOut(t) { + return t * (2 - t); +} + +function quadInOut(t) { + return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; +} + + +/***/ }), +/* 129 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; }); +function cubicIn(t) { + return t * t * t; +} + +function cubicOut(t) { + return --t * t * t + 1; +} + +function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} + + +/***/ }), +/* 130 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; }); +var exponent = 3; + +var polyIn = (function custom(e) { + e = +e; + + function polyIn(t) { + return Math.pow(t, e); + } + + polyIn.exponent = custom; + + return polyIn; +})(exponent); + +var polyOut = (function custom(e) { + e = +e; + + function polyOut(t) { + return 1 - Math.pow(1 - t, e); + } + + polyOut.exponent = custom; + + return polyOut; +})(exponent); + +var polyInOut = (function custom(e) { + e = +e; + + function polyInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; + } + + polyInOut.exponent = custom; + + return polyInOut; +})(exponent); + + +/***/ }), +/* 131 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; }); +var pi = Math.PI, + halfPi = pi / 2; + +function sinIn(t) { + return 1 - Math.cos(t * halfPi); +} + +function sinOut(t) { + return Math.sin(t * halfPi); +} + +function sinInOut(t) { + return (1 - Math.cos(pi * t)) / 2; +} + + +/***/ }), +/* 132 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; }); +function expIn(t) { + return Math.pow(2, 10 * t - 10); +} + +function expOut(t) { + return 1 - Math.pow(2, -10 * t); +} + +function expInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2; +} + + +/***/ }), +/* 133 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; }); +function circleIn(t) { + return 1 - Math.sqrt(1 - t * t); +} + +function circleOut(t) { + return Math.sqrt(1 - --t * t); +} + +function circleInOut(t) { + return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; +} + + +/***/ }), +/* 134 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; }); +var b1 = 4 / 11, + b2 = 6 / 11, + b3 = 8 / 11, + b4 = 3 / 4, + b5 = 9 / 11, + b6 = 10 / 11, + b7 = 15 / 16, + b8 = 21 / 22, + b9 = 63 / 64, + b0 = 1 / b1 / b1; + +function bounceIn(t) { + return 1 - bounceOut(1 - t); +} + +function bounceOut(t) { + return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; +} + +function bounceInOut(t) { + return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; +} + + +/***/ }), +/* 135 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; }); +var overshoot = 1.70158; + +var backIn = (function custom(s) { + s = +s; + + function backIn(t) { + return t * t * ((s + 1) * t - s); + } + + backIn.overshoot = custom; + + return backIn; +})(overshoot); + +var backOut = (function custom(s) { + s = +s; + + function backOut(t) { + return --t * t * ((s + 1) * t + s) + 1; + } + + backOut.overshoot = custom; + + return backOut; +})(overshoot); + +var backInOut = (function custom(s) { + s = +s; + + function backInOut(t) { + return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; + } + + backInOut.overshoot = custom; + + return backInOut; +})(overshoot); + + +/***/ }), +/* 136 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; }); +var tau = 2 * Math.PI, + amplitude = 1, + period = 0.3; + +var elasticIn = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticIn(t) { + return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p); + } + + elasticIn.amplitude = function(a) { return custom(a, p * tau); }; + elasticIn.period = function(p) { return custom(a, p); }; + + return elasticIn; +})(amplitude, period); + +var elasticOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticOut(t) { + return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p); + } + + elasticOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticOut.period = function(p) { return custom(a, p); }; + + return elasticOut; +})(amplitude, period); + +var elasticInOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticInOut(t) { + return ((t = t * 2 - 1) < 0 + ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p) + : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2; + } + + elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticInOut.period = function(p) { return custom(a, p); }; + + return elasticInOut; +})(amplitude, period); + + +/***/ }), +/* 137 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76); +/* harmony import */ var _transition_schedule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68); + + + +var root = [null]; + +/* harmony default export */ __webpack_exports__["default"] = (function(node, name) { + var schedules = node.__transition, + schedule, + i; + + if (schedules) { + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule = schedules[i]).state > _transition_schedule__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) { + return new _transition_index__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i); + } + } + } + + return null; +}); + + +/***/ }), +/* 138 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function attrsFunction(selection, map) { + return selection.each(function() { + var x = map.apply(this, arguments), s = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(this); + for (var name in x) s.attr(name, x[name]); + }); +} + +function attrsObject(selection, map) { + for (var name in map) selection.attr(name, map[name]); + return selection; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + return (typeof map === "function" ? attrsFunction : attrsObject)(this, map); +}); + + +/***/ }), +/* 139 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function stylesFunction(selection, map, priority) { + return selection.each(function() { + var x = map.apply(this, arguments), s = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(this); + for (var name in x) s.style(name, x[name], priority); + }); +} + +function stylesObject(selection, map, priority) { + for (var name in map) selection.style(name, map[name], priority); + return selection; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(map, priority) { + return (typeof map === "function" ? stylesFunction : stylesObject)(this, map, priority == null ? "" : priority); +}); + + +/***/ }), +/* 140 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function propertiesFunction(selection, map) { + return selection.each(function() { + var x = map.apply(this, arguments), s = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(this); + for (var name in x) s.property(name, x[name]); + }); +} + +function propertiesObject(selection, map) { + for (var name in map) selection.property(name, map[name]); + return selection; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + return (typeof map === "function" ? propertiesFunction : propertiesObject)(this, map); +}); + + +/***/ }), +/* 141 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function attrsFunction(transition, map) { + return transition.each(function() { + var x = map.apply(this, arguments), t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(this).transition(transition); + for (var name in x) t.attr(name, x[name]); + }); +} + +function attrsObject(transition, map) { + for (var name in map) transition.attr(name, map[name]); + return transition; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(map) { + return (typeof map === "function" ? attrsFunction : attrsObject)(this, map); +}); + + +/***/ }), +/* 142 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13); + + +function stylesFunction(transition, map, priority) { + return transition.each(function() { + var x = map.apply(this, arguments), t = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(this).transition(transition); + for (var name in x) t.style(name, x[name], priority); + }); +} + +function stylesObject(transition, map, priority) { + for (var name in map) transition.style(name, map[name], priority); + return transition; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(map, priority) { + return (typeof map === "function" ? stylesFunction : stylesObject)(this, map, priority == null ? "" : priority); +}); + + +/***/ }), +/* 143 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Colorizer = +/*#__PURE__*/ +function () { + /** + * @return {void} + */ + function Colorizer() { + _classCallCheck(this, Colorizer); + + this.hexExpression = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i; + this.instanceId = null; + this.labelFill = null; + this.scale = null; + } + /** + * @param {string} instanceId + * + * @return {void} + */ + + + _createClass(Colorizer, [{ + key: "setInstanceId", + value: function setInstanceId(instanceId) { + this.instanceId = instanceId; + } + /** + * @param {string} fill + * + * @return {void} + */ + + }, { + key: "setLabelFill", + value: function setLabelFill(fill) { + this.labelFill = fill; + } + /** + * @param {function|Array} scale + * + * @return {void} + */ + + }, { + key: "setScale", + value: function setScale(scale) { + this.scale = scale; + } + /** + * Given a raw data block, return an appropriate color for the block. + * + * @param {string} fill + * @param {Number} index + * @param {string} fillType + * + * @return {Object} + */ + + }, { + key: "getBlockFill", + value: function getBlockFill(fill, index, fillType) { + var raw = this.getBlockRawFill(fill, index); + return { + raw: raw, + actual: this.getBlockActualFill(raw, index, fillType) + }; + } + /** + * Return the raw hex color for the block. + * + * @param {string} fill + * @param {Number} index + * + * @return {string} + */ + + }, { + key: "getBlockRawFill", + value: function getBlockRawFill(fill, index) { + // Use the block's color, if set and valid + if (this.hexExpression.test(fill)) { + return fill; + } // Otherwise, attempt to use the array scale + + + if (Array.isArray(this.scale)) { + return this.scale[index]; + } // Finally, use a functional scale + + + return this.scale(index); + } + /** + * Return the actual background for the block. + * + * @param {string} raw + * @param {Number} index + * @param {string} fillType + * + * @return {string} + */ + + }, { + key: "getBlockActualFill", + value: function getBlockActualFill(raw, index, fillType) { + if (fillType === 'solid') { + return raw; + } + + return "url(#".concat(this.getGradientId(index), ")"); + } + /** + * Return the gradient ID for the given index. + * + * @param {Number} index + * + * @return {string} + */ + + }, { + key: "getGradientId", + value: function getGradientId(index) { + return "".concat(this.instanceId, "-gradient-").concat(index); + } + /** + * Given a raw data block, return an appropriate label color. + * + * @param {string} labelFill + * + * @return {string} + */ + + }, { + key: "getLabelColor", + value: function getLabelColor(labelFill) { + return this.hexExpression.test(labelFill) ? labelFill : this.labelFill; + } + /** + * Shade a color to the given percentage. + * + * @param {string} color A hex color. + * @param {number} shade The shade adjustment. Can be positive or negative. + * + * @return {string} + */ + + }, { + key: "shade", + value: function shade(color, _shade) { + var _this$hexToRgb = this.hexToRgb(color), + R = _this$hexToRgb.R, + G = _this$hexToRgb.G, + B = _this$hexToRgb.B; + + var t = _shade < 0 ? 0 : 255; + var p = _shade < 0 ? _shade * -1 : _shade; + var converted = 0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 + (Math.round((t - G) * p) + G) * 0x100 + (Math.round((t - B) * p) + B); + return "#".concat(converted.toString(16).slice(1)); + } + /** + * Convert a hex color to an RGB object. + * + * @param {string} color + * + * @returns {{R: Number, G: number, B: number}} + */ + + }, { + key: "hexToRgb", + value: function hexToRgb(color) { + var hex = color.slice(1); + + if (hex.length === 3) { + hex = this.expandHex(hex); + } + + var f = parseInt(hex, 16); + /* eslint-disable no-bitwise */ + + var R = f >> 16; + var G = f >> 8 & 0x00FF; + var B = f & 0x0000FF; + /* eslint-enable */ + + return { + R: R, + G: G, + B: B + }; + } + /** + * Expands a three character hex code to six characters. + * + * @param {string} hex + * + * @return {string} + */ + + }, { + key: "expandHex", + value: function expandHex(hex) { + return hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; + } + }]); + + return Colorizer; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Colorizer); + +/***/ }), +/* 144 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Formatter = +/*#__PURE__*/ +function () { + function Formatter() { + _classCallCheck(this, Formatter); + } + + _createClass(Formatter, [{ + key: "getFormatter", + + /** + * Register the format function. + * + * @param {string|function} format + * + * @return {function} + */ + value: function getFormatter(format) { + var _this = this; + + if (typeof format === 'function') { + return format; + } + + return function (label, value, formattedValue) { + return _this.stringFormatter(label, value, formattedValue, format); + }; + } + /** + * Format the given value according to the data point or the format. + * + * @param {string} label + * @param {number} value + * @param {*} formattedValue + * @param {function} formatter + * + * @return string + */ + + }, { + key: "format", + value: function format(_ref, formatter) { + var label = _ref.label, + value = _ref.value, + _ref$formattedValue = _ref.formattedValue, + formattedValue = _ref$formattedValue === void 0 ? null : _ref$formattedValue; + return formatter(label, value, formattedValue); + } + /** + * Format the string according to a simple expression. + * + * {l}: label + * {v}: raw value + * {f}: formatted value + * + * @param {string} label + * @param {number} value + * @param {*} formattedValue + * @param {string} expression + * + * @return {string} + */ + + }, { + key: "stringFormatter", + value: function stringFormatter(label, value, formattedValue, expression) { + var formatted = formattedValue; // Attempt to use supplied formatted value + // Otherwise, use the default + + if (formattedValue === null) { + formatted = this.getDefaultFormattedValue(value); + } + + return expression.split('{l}').join(label).split('{v}').join(value).split('{f}').join(formatted); + } + /** + * @param {number} value + * + * @return {string} + */ + + }, { + key: "getDefaultFormattedValue", + value: function getDefaultFormattedValue(value) { + return value.toLocaleString(); + } + }]); + + return Formatter; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Formatter); + +/***/ }), +/* 145 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Navigator = +/*#__PURE__*/ +function () { + function Navigator() { + _classCallCheck(this, Navigator); + } + + _createClass(Navigator, [{ + key: "plot", + + /** + * Given a list of path commands, returns the compiled description. + * + * @param {Array} commands + * + * @return {string} + */ + value: function plot(commands) { + var path = ''; + commands.forEach(function (command) { + path += "".concat(command[0]).concat(command[1], ",").concat(command[2], " "); + }); + return path.replace(/ +/g, ' ').trim(); + } + /** + * @param {Object} dimensions + * @param {boolean} isValueOverlay + * + * @return {Array} + */ + + }, { + key: "makeCurvedPaths", + value: function makeCurvedPaths(dimensions) { + var isValueOverlay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var points = this.makeBezierPoints(dimensions); + + if (isValueOverlay) { + return this.makeBezierPath(points, dimensions.ratio); + } + + return this.makeBezierPath(points); + } + /** + * @param {Number} centerX + * @param {Number} prevLeftX + * @param {Number} prevRightX + * @param {Number} prevHeight + * @param {Number} nextLeftX + * @param {Number} nextRightX + * @param {Number} nextHeight + * @param {Number} curveHeight + * + * @return {Object} + */ + + }, { + key: "makeBezierPoints", + value: function makeBezierPoints(_ref) { + var centerX = _ref.centerX, + prevLeftX = _ref.prevLeftX, + prevRightX = _ref.prevRightX, + prevHeight = _ref.prevHeight, + nextLeftX = _ref.nextLeftX, + nextRightX = _ref.nextRightX, + nextHeight = _ref.nextHeight, + curveHeight = _ref.curveHeight; + return { + p00: { + x: prevLeftX, + y: prevHeight + }, + p01: { + x: centerX, + y: prevHeight + curveHeight / 2 + }, + p02: { + x: prevRightX, + y: prevHeight + }, + p10: { + x: nextLeftX, + y: nextHeight + }, + p11: { + x: centerX, + y: nextHeight + curveHeight + }, + p12: { + x: nextRightX, + y: nextHeight + } + }; + } + /** + * @param {Object} p00 + * @param {Object} p01 + * @param {Object} p02 + * @param {Object} p10 + * @param {Object} p11 + * @param {Object} p12 + * @param {Number} ratio + * + * @return {Array} + */ + + }, { + key: "makeBezierPath", + value: function makeBezierPath(_ref2) { + var p00 = _ref2.p00, + p01 = _ref2.p01, + p02 = _ref2.p02, + p10 = _ref2.p10, + p11 = _ref2.p11, + p12 = _ref2.p12; + var ratio = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var curve0 = this.getQuadraticBezierCurve(p00, p01, p02, ratio); + var curve1 = this.getQuadraticBezierCurve(p10, p11, p12, ratio); + return [// Top Bezier curve + [curve0.p0.x, curve0.p0.y, 'M'], [curve0.p1.x, curve0.p1.y, 'Q'], [curve0.p2.x, curve0.p2.y, ''], // Right line + [curve1.p2.x, curve1.p2.y, 'L'], // Bottom Bezier curve + [curve1.p2.x, curve1.p2.y, 'M'], [curve1.p1.x, curve1.p1.y, 'Q'], [curve1.p0.x, curve1.p0.y, ''], // Left line + [curve0.p0.x, curve0.p0.y, 'L']]; + } + /** + * @param {Object} p0 + * @param {Object} p1 + * @param {Object} p2 + * @param {Number} t + * + * @return {Object} + */ + + }, { + key: "getQuadraticBezierCurve", + value: function getQuadraticBezierCurve(p0, p1, p2) { + var t = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + // Quadratic Bezier curve syntax: M(P0) Q(P1) P2 + // Where P0, P2 are the curve endpoints and P1 is the control point + // More generally, at 0 <= t <= 1, we have the following: + // Q0(t), which varies linearly from P0 to P1 + // Q1(t), which varies linearly from P1 to P2 + // B(t), which is interpolated linearly between Q0(t) and Q1(t) + // For an intermediate curve at 0 <= t <= 1: + // P1(t) = Q0(t) + // P2(t) = B(t) + return { + p0: p0, + p1: { + x: this.getLinearInterpolation(p0, p1, t, 'x'), + y: this.getLinearInterpolation(p0, p1, t, 'y') + }, + p2: { + x: this.getQuadraticInterpolation(p0, p1, p2, t, 'x'), + y: this.getQuadraticInterpolation(p0, p1, p2, t, 'y') + } + }; + } + /** + * @param {Object} p0 + * @param {Object} p1 + * @param {Number} t + * @param {string} axis + * + * @return {Number} + */ + + }, { + key: "getLinearInterpolation", + value: function getLinearInterpolation(p0, p1, t, axis) { + return p0[axis] + t * (p1[axis] - p0[axis]); + } + /** + * @param {Object} p0 + * @param {Object} p1 + * @param {Object} p2 + * @param {Number} t + * @param {string} axis + * + * @return {Number} + */ + + }, { + key: "getQuadraticInterpolation", + value: function getQuadraticInterpolation(p0, p1, p2, t, axis) { + return Math.pow(1 - t, 2) * p0[axis] + 2 * (1 - t) * t * p1[axis] + Math.pow(t, 2) * p2[axis]; + } + /** + * @param {Number} prevLeftX + * @param {Number} prevRightX + * @param {Number} prevHeight + * @param {Number} nextLeftX + * @param {Number} nextRightX + * @param {Number} nextHeight + * @param {Number} ratio + * @param {boolean} isValueOverlay + * + * @return {Object} + */ + + }, { + key: "makeStraightPaths", + value: function makeStraightPaths(_ref3) { + var prevLeftX = _ref3.prevLeftX, + prevRightX = _ref3.prevRightX, + prevHeight = _ref3.prevHeight, + nextLeftX = _ref3.nextLeftX, + nextRightX = _ref3.nextRightX, + nextHeight = _ref3.nextHeight, + ratio = _ref3.ratio; + var isValueOverlay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (isValueOverlay) { + var lengthTop = prevRightX - prevLeftX; + var lengthBtm = nextRightX - nextLeftX; + var rightSideTop = lengthTop * (ratio || 0) + prevLeftX; + var rightSideBtm = lengthBtm * (ratio || 0) + nextLeftX; // Overlay should not be longer than the max length of the path + + rightSideTop = Math.min(rightSideTop, lengthTop); + rightSideBtm = Math.min(rightSideBtm, lengthBtm); + return [// Start position + [prevLeftX, prevHeight, 'M'], // Move to right + [rightSideTop, prevHeight, 'L'], // Move down + [rightSideBtm, nextHeight, 'L'], // Move to left + [nextLeftX, nextHeight, 'L'], // Wrap back to top + [prevLeftX, prevHeight, 'L']]; + } + + return [// Start position + [prevLeftX, prevHeight, 'M'], // Move to right + [prevRightX, prevHeight, 'L'], // Move down + [nextRightX, nextHeight, 'L'], // Move to left + [nextLeftX, nextHeight, 'L'], // Wrap back to top + [prevLeftX, prevHeight, 'L']]; + } + }]); + + return Navigator; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Navigator); + +/***/ }), +/* 146 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Utils = +/*#__PURE__*/ +function () { + function Utils() { + _classCallCheck(this, Utils); + } + + _createClass(Utils, null, [{ + key: "isExtendableObject", + + /** + * Determine whether the given parameter is an extendable object. + * + * @param {*} a + * + * @return {boolean} + */ + value: function isExtendableObject(a) { + return _typeof(a) === 'object' && a !== null && !Array.isArray(a); + } + /** + * Extends an object with the members of another. + * + * @param {Object} a The object to be extended. + * @param {Object} b The object to clone from. + * + * @return {Object} + */ + + }, { + key: "extend", + value: function extend(a, b) { + var result = {}; // If a is non-trivial, extend the result with it + + if (Object.keys(a).length > 0) { + result = Utils.extend({}, a); + } // Copy over the properties in b into a + + + Object.keys(b).forEach(function (prop) { + if (Utils.isExtendableObject(b[prop])) { + if (Utils.isExtendableObject(a[prop])) { + result[prop] = Utils.extend(a[prop], b[prop]); + } else { + result[prop] = Utils.extend({}, b[prop]); + } + } else { + result[prop] = b[prop]; + } + }); + return result; + } + /** + * Convert the legacy block array to a block object. + * + * @param {Array} block + * + * @returns {Object} + */ + + }, { + key: "convertLegacyBlock", + value: function convertLegacyBlock(block) { + return { + label: block[0], + value: Utils.getRawBlockCount(block), + formattedValue: Array.isArray(block[1]) ? block[1][1] : null, + backgroundColor: block[2], + labelColor: block[3] + }; + } + /** + * Given a raw data block, return its count. + * + * @param {Array} block + * + * @return {Number} + */ + + }, { + key: "getRawBlockCount", + value: function getRawBlockCount(block) { + if (Array.isArray(block)) { + return Array.isArray(block[1]) ? block[1][0] : block[1]; + } + + return block.value; + } + }]); + + return Utils; +}(); + +/* harmony default export */ __webpack_exports__["default"] = (Utils); + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/dist/d3-funnel.min.js b/dist/d3-funnel.min.js index 663a788..c8570b3 100644 --- a/dist/d3-funnel.min.js +++ b/dist/d3-funnel.min.js @@ -1,2 +1,2 @@ -/*! d3-funnel - v1.2.0 | 2018 */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3")):"function"==typeof define&&define.amd?define(["d3"],e):"object"==typeof exports?exports.D3Funnel=e(require("d3")):t.D3Funnel=e(t.d3)}(window,function(n){return function(n){var r={};function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=n,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=18)}([function(t,e,n){"use strict";n.r(e);var r="http://www.w3.org/1999/xhtml",i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o=function(t){var e=t+="",n=e.indexOf(":");return 0<=n&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),i.hasOwnProperty(e)?{space:i[e],local:t}:t},a=function(t){var e=o(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(n){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===r&&t.documentElement.namespaceURI===r?t.createElement(n):t.createElementNS(e,n)}})(e)};function u(){}var h=function(t){return null==t?u:function(){return this.querySelector(t)}};function s(){return[]}var c=function(t){return null==t?s:function(){return this.querySelectorAll(t)}},l=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var f=document.documentElement;if(!f.matches){var p=f.webkitMatchesSelector||f.msMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector;l=function(t){return function(){return p.call(this,t)}}}}var d=l,v=function(t){return new Array(t.length)};function g(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}g.prototype={constructor:g,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function k(t,e,n,r,i,o){for(var a,u=0,s=e.length,l=o.length;u>4*r&15|o()),n=en._time&&(r=n._time),n=(t=n)._next):(e=n._next,n._next=null,n=t?t._next=e:a=e);u=t,P(r)}(),g=0}}function E(){var t=m.now(),e=t-v;dC)throw new Error("too late; already started");return n}function B(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var I=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function D(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function H(){}var z="\\s*([+-]?\\d+)\\s*",F="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",X="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",R=/^#([0-9a-f]{3})$/,q=/^#([0-9a-f]{6})$/,V=new RegExp("^rgb\\("+[z,z,z]+"\\)$"),Y=new RegExp("^rgb\\("+[X,X,X]+"\\)$"),Q=new RegExp("^rgba\\("+[z,z,z,F]+"\\)$"),G=new RegExp("^rgba\\("+[X,X,X,F]+"\\)$"),$=new RegExp("^hsl\\("+[F,X,X]+"\\)$"),W=new RegExp("^hsla\\("+[F,X,X,F]+"\\)$"),U={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};function J(t){var e;return t=(t+"").trim().toLowerCase(),(e=R.exec(t))?new nt((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=q.exec(t))?K(parseInt(e[1],16)):(e=V.exec(t))?new nt(e[1],e[2],e[3],1):(e=Y.exec(t))?new nt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Q.exec(t))?Z(e[1],e[2],e[3],e[4]):(e=G.exec(t))?Z(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$.exec(t))?it(e[1],e[2]/100,e[3]/100,1):(e=W.exec(t))?it(e[1],e[2]/100,e[3]/100,e[4]):U.hasOwnProperty(t)?K(U[t]):"transparent"===t?new nt(NaN,NaN,NaN,0):null}function K(t){return new nt(t>>16&255,t>>8&255,255&t,1)}function Z(t,e,n,r){return r<=0&&(t=e=n=NaN),new nt(t,e,n,r)}function tt(t){return t instanceof H||(t=J(t)),t?new nt((t=t.rgb()).r,t.g,t.b,t.opacity):new nt}function et(t,e,n,r){return 1===arguments.length?tt(t):new nt(t,e,n,null==r?1:r)}function nt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function it(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new at(t,e,n,r)}function ot(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof at)return new at(t.h,t.s,t.l,t.opacity);if(t instanceof H||(t=J(t)),!t)return new at;if(t instanceof at)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(nu&&(i=r.slice(u,i),l[s]?l[s]+=i:l[++s]=i),(e=e[0])===(n=n[0])?l[s]?l[s]+=n:l[++s]=n:(l[++s]=null,c.push({i:s,x:Yt(e,n)})),u=Gt.lastIndex;return uC&&n.state<5,n.state=6,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)})},_.selection.prototype.transition=function(t){var e,n;t instanceof ue?(e=t._id,t=t._name):(e=se(),(n=he).time=b(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o>16,G:n>>8&255,B:255&n}}},{key:"expandHex",value:function(t){return t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}}]),n}();e.default=i},function(t,e){t.exports=n},function(t,e,n){"use strict";t.exports=0},function(t,e,n){"use strict";var i=n(1);t.exports=function(t){if(!t||"string"!=typeof t||t.length<6)return!1;for(var e=i.characters(),n=t.length,r=0;r=i.blocks.length-i.settings.bottomPinch&&(r-=n)});var y=r/t;return this.blocks.forEach(function(t,e){if(i.settings.dynamicHeight&&(l=g*t.ratio,0!==i.settings.minHeight&&(l+=i.settings.minHeight),i.settings.isCurved&&(l-=i.settings.curveHeight/i.blocks.length),p=(f+l)/y,i.settings.isInverted&&(p=(f+l-i.settings.height)/(-1*y)),0===i.settings.bottomWidth&&e===i.blocks.length-1&&(p=i.settings.width/2,i.settings.isInverted&&(p=0)),i.settings.bottomWidth===i.settings.width&&(p=c),!Number.isNaN(p)&&Number.isFinite(p)||(p=0),s=p-c,i.settings.isInverted&&(s=c-p)),i.settings.dynamicSlope&&!i.settings.isInverted){var n=(i.blocks[e+1]?i.blocks[e+1].value:t.value)/t.value;s=(1-n)*(o-c)}0=i.blocks.length-i.settings.bottomPinch&&(s=0)),p=c+s,d=h-s,v=f+l,i.blocks[e].height=l,i.settings.isInverted&&(p=c-s,d=h+s);var r={centerX:o,prevLeftX:c,prevRightX:h,prevHeight:f,nextLeftX:p,nextRightX:d,nextHeight:v,curveHeight:i.settings.curveHeight,ratio:t.ratio};i.settings.isCurved?(a=[].concat(m(a),[i.navigator.makeCurvedPaths(r)]),i.settings.addValueOverlay&&(u=[].concat(m(u),[i.navigator.makeCurvedPaths(r,!0)]))):(a=[].concat(m(a),[i.navigator.makeStraightPaths(r)]),i.settings.addValueOverlay&&(u=[].concat(m(u),[i.navigator.makeStraightPaths(r,!0)]))),c=p,h=d,f=v}),[a,u]}},{key:"getDx",value:function(t){return 00;)i=a.nextValue(),t=Math.floor(i*n.length),e.push(n.splice(t,1)[0]);return e.join("")}())}t.exports={get:function(){return r||u},characters:function(t){return l(t),r},seed:function(t){a.seed(t),i!==t&&(s(),i=t)},lookup:function(t){return c()[t]},shuffled:c}},function(t,n,e){"use strict";t.exports=e(4)},function(t,n,e){t.exports=e(12).default},function(t,n,e){"use strict";var r=e(1),i=e(6),o=e(10),a=e(11)||0;function u(){return i(a)}t.exports=u,t.exports.generate=u,t.exports.seed=function(n){return r.seed(n),t.exports},t.exports.worker=function(n){return a=n,t.exports},t.exports.characters=function(t){return void 0!==t&&r.characters(t),r.shuffled()},t.exports.isValid=o},function(t,n,e){"use strict";var r=1;t.exports={nextValue:function(){return(r=(9301*r+49297)%233280)/233280},seed:function(t){r=t}}},function(t,n,e){"use strict";var r,i,o=e(7),a=(e(1),1459707606518),u=6;t.exports=function(t){var n="",e=Math.floor(.001*(Date.now()-a));return e===i?r++:(r=0,i=e),n+=o(u),n+=o(t),r>0&&(n+=o(r)),n+=o(e)}},function(t,n,e){"use strict";var r=e(1),i=e(8),o=e(9);t.exports=function(t){for(var n,e=0,a="";!n;)a+=o(i,r.get(),1),n=t=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),u.hasOwnProperty(n)?{space:u[n],local:t}:t};var l=function(t){var n=s(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===a&&n.documentElement.namespaceURI===a?n.createElement(t):n.createElementNS(e,t)}})(n)};function c(){}var h=function(t){return null==t?c:function(){return this.querySelector(t)}};function f(){return[]}var p=function(t){return null==t?f:function(){return this.querySelectorAll(t)}},d=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var v=document.documentElement;if(!v.matches){var g=v.webkitMatchesSelector||v.msMatchesSelector||v.mozMatchesSelector||v.oMatchesSelector;d=function(t){return function(){return g.call(this,t)}}}}var y=d,m=function(t){return new Array(t.length)};function w(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}w.prototype={constructor:w,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var b="$";function _(t,n,e,r,i,o){for(var a,u=0,s=n.length,l=o.length;un?1:t>=n?0:NaN}var M=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function A(t,n){return t.style.getPropertyValue(n)||M(t).getComputedStyle(t,null).getPropertyValue(n)}function E(t){return t.trim().split(/^|\s+/)}function N(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=E(t.getAttribute("class")||"")}function S(t,n){for(var e=N(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function O(){this.textContent=""}function L(){this.innerHTML=""}function j(){this.nextSibling&&this.parentNode.appendChild(this)}function B(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function I(){return null}function T(){var t=this.parentNode;t&&t.removeChild(this)}function D(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function H(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var z={},F=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(z={mouseenter:"mouseover",mouseleave:"mouseout"}));function R(t,n,e){return t=X(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function X(t,n,e){return function(r){var i=F;F=r;try{t.call(this,this.__data__,n,e)}finally{F=i}}}function q(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=b&&(b=w+1);!(m=g[b])&&++b=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=x);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):A(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=E(t+"");if(arguments.length<2){for(var r=N(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?V:q,null==e&&(e=!1),r=0;r=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),o=0;o=0&&n._call.call(null,t),n=n._next;--ut}()}finally{ut=0,function(){var t,n,e=it,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:it=n);ot=t,kt(r)}(),ft=0}}function _t(){var t=dt.now(),n=t-ht;n>ct&&(pt-=n,ht=t)}function kt(t){ut||(st&&(st=clearTimeout(st)),t-ft>24?(t<1/0&&(st=setTimeout(bt,t-dt.now()-pt)),lt&&(lt=clearInterval(lt))):(lt||(ht=dt.now(),lt=setInterval(_t,ct)),ut=1,vt(bt)))}mt.prototype=wt.prototype={constructor:mt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?gt():+e)+(null==n?0:+n),this._next||ot===this||(ot?ot._next=this:it=this,ot=this),this._call=t,this._time=e,kt()},stop:function(){this._call&&(this._call=null,this._time=1/0,kt())}};var xt=function(t,n,e){var r=new mt;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},Mt=at("start","end","interrupt"),At=[],Et=0,Nt=1,Pt=2,St=3,Ct=4,Ot=5,Lt=6,jt=function(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,h,f;if(e.state!==Nt)return u();for(l in i)if((f=i[l]).name===e.name){if(f.state===St)return xt(o);f.state===Ct?(f.state=Lt,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+lEt)throw new Error("too late; already scheduled");return e}function It(t,n){var e=Tt(t,n);if(e.state>Pt)throw new Error("too late; already started");return e}function Tt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var Dt=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function Ht(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function zt(){}var Ft="\\s*([+-]?\\d+)\\s*",Rt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qt=/^#([0-9a-f]{3})$/,Vt=/^#([0-9a-f]{6})$/,Yt=new RegExp("^rgb\\("+[Ft,Ft,Ft]+"\\)$"),Qt=new RegExp("^rgb\\("+[Xt,Xt,Xt]+"\\)$"),$t=new RegExp("^rgba\\("+[Ft,Ft,Ft,Rt]+"\\)$"),Gt=new RegExp("^rgba\\("+[Xt,Xt,Xt,Rt]+"\\)$"),Wt=new RegExp("^hsl\\("+[Rt,Xt,Xt]+"\\)$"),Ut=new RegExp("^hsla\\("+[Rt,Xt,Xt,Rt]+"\\)$"),Jt={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};function Kt(t){var n;return t=(t+"").trim().toLowerCase(),(n=qt.exec(t))?new rn((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Vt.exec(t))?Zt(parseInt(n[1],16)):(n=Yt.exec(t))?new rn(n[1],n[2],n[3],1):(n=Qt.exec(t))?new rn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=$t.exec(t))?tn(n[1],n[2],n[3],n[4]):(n=Gt.exec(t))?tn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Wt.exec(t))?an(n[1],n[2]/100,n[3]/100,1):(n=Ut.exec(t))?an(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?Zt(Jt[t]):"transparent"===t?new rn(NaN,NaN,NaN,0):null}function Zt(t){return new rn(t>>16&255,t>>8&255,255&t,1)}function tn(t,n,e,r){return r<=0&&(t=n=e=NaN),new rn(t,n,e,r)}function nn(t){return t instanceof zt||(t=Kt(t)),t?new rn((t=t.rgb()).r,t.g,t.b,t.opacity):new rn}function en(t,n,e,r){return 1===arguments.length?nn(t):new rn(t,n,e,null==r?1:r)}function rn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function an(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new sn(t,n,e,r)}function un(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof zt||(t=Kt(t)),!t)return new sn;if(t instanceof sn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&s<1?0:a,new sn(a,u,s,t.opacity)}(t):new sn(t,n,e,null==r?1:r)}function sn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ln(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Dt(zt,Kt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Dt(rn,en,Ht(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rn(this.r*t,this.g*t,this.b*t,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},hex:function(){return"#"+on(this.r)+on(this.g)+on(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"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===t?")":", "+t+")")}})),Dt(sn,un,Ht(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new sn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new rn(ln(t>=240?t-240:t+120,i,r),ln(t,i,r),ln(t<120?t+240:t-120,i,r),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 cn=Math.PI/180,hn=180/Math.PI,fn=.96422,pn=1,dn=.82521,vn=4/29,gn=6/29,yn=3*gn*gn,mn=gn*gn*gn;function wn(t){if(t instanceof _n)return new _n(t.l,t.a,t.b,t.opacity);if(t instanceof Pn){if(isNaN(t.h))return new _n(t.l,0,0,t.opacity);var n=t.h*cn;return new _n(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof rn||(t=nn(t));var e,r,i=An(t.r),o=An(t.g),a=An(t.b),u=kn((.2225045*i+.7168786*o+.0606169*a)/pn);return i===o&&o===a?e=r=u:(e=kn((.4360747*i+.3850649*o+.1430804*a)/fn),r=kn((.0139322*i+.0971045*o+.7141733*a)/dn)),new _n(116*u-16,500*(e-u),200*(u-r),t.opacity)}function bn(t,n,e,r){return 1===arguments.length?wn(t):new _n(t,n,e,null==r?1:r)}function _n(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function kn(t){return t>mn?Math.pow(t,1/3):t/yn+vn}function xn(t){return t>gn?t*t*t:yn*(t-vn)}function Mn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function An(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function En(t){if(t instanceof Pn)return new Pn(t.h,t.c,t.l,t.opacity);if(t instanceof _n||(t=wn(t)),0===t.a&&0===t.b)return new Pn(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*hn;return new Pn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Nn(t,n,e,r){return 1===arguments.length?En(t):new Pn(t,n,e,null==r?1:r)}function Pn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Dt(_n,bn,Ht(zt,{brighter:function(t){return new _n(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new _n(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new rn(Mn(3.1338561*(n=fn*xn(n))-1.6168667*(t=pn*xn(t))-.4906146*(e=dn*xn(e))),Mn(-.9787684*n+1.9161415*t+.033454*e),Mn(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),Dt(Pn,Nn,Ht(zt,{brighter:function(t){return new Pn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Pn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return wn(this).rgb()}}));var Sn=-.14861,Cn=1.78277,On=-.29227,Ln=-.90649,jn=1.97294,Bn=jn*Ln,In=jn*Cn,Tn=Cn*On-Ln*Sn;function Dn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Hn)return new Hn(t.h,t.s,t.l,t.opacity);t instanceof rn||(t=nn(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Tn*r+Bn*n-In*e)/(Tn+Bn-In),o=r-i,a=(jn*(e-i)-On*o)/Ln,u=Math.sqrt(a*a+o*o)/(jn*i*(1-i)),s=u?Math.atan2(a,o)*hn-120:NaN;return new Hn(s<0?s+360:s,u,i,t.opacity)}(t):new Hn(t,n,e,null==r?1:r)}function Hn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function zn(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}Dt(Hn,Dn,Ht(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*cn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new rn(255*(n+e*(Sn*r+Cn*i)),255*(n+e*(On*r+Ln*i)),255*(n+e*(jn*r)),this.opacity)}}));var Fn=function(t){return function(){return t}};function Rn(t,n){return function(e){return t+e*n}}function Xn(t,n){var e=n-t;return e?Rn(t,e>180||e<-180?e-360*Math.round(e/360):e):Fn(isNaN(t)?n:t)}function qn(t){return 1==(t=+t)?Vn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Fn(isNaN(n)?e:n)}}function Vn(t,n){var e=n-t;return e?Rn(t,e):Fn(isNaN(t)?n:t)}var Yn=function t(n){var e=qn(n);function r(t,n){var r=e((t=en(t)).r,(n=en(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Vn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function Qn(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=ro&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:$n(e,r)})),o=Wn.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:$n(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:$n(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,s),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:$n(t,e)},{i:u-2,x:$n(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var n,e=-1,r=s.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?Bt:It;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var e=s(t),r="transform"===e?ae:he;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var a,u=e(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===u?null:a===r&&u===i?o:o=n(r=a,i=u);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var a,u=e(this);if(null!=u)return(a=this.getAttribute(t))===u?null:a===r&&u===i?o:o=n(r=a,i=u);this.removeAttribute(t)}})(e,r,ce(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}:function(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=s(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?oe:he;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=A(this,t),a=(this.style.removeProperty(t),A(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,o;return function(){var a=A(this,t),u=e(this);return null==u&&(this.style.removeProperty(t),u=A(this,t)),a===u?null:a===r&&u===i?o:o=n(r=a,i=u)}}(t,r,ce(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var o=A(this,t);return o===e?null:o===r?i:i=n(r=o,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ce(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Tt(this.node(),e).tween,o=0,a=i.length;oPt&&e.state>16,G:e>>8&255,B:255&e}}},{key:"expandHex",value:function(t){return t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}}]),t}();function xe(t,n){for(var e=0;e1&&void 0!==arguments[1]&&arguments[1],e=this.makeBezierPoints(t);return n?this.makeBezierPath(e,t.ratio):this.makeBezierPath(e)}},{key:"makeBezierPoints",value:function(t){var n=t.centerX,e=t.prevLeftX,r=t.prevRightX,i=t.prevHeight,o=t.nextLeftX,a=t.nextRightX,u=t.nextHeight,s=t.curveHeight;return{p00:{x:e,y:i},p01:{x:n,y:i+s/2},p02:{x:r,y:i},p10:{x:o,y:u},p11:{x:n,y:u+s},p12:{x:a,y:u}}}},{key:"makeBezierPath",value:function(t){var n=t.p00,e=t.p01,r=t.p02,i=t.p10,o=t.p11,a=t.p12,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,s=this.getQuadraticBezierCurve(n,e,r,u),l=this.getQuadraticBezierCurve(i,o,a,u);return[[s.p0.x,s.p0.y,"M"],[s.p1.x,s.p1.y,"Q"],[s.p2.x,s.p2.y,""],[l.p2.x,l.p2.y,"L"],[l.p2.x,l.p2.y,"M"],[l.p1.x,l.p1.y,"Q"],[l.p0.x,l.p0.y,""],[s.p0.x,s.p0.y,"L"]]}},{key:"getQuadraticBezierCurve",value:function(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return{p0:t,p1:{x:this.getLinearInterpolation(t,n,r,"x"),y:this.getLinearInterpolation(t,n,r,"y")},p2:{x:this.getQuadraticInterpolation(t,n,e,r,"x"),y:this.getQuadraticInterpolation(t,n,e,r,"y")}}}},{key:"getLinearInterpolation",value:function(t,n,e,r){return t[r]+e*(n[r]-t[r])}},{key:"getQuadraticInterpolation",value:function(t,n,e,r,i){return Math.pow(1-r,2)*t[i]+2*(1-r)*r*n[i]+Math.pow(r,2)*e[i]}},{key:"makeStraightPaths",value:function(t){var n=t.prevLeftX,e=t.prevRightX,r=t.prevHeight,i=t.nextLeftX,o=t.nextRightX,a=t.nextHeight,u=t.ratio;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var s=e-n,l=o-i,c=s*(u||0)+n,h=l*(u||0)+i;return[[n,r,"M"],[c=Math.min(c,s),r,"L"],[h=Math.min(h,l),a,"L"],[i,a,"L"],[n,r,"L"]]}return[[n,r,"M"],[e,r,"L"],[o,a,"L"],[i,a,"L"],[n,r,"L"]]}}]),t}();function Ne(t){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pe(t,n){for(var e=0;e0&&(r=t.extend({},n)),Object.keys(e).forEach(function(i){t.isExtendableObject(e[i])?t.isExtendableObject(n[i])?r[i]=t.extend(n[i],e[i]):r[i]=t.extend({},e[i]):r[i]=e[i]}),r}},{key:"convertLegacyBlock",value:function(n){return{label:n[0],value:t.getRawBlockCount(n),formattedValue:Array.isArray(n[1])?n[1][1]:null,backgroundColor:n[2],labelColor:n[3]}}},{key:"getRawBlockCount",value:function(t){return Array.isArray(t)?Array.isArray(t[1])?t[1][0]:t[1]:t.value}}]),t}();function Ce(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n1&&void 0!==arguments[1]?arguments[1]:{};this.destroy(),this.initialize(t,n),this.drawOntoDom()}},{key:"initialize",value:function(t,n){this.validateData(t);var e=this.getSettings(n);this.id="d3-funnel-".concat(i.a.generate()),this.labelFormatter=this.formatter.getFormatter(e.label.format),this.tooltipFormatter=this.formatter.getFormatter(e.tooltip.format),this.colorizer.setInstanceId(this.id),this.colorizer.setLabelFill(e.label.fill),this.colorizer.setScale(e.block.fill.scale),this.settings={width:e.chart.width,height:e.chart.height,bottomWidth:e.chart.width*e.chart.bottomWidth,bottomPinch:e.chart.bottomPinch,isInverted:e.chart.inverted,isCurved:e.chart.curve.enabled,curveHeight:e.chart.curve.height,curveShade:e.chart.curve.shade,addValueOverlay:e.block.barOverlay,animation:e.chart.animate,totalCount:e.chart.totalCount,fillType:e.block.fill.type,hoverEffects:e.block.highlight,dynamicHeight:e.block.dynamicHeight,dynamicSlope:e.block.dynamicSlope,minHeight:e.block.minHeight,label:e.label,tooltip:e.tooltip,onBlockClick:e.events.click.block},this.setBlocks(t)}},{key:"validateData",value:function(t){if(!1===Array.isArray(t))throw new Error("Data must be an array.");if(0===t.length)throw new Error("Data array must contain at least one element.");if("object"!==je(t[0]))throw new Error("Data array elements must be an object.");if(Array.isArray(t[0])&&t[0].length<2||!1===Array.isArray(t[0])&&(void 0===t[0].label||void 0===t[0].value))throw new Error("Data array elements must contain a label and value.")}},{key:"getSettings",value:function(t){var n=this.getContainerDimensions(),e=this.getDefaultSettings(n),r=Se.extend({},e);return(r=Se.extend(r,t)).chart=Le({},r.chart,this.castDimensions(r,n)),r}},{key:"getDefaultSettings",value:function(n){var e=t.defaults;return e.chart=Le({},e.chart,n),e}},{key:"getContainerDimensions",value:function(){var t={width:parseFloat(U(this.container).style("width")),height:parseFloat(U(this.container).style("height"))};return["width","height"].forEach(function(n){0===t[n]&&delete t[n]}),t}},{key:"castDimensions",value:function(n,e){var r=n.chart,i={};return Object.keys(e).forEach(function(n){var o=r[n],a=e[n];/%$/.test(String(o))?i[n]=parseFloat(o)/100*a:i[n]=o<=0?t.defaults.chart[n]:o}),i}},{key:"setBlocks",value:function(t){var n=this.getTotalCount(t);this.blocks=this.standardizeData(t,n)}},{key:"getTotalCount",value:function(t){return null!==this.settings.totalCount?this.settings.totalCount||0:t.reduce(function(t,n){return t+Se.getRawBlockCount(n)},0)}},{key:"standardizeData",value:function(t,n){var e=this;return t.map(function(r,i){var o=Array.isArray(r)?Se.convertLegacyBlock(r):r,a=n>0?o.value/n||0:1/t.length;return{index:i,ratio:a,value:o.value,height:e.settings.height*a,fill:e.colorizer.getBlockFill(o.backgroundColor,i,e.settings.fillType),label:{enabled:!o.hideLabel,raw:o.label,formatted:e.formatter.format(o,e.labelFormatter),color:e.colorizer.getLabelColor(o.labelColor)},tooltip:{enabled:o.enabled,formatted:e.formatter.format(o,e.tooltipFormatter)}}})}},{key:"drawOntoDom",value:function(){this.svg=U(this.container).append("svg").attr("id",this.id).attr("width",this.settings.width).attr("height",this.settings.height);var t=Oe(this.makePaths(),2);this.blockPaths=t[0],this.overlayPaths=t[1],"gradient"===this.settings.fillType&&this.defineColorGradients(this.svg),this.settings.isCurved&&this.drawTopOval(this.svg,this.blockPaths),this.drawBlock(0)}},{key:"makePaths",value:function(){var t=this,n=(this.settings.width-this.settings.bottomWidth)/2,e=this.settings.width/2,r=[],i=[];this.dx=this.getDx(n),this.dy=this.getDy();var o=this.dx,a=this.dy,u=0,s=this.settings.width,l=0;this.settings.isInverted&&(u=n,s=this.settings.width-n);var c=0,h=0,f=0;this.settings.isCurved&&(l=this.settings.curveHeight/2);var p=this.settings.height;0!==this.settings.minHeight&&(p=this.settings.height-this.settings.minHeight*this.blocks.length);var d=this.settings.height;this.settings.bottomPinch>0&&this.blocks.forEach(function(n,e){var r=p*n.ratio;0!==t.settings.minHeight&&(r+=t.settings.minHeight),t.settings.isCurved&&(r+=t.settings.curveHeight/t.blocks.length),t.settings.isInverted?e=t.blocks.length-t.settings.bottomPinch&&(d-=r)});var v=d/n;return this.blocks.forEach(function(n,d){if(t.settings.dynamicHeight&&(a=p*n.ratio,0!==t.settings.minHeight&&(a+=t.settings.minHeight),t.settings.isCurved&&(a-=t.settings.curveHeight/t.blocks.length),c=(l+a)/v,t.settings.isInverted&&(c=(l+a-t.settings.height)/(-1*v)),0===t.settings.bottomWidth&&d===t.blocks.length-1&&(c=t.settings.width/2,t.settings.isInverted&&(c=0)),t.settings.bottomWidth===t.settings.width&&(c=u),!Number.isNaN(c)&&Number.isFinite(c)||(c=0),o=c-u,t.settings.isInverted&&(o=u-c)),t.settings.dynamicSlope&&!t.settings.isInverted){var g=(t.blocks[d+1]?t.blocks[d+1].value:n.value)/n.value;o=(1-g)*(e-u)}t.settings.bottomPinch>0&&(t.settings.isInverted?(t.settings.dynamicHeight||(o=t.dx),o=d=t.blocks.length-t.settings.bottomPinch&&(o=0)),c=u+o,h=s-o,f=l+a,t.blocks[d].height=a,t.settings.isInverted&&(c=u-o,h=s+o);var y={centerX:e,prevLeftX:u,prevRightX:s,prevHeight:l,nextLeftX:c,nextRightX:h,nextHeight:f,curveHeight:t.settings.curveHeight,ratio:n.ratio};t.settings.isCurved?(r=Ce(r).concat([t.navigator.makeCurvedPaths(y)]),t.settings.addValueOverlay&&(i=Ce(i).concat([t.navigator.makeCurvedPaths(y,!0)]))):(r=Ce(r).concat([t.navigator.makeStraightPaths(y)]),t.settings.addValueOverlay&&(i=Ce(i).concat([t.navigator.makeStraightPaths(y,!0)]))),u=c,s=h,l=f}),[r,i]}},{key:"getDx",value:function(t){return this.settings.bottomPinch>0?t/(this.blocks.length-this.settings.bottomPinch):t/this.blocks.length}},{key:"getDy",value:function(){return this.settings.isCurved?(this.settings.height-this.settings.curveHeight)/this.blocks.length:this.settings.height/this.blocks.length}},{key:"defineColorGradients",value:function(t){var n=this,e=t.append("defs");this.blocks.forEach(function(t,r){var i=t.fill.raw,o=n.colorizer.shade(i,-.2),a=e.append("linearGradient").attr("id",n.colorizer.getGradientId(r));[[0,o],[40,i],[60,i],[100,o]].forEach(function(t){a.append("stop").attrs({offset:"".concat(t[0],"%"),style:"stop-color: ".concat(t[1])})})})}},{key:"drawTopOval",value:function(t,n){var e=this.settings.width/2,r=n[0],i=r[1][1]+this.settings.curveHeight/2,o=this.navigator.plot([["M",r[0][0],r[0][1]],["Q",e,i],[" ",r[2][0],r[2][1]],["M",r[2][0],this.settings.curveHeight/2],["Q",e,0],[" ",r[0][0],this.settings.curveHeight/2]]);t.append("path").attr("fill",this.colorizer.shade(this.blocks[0].fill.raw,this.settings.curveShade)).attr("d",o)}},{key:"drawBlock",value:function(t){var n=this;if(t!==this.blocks.length){var e=this.svg.append("g"),r=this.blocks[t],i=this.getBlockPath(e,t);this.attachData(i,r);var a=null,u=r.fill.actual;this.settings.addValueOverlay&&(a=this.getOverlayPath(e,t),this.attachData(a,r),i.node().setAttribute("pathType","background"),a.node().setAttribute("pathType","foreground"),u=this.colorizer.shade(r.fill.raw,.3)),0!==this.settings.animation?i.transition().duration(this.settings.animation).ease(o.easeLinear).attr("fill",u).attr("d",this.getPathDefinition(t)).on("end",function(){n.drawBlock(t+1)}):(i.attr("fill",u).attr("d",this.getPathDefinition(t)),this.drawBlock(t+1)),this.settings.addValueOverlay&&(i.attr("stroke",this.blocks[t].fill.raw),0!==this.settings.animation?a.transition().duration(this.settings.animation).ease(o.easeLinear).attr("fill",r.fill.actual).attr("d",this.getOverlayPathDefinition(t)):a.attr("fill",r.fill.actual).attr("d",this.getOverlayPathDefinition(t))),this.settings.hoverEffects&&[i,a].forEach(function(t){t&&t.on("mouseover",n.onMouseOver).on("mouseout",n.onMouseOut)}),null!==this.settings.onBlockClick&&[i,a].forEach(function(t){t&&t.style("cursor","pointer").on("click",n.settings.onBlockClick)}),this.settings.tooltip.enabled&&[i,a].forEach(function(t){t&&(t.node().addEventListener("mouseout",function(){n.tooltip&&(n.container.removeChild(n.tooltip),n.tooltip=null)}),t.node().addEventListener("mousemove",function(t){n.tooltip||(n.tooltip=document.createElement("div"),n.tooltip.setAttribute("class","d3-funnel-tooltip"),n.container.appendChild(n.tooltip)),n.tooltip.innerText=r.tooltip.formatted;var e=n.tooltip.offsetWidth,i=n.tooltip.offsetHeight+5,o=n.container.getBoundingClientRect().y+window.scrollY,a=t.layerY-i0?this.blocks[n-1].fill.actual:this.blocks[n].fill.actual,t.attr("d",i).attr("fill",o)}},{key:"attachData",value:function(t,n){var e=Le({},n,{node:t.node()});t.data([e])}},{key:"getPathDefinition",value:function(t){var n=[];return this.blockPaths[t].forEach(function(t){n.push([t[2],t[0],t[1]])}),this.navigator.plot(n)}},{key:"getOverlayPathDefinition",value:function(t){var n=[];return this.overlayPaths[t].forEach(function(t){n.push([t[2],t[0],t[1]])}),this.navigator.plot(n)}},{key:"onMouseOver",value:function(t,n,e){var r=this,i=e[0].parentElement.childNodes;[].slice.call(i).forEach(function(n){"path"===n.nodeName.toLowerCase()&&("foreground"===(n.getAttribute("pathType")||"")?U(n).attr("fill",r.colorizer.shade(t.fill.raw,-.5)):U(n).attr("fill",r.colorizer.shade(t.fill.raw,-.2)))})}},{key:"onMouseOut",value:function(t,n,e){var r=this,i=e[0].parentElement.childNodes;[].slice.call(i).forEach(function(n){if("path"===n.nodeName.toLowerCase())if("background"===(n.getAttribute("pathType")||"")){var e=r.colorizer.shade(t.fill.raw,.3);U(n).attr("fill",e)}else U(n).attr("fill",t.fill.actual)})}},{key:"addBlockLabel",value:function(t,n){var e=this.blockPaths[n],r=this.blocks[n].label.formatted,i=this.blocks[n].label.color,o=this.settings.width/2,a=this.getTextY(e),u=t.append("text").attrs({x:o,y:a,fill:i,"font-size":this.settings.label.fontSize,"text-anchor":"middle","dominant-baseline":"middle","pointer-events":"none"});null!==this.settings.label.fontFamily&&u.attr("font-family",this.settings.label.fontFamily),this.addLabelLines(u,r,o)}},{key:"addLabelLines",value:function(t,n,e){var r=n.split("\n"),i=-20*(r.length-1)/2;r.forEach(function(n,r){var o=0===r?i:20;t.append("tspan").attrs({x:e,dy:o}).text(n)})}},{key:"getTextY",value:function(t){var n=this.settings,e=n.isCurved,r=n.curveHeight;return e?(t[2][1]+t[3][1])/2+1.5*r/this.blocks.length:(t[1][1]+t[2][1])/2}}]),t}();Ie(Te,"defaults",{chart:{width:350,height:400,bottomWidth:1/3,bottomPinch:0,inverted:!1,horizontal:!1,animate:0,curve:{enabled:!1,height:20,shade:-.4},totalCount:null},block:{dynamicHeight:!1,dynamicSlope:!1,barOverlay:!1,fill:{scale:Object(o.scaleOrdinal)(o.schemeCategory10).domain(Object(o.range)(0,10)),type:"solid"},minHeight:0,highlight:!1},label:{enabled:!0,fontFamily:null,fontSize:"14px",fill:"#fff",format:"{l}: {f}"},tooltip:{enabled:!1,format:"{l}: {f}"},events:{click:{block:null}}});n.default=Te}])}); \ No newline at end of file diff --git a/package.json b/package.json index 9fc8d4d..bc341a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3-funnel", - "version": "1.2.0", + "version": "1.2.1", "description": "A library for rendering SVG funnel charts using D3.js", "author": "Jake Zatecky", "license": "MIT",