!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.donut=n():(t.britecharts=t.britecharts||{},t.britecharts.donut=n())}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=97)}([function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=new Date,i=new Date;function o(t,n,e,u){function a(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return a.floor=function(n){return t(n=new Date(+n)),n},a.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},a.round=function(t){var n=a(t),e=a.ceil(t);return t-n0))return u;do{u.push(o=new Date(+e)),n(e,i),t(e)}while(o=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(a.count=function(n,o){return r.setTime(+n),i.setTime(+o),t(r),t(i),Math.floor(e(r,i))},a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?a.filter(u?function(n){return u(n)%t==0}:function(n){return a.count(0,n)%t==0}):a:null}),a}},function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return u})),e.d(n,"e",(function(){return a}));var r=1e3,i=6e4,o=36e5,u=864e5,a=6048e5},function(t,n,e){"use strict";e.r(n);var r=function(t,n){return tn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var o=i(r),u=o.right,a=o.left,c=u,s=function(t,n){null==n&&(n=f);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,c=0;if(null==n)for(;++u1)return c/(o-1)},_=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},y=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=M?10:o>=T?5:o>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=M?10:o>=T?5:o>=O?2:1)}function S(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=M?i*=10:o>=T?i*=5:o>=O&&(i*=2),nl;)h.pop(),--d;var p,_=new Array(d+1);for(i=0;i<=d;++i)(p=_[i]=[]).x0=i>0?h[i-1]:f,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}},E=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(j(t,.75)-j(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,n,e){return Math.ceil((e-n)/(3.5*_(t)*Math.pow(t.length,-1/3)))},F=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},P=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e},U=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r},R=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},q=function(t,n){if(e=t.length){var e,i,o=0,u=0,a=t[u];for(null==n&&(n=r);++o>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new O(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new O(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=l.exec(t))?new O(n[1],n[2],n[3],1):(n=h.exec(t))?new O(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=d.exec(t))?w(n[1],n[2],n[3],n[4]):(n=p.exec(t))?w(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=_.exec(t))?k(n[1],n[2]/100,n[3]/100,1):(n=y.exec(t))?k(n[1],n[2]/100,n[3]/100,n[4]):g.hasOwnProperty(t)?b(g[t]):"transparent"===t?new O(NaN,NaN,NaN,0):null}function b(t){return new O(t>>16&255,t>>8&255,255&t,1)}function w(t,n,e,r){return r<=0&&(t=n=e=NaN),new O(t,n,e,r)}function M(t){return t instanceof i||(t=x(t)),t?new O((t=t.rgb()).r,t.g,t.b,t.opacity):new O}function T(t,n,e,r){return 1===arguments.length?M(t):new O(t,n,e,null==r?1:r)}function O(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function A(){return"#"+S(this.r)+S(this.g)+S(this.b)}function C(){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 k(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new E(t,n,e,r)}function N(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=x(t)),!t)return new E;if(t instanceof E)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,o=Math.min(n,e,r),u=Math.max(n,e,r),a=NaN,c=u-o,s=(u+o)/2;return c?(a=n===u?(e-r)/c+6*(e0&&s<1?0:a,new E(a,c,s,t.opacity)}function j(t,n,e,r){return 1===arguments.length?N(t):new E(t,n,e,null==r?1:r)}function E(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function D(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Object(r.a)(i,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return N(this).formatHsl()},formatRgb:m,toString:m}),Object(r.a)(O,T,Object(r.b)(i,{brighter:function(t){return t=null==t?u:Math.pow(u,t),new O(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new O(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:A,formatHex:A,formatRgb:C,toString:C})),Object(r.a)(E,j,Object(r.b)(i,{brighter:function(t){return t=null==t?u:Math.pow(u,t),new E(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new E(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new O(D(t>=240?t-240:t+120,i,r),D(t,i,r),D(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+")")}}))},function(t,n,e){"use strict";var r=e(18);n.a=function(t){return(t=Object(r.a)(Math.abs(t)))?t[1]:NaN}},function(t,n,e){"use strict";var r=e(19),i=e(33),o=e(34),u=function(t){return new Array(t.length)};function a(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}a.prototype={constructor:a,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function c(t,n,e,r,i,o){for(var u,c=0,s=n.length,f=o.length;cn?1:t>=n?0:NaN}var l=e(20);function h(t){return function(){this.removeAttribute(t)}}function d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function p(t,n){return function(){this.setAttribute(t,n)}}function _(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function g(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var v=e(35);function m(t){return function(){delete this[t]}}function x(t,n){return function(){this[t]=n}}function b(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function w(t){return t.trim().split(/^|\s+/)}function M(t){return t.classList||new T(t)}function T(t){this._node=t,this._names=w(t.getAttribute("class")||"")}function O(t,n){for(var e=M(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function N(){this.textContent=""}function j(t){return function(){this.textContent=t}}function E(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function D(){this.innerHTML=""}function F(t){return function(){this.innerHTML=t}}function P(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function L(){this.nextSibling&&this.parentNode.appendChild(this)}function I(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var U=e(12);function R(){return null}function q(){var t=this.parentNode;t&&t.removeChild(this)}function H(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function B(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var Y=e(17),z=e(21);function G(t,n,e){var r=Object(z.a)(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function X(t,n){return function(){return G(this,t,n)}}function V(t,n){return function(){return G(this,t,n.apply(this,arguments))}}e.d(n,"c",(function(){return W})),e.d(n,"a",(function(){return $}));var W=[null];function $(t,n){this._groups=t,this._parents=n}function Z(){return new $([[document.documentElement]],W)}$.prototype=Z.prototype={constructor:$,select:function(t){"function"!=typeof t&&(t=Object(r.a)(t));for(var n=this._groups,e=n.length,i=new Array(e),o=0;o=M&&(M=w+1);!(b=m[M])&&++M=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=f);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?m:"function"==typeof n?b:x)(t,n)):this.node()[t]},classed:function(t,n){var e=w(t+"");if(arguments.length<2){for(var r=M(this.node()),i=-1,o=e.length;++i180||e<-180?e-360*Math.round(e/360):e):Object(r.a)(isNaN(t)?n:t)}function u(t){return 1==(t=+t)?a:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Object(r.a)(isNaN(n)?e:n)}}function a(t,n){var e=n-t;return e?i(t,e):Object(r.a)(isNaN(t)?n:t)}},function(t,n,e){"use strict";function r(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}e.d(n,"b",(function(){return r})),n.a=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t}},function(t,n,e){"use strict";var r=e(20),i=e(14);function o(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===i.b&&n.documentElement.namespaceURI===i.b?n.createElement(t):n.createElementNS(e,t)}}function u(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}n.a=function(t){var n=Object(r.a)(t);return(n.local?u:o)(n)}},function(t,n,e){"use strict";n.a=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}},function(t,n,e){"use strict";e.d(n,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";n.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,n,e){"use strict";e.d(n,"b",(function(){return o}));var r=e(0),i=Object(r.a)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null},n.a=i;var o=i.range},function(t,n,e){"use strict";e.d(n,"b",(function(){return o}));var r=e(0),i=Object(r.a)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null},n.a=i;var o=i.range},function(t,n,e){"use strict";e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return f}));var r={},i=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(r={mouseenter:"mouseover",mouseleave:"mouseout"}));function o(t,n,e){return t=u(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function u(t,n,e){return function(r){var o=i;i=r;try{t.call(this,this.__data__,n,e)}finally{i=o}}}function a(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function c(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r1?r[0]+r.slice(2):r,+t.slice(e+1)]}},function(t,n,e){"use strict";function r(){}n.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,n,e){"use strict";var r=e(14);n.a=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),r.a.hasOwnProperty(n)?{space:r.a[n],local:t}:t}},function(t,n,e){"use strict";n.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,n,e){"use strict";var r=e(17);n.a=function(){for(var t,n=r.c;t=n.sourceEvent;)n=t;return n}},function(t,n,e){"use strict";n.a=function(t){return function(){return t}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return o}));var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(t){if(!(n=r.exec(t)))throw new Error("invalid format: "+t);var n;return new o({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function o(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+""}i.prototype=o.prototype,o.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}},function(t,n,e){"use strict";function r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}e.d(n,"b",(function(){return r})),n.a=function(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e=1?(e=1,n-1):Math.floor(e*n),o=t[i],u=t[i+1],a=i>0?t[i-1]:2*o-u,c=i0?t>1?Object(r.a)((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):i:null},n.a=i;var o=i.range},function(t,n,e){"use strict";var r=e(9);n.a=function(t){return"string"==typeof t?new r.a([[document.querySelector(t)]],[document.documentElement]):new r.a([[t]],r.c)}},function(t,n,e){"use strict";function r(){return[]}n.a=function(t){return null==t?r:function(){return this.querySelectorAll(t)}}},function(t,n,e){"use strict";n.a=function(t){return function(){return this.matches(t)}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return a}));var r=e(21);function i(t){return function(){this.style.removeProperty(t)}}function o(t,n,e){return function(){this.style.setProperty(t,n,e)}}function u(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function a(t,n){return t.style.getPropertyValue(n)||Object(r.a)(t).getComputedStyle(t,null).getPropertyValue(n)}n.a=function(t,n,e){return arguments.length>1?this.each((null==n?i:"function"==typeof n?u:o)(t,n,null==e?"":e)):a(this.node(),t)}},function(t,n,e){"use strict";var r=e(7),i=e(39),o=e(57),u=e(56),a=e(5),c=e(58),s=e(55),f=e(23),l=e(25);n.a=function(t,n){var e,h=typeof n;return null==n||"boolean"===h?Object(f.a)(n):("number"===h?a.a:"string"===h?(e=Object(r.e)(n))?(n=e,i.a):s.a:n instanceof r.e?i.a:n instanceof Date?u.a:Object(l.b)(n)?l.a:Array.isArray(n)?o.b:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?c.a:a.a)(t,n)}},function(t,n,e){"use strict";var r,i=e(8),o=e(24),u=e(18),a=function(t,n){var e=Object(u.a)(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},c={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return a(100*t,n)},r:a,s:function(t,n){var e=Object(u.a)(t,n);if(!e)return t+"";var i=e[0],o=e[1],a=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Object(u.a)(t,Math.max(0,n+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},s=function(t){return t},f=Array.prototype.map,l=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"];n.a=function(t){var n,e,u=void 0===t.grouping||void 0===t.thousands?s:(n=f.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),a=void 0===t.currency?"":t.currency[0]+"",h=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?s:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(f.call(t.numerals,String)),_=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",g=void 0===t.nan?"NaN":t.nan+"";function v(t){var n=(t=Object(o.b)(t)).fill,e=t.align,i=t.sign,s=t.symbol,f=t.zero,v=t.width,m=t.comma,x=t.precision,b=t.trim,w=t.type;"n"===w?(m=!0,w="g"):c[w]||(void 0===x&&(x=12),b=!0,w="g"),(f||"0"===n&&"="===e)&&(f=!0,n="0",e="=");var M="$"===s?a:"#"===s&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===s?h:/[%p]/.test(w)?_:"",O=c[w],A=/[defgprs%]/.test(w);function C(t){var o,a,c,s=M,h=T;if("c"===w)h=O(t)+h,t="";else{var _=(t=+t)<0;if(t=isNaN(t)?g:O(Math.abs(t),x),b&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),_&&0==+t&&(_=!1),s=(_?"("===i?i:y:"-"===i||"("===i?"":i)+s,h=("s"===w?l[8+r/3]:"")+h+(_&&"("===i?")":""),A)for(o=-1,a=t.length;++o(c=t.charCodeAt(o))||c>57){h=(46===c?d+t.slice(o+1):t.slice(o))+h,t=t.slice(0,o);break}}m&&!f&&(t=u(t,1/0));var C=s.length+t.length+h.length,S=C>1)+s+t+h+S.slice(C);break;default:t=S+s+t+h}return p(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),C.toString=function(){return t+""},C}return{format:v,formatPrefix:function(t,n){var e=v(((t=Object(o.b)(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Object(i.a)(n)/3))),u=Math.pow(10,-r),a=l[8+r/3];return function(t){return e(u*t)+a}}}}},function(t,n,e){"use strict";e.r(n);var r=e(0);e.d(n,"timeInterval",(function(){return r.a}));var i=e(31);e.d(n,"timeMillisecond",(function(){return i.a})),e.d(n,"timeMilliseconds",(function(){return i.b})),e.d(n,"utcMillisecond",(function(){return i.a})),e.d(n,"utcMilliseconds",(function(){return i.b}));var o=e(30);e.d(n,"timeSecond",(function(){return o.a})),e.d(n,"timeSeconds",(function(){return o.b})),e.d(n,"utcSecond",(function(){return o.a})),e.d(n,"utcSeconds",(function(){return o.b}));var u=e(49);e.d(n,"timeMinute",(function(){return u.a})),e.d(n,"timeMinutes",(function(){return u.b}));var a=e(48);e.d(n,"timeHour",(function(){return a.a})),e.d(n,"timeHours",(function(){return a.b}));var c=e(27);e.d(n,"timeDay",(function(){return c.b})),e.d(n,"timeDays",(function(){return c.a}));var s=e(3);e.d(n,"timeWeek",(function(){return s.g})),e.d(n,"timeWeeks",(function(){return s.h})),e.d(n,"timeSunday",(function(){return s.g})),e.d(n,"timeSundays",(function(){return s.h})),e.d(n,"timeMonday",(function(){return s.c})),e.d(n,"timeMondays",(function(){return s.d})),e.d(n,"timeTuesday",(function(){return s.k})),e.d(n,"timeTuesdays",(function(){return s.l})),e.d(n,"timeWednesday",(function(){return s.m})),e.d(n,"timeWednesdays",(function(){return s.n})),e.d(n,"timeThursday",(function(){return s.i})),e.d(n,"timeThursdays",(function(){return s.j})),e.d(n,"timeFriday",(function(){return s.a})),e.d(n,"timeFridays",(function(){return s.b})),e.d(n,"timeSaturday",(function(){return s.e})),e.d(n,"timeSaturdays",(function(){return s.f}));var f=e(47);e.d(n,"timeMonth",(function(){return f.a})),e.d(n,"timeMonths",(function(){return f.b}));var l=e(15);e.d(n,"timeYear",(function(){return l.a})),e.d(n,"timeYears",(function(){return l.b}));var h=e(52);e.d(n,"utcMinute",(function(){return h.a})),e.d(n,"utcMinutes",(function(){return h.b}));var d=e(51);e.d(n,"utcHour",(function(){return d.a})),e.d(n,"utcHours",(function(){return d.b}));var p=e(28);e.d(n,"utcDay",(function(){return p.a})),e.d(n,"utcDays",(function(){return p.b}));var _=e(4);e.d(n,"utcWeek",(function(){return _.g})),e.d(n,"utcWeeks",(function(){return _.h})),e.d(n,"utcSunday",(function(){return _.g})),e.d(n,"utcSundays",(function(){return _.h})),e.d(n,"utcMonday",(function(){return _.c})),e.d(n,"utcMondays",(function(){return _.d})),e.d(n,"utcTuesday",(function(){return _.k})),e.d(n,"utcTuesdays",(function(){return _.l})),e.d(n,"utcWednesday",(function(){return _.m})),e.d(n,"utcWednesdays",(function(){return _.n})),e.d(n,"utcThursday",(function(){return _.i})),e.d(n,"utcThursdays",(function(){return _.j})),e.d(n,"utcFriday",(function(){return _.a})),e.d(n,"utcFridays",(function(){return _.b})),e.d(n,"utcSaturday",(function(){return _.e})),e.d(n,"utcSaturdays",(function(){return _.f}));var y=e(50);e.d(n,"utcMonth",(function(){return y.a})),e.d(n,"utcMonths",(function(){return y.b}));var g=e(16);e.d(n,"utcYear",(function(){return g.a})),e.d(n,"utcYears",(function(){return g.b}))},function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return s}));var r=e(7),i=e(26),o=e(53),u=e(10);function a(t){return function(n){var e,i,o=n.length,u=new Array(o),a=new Array(o),c=new Array(o);for(e=0;e=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var s,f,l,h=-1,d=e.length,p=r[i++],_=o(),y=a();++hr.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each((function(n,e){u.push({key:e,values:t(n,o)})}))),null!=a?u.sort((function(t,n){return a(t.key,n.key)})):u}(u(t,0,s,f),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function s(){return o()}function f(t,n,e){t.set(n,e)}function l(){}var h=o.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:wt,s:Mt,S:$,u:Z,U:Q,V:J,w:K,W:tt,x:null,X:null,y:nt,Y:et,Z:rt,"%":bt},Dt={a:function(t){return p[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return y[t.getUTCMonth()]},B:function(t){return _[t.getUTCMonth()]},c:null,d:it,e:it,f:st,H:ot,I:ut,j:at,L:ct,m:ft,M:lt,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:wt,s:Mt,S:ht,u:dt,U:pt,V:_t,w:yt,W:gt,x:null,X:null,y:vt,Y:mt,Z:xt,"%":bt},Ft={a:function(t,n,e){var r=At.exec(n.slice(e));return r?(t.w=Ct[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=Tt.exec(n.slice(e));return r?(t.w=Ot[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=Nt.exec(n.slice(e));return r?(t.m=jt[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=St.exec(n.slice(e));return r?(t.m=kt[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return It(t,n,e,r)},d:j,e:j,f:I,H:D,I:D,j:E,L:L,m:N,M:F,p:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.p=v[r[0].toLowerCase()],e+r[0].length):-1},q:k,Q:R,s:q,S:P,u:w,U:M,V:T,w:b,W:O,x:function(t,n,r){return It(t,e,n,r)},X:function(t,n,e){return It(t,a,n,e)},y:C,Y:A,Z:S,"%":U};function Pt(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in h||(h.w=1),"Z"in h?(c=(a=f(l(h.y,0,1))).getUTCDay(),a=c>4||0===c?r.c.ceil(a):Object(r.c)(a),a=i.a.offset(a,7*(h.V-1)),h.y=a.getUTCFullYear(),h.m=a.getUTCMonth(),h.d=a.getUTCDate()+(h.w+6)%7):(c=(a=s(l(h.y,0,1))).getDay(),a=c>4||0===c?o.c.ceil(a):Object(o.c)(a),a=u.b.offset(a,7*(h.V-1)),h.y=a.getFullYear(),h.m=a.getMonth(),h.d=a.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),c="Z"in h?f(l(h.y,0,1)).getUTCDay():s(l(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(c+5)%7:h.w+7*h.U-(c+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,f(h)):s(h)}}function It(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=Ft[i in d?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return(Et.x=Pt(e,Et),Et.X=Pt(a,Et),Et.c=Pt(n,Et),Dt.x=Pt(e,Dt),Dt.X=Pt(a,Dt),Dt.c=Pt(n,Dt),{format:function(t){var n=Pt(t+="",Et);return n.toString=function(){return t},n},parse:function(t){var n=Lt(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=Pt(t+="",Dt);return n.toString=function(){return t},n},utcParse:function(t){var n=Lt(t+="",!0);return n.toString=function(){return t},n}})}var d={"-":"",_:" ",0:"0"},p=/^\s*\d+/,_=/^%/,y=/[\\^$*+?|[\]().{}]/g;function g(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function S(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function k(t,n,e){var r=p.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function N(t,n,e){var r=p.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function j(t,n,e){var r=p.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function E(t,n,e){var r=p.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function D(t,n,e){var r=p.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function F(t,n,e){var r=p.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function P(t,n,e){var r=p.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function L(t,n,e){var r=p.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function I(t,n,e){var r=p.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function U(t,n,e){var r=_.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function R(t,n,e){var r=p.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function q(t,n,e){var r=p.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function H(t,n){return g(t.getDate(),n,2)}function B(t,n){return g(t.getHours(),n,2)}function Y(t,n){return g(t.getHours()%12||12,n,2)}function z(t,n){return g(1+u.b.count(Object(a.a)(t),t),n,3)}function G(t,n){return g(t.getMilliseconds(),n,3)}function X(t,n){return G(t,n)+"000"}function V(t,n){return g(t.getMonth()+1,n,2)}function W(t,n){return g(t.getMinutes(),n,2)}function $(t,n){return g(t.getSeconds(),n,2)}function Z(t){var n=t.getDay();return 0===n?7:n}function Q(t,n){return g(o.g.count(Object(a.a)(t)-1,t),n,2)}function J(t,n){var e=t.getDay();return t=e>=4||0===e?Object(o.i)(t):o.i.ceil(t),g(o.i.count(Object(a.a)(t),t)+(4===Object(a.a)(t).getDay()),n,2)}function K(t){return t.getDay()}function tt(t,n){return g(o.c.count(Object(a.a)(t)-1,t),n,2)}function nt(t,n){return g(t.getFullYear()%100,n,2)}function et(t,n){return g(t.getFullYear()%1e4,n,4)}function rt(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+g(n/60|0,"0",2)+g(n%60,"0",2)}function it(t,n){return g(t.getUTCDate(),n,2)}function ot(t,n){return g(t.getUTCHours(),n,2)}function ut(t,n){return g(t.getUTCHours()%12||12,n,2)}function at(t,n){return g(1+i.a.count(Object(c.a)(t),t),n,3)}function ct(t,n){return g(t.getUTCMilliseconds(),n,3)}function st(t,n){return ct(t,n)+"000"}function ft(t,n){return g(t.getUTCMonth()+1,n,2)}function lt(t,n){return g(t.getUTCMinutes(),n,2)}function ht(t,n){return g(t.getUTCSeconds(),n,2)}function dt(t){var n=t.getUTCDay();return 0===n?7:n}function pt(t,n){return g(r.g.count(Object(c.a)(t)-1,t),n,2)}function _t(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Object(r.i)(t):r.i.ceil(t),g(r.i.count(Object(c.a)(t),t)+(4===Object(c.a)(t).getUTCDay()),n,2)}function yt(t){return t.getUTCDay()}function gt(t,n){return g(r.c.count(Object(c.a)(t)-1,t),n,2)}function vt(t,n){return g(t.getUTCFullYear()%100,n,2)}function mt(t,n){return g(t.getUTCFullYear()%1e4,n,4)}function xt(){return"+0000"}function bt(){return"%"}function wt(t){return+t}function Mt(t){return Math.floor(+t/1e3)}},function(t,n,e){"use strict";var r=e(5),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,o=new RegExp(i.source,"g");n.a=function(t,n){var e,u,a,c=i.lastIndex=o.lastIndex=0,s=-1,f=[],l=[];for(t+="",n+="";(e=i.exec(t))&&(u=o.exec(n));)(a=u.index)>c&&(a=n.slice(c,a),f[s]?f[s]+=a:f[++s]=a),(e=e[0])===(u=u[0])?f[s]?f[s]+=u:f[++s]=u:(f[++s]=null,l.push({i:s,x:Object(r.a)(e,u)})),c=o.lastIndex;return c=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function a(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;o1e-6)if(Math.abs(l*c-s*f)>1e-6&&o){var d=e-u,p=i-a,_=c*c+s*s,y=d*d+p*p,g=Math.sqrt(_),v=Math.sqrt(h),m=o*Math.tan((r-Math.acos((_+h-y)/(2*g*v)))/2),x=m/v,b=m/g;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*f)+","+(n+x*l)),this._+="A"+o+","+o+",0,0,"+ +(l*d>f*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,u,a,c){t=+t,n=+n,c=!!c;var s=(e=+e)*Math.cos(u),f=e*Math.sin(u),l=t+s,h=n+f,d=1^c,p=c?u-a:a-u;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>o?this._+="A"+e+","+e+",0,1,"+d+","+(t-s)+","+(n-f)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a,s=function(t){return function(){return t}},f=Math.abs,l=Math.atan2,h=Math.cos,d=Math.max,p=Math.min,_=Math.sin,y=Math.sqrt,g=Math.PI,v=g/2,m=2*g;function x(t){return t>1?0:t<-1?g:Math.acos(t)}function b(t){return t>=1?v:t<=-1?-v:Math.asin(t)}function w(t){return t.innerRadius}function M(t){return t.outerRadius}function T(t){return t.startAngle}function O(t){return t.endAngle}function A(t){return t&&t.padAngle}function C(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,f=u-i,l=a-o,h=l*c-f*s;if(!(h*h<1e-12))return[t+(h=(f*(n-o)-l*(t-i))/h)*c,n+h*s]}function S(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/y(a*a+c*c),f=s*c,l=-s*a,h=t+f,p=n+l,_=e+f,g=r+l,v=(h+_)/2,m=(p+g)/2,x=_-h,b=g-p,w=x*x+b*b,M=i-o,T=h*g-_*p,O=(b<0?-1:1)*y(d(0,M*M*w-T*T)),A=(T*b-x*O)/w,C=(-T*x-b*O)/w,S=(T*b+x*O)/w,k=(-T*x+b*O)/w,N=A-v,j=C-m,E=S-v,D=k-m;return N*N+j*j>E*E+D*D&&(A=S,C=k),{cx:A,cy:C,x01:-f,y01:-l,x11:A*(i/M-1),y11:C*(i/M-1)}}var k=function(){var t=w,n=M,e=s(0),r=null,i=T,o=O,u=A,a=null;function d(){var s,d,w=+t.apply(this,arguments),M=+n.apply(this,arguments),T=i.apply(this,arguments)-v,O=o.apply(this,arguments)-v,A=f(O-T),k=O>T;if(a||(a=s=c()),M1e-12)if(A>m-1e-12)a.moveTo(M*h(T),M*_(T)),a.arc(0,0,M,T,O,!k),w>1e-12&&(a.moveTo(w*h(O),w*_(O)),a.arc(0,0,w,O,T,k));else{var N,j,E=T,D=O,F=T,P=O,L=A,I=A,U=u.apply(this,arguments)/2,R=U>1e-12&&(r?+r.apply(this,arguments):y(w*w+M*M)),q=p(f(M-w)/2,+e.apply(this,arguments)),H=q,B=q;if(R>1e-12){var Y=b(R/w*_(U)),z=b(R/M*_(U));(L-=2*Y)>1e-12?(F+=Y*=k?1:-1,P-=Y):(L=0,F=P=(T+O)/2),(I-=2*z)>1e-12?(E+=z*=k?1:-1,D-=z):(I=0,E=D=(T+O)/2)}var G=M*h(E),X=M*_(E),V=w*h(P),W=w*_(P);if(q>1e-12){var $,Z=M*h(D),Q=M*_(D),J=w*h(F),K=w*_(F);if(A1e-12?B>1e-12?(N=S(J,K,G,X,M,B,k),j=S(Z,Q,V,W,M,B,k),a.moveTo(N.cx+N.x01,N.cy+N.y01),B1e-12&&L>1e-12?H>1e-12?(N=S(V,W,Z,Q,w,-H,k),j=S(G,X,J,K,w,-H,k),a.lineTo(N.cx+N.x01,N.cy+N.y01),H=l;--h)a.point(g[h],v[h]);a.lineEnd(),a.areaEnd()}y&&(g[f]=+t(d,f,s),v[f]=+e(d,f,s),a.point(n?+n(d,f,s):g[f],r?+r(d,f,s):v[f]))}if(p)return a=null,p+""||null}function l(){return F().defined(i).curve(u).context(o)}return f.x=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),n=null,f):t},f.x0=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),f):t},f.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:s(+t),f):n},f.y=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),r=null,f):e},f.y0=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),f):e},f.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:s(+t),f):r},f.lineX0=f.lineY0=function(){return l().x(t).y(e)},f.lineY1=function(){return l().x(t).y(r)},f.lineX1=function(){return l().x(n).y(e)},f.defined=function(t){return arguments.length?(i="function"==typeof t?t:s(!!t),f):i},f.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),f):u},f.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),f):o},f},L=function(t,n){return nt?1:n>=t?0:NaN},I=function(t){return t},U=function(){var t=I,n=L,e=null,r=s(0),i=s(m),o=s(0);function u(u){var a,c,s,f,l,h=u.length,d=0,p=new Array(h),_=new Array(h),y=+r.apply(this,arguments),g=Math.min(m,Math.max(-m,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/h,o.apply(this,arguments)),x=v*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(_[t],_[e])})):null!=e&&p.sort((function(t,n){return e(u[t],u[n])})),a=0,s=d?(g-h*x)/d:0;a0?l*s:0)+x,_[c]={data:u[c],index:a,value:l,startAngle:y,endAngle:f,padAngle:v};return _}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:s(+t),u):o},u},R=H(j);function q(t){this._curve=t}function H(t){function n(n){return new q(t(n))}return n._curve=t,n}function B(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(H(t)):n()._curve},t}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Y=function(){return B(F().curve(R))},z=function(){var t=P().curve(R),n=t.curve,e=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 B(e())},delete t.lineX0,t.lineEndAngle=function(){return B(r())},delete t.lineX1,t.lineInnerRadius=function(){return B(i())},delete t.lineY0,t.lineOuterRadius=function(){return B(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(H(t)):n()._curve},t},G=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},X=Array.prototype.slice;function V(t){return t.source}function W(t){return t.target}function $(t){var n=V,e=W,r=E,i=D,o=null;function u(){var u,a=X.call(arguments),s=n.apply(this,a),f=e.apply(this,a);if(o||(o=u=c()),t(o,+r.apply(this,(a[0]=s,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),u)return o=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),u):i},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function Z(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function Q(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function J(t,n,e,r,i){var o=G(n,e),u=G(n,e=(e+i)/2),a=G(r,e),c=G(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}function K(){return $(Z)}function tt(){return $(Q)}function nt(){var t=$(J);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var et={draw:function(t,n){var e=Math.sqrt(n/g);t.moveTo(e,0),t.arc(0,0,e,0,m)}},rt={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},it=Math.sqrt(1/3),ot=2*it,ut={draw:function(t,n){var e=Math.sqrt(n/ot),r=e*it;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},at=Math.sin(g/10)/Math.sin(7*g/10),ct=Math.sin(m/10)*at,st=-Math.cos(m/10)*at,ft={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=ct*e,i=st*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=m*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},lt={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ht=Math.sqrt(3),dt={draw:function(t,n){var e=-Math.sqrt(n/(3*ht));t.moveTo(0,2*e),t.lineTo(-ht*e,-e),t.lineTo(ht*e,-e),t.closePath()}},pt=Math.sqrt(3)/2,_t=1/Math.sqrt(12),yt=3*(_t/2+1),gt={draw:function(t,n){var e=Math.sqrt(n/yt),r=e/2,i=e*_t,o=r,u=e*_t+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(-.5*r-pt*i,pt*r+-.5*i),t.lineTo(-.5*o-pt*u,pt*o+-.5*u),t.lineTo(-.5*a-pt*c,pt*a+-.5*c),t.lineTo(-.5*r+pt*i,-.5*i-pt*r),t.lineTo(-.5*o+pt*u,-.5*u-pt*o),t.lineTo(-.5*a+pt*c,-.5*c-pt*a),t.closePath()}},vt=[et,rt,ut,lt,ft,dt,gt],mt=function(){var t=s(et),n=s(64),e=null;function r(){var r;if(e||(e=r=c()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:s(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},xt=function(){};function bt(t,n,e){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+n)/6,(t._y0+4*t._y1+e)/6)}function wt(t){this._context=t}wt.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:bt(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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Mt=function(t){return new wt(t)};function Tt(t){this._context=t}Tt.prototype={areaStart:xt,areaEnd:xt,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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ot=function(t){return new Tt(t)};function At(t){this._context=t}At.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ct=function(t){return new At(t)};function St(t,n){this._basis=new wt(t),this._beta=n}St.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var kt=function t(n){function e(t){return 1===n?new wt(t):new St(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Nt(t,n,e){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-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function jt(t,n){this._context=t,this._k=(1-n)/6}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._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Nt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Nt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new jt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Dt(t,n){this._context=t,this._k=(1-n)/6}Dt.prototype={areaStart:xt,areaEnd:xt,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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Nt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ft=function t(n){function e(t){return new Dt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Pt(t,n){this._context=t,this._k=(1-n)/6}Pt.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,n){switch(t=+t,n=+n,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:Nt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return new Pt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function It(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>1e-12){var a=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*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Ut(t,n){this._context=t,this._alpha=n}Ut.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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:It(this,t,n)}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=n}};var Rt=function t(n){function e(t){return n?new Ut(t,n):new jt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.prototype={areaStart:xt,areaEnd:xt,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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:It(this,t,n)}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=n}};var Ht=function t(n){function e(t){return n?new qt(t,n):new Dt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Bt(t,n){this._context=t,this._alpha=n}Bt.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,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+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:It(this,t,n)}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=n}};var Yt=function t(n){function e(t){return n?new Bt(t,n):new Pt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function zt(t){this._context=t}zt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Gt=function(t){return new zt(t)};function Xt(t){return t<0?-1:1}function Vt(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(Xt(o)+Xt(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function Wt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function $t(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function Zt(t){this._context=t}function Qt(t){this._context=new Jt(t)}function Jt(t){this._context=t}function Kt(t){return new Zt(t)}function tn(t){return new Qt(t)}function nn(t){this._context=t}function en(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var un=function(t){return new on(t,.5)};function an(t){return new on(t,0)}function cn(t){return new on(t,1)}var sn=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function ln(t,n){return t[n]}var hn=function(){var t=s([]),n=fn,e=sn,r=ln;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,s=a.length,f=new Array(s);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o0)for(var e,r,i,o,u,a,c=0,s=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):(r[0]=0,r[1]=i)},_n=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;uo&&(o=n,r=e);return r}var mn=function(t){var n=t.map(xn);return fn(t).sort((function(t,e){return n[t]-n[e]}))};function xn(t){for(var n,e=0,r=-1,i=t.length;++r=0&&n._call.call(null,t),n=n._next;--a}()}finally{a=0,function(){var t,n,e=r,o=1/0;for(;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,b(o)}(),l=0}}function x(){var t=d.now(),n=t-f;n>1e3&&(h-=n,f=t)}function b(t){a||(c&&(c=clearTimeout(c)),t-l>24?(t<1/0&&(c=setTimeout(m,t-d.now()-h)),s&&(s=clearInterval(s))):(s||(f=d.now(),s=setInterval(x,1e3)),a=1,p(m)))}g.prototype=v.prototype={constructor:g,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?_():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}};var w=function(t,n,e){var r=new g;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},M=Object(u.a)("start","end","cancel","interrupt"),T=[],O=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var s,f,l,h;if(1!==e.state)return a();for(s in i)if((h=i[s]).name===e.name){if(3===h.state)return w(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s0)throw new Error("too late; already scheduled");return e}function C(t,n){var e=S(t,n);if(e.state>3)throw new Error("too late; already running");return e}function S(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var k=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},N=e(74),j=e(20);function E(t,n){var e,r;return function(){var i=C(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?A:C;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var rt=e(19),it=e(33),ot=o.b.prototype.constructor,ut=e(35);function at(t){return function(){this.style.removeProperty(t)}}function ct(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function st(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&ct(t,o,e)),r}return o._value=n,o}function ft(t){return function(n){this.textContent=t.call(this,n)}}function lt(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&ft(r)),n}return r._value=t,r}var ht=0;function dt(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function pt(t){return Object(o.b)().transition(t)}function _t(){return++ht}var yt=o.b.prototype;dt.prototype=pt.prototype={constructor:dt,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(rt.a)(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u1&&e.name===n)return new dt([[t]],mt,n,+r);return null};e.d(n,"transition",(function(){return pt})),e.d(n,"active",(function(){return xt})),e.d(n,"interrupt",(function(){return k}))},,function(t,n,e){"use strict";var r,i,o,u,a=e(5),c=180/Math.PI,s={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},f=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Object(a.a)(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,c,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Object(a.a)(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,c,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var c=o.push(i(o)+"scale(",null,",",null,")");u.push({i:c-4,x:Object(a.a)(t,e)},{i:c-2,x:Object(a.a)(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,c,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++er&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function M(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i2?T:M,i=o=null,d}function d(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,f)))(t(l(n)))}return d.invert=function(e){return l(n((o||(o=r(a,u.map(t),y.a)))(e)))},d.domain=function(t){return arguments.length?(u=c.call(t,v),l===x||(l=w(u)),h()):u.slice()},d.range=function(t){return arguments.length?(a=s.call(t),h()):a.slice()},d.rangeRound=function(t){return a=s.call(t),f=g.a,h()},d.clamp=function(t){return arguments.length?(l=t?w(u):x,d):l!==x},d.interpolate=function(t){return arguments.length?(f=t,h()):f},d.unknown=function(t){return arguments.length?(e=t,d):e},function(e,r){return t=e,n=r,h()}}function C(t,n){return A()(t,n)}var S=e(24),k=e(62),N=e(40),j=e(63),E=e(61),D=function(t,n,e,i){var o,u=Object(r.tickStep)(t,n,e);switch((i=Object(S.b)(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=i.precision||isNaN(o=Object(k.a)(u,a))||(i.precision=o),Object(N.c)(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Object(j.a)(u,Math.max(Math.abs(t),Math.abs(n))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=Object(E.a)(u))||(i.precision=o-2*("%"===i.type))}return Object(N.b)(i)};function F(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.ticks)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return D(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var i,o=n(),u=0,a=o.length-1,c=o[u],s=o[a];return s0?(c=Math.floor(c/i)*i,s=Math.ceil(s/i)*i,i=Object(r.tickIncrement)(c,s,e)):i<0&&(c=Math.ceil(c*i)/i,s=Math.floor(s*i)/i,i=Object(r.tickIncrement)(c,s,e)),i>0?(o[u]=Math.floor(c/i)*i,o[a]=Math.ceil(s/i)*i,n(o)):i<0&&(o[u]=Math.ceil(c*i)/i,o[a]=Math.floor(s*i)/i,n(o)),t},t}function P(){var t=C(x,x);return t.copy=function(){return O(t,P())},i.apply(t,arguments),F(t)}function L(t){var n;function e(t){return isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=c.call(n,v),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return L(t).unknown(n)},t=arguments.length?c.call(t,v):[0,1],F(e)}var I=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;ds)break;y.push(h)}}else for(;d=1;--l)if(!((h=f*l)s)break;y.push(h)}}else y=Object(r.ticks)(d,p,Math.min(p-d,_)).map(e);return i?y.reverse():y},i.tickFormat=function(t,r){if(null==r&&(r=10===u?".0e":","),"function"!=typeof r&&(r=Object(N.b)(r)),t===1/0)return r;null==t&&(t=10);var o=Math.max(1,u*t/i.ticks().length);return function(t){var i=t/e(Math.round(n(t)));return i*u0?o[r-1]:n[0],r=o?[u[o-1],e]:[u[r-1],u[r]]},c.unknown=function(n){return arguments.length?(t=n,c):c},c.thresholds=function(){return u.slice()},c.copy=function(){return rt().domain([n,e]).range(a).unknown(t)},i.apply(F(c),arguments)}function it(){var t,n=[.5],e=[0,1],o=1;function u(i){return i<=i?e[Object(r.bisect)(n,i,0,o)]:t}return u.domain=function(t){return arguments.length?(n=s.call(t),o=Math.min(n.length,e.length-1),u):n.slice()},u.range=function(t){return arguments.length?(e=s.call(t),o=Math.min(n.length,e.length-1),u):e.slice()},u.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},u.unknown=function(n){return arguments.length?(t=n,u):t},u.copy=function(){return it().domain(n).range(e).unknown(t)},i.apply(u,arguments)}var ot=e(15),ut=e(47),at=e(3),ct=e(27),st=e(48),ft=e(49),lt=e(30),ht=e(31),dt=e(44);function pt(t){return new Date(t)}function _t(t){return t instanceof Date?+t:+new Date(+t)}function yt(t,n,e,i,o,u,a,s,f){var l=C(x,x),h=l.invert,d=l.domain,p=f(".%L"),_=f(":%S"),y=f("%I:%M"),g=f("%I %p"),v=f("%a %d"),m=f("%b %d"),b=f("%B"),w=f("%Y"),M=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[u,1,6e4],[u,5,3e5],[u,15,9e5],[u,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,864e5],[i,2,1728e5],[e,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,31536e6]];function T(r){return(a(r)svg{background:"+this.chartBackground+";}"}};function c(t,n){if(t){t.attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg");var e=r.initializeSerializer()(t.node());return e=function(t){if(navigator.userAgent.search("FireFox")>-1)return t.replace(/url.*"\)/,'url("linearGradient[id*="-gradient-"]");');return t}(e),e=function(t){return t.replace(">",">"+a.styleBackgroundString)}(e=h.call(this,e,n,parseInt(t.attr("width"),10)))}}function s(t){var n=new Image;return n.src=""+a.imageSourceBase+u(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,n){return String.fromCharCode("0x"+n)}))),n}function f(t,n){return n.getContext("2d").drawImage(t,0,0),n}function l(t,n,e){e.preventDefault(),function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.defaultFilename,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"image/png",r=t.toDataURL(e),i=document.createElement("a");i.href=r,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}(f(this,t),n)}function h(t,e,r){if(!e||!r)return t;var i=n.grey;return t=t.replace(/ '+e+" >18&63)+f.charAt(i>>12&63)+f.charAt(i>>6&63)+f.charAt(63&i);return 2==o?(n=t.charCodeAt(a)<<8,e=t.charCodeAt(++a),u+=f.charAt((i=n+e)>>10)+f.charAt(i>>4&63)+f.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(a),u+=f.charAt(i>>2)+f.charAt(i<<4&63)+"=="),u},decode:function(t){var n=(t=String(t).replace(l,"")).length;n%4==0&&(n=(t=t.replace(/==?$/,"")).length),(n%4==1||/[^+a-zA-Z0-9/]/.test(t))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var e,r,i=0,o="",u=-1;++u>(-2*i&6)));return o},version:"0.1.0"};void 0===(i=function(){return h}.call(n,e,n,t))||(t.exports=i)}()}).call(this,e(79)(t),e(80))},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){"use strict";n.a=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return s})),e.d(n,"a",(function(){return f})),e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return v}));var r=e(11),i=e(7),o=e(67),u=6/29,a=3*u*u;function c(t){if(t instanceof l)return new l(t.l,t.a,t.b,t.opacity);if(t instanceof m)return x(t);t instanceof i.b||(t=Object(i.h)(t));var n,e,r=_(t.r),o=_(t.g),u=_(t.b),a=h((.2225045*r+.7168786*o+.0606169*u)/1);return r===o&&o===u?n=e=a:(n=h((.4360747*r+.3850649*o+.1430804*u)/.96422),e=h((.0139322*r+.0971045*o+.7141733*u)/.82521)),new l(116*a-16,500*(n-a),200*(a-e),t.opacity)}function s(t,n){return new l(t,0,0,null==n?1:n)}function f(t,n,e,r){return 1===arguments.length?c(t):new l(t,n,e,null==r?1:r)}function l(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function h(t){return t>.008856451679035631?Math.pow(t,1/3):t/a+4/29}function d(t){return t>u?t*t*t:a*(t-4/29)}function p(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function _(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function y(t){if(t instanceof m)return new m(t.h,t.c,t.l,t.opacity);if(t instanceof l||(t=c(t)),0===t.a&&0===t.b)return new m(NaN,0\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',donut:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',line:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ',stackedArea:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '}}.call(n,e,n,t))||(t.exports=r)},,function(t,n,e){"use strict";var r;void 0===(r=function(t){var n=e(45),r=e(2),i=0,o={small:{limit:10,format:n.format("")},medium:{limit:1e3,format:n.format("")},large:{limit:null,format:n.format(".2s")}},u={small:{limit:10,format:n.format(".3f")},medium:{limit:100,format:n.format(".1f")},large:{limit:null,format:n.format(".2s")}},a=function(t,n){var e="large";return t1&&void 0!==arguments[1]?arguments[1]:12,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Arial",r=document.createElement("canvas"),i=r.getContext("2d");return i.font=n+"px "+e,i.measureText(t).width};return{getTextWidth:s,wrapText:function(t,e,s,f){var l=n.select(f),h=l.text().split(/\s+/).reverse(),d=void 0,p=[],_=0,y=r*o,g=l.attr("y"),v=parseFloat(l.attr("dy")),m=e*u,x=l.text(null).append("tspan").attr("x",t).attr("y",g-5).attr("dy",v+"em").classed(a,!0).style("font-size",e+"px");for(x.text(h.pop()),x=l.append("tspan").classed(c,!0).attr("x",t).attr("y",g+i).attr("dy",++_*y+v+"em").style("font-size",m+"px");d=h.pop();)p.push(d),x.text(p.join(" ")),x.node()&&x.node().getComputedTextLength()>s-50&&(p.pop(),x.text(p.join(" ")),p=[d],x=l.append("tspan").classed(c,!0).attr("x",t).attr("y",g+i).attr("dy",++_*y+v+"em").text(d).style("font-size",m+"px"))},wrapTextWithEllipses:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;t.each((function(){var o,u,a,c,s,f,l;for(o=(t=n.select(this)).text().split(/\s+/).reverse(),a=[],c=0,1.2,s=t.attr("y"),f=parseFloat(t.attr("dy")),l=t.text(null).append("tspan").attr("x",r).attr("y",s).attr("dy",f+"em");u=o.pop();)if(a.push(u),l.text(a.join(" ")),l.node()&&l.node().getComputedTextLength()>e){if(a.pop(),l.text(a.join(" ")),!(ce&&(i.pop(),i=[h],++o)}}catch(t){a=!0,c=t}finally{try{!u&&l.return&&l.return()}finally{if(a)throw c}}return o}}}.call(n,e,n,t))||(t.exports=r)},,,,,,,,,,function(t,n,e){"use strict";var r,i=Object.assign||function(t){for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:0;c.select(t).transition().delay(e).attrTween("d",(function(t){var e=o.interpolate(t.outerRadius,n);return function(n){return t.outerRadius=e(n),A(t)}}))}function rt(t){var n=void 0;return t.innerRadius=0,n=o.interpolate({startAngle:0,endAngle:0},t),function(t){return A(n(t))}}function it(t,n){var e=w/5;f.wrapText.call(null,0,e,n,t.node())}return $.centeredTextFunction=function(t){return arguments.length?(B=t,this):B},$.colorSchema=function(t){return arguments.length?(H=t,this):H},$.emptyDataConfig=function(t){return arguments.length?(I=t,this):I},$.exportChart=function(t,n){s.call($,S,t,n)},$.externalRadius=function(t){return arguments.length?(w=t,this):w},$.hasHoverAnimation=function(t){return arguments.length?(F=t,this):F},$.hasFixedHighlightedSlice=function(t){return arguments.length?(D=t,this):D},$.hasLastHoverSliceHighlighted=function(t){return arguments.length?(P=t,this):P},$.height=function(t){return arguments.length?(_=t,this):_},$.highlightSliceById=function(t){return arguments.length?(j=t,this):j},$.internalRadius=function(t){return arguments.length?(M=t,this):M},$.isAnimated=function(t){return arguments.length?(k=t,this):k},$.loadingState=function(t){return arguments.length?(y=t,this):y},$.margin=function(n){return arguments.length?(t=i({},t,n),this):t},$.numberFormat=function(t){return arguments.length?(R=t,this):R},$.on=function(){var t=W.on.apply(W,arguments);return t===W?$:t},$.orderingFunction=function(t){return arguments.length?(G=t,this):G},$.percentageFormat=function(t){return arguments.length?(U=t,this):U},$.radiusHoverOffset=function(t){return arguments.length?(v=t,this):v},$.width=function(t){return arguments.length?(e=t,this):e},$}}.call(n,e,n,t))||(t.exports=r)}])})); //# sourceMappingURL=donut.min.js.map