!function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;aa){var u=e.window;if(u.scrollX||u.scrollY){r=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var s=r.node().getScreenCTM();a=!(s.f||s.e),r.remove()}}return a?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var l=t.getBoundingClientRect();return[n.clientX-l.left-t.clientLeft,n.clientY-l.top-t.clientTop]}function i(){for(var t,n=e.d3.event;t=n.sourceEvent;)n=t;return n}var o=t("./selection"),a=e.navigator&&/WebKit/.test(e.navigator.userAgent)?-1:0;n.mouse=function(t,e){return arguments.length<2&&(e=i()),e.changedTouches&&(e=e.changedTouches[0]),r(t,e)},n.touch=function(t,e,n){arguments.length<3&&(n=e,e=i().changedTouches);for(var o,a=0,u=e?e.length:0;u>a;++a)if((o=e[a]).identifier===n)return r(t,o);return null},n.touches=function(t,e){arguments.length<2&&(e=i().touches);for(var n=0,o=e?e.length:0,a=new Array(o);o>n;++n)a[n]=r(t,e[n]);return a}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./selection":3}],2:[function(t,e,n){var r=n.prefix={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};n.qualify=function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.slice(0,e),t=t.slice(e+1)),r.hasOwnProperty(n)?{space:r[n],local:t}:t}},{}],3:[function(t,e,n){(function(n){function r(t,e){t._parent=null,this._root=t,this._depth=e}function i(t,e){r.call(this,t,e)}function o(t){this.__data__=t}function a(t){return(t+"").trim().split(/^|\s+/)}function u(){}function s(t){return"function"==typeof t?t:function(){return this.querySelector(t)}}function l(t){return"function"==typeof t?t:function(){return this.querySelectorAll(t)}}function c(t){return"function"==typeof t?t:function(){return this.matches(t)}}function f(t){return"function"==typeof t?t:function(){return t}}function h(t){function e(){var e=this.ownerDocument,n=this.namespaceURI;return n?e.createElementNS(n,t):e.createElement(t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=A.qualify(t)).local?n:e}function p(t){return Array.isArray(t)?t:S.call(t)}function _(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function d(t){return new RegExp("(?:^|\\s+)"+w(t)+"(?:\\s+|$)","g")}function g(t){var e=d(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",m(i+" "+t))):n.setAttribute("class",m(i.replace(e," ")))}}function v(t,e){return function(r){var i=n.d3.event;n.d3.event=r,e[0]=this.__data__;try{t.apply(this,e)}finally{n.d3.event=i}}}function y(t,e){var n=v(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function m(t){return t.trim().replace(/\s+/g," ")}function w(t){return t.replace(T,"\\$&")}var A=t("./namespace"),b=n.document,x=n.CustomEvent,E=n.Map,S=[].slice,C={mouseenter:"mouseover",mouseleave:"mouseout"},T=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;!function(){if(b){for(var t in C)"on"+t in b&&delete C[t];x||(x=function(t,e){var n=b.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n},x.prototype=n.Event.prototype),E||(E=function(){},E.prototype={set:function(t,e){return this["$"+t]=e,this},get:function(t){return this["$"+t]},has:function(t){return"$"+t in this}})}}(),r.prototype={select:function(t){function e(n,r){var o,a,u=-1,s=n.length,l=new Array(s),c=2*--r,f=c+1;if(r)for(;++ur;++r)(n=t[r])?n.__data__=e[r]:i[r]=new o(e[r]);for(;s>r;++r)i[r]=new o(e[r]);for(;u>r;++r)(n=t[r])&&(a[r]=t[r]);t.length=s}function i(t,n){var r,i,a,u=t._enter,s=t._exit,l=n.length,f=t.length,h=new E,p=new Array(f);for(u.length=0,u.length=l,s.length=0,s.length=f,r=0;f>r;++r)i=t[r],c[0]=i.__data__,c[1]=r,p[r]=a=e.apply(i,c),h.has(a)?(delete t[r],s[r]=i):h.set(a,i);for(t.length=0,t.length=l,r=0;l>r;++r)c[0]=n[r],c[1]=r,a=e.apply(n,c),(i=h.get(a))?i!==!0&&(t[r]=i,i.__data__=n[r]):u[r]=new o(n[r]),h.set(a,!0);for(r=0;f>r;++r)(i=h.get(p[r]))!==!0&&(s[r]=i)}if(!arguments.length){var a=new Array(this.size()),u=-1;return this.each(function(t){a[++u]=t}),a}var s=this._depth-1,l=new Array(2*s),c=new Array(2*s+2),h=e?i:r;return this.enter(),this.exit(),t=f(t),n(this._root,s),this},enter:function(){function t(e,n){var r,i,o=-1,a=e.length,u=new Array(a);if(--n)for(;++oa?_(a=this.node()).getComputedStyle(a,null).getPropertyValue(t):(3>a&&(n=""),this.each(null==e?r:"function"==typeof e?o:i))},property:function(t,e){function n(){delete this[t]}function r(){this[t]=e}function i(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return arguments.length<2?this.node()[t]:this.each(null==e?n:"function"==typeof e?i:r)},"class":function(t,e){function n(){for(var n=-1;++na?(a=this.node()[s])&&a._:(3>a&&(n=!1),(a=t.indexOf("."))>0&&(t=t.slice(0,a)),C.hasOwnProperty(t)&&(l=y,t=C[t]),this.each(e?a?r:u:a?i:o))},dispatch:function(t,e){function n(){return this.dispatchEvent(new x(t,e))}function r(){return this.dispatchEvent(new x(t,e.apply(this,arguments)))}return this.each("function"==typeof e?r:n)},call:function(t){var e=S.call(arguments);return t.apply(e[0]=this,e),this},empty:function(){return!this.node()},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){function t(e,n){var r,i=-1,o=e.length;if(--n){for(;++i