react-d3-calendar-heatmap
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -0,1 +1,6 @@ | ||
## 0.0.14 | ||
- Update dependencies | ||
- Replace react-use by @react-hookz/web | ||
## 0.0.13 | ||
@@ -2,0 +7,0 @@ |
import "./CalendarHeatMap.css"; | ||
import * as React from "react"; | ||
import { BaseCalendarHeatMapItemType, CalendarHeatMapProps } from "./CalendarHeatMapProps"; | ||
declare const CalendarHeatMap: <CalendarHeatMapItemType extends BaseCalendarHeatMapItemType>({ className, data, weekday, disableTooltip, tooltipOffsetX, tooltipOffsetY, tooltipPlacement, tooltipClassName, timeRange, customD3ColorScale, width, cellSize, cellShape, formatDate, valueFn, defaultColor, marginTop, marginBottom, marginLeft, paddingUnderMonthHeader, paddingAfterDayOfWeekHeader, cellPadding, formatDay, fillToWidth, labelsFillColor, }: CalendarHeatMapProps<CalendarHeatMapItemType>) => React.ReactElement; | ||
declare const CalendarHeatMap: <CalendarHeatMapItemType extends BaseCalendarHeatMapItemType>({ className, data, weekday, disableTooltip, tooltipOffsetX, tooltipOffsetY, tooltipPlacement, tooltipClassName, timeRange, customD3ColorScale, width, cellSize, cellShape, formatDate, formatMonth, valueFn, defaultColor, marginTop, marginBottom, marginLeft, paddingUnderMonthHeader, paddingAfterDayOfWeekHeader, cellPadding, formatDay, fillToWidth, labelsFillColor, }: CalendarHeatMapProps<CalendarHeatMapItemType>) => React.ReactElement; | ||
export default CalendarHeatMap; |
@@ -7,6 +7,7 @@ import { ScaleSequential } from "d3-scale"; | ||
} | ||
export declare type CellShape = "circle" | "square"; | ||
export declare type BaseCalendarHeatMapItemType = { | ||
export type CellShape = "circle" | "square"; | ||
export type BaseCalendarHeatMapItemType = { | ||
day: string; | ||
value: number; | ||
projects?: Record<string, string>; | ||
}; | ||
@@ -28,2 +29,3 @@ export interface CalendarHeatMapProps<CalendarHeatMapItemType> { | ||
formatDate?: (date: Date) => string; | ||
formatMonth?: (date: Date) => string; | ||
formatDay?: (dayOfWeek: number) => string; | ||
@@ -30,0 +32,0 @@ valueFn?: (value: number) => string; |
import "./Tooltip.css"; | ||
import * as React from "react"; | ||
import { BaseCalendarHeatMapItemType } from "../CalendarHeatMap/CalendarHeatMapProps"; | ||
interface TooltipProps { | ||
label: React.ReactNode; | ||
value?: number; | ||
projects?: Record<string, number>; | ||
projects?: BaseCalendarHeatMapItemType["projects"]; | ||
} | ||
export declare const Tooltip: React.NamedExoticComponent<TooltipProps>; | ||
export {}; |
@@ -10,3 +10,4 @@ import * as React from "react"; | ||
} | ||
export declare const TooltipContainer: React.NamedExoticComponent<TooltipContainerProps>; | ||
export default TooltipContainer; | ||
export declare const TooltipContainer: ({ position, placement, offsetX, offsetY, children, }: TooltipContainerProps) => React.JSX.Element; | ||
declare const _default: React.NamedExoticComponent<TooltipContainerProps>; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
export declare type TooltipPlacement = "top" | "topRight" | "topLeft" | "bottom" | "bottomRight" | "bottomLeft" | "right" | "left"; | ||
export declare type TooltipPosition = [number, number]; | ||
export type TooltipPlacement = "top" | "topRight" | "topLeft" | "bottom" | "bottomRight" | "bottomLeft" | "right" | "left"; | ||
export type TooltipPosition = [number, number]; |
/*! For license information please see react.d3.calendar.heatmap.js.LICENSE.txt */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactD3CalendarHeatmap=t(require("react")):e.ReactD3CalendarHeatmap=t(e.React)}(self,(function(e){return(()=>{var t={184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===a)for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},383:t=>{"use strict";t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>$n});var e=r(383),t=r(184),n=r.n(t),a=new Date,i=new Date;function u(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,a){var i,u=[];if(n=o.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return u;do{u.push(i=new Date(+n)),t(n,a),e(n)}while(i<n&&n<r);return u},o.filter=function(n){return u((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return a.setTime(+t),i.setTime(+r),e(a),e(i),Math.floor(n(a,i))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}const l=864e5,c=6048e5;function f(e){return u((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/c}))}var s=f(0),h=f(1),g=f(2),d=f(3),p=f(4),m=f(5),v=f(6),y=(s.range,h.range,g.range,d.range,p.range,m.range,v.range,u((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));y.every=function(e){return isFinite(e=Math.floor(e))&&e>0?u((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};const b=y;y.range;var M=u((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/l),(e=>e.getDate()-1));const w=M;M.range;var x=u((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const C=x;var T=x.range;function D(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function U(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function k(){}var N=.7,S=1/N,F="\\s*([+-]?\\d+)\\s*",Y="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",E="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",H=/^#([0-9a-f]{3,8})$/,A=new RegExp("^rgb\\("+[F,F,F]+"\\)$"),O=new RegExp("^rgb\\("+[E,E,E]+"\\)$"),j=new RegExp("^rgba\\("+[F,F,F,Y]+"\\)$"),L=new RegExp("^rgba\\("+[E,E,E,Y]+"\\)$"),P=new RegExp("^hsl\\("+[Y,E,E]+"\\)$"),z=new RegExp("^hsla\\("+[Y,E,E,Y]+"\\)$"),R={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 q(){return this.rgb().formatHex()}function W(){return this.rgb().formatRgb()}function _(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=H.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?X(t):3===n?new I(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?$(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?$(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=A.exec(e))?new I(t[1],t[2],t[3],1):(t=O.exec(e))?new I(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=j.exec(e))?$(t[1],t[2],t[3],t[4]):(t=L.exec(e))?$(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=P.exec(e))?G(t[1],t[2]/100,t[3]/100,1):(t=z.exec(e))?G(t[1],t[2]/100,t[3]/100,t[4]):R.hasOwnProperty(e)?X(R[e]):"transparent"===e?new I(NaN,NaN,NaN,0):null}function X(e){return new I(e>>16&255,e>>8&255,255&e,1)}function $(e,t,n,r){return r<=0&&(e=t=n=NaN),new I(e,t,n,r)}function V(e){return e instanceof k||(e=_(e)),e?new I((e=e.rgb()).r,e.g,e.b,e.opacity):new I}function Z(e,t,n,r){return 1===arguments.length?V(e):new I(e,t,n,null==r?1:r)}function I(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function B(){return"#"+Q(this.r)+Q(this.g)+Q(this.b)}function J(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function Q(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function G(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ee(e,t,n,r)}function K(e){if(e instanceof ee)return new ee(e.h,e.s,e.l,e.opacity);if(e instanceof k||(e=_(e)),!e)return new ee;if(e instanceof ee)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,u=a-o,l=(a+o)/2;return u?(i=t===a?(n-r)/u+6*(n<r):n===a?(r-t)/u+2:(t-n)/u+4,u/=l<.5?a+o:2-a-o,i*=60):u=l>0&&l<1?0:i,new ee(i,u,l,e.opacity)}function ee(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function te(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function ne(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}D(k,_,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:q,formatHex:q,formatHsl:function(){return K(this).formatHsl()},formatRgb:W,toString:W}),D(I,Z,U(k,{brighter:function(e){return e=null==e?S:Math.pow(S,e),new I(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?N:Math.pow(N,e),new I(this.r*e,this.g*e,this.b*e,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:B,formatHex:B,formatRgb:J,toString:J})),D(ee,(function(e,t,n,r){return 1===arguments.length?K(e):new ee(e,t,n,null==r?1:r)}),U(k,{brighter:function(e){return e=null==e?S:Math.pow(S,e),new ee(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?N:Math.pow(N,e),new ee(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new I(te(e>=240?e-240:e+120,o,r),te(e,o,r),te(e<120?e+240:e-120,o,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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const re=e=>()=>e;function oe(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):re(isNaN(e)?t:e)}const ae=function e(t){var n=function(e){return 1==(e=+e)?oe:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):re(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Z(e)).r,(t=Z(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=oe(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function ie(e){return function(t){var n,r,o=t.length,a=new Array(o),i=new Array(o),u=new Array(o);for(n=0;n<o;++n)r=Z(t[n]),a[n]=r.r||0,i[n]=r.g||0,u[n]=r.b||0;return a=e(a),i=e(i),u=e(u),r.opacity=1,function(e){return r.r=a(e),r.g=i(e),r.b=u(e),r+""}}}var ue=ie((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,u=r<t-1?e[r+2]:2*a-o;return ne((n-r/t)*t,i,o,a,u)}}));function le(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=new Array(o),i=new Array(r);for(n=0;n<o;++n)a[n]=me(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}function ce(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function fe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function se(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=me(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}ie((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],a=e[r%t],i=e[(r+1)%t],u=e[(r+2)%t];return ne((n-r/t)*t,o,a,i,u)}}));var he=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ge=new RegExp(he.source,"g");function de(e,t){var n,r,o,a=he.lastIndex=ge.lastIndex=0,i=-1,u=[],l=[];for(e+="",t+="";(n=he.exec(e))&&(r=ge.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(n=n[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,l.push({i,x:fe(n,r)})),a=ge.lastIndex;return a<t.length&&(o=t.slice(a),u[i]?u[i]+=o:u[++i]=o),u.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)u[(n=l[r]).i]=n.x(e);return u.join("")})}function pe(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function me(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?re(t):("number"===o?fe:"string"===o?(n=_(t))?(t=n,ae):de:t instanceof _?ae:t instanceof Date?ce:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?le:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?se:fe:pe))(e,t)}function ve(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function ye(e){return e}function be(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}var Me=Math.sqrt(50),we=Math.sqrt(10),xe=Math.sqrt(2);function Ce(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,o);return o>=0?(a>=Me?10:a>=we?5:a>=xe?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(a>=Me?10:a>=we?5:a>=xe?2:1)}var Te,De=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ue(e){if(!(t=De.exec(e)))throw new Error("invalid format: "+e);var t;return new ke({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ke(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Ne(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Se(e){return(e=Ne(Math.abs(e)))?e[1]:NaN}function Fe(e,t){var n=Ne(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Ue.prototype=ke.prototype,ke.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};const Ye={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fe(100*e,t),r:Fe,s:function(e,t){var n=Ne(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(Te=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ne(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ee(e){return e}var He,Ae,Oe,je=Array.prototype.map,Le=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Pe(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,a,i,u=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(i=Ce(e,t,n))||!isFinite(i))return[];if(i>0){let n=Math.round(e/i),r=Math.round(t/i);for(n*i<e&&++n,r*i>t&&--r,a=new Array(o=r-n+1);++u<o;)a[u]=(n+u)*i}else{i=-i;let n=Math.round(e*i),r=Math.round(t*i);for(n/i<e&&++n,r/i>t&&--r,a=new Array(o=r-n+1);++u<o;)a[u]=(n+u)/i}return r&&a.reverse(),a}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var o,a=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/o;return a>=Me?o*=10:a>=we?o*=5:a>=xe&&(o*=2),t<e?-o:o}(e,t,n);switch((r=Ue(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Se(t)/3)))-Se(Math.abs(e)))}(a,i))||(r.precision=o),Oe(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Se(t)-Se(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-Se(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return Ae(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,u=a.length-1,l=a[i],c=a[u],f=10;for(c<l&&(o=l,l=c,c=o,o=i,i=u,u=o);f-- >0;){if((o=Ce(l,c,n))===r)return a[i]=l,a[u]=c,t(a);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function ze(){var e,t,n,r,o,a=0,i=1,u=ye,l=!1;function c(t){return isNaN(t=+t)?o:u(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function f(e){return function(t){var n,r;return arguments.length?([n,r]=t,u=e(n,r),c):[u(0),u(1)]}}return c.domain=function(o){return arguments.length?([a,i]=o,e=r(a=+a),t=r(i=+i),n=e===t?0:1/(t-e),c):[a,i]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(u=e,c):u},c.range=f(me),c.rangeRound=f(ve),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(a),t=o(i),n=e===t?0:1/(t-e),c}}function Re(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function qe(){var e=Pe(ze()(ye));return e.copy=function(){return Re(e,qe())},be.apply(e,arguments)}He=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Ee:(t=je.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,u=t[0],l=0;o>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),a.push(e.substring(o-=u,o+u)),!((l+=u+1)>r));)u=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?Ee:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(je.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",f=void 0===e.nan?"NaN":e.nan+"";function s(e){var t=(e=Ue(e)).fill,n=e.align,s=e.sign,h=e.symbol,g=e.zero,d=e.width,p=e.comma,m=e.precision,v=e.trim,y=e.type;"n"===y?(p=!0,y="g"):Ye[y]||(void 0===m&&(m=12),v=!0,y="g"),(g||"0"===t&&"="===n)&&(g=!0,t="0",n="=");var b="$"===h?o:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",M="$"===h?a:/[%p]/.test(y)?l:"",w=Ye[y],x=/[defgprs%]/.test(y);function C(e){var o,a,l,h=b,C=M;if("c"===y)C=w(e)+C,e="";else{var T=(e=+e)<0||1/e<0;if(e=isNaN(e)?f:w(Math.abs(e),m),v&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),T&&0==+e&&"+"!==s&&(T=!1),h=(T?"("===s?s:c:"-"===s||"("===s?"":s)+h,C=("s"===y?Le[8+Te/3]:"")+C+(T&&"("===s?")":""),x)for(o=-1,a=e.length;++o<a;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?i+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}p&&!g&&(e=r(e,1/0));var D=h.length+e.length+C.length,U=D<d?new Array(d-D+1).join(t):"";switch(p&&g&&(e=r(U+e,U.length?d-C.length:1/0),U=""),n){case"<":e=h+e+C+U;break;case"=":e=h+U+e+C;break;case"^":e=U.slice(0,D=U.length>>1)+h+e+C+U.slice(D);break;default:e=U+h+e+C}return u(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:s,formatPrefix:function(e,t){var n=s(((e=Ue(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Se(t)/3))),o=Math.pow(10,-r),a=Le[8+r/3];return function(e){return n(o*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Ae=He.format,Oe=He.formatPrefix;const We=(_e=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map((function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n})),ue(_e[_e.length-1]));var _e;function Xe(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function $e(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function Ve(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ze(e,t,n=0,r=e.length-1,o=Ve){for(;r>n;){if(r-n>600){const a=r-n+1,i=t-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(i-a/2<0?-1:1);Ze(e,t,Math.max(n,Math.floor(t-i*l/a+c)),Math.min(r,Math.floor(t+(a-i)*l/a+c)),o)}const a=e[t];let i=n,u=r;for(Ie(e,n,t),o(e[r],a)>0&&Ie(e,n,r);i<u;){for(Ie(e,i,u),++i,--u;o(e[i],a)<0;)++i;for(;o(e[u],a)>0;)--u}0===o(e[n],a)?Ie(e,n,u):(++u,Ie(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function Ie(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Be(e,t,n){if(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length){if((t=+t)<=0||r<2)return $e(e);if(t>=1)return Xe(e);var r,o=(r-1)*t,a=Math.floor(o),i=Xe(Ze(e,a).subarray(0,a+1));return i+($e(e.subarray(a+1))-i)*(o-a)}}function Je(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(o);++r<o;)a[r]=e+r*n;return a}var Qe=u((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/l}),(function(e){return e.getUTCDate()-1}));const Ge=Qe;function Ke(e){return u((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/c}))}Qe.range;var et=Ke(0),tt=Ke(1),nt=Ke(2),rt=Ke(3),ot=Ke(4),at=Ke(5),it=Ke(6),ut=(et.range,tt.range,nt.range,rt.range,ot.range,at.range,it.range,u((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})));ut.every=function(e){return isFinite(e=Math.floor(e))&&e>0?u((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null};const lt=ut;function ct(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ft(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function st(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}ut.range;var ht,gt,dt={"-":"",_:" ",0:"0"},pt=/^\s*\d+/,mt=/^%/,vt=/[\\^$*+?|[\]().{}]/g;function yt(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a<n?new Array(n-a+1).join(t)+o:o)}function bt(e){return e.replace(vt,"\\$&")}function Mt(e){return new RegExp("^(?:"+e.map(bt).join("|")+")","i")}function wt(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function xt(e,t,n){var r=pt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ct(e,t,n){var r=pt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ut(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=pt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Nt(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function St(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ft(e,t,n){var r=pt.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Yt(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Et(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ht(e,t,n){var r=pt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function At(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=pt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=pt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=pt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zt(e,t,n){var r=mt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rt(e,t,n){var r=pt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qt(e,t,n){var r=pt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Wt(e,t){return yt(e.getDate(),t,2)}function _t(e,t){return yt(e.getHours(),t,2)}function Xt(e,t){return yt(e.getHours()%12||12,t,2)}function $t(e,t){return yt(1+w.count(lt(e),e),t,3)}function Vt(e,t){return yt(e.getMilliseconds(),t,3)}function Zt(e,t){return Vt(e,t)+"000"}function It(e,t){return yt(e.getMonth()+1,t,2)}function Bt(e,t){return yt(e.getMinutes(),t,2)}function Jt(e,t){return yt(e.getSeconds(),t,2)}function Qt(e){var t=e.getDay();return 0===t?7:t}function Gt(e,t){return yt(et.count(lt(e)-1,e),t,2)}function Kt(e){var t=e.getDay();return t>=4||0===t?ot(e):ot.ceil(e)}function en(e,t){return e=Kt(e),yt(ot.count(lt(e),e)+(4===lt(e).getDay()),t,2)}function tn(e){return e.getDay()}function nn(e,t){return yt(tt.count(lt(e)-1,e),t,2)}function rn(e,t){return yt(e.getFullYear()%100,t,2)}function on(e,t){return yt((e=Kt(e)).getFullYear()%100,t,2)}function an(e,t){return yt(e.getFullYear()%1e4,t,4)}function un(e,t){var n=e.getDay();return yt((e=n>=4||0===n?ot(e):ot.ceil(e)).getFullYear()%1e4,t,4)}function ln(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+yt(t/60|0,"0",2)+yt(t%60,"0",2)}function cn(e,t){return yt(e.getUTCDate(),t,2)}function fn(e,t){return yt(e.getUTCHours(),t,2)}function sn(e,t){return yt(e.getUTCHours()%12||12,t,2)}function hn(e,t){return yt(1+Ge.count(b(e),e),t,3)}function gn(e,t){return yt(e.getUTCMilliseconds(),t,3)}function dn(e,t){return gn(e,t)+"000"}function pn(e,t){return yt(e.getUTCMonth()+1,t,2)}function mn(e,t){return yt(e.getUTCMinutes(),t,2)}function vn(e,t){return yt(e.getUTCSeconds(),t,2)}function yn(e){var t=e.getUTCDay();return 0===t?7:t}function bn(e,t){return yt(s.count(b(e)-1,e),t,2)}function Mn(e){var t=e.getUTCDay();return t>=4||0===t?p(e):p.ceil(e)}function wn(e,t){return e=Mn(e),yt(p.count(b(e),e)+(4===b(e).getUTCDay()),t,2)}function xn(e){return e.getUTCDay()}function Cn(e,t){return yt(h.count(b(e)-1,e),t,2)}function Tn(e,t){return yt(e.getUTCFullYear()%100,t,2)}function Dn(e,t){return yt((e=Mn(e)).getUTCFullYear()%100,t,2)}function Un(e,t){return yt(e.getUTCFullYear()%1e4,t,4)}function kn(e,t){var n=e.getUTCDay();return yt((e=n>=4||0===n?p(e):p.ceil(e)).getUTCFullYear()%1e4,t,4)}function Nn(){return"+0000"}function Sn(){return"%"}function Fn(e){return+e}function Yn(e){return Math.floor(+e/1e3)}(ht=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,u=e.months,l=e.shortMonths,c=Mt(o),f=wt(o),s=Mt(a),g=wt(a),d=Mt(i),p=wt(i),m=Mt(u),v=wt(u),y=Mt(l),b=wt(l),M={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:null,d:Wt,e:Wt,f:Zt,g:on,G:un,H:_t,I:Xt,j:$t,L:Vt,m:It,M:Bt,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Fn,s:Yn,S:Jt,u:Qt,U:Gt,V:en,w:tn,W:nn,x:null,X:null,y:rn,Y:an,Z:ln,"%":Sn},x={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:cn,e:cn,f:dn,g:Dn,G:kn,H:fn,I:sn,j:hn,L:gn,m:pn,M:mn,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Fn,s:Yn,S:vn,u:yn,U:bn,V:wn,w:xn,W:Cn,x:null,X:null,y:Tn,Y:Un,Z:Nn,"%":Sn},C={a:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=s.exec(t.slice(n));return r?(e.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return U(e,t,n,r)},d:Et,e:Et,f:Pt,g:Nt,G:kt,H:At,I:At,j:Ht,L:Lt,m:Yt,M:Ot,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ft,Q:Rt,s:qt,S:jt,u:Ct,U:Tt,V:Dt,w:xt,W:Ut,x:function(e,t,r){return U(e,n,t,r)},X:function(e,t,n){return U(e,r,t,n)},y:Nt,Y:kt,Z:St,"%":zt};function T(e,t){return function(n){var r,o,a,i=[],u=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++u<c;)37===e.charCodeAt(u)&&(i.push(e.slice(l,u)),null!=(o=dt[r=e.charAt(++u)])?r=e.charAt(++u):o="e"===r?" ":"0",(a=t[r])&&(r=a(n,o)),i.push(r),l=u+1);return i.push(e.slice(l,u)),i.join("")}}function D(e,t){return function(n){var r,o,a=st(1900,void 0,1);if(U(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(o=(r=ft(st(a.y,0,1))).getUTCDay(),r=o>4||0===o?h.ceil(r):h(r),r=Ge.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=ct(st(a.y,0,1))).getDay(),r=o>4||0===o?tt.ceil(r):tt(r),r=w.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?ft(st(a.y,0,1)).getUTCDay():ct(st(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ft(a)):ct(a)}}function U(e,t,n,r){for(var o,a,i=0,u=t.length,l=n.length;i<u;){if(r>=l)return-1;if(37===(o=t.charCodeAt(i++))){if(o=t.charAt(i++),!(a=C[o in dt?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return M.x=T(n,M),M.X=T(r,M),M.c=T(t,M),x.x=T(n,x),x.X=T(r,x),x.c=T(t,x),{format:function(e){var t=T(e+="",M);return t.toString=function(){return e},t},parse:function(e){var t=D(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=T(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=D(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,ht.parse,gt=ht.utcFormat,ht.utcParse;var En=function(){},Hn="undefined"!=typeof window;const An=Hn?e.useLayoutEffect:e.useEffect;var On={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const jn=Hn&&void 0!==window.ResizeObserver?function(){var t=(0,e.useState)(null),n=t[0],r=t[1],o=(0,e.useState)(On),a=o[0],i=o[1],u=(0,e.useMemo)((function(){return new window.ResizeObserver((function(e){if(e[0]){var t=e[0].contentRect,n=t.x,r=t.y,o=t.width,a=t.height,u=t.top,l=t.left,c=t.bottom,f=t.right;i({x:n,y:r,width:o,height:a,top:u,left:l,bottom:c,right:f})}}))}),[]);return An((function(){if(n)return u.observe(n),function(){u.disconnect()}}),[n]),[r,a]}:function(){return[En,On]},Ln=e.memo((function(t){var n=t.position,r=t.placement,o=t.offsetX,a=void 0===o?0:o,i=t.offsetY,u=void 0===i?0:i,l=t.children,c=jn(),f=c[0],s=c[1],h=s.width,g=s.height,d=n[0],p=n[1],m=Math.round(d),v=Math.round(p);if(h>0&&g>0)switch(r){case"bottom":m-=h/2;break;case"bottomLeft":m-=h,v+=g/2;break;case"bottomRight":m+=25,v+=20;break;case"left":m-=h+a,v-=g/2+u;break;case"right":m+=20+a,v-=g/2+u;break;case"top":m-=h/2,v-=g;break;case"topLeft":m-=h,v-=g;break;case"topRight":m+=20,v-=g}var y={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0,maxWidth:"calc(50% - 15px)",transform:"translate("+m+"px, "+v+"px)"};return e.createElement("div",{ref:f,style:y},l)}));var Pn={showTooltip:function(){throw new Error("TooltipContext not initalized")},hideTooltip:function(){throw new Error("TooltipContext not initalized")},disableTooltip:!1,valueFn:function(e){return""+e}};const zn=e.createContext(Pn),Rn=function(t){var n=t.tooltipPlacement,r=t.tooltipClassName,o=t.tooltipOffsetX,a=t.tooltipOffsetY,i=t.disableTooltip,u=t.valueFn,l=t.children,c=e.useRef(null),f=e.useState(!1),s=f[0],h=f[1],g=e.useState([null,null]),d=g[0],p=g[1],m=e.useState(null),v=m[0],y=m[1],b=e.useState(n),M=b[0],w=b[1],x=e.useCallback((function(e,t){var n=t.clientX,r=t.clientY,o=c.current.getBoundingClientRect(),a=o.width,i=n-o.left,u=r-o.top;M||w(i<a/2?"right":"left"),h(!0),p([i,u]),y(e)}),[c,y,h,p]),C=e.useCallback((function(){h(!1)}),[h,p]),T=e.useMemo((function(){return{showTooltip:x,hideTooltip:C,tooltipClassName:r,valueFn:u,disableTooltip:i}}),[x,C,r,u]);return e.createElement(zn.Provider,{value:T},e.createElement("div",{ref:c},l,s&&e.createElement(Ln,{position:d,placement:M,offsetX:o,offsetY:a},v)))},qn=function(){return e.useContext(zn)};var Wn=e.memo((function(t){var n=t.label,r=t.value,o=t.projects,a=qn(),i=a.tooltipClassName,u=a.valueFn;return e.createElement("div",{className:i},e.createElement("div",{className:"CalendarHeatMap__tooltip"},void 0!==r?e.createElement(e.Fragment,null,e.createElement("span",{className:"CalendarHeatMap__tooltipLabel"},n,": "),e.createElement("span",{className:"CalendarHeatMap__tooltipValue"},""+u(r))):n,o&&e.createElement("div",{className:"CalendarHeatMap__tooltipProjects"},Object.keys(o).map((function(t,n){return e.createElement("div",{key:n},e.createElement("span",{className:"CalendarHeatMap__tooltipLabel"},t,":"," "),e.createElement("span",{className:"CalendarHeatMap__tooltipValue"},""+u(o[t])))})))))})),_n=function(){return(_n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};const Xn=function(t){var n=t.color,r=t.cellSize,o=t.cellPadding,a=t.c,i=t.countDay,u=t.timeWeek,l=t.formatDate,c=t.from,f=t.cellShape,s=t.defaultColor,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["color","cellSize","cellPadding","c","countDay","timeWeek","formatDate","from","cellShape","defaultColor"]),g=qn(),d=g.hideTooltip,p=g.showTooltip,m=g.disableTooltip,v=e.createElement(Wn,{key:a.day,label:""+l(new Date(a.day)),value:a.value,projects:"projects"in a?a.projects:void 0}),y=e.useCallback((function(e){p(v,e)}),[p,c]),b=e.useCallback((function(){d()}),[d]),M=new Date(a.day),w=u.count(c,M)*r+o/2,x=i(M.getUTCDay())*r+o/2;return e.createElement("rect",_n({onMouseEnter:m?void 0:y,onMouseLeave:m?void 0:b,onMouseMove:m?void 0:y,rx:"circle"===f?9999:1,width:r-o,height:r-o,x:w,y:x,fill:a.value?n(a.value):s},h))},$n=function(t){var r=t.className,o=t.data,a=t.weekday,i=void 0===a?"weekday":a,u=t.disableTooltip,l=void 0!==u&&u,c=t.tooltipOffsetX,f=void 0===c?0:c,s=t.tooltipOffsetY,g=void 0===s?0:s,d=t.tooltipPlacement,p=t.tooltipClassName,m=t.timeRange,v=t.customD3ColorScale,y=void 0===v?qe(We):v,M=t.width,x=void 0===M?900:M,D=t.cellSize,U=void 0===D?17:D,k=t.cellShape,N=void 0===k?"circle":k,S=t.formatDate,F=void 0===S?gt("%Y-%m-%d"):S,Y=t.valueFn,E=void 0===Y?Ae(".2f"):Y,H=t.defaultColor,A=void 0===H?"#eeeeee":H,O=t.marginTop,j=void 0===O?0:O,L=t.marginBottom,P=void 0===L?0:L,z=t.marginLeft,R=void 0===z?0:z,q=t.paddingUnderMonthHeader,W=void 0===q?8:q,_=t.paddingAfterDayOfWeekHeader,X=void 0===_?8:_,$=t.cellPadding,V=void 0===$?2:$,Z=t.formatDay,I=void 0===Z?function(e){return"SMTWTFS"[e]}:Z,B=t.fillToWidth,J=void 0!==B&&B,Q=t.labelsFillColor,G=void 0===Q?"black":Q,K=x,ee=o,te=ee[0],ne=ee[o.length-1],re=h,oe=e.useMemo((function(){return m||{from:b(new Date(te?te.day:"")),to:new Date(ne?ne.day:"")}}),[m,ne,te]),ae=oe.to,ie=oe.from;if(J){var ue=28+R+49,le=ae,ce=void 0;do{ce=re.count(re.ceil(le),ae)*U+2+ue,le=w.offset(le,-1)}while(K>=ce);ie=le}var fe=w.range(ie,ae).map((function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return o.filter((function(e){return n=new Date(e.day),r=t,n.getUTCFullYear()===r.getUTCFullYear()&&n.getUTCMonth()===r.getUTCMonth()&&n.getUTCDate()===r.getUTCDate();var n,r})).pop()||{day:t.toISOString().slice(0,10),value:0}})),se=gt("%b"),he=Be(fe,.9975,(function(e){return Math.abs(e.value)})),ge=y.domain([-he,+he]),de="weekend"===i?function(e){return(e-1+7)%7}:function(e){return(e+6)%7},pe="weekday"===i?Je(1,6):Je(0,7),me=T(C(ie),ae),ve="weekday"===i?fe.filter((function(e){return![0,6].includes(new Date(e.day).getUTCDay())})):fe,ye=U*("weekday"===i?6:8)+j+P+W,be=ie.getUTCFullYear()===ae.getUTCFullYear(),Me=be?X:X+15,we=ie.getUTCFullYear()+(be?"":"/"+ae.getUTCFullYear().toString().slice(-2)),xe=e.useMemo((function(){return ve.map((function(t,n){return e.createElement(Xn,{key:n,c:t,color:ge,cellSize:U,countDay:de,timeWeek:re,formatDate:F,from:ie,cellShape:N,defaultColor:A,cellPadding:V})}))}),[U,N,V,A,ie,de,re,ge]);return e.createElement(Rn,{tooltipPlacement:d,tooltipClassName:p,disableTooltip:l,tooltipOffsetX:f,tooltipOffsetY:g,valueFn:E},e.createElement("div",{className:n()("CalendarHeatMap",r)},e.createElement("svg",{fontSize:"10px",viewBox:"0 0 "+K+" "+ye},e.createElement("g",{transform:"translate("+(28+R+Me)+", "+(10+j+W)+")"},e.createElement("text",{x:-X,y:-W,fontWeight:"bold",textAnchor:"end",fill:G},we),e.createElement("g",{textAnchor:"end"},pe.map((function(t,n){return e.createElement("text",{key:n,x:-X,y:(de(t)+.5)*U,dy:"0.31em",fill:G},I(t))}))),e.createElement("g",null,xe),e.createElement("g",null,me.map((function(t,n){var r=re.count(ie,re.ceil(t))*U+2;return r<=-10?null:e.createElement("g",{key:n},e.createElement("text",{x:Math.max(r,0),y:-W,fill:G},se(t)))})))))))}})(),o})()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactD3CalendarHeatmap=t(require("react")):e.ReactD3CalendarHeatmap=t(e.React)}(self,(e=>(()=>{var t={119:t=>{"use strict";t.exports=e},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";r.r(o),r.d(o,{default:()=>_n});var e=r(119),t=r(942),n=r.n(t);const a=new Date,i=new Date;function u(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,a)=>{const i=[];if(n=o.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return i;let u;do{i.push(u=new Date(+n)),t(n,a),e(n)}while(u<n&&n<r);return i},o.filter=n=>u((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(a.setTime(+t),i.setTime(+r),e(a),e(i),Math.floor(n(a,i))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const l=864e5,c=6048e5;function s(e){return u((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/c))}const f=s(0),h=s(1),g=s(2),d=s(3),p=s(4),m=s(5),v=s(6);function y(e){return u((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/c))}f.range,h.range,g.range,d.range,p.range,m.range,v.range;const b=y(0),M=y(1),w=y(2),x=y(3),C=y(4),T=y(5),D=y(6),U=(b.range,M.range,w.range,x.range,C.range,T.range,D.range,u((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear())));U.every=e=>isFinite(e=Math.floor(e))&&e>0?u((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,U.range;const k=u((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));k.every=e=>isFinite(e=Math.floor(e))&&e>0?u((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,k.range;const N=u((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/l),(e=>e.getDate()-1)),S=(N.range,u((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/l),(e=>e.getUTCDate()-1))),F=(S.range,u((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/l),(e=>Math.floor(e/l)))),$=(F.range,u((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()))),Y=($.range,u((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()))),E=Y.range;function H(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function A(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function O(){}var j=.7,L=1/j,P="\\s*([+-]?\\d+)\\s*",R="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",z="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q=/^#([0-9a-f]{3,8})$/,_=new RegExp(`^rgb\\(${P},${P},${P}\\)$`),W=new RegExp(`^rgb\\(${z},${z},${z}\\)$`),X=new RegExp(`^rgba\\(${P},${P},${P},${R}\\)$`),V=new RegExp(`^rgba\\(${z},${z},${z},${R}\\)$`),Z=new RegExp(`^hsl\\(${R},${z},${z}\\)$`),I=new RegExp(`^hsla\\(${R},${z},${z},${R}\\)$`),B={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function J(){return this.rgb().formatHex()}function Q(){return this.rgb().formatRgb()}function G(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=q.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?K(t):3===n?new ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ee(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ee(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=_.exec(e))?new ne(t[1],t[2],t[3],1):(t=W.exec(e))?new ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=X.exec(e))?ee(t[1],t[2],t[3],t[4]):(t=V.exec(e))?ee(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Z.exec(e))?le(t[1],t[2]/100,t[3]/100,1):(t=I.exec(e))?le(t[1],t[2]/100,t[3]/100,t[4]):B.hasOwnProperty(e)?K(B[e]):"transparent"===e?new ne(NaN,NaN,NaN,0):null}function K(e){return new ne(e>>16&255,e>>8&255,255&e,1)}function ee(e,t,n,r){return r<=0&&(e=t=n=NaN),new ne(e,t,n,r)}function te(e,t,n,r){return 1===arguments.length?((o=e)instanceof O||(o=G(o)),o?new ne((o=o.rgb()).r,o.g,o.b,o.opacity):new ne):new ne(e,t,n,null==r?1:r);var o}function ne(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function re(){return`#${ue(this.r)}${ue(this.g)}${ue(this.b)}`}function oe(){const e=ae(this.opacity);return`${1===e?"rgb(":"rgba("}${ie(this.r)}, ${ie(this.g)}, ${ie(this.b)}${1===e?")":`, ${e})`}`}function ae(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ie(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ue(e){return((e=ie(e))<16?"0":"")+e.toString(16)}function le(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new se(e,t,n,r)}function ce(e){if(e instanceof se)return new se(e.h,e.s,e.l,e.opacity);if(e instanceof O||(e=G(e)),!e)return new se;if(e instanceof se)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,u=a-o,l=(a+o)/2;return u?(i=t===a?(n-r)/u+6*(n<r):n===a?(r-t)/u+2:(t-n)/u+4,u/=l<.5?a+o:2-a-o,i*=60):u=l>0&&l<1?0:i,new se(i,u,l,e.opacity)}function se(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function fe(e){return(e=(e||0)%360)<0?e+360:e}function he(e){return Math.max(0,Math.min(1,e||0))}function ge(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function de(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}H(O,G,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:J,formatHex:J,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ce(this).formatHsl()},formatRgb:Q,toString:Q}),H(ne,te,A(O,{brighter(e){return e=null==e?L:Math.pow(L,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?j:Math.pow(j,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ne(ie(this.r),ie(this.g),ie(this.b),ae(this.opacity))},displayable(){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:re,formatHex:re,formatHex8:function(){return`#${ue(this.r)}${ue(this.g)}${ue(this.b)}${ue(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:oe,toString:oe})),H(se,(function(e,t,n,r){return 1===arguments.length?ce(e):new se(e,t,n,null==r?1:r)}),A(O,{brighter(e){return e=null==e?L:Math.pow(L,e),new se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?j:Math.pow(j,e),new se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ne(ge(e>=240?e-240:e+120,o,r),ge(e,o,r),ge(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new se(fe(this.h),he(this.s),he(this.l),ae(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ae(this.opacity);return`${1===e?"hsl(":"hsla("}${fe(this.h)}, ${100*he(this.s)}%, ${100*he(this.l)}%${1===e?")":`, ${e})`}`}}));const pe=e=>()=>e;function me(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):pe(isNaN(e)?t:e)}const ve=function e(t){var n=function(e){return 1==(e=+e)?me:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):pe(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=te(e)).r,(t=te(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=me(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function ye(e){return function(t){var n,r,o=t.length,a=new Array(o),i=new Array(o),u=new Array(o);for(n=0;n<o;++n)r=te(t[n]),a[n]=r.r||0,i[n]=r.g||0,u[n]=r.b||0;return a=e(a),i=e(i),u=e(u),r.opacity=1,function(e){return r.r=a(e),r.g=i(e),r.b=u(e),r+""}}}var be=ye((function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,u=r<t-1?e[r+2]:2*a-o;return de((n-r/t)*t,i,o,a,u)}}));function Me(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=new Array(o),i=new Array(r);for(n=0;n<o;++n)a[n]=Ne(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}function we(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function xe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ce(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Ne(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}ye((function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],a=e[r%t],i=e[(r+1)%t],u=e[(r+2)%t];return de((n-r/t)*t,o,a,i,u)}}));var Te=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,De=new RegExp(Te.source,"g");function Ue(e,t){var n,r,o,a=Te.lastIndex=De.lastIndex=0,i=-1,u=[],l=[];for(e+="",t+="";(n=Te.exec(e))&&(r=De.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),u[i]?u[i]+=o:u[++i]=o),(n=n[0])===(r=r[0])?u[i]?u[i]+=r:u[++i]=r:(u[++i]=null,l.push({i,x:xe(n,r)})),a=De.lastIndex;return a<t.length&&(o=t.slice(a),u[i]?u[i]+=o:u[++i]=o),u.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)u[(n=l[r]).i]=n.x(e);return u.join("")})}function ke(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function Ne(e,t){var n,r,o=typeof t;return null==t||"boolean"===o?pe(t):("number"===o?xe:"string"===o?(n=G(t))?(t=n,ve):Ue:t instanceof G?ve:t instanceof Date?we:(r=t,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(t)?Me:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ce:xe:ke))(e,t)}function Se(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Fe(e){return e}function $e(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const Ye=Math.sqrt(50),Ee=Math.sqrt(10),He=Math.sqrt(2);function Ae(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),a=r/Math.pow(10,o),i=a>=Ye?10:a>=Ee?5:a>=He?2:1;let u,l,c;return o<0?(c=Math.pow(10,-o)/i,u=Math.round(e*c),l=Math.round(t*c),u/c<e&&++u,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*i,u=Math.round(e/c),l=Math.round(t/c),u*c<e&&++u,l*c>t&&--l),l<u&&.5<=n&&n<2?Ae(e,t,2*n):[u,l,c]}function Oe(e,t,n){return Ae(e=+e,t=+t,n=+n)[2]}var je,Le=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pe(e){if(!(t=Le.exec(e)))throw new Error("invalid format: "+e);var t;return new Re({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Re(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function ze(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qe(e){return(e=ze(Math.abs(e)))?e[1]:NaN}function _e(e,t){var n=ze(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Pe.prototype=Re.prototype,Re.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};const We={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>_e(100*e,t),r:_e,s:function(e,t){var n=ze(e,t);if(!n)return e+"";var r=n[0],o=n[1],a=o-(je=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ze(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xe(e){return e}var Ve,Ze,Ie,Be=Array.prototype.map,Je=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Qe(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,a,i]=r?Ae(t,e,n):Ae(e,t,n);if(!(a>=o))return[];const u=a-o+1,l=new Array(u);if(r)if(i<0)for(let e=0;e<u;++e)l[e]=(a-e)/-i;else for(let e=0;e<u;++e)l[e]=(a-e)*i;else if(i<0)for(let e=0;e<u;++e)l[e]=(o+e)/-i;else for(let e=0;e<u;++e)l[e]=(o+e)*i;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return function(e,t,n,r){var o,a=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?Oe(t,e,n):Oe(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}(e,t,n);switch((r=Pe(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qe(t)/3)))-qe(Math.abs(e)))}(a,i))||(r.precision=o),Ie(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qe(t)-qe(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-qe(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return Ze(r)}(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,u=a.length-1,l=a[i],c=a[u],s=10;for(c<l&&(o=l,l=c,c=o,o=i,i=u,u=o);s-- >0;){if((o=Oe(l,c,n))===r)return a[i]=l,a[u]=c,t(a);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function Ge(){var e=Qe(function(){var e,t,n,r,o,a=0,i=1,u=Fe,l=!1;function c(t){return null==t||isNaN(t=+t)?o:u(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function s(e){return function(t){var n,r;return arguments.length?([n,r]=t,u=e(n,r),c):[u(0),u(1)]}}return c.domain=function(o){return arguments.length?([a,i]=o,e=r(a=+a),t=r(i=+i),n=e===t?0:1/(t-e),c):[a,i]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(u=e,c):u},c.range=s(Ne),c.rangeRound=s(Se),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(a),t=o(i),n=e===t?0:1/(t-e),c}}()(Fe));return e.copy=function(){return t=e,Ge().domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown());var t},$e.apply(e,arguments)}Ve=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Xe:(t=Be.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,u=t[0],l=0;o>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),a.push(e.substring(o-=u,o+u)),!((l+=u+1)>r));)u=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",u=void 0===e.numerals?Xe:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Be.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",s=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Pe(e)).fill,n=e.align,f=e.sign,h=e.symbol,g=e.zero,d=e.width,p=e.comma,m=e.precision,v=e.trim,y=e.type;"n"===y?(p=!0,y="g"):We[y]||(void 0===m&&(m=12),v=!0,y="g"),(g||"0"===t&&"="===n)&&(g=!0,t="0",n="=");var b="$"===h?o:"#"===h&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",M="$"===h?a:/[%p]/.test(y)?l:"",w=We[y],x=/[defgprs%]/.test(y);function C(e){var o,a,l,h=b,C=M;if("c"===y)C=w(e)+C,e="";else{var T=(e=+e)<0||1/e<0;if(e=isNaN(e)?s:w(Math.abs(e),m),v&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),T&&0==+e&&"+"!==f&&(T=!1),h=(T?"("===f?f:c:"-"===f||"("===f?"":f)+h,C=("s"===y?Je[8+je/3]:"")+C+(T&&"("===f?")":""),x)for(o=-1,a=e.length;++o<a;)if(48>(l=e.charCodeAt(o))||l>57){C=(46===l?i+e.slice(o+1):e.slice(o))+C,e=e.slice(0,o);break}}p&&!g&&(e=r(e,1/0));var D=h.length+e.length+C.length,U=D<d?new Array(d-D+1).join(t):"";switch(p&&g&&(e=r(U+e,U.length?d-C.length:1/0),U=""),n){case"<":e=h+e+C+U;break;case"=":e=h+U+e+C;break;case"^":e=U.slice(0,D=U.length>>1)+h+e+C+U.slice(D);break;default:e=U+h+e+C}return u(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return e+""},C}return{format:f,formatPrefix:function(e,t){var n=f(((e=Pe(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(qe(t)/3))),o=Math.pow(10,-r),a=Je[8+r/3];return function(e){return n(o*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Ze=Ve.format,Ie=Ve.formatPrefix;const Ke=(e=>be(e[e.length-1]))(new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map((function(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n})));function et(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function tt(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function nt(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rt(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function ot(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?rt:function(e=nt){if(e===nt)return rt;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const a=r-n+1,i=t-n+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(i-a/2<0?-1:1);ot(e,t,Math.max(n,Math.floor(t-i*l/a+c)),Math.min(r,Math.floor(t+(a-i)*l/a+c)),o)}const a=e[t];let i=n,u=r;for(at(e,n,t),o(e[r],a)>0&&at(e,n,r);i<u;){for(at(e,i,u),++i,--u;o(e[i],a)<0;)++i;for(;o(e[u],a)>0;)--u}0===o(e[n],a)?at(e,n,u):(++u,at(e,u,r)),u<=t&&(n=u+1),t<=u&&(r=u-1)}return e}function at(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function it(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return tt(e);if(t>=1)return et(e);var r,o=(r-1)*t,a=Math.floor(o),i=et(ot(e,a).subarray(0,a+1));return i+(tt(e.subarray(a+1))-i)*(o-a)}}function ut(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(o);++r<o;)a[r]=e+r*n;return a}function lt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ct(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function st(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var ft,ht,gt={"-":"",_:" ",0:"0"},dt=/^\s*\d+/,pt=/^%/,mt=/[\\^$*+?|[\]().{}]/g;function vt(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a<n?new Array(n-a+1).join(t)+o:o)}function yt(e){return e.replace(mt,"\\$&")}function bt(e){return new RegExp("^(?:"+e.map(yt).join("|")+")","i")}function Mt(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function wt(e,t,n){var r=dt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function xt(e,t,n){var r=dt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ct(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Tt(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Ut(e,t,n){var r=dt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function St(e,t,n){var r=dt.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Ft(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $t(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Yt(e,t,n){var r=dt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ht(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function At(e,t,n){var r=dt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=dt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=dt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Lt(e,t,n){var r=pt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Pt(e,t,n){var r=dt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=dt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function zt(e,t){return vt(e.getDate(),t,2)}function qt(e,t){return vt(e.getHours(),t,2)}function _t(e,t){return vt(e.getHours()%12||12,t,2)}function Wt(e,t){return vt(1+N.count(U(e),e),t,3)}function Xt(e,t){return vt(e.getMilliseconds(),t,3)}function Vt(e,t){return Xt(e,t)+"000"}function Zt(e,t){return vt(e.getMonth()+1,t,2)}function It(e,t){return vt(e.getMinutes(),t,2)}function Bt(e,t){return vt(e.getSeconds(),t,2)}function Jt(e){var t=e.getDay();return 0===t?7:t}function Qt(e,t){return vt(f.count(U(e)-1,e),t,2)}function Gt(e){var t=e.getDay();return t>=4||0===t?p(e):p.ceil(e)}function Kt(e,t){return e=Gt(e),vt(p.count(U(e),e)+(4===U(e).getDay()),t,2)}function en(e){return e.getDay()}function tn(e,t){return vt(h.count(U(e)-1,e),t,2)}function nn(e,t){return vt(e.getFullYear()%100,t,2)}function rn(e,t){return vt((e=Gt(e)).getFullYear()%100,t,2)}function on(e,t){return vt(e.getFullYear()%1e4,t,4)}function an(e,t){var n=e.getDay();return vt((e=n>=4||0===n?p(e):p.ceil(e)).getFullYear()%1e4,t,4)}function un(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+vt(t/60|0,"0",2)+vt(t%60,"0",2)}function ln(e,t){return vt(e.getUTCDate(),t,2)}function cn(e,t){return vt(e.getUTCHours(),t,2)}function sn(e,t){return vt(e.getUTCHours()%12||12,t,2)}function fn(e,t){return vt(1+S.count(k(e),e),t,3)}function hn(e,t){return vt(e.getUTCMilliseconds(),t,3)}function gn(e,t){return hn(e,t)+"000"}function dn(e,t){return vt(e.getUTCMonth()+1,t,2)}function pn(e,t){return vt(e.getUTCMinutes(),t,2)}function mn(e,t){return vt(e.getUTCSeconds(),t,2)}function vn(e){var t=e.getUTCDay();return 0===t?7:t}function yn(e,t){return vt(b.count(k(e)-1,e),t,2)}function bn(e){var t=e.getUTCDay();return t>=4||0===t?C(e):C.ceil(e)}function Mn(e,t){return e=bn(e),vt(C.count(k(e),e)+(4===k(e).getUTCDay()),t,2)}function wn(e){return e.getUTCDay()}function xn(e,t){return vt(M.count(k(e)-1,e),t,2)}function Cn(e,t){return vt(e.getUTCFullYear()%100,t,2)}function Tn(e,t){return vt((e=bn(e)).getUTCFullYear()%100,t,2)}function Dn(e,t){return vt(e.getUTCFullYear()%1e4,t,4)}function Un(e,t){var n=e.getUTCDay();return vt((e=n>=4||0===n?C(e):C.ceil(e)).getUTCFullYear()%1e4,t,4)}function kn(){return"+0000"}function Nn(){return"%"}function Sn(e){return+e}function Fn(e){return Math.floor(+e/1e3)}function $n(t){const n=(0,e.useRef)(t);return n.current=t,(0,e.useMemo)((()=>Object.freeze({get current(){return n.current}})),[])}ft=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,u=e.months,l=e.shortMonths,c=bt(o),s=Mt(o),f=bt(a),g=Mt(a),d=bt(i),p=Mt(i),m=bt(u),v=Mt(u),y=bt(l),b=Mt(l),w={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return u[e.getMonth()]},c:null,d:zt,e:zt,f:Vt,g:rn,G:an,H:qt,I:_t,j:Wt,L:Xt,m:Zt,M:It,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Sn,s:Fn,S:Bt,u:Jt,U:Qt,V:Kt,w:en,W:tn,x:null,X:null,y:nn,Y:on,Z:un,"%":Nn},x={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return u[e.getUTCMonth()]},c:null,d:ln,e:ln,f:gn,g:Tn,G:Un,H:cn,I:sn,j:fn,L:hn,m:dn,M:pn,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Sn,s:Fn,S:mn,u:vn,U:yn,V:Mn,w:wn,W:xn,x:null,X:null,y:Cn,Y:Dn,Z:kn,"%":Nn},C={a:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return U(e,t,n,r)},d:$t,e:$t,f:jt,g:kt,G:Ut,H:Et,I:Et,j:Yt,L:Ot,m:Ft,M:Ht,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=s.get(r[0].toLowerCase()),n+r[0].length):-1},q:St,Q:Pt,s:Rt,S:At,u:xt,U:Ct,V:Tt,w:wt,W:Dt,x:function(e,t,r){return U(e,n,t,r)},X:function(e,t,n){return U(e,r,t,n)},y:kt,Y:Ut,Z:Nt,"%":Lt};function T(e,t){return function(n){var r,o,a,i=[],u=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++u<c;)37===e.charCodeAt(u)&&(i.push(e.slice(l,u)),null!=(o=gt[r=e.charAt(++u)])?r=e.charAt(++u):o="e"===r?" ":"0",(a=t[r])&&(r=a(n,o)),i.push(r),l=u+1);return i.push(e.slice(l,u)),i.join("")}}function D(e,t){return function(n){var r,o,a=st(1900,void 0,1);if(U(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(o=(r=ct(st(a.y,0,1))).getUTCDay(),r=o>4||0===o?M.ceil(r):M(r),r=S.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=lt(st(a.y,0,1))).getDay(),r=o>4||0===o?h.ceil(r):h(r),r=N.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?ct(st(a.y,0,1)).getUTCDay():lt(st(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,ct(a)):lt(a)}}function U(e,t,n,r){for(var o,a,i=0,u=t.length,l=n.length;i<u;){if(r>=l)return-1;if(37===(o=t.charCodeAt(i++))){if(o=t.charAt(i++),!(a=C[o in gt?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return w.x=T(n,w),w.X=T(r,w),w.c=T(t,w),x.x=T(n,x),x.X=T(r,x),x.c=T(t,x),{format:function(e){var t=T(e+="",w);return t.toString=function(){return e},t},parse:function(e){var t=D(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=T(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=D(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ft.format,ft.parse,ht=ft.utcFormat,ft.utcParse;const Yn="undefined"!=typeof window&&"undefined"!=typeof navigator&&"undefined"!=typeof document;let En;function Hn(t=!0){const[n,r]=(0,e.useState)(null),o=function(){const t=$n((e=>(r(e),e))),n=$n(void 0);return(0,e.useMemo)((()=>{let e=null;return{get current(){return void 0===n.current?e:n.current(e)},set current(n){e=void 0===t.current?n:t.current(n)}}}),[])}(),[a,i]=(0,e.useState)(),[u]=function(t){const n=$n(t),r=(0,e.useRef)(0),o=(0,e.useCallback)((()=>{Yn&&r.current&&(cancelAnimationFrame(r.current),r.current=0)}),[]);return function(t){const n=$n(t);(0,e.useEffect)((()=>()=>{n.current()}),[])}(o),[(0,e.useMemo)((()=>{const e=(...e)=>{Yn&&(o(),r.current=requestAnimationFrame((()=>{n.current(...e),r.current=0})))};return Object.defineProperties(e,{length:{value:t.length},name:{value:`${t.name||"anonymous"}__raf`}}),e}),[]),o]}((e=>{i({width:e.contentRect.width,height:e.contentRect.height})}));return function(t,n,r=!0){const o=r&&function(){if(!Yn)return;if(En)return En;const e=new Map,t=new ResizeObserver((t=>{for(const n of t)e.get(n.target)?.forEach((e=>setTimeout((()=>{e(n)}),0)))}));return En={observer:t,subscribe(n,r){let o=e.get(n);o||(o=new Set,e.set(n,o),t.observe(n)),o.add(r)},unsubscribe(n,r){const o=e.get(n);o&&(o.delete(r),0===o.size&&(e.delete(n),t.unobserve(n)))}},En}(),a=$n(n),i=t&&"current"in t?t.current:t;(0,e.useEffect)((()=>{const e=t&&"current"in t?t.current:t;if(!o||!e)return;let n=!0;const r=(...e)=>{n&&a.current(...e)};return o.subscribe(e,r),()=>{n=!1,o.unsubscribe(e,r)}}),[i,o])}(n,u,t),[a,o]}const An=e.memo((function(t){var n=t.position,r=t.placement,o=t.offsetX,a=void 0===o?0:o,i=t.offsetY,u=void 0===i?0:i,l=t.children,c=Hn(),s=c[0],f=c[1],h=s||{},g=h.width,d=h.height,p=n[0],m=n[1],v=Math.round(p),y=Math.round(m);if(g>0&&d>0)switch(r){case"bottom":v-=g/2;break;case"bottomLeft":v-=g,y+=d/2;break;case"bottomRight":v+=25,y+=20;break;case"left":v-=g+a,y-=d/2+u;break;case"right":v+=20+a,y-=d/2+u;break;case"top":v-=g/2,y-=d;break;case"topLeft":v-=g,y-=d;break;case"topRight":v+=20,y-=d}var b={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0,maxWidth:"calc(50% - 15px)",transform:"translate(".concat(v,"px, ").concat(y,"px)")};return e.createElement("div",{ref:f,style:b},l)}));var On={showTooltip:function(){throw new Error("TooltipContext not initalized")},hideTooltip:function(){throw new Error("TooltipContext not initalized")},disableTooltip:!1,valueFn:function(e){return"".concat(e)}};const jn=e.createContext(On),Ln=function(t){var n=t.tooltipPlacement,r=t.tooltipClassName,o=t.tooltipOffsetX,a=t.tooltipOffsetY,i=t.disableTooltip,u=t.valueFn,l=t.children,c=e.useRef(null),s=e.useState(!1),f=s[0],h=s[1],g=e.useState([null,null]),d=g[0],p=g[1],m=e.useState(null),v=m[0],y=m[1],b=e.useState(n),M=b[0],w=b[1],x=e.useCallback((function(e,t){var n=t.clientX,r=t.clientY,o=c.current.getBoundingClientRect(),a=o.width,i=n-o.left,u=r-o.top;M||w(i<a/2?"right":"left"),h(!0),p([i,u]),y(e)}),[c]),C=e.useCallback((function(){h(!1)}),[h]),T=e.useMemo((function(){return{showTooltip:x,hideTooltip:C,tooltipClassName:r,valueFn:u,disableTooltip:i}}),[x,C,r,u,i]);return e.createElement(jn.Provider,{value:T},e.createElement("div",{ref:c},l,f&&e.createElement(An,{position:d,placement:M,offsetX:o,offsetY:a},v)))},Pn=function(){return e.useContext(jn)};var Rn=e.memo((function(t){var n=t.label,r=t.value,o=t.projects,a=Pn(),i=a.tooltipClassName,u=a.valueFn;return e.createElement("div",{className:i},e.createElement("div",{className:"CalendarHeatMap__tooltip"},void 0!==r?e.createElement(e.Fragment,null,e.createElement("span",{className:"CalendarHeatMap__tooltipLabel"},n,": "),e.createElement("span",{className:"CalendarHeatMap__tooltipValue"},"".concat(u(r)))):n,o&&e.createElement("div",{className:"CalendarHeatMap__tooltipProjects"},Object.keys(o).map((function(t,n){var r=o[t],a=isNaN(r)?0:Number(r);return e.createElement("div",{key:n},e.createElement("span",{className:"CalendarHeatMap__tooltipLabel"},t,":"," "),e.createElement("span",{className:"CalendarHeatMap__tooltipValue"},"".concat(u(a))))})))))})),zn=function(){return zn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},zn.apply(this,arguments)};const qn=function(t){var n=t.color,r=t.cellSize,o=t.cellPadding,a=t.c,i=t.countDay,u=t.timeWeek,l=t.formatDate,c=t.from,s=t.cellShape,f=t.defaultColor,h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["color","cellSize","cellPadding","c","countDay","timeWeek","formatDate","from","cellShape","defaultColor"]),g=Pn(),d=g.hideTooltip,p=g.showTooltip,m=g.disableTooltip,v=e.useMemo((function(){return e.createElement(Rn,{key:a.day,label:"".concat(l(new Date(a.day))),value:a.value,projects:"projects"in a?a.projects:void 0})}),[a,l]),y=e.useCallback((function(e){p(v,e)}),[p,v]),b=e.useCallback((function(){d()}),[d]),M=new Date(a.day),w=u.count(c,M)*r+o/2,x=i(M.getUTCDay())*r+o/2;return e.createElement("rect",zn({onMouseEnter:m?void 0:y,onMouseLeave:m?void 0:b,onMouseMove:m?void 0:y,rx:"circle"===s?9999:1,width:r-o,height:r-o,x:w,y:x,fill:a.value?n(a.value):f},h))},_n=function(t){var r=t.className,o=t.data,a=t.weekday,i=void 0===a?"weekday":a,u=t.disableTooltip,l=void 0!==u&&u,c=t.tooltipOffsetX,s=void 0===c?0:c,f=t.tooltipOffsetY,h=void 0===f?0:f,g=t.tooltipPlacement,d=t.tooltipClassName,p=t.timeRange,m=t.customD3ColorScale,v=void 0===m?Ge(Ke):m,y=t.width,b=void 0===y?900:y,w=t.cellSize,x=void 0===w?17:w,C=t.cellShape,T=void 0===C?"circle":C,D=t.formatDate,U=void 0===D?ht("%Y-%m-%d"):D,S=t.formatMonth,F=void 0===S?ht("%b"):S,$=t.valueFn,H=void 0===$?Ze(".2f"):$,A=t.defaultColor,O=void 0===A?"#eeeeee":A,j=t.marginTop,L=void 0===j?0:j,P=t.marginBottom,R=void 0===P?0:P,z=t.marginLeft,q=void 0===z?0:z,_=t.paddingUnderMonthHeader,W=void 0===_?8:_,X=t.paddingAfterDayOfWeekHeader,V=void 0===X?8:X,Z=t.cellPadding,I=void 0===Z?2:Z,B=t.formatDay,J=void 0===B?function(e){return"SMTWTFS"[e]}:B,Q=t.fillToWidth,G=void 0!==Q&&Q,K=t.labelsFillColor,ee=void 0===K?"black":K,te=b,ne=o,re=ne[0],oe=ne[o.length-1],ae=M,ie=e.useMemo((function(){return p||{from:k(new Date(re?re.day:"")),to:new Date(oe?oe.day:"")}}),[p,oe,re]),ue=ie.to,le=ie.from;if(G){var ce=28+q+49,se=ue,fe=void 0;do{fe=ae.count(ae.ceil(se),ue)*x+2+ce,se=N.offset(se,-1)}while(te>=fe);le=se}var he=N.range(le,ue).map((function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()));return o.filter((function(e){return n=new Date(e.day),r=t,n.getUTCFullYear()===r.getUTCFullYear()&&n.getUTCMonth()===r.getUTCMonth()&&n.getUTCDate()===r.getUTCDate();var n,r})).pop()||{day:t.toISOString().slice(0,10),value:0}})),ge=it(he,.9975,(function(e){return Math.abs(e.value)})),de=v.domain([-ge,+ge]),pe=e.useMemo((function(){return"weekend"===i?function(e){return(e-1+7)%7}:function(e){return(e+6)%7}}),[i]),me="weekday"===i?ut(1,6):ut(0,7),ve=E(Y(le),ue),ye="weekday"===i?he.filter((function(e){return![0,6].includes(new Date(e.day).getUTCDay())})):he,be=x*("weekday"===i?6:8)+L+R+W,Me=le.getUTCFullYear()===ue.getUTCFullYear(),we=Me?V:V+15,xe="".concat(le.getUTCFullYear()).concat(Me?"":"/"+ue.getUTCFullYear().toString().slice(-2)),Ce=e.useMemo((function(){return ye.map((function(t,n){return e.createElement(qn,{key:n,c:t,color:de,cellSize:x,countDay:pe,timeWeek:ae,formatDate:U,from:le,cellShape:T,defaultColor:O,cellPadding:I})}))}),[ye,de,x,pe,ae,U,le,T,O,I]);return e.createElement(Ln,{tooltipPlacement:g,tooltipClassName:d,disableTooltip:l,tooltipOffsetX:s,tooltipOffsetY:h,valueFn:H},e.createElement("div",{className:n()("CalendarHeatMap",r)},e.createElement("svg",{fontSize:"10px",viewBox:"0 0 ".concat(te," ").concat(be)},e.createElement("g",{transform:"translate(".concat(28+q+we,", ").concat(10+L+W,")")},e.createElement("text",{x:-V,y:-W,fontWeight:"bold",textAnchor:"end",fill:ee},xe),e.createElement("g",{textAnchor:"end"},me.map((function(t,n){return e.createElement("text",{key:n,x:-V,y:(pe(t)+.5)*x,dy:"0.31em",fill:ee},J(t))}))),e.createElement("g",null,Ce),e.createElement("g",null,ve.map((function(t,n){var r=ae.count(le,ae.ceil(t))*x+2;return r<=-10?null:e.createElement("g",{key:n},e.createElement("text",{x:Math.max(r,0),y:-W,fill:ee},F(t)))})))))))}})(),o})())); | ||
//# sourceMappingURL=react.d3.calendar.heatmap.js.map |
/*! | ||
Copyright (c) 2017 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ |
{ | ||
"name": "react-d3-calendar-heatmap", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Calendar Heatmap in D3", | ||
@@ -9,8 +9,10 @@ "main": "dist/react.d3.calendar.heatmap.js", | ||
"scripts": { | ||
"dev": "webpack serve --open --config ./webpack/webpack.config.dev.js", | ||
"build": "rm -rf ./dist & webpack --progress --config ./webpack/webpack.config.prod.js", | ||
"stats": "rm -rf ./dist & webpack --progress --config ./webpack/webpack.config.stats.js --profile --json > ./webpack/stats/stats.json", | ||
"dev": "webpack serve --open --config ./webpack/webpack.config.dev.ts", | ||
"build": "rm -rf ./dist & webpack --progress --config ./webpack/webpack.config.prod.ts", | ||
"gatsby:deploy": "gatsby build --prefix-paths && gh-pages -d public", | ||
"gatsby:develop": "gatsby develop", | ||
"lint": "yarn eslint ./src --ext .js,.jsx,.ts,.tsx" | ||
"gatsby:clean": "gatsby clean", | ||
"prod:audit": "yarn audit --groups dependencies", | ||
"lint": "yarn eslint", | ||
"fix:yarn-deduplicate": "yarn install && yarn-deduplicate --strategy=fewer && yarn install" | ||
}, | ||
@@ -33,46 +35,47 @@ "repository": { | ||
"dependencies": { | ||
"@types/d3-array": "2.9.0", | ||
"@types/d3-format": "2.0.0", | ||
"@types/d3-scale": "3.2.2", | ||
"@types/d3-scale-chromatic": "2.0.0", | ||
"@types/d3-time": "1.0.7", | ||
"@types/d3-time-format": "3.0.0", | ||
"classnames": "2.2.6", | ||
"d3-array": "2.12.1", | ||
"d3-format": "2.0.0", | ||
"d3-scale": "3.2.3", | ||
"d3-scale-chromatic": "2.0.0", | ||
"d3-time": "2.1.1", | ||
"d3-time-format": "3.0.0", | ||
"react-use": "17.2.1" | ||
"@types/d3-array": "^3.2.1", | ||
"@types/d3-format": "^3.0.4", | ||
"@types/d3-scale": "^4.0.8", | ||
"@types/d3-scale-chromatic": "^3.0.3", | ||
"@types/d3-time": "^3.0.3", | ||
"@types/d3-time-format": "^4.0.3", | ||
"@react-hookz/web": "^24.0.4", | ||
"classnames": "^2.5.1", | ||
"d3-array": "^3.2.4", | ||
"d3-format": "^3.0.1", | ||
"d3-scale": "^4.0.2", | ||
"d3-scale-chromatic": "^3.1.0", | ||
"d3-time": "^3.1.0", | ||
"d3-time-format": "^4.1.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "15.x.x || 17.x.x", | ||
"react-dom": "15.x.x || 17.x.x" | ||
"react": "15.x.x || 17.x.x || 18.x.x", | ||
"react-dom": "15.x.x || 17.x.x || 18.x.x" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "14.14.37", | ||
"@types/react": "17.0.3", | ||
"@types/react-dom": "17.0.3", | ||
"@typescript-eslint/eslint-plugin": "4.19.0", | ||
"@typescript-eslint/parser": "4.19.0", | ||
"css-loader": "5.2.0", | ||
"eslint": "7.23.0", | ||
"gatsby": "3.1.2", | ||
"gh-pages": "3.1.0", | ||
"html-webpack-plugin": "5.3.1", | ||
"mini-css-extract-plugin": "1.4.0", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-container-dimensions": "1.4.1", | ||
"react-hot-loader": "4.13.0", | ||
"source-map-loader": "2.0.1", | ||
"style-loader": "2.0.0", | ||
"ts-loader": "8.1.0", | ||
"typescript": "4.2.3", | ||
"webpack": "5.28.0", | ||
"webpack-cli": "4.6.0", | ||
"webpack-dev-server": "3.11.2", | ||
"webpack-visualizer-plugin2": "1.0.0" | ||
"@types/node": "^22.9.1", | ||
"@types/react": "^18.3.12", | ||
"@types/react-dom": "^18.3.1", | ||
"@types/webpack": "^5.28.5", | ||
"typescript-eslint": "^8.15.0", | ||
"css-loader": "^7.1.2", | ||
"eslint": "^9.5.0", | ||
"eslint-plugin-react": "^7.37.2", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"gatsby": "^5.14.0", | ||
"gh-pages": "^6.2.0", | ||
"html-webpack-plugin": "^5.6.3", | ||
"mini-css-extract-plugin": "^2.9.2", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1", | ||
"source-map-loader": "^5.0.0", | ||
"style-loader": "^4.0.0", | ||
"ts-loader": "^9.5.1", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.6.3", | ||
"webpack": "^5.96.1", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.1.0", | ||
"yarn-deduplicate": "^6.0.2" | ||
} | ||
} |
@@ -1,17 +0,21 @@ | ||
import { ScaleSequential } from "d3-scale"; | ||
import { TooltipPlacement } from "../Tooltip/types"; | ||
import { ScaleSequential } from "d3-scale" | ||
import { TooltipPlacement } from "../Tooltip/types" | ||
export interface TimeRange { | ||
from: Date; | ||
to: Date; | ||
from: Date | ||
to: Date | ||
} | ||
export type CellShape = "circle" | "square"; | ||
export type CellShape = "circle" | "square" | ||
export type BaseCalendarHeatMapItemType = { day: string; value: number }; | ||
export type BaseCalendarHeatMapItemType = { | ||
day: string | ||
value: number | ||
projects?: Record<string, string> | ||
} | ||
export interface CalendarHeatMapProps<CalendarHeatMapItemType> { | ||
className?: string; | ||
data: Array<CalendarHeatMapItemType>; | ||
weekday?: "weekday" | "weekend"; | ||
className?: string | ||
data: Array<CalendarHeatMapItemType> | ||
weekday?: "weekday" | "weekend" | ||
/** | ||
@@ -21,3 +25,3 @@ * Tooltip placement. If none is specified then is automatic depending on | ||
*/ | ||
tooltipPlacement?: TooltipPlacement; | ||
tooltipPlacement?: TooltipPlacement | ||
@@ -27,3 +31,3 @@ /** | ||
*/ | ||
tooltipClassName?: string; | ||
tooltipClassName?: string | ||
@@ -35,3 +39,3 @@ /** | ||
*/ | ||
disableTooltip?: boolean; | ||
disableTooltip?: boolean | ||
@@ -43,3 +47,3 @@ /** | ||
*/ | ||
tooltipOffsetX?: number; | ||
tooltipOffsetX?: number | ||
@@ -51,5 +55,5 @@ /** | ||
*/ | ||
tooltipOffsetY?: number; | ||
tooltipOffsetY?: number | ||
timeRange?: TimeRange; | ||
timeRange?: TimeRange | ||
@@ -59,32 +63,34 @@ /** | ||
*/ | ||
customD3ColorScale?: ScaleSequential<string>; | ||
customD3ColorScale?: ScaleSequential<string> | ||
width?: number; | ||
width?: number | ||
cellSize?: number; | ||
cellSize?: number | ||
cellShape?: CellShape; | ||
cellShape?: CellShape | ||
formatDate?: (date: Date) => string; | ||
formatDate?: (date: Date) => string | ||
formatDay?: (dayOfWeek: number) => string; | ||
formatMonth?: (date: Date) => string | ||
formatDay?: (dayOfWeek: number) => string | ||
/** | ||
* Override value text for node | ||
*/ | ||
valueFn?: (value: number) => string; | ||
valueFn?: (value: number) => string | ||
defaultColor?: string; | ||
defaultColor?: string | ||
marginTop?: number; | ||
marginTop?: number | ||
marginBottom?: number; | ||
marginBottom?: number | ||
marginLeft?: number; | ||
marginLeft?: number | ||
paddingUnderMonthHeader?: number; | ||
paddingUnderMonthHeader?: number | ||
paddingAfterDayOfWeekHeader?: number; | ||
paddingAfterDayOfWeekHeader?: number | ||
cellPadding?: number; | ||
cellPadding?: number | ||
@@ -95,5 +101,5 @@ /** | ||
*/ | ||
fillToWidth?: boolean; | ||
fillToWidth?: boolean | ||
labelsFillColor?: string; | ||
labelsFillColor?: string | ||
} |
@@ -9,3 +9,2 @@ { | ||
"noImplicitAny": false, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"removeComments": true, | ||
@@ -16,8 +15,21 @@ "noLib": false, | ||
"jsx": "react", | ||
"typeRoots": ["./node_modules/@types"], | ||
"types": ["node", "react", "react-dom"] | ||
"typeRoots": [ | ||
"./node_modules/@types" | ||
], | ||
"types": [ | ||
"node", | ||
"react", | ||
"react-dom" | ||
] | ||
}, | ||
"filesGlob": ["./**/*.ts", "!./node_modules/**/*.ts"], | ||
"files": ["./src/indexPackage.ts"], | ||
"include": ["src/**/*"], | ||
"filesGlob": [ | ||
"./**/*.ts", | ||
"!./node_modules/**/*.ts" | ||
], | ||
"files": [ | ||
"./src/indexPackage.ts" | ||
], | ||
"include": [ | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
@@ -28,2 +40,2 @@ "node_modules", | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
0
264755
24
39
983
+ Added@react-hookz/web@^24.0.4
+ Added@react-hookz/deep-equal@1.0.4(transitive)
+ Added@react-hookz/web@24.0.4(transitive)
+ Added@types/d3-array@3.2.1(transitive)
+ Added@types/d3-format@3.0.4(transitive)
+ Added@types/d3-scale@4.0.8(transitive)
+ Added@types/d3-scale-chromatic@3.0.3(transitive)
+ Added@types/d3-time@3.0.4(transitive)
+ Added@types/d3-time-format@4.0.3(transitive)
+ Addedclassnames@2.5.1(transitive)
+ Addedd3-array@3.2.4(transitive)
+ Addedd3-color@3.1.0(transitive)
+ Addedd3-format@3.1.0(transitive)
+ Addedd3-interpolate@3.0.1(transitive)
+ Addedd3-scale@4.0.2(transitive)
+ Addedd3-scale-chromatic@3.1.0(transitive)
+ Addedd3-time@3.1.0(transitive)
+ Addedd3-time-format@4.1.0(transitive)
+ Addedinternmap@2.0.3(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedscheduler@0.23.2(transitive)
- Removedreact-use@17.2.1
- Removed@babel/runtime@7.26.0(transitive)
- Removed@jridgewell/sourcemap-codec@1.5.0(transitive)
- Removed@types/d3-array@2.9.0(transitive)
- Removed@types/d3-format@2.0.0(transitive)
- Removed@types/d3-scale@3.2.2(transitive)
- Removed@types/d3-scale-chromatic@2.0.0(transitive)
- Removed@types/d3-time@1.0.7(transitive)
- Removed@types/d3-time-format@3.0.0(transitive)
- Removed@types/js-cookie@2.2.7(transitive)
- Removed@xobotyi/scrollbar-width@1.9.5(transitive)
- Removedclassnames@2.2.6(transitive)
- Removedcopy-to-clipboard@3.3.3(transitive)
- Removedcss-in-js-utils@3.1.0(transitive)
- Removedcss-tree@1.1.3(transitive)
- Removedcsstype@3.1.3(transitive)
- Removedd3-array@2.12.1(transitive)
- Removedd3-color@2.0.0(transitive)
- Removedd3-format@2.0.0(transitive)
- Removedd3-interpolate@2.0.1(transitive)
- Removedd3-scale@3.2.3(transitive)
- Removedd3-scale-chromatic@2.0.0(transitive)
- Removedd3-time@2.1.1(transitive)
- Removedd3-time-format@3.0.0(transitive)
- Removederror-stack-parser@2.1.4(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-shallow-equal@1.0.0(transitive)
- Removedfastest-stable-stringify@2.0.2(transitive)
- Removedhyphenate-style-name@1.1.0(transitive)
- Removedinline-style-prefixer@7.0.1(transitive)
- Removedinternmap@1.0.1(transitive)
- Removedjs-cookie@2.2.1(transitive)
- Removedmdn-data@2.0.14(transitive)
- Removednano-css@5.6.2(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedreact@17.0.2(transitive)
- Removedreact-dom@17.0.2(transitive)
- Removedreact-universal-interface@0.6.2(transitive)
- Removedreact-use@17.2.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)
- Removedresize-observer-polyfill@1.5.1(transitive)
- Removedrtl-css-js@1.16.1(transitive)
- Removedscheduler@0.20.2(transitive)
- Removedscreenfull@5.2.0(transitive)
- Removedset-harmonic-interval@1.0.1(transitive)
- Removedsource-map@0.5.60.6.1(transitive)
- Removedstack-generator@2.0.10(transitive)
- Removedstackframe@1.3.4(transitive)
- Removedstacktrace-gps@3.1.2(transitive)
- Removedstacktrace-js@2.0.2(transitive)
- Removedstylis@4.3.4(transitive)
- Removedthrottle-debounce@3.0.1(transitive)
- Removedtoggle-selection@1.0.6(transitive)
- Removedts-easing@0.2.0(transitive)
- Removedtslib@2.8.1(transitive)
Updated@types/d3-array@^3.2.1
Updated@types/d3-format@^3.0.4
Updated@types/d3-scale@^4.0.8
Updated@types/d3-time@^3.0.3
Updated@types/d3-time-format@^4.0.3
Updatedclassnames@^2.5.1
Updatedd3-array@^3.2.4
Updatedd3-format@^3.0.1
Updatedd3-scale@^4.0.2
Updatedd3-scale-chromatic@^3.1.0
Updatedd3-time@^3.1.0
Updatedd3-time-format@^4.1.0