@groww-tech/react-charts
Version:
React charts library tailored as per Groww needs
6 lines • 91.5 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("prop-types");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(t),i=n(e),o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function a(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const s=Symbol("implicit");function c(){var t=new Map,e=[],n=[],r=s;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==s)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;for(const r of n){const n=r+"";t.has(n)||t.set(n,e.push(r))}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return c(e,n).unknown(r)},u.apply(i,arguments),i}function f(){var t,e,n=c().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,l=!1,s=0,h=0,d=.5;function p(){var n=r().length,u=a<o,c=u?a:o,f=u?o:a;t=(f-c)/Math.max(1,n-s+2*h),l&&(t=Math.floor(t)),c+=(f-c-t*(n-s))*d,e=t*(1-s),l&&(c=Math.round(c),e=Math.round(e));var p=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}(n).map(function(e){return c+t*e});return i(u?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),p()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,p()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,l=!0,p()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(l=!!t,p()):l},n.padding=function(t){return arguments.length?(s=Math.min(1,h=+t),p()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),p()):s},n.paddingOuter=function(t){return arguments.length?(h=+t,p()):h},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),p()):d},n.copy=function(){return f(r(),[o,a]).round(l).paddingInner(s).paddingOuter(h).align(d)},u.apply(p(),arguments)}function h(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function d(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function p(){}var v=.7,g=1/v,y="\\s*([+-]?\\d+)\\s*",m="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",x="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",w=/^#([0-9a-f]{3,8})$/,b=new RegExp("^rgb\\("+[y,y,y]+"\\)$"),k=new RegExp("^rgb\\("+[x,x,x]+"\\)$"),M=new RegExp("^rgba\\("+[y,y,y,m]+"\\)$"),E=new RegExp("^rgba\\("+[x,x,x,m]+"\\)$"),T=new RegExp("^hsl\\("+[m,x,x]+"\\)$"),_=new RegExp("^hsla\\("+[m,x,x,m]+"\\)$"),P={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 N(){return this.rgb().formatHex()}function O(){return this.rgb().formatRgb()}function S(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=w.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?A(e):3===n?new L(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?C(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?C(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=b.exec(t))?new L(e[1],e[2],e[3],1):(e=k.exec(t))?new L(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=M.exec(t))?C(e[1],e[2],e[3],e[4]):(e=E.exec(t))?C(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=T.exec(t))?U(e[1],e[2]/100,e[3]/100,1):(e=_.exec(t))?U(e[1],e[2]/100,e[3]/100,e[4]):P.hasOwnProperty(t)?A(P[t]):"transparent"===t?new L(NaN,NaN,NaN,0):null}function A(t){return new L(t>>16&255,t>>8&255,255&t,1)}function C(t,e,n,r){return r<=0&&(t=e=n=NaN),new L(t,e,n,r)}function R(t){return t instanceof p||(t=S(t)),t?new L((t=t.rgb()).r,t.g,t.b,t.opacity):new L}function F(t,e,n,r){return 1===arguments.length?R(t):new L(t,e,n,null==r?1:r)}function L(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function I(){return"#"+j(this.r)+j(this.g)+j(this.b)}function D(){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 j(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function U(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new z(t,e,n,r)}function W(t){if(t instanceof z)return new z(t.h,t.s,t.l,t.opacity);if(t instanceof p||(t=S(t)),!t)return new z;if(t instanceof z)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,u=(o+i)/2;return l?(a=e===o?(n-r)/l+6*(n<r):n===o?(r-e)/l+2:(e-n)/l+4,l/=u<.5?o+i:2-o-i,a*=60):l=u>0&&u<1?0:a,new z(a,l,u,t.opacity)}function H(t,e,n,r){return 1===arguments.length?W(t):new z(t,e,n,null==r?1:r)}function z(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Y(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}h(p,S,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:N,formatHex:N,formatHsl:function(){return W(this).formatHsl()},formatRgb:O,toString:O}),h(L,F,d(p,{brighter:function(t){return t=null==t?g:Math.pow(g,t),new L(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?v:Math.pow(v,t),new L(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:I,formatHex:I,formatRgb:D,toString:D})),h(z,H,d(p,{brighter:function(t){return t=null==t?g:Math.pow(g,t),new z(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?v:Math.pow(v,t),new z(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 L(Y(t>=240?t-240:t+120,i,r),Y(t,i,r),Y(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 G=Math.PI/180,V=180/Math.PI,B=.96422,X=.82521,q=4/29,$=6/29,Z=3*$*$,J=$*$*$;function Q(t){if(t instanceof tt)return new tt(t.l,t.a,t.b,t.opacity);if(t instanceof at)return lt(t);t instanceof L||(t=R(t));var e,n,r=it(t.r),i=it(t.g),o=it(t.b),a=et((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=et((.4360747*r+.3850649*i+.1430804*o)/B),n=et((.0139322*r+.0971045*i+.7141733*o)/X)),new tt(116*a-16,500*(e-a),200*(a-n),t.opacity)}function K(t,e,n,r){return 1===arguments.length?Q(t):new tt(t,e,n,null==r?1:r)}function tt(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function et(t){return t>J?Math.pow(t,1/3):t/Z+q}function nt(t){return t>$?t*t*t:Z*(t-q)}function rt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function it(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ot(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof at)return new at(t.h,t.c,t.l,t.opacity);if(t instanceof tt||(t=Q(t)),0===t.a&&0===t.b)return new at(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*V;return new at(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new at(t,e,n,null==r?1:r)}function at(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function lt(t){if(isNaN(t.h))return new tt(t.l,0,0,t.opacity);var e=t.h*G;return new tt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}h(tt,K,d(p,{brighter:function(t){return new tt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new tt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new L(rt(3.1338561*(e=B*nt(e))-1.6168667*(t=1*nt(t))-.4906146*(n=X*nt(n))),rt(-.9787684*e+1.9161415*t+.033454*n),rt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),h(at,ot,d(p,{brighter:function(t){return new at(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new at(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return lt(this).rgb()}}));var ut=-.14861,st=1.78277,ct=-.29227,ft=-.90649,ht=1.97294,dt=ht*ft,pt=ht*st,vt=st*ct-ft*ut;function gt(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof yt)return new yt(t.h,t.s,t.l,t.opacity);t instanceof L||(t=R(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(vt*r+dt*e-pt*n)/(vt+dt-pt),o=r-i,a=(ht*(n-i)-ct*o)/ft,l=Math.sqrt(a*a+o*o)/(ht*i*(1-i)),u=l?Math.atan2(a,o)*V-120:NaN;return new yt(u<0?u+360:u,l,i,t.opacity)}(t):new yt(t,e,n,null==r?1:r)}function yt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mt(t){return function(){return t}}function xt(t,e){return function(n){return t+n*e}}function wt(t,e){var n=e-t;return n?xt(t,n>180||n<-180?n-360*Math.round(n/360):n):mt(isNaN(t)?e:t)}function bt(t){return 1===(t=+t)?kt: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):mt(isNaN(e)?n:e)}}function kt(t,e){var n=e-t;return n?xt(t,n):mt(isNaN(t)?e:t)}h(yt,gt,d(p,{brighter:function(t){return t=null==t?g:Math.pow(g,t),new yt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?v:Math.pow(v,t),new yt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*G,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new L(255*(e+n*(ut*r+st*i)),255*(e+n*(ct*r+ft*i)),255*(e+n*(ht*r)),this.opacity)}}));var Mt=function t(e){var n=bt(e);function r(t,e){var r=n((t=F(t)).r,(e=F(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=kt(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Et(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Tt(t){return function(e,n){var r=t((e=H(e)).h,(n=H(n)).h),i=kt(e.s,n.s),o=kt(e.l,n.l),a=kt(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var _t=Tt(wt),Pt=Tt(kt);function Nt(t){return function(e,n){var r=t((e=ot(e)).h,(n=ot(n)).h),i=kt(e.c,n.c),o=kt(e.l,n.l),a=kt(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var Ot=Nt(wt),St=Nt(kt);function At(t){return function e(n){function r(e,r){var i=t((e=gt(e)).h,(r=gt(r)).h),o=kt(e.s,r.s),a=kt(e.l,r.l),l=kt(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}var Ct=At(wt),Rt=At(kt),Ft=new Date,Lt=new Date;function It(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,l=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return l;do{l.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return l},i.filter=function(n){return It(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return Ft.setTime(+e),Lt.setTime(+r),t(Ft),t(Lt),Math.floor(n(Ft,Lt))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t===0}:function(e){return i.count(0,e)%t===0}):i:null}),i}const Dt=1e3,jt=6e4,Ut=36e5,Wt=864e5,Ht=6048e5;var zt=It(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*Dt)},function(t,e){return(e-t)/Dt},function(t){return t.getUTCSeconds()}),Yt=It(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt)},function(t,e){t.setTime(+t+e*jt)},function(t,e){return(e-t)/jt},function(t){return t.getMinutes()}),Gt=It(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dt-t.getMinutes()*jt)},function(t,e){t.setTime(+t+e*Ut)},function(t,e){return(e-t)/Ut},function(t){return t.getHours()}),Vt=It(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*jt)/Wt,t=>t.getDate()-1);function Bt(t){return It(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())*jt)/Ht})}var Xt=Bt(0);Bt(1),Bt(2),Bt(3),Bt(4),Bt(5),Bt(6);var qt=It(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()}),$t=It(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()});$t.every=function(t){return isFinite(t=Math.floor(t))&&t>0?It(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 Zt=It(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*jt)},function(t,e){return(e-t)/jt},function(t){return t.getUTCMinutes()}),Jt=It(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*Ut)},function(t,e){return(e-t)/Ut},function(t){return t.getUTCHours()}),Qt=It(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Wt},function(t){return t.getUTCDate()-1});function Kt(t){return It(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)/Ht})}var te=Kt(0);Kt(1),Kt(2),Kt(3),Kt(4),Kt(5),Kt(6);var ee=It(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()}),ne=It(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()});ne.every=function(t){return isFinite(t=Math.floor(t))&&t>0?It(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 re={lab:function(t,e){var n=kt((t=K(t)).l,(e=K(e)).l),r=kt(t.a,e.a),i=kt(t.b,e.b),o=kt(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}},hcl:Ot,"hcl-long":St,hsl:_t,"hsl-long":Pt,cubehelix:Ct,"cubehelix-long":Rt,rgb:Mt};var ie=new Date(Date.UTC(2020,1,2,3,4,5));var oe={day:Vt,hour:Gt,minute:Yt,month:qt,second:zt,week:Xt,year:$t},ae={day:Qt,hour:Jt,minute:Zt,month:ee,second:zt,week:te,year:ne};var le=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],ue={domain:function(t,e){e.domain&&t.domain(e.domain)},nice:function(t,e){if("nice"in e&&void 0!==e.nice&&"nice"in t){var n=e.nice;if("boolean"==typeof n)n&&t.nice();else if("number"==typeof n)t.nice(n);else{var r=t,i=function(t){return"2020-02-02 03:04"===t.tickFormat(1,"%Y-%m-%d %H:%M")(ie)}(r);if("string"==typeof n)r.nice(i?ae[n]:oe[n]);else{var o=n.interval,a=n.step,l=(i?ae[o]:oe[o]).every(a);null!=l&&r.nice(l)}}}},zero:function(t,e){if("zero"in e&&!0===e.zero){var n=t.domain(),r=n[0],i=n[1],o=i<r,a=o?[i,r]:[r,i],l=a[0],u=a[1],s=[Math.min(0,l),Math.max(0,u)];t.domain(o?s.reverse():s)}},interpolate:function(t,e){if("interpolate"in e&&"interpolate"in t&&void 0!==e.interpolate){var n=function(t){switch(t){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return re[t]}var e=t.type,n=t.gamma,r=re[e];return void 0===n?r:r.gamma(n)}(e.interpolate);t.interpolate(n)}},round:function(t,e){"round"in e&&void 0!==e.round&&(e.round&&"interpolate"in e&&void 0!==e.interpolate?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",e):"round"in t?t.round(e.round):"interpolate"in t&&e.round&&t.interpolate(Et))},align:function(t,e){"align"in t&&"align"in e&&void 0!==e.align&&t.align(e.align)},base:function(t,e){"base"in t&&"base"in e&&void 0!==e.base&&t.base(e.base)},clamp:function(t,e){"clamp"in t&&"clamp"in e&&void 0!==e.clamp&&t.clamp(e.clamp)},constant:function(t,e){"constant"in t&&"constant"in e&&void 0!==e.constant&&t.constant(e.constant)},exponent:function(t,e){"exponent"in t&&"exponent"in e&&void 0!==e.exponent&&t.exponent(e.exponent)},padding:function(t,e){"padding"in t&&"padding"in e&&void 0!==e.padding&&t.padding(e.padding),"paddingInner"in t&&"paddingInner"in e&&void 0!==e.paddingInner&&t.paddingInner(e.paddingInner),"paddingOuter"in t&&"paddingOuter"in e&&void 0!==e.paddingOuter&&t.paddingOuter(e.paddingOuter)},range:function(t,e){e.range&&t.range(e.range)},reverse:function(t,e){if(e.reverse){var n=t.range().slice().reverse();t.range(n)}},unknown:function(t,e){"unknown"in t&&"unknown"in e&&void 0!==e.unknown&&t.unknown(e.unknown)}};var se=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=new Set(e),i=le.filter(function(t){return r.has(t)});return function(t,e){return void 0!==e&&i.forEach(function(n){ue[n](t,e)}),t}}("domain","range","reverse","align","padding","round");function ce(t){return null==t?void 0:t.toString()}var fe,he={exports:{}};
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/fe=he,function(){var t={}.hasOwnProperty;function e(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=r(t,n(i)))}return t}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return e.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var o in n)t.call(n,o)&&n[o]&&(i=r(i,o));return i}function r(t,e){return e?t?t+" "+e:t+e:t}fe.exports?(e.default=e,fe.exports=e):window.classNames=e}();var de=he.exports,pe=["top","left","transform","className","children","innerRef"];function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ve.apply(this,arguments)}function ge(t){var e=t.top,n=void 0===e?0:e,i=t.left,o=void 0===i?0:i,a=t.transform,l=t.className,u=t.children,s=t.innerRef,c=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,pe);return r.default.createElement("g",ve({ref:s,className:de("visx-group",l),transform:a||"translate("+o+", "+n+")"},c),u)}ge.propTypes={top:i.default.number,left:i.default.number,transform:i.default.string,className:i.default.string,children:i.default.node,innerRef:i.default.oneOfType([i.default.string,i.default.func,i.default.object])};var ye=Math.PI,me=2*ye,xe=1e-6,we=me-xe;function be(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ke(){return new be}function Me(t){return function(){return t}}be.prototype=ke.prototype={constructor:be,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,l=n-t,u=r-e,s=o-t,c=a-e,f=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>xe)if(Math.abs(c*l-u*s)>xe&&i){var h=n-o,d=r-a,p=l*l+u*u,v=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(f),m=i*Math.tan((ye-Math.acos((p+f-v)/(2*g*y)))/2),x=m/y,w=m/g;Math.abs(x-1)>xe&&(this._+="L"+(t+x*s)+","+(e+x*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>s*d)+","+(this._x1=t+w*l)+","+(this._y1=e+w*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),l=n*Math.sin(r),u=t+a,s=e+l,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+s:(Math.abs(this._x1-u)>xe||Math.abs(this._y1-s)>xe)&&(this._+="L"+u+","+s),n&&(f<0&&(f=f%me+me),f>we?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):f>xe&&(this._+="A"+n+","+n+",0,"+ +(f>=ye)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},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._}};var Ee=Math.abs,Te=Math.atan2,_e=Math.cos,Pe=Math.max,Ne=Math.min,Oe=Math.sin,Se=Math.sqrt,Ae=1e-12,Ce=Math.PI,Re=Ce/2,Fe=2*Ce;function Le(t){return t>=1?Re:t<=-1?-Re:Math.asin(t)}function Ie(t){return t.innerRadius}function De(t){return t.outerRadius}function je(t){return t.startAngle}function Ue(t){return t.endAngle}function We(t){return t&&t.padAngle}function He(t,e,n,r,i,o,a){var l=t-n,u=e-r,s=(a?o:-o)/Se(l*l+u*u),c=s*u,f=-s*l,h=t+c,d=e+f,p=n+c,v=r+f,g=(h+p)/2,y=(d+v)/2,m=p-h,x=v-d,w=m*m+x*x,b=i-o,k=h*v-p*d,M=(x<0?-1:1)*Se(Pe(0,b*b*w-k*k)),E=(k*x-m*M)/w,T=(-k*m-x*M)/w,_=(k*x+m*M)/w,P=(-k*m+x*M)/w,N=E-g,O=T-y,S=_-g,A=P-y;return N*N+O*O>S*S+A*A&&(E=_,T=P),{cx:E,cy:T,x01:-c,y01:-f,x11:E*(i/b-1),y11:T*(i/b-1)}}function ze(){var t=Ie,e=De,n=Me(0),r=null,i=je,o=Ue,a=We,l=null;function u(){var u,s,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-Re,d=o.apply(this,arguments)-Re,p=Ee(d-h),v=d>h;if(l||(l=u=ke()),f<c&&(s=f,f=c,c=s),f>Ae)if(p>Fe-Ae)l.moveTo(f*_e(h),f*Oe(h)),l.arc(0,0,f,h,d,!v),c>Ae&&(l.moveTo(c*_e(d),c*Oe(d)),l.arc(0,0,c,d,h,v));else{var g,y,m=h,x=d,w=h,b=d,k=p,M=p,E=a.apply(this,arguments)/2,T=E>Ae&&(r?+r.apply(this,arguments):Se(c*c+f*f)),_=Ne(Ee(f-c)/2,+n.apply(this,arguments)),P=_,N=_;if(T>Ae){var O=Le(T/c*Oe(E)),S=Le(T/f*Oe(E));(k-=2*O)>Ae?(w+=O*=v?1:-1,b-=O):(k=0,w=b=(h+d)/2),(M-=2*S)>Ae?(m+=S*=v?1:-1,x-=S):(M=0,m=x=(h+d)/2)}var A=f*_e(m),C=f*Oe(m),R=c*_e(b),F=c*Oe(b);if(_>Ae){var L,I=f*_e(x),D=f*Oe(x),j=c*_e(w),U=c*Oe(w);if(p<Ce&&(L=function(t,e,n,r,i,o,a,l){var u=n-t,s=r-e,c=a-i,f=l-o,h=f*u-c*s;if(!(h*h<Ae))return[t+(h=(c*(e-o)-f*(t-i))/h)*u,e+h*s]}(A,C,j,U,I,D,R,F))){var W=A-L[0],H=C-L[1],z=I-L[0],Y=D-L[1],G=1/Oe(function(t){return t>1?0:t<-1?Ce:Math.acos(t)}((W*z+H*Y)/(Se(W*W+H*H)*Se(z*z+Y*Y)))/2),V=Se(L[0]*L[0]+L[1]*L[1]);P=Ne(_,(c-V)/(G-1)),N=Ne(_,(f-V)/(G+1))}}M>Ae?N>Ae?(g=He(j,U,A,C,f,N,v),y=He(I,D,R,F,f,N,v),l.moveTo(g.cx+g.x01,g.cy+g.y01),N<_?l.arc(g.cx,g.cy,N,Te(g.y01,g.x01),Te(y.y01,y.x01),!v):(l.arc(g.cx,g.cy,N,Te(g.y01,g.x01),Te(g.y11,g.x11),!v),l.arc(0,0,f,Te(g.cy+g.y11,g.cx+g.x11),Te(y.cy+y.y11,y.cx+y.x11),!v),l.arc(y.cx,y.cy,N,Te(y.y11,y.x11),Te(y.y01,y.x01),!v))):(l.moveTo(A,C),l.arc(0,0,f,m,x,!v)):l.moveTo(A,C),c>Ae&&k>Ae?P>Ae?(g=He(R,F,I,D,c,-P,v),y=He(A,C,j,U,c,-P,v),l.lineTo(g.cx+g.x01,g.cy+g.y01),P<_?l.arc(g.cx,g.cy,P,Te(g.y01,g.x01),Te(y.y01,y.x01),!v):(l.arc(g.cx,g.cy,P,Te(g.y01,g.x01),Te(g.y11,g.x11),!v),l.arc(0,0,c,Te(g.cy+g.y11,g.cx+g.x11),Te(y.cy+y.y11,y.cx+y.x11),v),l.arc(y.cx,y.cy,P,Te(y.y11,y.x11),Te(y.y01,y.x01),!v))):l.arc(0,0,c,b,w,v):l.lineTo(R,F)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ce/2;return[_e(r)*n,Oe(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Me(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Me(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Me(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Me(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Me(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Me(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Me(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function Ye(t){this._context=t}function Ge(t){return new Ye(t)}function Ve(t){return t[0]}function Be(t){return t[1]}function Xe(){var t=Ve,e=null,n=Me(0),r=Be,i=Me(!0),o=null,a=Ge,l=null;function u(u){var s,c,f,h,d,p=u.length,v=!1,g=new Array(p),y=new Array(p);for(null==o&&(l=a(d=ke())),s=0;s<=p;++s){if(!(s<p&&i(h=u[s],s,u))===v)if(v=!v)c=s,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=s-1;f>=c;--f)l.point(g[f],y[f]);l.lineEnd(),l.areaEnd()}v&&(g[s]=+t(h,s,u),y[s]=+n(h,s,u),l.point(e?+e(h,s,u):g[s],r?+r(h,s,u):y[s]))}if(d)return l=null,d+""||null}function s(){return function(){var t=Ve,e=Be,n=Me(!0),r=null,i=Ge,o=null;function a(a){var l,u,s,c=a.length,f=!1;for(null==r&&(o=i(s=ke())),l=0;l<=c;++l)!(l<c&&n(u=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,l,a),+e(u,l,a));if(s)return o=null,s+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Me(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Me(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Me(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Me(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Me(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Me(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Me(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:Me(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Me(+t),u):r},u.lineX0=u.lineY0=function(){return s().x(t).y(n)},u.lineY1=function(){return s().x(t).y(r)},u.lineX1=function(){return s().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Me(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}function qe(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $e(t){return t}function Ze(t,e){t(e)}function Je(t){var e=void 0===t?{}:t,n=e.x,r=e.x0,i=e.x1,o=e.y,a=e.y0,l=e.y1,u=e.defined,s=e.curve,c=Xe();return n&&Ze(c.x,n),r&&Ze(c.x0,r),i&&Ze(c.x1,i),o&&Ze(c.y,o),a&&Ze(c.y0,a),l&&Ze(c.y1,l),u&&c.defined(u),s&&c.curve(s),c}function Qe(t){var e=void 0===t?{}:t,n=e.startAngle,r=e.endAngle,i=e.padAngle,o=e.value,a=e.sort,l=e.sortValues,u=function(){var t=$e,e=qe,n=null,r=Me(0),i=Me(Fe),o=Me(0);function a(a){var l,u,s,c,f,h=a.length,d=0,p=new Array(h),v=new Array(h),g=+r.apply(this,arguments),y=Math.min(Fe,Math.max(-Fe,i.apply(this,arguments)-g)),m=Math.min(Math.abs(y)/h,o.apply(this,arguments)),x=m*(y<0?-1:1);for(l=0;l<h;++l)(f=v[p[l]=l]=+t(a[l],l,a))>0&&(d+=f);for(null!=e?p.sort(function(t,n){return e(v[t],v[n])}):null!=n&&p.sort(function(t,e){return n(a[t],a[e])}),l=0,s=d?(y-h*x)/d:0;l<h;++l,g=c)u=p[l],c=g+((f=v[u])>0?f*s:0)+x,v[u]={data:a[u],index:l,value:f,startAngle:g,endAngle:c,padAngle:m};return v}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Me(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Me(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Me(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Me(+t),a):o},a}();return(null===a||null!=a)&&u.sort(a),(null===l||null!=l)&&u.sortValues(l),null!=o&&u.value(o),null!=i&&Ze(u.padAngle,i),null!=n&&Ze(u.startAngle,n),null!=r&&Ze(u.endAngle,r),u}Ye.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 Ke=["className","top","left","data","centroid","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","pieSort","pieSortValues","pieValue","children","fill"];function tn(){return tn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},tn.apply(this,arguments)}function en(t){var e=t.className,n=t.top,i=t.left,o=t.data,a=void 0===o?[]:o,l=t.centroid,u=t.innerRadius,s=void 0===u?0:u,c=t.outerRadius,f=t.cornerRadius,h=t.startAngle,d=t.endAngle,p=t.padAngle,v=t.padRadius,g=t.pieSort,y=t.pieSortValues,m=t.pieValue,x=t.children,w=t.fill,b=void 0===w?"":w,k=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,Ke),M=function(t){var e=void 0===t?{}:t,n=e.innerRadius,r=e.outerRadius,i=e.cornerRadius,o=e.startAngle,a=e.endAngle,l=e.padAngle,u=e.padRadius,s=ze();return null!=n&&Ze(s.innerRadius,n),null!=r&&Ze(s.outerRadius,r),null!=i&&Ze(s.cornerRadius,i),null!=o&&Ze(s.startAngle,o),null!=a&&Ze(s.endAngle,a),null!=l&&Ze(s.padAngle,l),null!=u&&Ze(s.padRadius,u),s}({innerRadius:s,outerRadius:c,cornerRadius:f,padRadius:v}),E=Qe({startAngle:h,endAngle:d,padAngle:p,value:m,sort:g,sortValues:y}),T=E(a);return x?r.default.createElement(r.default.Fragment,null,x({arcs:T,path:M,pie:E})):r.default.createElement(ge,{className:"visx-pie-arcs-group",top:n,left:i},T.map(function(t,n){return r.default.createElement("g",{key:"pie-arc-"+n},r.default.createElement("path",tn({className:de("visx-pie-arc",e),d:M(t)||"",fill:null==b||"string"==typeof b?b:b(t)},k)),null==l?void 0:l(M.centroid(t),t))}))}var nn=["from","to","fill","className","innerRef"];function rn(){return rn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},rn.apply(this,arguments)}function on(t){var e=t.from,n=void 0===e?{x:0,y:0}:e,i=t.to,o=void 0===i?{x:1,y:1}:i,a=t.fill,l=void 0===a?"transparent":a,u=t.className,s=t.innerRef,c=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,nn),f=n.x===o.x||n.y===o.y;return r.default.createElement("line",rn({ref:s,className:de("visx-line",u),x1:n.x,y1:n.y,x2:o.x,y2:o.y,fill:l,shapeRendering:f?"crispEdges":"auto"},c))}var an=ln;function ln(t,e,n){t instanceof RegExp&&(t=un(t,n)),e instanceof RegExp&&(e=un(e,n));var r=sn(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function un(t,e){var n=e.match(t);return n?n[0]:null}function sn(t,e,n){var r,i,o,a,l,u=n.indexOf(t),s=n.indexOf(e,u+1),c=u;if(u>=0&&s>0){for(r=[],o=n.length;c>=0&&!l;)c==u?(r.push(c),u=n.indexOf(t,c+1)):1==r.length?l=[r.pop(),s]:((i=r.pop())<o&&(o=i,a=s),s=n.indexOf(e,c+1)),c=u<s&&u>=0?u:s;r.length&&(l=[o,a])}return l}ln.range=sn;var cn=fn;function fn(t,e,n){t instanceof RegExp&&(t=hn(t,n)),e instanceof RegExp&&(e=hn(e,n));var r=dn(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function hn(t,e){var n=e.match(t);return n?n[0]:null}function dn(t,e,n){var r,i,o,a,l,u=n.indexOf(t),s=n.indexOf(e,u+1),c=u;if(u>=0&&s>0){if(t===e)return[u,s];for(r=[],o=n.length;c>=0&&!l;)c==u?(r.push(c),u=n.indexOf(t,c+1)):1==r.length?l=[r.pop(),s]:((i=r.pop())<o&&(o=i,a=s),s=n.indexOf(e,c+1)),c=u<s&&u>=0?u:s;r.length&&(l=[o,a])}return l}fn.range=dn;var pn=cn,vn=gn;function gn(t,e,n){var r=t;return function(t,e){var n=[],r="string"==typeof e?new RegExp("\\b("+e+")\\("):e;do{var i=r.exec(t);if(!i)return n;if(void 0===i[1])throw new Error("Missing the first couple of parenthesis to get the function identifier in "+e);var o=i[1],a=i.index,l=pn("(",")",t.substring(a));if(!l||l.start!==i[0].length-1)throw new SyntaxError(o+"(): missing closing ')' in the value '"+t+"'");n.push({matches:l,functionIdentifier:o}),t=l.post}while(r.test(t));return n}(t,e).reduce(function(t,i){return t.replace(i.functionIdentifier+"("+i.matches.body+")",function(t,e,n,r,i){return n(gn(t,i,n),e,r)}(i.matches.body,i.functionIdentifier,n,r,e))},t)}var yn=function(t){this.value=t};yn.math={isDegree:!0,acos:function(t){return yn.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,e){return t+e},asin:function(t){return yn.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return yn.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,e){var n=1,r=t-e,i=e;i<r&&(i=r,r=e);for(var o=i+1;o<=t;o++)n*=o;return n/yn.math.fact(r)},changeSign:function(t){return-t},cos:function(t){return yn.math.isDegree&&(t=yn.math.toRadian(t)),Math.cos(t)},cosh:function(t){return(Math.pow(Math.E,t)+Math.pow(Math.E,-1*t))/2},div:function(t,e){return t/e},fact:function(t){if(t%1!=0)return"NaN";for(var e=1,n=2;n<=t;n++)e*=n;return e},inverse:function(t){return 1/t},log:function(t){return Math.log(t)/Math.log(10)},mod:function(t,e){return t%e},mul:function(t,e){return t*e},P:function(t,e){for(var n=1,r=Math.floor(t)-Math.floor(e)+1;r<=Math.floor(t);r++)n*=r;return n},Pi:function(t,e,n){for(var r=1,i=t;i<=e;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(t){for(var e=1;t--;)e*=10;return e},sigma:function(t,e,n){for(var r=0,i=t;i<=e;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(t){return yn.math.isDegree&&(t=yn.math.toRadian(t)),Math.sin(t)},sinh:function(t){return(Math.pow(Math.E,t)-Math.pow(Math.E,-1*t))/2},sub:function(t,e){return t-e},tan:function(t){return yn.math.isDegree&&(t=yn.math.toRadian(t)),Math.tan(t)},tanh:function(t){return yn.sinha(t)/yn.cosha(t)},toRadian:function(t){return t*Math.PI/180},and:function(t,e){return t&e}},yn.Exception=function(t){this.message=t};var mn=yn;function xn(t,e){for(var n=0;n<t.length;n++)t[n]+=e;return t}for(var wn=[{token:"sin",show:"sin",type:0,value:mn.math.sin},{token:"cos",show:"cos",type:0,value:mn.math.cos},{token:"tan",show:"tan",type:0,value:mn.math.tan},{token:"pi",show:"π",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:mn.math.P},{token:"C",show:"C",type:10,value:mn.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:mn.math.asin},{token:"acos",show:"acos",type:0,value:mn.math.acos},{token:"atan",show:"atan",type:0,value:mn.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:mn.math.cosh},{token:"acosh",show:"acosh",type:0,value:mn.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"÷",type:2,value:mn.math.div},{token:"!",show:"!",type:7,value:mn.math.fact},{token:"tanh",show:"tanh",type:0,value:mn.math.tanh},{token:"atanh",show:"atanh",type:0,value:mn.math.atanh},{token:"Mod",show:" Mod ",type:2,value:mn.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"×",type:2,value:mn.math.mul},{token:"sinh",show:"sinh",type:0,value:mn.math.sinh},{token:"asinh",show:"asinh",type:0,value:mn.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:mn.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:mn.math.add},{token:"-",show:"-",type:9,value:mn.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"Σ",type:12,value:mn.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"Π",type:12,value:mn.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:mn.math.and}],bn={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},kn=0;kn<wn.length;kn++)wn[kn].precedence=bn[wn[kn].type];var Mn={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},En={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},Tn={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},_n={},Pn={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},Nn={1:!0},On=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function Sn(t,e,n,r){for(var i=0;i<r;i++)if(t[n+i]!==e[i])return!1;return!0}function An(t,e){for(var n=0;n<e.length;n++)if(e[n].token===t)return n;return-1}function Cn(t){for(var e,n,r,i=[],o=t.length,a=0;a<o;a++)if(!(a<o-1&&" "===t[a]&&" "===t[a+1])){for(e="",n=t.length-a>On.length-2?On.length-1:t.length-a;n>0;n--)if(void 0!==On[n])for(r=0;r<On[n].length;r++)Sn(t,On[n][r],a,n)&&(e=On[n][r],r=On[n].length,n=0);if(a+=e.length-1,""===e)throw new mn.Exception("Can't understand after "+t.slice(a));i.push(wn[An(e,wn)])}return i}mn.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},mn.addToken=function(t){for(var e=0;e<t.length;e++){var n=t[e].token.length,r=-1;t[e].type===mn.tokenTypes.FUNCTION_WITH_N_ARGS&&void 0===t[e].numberOfArguments&&(t[e].numberOfArguments=2),On[n]=On[n]||[];for(var i=0;i<On[n].length;i++)if(t[e].token===On[n][i]){r=An(On[n][i],wn);break}-1===r?(wn.push(t[e]),t[e].precedence=bn[t[e].type],On.length<=t[e].token.length&&(On[t[e].token.length]=[]),On[t[e].token.length].push(t[e].token)):(wn[r]=t[e],t[e].precedence=bn[t[e].type])}};var Rn={value:mn.math.changeSign,type:0,pre:21,show:"-"},Fn={value:")",show:")",type:5,pre:0},Ln={value:"(",type:4,pre:0,show:"("};mn.lex=function(t,e){var n,r=[Ln],i=[],o=t,a=Mn,l=0,u=_n,s="";void 0!==e&&mn.addToken(e);var c={},f=Cn(o);for(n=0;n<f.length;n++){var h=f[n];if(14!==h.type){var d,p=h.token,v=h.type,g=h.value,y=h.precedence,m=h.show,x=r[r.length-1];for(d=i.length;d--&&0===i[d];)if(-1!==[0,2,3,4,5,9,11,12,13].indexOf(v)){if(!0!==a[v])throw new mn.Exception(p+" is not allowed after "+s);r.push(Fn),a=En,u=Pn,i.pop()}if(!0!==a[v])throw new mn.Exception(p+" is not allowed after "+s);if(!0===u[v]&&(v=2,g=mn.math.mul,m="×",y=3,n-=1),c={value:g,type:v,pre:y,show:m,numberOfArguments:h.numberOfArguments},0===v)a=Mn,u=_n,xn(i,2),r.push(c),4!==f[n+1].type&&(r.push(Ln),i.push(2));else if(1===v)1===x.type?(x.value+=g,xn(i,1)):r.push(c),a=En,u=Tn;else if(2===v)a=Mn,u=_n,xn(i,2),r.push(c);else if(3===v)r.push(c),a=En,u=Pn;else if(4===v)xn(i,1),l++,a=Mn,u=_n,r.push(c);else if(5===v){if(!l)throw new mn.Exception("Closing parenthesis are more than opening one, wait What!!!");l--,a=En,u=Pn,r.push(c),xn(i,1)}else if(6===v){if(x.hasDec)throw new mn.Exception("Two decimals are not allowed in one number");1!==x.type&&(x={value:0,type:1,pre:0},r.push(x)),a=Nn,xn(i,1),u=_n,x.value+=g,x.hasDec=!0}else 7===v&&(a=En,u=Pn,xn(i,1),r.push(c));8===v?(a=Mn,u=_n,xn(i,h.numberOfArguments+2),r.push(c),4!==f[n+1].type&&(r.push(Ln),i.push(h.numberOfArguments+2))):9===v?(9===x.type?x.value===mn.math.add?(x.value=g,x.show=m,xn(i,1)):x.value===mn.math.sub&&"-"===m&&(x.value=mn.math.add,x.show="+",xn(i,1)):5!==x.type&&7!==x.type&&1!==x.type&&3!==x.type&&13!==x.type?"-"===p&&(a=Mn,u=_n,xn(i,2).push(2),r.push(Rn),r.push(Ln)):(r.push(c),xn(i,2)),a=Mn,u=_n):10===v?(a=Mn,u=_n,xn(i,2),r.push(c)):11===v?(a=Mn,u=_n,r.push(c)):12===v?(a=Mn,u=_n,xn(i,6),r.push(c),4!==f[n+1].type&&(r.push(Ln),i.push(6))):13===v&&(a=En,u=Pn,r.push(c)),xn(i,-1),s=p}else if(n>0&&n<f.length-1&&1===f[n+1].type&&(1===f[n-1].type||6===f[n-1].type))throw new mn.Exception("Unexpected Space")}for(d=i.length;d--;)r.push(Fn);if(!0!==a[5])throw new mn.Exception("complete the expression");for(;l--;)r.push(Fn);return r.push(Fn),new mn(r)};var In=mn;In.prototype.toPostfix=function(){for(var t,e,n,r,i,o=[],a=[{value:"(",type:4,pre:0}],l=this.value,u=1;u<l.length;u++)if(1===l[u].type||3===l[u].type||13===l[u].type)1===l[u].type&&(l[u].value=Number(l[u].value)),o.push(l[u]);else if(4===l[u].type)a.push(l[u]);else if(5===l[u].type)for(;4!==(e=a.pop()).type;)o.push(e);else if(11===l[u].type){for(;4!==(e=a.pop()).type;)o.push(e);a.push(e)}else{r=(t=l[u]).pre,n=(i=a[a.length-1]).pre;var s="Math.pow"==i.value&&"Math.pow"==t.value;if(r>n)a.push(t);else{for(;n>=r&&!s||s&&r<n;)e=a.pop(),i=a[a.length-1],o.push(e),n=i.pre,s="Math.pow"==t.value&&"Math.pow"==i.value;a.push(t)}}return new In(o)};var Dn=In;Dn.prototype.postfixEval=function(t){(t=t||{}).PI=Math.PI,t.E=Math.E;for(var e,n,r,i=[],o=this.value,a=void 0!==t.n,l=0;l<o.length;l++)if(1===o[l].type)i.push({value:o[l].value,type:1});else if(3===o[l].type)i.push({value:t[o[l].value],type:1});else if(0===o[l].type)void 0===i[i.length-1].type?i[i.length-1].value.push(o[l]):i[i.length-1].value=o[l].value(i[i.length-1].value);else if(7===o[l].type)void 0===i[i.length-1].type?i[i.length-1].value.push(o[l]):i[i.length-1].value=o[l].value(i[i.length-1].value);else if(8===o[l].type){for(var u=[],s=0;s<o[l].numberOfArguments;s++)u.push(i.pop().value);i.push({type:1,value:o[l].value.apply(o[l],u.reverse())})}else 10===o[l].type?(e=i.pop(),void 0===(n=i.pop()).type?(n.value=n.concat(e),n.value.push(o[l]),i.push(n)):void 0===e.type?(e.unshift(n),e.push(o[l]),i.push(e)):i.push({type:1,value:o[l].value(n.value,e.value)})):2===o[l].type||9===o[l].type?(e=i.pop(),void 0===(n=i.pop()).type?((n=n.concat(e)).push(o[l]),i.push(n)):void 0===e.type?(e.unshift(n),e.push(o[l]),i.push(e)):i.push({type:1,value:o[l].value(n.value,e.value)})):12===o[l].type?(void 0!==(e=i.pop()).type&&(e=[e]),n=i.pop(),r=i.pop(),i.push({type:1,value:o[l].value(r.value,n.value,new Dn(e))})):13===o[l].type&&(a?i.push({value:t[o[l].value],type:3}):i.push([o[l]]));if(i.length>1)throw new Dn.Exception("Uncaught Syntax error");return i[0].value>1e15?"Infinity":parseFloat(i[0].value.toFixed(15))},Dn.eval=function(t,e,n){return void 0===e?this.lex(t).toPostfix().postfixEval():void 0===n?void 0!==e.length?this.lex(t,e).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(e):this.lex(t,e).toPostfix().postfixEval(n)};var jn=Dn;jn.prototype.formulaEval=function(){for(var t,e,n,r=[],i=this.value,o=0;o<i.length;o++)1===i[o].type||3===i[o].type?r.push({value:3===i[o].type?i[o].show:i[o].value,type:1}):13===i[o].type?r.push({value:i[o].show,type:1}):0===i[o].type?r[r.length-1]={value:i[o].show+("-"!=i[o].show?"(":"")+r[r.length-1].value+("-"!=i[o].show?")":""),type:0}:7===i[o].type?r[r.length-1]={value:(1!=r[r.length-1].type?"(":"")+r[r.length-1].value+(1!=r[r.length-1].type?")":"")+i[o].show,type:7}:10===i[o].type?(t=r.pop(),e=r.pop(),"P"===i[o].show||"C"===i[o].show?r.push({value:"<sup>"+e.value+"</sup>"+i[o].show+"<sub>"+t.value+"</sub>",type:10}):r.push({value:(1!=e.type?"(":"")+e.value+(1!=e.type?")":"")+"<sup>"+t.value+"</sup>",type:1})):2===i[o].type||9===i[o].type?(t=r.pop(),e=r.pop(),r.push({value:(1!=e.type?"(":"")+e.value+(1!=e.type?")":"")+i[o].show+(1!=t.type?"(":"")+t.value+(1!=t.type?")":""),type:i[o].type})):12===i[o].type&&(t=r.pop(),e=r.pop(),n=r.pop(),r.push({value:i[o].show+"("+n.value+","+e.value+","+t.value+")",type:12}));return r[0].value};var Un,Wn=an,Hn=vn,zn=jn,Yn=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Gn=function(t,e){function n(t,r,i){if(Un++>100)throw Un=0,new Error("Call stack overflow for "+i);if(""===t)throw new Error(r+"(): '"+i+"' must contain a non-whitespace string");t=function(t,e){t=t.replace(/((?:\-[a-z]+\-)?calc)/g,"");var r,i="",o=t;for(;r=Yn.exec(o);){r[0].index>0&&(i+=o.substring(0,r[0].index));var a=Wn("(",")",o.substring([0].index));if(""===a.body)throw new Error("'"+t+"' must contain a non-whitespace string");var l=n(a.body,"",e);i+=a.pre+l,o=a.post}return i+o}(t,i);var o=function(t){var e=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(t);for(;i;)i&&i[1]&&(-1===n.indexOf(i[1].toLowerCase())&&(e.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(t));return e}(t);if(o.length>1||t.indexOf("var(")>-1)return r+"("+t+")";var a=o[0]||"";"%"===a&&(t=t.replace(/\b[0-9\.]+%/g,function(t){return.01*parseFloat(t.slice(0,-1))}));var l,u=t.replace(new RegExp(a,"gi"),"");try{l=zn.eval(u)}catch(e){return r+"("+t+")"}return"%"===a&&(l*=100),(r.length||"%"===a)&&(l=Math.round(l*e)/e),l+=a}return Un=0,e=Math.pow(10,void 0===e?5:e),t=t.replace(/\n+/g," "),Hn(t,/((?:\-[a-z]+\-)?calc)\(/,n)};var Vn="object"==typeof l&&l&&l.Object===Object&&l,Bn="object"==typeof self&&self&&self.Object===Object&&self,Xn=Vn||Bn||Function("return this")(),qn=Xn.Symbol,$n=qn,Zn=Object.prototype,Jn=Zn.hasOwnProperty,Qn=Zn.toString,Kn=$n?$n.toStringTag:void 0;var tr=function(t){var e=Jn.call(t,Kn),n=t[Kn];try{t[Kn]=void 0;var r=!0}catch(t){}var i=Qn.call(t);return r&&(e?t[Kn]=n:delete t[Kn]),i},er=Object.prototype.toString;var nr=tr,rr=function(t){return er.call(t)},ir=qn