/*! For license information please see dagre-d3.min.js.LICENSE.txt */ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).dagreD3=t()}}((function(){return function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!u&&c)return c(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var s=n[a]={exports:{}};e[a][0].call(s.exports,(function(t){return i(e[a][1][t]||t)}),s,s.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0}e.exports=function(t,e,n,i){var o,a,u,c,f,s,l,h,d,p,v,y,g;if(o=e.y-t.y,u=t.x-e.x,f=e.x*t.y-t.x*e.y,d=o*n.x+u*n.y+f,p=o*i.x+u*i.y+f,0!==d&&0!==p&&r(d,p))return;if(a=i.y-n.y,c=n.x-i.x,s=i.x*n.y-n.x*i.y,l=a*t.x+c*t.y+s,h=a*e.x+c*e.y+s,0!==l&&0!==h&&r(l,h))return;if(0===(v=o*c-a*u))return;return y=Math.abs(v/2),{x:(g=u*s-c*f)<0?(g-y)/v:(g+y)/v,y:(g=a*f-o*s)<0?(g-y)/v:(g+y)/v}}},{}],14:[function(t,e,n){e.exports=function(t,e){return t.intersect(e)}},{}],15:[function(t,e,n){var r=t("./intersect-line");e.exports=function(t,e,n){var i=t.x,o=t.y,a=[],u=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){u=Math.min(u,t.x),c=Math.min(c,t.y)}));for(var f=i-t.width/2-u,s=o-t.height/2-c,l=0;l1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,o=Math.sqrt(r*r+i*i),a=e.x-n.x,u=e.y-n.y,c=Math.sqrt(a*a+u*u);return oMath.abs(a)*f?(u<0&&(f=-f),n=0===u?0:f*a/u,r=f):(a<0&&(c=-c),n=c,r=0===a?0:c*u/a);return{x:i+n,y:o+r}}},{}],17:[function(t,e,n){var r=t("../util");e.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(typeof o){case"function":i.insert(o);break;case"object":i.insert((function(){return o}));break;default:i.html(o)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var a=i.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},{"../util":27}],18:[function(t,e,n){var r=t("./add-text-label"),i=t("./add-html-label"),o=t("./add-svg-label");e.exports=function(t,e,n){var a=e.label,u=t.append("g");"svg"===e.labelType?o(u,e):"string"!=typeof a||"html"===e.labelType?i(u,e):r(u,e);var c,f=u.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-f.height;break;default:c=-f.height/2}return u.attr("transform","translate("+-f.width/2+","+c+")"),u}},{"./add-html-label":17,"./add-svg-label":19,"./add-text-label":20}],19:[function(t,e,n){var r=t("../util");e.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},{"../util":27}],20:[function(t,e,n){var r=t("../util");e.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;ie?1:t>=e?0:NaN}function n(t){var n;return 1===t.length&&(n=t,t=function(t,r){return e(n(t),r)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}var r=n(e),i=r.right,o=r.left;function a(t,e){return[t,e]}function u(t){return null===t?NaN:+t}function c(t,e){var n,r,i=t.length,o=0,a=-1,c=0,f=0;if(null==e)for(;++a1)return f/(o-1)}function f(t,e){var n=c(t,e);return n?Math.sqrt(n):n}function s(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a=n)for(r=i=n;++an&&(r=n),i=n)for(r=i=n;++an&&(r=n),i=0?(o>=g?10:o>=b?5:o>=_?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=g?10:o>=b?5:o>=_?2:1)}function x(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=g?i*=10:o>=b?i*=5:o>=_&&(i*=2),e=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}}function E(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o=n)for(r=n;++on&&(r=n)}else for(;++o=n)for(r=n;++on&&(r=n);return r}function k(t){if(!(i=t.length))return[];for(var e=-1,n=E(t,A),r=new Array(n);++et?1:e>=t?0:NaN},t.deviation=f,t.extent=s,t.histogram=function(){var t=v,e=s,n=w;function r(r){var o,a,u=r.length,c=new Array(u);for(o=0;ol;)h.pop(),--d;var p,v=new Array(d+1);for(o=0;o<=d;++o)(p=v[o]=[]).x0=o>0?h[o-1]:s,p.x1=o=n)for(r=n;++or&&(r=n)}else for(;++o=n)for(r=n;++or&&(r=n);return r},t.mean=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},t.min=E,t.pairs=function(t,e){null==e&&(e=a);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n0)return[t];if((r=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++uMath.abs(t[1]-J[1])?O=!0:j=!0),J=t,S=!0,f(),ot()}function ot(){var t;switch(X=J[0]-Q[0],W=J[1]-Q[1],R){case l:case s:F&&(X=Math.max(G-e,Math.min(H-v,X)),r=e+X,_=v+X),B&&(W=Math.max(V-a,Math.min(K-k,W)),u=a+W,A=k+W);break;case h:F<0?(X=Math.max(G-e,Math.min(H-e,X)),r=e+X,_=v):F>0&&(X=Math.max(G-v,Math.min(H-v,X)),r=e,_=v+X),B<0?(W=Math.max(V-a,Math.min(K-a,W)),u=a+W,A=k):B>0&&(W=Math.max(V-k,Math.min(K-k,W)),u=a,A=k+W);break;case d:F&&(r=Math.max(G,Math.min(H,e-X*F)),_=Math.max(G,Math.min(H,v+X*F))),B&&(u=Math.max(V,Math.min(K,a-W*B)),A=Math.max(V,Math.min(K,k+W*B)))}_0&&(e=r-X),B<0?k=A-W:B>0&&(a=u-W),R=l,nt.attr("cursor",m.selection),ot());break;default:return}f()}function ct(){switch(i.event.keyCode){case 16:$&&(j=O=$=!1,ot());break;case 18:R===d&&(F<0?v=_:F>0&&(e=r),B<0?k=A:B>0&&(a=u),R=h,ot());break;case 32:R===l&&(i.event.altKey?(F&&(v=_-X*F,e=r+X*F),B&&(k=A-W*B,a=u+W*B),R=d):(F<0?v=_:F>0&&(e=r),B<0?k=A:B>0&&(a=u),R=h),nt.attr("cursor",m[L]),ot());break;default:return}f()}}function q(){D(this,arguments).moved()}function U(){D(this,arguments).ended()}function Y(){var e=this.__brush||{selection:null};return e.extent=v(_.apply(this,arguments)),e.dim=t,e}return R.move=function(e,n){e.selection?e.on("start.brush",(function(){D(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){D(this,arguments).end()})).tween("brush",(function(){var e=this,i=e.__brush,o=D(e,arguments),a=i.selection,u=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),c=r.interpolate(a,u);function f(t){i.selection=1===t&&null===u?null:c(t),z.call(e),o.brush()}return null!==a&&null!==u?f:f(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),u=D(e,r).beforestart();o.interrupt(e),i.selection=null===a?null:a,z.call(e),u.start().brush().end()}))},R.clear=function(t){R.move(t,null)},F.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){i.customEvent(new u(R,e,t.output(this.state.selection)),I.apply,I,[e,this.that,this.args])}},R.extent=function(t){return arguments.length?(_="function"==typeof t?t:a(v(t)),R):_},R.filter=function(t){return arguments.length?(C="function"==typeof t?t:a(!!t),R):C},R.touchable=function(t){return arguments.length?(O="function"==typeof t?t:a(!!t),R):O},R.handleSize=function(t){return arguments.length?(L=+t,R):L},R.keyModifiers=function(t){return arguments.length?(P=!!t,R):P},R.on=function(){var t=I.on.apply(I,arguments);return t===I?R:t},R}t.brush=function(){return C(_)},t.brushSelection=function(t){var e=t.__brush;return e?e.dim.output(e.selection):null},t.brushX=function(){return C(g)},t.brushY=function(){return C(b)},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-dispatch":36,"d3-drag":37,"d3-interpolate":45,"d3-selection":52,"d3-transition":57}],32:[function(t,e,n){!function(r,i){"object"==typeof n&&void 0!==e?i(n,t("d3-array"),t("d3-path")):i(r.d3=r.d3||{},r.d3,r.d3)}(this,(function(t,e,n){"use strict";var r=Math.cos,i=Math.sin,o=Math.PI,a=o/2,u=2*o,c=Math.max;function f(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var s=Array.prototype.slice;function l(t){return function(){return t}}function h(t){return t.source}function d(t){return t.target}function p(t){return t.radius}function v(t){return t.startAngle}function y(t){return t.endAngle}t.chord=function(){var t=0,n=null,r=null,i=null;function o(o){var a,f,s,l,h,d,p=o.length,v=[],y=e.range(p),g=[],b=[],_=b.groups=new Array(p),m=new Array(p*p);for(a=0,h=-1;++h=c.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,f,l,h=-1,d=n.length,p=c[i++],v=r(),y=o();++hc.length)return t;var r,i=f[n-1];return null!=e&&n>=c.length?r=t.entries():(r=[],t.each((function(t,e){r.push({key:e,values:l(t,n)})}))),null!=i?r.sort((function(t,e){return i(t.key,e.key)})):r}return n={object:function(t){return s(t,0,i,o)},map:function(t){return s(t,0,a,u)},entries:function(t){return l(s(t,0,a,u),0)},key:function(t){return c.push(t),n},sortKeys:function(t){return f[c.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}},t.set=s,t.map=r,t.keys=function(t){var e=[];for(var n in t)e.push(n);return e},t.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},t.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},Object.defineProperty(t,"__esModule",{value:!0})}))},{}],34:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function n(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function r(){}var i=.7,o=1/i,a="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f=/^#([0-9a-f]{3,8})$/,s=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),l=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,u]+"\\)$"),d=new RegExp("^rgba\\("+[c,c,c,u]+"\\)$"),p=new RegExp("^hsl\\("+[u,c,c]+"\\)$"),v=new RegExp("^hsla\\("+[u,c,c,u]+"\\)$"),y={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 g(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?m(e):3===n?new E(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new E(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new E(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s.exec(t))?new E(e[1],e[2],e[3],1):(e=l.exec(t))?new E(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=h.exec(t))?x(e[1],e[2],e[3],e[4]):(e=d.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?j(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?j(e[1],e[2]/100,e[3]/100,e[4]):y.hasOwnProperty(t)?m(y[t]):"transparent"===t?new E(NaN,NaN,NaN,0):null}function m(t){return new E(t>>16&255,t>>8&255,255&t,1)}function x(t,e,n,r){return r<=0&&(t=e=n=NaN),new E(t,e,n,r)}function w(t){return t instanceof r||(t=_(t)),t?new E((t=t.rgb()).r,t.g,t.b,t.opacity):new E}function M(t,e,n,r){return 1===arguments.length?w(t):new E(t,e,n,null==r?1:r)}function E(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function k(){return"#"+S(this.r)+S(this.g)+S(this.b)}function A(){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+")")}function S(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function j(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new C(t,e,n,r)}function N(t){if(t instanceof C)return new C(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=_(t)),!t)return new C;if(t instanceof C)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,o=Math.min(e,n,i),a=Math.max(e,n,i),u=NaN,c=a-o,f=(a+o)/2;return c?(u=e===a?(n-i)/c+6*(n0&&f<1?0:u,new C(u,c,f,t.opacity)}function T(t,e,n,r){return 1===arguments.length?N(t):new C(t,e,n,null==r?1:r)}function C(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function O(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e(r,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return N(this).formatHsl()},formatRgb:b,toString:b}),e(E,M,n(r,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new E(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:A,toString:A})),e(C,T,n(r,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new C(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new C(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 E(O(t>=240?t-240:t+120,i,r),O(t,i,r),O(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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var P=Math.PI/180,I=180/Math.PI,L=.96422,R=.82521,z=4/29,D=6/29,F=3*D*D;function B(t){if(t instanceof U)return new U(t.l,t.a,t.b,t.opacity);if(t instanceof W)return $(t);t instanceof E||(t=w(t));var e,n,r=H(t.r),i=H(t.g),o=H(t.b),a=Y((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=Y((.4360747*r+.3850649*i+.1430804*o)/L),n=Y((.0139322*r+.0971045*i+.7141733*o)/R)),new U(116*a-16,500*(e-a),200*(a-n),t.opacity)}function q(t,e,n,r){return 1===arguments.length?B(t):new U(t,e,n,null==r?1:r)}function U(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Y(t){return t>.008856451679035631?Math.pow(t,1/3):t/F+z}function G(t){return t>D?t*t*t:F*(t-z)}function V(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function H(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function K(t){if(t instanceof W)return new W(t.h,t.c,t.l,t.opacity);if(t instanceof U||(t=B(t)),0===t.a&&0===t.b)return new W(NaN,0r!=p>r&&n<(d-s)*(r-l)/(p-l)+s&&(i=-i)}return i}function u(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}function c(){}var f=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function s(){var t=1,a=1,u=e.thresholdSturges,s=p;function l(t){var n=u(t);if(Array.isArray(n))n=n.slice().sort(r);else{var i=e.extent(t),o=i[0],a=i[1];n=e.tickStep(o,a,n),n=e.range(Math.floor(o/n)*n,Math.floor(a/n)*n,n)}return n.map((function(e){return h(t,e)}))}function h(e,n){var r=[],i=[];return function(e,n,r){var i,o,u,c,s,l,h=new Array,p=new Array;i=o=-1,c=e[0]>=n,f[c<<1].forEach(v);for(;++i=n,f[u|c<<1].forEach(v);f[c<<0].forEach(v);for(;++o=n,s=e[o*t]>=n,f[c<<1|s<<2].forEach(v);++i=n,l=s,s=e[o*t+i+1]>=n,f[u|c<<1|s<<2|l<<3].forEach(v);f[c|s<<3].forEach(v)}i=-1,s=e[o*t]>=n,f[s<<2].forEach(v);for(;++i=n,f[s<<2|l<<3].forEach(v);function v(t){var e,n,a=[t[0][0]+i,t[0][1]+o],u=[t[1][0]+i,t[1][1]+o],c=d(a),f=d(u);(e=p[c])?(n=h[f])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(u),r(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(u),p[e.end=f]=e):(e=h[f])?(n=p[c])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(u),r(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(a),h[e.start=c]=e):h[c]=p[f]={start:c,end:f,ring:[a,u]}}f[s<<3].forEach(v)}(e,n,(function(t){s(t,e,n),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?r.push([t]):i.push(t)})),i.forEach((function(t){for(var e,n=0,i=r.length;n0&&o0&&u0&&r>0))throw new Error("invalid size");return t=n,a=r,l},l.thresholds=function(t){return arguments.length?(u="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),l):u},l.smooth=function(t){return arguments.length?(s=t?p:c,l):s===p},l}function l(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(c-=t.data[u-o+a*r]),e.data[u-n+a*r]=c/Math.min(u+1,r-1+o-u,o))}function h(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(c-=t.data[a+(u-o)*r]),e.data[a+(u-n)*r]=c/Math.min(u+1,i-1+o-u,o))}function d(t){return t[0]}function p(t){return t[1]}function v(){return 1}t.contours=s,t.contourDensity=function(){var t=d,r=p,o=v,a=960,u=500,c=20,f=2,y=3*c,g=a+2*y>>f,b=u+2*y>>f,_=i(20);function m(n){var i=new Float32Array(g*b),a=new Float32Array(g*b);n.forEach((function(e,n,a){var u=+t(e,n,a)+y>>f,c=+r(e,n,a)+y>>f,s=+o(e,n,a);u>=0&&u=0&&c>f),h({width:g,height:b,data:a},{width:g,height:b,data:i},c>>f),l({width:g,height:b,data:i},{width:g,height:b,data:a},c>>f),h({width:g,height:b,data:a},{width:g,height:b,data:i},c>>f),l({width:g,height:b,data:i},{width:g,height:b,data:a},c>>f),h({width:g,height:b,data:a},{width:g,height:b,data:i},c>>f);var u=_(i);if(!Array.isArray(u)){var d=e.max(i);u=e.tickStep(0,d,u),(u=e.range(0,Math.floor(d/u)*u,u)).shift()}return s().thresholds(u).size([g,b])(i).map(x)}function x(t){return t.value*=Math.pow(2,-2*f),t.coordinates.forEach(w),t}function w(t){t.forEach(M)}function M(t){t.forEach(E)}function E(t){t[0]=t[0]*Math.pow(2,f)-y,t[1]=t[1]*Math.pow(2,f)-y}function k(){return g=a+2*(y=3*c)>>f,b=u+2*y>>f,m}return m.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),m):t},m.y=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),m):r},m.weight=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),m):o},m.size=function(t){if(!arguments.length)return[a,u];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return a=e,u=n,k()},m.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return f=Math.floor(Math.log(t)/Math.LN2),k()},m.thresholds=function(t){return arguments.length?(_="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),m):_},m.bandwidth=function(t){if(!arguments.length)return Math.sqrt(c*(c+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return c=Math.round((Math.sqrt(4*t*t+1)-1)/2),k()},m},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":29}],36:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e={value:function(){}};function n(){for(var t,e=0,n=arguments.length,i={};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}}))}function o(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;oM}m.mouse("drag")}function S(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),a(n.event.view,p),i(),m.mouse("end")}function j(){if(y.apply(this,arguments)){var t,e,i=n.event.changedTouches,o=g.apply(this,arguments),a=i.length;for(t=0;t9999?"+"+o(e,6):o(e,4))+"-"+o(t.getUTCMonth()+1,2)+"-"+o(t.getUTCDate(),2)+(a?"T"+o(n,2)+":"+o(r,2)+":"+o(i,2)+"."+o(a,3)+"Z":i?"T"+o(n,2)+":"+o(r,2)+":"+o(i,2)+"Z":r||n?"T"+o(n,2)+":"+o(r,2)+"Z":"")}function u(t){var o=new RegExp('["'+t+"\n\r]"),u=t.charCodeAt(0);function c(t,r){var i,o=[],a=t.length,c=0,f=0,s=a<=0,l=!1;function h(){if(s)return n;if(l)return l=!1,e;var r,i,o=c;if(34===t.charCodeAt(o)){for(;c++=a?s=!0:10===(i=t.charCodeAt(c++))?l=!0:13===i&&(l=!0,10===t.charCodeAt(c)&&++c),t.slice(o+1,r-1).replace(/""/g,'"')}for(;ch+f||rd+f||os.index){var l=h-u.x-u.vx,y=d-u.y-u.vy,g=l*l+y*y;gt.r&&(t.r=t[e].r)}function h(){if(n){var e,i,o=n.length;for(r=new Array(o),e=0;e=f)){(t.data!==n||t.next)&&(0===l&&(p+=(l=a())*l),0===h&&(p+=(h=a())*h),p1?(null==n?s.remove(t):s.set(t,g(n)),e):s.get(t)},find:function(e,n,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(h.on(t,n),e):h.on(t)}}},t.forceX=function(t){var e,n,r,i=o(.1);function a(t){for(var i,o=0,a=e.length;o1?r[0]+r.slice(2):r,+t.slice(n+1)]}function n(t){return(t=e(Math.abs(t)))?t[1]:NaN}var r,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e;return new a({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function u(t,n){var r=e(t,n);if(!r)return t+"";var i=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}o.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return u(100*t,e)},r:u,s:function(t,n){var i=e(t,n);if(!i)return t+"";var o=i[0],a=i[1],u=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,c=o.length;return u===c?o:u>c?o+new Array(u-c+1).join("0"):u>0?o.slice(0,u)+"."+o.slice(u):"0."+new Array(1-u).join("0")+e(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function f(t){return t}var s,l=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function d(t){var e,i,a=void 0===t.grouping||void 0===t.thousands?f:(e=l.call(t.grouping,Number),i=t.thousands+"",function(t,n){for(var r=t.length,o=[],a=0,u=e[0],c=0;r>0&&u>0&&(c+u+1>n&&(u=Math.max(1,n-c)),o.push(t.substring(r-=u,r+u)),!((c+=u+1)>n));)u=e[a=(a+1)%e.length];return o.reverse().join(i)}),u=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?f:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(l.call(t.numerals,String)),v=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",g=void 0===t.nan?"NaN":t.nan+"";function b(t){var e=(t=o(t)).fill,n=t.align,i=t.sign,f=t.symbol,l=t.zero,b=t.width,_=t.comma,m=t.precision,x=t.trim,w=t.type;"n"===w?(_=!0,w="g"):c[w]||(void 0===m&&(m=12),x=!0,w="g"),(l||"0"===e&&"="===n)&&(l=!0,e="0",n="=");var M="$"===f?u:"#"===f&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E="$"===f?s:/[%p]/.test(w)?v:"",k=c[w],A=/[defgprs%]/.test(w);function S(t){var o,u,c,f=M,s=E;if("c"===w)s=k(t)+s,t="";else{var v=(t=+t)<0;if(t=isNaN(t)?g:k(Math.abs(t),m),x&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),v&&0==+t&&(v=!1),f=(v?"("===i?i:y:"-"===i||"("===i?"":i)+f,s=("s"===w?h[8+r/3]:"")+s+(v&&"("===i?")":""),A)for(o=-1,u=t.length;++o(c=t.charCodeAt(o))||c>57){s=(46===c?d+t.slice(o+1):t.slice(o))+s,t=t.slice(0,o);break}}_&&!l&&(t=a(t,1/0));var S=f.length+t.length+s.length,j=S>1)+f+t+s+j.slice(S);break;default:t=j+f+t+s}return p(t)}return m=void 0===m?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return t+""},S}return{format:b,formatPrefix:function(t,e){var r=b(((t=o(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(n(e)/3))),a=Math.pow(10,-i),u=h[8+i/3];return function(t){return r(a*t)+u}}}}function p(e){return s=d(e),t.format=s.format,t.formatPrefix=s.formatPrefix,s}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t.FormatSpecifier=a,t.formatDefaultLocale=p,t.formatLocale=d,t.formatSpecifier=o,t.precisionFixed=function(t){return Math.max(0,-n(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(e)/3)))-n(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,n(e)-n(t))+1},Object.defineProperty(t,"__esModule",{value:!0})}))},{}],43:[function(t,e,n){!function(r,i){"object"==typeof n&&void 0!==e?i(n,t("d3-array")):i((r=r||self).d3=r.d3||{},r.d3)}(this,(function(t,e){"use strict";function n(){return new r}function r(){this.reset()}r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){o(i,t,this.t),o(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new r;function o(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var a=1e-6,u=1e-12,c=Math.PI,f=c/2,s=c/4,l=2*c,h=180/c,d=c/180,p=Math.abs,v=Math.atan,y=Math.atan2,g=Math.cos,b=Math.ceil,_=Math.exp,m=Math.log,x=Math.pow,w=Math.sin,M=Math.sign||function(t){return t>0?1:t<0?-1:0},E=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?c:Math.acos(t)}function S(t){return t>1?f:t<-1?-f:Math.asin(t)}function j(t){return(t=w(t/2))*t}function N(){}function T(t,e){t&&O.hasOwnProperty(t.type)&&O[t.type](t,e)}var C={Feature:function(t,e){T(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=g(e=(e*=d)/2+s),a=w(e),u=B*a,c=F*o+u*g(i),f=u*r*w(i);q.add(y(f,c)),D=t,F=o,B=a}function X(t){return[y(t[1],t[0]),S(t[2])]}function W(t){var e=t[0],n=t[1],r=g(n);return[r*g(e),r*w(e),w(n)]}function $(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Z(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Q(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function J(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function tt(t){var e=E(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var et,nt,rt,it,ot,at,ut,ct,ft,st,lt,ht,dt,pt,vt,yt,gt,bt,_t,mt,xt,wt,Mt,Et,kt,At,St=n(),jt={point:Nt,lineStart:Ct,lineEnd:Ot,polygonStart:function(){jt.point=Pt,jt.lineStart=It,jt.lineEnd=Lt,St.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),jt.point=Nt,jt.lineStart=Ct,jt.lineEnd=Ot,q<0?(et=-(rt=180),nt=-(it=90)):St>a?it=90:St<-a&&(nt=-90),st[0]=et,st[1]=rt},sphere:function(){et=-(rt=180),nt=-(it=90)}};function Nt(t,e){ft.push(st=[et=t,rt=t]),eit&&(it=e)}function Tt(t,e){var n=W([t*d,e*d]);if(ct){var r=Z(ct,n),i=Z([r[1],-r[0],0],r);tt(i),i=X(i);var o,a=t-ot,u=a>0?1:-1,c=i[0]*h*u,f=p(a)>180;f^(u*otit&&(it=o):f^(u*ot<(c=(c+360)%360-180)&&cit&&(it=e)),f?tRt(et,rt)&&(rt=t):Rt(t,rt)>Rt(et,rt)&&(et=t):rt>=et?(trt&&(rt=t)):t>ot?Rt(et,t)>Rt(et,rt)&&(rt=t):Rt(t,rt)>Rt(et,rt)&&(et=t)}else ft.push(st=[et=t,rt=t]);eit&&(it=e),ct=n,ot=t}function Ct(){jt.point=Tt}function Ot(){st[0]=et,st[1]=rt,jt.point=Nt,ct=null}function Pt(t,e){if(ct){var n=t-ot;St.add(p(n)>180?n+(n>0?360:-360):n)}else at=t,ut=e;Y.point(t,e),Tt(t,e)}function It(){Y.lineStart()}function Lt(){Pt(at,ut),Y.lineEnd(),p(St)>a&&(et=-(rt=180)),st[0]=et,st[1]=rt,ct=null}function Rt(t,e){return(e-=t)<0?e+360:e}function zt(t,e){return t[0]-e[0]}function Dt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ec?t+Math.round(-t/l)*l:t,e]}function Jt(t,e,n){return(t%=l)?e||n?Zt(ee(t),ne(e,n)):ee(t):e||n?ne(e,n):Qt}function te(t){return function(e,n){return[(e+=t)>c?e-l:e<-c?e+l:e,n]}}function ee(t){var e=te(t);return e.invert=te(-t),e}function ne(t,e){var n=g(t),r=w(t),i=g(e),o=w(e);function a(t,e){var a=g(e),u=g(t)*a,c=w(t)*a,f=w(e),s=f*n+u*r;return[y(c*i-s*o,u*n-f*r),S(s*i+c*o)]}return a.invert=function(t,e){var a=g(e),u=g(t)*a,c=w(t)*a,f=w(e),s=f*i-c*o;return[y(c*i+f*o,u*n+s*r),S(s*n-u*r)]},a}function re(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=h,e[1]*=h,e}return t=Jt(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=h,e[1]*=h,e},e}function ie(t,e,n,r,i,o){if(n){var a=g(e),u=w(e),c=r*n;null==i?(i=e+r*l,o=e-c/2):(i=oe(a,i),o=oe(a,o),(r>0?io)&&(i+=r*l));for(var f,s=i;r>0?s>o:s1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ue(t,e){return p(t[0]-e[0])=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function se(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,I=P*O,L=I>c,R=M*T;if(le.add(y(R*P*w(I),E*C+R*g(I))),u+=L?O+P*l:O,L^m>=n^j>=n){var z=Z(W(_),W(A));tt(z);var D=Z(o,z);tt(D);var F=(L^O>=0?-1:1)*S(D[2]);(r>F||r===F&&(z[0]||z[1]))&&(h+=L^O>=0?1:-1)}}return(u<-a||u0){for(h||(o.polygonStart(),h=!0),o.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),u.push(f.filter(ve))}return d}}function ve(t){return t.length>1}function ye(t,e){return((t=t.x)[0]<0?t[1]-f-a:f-t[1])-((e=e.x)[0]<0?e[1]-f-a:f-e[1])}var ge=pe((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,u){var s=o>0?c:-c,l=p(o-n);p(l-c)0?f:-f),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(o,r),e=0):i!==s&&l>=c&&(p(n-i)a?v((w(e)*(o=g(r))*w(n)-w(r)*(i=g(e))*w(t))/(i*o*u)):(e+r)/2}(n,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=o,r=u),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*f,r.point(-c,i),r.point(0,i),r.point(c,i),r.point(c,0),r.point(c,-i),r.point(0,-i),r.point(-c,-i),r.point(-c,0),r.point(-c,i);else if(p(t[0]-e[0])>a){var o=t[0]0,i=p(e)>a;function o(t,n){return g(t)*g(n)>e}function u(t,n,r){var i=[1,0,0],o=Z(W(t),W(n)),u=$(o,o),f=o[0],s=u-f*f;if(!s)return!r&&t;var l=e*u/s,h=-e*f/s,d=Z(i,o),v=J(i,l);Q(v,J(o,h));var y=d,g=$(v,y),b=$(y,y),_=g*g-b*($(v,v)-1);if(!(_<0)){var m=E(_),x=J(y,(-g-m)/b);if(Q(x,v),x=X(x),!r)return x;var w,M=t[0],k=n[0],A=t[1],S=n[1];k0^x[1]<(p(x[0]-M)c^(M<=x[0]&&x[0]<=k)){var T=J(y,(-g+m)/b);return Q(T,v),[x,X(T)]}}}function f(e,n){var i=r?t:c-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return pe(o,(function(t){var e,n,s,l,h;return{lineStart:function(){l=s=!1,h=1},point:function(d,p){var v,y=[d,p],g=o(d,p),b=r?g?0:f(d,p):g?f(d+(d<0?c:-c),p):0;if(!e&&(l=s=g)&&t.lineStart(),g!==s&&(!(v=u(e,y))||ue(e,v)||ue(y,v))&&(y[0]+=a,y[1]+=a,g=o(y[0],y[1])),g!==s)h=0,g?(t.lineStart(),v=u(y,e),t.point(v[0],v[1])):(v=u(e,y),t.point(v[0],v[1]),t.lineEnd()),e=v;else if(i&&e&&r^g){var _;b&n||!(_=u(y,e,!0))||(h=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!g||e&&ue(e,y)||t.point(y[0],y[1]),e=y,s=g,n=b},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return h|(l&&s)<<1}}}),(function(e,r,i,o){ie(o,t,n,i,e,r)}),r?[0,-t]:[-c,t-c])}var _e=1e9,me=-_e;function xe(t,n,r,i){function o(e,o){return t<=e&&e<=r&&n<=o&&o<=i}function u(e,o,a,u){var f=0,l=0;if(null==e||(f=c(e,a))!==(l=c(o,a))||s(e,o)<0^a>0)do{u.point(0===f||3===f?t:r,f>1?i:n)}while((f=(f+a+4)%4)!==l);else u.point(o[0],o[1])}function c(e,i){return p(e[0]-t)0?0:3:p(e[0]-r)0?2:1:p(e[1]-n)0?1:0:i>0?3:2}function f(t,e){return s(t.x,e.x)}function s(t,e){var n=c(t,1),r=c(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var c,s,l,h,d,p,v,y,g,b,_,m=a,x=ae(),w={point:M,lineStart:function(){w.point=E,s&&s.push(l=[]);b=!0,g=!1,v=y=NaN},lineEnd:function(){c&&(E(h,d),p&&g&&x.rejoin(),c.push(x.result()));w.point=M,g&&m.lineEnd()},polygonStart:function(){m=x,c=[],s=[],_=!0},polygonEnd:function(){var n=function(){for(var e=0,n=0,r=s.length;ni&&(h-o)*(i-a)>(d-a)*(t-o)&&++e:d<=i&&(h-o)*(i-a)<(d-a)*(t-o)&&--e;return e}(),r=_&&n,o=(c=e.merge(c)).length;(r||o)&&(a.polygonStart(),r&&(a.lineStart(),u(null,null,1,a),a.lineEnd()),o&&fe(c,f,n,u,a),a.polygonEnd());m=a,c=s=l=null}};function M(t,e){o(t,e)&&m.point(t,e)}function E(e,a){var u=o(e,a);if(s&&l.push([e,a]),b)h=e,d=a,p=u,b=!1,u&&(m.lineStart(),m.point(e,a));else if(u&&g)m.point(e,a);else{var c=[v=Math.max(me,Math.min(_e,v)),y=Math.max(me,Math.min(_e,y))],f=[e=Math.max(me,Math.min(_e,e)),a=Math.max(me,Math.min(_e,a))];!function(t,e,n,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=e[0]-u,h=e[1]-c;if(a=n-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a0)){if(a/=h,h<0){if(a0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(e[0]=u+s*l,e[1]=c+s*h),!0}}}}}(c,f,t,n,r,i)?u&&(m.lineStart(),m.point(e,a),_=!1):(g||(m.lineStart(),m.point(c[0],c[1])),m.point(f[0],f[1]),u||m.lineEnd(),_=!1)}v=e,y=a,g=u}return w}}var we,Me,Ee,ke=n(),Ae={sphere:N,point:N,lineStart:function(){Ae.point=je,Ae.lineEnd=Se},lineEnd:N,polygonStart:N,polygonEnd:N};function Se(){Ae.point=Ae.lineEnd=N}function je(t,e){we=t*=d,Me=w(e*=d),Ee=g(e),Ae.point=Ne}function Ne(t,e){t*=d;var n=w(e*=d),r=g(e),i=p(t-we),o=g(i),a=r*w(i),u=Ee*n-Me*r*o,c=Me*n+Ee*r*o;ke.add(y(E(a*a+u*u),c)),we=t,Me=n,Ee=r}function Te(t){return ke.reset(),L(t,Ae),+ke}var Ce=[null,null],Oe={type:"LineString",coordinates:Ce};function Pe(t,e){return Ce[0]=t,Ce[1]=e,Te(Oe)}var Ie={Feature:function(t,e){return Re(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Pe(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))a})).map(s)).concat(e.range(b(u/y)*y,o,y).filter((function(t){return p(t%_)>a})).map(l))}return x.lines=function(){return w().map((function(t){return{type:"LineString",coordinates:t}}))},x.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(c).slice(1),h(r).reverse().slice(1),d(f).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.extentMajor(t).extentMinor(t):x.extentMinor()},x.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],f=+t[0][1],c=+t[1][1],i>r&&(t=i,i=r,r=t),f>c&&(t=f,f=c,c=t),x.precision(m)):[[i,f],[r,c]]},x.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),u>o&&(e=u,u=o,o=e),x.precision(m)):[[n,u],[t,o]]},x.step=function(t){return arguments.length?x.stepMajor(t).stepMinor(t):x.stepMinor()},x.stepMajor=function(t){return arguments.length?(g=+t[0],_=+t[1],x):[g,_]},x.stepMinor=function(t){return arguments.length?(v=+t[0],y=+t[1],x):[v,y]},x.precision=function(e){return arguments.length?(m=+e,s=Ue(u,o,90),l=Ye(n,t,m),h=Ue(f,c,90),d=Ye(i,r,m),x):m},x.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Ve(t){return t}var He,Ke,Xe,We,$e=n(),Ze=n(),Qe={point:N,lineStart:N,lineEnd:N,polygonStart:function(){Qe.lineStart=Je,Qe.lineEnd=nn},polygonEnd:function(){Qe.lineStart=Qe.lineEnd=Qe.point=N,$e.add(p(Ze)),Ze.reset()},result:function(){var t=$e/2;return $e.reset(),t}};function Je(){Qe.point=tn}function tn(t,e){Qe.point=en,He=Xe=t,Ke=We=e}function en(t,e){Ze.add(We*t-Xe*e),Xe=t,We=e}function nn(){en(He,Ke)}var rn=1/0,on=rn,an=-rn,un=an,cn={point:function(t,e){tan&&(an=t);eun&&(un=e)},lineStart:N,lineEnd:N,polygonStart:N,polygonEnd:N,result:function(){var t=[[rn,on],[an,un]];return an=un=-(on=rn=1/0),t}};var fn,sn,ln,hn,dn=0,pn=0,vn=0,yn=0,gn=0,bn=0,_n=0,mn=0,xn=0,wn={point:Mn,lineStart:En,lineEnd:Sn,polygonStart:function(){wn.lineStart=jn,wn.lineEnd=Nn},polygonEnd:function(){wn.point=Mn,wn.lineStart=En,wn.lineEnd=Sn},result:function(){var t=xn?[_n/xn,mn/xn]:bn?[yn/bn,gn/bn]:vn?[dn/vn,pn/vn]:[NaN,NaN];return dn=pn=vn=yn=gn=bn=_n=mn=xn=0,t}};function Mn(t,e){dn+=t,pn+=e,++vn}function En(){wn.point=kn}function kn(t,e){wn.point=An,Mn(ln=t,hn=e)}function An(t,e){var n=t-ln,r=e-hn,i=E(n*n+r*r);yn+=i*(ln+t)/2,gn+=i*(hn+e)/2,bn+=i,Mn(ln=t,hn=e)}function Sn(){wn.point=Mn}function jn(){wn.point=Tn}function Nn(){Cn(fn,sn)}function Tn(t,e){wn.point=Cn,Mn(fn=ln=t,sn=hn=e)}function Cn(t,e){var n=t-ln,r=e-hn,i=E(n*n+r*r);yn+=i*(ln+t)/2,gn+=i*(hn+e)/2,bn+=i,_n+=(i=hn*t-ln*e)*(ln+t),mn+=i*(hn+e),xn+=3*i,Mn(ln=t,hn=e)}function On(t){this._context=t}On.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,l)}},result:N};var Pn,In,Ln,Rn,zn,Dn=n(),Fn={point:N,lineStart:function(){Fn.point=Bn},lineEnd:function(){Pn&&qn(In,Ln),Fn.point=N},polygonStart:function(){Pn=!0},polygonEnd:function(){Pn=null},result:function(){var t=+Dn;return Dn.reset(),t}};function Bn(t,e){Fn.point=qn,In=Rn=t,Ln=zn=e}function qn(t,e){Rn-=t,zn-=e,Dn.add(E(Rn*Rn+zn*zn)),Rn=t,zn=e}function Un(){this._string=[]}function Yn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Gn(t){return function(e){var n=new Vn;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Vn(){}function Hn(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),L(n,t.stream(cn)),e(cn.result()),null!=r&&t.clipExtent(r),t}function Kn(t,e,n){return Hn(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,u])}),n)}function Xn(t,e,n){return Kn(t,[[0,0],e],n)}function Wn(t,e,n){return Hn(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function $n(t,e,n){return Hn(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}Un.prototype={_radius:4.5,_circle:Yn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Yn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Vn.prototype={constructor:Vn,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Zn=g(30*d);function Qn(t,e){return+e?function(t,e){function n(r,i,o,u,c,f,s,l,h,d,v,g,b,_){var m=s-r,x=l-i,w=m*m+x*x;if(w>4*e&&b--){var M=u+d,k=c+v,A=f+g,j=E(M*M+k*k+A*A),N=S(A/=j),T=p(p(A)-1)e||p((m*I+x*L)/w-.5)>.3||u*d+c*v+f*g2?t[2]%360*d:0,T()):[b*h,_*h,m*h]},j.angle=function(t){return arguments.length?(x=t%360*d,T()):x*h},j.precision=function(t){return arguments.length?(a=Qn(u,S=t*t),C()):E(S)},j.fitExtent=function(t,e){return Kn(j,t,e)},j.fitSize=function(t,e){return Xn(j,t,e)},j.fitWidth=function(t,e){return Wn(j,t,e)},j.fitHeight=function(t,e){return $n(j,t,e)},function(){return e=t.apply(this,arguments),j.invert=e.invert&&N,T()}}function ir(t){var e=0,n=c/3,r=rr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*d,n=t[1]*d):[e*h,n*h]},i}function or(t,e){var n=w(t),r=(n+w(e))/2;if(p(r)0?e<-f+a&&(e=-f+a):e>f-a&&(e=f-a);var n=i/x(pr(e),r);return[n*w(r*t),i-n*g(r*t)]}return o.invert=function(t,e){var n=i-e,o=M(r)*E(t*t+n*n);return[y(t,p(n))/r*M(n),2*v(x(i/o,1/r))-f]},o}function yr(t,e){return[t,e]}function gr(t,e){var n=g(t),r=t===e?w(t):(n-g(e))/(e-t),i=n/r+t;if(p(r)a&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Sr.invert=fr(S),jr.invert=fr((function(t){return 2*v(t)})),Nr.invert=function(t,e){return[-e,2*v(_(t))-f]},t.geoAlbers=ur,t.geoAlbersUsa=function(){var t,e,n,r,i,o,u=ur(),c=ar().rotate([154,0]).center([-2,58.5]).parallels([55,65]),f=ar().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,e){o=[t,e]}};function l(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function h(){return t=e=null,l}return l.invert=function(t){var e=u.scale(),n=u.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?c:i>=.166&&i<.234&&r>=-.214&&r<-.115?f:u).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[u.stream(e=n),c.stream(n),f.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++nRt(r[0],r[1])&&(r[1]=i[1]),Rt(i[0],r[1])>Rt(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(u=Rt(r[1],i[0]))>a&&(a=u,et=i[0],rt=r[1])}return ft=st=null,et===1/0||nt===1/0?[[NaN,NaN],[NaN,NaN]]:[[et,nt],[rt,it]]},t.geoCentroid=function(t){lt=ht=dt=pt=vt=yt=gt=bt=_t=mt=xt=0,L(t,Ft);var e=_t,n=mt,r=xt,i=e*e+n*n+r*r;return i2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Nr,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":29}],44:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e){return t.parent===e.parent?1:2}function n(t,e){return t+e.x}function r(t,e){return Math.max(t,e.y)}function i(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function o(t,e){var n,r,i,o,u,s=new f(t),l=+t.value&&(s.value=t.value),h=[s];for(null==e&&(e=a);n=h.pop();)if(l&&(n.value=+n.data.value),(i=e(n.data))&&(u=i.length))for(n.children=new Array(u),o=u-1;o>=0;--o)h.push(r=n.children[o]=new f(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(c)}function a(t){return t.children}function u(t){t.data=t.data.data}function c(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function f(t){this.data=t,this.depth=this.height=0,this.parent=null}f.prototype=o.prototype={constructor:f,count:function(){return this.eachAfter(i)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return o(this).eachBefore(u)}};var s=Array.prototype.slice;function l(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(s.call(t))).length,o=[];r0&&n*n>r*r+i*i}function v(t,e){for(var n=0;n(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),n.x=t.x-r*u-o*c,n.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),n.x=e.x+r*u-o*c,n.y=e.y+r*c+o*u)):(n.x=e.x+n.r,n.y=e.y)}function m(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function x(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function w(t){this._=t,this.next=null,this.previous=null}function M(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,u,c,f,s,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;_(n,e,r=t[2]),e=new w(e),n=new w(n),r=new w(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(u=3;uh&&(h=u),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=u;break}p=d}g.push(a={value:s,dice:c1?e:1)},n}(V);var X=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l1?e:1)},n}(V);t.cluster=function(){var t=e,i=1,o=1,a=!1;function u(e){var u,c=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(n,0)/t.length}(i),e.y=function(t){return 1+t.reduce(r,0)}(i)):(e.x=u?c+=t(e,u):0,e.y=0,u=e)}));var f=function(t){for(var e;e=t.children;)t=e[0];return t}(e),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),l=f.x-t(f,s)/2,h=s.x+t(s,f)/2;return e.eachAfter(a?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*o}:function(t){t.x=(t.x-l)/(h-l)*i,t.y=(1-(e.y?t.y/e.y:1))*o})}return u.separation=function(e){return arguments.length?(t=e,u):t},u.size=function(t){return arguments.length?(a=!1,i=+t[0],o=+t[1],u):a?null:[i,o]},u.nodeSize=function(t){return arguments.length?(a=!0,i=+t[0],o=+t[1],u):a?[i,o]:null},u},t.hierarchy=o,t.pack=function(){var t=null,e=1,n=1,r=A;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(N(t)).eachAfter(T(r,.5)).eachBefore(C(1)):i.eachBefore(N(j)).eachAfter(T(A,1)).eachAfter(T(r,i.r/Math.min(e,n))).eachBefore(C(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=E(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:S(+t),i):r},i},t.packEnclose=l,t.packSiblings=function(t){return M(t),t},t.partition=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&P(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,u=r.y1-n;a0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=k(e),n):t},n.parentId=function(t){return arguments.length?(e=k(t),n):e},n},t.tree=function(){var t=D,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,o,a=new Y(t,0),u=[a];e=u.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(n=e.children[i]=new Y(r[i],i)),n.parent=e;return(a.parent=new Y(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=e/(s.x+h+d),v=n/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,u=n,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=B(u),o=F(o),u&&o;)c=F(c),(a=B(a)).a=e,(i=u.z+l-o.z-f+t(u._,o._))>0&&(q(U(u,e,r),e,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!B(a)&&(a.t=u,a.m+=l-s),o&&!F(c)&&(c.t=o,c.m+=f-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},t.treemap=function(){var t=K,e=!1,n=1,r=1,i=[0],o=A,a=A,u=A,c=A,f=A;function s(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(l),i=[0],e&&t.eachBefore(O),t}function l(e){var n=i[e.depth],r=e.x0+n,s=e.y0+n,l=e.x1-n,h=e.y1-n;l=n-1){var s=u[e];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}var l=f[e],h=r/2+l,d=e+1,p=n-1;for(;d>>1;f[v]c-o){var b=(i*g+a*y)/r;t(e,d,y,i,o,b,c),t(d,n,g,b,o,a,c)}else{var _=(o*g+c*y)/r;t(e,d,y,i,o,a,_),t(d,n,g,i,_,a,c)}}(0,c,t.value,e,n,r,i)},t.treemapDice=P,t.treemapResquarify=X,t.treemapSlice=G,t.treemapSliceDice=function(t,e,n,r,i){(1&t.depth?G:P)(t,e,n,r,i)},t.treemapSquarify=K,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],45:[function(t,e,n){!function(r,i){"object"==typeof n&&void 0!==e?i(n,t("d3-color")):i((r=r||self).d3=r.d3||{},r.d3)}(this,(function(t,e){"use strict";function n(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}function r(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),o=t[i],a=t[i+1],u=i>0?t[i-1]:2*o-a,c=i180||n<-180?n-360*Math.round(n/360):n):o(isNaN(t)?e:t)}function c(t){return 1==(t=+t)?f: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):o(isNaN(e)?n:e)}}function f(t,e){var n=e-t;return n?a(t,n):o(isNaN(t)?e:t)}var s=function t(n){var r=c(n);function i(t,n){var i=r((t=e.rgb(t)).r,(n=e.rgb(n)).r),o=r(t.g,n.g),a=r(t.b,n.b),u=f(t.opacity,n.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=a(e),t.opacity=u(e),t+""}}return i.gamma=t,i}(1);function l(t){return function(n){var r,i,o=n.length,a=new Array(o),u=new Array(o),c=new Array(o);for(r=0;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,c.push({i:a,x:b(n,r)})),o=x.lastIndex;return o180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:b(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,c),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:b(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,c),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:b(t,n)},{i:u-2,x:b(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var e,n=-1,r=c.length;++nr)if(Math.abs(h*f-s*l)>r&&a){var p=i-u,v=o-c,y=f*f+s*s,g=p*p+v*v,b=Math.sqrt(y),_=Math.sqrt(d),m=a*Math.tan((e-Math.acos((y+d-g)/(2*b*_)))/2),x=m/_,w=m/b;Math.abs(x-1)>r&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+a+","+a+",0,0,"+ +(h*p>l*v)+","+(this._x1=t+w*f)+","+(this._y1=n+w*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,o,a,u,c,f){t=+t,o=+o,f=!!f;var s=(a=+a)*Math.cos(u),l=a*Math.sin(u),h=t+s,d=o+l,p=1^f,v=f?u-c:c-u;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+h+","+d:(Math.abs(this._x1-h)>r||Math.abs(this._y1-d)>r)&&(this._+="L"+h+","+d),a&&(v<0&&(v=v%n+n),v>i?this._+="A"+a+","+a+",0,1,"+p+","+(t-s)+","+(o-l)+"A"+a+","+a+",0,1,"+p+","+(this._x1=h)+","+(this._y1=d):v>r&&(this._+="A"+a+","+a+",0,"+ +(v>=e)+","+p+","+(this._x1=t+a*Math.cos(c))+","+(this._y1=o+a*Math.sin(c))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],47:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e){return t[0]-e[0]||t[1]-e[1]}function n(t){for(var e,n,r,i=t.length,o=[0,1],a=2,u=2;u1&&(e=t[o[a-2]],n=t[o[a-1]],r=t[u],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--a;o[a++]=u}return o.slice(0,a)}t.polygonArea=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++nu!=f>u&&a<(c-n)*(u-r)/(f-r)+n&&(s=!s),c=n,f=r;return s},t.polygonHull=function(t){if((i=t.length)<3)return null;var r,i,o=new Array(i),a=new Array(i);for(r=0;r=0;--r)l.push(t[o[u[r]][2]]);for(r=+f;r=(o=(v+g)/2))?v=o:g=o,(s=n>=(a=(y+b)/2))?y=a:b=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===u&&n===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=e>=(o=(v+g)/2))?v=o:g=o,(s=n>=(a=(y+b)/2))?y=a:b=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function n(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function r(t){return t[0]}function i(t){return t[1]}function o(t,e,n){var o=new a(null==e?r:e,null==n?i:n,NaN,NaN,NaN,NaN);return null==t?o:o.addAll(t)}function a(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function u(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var c=o.prototype=a.prototype;c.copy=function(){var t,e,n=new a(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=u(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=u(e));return n},c.add=function(t){var n=+this._x.call(null,t),r=+this._y.call(null,t);return e(this.cover(n,r),n,r,t)},c.addAll=function(t){var n,r,i,o,a=t.length,u=new Array(a),c=new Array(a),f=1/0,s=1/0,l=-1/0,h=-1/0;for(r=0;rl&&(l=i),oh&&(h=o));if(f>l||s>h)return this;for(this.cover(f,s).cover(l,h),r=0;rt||t>=i||r>e||e>=o;)switch(u=(ed||(a=f.y0)>p||(u=f.x1)=b)<<1|t>=g)&&(f=v[v.length-1],v[v.length-1]=v[v.length-1-s],v[v.length-1-s]=f)}else{var _=t-+this._x.call(null,y.data),m=e-+this._y.call(null,y.data),x=_*_+m*m;if(x=(u=(p+y)/2))?p=u:y=u,(s=a>=(c=(v+g)/2))?v=c:g=c,e=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},c.removeAll=function(t){for(var e=0,n=t.length;e1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(e),i=function t(e){function n(){var t=r.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(e),o=function t(e){function n(t){return function(){for(var n=0,r=0;r1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return bt.h=360*t-100,bt.s=1.5-1.5*e,bt.l=.8-.9*e,bt+""},t.interpolateRdBu=E,t.interpolateRdGy=A,t.interpolateRdPu=X,t.interpolateRdYlBu=j,t.interpolateRdYlGn=T,t.interpolateReds=ht,t.interpolateSinebow=function(t){var e;return t=(.5-t)*Math.PI,_t.r=255*(e=Math.sin(t))*e,_t.g=255*(e=Math.sin(t+mt))*e,_t.b=255*(e=Math.sin(t+xt))*e,_t+""},t.interpolateSpectral=O,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},t.interpolateViridis=Mt,t.interpolateWarm=yt,t.interpolateYlGn=Q,t.interpolateYlGnBu=$,t.interpolateYlOrBr=tt,t.interpolateYlOrRd=nt,t.schemeAccent=o,t.schemeBlues=rt,t.schemeBrBG=v,t.schemeBuGn=P,t.schemeBuPu=L,t.schemeCategory10=i,t.schemeDark2=a,t.schemeGnBu=z,t.schemeGreens=ot,t.schemeGreys=ut,t.schemeOrRd=F,t.schemeOranges=dt,t.schemePRGn=g,t.schemePaired=u,t.schemePastel1=c,t.schemePastel2=f,t.schemePiYG=_,t.schemePuBu=Y,t.schemePuBuGn=q,t.schemePuOr=x,t.schemePuRd=V,t.schemePurples=ft,t.schemeRdBu=M,t.schemeRdGy=k,t.schemeRdPu=K,t.schemeRdYlBu=S,t.schemeRdYlGn=N,t.schemeReds=lt,t.schemeSet1=s,t.schemeSet2=l,t.schemeSet3=h,t.schemeSpectral=C,t.schemeTableau10=d,t.schemeYlGn=Z,t.schemeYlGnBu=W,t.schemeYlOrBr=J,t.schemeYlOrRd=et,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-color":34,"d3-interpolate":45}],51:[function(t,e,n){!function(r,i){"object"==typeof n&&void 0!==e?i(n,t("d3-collection"),t("d3-array"),t("d3-interpolate"),t("d3-format"),t("d3-time"),t("d3-time-format")):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)}(this,(function(t,e,n,r,i,o,a){"use strict";function u(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function c(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var f=Array.prototype,s=f.map,l=f.slice,h={name:"implicit"};function d(){var t=e.map(),n=[],r=[],i=h;function o(e){var o=e+"",a=t.get(o);if(!a){if(i!==h)return i;t.set(o,a=n.push(e))}return r[(a-1)%r.length]}return o.domain=function(r){if(!arguments.length)return n.slice();n=[],t=e.map();for(var i,a,u=-1,c=r.length;++ur&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function x(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i2?w:x,o=a=null,p}function p(e){return isNaN(e=+e)?n:(o||(o=i(u.map(t),c,f)))(t(h(e)))}return p.invert=function(n){return h(e((a||(a=i(c,u.map(t),r.interpolateNumber)))(n)))},p.domain=function(t){return arguments.length?(u=s.call(t,y),h===b||(h=m(u)),d()):u.slice()},p.range=function(t){return arguments.length?(c=l.call(t),d()):c.slice()},p.rangeRound=function(t){return c=l.call(t),f=r.interpolateRound,d()},p.clamp=function(t){return arguments.length?(h=t?m(u):b,p):h!==b},p.interpolate=function(t){return arguments.length?(f=t,d()):f},p.unknown=function(t){return arguments.length?(n=t,p):n},function(n,r){return t=n,e=r,d()}}function k(t,e){return E()(t,e)}function A(t,e,r,o){var a,u=n.tickStep(t,e,r);switch((o=i.formatSpecifier(null==o?",f":o)).type){case"s":var c=Math.max(Math.abs(t),Math.abs(e));return null!=o.precision||isNaN(a=i.precisionPrefix(u,c))||(o.precision=a),i.formatPrefix(o,c);case"":case"e":case"g":case"p":case"r":null!=o.precision||isNaN(a=i.precisionRound(u,Math.max(Math.abs(t),Math.abs(e))))||(o.precision=a-("e"===o.type));break;case"f":case"%":null!=o.precision||isNaN(a=i.precisionFixed(u))||(o.precision=a-2*("%"===o.type))}return i.format(o)}function S(t){var e=t.domain;return t.ticks=function(t){var r=e();return n.ticks(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return A(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(r){null==r&&(r=10);var i,o=e(),a=0,u=o.length-1,c=o[a],f=o[u];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=n.tickIncrement(c,f,r)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=n.tickIncrement(c,f,r)),i>0?(o[a]=Math.floor(c/i)*i,o[u]=Math.ceil(f/i)*i,e(o)):i<0&&(o[a]=Math.ceil(c*i)/i,o[u]=Math.floor(f*i)/i,e(o)),t},t}function j(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0){for(;df)break;y.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;y.push(h)}}else y=n.ticks(d,p,Math.min(p-d,v)).map(r);return i?y.reverse():y},o.tickFormat=function(t,n){if(null==n&&(n=10===u?".0e":","),"function"!=typeof n&&(n=i.format(n)),t===1/0)return n;null==t&&(t=10);var a=Math.max(1,u*t/o.ticks().length);return function(t){var i=t/r(Math.round(e(t)));return i*u0?o[e-1]:r[0],e=o?[a[o-1],i]:[a[e-1],a[e]]},f.unknown=function(t){return arguments.length?(e=t,f):f},f.thresholds=function(){return a.slice()},f.copy=function(){return t().domain([r,i]).range(c).unknown(e)},u.apply(S(f),arguments)},t.scaleThreshold=function t(){var e,r=[.5],i=[0,1],o=1;function a(t){return t<=t?i[n.bisect(r,t,0,o)]:e}return a.domain=function(t){return arguments.length?(r=l.call(t),o=Math.min(r.length,i.length-1),a):r.slice()},a.range=function(t){return arguments.length?(i=l.call(t),o=Math.min(r.length,i.length-1),a):i.slice()},a.invertExtent=function(t){var e=i.indexOf(t);return[r[e-1],r[e]]},a.unknown=function(t){return arguments.length?(e=t,a):e},a.copy=function(){return t().domain(r).range(i).unknown(e)},u.apply(a,arguments)},t.scaleTime=function(){return u.apply(Q(o.timeYear,o.timeMonth,o.timeWeek,o.timeDay,o.timeHour,o.timeMinute,o.timeSecond,o.timeMillisecond,a.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return u.apply(Q(o.utcYear,o.utcMonth,o.utcWeek,o.utcDay,o.utcHour,o.utcMinute,o.utcSecond,o.utcMillisecond,a.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scaleSequential=function t(){var e=S(J()(b));return e.copy=function(){return tt(e,t())},c.apply(e,arguments)},t.scaleSequentialLog=function t(){var e=L(J()).domain([1,10]);return e.copy=function(){return tt(e,t()).base(e.base())},c.apply(e,arguments)},t.scaleSequentialPow=et,t.scaleSequentialSqrt=function(){return et.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var e=D(J());return e.copy=function(){return tt(e,t()).constant(e.constant())},c.apply(e,arguments)},t.scaleSequentialQuantile=function t(){var e=[],r=b;function i(t){if(!isNaN(t=+t))return r((n.bisect(e,t)-1)/(e.length-1))}return i.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,o=0,a=t.length;o=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function i(t){return function(){var n=this.ownerDocument,r=this.namespaceURI;return r===e&&n.documentElement.namespaceURI===e?n.createElement(t):n.createElementNS(r,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function a(t){var e=r(t);return(e.local?o:i)(e)}function u(){}function c(t){return null==t?u:function(){return this.querySelector(t)}}function f(){return[]}function s(t){return null==t?f:function(){return this.querySelectorAll(t)}}function l(t){return function(){return this.matches(t)}}function h(t){return new Array(t.length)}function d(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}d.prototype={constructor:d,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 p(t,e,n,r,i,o){for(var a,u=0,c=e.length,f=o.length;ue?1:t>=e?0:NaN}function g(t){return function(){this.removeAttribute(t)}}function b(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,e){return function(){this.setAttribute(t,e)}}function m(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function x(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function M(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function A(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function S(t,e){return t.style.getPropertyValue(e)||M(t).getComputedStyle(t,null).getPropertyValue(e)}function j(t){return function(){delete this[t]}}function N(t,e){return function(){this[t]=e}}function T(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function C(t){return t.trim().split(/^|\s+/)}function O(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=C(t.getAttribute("class")||"")}function I(t,e){for(var n=O(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}};var Z={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function Q(t,e,n){return t=J(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function J(e,n,r){return function(i){var o=t.event;t.event=i;try{e.call(this,this.__data__,n,r)}finally{t.event=o}}}function tt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function et(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=M&&(M=w+1);!(x=_[M])&&++M=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&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=y);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?E:"function"==typeof e?A:k)(t,e,null==n?"":n)):S(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?j:"function"==typeof e?T:N)(t,e)):this.node()[t]},classed:function(t,e){var n=C(t+"");if(arguments.length<2){for(var r=O(this.node()),i=-1,o=n.length;++i1?0:t<-1?l:Math.acos(t)}function v(t){return t>=1?h:t<=-1?-h:Math.asin(t)}function y(t){return t.innerRadius}function g(t){return t.outerRadius}function b(t){return t.startAngle}function _(t){return t.endAngle}function m(t){return t&&t.padAngle}function x(t,e,n,r,i,o,a,u){var c=n-t,f=r-e,l=a-i,h=u-o,d=h*c-l*f;if(!(d*dO*O+P*P&&(A=j,S=N),{cx:A,cy:S,x01:-h,y01:-d,x11:A*(i/M-1),y11:S*(i/M-1)}}function M(t){this._context=t}function E(t){return new M(t)}function k(t){return t[0]}function A(t){return t[1]}function S(){var t=k,r=A,i=n(!0),o=null,a=E,u=null;function c(n){var c,f,s,l=n.length,h=!1;for(null==o&&(u=a(s=e.path())),c=0;c<=l;++c)!(c=l;--h)f.point(g[h],b[h]);f.lineEnd(),f.areaEnd()}y&&(g[s]=+t(d,s,n),b[s]=+i(d,s,n),f.point(r?+r(d,s,n):g[s],o?+o(d,s,n):b[s]))}if(p)return f=null,p+""||null}function l(){return S().defined(a).curve(c).context(u)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),r=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),s):t},s.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:n(+t),s):r},s.y=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),o=null,s):i},s.y0=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),s):i},s.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:n(+t),s):o},s.lineX0=s.lineY0=function(){return l().x(t).y(i)},s.lineY1=function(){return l().x(t).y(o)},s.lineX1=function(){return l().x(r).y(i)},s.defined=function(t){return arguments.length?(a="function"==typeof t?t:n(!!t),s):a},s.curve=function(t){return arguments.length?(c=t,null!=u&&(f=c(u)),s):c},s.context=function(t){return arguments.length?(null==t?u=f=null:f=c(u=t),s):u},s}function N(t,e){return et?1:e>=t?0:NaN}function T(t){return t}M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=P(E);function O(t){this._curve=t}function P(t){function e(e){return new O(t(e))}return e._curve=t,e}function I(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function L(){return I(S().curve(C))}function R(){var t=j().curve(C),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return I(n())},delete t.lineX0,t.lineEndAngle=function(){return I(r())},delete t.lineX1,t.lineInnerRadius=function(){return I(i())},delete t.lineY0,t.lineOuterRadius=function(){return I(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function z(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}O.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var D=Array.prototype.slice;function F(t){return t.source}function B(t){return t.target}function q(t){var r=F,i=B,o=k,a=A,u=null;function c(){var n,c=D.call(arguments),f=r.apply(this,c),s=i.apply(this,c);if(u||(u=n=e.path()),t(u,+o.apply(this,(c[0]=f,c)),+a.apply(this,c),+o.apply(this,(c[0]=s,c)),+a.apply(this,c)),n)return u=null,n+""||null}return c.source=function(t){return arguments.length?(r=t,c):r},c.target=function(t){return arguments.length?(i=t,c):i},c.x=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),c):o},c.y=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),c):a},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c}function U(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Y(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function G(t,e,n,r,i){var o=z(e,n),a=z(e,n=(n+i)/2),u=z(r,n),c=z(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}var V={draw:function(t,e){var n=Math.sqrt(e/l);t.moveTo(n,0),t.arc(0,0,n,0,d)}},H={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},K=Math.sqrt(1/3),X=2*K,W={draw:function(t,e){var n=Math.sqrt(e/X),r=n*K;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},$=Math.sin(l/10)/Math.sin(7*l/10),Z=Math.sin(d/10)*$,Q=-Math.cos(d/10)*$,J={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Z*n,i=Q*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=d*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*n,-u*n),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},tt={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},et=Math.sqrt(3),nt={draw:function(t,e){var n=-Math.sqrt(e/(3*et));t.moveTo(0,2*n),t.lineTo(-et*n,-n),t.lineTo(et*n,-n),t.closePath()}},rt=-.5,it=Math.sqrt(3)/2,ot=1/Math.sqrt(12),at=3*(ot/2+1),ut={draw:function(t,e){var n=Math.sqrt(e/at),r=n/2,i=n*ot,o=r,a=n*ot+n,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(rt*r-it*i,it*r+rt*i),t.lineTo(rt*o-it*a,it*o+rt*a),t.lineTo(rt*u-it*c,it*u+rt*c),t.lineTo(rt*r+it*i,rt*i-it*r),t.lineTo(rt*o+it*a,rt*a-it*o),t.lineTo(rt*u+it*c,rt*c-it*u),t.closePath()}},ct=[V,H,W,tt,J,nt,ut];function ft(){}function st(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function lt(t){this._context=t}function ht(t){this._context=t}function dt(t){this._context=t}function pt(t,e){this._basis=new lt(t),this._beta=e}lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:st(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:st(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:ft,areaEnd:ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:st(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:st(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,u=e[n]-o,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*e[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var vt=function t(e){function n(t){return 1===e?new lt(t):new pt(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function yt(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gt(t,e){this._context=t,this._k=(1-e)/6}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:yt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:yt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bt=function t(e){function n(t){return new gt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function _t(t,e){this._context=t,this._k=(1-e)/6}_t.prototype={areaStart:ft,areaEnd:ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:yt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var mt=function t(e){function n(t){return new _t(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xt(t,e){this._context=t,this._k=(1-e)/6}xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wt=function t(e){function n(t){return new xt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Mt(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>s){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>s){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-e*t._l12_2a)/l,a=(a*f+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function Et(t,e){this._context=t,this._alpha=e}Et.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function n(t){return e?new Et(t,e):new gt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:ft,areaEnd:ft,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var St=function t(e){function n(t){return e?new At(t,e):new _t(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function jt(t,e){this._context=t,this._alpha=e}jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nt=function t(e){function n(t){return e?new jt(t,e):new xt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tt(t){this._context=t}function Ct(t){return t<0?-1:1}function Ot(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Ct(o)+Ct(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Pt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function It(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Lt(t){this._context=t}function Rt(t){this._context=new zt(t)}function zt(t){this._context=t}function Dt(t){this._context=t}function Ft(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,o=1,a=t[e[0]],u=a.length;o=0;)n[e]=e;return n}function Yt(t,e){return t[e]}function Gt(t){var e=t.map(Vt);return Ut(t).sort((function(t,n){return e[t]-e[n]}))}function Vt(t){for(var e,n=-1,r=0,i=t.length,o=-1/0;++no&&(o=e,r=n);return r}function Ht(t){var e=t.map(Kt);return Ut(t).sort((function(t,n){return e[t]-e[n]}))}function Kt(t){for(var e,n=0,r=-1,i=t.length;++r=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},t.arc=function(){var t=y,a=g,M=n(0),E=null,k=b,A=_,S=m,j=null;function N(){var n,y,g=+t.apply(this,arguments),b=+a.apply(this,arguments),_=k.apply(this,arguments)-h,m=A.apply(this,arguments)-h,N=r(m-_),T=m>_;if(j||(j=n=e.path()),bs)if(N>d-s)j.moveTo(b*o(_),b*c(_)),j.arc(0,0,b,_,m,!T),g>s&&(j.moveTo(g*o(m),g*c(m)),j.arc(0,0,g,m,_,T));else{var C,O,P=_,I=m,L=_,R=m,z=N,D=N,F=S.apply(this,arguments)/2,B=F>s&&(E?+E.apply(this,arguments):f(g*g+b*b)),q=u(r(b-g)/2,+M.apply(this,arguments)),U=q,Y=q;if(B>s){var G=v(B/g*c(F)),V=v(B/b*c(F));(z-=2*G)>s?(L+=G*=T?1:-1,R-=G):(z=0,L=R=(_+m)/2),(D-=2*V)>s?(P+=V*=T?1:-1,I-=V):(D=0,P=I=(_+m)/2)}var H=b*o(P),K=b*c(P),X=g*o(R),W=g*c(R);if(q>s){var $,Z=b*o(I),Q=b*c(I),J=g*o(L),tt=g*c(L);if(Ns?Y>s?(C=w(J,tt,H,K,b,Y,T),O=w(Z,Q,X,W,b,Y,T),j.moveTo(C.cx+C.x01,C.cy+C.y01),Ys&&z>s?U>s?(C=w(X,W,Z,Q,g,-U,T),O=w(H,K,J,tt,g,-U,T),j.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(p+=l);for(null!=e?v.sort((function(t,n){return e(y[t],y[n])})):null!=r&&v.sort((function(t,e){return r(n[t],n[e])})),u=0,f=p?(b-h*m)/p:0;u0?l*f:0)+m,y[c]={data:n[c],index:u,value:l,startAngle:g,endAngle:s,padAngle:_};return y}return u.value=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),u):t},u.sortValues=function(t){return arguments.length?(e=t,r=null,u):e},u.sort=function(t){return arguments.length?(r=t,e=null,u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),u):a},u},t.pointRadial=z,t.radialArea=R,t.radialLine=L,t.stack=function(){var t=n([]),e=Ut,r=qt,i=Yt;function o(n){var o,a,u=t.apply(this,arguments),c=n.length,f=u.length,s=new Array(f);for(o=0;o0)for(var n,r,i,o,a,u,c=0,f=t[e[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:yt,s:gt,S:Y,u:G,U:V,V:H,w:K,W:X,x:null,X:null,y:W,Y:$,Z,"%":vt},Tt={a:function(t){return l[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return bt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:rt,H:J,I:tt,j:et,L:nt,m:it,M:ot,p:function(t){return f[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:yt,s:gt,S:at,u:ut,U:ct,V:ft,w:st,W:lt,x:null,X:null,y:ht,Y:dt,Z:pt,"%":vt},Ct={a:function(t,e,n){var r=Mt.exec(e.slice(n));return r?(t.w=Et[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=xt.exec(e.slice(n));return r?(t.w=wt[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=St.exec(e.slice(n));return r?(t.m=jt[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=kt.exec(e.slice(n));return r?(t.m=At[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,e,n){return It(t,o,e,n)},d:k,e:k,f:C,H:S,I:S,j:A,L:T,m:E,M:j,p:function(t,e,n){var r=_t.exec(e.slice(n));return r?(t.p=mt[r[0].toLowerCase()],n+r[0].length):-1},q:M,Q:P,s:I,S:N,u:y,U:g,V:b,w:v,W:_,x:function(t,e,n){return It(t,a,e,n)},X:function(t,e,n){return It(t,c,e,n)},y:x,Y:m,Z:w,"%":O};function Ot(t,e){return function(n){var r,i,o,a=[],c=-1,f=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++c53)return null;"w"in f||(f.w=1),"Z"in f?(c=(u=r(i(f.y,0,1))).getUTCDay(),u=c>4||0===c?e.utcMonday.ceil(u):e.utcMonday(u),u=e.utcDay.offset(u,7*(f.V-1)),f.y=u.getUTCFullYear(),f.m=u.getUTCMonth(),f.d=u.getUTCDate()+(f.w+6)%7):(c=(u=n(i(f.y,0,1))).getDay(),u=c>4||0===c?e.timeMonday.ceil(u):e.timeMonday(u),u=e.timeDay.offset(u,7*(f.V-1)),f.y=u.getFullYear(),f.m=u.getMonth(),f.d=u.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),c="Z"in f?r(i(f.y,0,1)).getUTCDay():n(i(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(c+5)%7:f.w+7*f.U-(c+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,r(f)):n(f)}}function It(t,e,n,r){for(var i,o,a=0,c=e.length,f=n.length;a=f)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=Ct[i in u?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return Nt.x=Ot(a,Nt),Nt.X=Ot(c,Nt),Nt.c=Ot(o,Nt),Tt.x=Ot(a,Tt),Tt.X=Ot(c,Tt),Tt.c=Ot(o,Tt),{format:function(t){var e=Ot(t+="",Nt);return e.toString=function(){return t},e},parse:function(t){var e=Pt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Ot(t+="",Tt);return e.toString=function(){return t},e},utcParse:function(t){var e=Pt(t+="",!0);return e.toString=function(){return t},e}}}var a,u={"-":"",_:" ",0:"0"},c=/^\s*\d+/,f=/^%/,s=/[\\^$*+?|[\]().{}]/g;function l(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function w(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function M(t,e,n){var r=c.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function E(t,e,n){var r=c.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function k(t,e,n){var r=c.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function A(t,e,n){var r=c.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function S(t,e,n){var r=c.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function j(t,e,n){var r=c.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function N(t,e,n){var r=c.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function T(t,e,n){var r=c.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function C(t,e,n){var r=c.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function O(t,e,n){var r=f.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function P(t,e,n){var r=c.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function I(t,e,n){var r=c.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function L(t,e){return l(t.getDate(),e,2)}function R(t,e){return l(t.getHours(),e,2)}function z(t,e){return l(t.getHours()%12||12,e,2)}function D(t,n){return l(1+e.timeDay.count(e.timeYear(t),t),n,3)}function F(t,e){return l(t.getMilliseconds(),e,3)}function B(t,e){return F(t,e)+"000"}function q(t,e){return l(t.getMonth()+1,e,2)}function U(t,e){return l(t.getMinutes(),e,2)}function Y(t,e){return l(t.getSeconds(),e,2)}function G(t){var e=t.getDay();return 0===e?7:e}function V(t,n){return l(e.timeSunday.count(e.timeYear(t)-1,t),n,2)}function H(t,n){var r=t.getDay();return t=r>=4||0===r?e.timeThursday(t):e.timeThursday.ceil(t),l(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),n,2)}function K(t){return t.getDay()}function X(t,n){return l(e.timeMonday.count(e.timeYear(t)-1,t),n,2)}function W(t,e){return l(t.getFullYear()%100,e,2)}function $(t,e){return l(t.getFullYear()%1e4,e,4)}function Z(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+l(e/60|0,"0",2)+l(e%60,"0",2)}function Q(t,e){return l(t.getUTCDate(),e,2)}function J(t,e){return l(t.getUTCHours(),e,2)}function tt(t,e){return l(t.getUTCHours()%12||12,e,2)}function et(t,n){return l(1+e.utcDay.count(e.utcYear(t),t),n,3)}function nt(t,e){return l(t.getUTCMilliseconds(),e,3)}function rt(t,e){return nt(t,e)+"000"}function it(t,e){return l(t.getUTCMonth()+1,e,2)}function ot(t,e){return l(t.getUTCMinutes(),e,2)}function at(t,e){return l(t.getUTCSeconds(),e,2)}function ut(t){var e=t.getUTCDay();return 0===e?7:e}function ct(t,n){return l(e.utcSunday.count(e.utcYear(t)-1,t),n,2)}function ft(t,n){var r=t.getUTCDay();return t=r>=4||0===r?e.utcThursday(t):e.utcThursday.ceil(t),l(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),n,2)}function st(t){return t.getUTCDay()}function lt(t,n){return l(e.utcMonday.count(e.utcYear(t)-1,t),n,2)}function ht(t,e){return l(t.getUTCFullYear()%100,e,2)}function dt(t,e){return l(t.getUTCFullYear()%1e4,e,4)}function pt(){return"+0000"}function vt(){return"%"}function yt(t){return+t}function gt(t){return Math.floor(+t/1e3)}function bt(e){return a=o(e),t.timeFormat=a.format,t.timeParse=a.parse,t.utcFormat=a.utcFormat,t.utcParse=a.utcParse,a}bt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var _t="%Y-%m-%dT%H:%M:%S.%LZ";var mt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(_t);var xt=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse(_t);t.isoFormat=mt,t.isoParse=xt,t.timeFormatDefaultLocale=bt,t.timeFormatLocale=o,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-time":55}],55:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e=new Date,n=new Date;function r(t,i,o,a){function u(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return u.floor=function(e){return t(e=new Date(+e)),e},u.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},u.round=function(t){var e=u(t),n=u.ceil(t);return t-e0))return a;do{a.push(o=new Date(+e)),i(e,r),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;i(t,-1),!e(t););else for(;--n>=0;)for(;i(t,1),!e(t););}))},o&&(u.count=function(r,i){return e.setTime(+r),n.setTime(+i),t(e),t(n),Math.floor(o(e,n))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(a?function(e){return a(e)%t==0}:function(e){return u.count(0,e)%t==0}):u:null}),u}var i=r((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):i:null};var o=i.range,a=1e3,u=6e4,c=36e5,f=864e5,s=6048e5,l=r((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*a)}),(function(t,e){return(e-t)/a}),(function(t){return t.getUTCSeconds()})),h=l.range,d=r((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*a)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getMinutes()})),p=d.range,v=r((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*a-t.getMinutes()*u)}),(function(t,e){t.setTime(+t+e*c)}),(function(t,e){return(e-t)/c}),(function(t){return t.getHours()})),y=v.range,g=r((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/f}),(function(t){return t.getDate()-1})),b=g.range;function _(t){return r((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/s}))}var m=_(0),x=_(1),w=_(2),M=_(3),E=_(4),k=_(5),A=_(6),S=m.range,j=x.range,N=w.range,T=M.range,C=E.range,O=k.range,P=A.range,I=r((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),L=I.range,R=r((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));R.every=function(t){return isFinite(t=Math.floor(t))&&t>0?r((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var z=R.range,D=r((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCMinutes()})),F=D.range,B=r((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*c)}),(function(t,e){return(e-t)/c}),(function(t){return t.getUTCHours()})),q=B.range,U=r((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/f}),(function(t){return t.getUTCDate()-1})),Y=U.range;function G(t){return r((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/s}))}var V=G(0),H=G(1),K=G(2),X=G(3),W=G(4),$=G(5),Z=G(6),Q=V.range,J=H.range,tt=K.range,et=X.range,nt=W.range,rt=$.range,it=Z.range,ot=r((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),at=ot.range,ut=r((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ut.every=function(t){return isFinite(t=Math.floor(t))&&t>0?r((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var ct=ut.range;t.timeDay=g,t.timeDays=b,t.timeFriday=k,t.timeFridays=O,t.timeHour=v,t.timeHours=y,t.timeInterval=r,t.timeMillisecond=i,t.timeMilliseconds=o,t.timeMinute=d,t.timeMinutes=p,t.timeMonday=x,t.timeMondays=j,t.timeMonth=I,t.timeMonths=L,t.timeSaturday=A,t.timeSaturdays=P,t.timeSecond=l,t.timeSeconds=h,t.timeSunday=m,t.timeSundays=S,t.timeThursday=E,t.timeThursdays=C,t.timeTuesday=w,t.timeTuesdays=N,t.timeWednesday=M,t.timeWednesdays=T,t.timeWeek=m,t.timeWeeks=S,t.timeYear=R,t.timeYears=z,t.utcDay=U,t.utcDays=Y,t.utcFriday=$,t.utcFridays=rt,t.utcHour=B,t.utcHours=q,t.utcMillisecond=i,t.utcMilliseconds=o,t.utcMinute=D,t.utcMinutes=F,t.utcMonday=H,t.utcMondays=J,t.utcMonth=ot,t.utcMonths=at,t.utcSaturday=Z,t.utcSaturdays=it,t.utcSecond=l,t.utcSeconds=h,t.utcSunday=V,t.utcSundays=Q,t.utcThursday=W,t.utcThursdays=nt,t.utcTuesday=K,t.utcTuesdays=tt,t.utcWednesday=X,t.utcWednesdays=et,t.utcWeek=V,t.utcWeeks=Q,t.utcYear=ut,t.utcYears=ct,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],56:[function(t,e,n){!function(t,r){"object"==typeof n&&void 0!==e?r(n):r((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e,n,r=0,i=0,o=0,a=0,u=0,c=0,f="object"==typeof performance&&performance.now?performance:Date,s="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function l(){return u||(s(h),u=f.now()+c)}function h(){u=0}function d(){this._call=this._time=this._next=null}function p(t,e,n){var r=new d;return r.restart(t,e,n),r}function v(){l(),++r;for(var t,n=e;n;)(t=u-n._time)>=0&&n._call.call(null,t),n=n._next;--r}function y(){u=(a=f.now())+c,r=i=0;try{v()}finally{r=0,function(){var t,r,i=e,o=1/0;for(;i;)i._call?(o>i._time&&(o=i._time),t=i,i=i._next):(r=i._next,i._next=null,i=t?t._next=r:e=r);n=t,b(o)}(),u=0}}function g(){var t=f.now(),e=t-a;e>1e3&&(c-=e,a=t)}function b(t){r||(i&&(i=clearTimeout(i)),t-u>24?(t<1/0&&(i=setTimeout(y,t-f.now()-c)),o&&(o=clearInterval(o))):(o||(a=f.now(),o=setInterval(g,1e3)),r=1,s(y)))}d.prototype=p.prototype={constructor:d,restart:function(t,r,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?l():+i)+(null==r?0:+r),this._next||n===this||(n?n._next=this:e=this,n=this),this._call=t,this._time=i,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}},t.interval=function(t,e,n){var r=new d,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?l():+n,r.restart((function o(a){a+=i,r.restart(o,i+=e,n),t(a)}),e,n),r)},t.now=l,t.timeout=function(t,e,n){var r=new d;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},t.timer=p,t.timerFlush=v,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],57:[function(t,e,n){!function(r,i){"object"==typeof n&&void 0!==e?i(n,t("d3-selection"),t("d3-dispatch"),t("d3-timer"),t("d3-interpolate"),t("d3-color"),t("d3-ease")):i((r=r||self).d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)}(this,(function(t,e,n,r,i,o,a){"use strict";var u=n.dispatch("start","end","cancel","interrupt"),c=[];function f(t,e,n,i,o,a){var f=t.__transition;if(f){if(n in f)return}else t.__transition={};!function(t,e,n){var i,o=t.__transition;function a(t){n.state=1,n.timer.restart(u,n.delay,n.time),n.delay<=t&&u(t-n.delay)}function u(a){var s,l,h,d;if(1!==n.state)return f();for(s in o)if((d=o[s]).name===n.name){if(3===d.state)return r.timeout(u);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete o[s]):+s0)throw new Error("too late; already scheduled");return n}function l(t,e){var n=h(t,e);if(n.state>3)throw new Error("too late; already running");return n}function h(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function d(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function p(t,e){var n,r;return function(){var i=l(this,t),o=i.tween;if(o!==n)for(var a=0,u=(r=n=o).length;a=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?s:l;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}var I=e.selection.prototype.constructor;function L(t){return function(){this.style.removeProperty(t)}}function R(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function z(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&R(t,o,n)),r}return o._value=e,o}function D(t){return function(e){this.textContent=t.call(this,e)}}function F(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&D(r)),e}return r._value=t,r}var B=0;function q(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function U(t){return e.selection().transition(t)}function Y(){return++B}var G=e.selection.prototype;q.prototype=U.prototype={constructor:q,select:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),u=0;u1&&n.name===e)return new q([[t]],K,e,+r);return null},t.interrupt=d,t.transition=U,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-color":34,"d3-dispatch":36,"d3-ease":39,"d3-interpolate":45,"d3-selection":52,"d3-timer":56}],58:[function(t,e,n){!function(t,r){r("object"==typeof n&&void 0!==e?n:t.d3=t.d3||{})}(this,(function(t){"use strict";function e(t){return function(){return t}}function n(t){return t[0]}function r(t){return t[1]}function i(){this._=null}function o(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function a(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function u(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function c(t){for(;t.L;)t=t.L;return t}function f(t,e,n,r){var i=[null,null],o=P.push(i)-1;return i.left=t,i.right=e,n&&l(i,t,e,n),r&&l(i,e,t,r),C[t.index].halfedges.push(o),C[e.index].halfedges.push(o),i}function s(t,e,n){var r=[e,n];return r.left=t,r}function l(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function h(t,e,n,r,i){var o,a=t[0],u=t[1],c=a[0],f=a[1],s=0,l=1,h=u[0]-c,d=u[1]-f;if(o=e-c,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function d(t,e,n,r,i){var o=t[1];if(o)return!0;var a,u,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,n];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(n-u)/a,n];o=[(i-u)/a,i]}else{if(c){if(c[1]=r)return}else c=[e,a*e+u];o=[r,a*r+u]}else{if(c){if(c[0]=-L)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,m=b.pop()||new _;m.arc=t,m.site=i,m.x=v+a,m.y=(m.cy=y+u)+Math.sqrt(v*v+y*y),t.circle=m;for(var x=null,w=O._;w;)if(m.yI)u=u.L;else{if(!((i=o-N(u,a))>I)){r>-I?(e=u.P,n=u):i>-I?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}!function(t){C[t.index]={site:t,halfedges:[]}}(t);var c=E(t);if(T.insert(e,c),e||n){if(e===n)return x(e),n=E(e.site),T.insert(c,n),c.edge=n.edge=f(e.site,c.site),m(e),void m(n);if(n){x(e),x(n);var s=e.site,h=s[0],d=s[1],p=t[0]-h,v=t[1]-d,y=n.site,g=y[0]-h,b=y[1]-d,_=2*(p*b-v*g),w=p*p+v*v,M=g*g+b*b,k=[(b*w-v*M)/_+h,(p*M-g*w)/_+d];l(n.edge,s,y,k),c.edge=f(s,t,null,k),n.edge=f(t,y,null,k),m(e),m(n)}else c.edge=f(e.site,c.site)}}function j(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(n=a.site)[0],c=n[1],f=c-e;if(!f)return u;var s=u-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+u)/2}function N(t,e){var n=t.N;if(n)return j(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var T,C,O,P,I=1e-6,L=1e-12;function R(t,e){return e[1]-t[1]||e[0]-t[0]}function z(t,e){var n,r,o,a=t.sort(R).pop();for(P=[],C=new Array(t.length),T=new i,O=new i;;)if(o=g,a&&(!o||a[1]I||Math.abs(i[0][1]-i[1][1])>I)||delete P[o]}(u,c,f,l),function(t,e,n,r){var i,o,a,u,c,f,l,h,d,p,g,b,_=C.length,m=!0;for(i=0;i<_;++i)if(o=C[i]){for(a=o.site,u=(c=o.halfedges).length;u--;)P[c[u]]||c.splice(u,1);for(u=0,f=c.length;uI||Math.abs(b-d)>I)&&(c.splice(u,0,P.push(s(a,p,Math.abs(g-t)I?[t,Math.abs(h-t)I?[Math.abs(d-r)I?[n,Math.abs(h-n)I?[Math.abs(d-e)=u)return null;var c=t-i.site[0],f=e-i.site[1],s=c*c+f*f;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],u=r.left;if(u!==i.site&&u||(u=r.right)){var c=t-u[0],f=e-u[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}s.prototype=c.prototype,t.zoom=function(){var t,s,_=d,m=p,x=b,w=y,M=g,E=[0,1/0],k=[[-1/0,-1/0],[1/0,1/0]],A=250,S=r.interpolateZoom,j=e.dispatch("start","zoom","end"),N=500,T=0;function C(t){t.property("__zoom",v).on("wheel.zoom",D).on("mousedown.zoom",F).on("dblclick.zoom",B).filter(M).on("touchstart.zoom",q).on("touchmove.zoom",U).on("touchend.zoom touchcancel.zoom",Y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function O(t,e){return(e=Math.max(E[0],Math.min(E[1],e)))===t.k?t:new c(e,t.x,t.y)}function P(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new c(t.k,r,i)}function I(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function L(t,e,n){t.on("start.zoom",(function(){R(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){R(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,i=R(t,r),o=m.apply(t,r),a=null==n?I(o):"function"==typeof n?n.apply(t,r):n,u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),f=t.__zoom,s="function"==typeof e?e.apply(t,r):e,l=S(f.invert(a).concat(u/f.k),s.invert(a).concat(u/s.k));return function(t){if(1===t)t=s;else{var e=l(t),n=u/e[2];t=new c(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}}))}function R(t,e,n){return!n&&t.__zooming||new z(t,e)}function z(t,e){this.that=t,this.args=e,this.active=0,this.extent=m.apply(t,e),this.taps=0}function D(){if(_.apply(this,arguments)){var t=R(this,arguments),e=this.__zoom,n=Math.max(E[0],Math.min(E[1],e.k*Math.pow(2,w.apply(this,arguments)))),r=i.mouse(this);if(t.wheel)t.mouse[0][0]===r[0]&&t.mouse[0][1]===r[1]||(t.mouse[1]=e.invert(t.mouse[0]=r)),clearTimeout(t.wheel);else{if(e.k===n)return;t.mouse=[r,e.invert(r)],o.interrupt(this),t.start()}h(),t.wheel=setTimeout(a,150),t.zoom("mouse",x(P(O(e,n),t.mouse[0],t.mouse[1]),t.extent,k))}function a(){t.wheel=null,t.end()}}function F(){if(!s&&_.apply(this,arguments)){var t=R(this,arguments,!0),e=i.select(i.event.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",f,!0),r=i.mouse(this),a=i.event.clientX,u=i.event.clientY;n.dragDisable(i.event.view),l(),t.mouse=[r,this.__zoom.invert(r)],o.interrupt(this),t.start()}function c(){if(h(),!t.moved){var e=i.event.clientX-a,n=i.event.clientY-u;t.moved=e*e+n*n>T}t.zoom("mouse",x(P(t.that.__zoom,t.mouse[0]=i.mouse(t.that),t.mouse[1]),t.extent,k))}function f(){e.on("mousemove.zoom mouseup.zoom",null),n.dragEnable(i.event.view,t.moved),h(),t.end()}}function B(){if(_.apply(this,arguments)){var t=this.__zoom,e=i.mouse(this),n=t.invert(e),r=t.k*(i.event.shiftKey?.5:2),o=x(P(O(t,r),e,n),m.apply(this,arguments),k);h(),A>0?i.select(this).transition().duration(A).call(L,o,e):i.select(this).call(C.transform,o)}}function q(){if(_.apply(this,arguments)){var e,n,r,a,u=i.event.touches,c=u.length,f=R(this,arguments,i.event.changedTouches.length===c);for(l(),n=0;n0;--c)if(r=e[c].dequeue()){i=i.concat(u(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(f,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function u(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),u=t.node(r.v);o&&a.push({v:r.v,w:r.w}),u.out-=i,c(e,n,u)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,c(e,n,a)})),t.removeNode(i.v),a}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},{"./data/list":65,"./graphlib":67,"./lodash":70}],69:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./acyclic"),o=t("./normalize"),a=t("./rank"),u=t("./util").normalizeRanks,c=t("./parent-dummy-chains"),f=t("./util").removeEmptyRanks,s=t("./nesting-graph"),l=t("./add-border-segments"),h=t("./coordinate-system"),d=t("./order"),p=t("./position"),v=t("./util"),y=t("./graphlib").Graph;e.exports=function(t,e){var n=e&&e.debugTiming?v.time:v.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=A(t.graph());return e.setGraph(r.merge({},b,k(n,g),r.pick(n,_))),r.forEach(t.nodes(),(function(n){var i=A(t.node(n));e.setNode(n,r.defaults(k(i,m),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=A(t.edge(n));e.setEdge(n,r.merge({},M,k(i,w),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){s.run(t)})),e(" rank",(function(){a(v.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};v.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){f(t)})),e(" nestingGraph.cleanup",(function(){s.cleanup(t)})),e(" normalizeRanks",(function(){u(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){l(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=v.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){v.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),u=t.node(r.last(n.borderRight));n.width=Math.abs(u.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),u=a.marginx||0,c=a.marginy||0;function f(t){var r=t.x,a=t.y,u=t.width,c=t.height;e=Math.min(e,r-u/2),n=Math.max(n,r+u/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}r.forEach(t.nodes(),(function(e){f(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&f(n)})),e-=u,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+u,a.height=o-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(v.intersectRect(o,n)),i.points.push(v.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var g=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],m=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function k(t,e){return r.mapValues(r.pick(t,e),Number)}function A(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},{"./acyclic":62,"./add-border-segments":63,"./coordinate-system":64,"./graphlib":67,"./lodash":70,"./nesting-graph":71,"./normalize":72,"./order":77,"./parent-dummy-chains":82,"./position":84,"./rank":86,"./util":89}],70:[function(t,e,n){var r;if("function"==typeof t)try{r={cloneDeep:t("lodash/cloneDeep"),constant:t("lodash/constant"),defaults:t("lodash/defaults"),each:t("lodash/each"),filter:t("lodash/filter"),find:t("lodash/find"),flatten:t("lodash/flatten"),forEach:t("lodash/forEach"),forIn:t("lodash/forIn"),has:t("lodash/has"),isUndefined:t("lodash/isUndefined"),last:t("lodash/last"),map:t("lodash/map"),mapValues:t("lodash/mapValues"),max:t("lodash/max"),merge:t("lodash/merge"),min:t("lodash/min"),minBy:t("lodash/minBy"),now:t("lodash/now"),pick:t("lodash/pick"),range:t("lodash/range"),reduce:t("lodash/reduce"),sortBy:t("lodash/sortBy"),uniqueId:t("lodash/uniqueId"),values:t("lodash/values"),zipObject:t("lodash/zipObject")}}catch(t){}r||(r=window._),e.exports=r},{"lodash/cloneDeep":287,"lodash/constant":288,"lodash/defaults":289,"lodash/each":290,"lodash/filter":292,"lodash/find":293,"lodash/flatten":295,"lodash/forEach":296,"lodash/forIn":297,"lodash/has":299,"lodash/isUndefined":318,"lodash/last":321,"lodash/map":322,"lodash/mapValues":323,"lodash/max":324,"lodash/merge":326,"lodash/min":327,"lodash/minBy":328,"lodash/now":330,"lodash/pick":331,"lodash/range":333,"lodash/reduce":334,"lodash/sortBy":336,"lodash/uniqueId":346,"lodash/values":347,"lodash/zipObject":348}],71:[function(t,e,n){var r=t("./lodash"),i=t("./util");function o(t,e,n,a,u,c,f){var s=t.children(f);if(s.length){var l=i.addBorderNode(t,"_bt"),h=i.addBorderNode(t,"_bb"),d=t.node(f);t.setParent(l,f),d.borderTop=l,t.setParent(h,f),d.borderBottom=h,r.forEach(s,(function(r){o(t,e,n,a,u,c,r);var i=t.node(r),s=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,v=s!==d?1:u-c[f]+1;t.setEdge(l,s,{weight:p,minlen:v,nestingEdge:!0}),t.setEdge(d,h,{weight:p,minlen:v,nestingEdge:!0})})),t.parent(f)||t.setEdge(e,l,{weight:0,minlen:u+c[f]})}else f!==e&&t.setEdge(e,f,{weight:0,minlen:n})}e.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)})),e[i]=o}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),a=r.max(r.values(n))-1,u=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=u}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){o(t,e,u,c,a,n,r)})),t.graph().nodeRankFactor=u},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},{"./lodash":70,"./util":89}],72:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./util");e.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,u=t.node(a).rank,c=e.w,f=t.node(c).rank,s=e.name,l=t.edge(e),h=l.labelRank;if(f===u+1)return;for(t.removeEdge(e),o=0,++u;u0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;f+=t.weight*n}))),f}e.exports=function(t,e){for(var n=0,r=1;r=2),u=s.buildLayerMatrix(t);var y=o(t,u);y=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},{"../lodash":70}],80:[function(t,e,n){var r=t("../lodash"),i=t("./barycenter"),o=t("./resolve-conflicts"),a=t("./sort");e.exports=function t(e,n,u,c){var f=e.children(n),s=e.node(n),l=s?s.borderLeft:void 0,h=s?s.borderRight:void 0,d={};l&&(f=r.filter(f,(function(t){return t!==l&&t!==h})));var p=i(e,f);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,u,c);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var v=o(p,u);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(v,d);var y=a(v,c);if(l&&(y.vs=r.flatten([l,y.vs,h],!0),e.predecessors(l).length)){var g=e.node(e.predecessors(l)[0]),b=e.node(e.predecessors(h)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+g.order+b.order)/(y.weight+2),y.weight+=2}return y}},{"../lodash":70,"./barycenter":74,"./resolve-conflicts":79,"./sort":81}],81:[function(t,e,n){var r=t("../lodash"),i=t("../util");function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}e.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),a=n.lhs,u=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],f=0,s=0,l=0;a.sort((h=!!e,function(t,e){return t.barycentere.barycenter?1:h?e.i-t.i:t.i-e.i})),l=o(c,u,l),r.forEach(a,(function(t){l+=t.vs.length,c.push(t.vs),f+=t.barycenter*t.weight,s+=t.weight,l=o(c,u,l)}));var h;var d={vs:r.flatten(c,!0)};s&&(d.barycenter=f/s,d.weight=s);return d}},{"../lodash":70,"../util":89}],82:[function(t,e,n){var r=t("./lodash");e.exports=function(t){var e=function(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],u=[],c=Math.min(e[n].low,e[r].low),f=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>c||f>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)u.push(i);return{path:a.concat(u.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,u=o.lca,c=0,f=a[c],s=!0;n!==i.w;){if(r=t.node(n),s){for(;(f=a[c])!==u&&t.node(f).maxRanku)&&c(n,e,f)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,u=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var f=t.predecessors(r);f.length&&(o=t.node(f[0]).order,i(n,u,c,a,o),u=c,a=o)}i(n,u,n.length,o,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function f(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function s(t,e,n,i){var o={},a={},u={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,u[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return u[t]}));for(var s=(c.length-1)/2,l=Math.floor(s),h=Math.ceil(s);l<=h;++l){var d=c[l];a[t]===t&&ec.lim&&(f=c,s=!0);var l=r.filter(e.edges(),(function(e){return s===b(t,t.node(e.v),f)&&s!==b(t,t.node(e.w),f)}));return r.minBy(l,(function(t){return o(e,t)}))}function g(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),l(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=u(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function b(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}e.exports=s,s.initLowLimValues=d,s.initCutValues=l,s.calcCutValue=h,s.leaveEdge=v,s.enterEdge=y,s.exchangeEdges=g},{"../graphlib":67,"../lodash":70,"../util":89,"./feasible-tree":85,"./util":88}],88:[function(t,e,n){"use strict";var r=t("../lodash");e.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},{"../lodash":70}],89:[function(t,e,n){"use strict";var r=t("./lodash"),i=t("./graphlib").Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,u=e.y-o,c=t.width/2,f=t.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*c>Math.abs(a)*f?(u<0&&(f=-f),n=f*a/u,r=f):(a<0&&(c=-c),n=c,r=c*u/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},{"./graphlib":67,"./lodash":70}],90:[function(t,e,n){e.exports="0.8.5"},{}],91:[function(t,e,n){var r=t("./lib");e.exports={Graph:r.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:r.version}},{"./lib":107,"./lib/alg":98,"./lib/json":108}],92:[function(t,e,n){var r=t("../lodash");e.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},{"../lodash":109}],93:[function(t,e,n){var r=t("../lodash");function i(t,e,n,o,a,u){r.has(o,e)||(o[e]=!0,n||u.push(e),r.each(a(e),(function(e){i(t,e,n,o,a,u)})),n&&u.push(e))}e.exports=function(t,e,n){r.isArray(e)||(e=[e]);var o=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],u={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,u,o,a)})),a}},{"../lodash":109}],94:[function(t,e,n){var r=t("./dijkstra"),i=t("../lodash");e.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},{"../lodash":109,"./dijkstra":95}],95:[function(t,e,n){var r=t("../lodash"),i=t("../data/priority-queue");e.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,u={},c=new i,f=function(t){var e=t.v!==o?t.v:t.w,r=u[e],i=n(t),f=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);f0&&(o=c.removeMin(),(a=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(f);return u}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},{"../data/priority-queue":105,"../lodash":109}],96:[function(t,e,n){var r=t("../lodash"),i=t("./tarjan");e.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},{"../lodash":109,"./tarjan":103}],97:[function(t,e,n){var r=t("../lodash");e.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],u=r.distance+i.distance;u0;){if(n=c.removeMin(),r.has(u,n))a.setEdge(n,u[n]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(n).forEach(f)}return a}},{"../data/priority-queue":105,"../graph":106,"../lodash":109}],103:[function(t,e,n){var r=t("../lodash");e.exports=function(t){var e=0,n=[],i={},o=[];function a(u){var c=i[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(a(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var f,s=[];do{f=n.pop(),i[f].onStack=!1,s.push(f)}while(u!==f);o.push(s)}}return t.nodes().forEach((function(t){r.has(i,t)||a(t)})),o}},{"../lodash":109}],104:[function(t,e,n){var r=t("../lodash");function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(u){if(r.has(n,u))throw new o;r.has(e,u)||(n[u]=!0,e[u]=!0,r.each(t.predecessors(u),a),delete n[u],i.push(u))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}e.exports=i,i.CycleException=o,o.prototype=new Error},{"../lodash":109}],105:[function(t,e,n){var r=t("../lodash");function i(){this._arr=[],this._keyIndices={}}e.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1].prioritya){var u=o;o=a,a=u}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function f(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var u={v:i,w:o};return r&&(u.name=r),u}function s(t,e){return c(t,e.v,e.w,e.name)}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(t){return this._label=t,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return r.keys(this._nodes)},o.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},o.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},o.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},o.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},o.prototype.node=function(t){return this._nodes[t]},o.prototype.hasNode=function(t){return r.has(this._nodes,t)},o.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},o.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},o.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},o.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},o.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},o.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},o.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},o.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},o.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},o.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function o(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:o(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,o(t))})),e},o.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return r.values(this._edgeObjs)},o.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},o.prototype.setEdge=function(){var t,e,n,i,o=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,e=u.w,n=u.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=u,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var s=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,s))return o&&(this._edgeLabels[s]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=o?i:this._defaultEdgeLabelFn(t,e,n);var l=f(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[s]=l,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][s]=l,this._out[t][s]=l,this._edgeCount++,this},o.prototype.edge=function(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?s(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},o.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?s(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],u(this._preds[e],t),u(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},o.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},o.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},o.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},{"./lodash":109}],107:[function(t,e,n){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":106,"./version":110}],108:[function(t,e,n){var r=t("./lodash"),i=t("./graph");function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}e.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},{"./graph":106,"./lodash":109}],109:[function(t,e,n){var r;if("function"==typeof t)try{r={clone:t("lodash/clone"),constant:t("lodash/constant"),each:t("lodash/each"),filter:t("lodash/filter"),has:t("lodash/has"),isArray:t("lodash/isArray"),isEmpty:t("lodash/isEmpty"),isFunction:t("lodash/isFunction"),isUndefined:t("lodash/isUndefined"),keys:t("lodash/keys"),map:t("lodash/map"),reduce:t("lodash/reduce"),size:t("lodash/size"),transform:t("lodash/transform"),union:t("lodash/union"),values:t("lodash/values")}}catch(t){}r||(r=window._),e.exports=r},{"lodash/clone":286,"lodash/constant":288,"lodash/each":290,"lodash/filter":292,"lodash/has":299,"lodash/isArray":303,"lodash/isEmpty":307,"lodash/isFunction":308,"lodash/isUndefined":318,"lodash/keys":319,"lodash/map":322,"lodash/reduce":334,"lodash/size":335,"lodash/transform":344,"lodash/union":345,"lodash/values":347}],110:[function(t,e,n){e.exports="2.1.8"},{}],111:[function(t,e,n){var r=t("./_getNative")(t("./_root"),"DataView");e.exports=r},{"./_getNative":223,"./_root":268}],112:[function(t,e,n){var r=t("./_hashClear"),i=t("./_hashDelete"),o=t("./_hashGet"),a=t("./_hashHas"),u=t("./_hashSet");function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1}},{"./_baseIndexOf":155}],127:[function(t,e,n){e.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r0&&o(s)?n>1?t(s,n-1,o,a,u):r(u,s):a||(u[u.length]=s)}return u}},{"./_arrayPush":130,"./_isFlattenable":240}],147:[function(t,e,n){var r=t("./_createBaseFor")();e.exports=r},{"./_createBaseFor":209}],148:[function(t,e,n){var r=t("./_baseFor"),i=t("./keys");e.exports=function(t,e){return t&&r(t,e,i)}},{"./_baseFor":147,"./keys":319}],149:[function(t,e,n){var r=t("./_castPath"),i=t("./_toKey");e.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&ne}},{}],153:[function(t,e,n){var r=Object.prototype.hasOwnProperty;e.exports=function(t,e){return null!=t&&r.call(t,e)}},{}],154:[function(t,e,n){e.exports=function(t,e){return null!=t&&e in Object(t)}},{}],155:[function(t,e,n){var r=t("./_baseFindIndex"),i=t("./_baseIsNaN"),o=t("./_strictIndexOf");e.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},{"./_baseFindIndex":145,"./_baseIsNaN":161,"./_strictIndexOf":280}],156:[function(t,e,n){var r=t("./_baseGetTag"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},{"./_baseGetTag":151,"./isObjectLike":312}],157:[function(t,e,n){var r=t("./_baseIsEqualDeep"),i=t("./isObjectLike");e.exports=function t(e,n,o,a,u){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,u))}},{"./_baseIsEqualDeep":158,"./isObjectLike":312}],158:[function(t,e,n){var r=t("./_Stack"),i=t("./_equalArrays"),o=t("./_equalByTag"),a=t("./_equalObjects"),u=t("./_getTag"),c=t("./isArray"),f=t("./isBuffer"),s=t("./isTypedArray"),l="[object Arguments]",h="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(t,e,n,v,y,g){var b=c(t),_=c(e),m=b?h:u(t),x=_?h:u(e),w=(m=m==l?d:m)==d,M=(x=x==l?d:x)==d,E=m==x;if(E&&f(t)){if(!f(e))return!1;b=!0,w=!1}if(E&&!w)return g||(g=new r),b||s(t)?i(t,e,n,v,y,g):o(t,e,m,n,v,y,g);if(!(1&n)){var k=w&&p.call(t,"__wrapped__"),A=M&&p.call(e,"__wrapped__");if(k||A){var S=k?t.value():t,j=A?e.value():e;return g||(g=new r),y(S,j,n,v,g)}}return!!E&&(g||(g=new r),a(t,e,n,v,y,g))}},{"./_Stack":119,"./_equalArrays":214,"./_equalByTag":215,"./_equalObjects":216,"./_getTag":228,"./isArray":303,"./isBuffer":306,"./isTypedArray":317}],159:[function(t,e,n){var r=t("./_getTag"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&"[object Map]"==r(t)}},{"./_getTag":228,"./isObjectLike":312}],160:[function(t,e,n){var r=t("./_Stack"),i=t("./_baseIsEqual");e.exports=function(t,e,n,o){var a=n.length,u=a,c=!o;if(null==t)return!u;for(t=Object(t);a--;){var f=n[a];if(c&&f[2]?f[1]!==t[f[0]]:!(f[0]in t))return!1}for(;++a=200){var v=e?null:u(t);if(v)return c(v);h=!1,s=a,p=new r}else p=e?[]:d;t:for(;++fe||a&&u&&f&&!c&&!s||i&&u&&f||!n&&f||!o)return 1;if(!i&&!a&&!s&&t=c?f:f*("desc"==n[i]?-1:1)}return t.index-e.index}},{"./_compareAscending":200}],202:[function(t,e,n){e.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,u&&i(n[0],n[1],u)&&(a=o<3?void 0:a,o=1),e=Object(e);++r-1?u[c?e[f]:f]:void 0}}},{"./_baseIteratee":165,"./isArrayLike":304,"./keys":319}],211:[function(t,e,n){var r=t("./_baseRange"),i=t("./_isIterateeCall"),o=t("./toFinite");e.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?es))return!1;var h=c.get(t);if(h&&c.get(e))return h==e;var d=-1,p=!0,v=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d-1&&t%1==0&&t-1}},{"./_assocIndexOf":136}],252:[function(t,e,n){var r=t("./_assocIndexOf");e.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},{"./_assocIndexOf":136}],253:[function(t,e,n){var r=t("./_Hash"),i=t("./_ListCache"),o=t("./_Map");e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},{"./_Hash":112,"./_ListCache":113,"./_Map":114}],254:[function(t,e,n){var r=t("./_getMapData");e.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},{"./_getMapData":221}],255:[function(t,e,n){var r=t("./_getMapData");e.exports=function(t){return r(this,t).get(t)}},{"./_getMapData":221}],256:[function(t,e,n){var r=t("./_getMapData");e.exports=function(t){return r(this,t).has(t)}},{"./_getMapData":221}],257:[function(t,e,n){var r=t("./_getMapData");e.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},{"./_getMapData":221}],258:[function(t,e,n){e.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},{}],259:[function(t,e,n){e.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},{}],260:[function(t,e,n){var r=t("./memoize");e.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},{"./memoize":325}],261:[function(t,e,n){var r=t("./_getNative")(Object,"create");e.exports=r},{"./_getNative":223}],262:[function(t,e,n){var r=t("./_overArg")(Object.keys,Object);e.exports=r},{"./_overArg":266}],263:[function(t,e,n){e.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},{}],264:[function(t,e,n){var r=t("./_freeGlobal"),i="object"==typeof n&&n&&!n.nodeType&&n,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=u},{"./_freeGlobal":218}],265:[function(t,e,n){var r=Object.prototype.toString;e.exports=function(t){return r.call(t)}},{}],266:[function(t,e,n){e.exports=function(t,e){return function(n){return t(e(n))}}},{}],267:[function(t,e,n){var r=t("./_apply"),i=Math.max;e.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,u=i(o.length-e,0),c=Array(u);++a0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},{}],275:[function(t,e,n){var r=t("./_ListCache");e.exports=function(){this.__data__=new r,this.size=0}},{"./_ListCache":113}],276:[function(t,e,n){e.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},{}],277:[function(t,e,n){e.exports=function(t){return this.__data__.get(t)}},{}],278:[function(t,e,n){e.exports=function(t){return this.__data__.has(t)}},{}],279:[function(t,e,n){var r=t("./_ListCache"),i=t("./_Map"),o=t("./_MapCache");e.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},{"./_ListCache":113,"./_Map":114,"./_MapCache":115}],280:[function(t,e,n){e.exports=function(t,e,n){for(var r=n-1,i=t.length;++r2?e[2]:void 0;for(f&&o(e[0],e[1],f)&&(r=1);++n-1&&t%1==0&&t<=9007199254740991}},{}],310:[function(t,e,n){var r=t("./_baseIsMap"),i=t("./_baseUnary"),o=t("./_nodeUtil"),a=o&&o.isMap,u=a?i(a):r;e.exports=u},{"./_baseIsMap":159,"./_baseUnary":187,"./_nodeUtil":264}],311:[function(t,e,n){e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},{}],312:[function(t,e,n){e.exports=function(t){return null!=t&&"object"==typeof t}},{}],313:[function(t,e,n){var r=t("./_baseGetTag"),i=t("./_getPrototype"),o=t("./isObjectLike"),a=Function.prototype,u=Object.prototype,c=a.toString,f=u.hasOwnProperty,s=c.call(Object);e.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=f.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==s}},{"./_baseGetTag":151,"./_getPrototype":224,"./isObjectLike":312}],314:[function(t,e,n){var r=t("./_baseIsSet"),i=t("./_baseUnary"),o=t("./_nodeUtil"),a=o&&o.isSet,u=a?i(a):r;e.exports=u},{"./_baseIsSet":163,"./_baseUnary":187,"./_nodeUtil":264}],315:[function(t,e,n){var r=t("./_baseGetTag"),i=t("./isArray"),o=t("./isObjectLike");e.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},{"./_baseGetTag":151,"./isArray":303,"./isObjectLike":312}],316:[function(t,e,n){var r=t("./_baseGetTag"),i=t("./isObjectLike");e.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},{"./_baseGetTag":151,"./isObjectLike":312}],317:[function(t,e,n){var r=t("./_baseIsTypedArray"),i=t("./_baseUnary"),o=t("./_nodeUtil"),a=o&&o.isTypedArray,u=a?i(a):r;e.exports=u},{"./_baseIsTypedArray":164,"./_baseUnary":187,"./_nodeUtil":264}],318:[function(t,e,n){e.exports=function(t){return void 0===t}},{}],319:[function(t,e,n){var r=t("./_arrayLikeKeys"),i=t("./_baseKeys"),o=t("./isArrayLike");e.exports=function(t){return o(t)?r(t):i(t)}},{"./_arrayLikeKeys":128,"./_baseKeys":166,"./isArrayLike":304}],320:[function(t,e,n){var r=t("./_arrayLikeKeys"),i=t("./_baseKeysIn"),o=t("./isArrayLike");e.exports=function(t){return o(t)?r(t,!0):i(t)}},{"./_arrayLikeKeys":128,"./_baseKeysIn":167,"./isArrayLike":304}],321:[function(t,e,n){e.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},{}],322:[function(t,e,n){var r=t("./_arrayMap"),i=t("./_baseIteratee"),o=t("./_baseMap"),a=t("./isArray");e.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},{"./_arrayMap":129,"./_baseIteratee":165,"./_baseMap":169,"./isArray":303}],323:[function(t,e,n){var r=t("./_baseAssignValue"),i=t("./_baseForOwn"),o=t("./_baseIteratee");e.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},{"./_baseAssignValue":139,"./_baseForOwn":148,"./_baseIteratee":165}],324:[function(t,e,n){var r=t("./_baseExtremum"),i=t("./_baseGt"),o=t("./identity");e.exports=function(t){return t&&t.length?r(t,o,i):void 0}},{"./_baseExtremum":143,"./_baseGt":152,"./identity":301}],325:[function(t,e,n){var r=t("./_MapCache");function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},{"./_MapCache":115}],326:[function(t,e,n){var r=t("./_baseMerge"),i=t("./_createAssigner")((function(t,e,n){r(t,e,n)}));e.exports=i},{"./_baseMerge":172,"./_createAssigner":207}],327:[function(t,e,n){var r=t("./_baseExtremum"),i=t("./_baseLt"),o=t("./identity");e.exports=function(t){return t&&t.length?r(t,o,i):void 0}},{"./_baseExtremum":143,"./_baseLt":168,"./identity":301}],328:[function(t,e,n){var r=t("./_baseExtremum"),i=t("./_baseIteratee"),o=t("./_baseLt");e.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},{"./_baseExtremum":143,"./_baseIteratee":165,"./_baseLt":168}],329:[function(t,e,n){e.exports=function(){}},{}],330:[function(t,e,n){var r=t("./_root");e.exports=function(){return r.Date.now()}},{"./_root":268}],331:[function(t,e,n){var r=t("./_basePick"),i=t("./_flatRest")((function(t,e){return null==t?{}:r(t,e)}));e.exports=i},{"./_basePick":175,"./_flatRest":217}],332:[function(t,e,n){var r=t("./_baseProperty"),i=t("./_basePropertyDeep"),o=t("./_isKey"),a=t("./_toKey");e.exports=function(t){return o(t)?r(a(t)):i(t)}},{"./_baseProperty":177,"./_basePropertyDeep":178,"./_isKey":243,"./_toKey":283}],333:[function(t,e,n){var r=t("./_createRange")();e.exports=r},{"./_createRange":211}],334:[function(t,e,n){var r=t("./_arrayReduce"),i=t("./_baseEach"),o=t("./_baseIteratee"),a=t("./_baseReduce"),u=t("./isArray");e.exports=function(t,e,n){var c=u(t)?r:a,f=arguments.length<3;return c(t,o(e,4),n,f,i)}},{"./_arrayReduce":131,"./_baseEach":142,"./_baseIteratee":165,"./_baseReduce":180,"./isArray":303}],335:[function(t,e,n){var r=t("./_baseKeys"),i=t("./_getTag"),o=t("./isArrayLike"),a=t("./isString"),u=t("./_stringSize");e.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?u(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},{"./_baseKeys":166,"./_getTag":228,"./_stringSize":281,"./isArrayLike":304,"./isString":315}],336:[function(t,e,n){var r=t("./_baseFlatten"),i=t("./_baseOrderBy"),o=t("./_baseRest"),a=t("./_isIterateeCall"),u=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));e.exports=u},{"./_baseFlatten":146,"./_baseOrderBy":174,"./_baseRest":181,"./_isIterateeCall":242}],337:[function(t,e,n){e.exports=function(){return[]}},{}],338:[function(t,e,n){e.exports=function(){return!1}},{}],339:[function(t,e,n){var r=t("./toNumber"),i=1/0;e.exports=function(t){return t?(t=r(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},{"./toNumber":341}],340:[function(t,e,n){var r=t("./toFinite");e.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},{"./toFinite":339}],341:[function(t,e,n){var r=t("./isObject"),i=t("./isSymbol"),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;e.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=u.test(t);return n||c.test(t)?f(t.slice(2),n?2:8):a.test(t)?NaN:+t}},{"./isObject":311,"./isSymbol":316}],342:[function(t,e,n){var r=t("./_copyObject"),i=t("./keysIn");e.exports=function(t){return r(t,i(t))}},{"./_copyObject":203,"./keysIn":320}],343:[function(t,e,n){var r=t("./_baseToString");e.exports=function(t){return null==t?"":r(t)}},{"./_baseToString":186}],344:[function(t,e,n){var r=t("./_arrayEach"),i=t("./_baseCreate"),o=t("./_baseForOwn"),a=t("./_baseIteratee"),u=t("./_getPrototype"),c=t("./isArray"),f=t("./isBuffer"),s=t("./isFunction"),l=t("./isObject"),h=t("./isTypedArray");e.exports=function(t,e,n){var d=c(t),p=d||f(t)||h(t);if(e=a(e,4),null==n){var v=t&&t.constructor;n=p?d?new v:[]:l(t)&&s(v)?i(u(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},{"./_arrayEach":124,"./_baseCreate":141,"./_baseForOwn":148,"./_baseIteratee":165,"./_getPrototype":224,"./isArray":303,"./isBuffer":306,"./isFunction":308,"./isObject":311,"./isTypedArray":317}],345:[function(t,e,n){var r=t("./_baseFlatten"),i=t("./_baseRest"),o=t("./_baseUniq"),a=t("./isArrayLikeObject"),u=i((function(t){return o(r(t,1,a,!0))}));e.exports=u},{"./_baseFlatten":146,"./_baseRest":181,"./_baseUniq":188,"./isArrayLikeObject":305}],346:[function(t,e,n){var r=t("./toString"),i=0;e.exports=function(t){var e=++i;return r(t)+e}},{"./toString":343}],347:[function(t,e,n){var r=t("./_baseValues"),i=t("./keys");e.exports=function(t){return null==t?[]:r(t,i(t))}},{"./_baseValues":189,"./keys":319}],348:[function(t,e,n){var r=t("./_assignValue"),i=t("./_baseZipObject");e.exports=function(t,e){return i(t||[],e||[],r)}},{"./_assignValue":135,"./_baseZipObject":190}]},{},[1])(1)}));