UNPKG

react-calendar-heatmap

Version:

A calendar heatmap component built on SVG, inspired by github's commit calendar graph.

1 lines 25.8 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.CalendarHeatmap=e(require("react")):t.CalendarHeatmap=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=function(){function t(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var u,i=t[Symbol.iterator]();!(n=(u=i.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&i.return&&i.return()}finally{if(o)throw a}}return r}return function(e,r){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),c=r(2),f=n(c),h=r(3),p=n(h),y=r(8),d=n(y),v=r(9),g=n(v),b=r(11),_=r(12),m=10,k=4,S=function(t){function e(t){o(this,e);var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.state={valueCache:r.getValueCache(t.values)},r}return u(e,t),l(e,[{key:"componentWillReceiveProps",value:function(t){this.setState({valueCache:this.getValueCache(t.values)})}},{key:"getSquareSizeWithGutter",value:function(){return m+this.props.gutterSize}},{key:"getMonthLabelSize",value:function(){return this.props.showMonthLabels?this.props.horizontal?m+k:2*(m+k):0}},{key:"getWeekdayLabelSize",value:function(){return this.props.showWeekdayLabels?this.props.horizontal?30:1.5*m:0}},{key:"getStartDate",value:function(){return(0,_.shiftDate)(this.getEndDate(),-this.props.numDays+1)}},{key:"getEndDate",value:function(){return(0,_.getBeginningTimeForDate)((0,_.convertToDate)(this.props.endDate))}},{key:"getStartDateWithEmptyDays",value:function(){return(0,_.shiftDate)(this.getStartDate(),-this.getNumEmptyDaysAtStart())}},{key:"getNumEmptyDaysAtStart",value:function(){return this.getStartDate().getDay()}},{key:"getNumEmptyDaysAtEnd",value:function(){return b.DAYS_IN_WEEK-1-this.getEndDate().getDay()}},{key:"getWeekCount",value:function(){var t=this.props.numDays+this.getNumEmptyDaysAtStart()+this.getNumEmptyDaysAtEnd();return Math.ceil(t/b.DAYS_IN_WEEK)}},{key:"getWeekWidth",value:function(){return b.DAYS_IN_WEEK*this.getSquareSizeWithGutter()}},{key:"getWidth",value:function(){return this.getWeekCount()*this.getSquareSizeWithGutter()-(this.props.gutterSize-this.getWeekdayLabelSize())}},{key:"getHeight",value:function(){return this.getWeekWidth()+(this.getMonthLabelSize()-this.props.gutterSize)+this.getWeekdayLabelSize()}},{key:"getValueCache",value:function(t){var e=this;return(0,g.default)(t,function(t,r){var n=(0,_.convertToDate)(r.date),o=Math.floor((n-e.getStartDateWithEmptyDays())/b.MILLISECONDS_IN_ONE_DAY);return t[o]={value:r,className:e.props.classForValue(r),title:e.props.titleForValue?e.props.titleForValue(r):null,tooltipDataAttrs:e.getTooltipDataAttrsForValue(r)},t},{})}},{key:"getValueForIndex",value:function(t){return this.state.valueCache[t]?this.state.valueCache[t].value:null}},{key:"getClassNameForIndex",value:function(t){return this.state.valueCache[t]?this.state.valueCache[t].className:this.props.classForValue(null)}},{key:"getTitleForIndex",value:function(t){return this.state.valueCache[t]?this.state.valueCache[t].title:this.props.titleForValue?this.props.titleForValue(null):null}},{key:"getTooltipDataAttrsForIndex",value:function(t){return this.state.valueCache[t]?this.state.valueCache[t].tooltipDataAttrs:this.getTooltipDataAttrsForValue({date:null,count:null})}},{key:"getTooltipDataAttrsForValue",value:function(t){var e=this.props.tooltipDataAttrs;return"function"==typeof e?e(t):e}},{key:"getTransformForWeek",value:function(t){return this.props.horizontal?"translate("+t*this.getSquareSizeWithGutter()+", 0)":"translate(0, "+t*this.getSquareSizeWithGutter()+")"}},{key:"getTransformForWeekdayLabels",value:function(){return this.props.horizontal?"translate("+m+", "+this.getMonthLabelSize()+")":null}},{key:"getTransformForMonthLabels",value:function(){return this.props.horizontal?"translate("+this.getWeekdayLabelSize()+", 0)":"translate("+(this.getWeekWidth()+k)+", "+this.getWeekdayLabelSize()+")"}},{key:"getTransformForAllWeeks",value:function(){return this.props.horizontal?"translate("+this.getWeekdayLabelSize()+", "+this.getMonthLabelSize()+")":"translate(0, "+this.getWeekdayLabelSize()+")"}},{key:"getViewBox",value:function(){return this.props.horizontal?"0 0 "+this.getWidth()+" "+this.getHeight():"0 0 "+this.getHeight()+" "+this.getWidth()}},{key:"getSquareCoordinates",value:function(t){return this.props.horizontal?[0,t*this.getSquareSizeWithGutter()]:[t*this.getSquareSizeWithGutter(),0]}},{key:"getWeekdayLabelCoordinates",value:function(t){return this.props.horizontal?[0,(t+1)*m+t*this.props.gutterSize]:[t*m+t*this.props.gutterSize,m]}},{key:"getMonthLabelCoordinates",value:function(t){if(this.props.horizontal)return[t*this.getSquareSizeWithGutter(),this.getMonthLabelSize()-k];var e=-2;return[0,(t+1)*this.getSquareSizeWithGutter()+e]}},{key:"handleClick",value:function(t){this.props.onClick&&this.props.onClick(t)}},{key:"handleMouseOver",value:function(t,e){this.props.onMouseOver&&this.props.onMouseOver(t,e)}},{key:"handleMouseLeave",value:function(t,e){this.props.onMouseLeave&&this.props.onMouseLeave(t,e)}},{key:"renderSquare",value:function(t,e){var r=this,n=e<this.getNumEmptyDaysAtStart()||e>=this.getNumEmptyDaysAtStart()+this.props.numDays;if(n&&!this.props.showOutOfRangeDays)return null;var o=this.getSquareCoordinates(t),a=s(o,2),u=a[0],l=a[1],c=this.getValueForIndex(e),h=f.default.createElement("rect",i({key:e,width:m,height:m,x:u,y:l,className:this.getClassNameForIndex(e),onClick:this.handleClick.bind(this,c),onMouseOver:function(t){return r.handleMouseOver(t,c)},onMouseLeave:function(t){return r.handleMouseLeave(t,c)}},this.getTooltipDataAttrsForIndex(e)),f.default.createElement("title",null,this.getTitleForIndex(e))),p=this.props.transformDayElement;return p?p(h,c,e):h}},{key:"renderWeek",value:function(t){var e=this;return f.default.createElement("g",{key:t,transform:this.getTransformForWeek(t)},(0,d.default)(b.DAYS_IN_WEEK).map(function(r){return e.renderSquare(r,t*b.DAYS_IN_WEEK+r)}))}},{key:"renderAllWeeks",value:function(){var t=this;return(0,d.default)(this.getWeekCount()).map(function(e){return t.renderWeek(e)})}},{key:"renderMonthLabels",value:function(){var t=this;if(!this.props.showMonthLabels)return null;var e=(0,d.default)(this.getWeekCount()-1);return e.map(function(e){var r=(0,_.shiftDate)(t.getStartDateWithEmptyDays(),(e+1)*b.DAYS_IN_WEEK),n=t.getMonthLabelCoordinates(e),o=s(n,2),a=o[0],u=o[1];return r.getDate()>=1&&r.getDate()<=b.DAYS_IN_WEEK?f.default.createElement("text",{key:e,x:a,y:u},t.props.monthLabels[r.getMonth()]):null})}},{key:"renderWeekdayLabels",value:function(){var t=this;return this.props.showWeekdayLabels?this.props.weekdayLabels.map(function(e,r){var n=t.getWeekdayLabelCoordinates(r),o=s(n,2),a=o[0],u=o[1];return 1&r?f.default.createElement("text",{key:r,x:a,y:u,className:t.props.horizontal?"":"small-text"},e):null}):null}},{key:"render",value:function(){return f.default.createElement("svg",{className:"react-calendar-heatmap",viewBox:this.getViewBox()},f.default.createElement("g",{transform:this.getTransformForMonthLabels()},this.renderMonthLabels()),f.default.createElement("g",{transform:this.getTransformForAllWeeks()},this.renderAllWeeks()),f.default.createElement("g",{transform:this.getTransformForWeekdayLabels()},this.renderWeekdayLabels()))}}]),e}(f.default.Component);S.propTypes={values:p.default.arrayOf(p.default.shape({date:p.default.oneOfType([p.default.string,p.default.number,p.default.instanceOf(Date)]).isRequired}).isRequired).isRequired,numDays:p.default.number,endDate:p.default.oneOfType([p.default.string,p.default.number,p.default.instanceOf(Date)]),gutterSize:p.default.number,horizontal:p.default.bool,showMonthLabels:p.default.bool,showWeekdayLabels:p.default.bool,showOutOfRangeDays:p.default.bool,tooltipDataAttrs:p.default.oneOfType([p.default.object,p.default.func]),titleForValue:p.default.func,classForValue:p.default.func,monthLabels:p.default.arrayOf(p.default.string),weekdayLabels:p.default.arrayOf(p.default.string),onClick:p.default.func,onMouseOver:p.default.func,onMouseLeave:p.default.func,transformDayElement:p.default.func},S.defaultProps={numDays:200,endDate:new Date,gutterSize:1,horizontal:!0,showMonthLabels:!0,showWeekdayLabels:!1,showOutOfRangeDays:!1,monthLabels:b.MONTH_LABELS,weekdayLabels:b.DAY_LABELS,classForValue:function(t){return t?"color-filled":"color-empty"}},e.default=S},function(e,r){e.exports=t},function(t,e,r){t.exports=r(4)()},function(t,e,r){"use strict";var n=r(5),o=r(6),a=r(7);t.exports=function(){function t(t,e,r,n,u,i){i!==a&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return r.checkPropTypes=n,r.PropTypes=r,r}},function(t,e){"use strict";function r(t){return function(){return t}}var n=function(){};n.thatReturns=r,n.thatReturnsFalse=r(!1),n.thatReturnsTrue=r(!0),n.thatReturnsNull=r(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(t){return t},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n,a,u,i,s){if(o(e),!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,a,u,i,s],f=0;l=new Error(e.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}}var o=function(t){};t.exports=n},function(t,e){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},function(t,e){function r(t,e,r,n){for(var o=-1,a=M(L((e-t)/(r||1)),0),u=Array(a);a--;)u[n?a:++o]=t,t+=r;return u}function n(t){return function(e,n,o){return o&&"number"!=typeof o&&a(e,n,o)&&(n=o=void 0),e=p(e),void 0===n?(n=e,e=0):n=p(n),o=void 0===o?e<n?1:-1:p(o),r(e,n,o,t)}}function o(t,e){return e=null==e?v:e,!!e&&("number"==typeof t||w.test(t))&&t>-1&&t%1==0&&t<e}function a(t,e,r){if(!c(r))return!1;var n=typeof e;return!!("number"==n?i(r)&&o(e,r.length):"string"==n&&e in r)&&u(r[e],t)}function u(t,e){return t===e||t!==t&&e!==e}function i(t){return null!=t&&l(t.length)&&!s(t)}function s(t){var e=c(t)?W.call(t):"";return e==_||e==m}function l(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function c(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function f(t){return!!t&&"object"==typeof t}function h(t){return"symbol"==typeof t||f(t)&&W.call(t)==k}function p(t){if(!t)return 0===t?t:0;if(t=y(t),t===d||t===-d){var e=t<0?-1:1;return e*g}return t===t?t:0}function y(t){if("number"==typeof t)return t;if(h(t))return b;if(c(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=c(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(S,"");var r=O.test(t);return r||j.test(t)?E(t.slice(2),r?2:8):D.test(t)?b:+t}var d=1/0,v=9007199254740991,g=1.7976931348623157e308,b=NaN,_="[object Function]",m="[object GeneratorFunction]",k="[object Symbol]",S=/^\s+|\s+$/g,D=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,j=/^0o[0-7]+$/i,w=/^(?:0|[1-9]\d*)$/,E=parseInt,A=Object.prototype,W=A.toString,L=Math.ceil,M=Math.max,x=n();t.exports=x},function(t,e,r){(function(t,r){function n(t,e,r,n){var o=-1,a=t?t.length:0;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r}function o(t,e){for(var r=-1,n=t?t.length:0;++r<n;)if(e(t[r],r,t))return!0;return!1}function a(t){return function(e){return null==e?void 0:e[t]}}function u(t,e,r,n,o){return o(t,function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)}),r}function i(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function s(t){return function(e){return t(e)}}function l(t,e){return null==t?void 0:t[e]}function c(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function f(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}function h(t,e){return function(r){return t(e(r))}}function p(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}function y(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function d(){this.__data__=nr?nr(null):{}}function v(t){return this.has(t)&&delete this.__data__[t]}function g(t){var e=this.__data__;if(nr){var r=e[t];return r===qt?void 0:r}return Ye.call(e,t)?e[t]:void 0}function b(t){var e=this.__data__;return nr?void 0!==e[t]:Ye.call(e,t)}function _(t,e){var r=this.__data__;return r[t]=nr&&void 0===e?qt:e,this}function m(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function k(){this.__data__=[]}function S(t){var e=this.__data__,r=q(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Je.call(e,r,1),!0}function D(t){var e=this.__data__,r=q(e,t);return r<0?void 0:e[r][1]}function O(t){return q(this.__data__,t)>-1}function j(t,e){var r=this.__data__,n=q(r,t);return n<0?r.push([t,e]):r[n][1]=e,this}function w(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function E(){this.__data__={hash:new y,map:new(Ze||m),string:new y}}function A(t){return ct(this,t).delete(t)}function W(t){return ct(this,t).get(t)}function L(t){return ct(this,t).has(t)}function M(t,e){return ct(this,t).set(t,e),this}function x(t){var e=-1,r=t?t.length:0;for(this.__data__=new w;++e<r;)this.add(t[e])}function T(t){return this.__data__.set(t,qt),this}function z(t){return this.__data__.has(t)}function C(t){this.__data__=new m(t)}function F(){this.__data__=new m}function N(t){return this.__data__.delete(t)}function I(t){return this.__data__.get(t)}function P(t){return this.__data__.has(t)}function R(t,e){var r=this.__data__;if(r instanceof m){var n=r.__data__;if(!Ze||n.length<Rt-1)return n.push([t,e]),this;r=this.__data__=new w(n)}return r.set(t,e),this}function V(t,e){var r=vr(t)||wt(t)?i(t.length,String):[],n=r.length,o=!!n;for(var a in t)!e&&!Ye.call(t,a)||o&&("length"==a||yt(a,n))||r.push(a);return r}function q(t,e){for(var r=t.length;r--;)if(jt(t[r][0],e))return r;return-1}function $(t,e){return t&&pr(t,e,Nt)}function Y(t,e){e=dt(e,t)?[e]:ot(e);for(var r=0,n=e.length;null!=t&&r<n;)t=t[kt(e[r++])];return r&&r==n?t:void 0}function B(t){return Be.call(t)}function G(t,e){return null!=t&&e in Object(t)}function H(t,e,r,n,o){return t===e||(null==t||null==e||!Mt(t)&&!xt(e)?t!==t&&e!==e:K(t,e,H,r,n,o))}function K(t,e,r,n,o,a){var u=vr(t),i=vr(e),s=Kt,l=Kt;u||(s=yr(t),s=s==Ht?re:s),i||(l=yr(e),l=l==Ht?re:l);var f=s==re&&!c(t),h=l==re&&!c(e),p=s==l;if(p&&!f)return a||(a=new C),u||gr(t)?it(t,e,r,n,o,a):st(t,e,s,r,n,o,a);if(!(o&Yt)){var y=f&&Ye.call(t,"__wrapped__"),d=h&&Ye.call(e,"__wrapped__");if(y||d){var v=y?t.value():t,g=d?e.value():e;return a||(a=new C),r(v,g,n,o,a)}}return!!p&&(a||(a=new C),lt(t,e,r,n,o,a))}function U(t,e,r,n){var o=r.length,a=o,u=!n;if(null==t)return!a;for(t=Object(t);o--;){var i=r[o];if(u&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=r[o];var s=i[0],l=t[s],c=i[1];if(u&&i[2]){if(void 0===l&&!(s in t))return!1}else{var f=new C;if(n)var h=n(l,c,s,t,e,f);if(!(void 0===h?H(c,l,n,$t|Yt,f):h))return!1}}return!0}function J(t){if(!Mt(t)||gt(t))return!1;var e=Wt(t)||c(t)?Ge:we;return e.test(St(t))}function Q(t){return xt(t)&&Lt(t.length)&&!!Ae[Be.call(t)]}function X(t){return"function"==typeof t?t:null==t?It:"object"==typeof t?vr(t)?et(t[0],t[1]):tt(t):Pt(t)}function Z(t){if(!bt(t))return Qe(t);var e=[];for(var r in Object(t))Ye.call(t,r)&&"constructor"!=r&&e.push(r);return e}function tt(t){var e=ft(t);return 1==e.length&&e[0][2]?mt(e[0][0],e[0][1]):function(r){return r===t||U(r,t,e)}}function et(t,e){return dt(t)&&_t(e)?mt(kt(t),e):function(r){var n=Ct(r,t);return void 0===n&&n===e?Ft(r,t):H(e,n,void 0,$t|Yt)}}function rt(t){return function(e){return Y(e,t)}}function nt(t){if("string"==typeof t)return t;if(Tt(t))return fr?fr.call(t):"";var e=t+"";return"0"==e&&1/t==-Bt?"-0":e}function ot(t){return vr(t)?t:dr(t)}function at(t,e){return function(r,n){if(null==r)return r;if(!Et(r))return t(r,n);for(var o=r.length,a=e?o:-1,u=Object(r);(e?a--:++a<o)&&n(u[a],a,u)!==!1;);return r}}function ut(t){return function(e,r,n){for(var o=-1,a=Object(e),u=n(e),i=u.length;i--;){var s=u[t?i:++o];if(r(a[s],s,a)===!1)break}return e}}function it(t,e,r,n,a,u){var i=a&Yt,s=t.length,l=e.length;if(s!=l&&!(i&&l>s))return!1;var c=u.get(t);if(c&&u.get(e))return c==e;var f=-1,h=!0,p=a&$t?new x:void 0;for(u.set(t,e),u.set(e,t);++f<s;){var y=t[f],d=e[f];if(n)var v=i?n(d,y,f,e,t,u):n(y,d,f,t,e,u);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!o(e,function(t,e){if(!p.has(e)&&(y===t||r(y,t,n,a,u)))return p.add(e)})){h=!1;break}}else if(y!==d&&!r(y,d,n,a,u)){h=!1;break}}return u.delete(t),u.delete(e),h}function st(t,e,r,n,o,a,u){switch(r){case ce:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case le:return!(t.byteLength!=e.byteLength||!n(new Ke(t),new Ke(e)));case Ut:case Jt:case ee:return jt(+t,+e);case Qt:return t.name==e.name&&t.message==e.message;case oe:case ue:return t==e+"";case te:var i=f;case ae:var s=a&Yt;if(i||(i=p),t.size!=e.size&&!s)return!1;var l=u.get(t);if(l)return l==e;a|=$t,u.set(t,e);var c=it(i(t),i(e),n,o,a,u);return u.delete(t),c;case ie:if(cr)return cr.call(t)==cr.call(e)}return!1}function lt(t,e,r,n,o,a){var u=o&Yt,i=Nt(t),s=i.length,l=Nt(e),c=l.length;if(s!=c&&!u)return!1;for(var f=s;f--;){var h=i[f];if(!(u?h in e:Ye.call(e,h)))return!1}var p=a.get(t);if(p&&a.get(e))return p==e;var y=!0;a.set(t,e),a.set(e,t);for(var d=u;++f<s;){h=i[f];var v=t[h],g=e[h];if(n)var b=u?n(g,v,h,e,t,a):n(v,g,h,t,e,a);if(!(void 0===b?v===g||r(v,g,n,o,a):b)){y=!1;break}d||(d="constructor"==h)}if(y&&!d){var _=t.constructor,m=e.constructor;_!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m)&&(y=!1)}return a.delete(t),a.delete(e),y}function ct(t,e){var r=t.__data__;return vt(e)?r["string"==typeof e?"string":"hash"]:r.map}function ft(t){for(var e=Nt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,_t(o)]}return e}function ht(t,e){var r=l(t,e);return J(r)?r:void 0}function pt(t,e,r){e=dt(e,t)?[e]:ot(e);for(var n,o=-1,a=e.length;++o<a;){var u=kt(e[o]);if(!(n=null!=t&&r(t,u)))break;t=t[u]}if(n)return n;var a=t?t.length:0;return!!a&&Lt(a)&&yt(u,a)&&(vr(t)||wt(t))}function yt(t,e){return e=null==e?Gt:e,!!e&&("number"==typeof t||Ee.test(t))&&t>-1&&t%1==0&&t<e}function dt(t,e){if(vr(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Tt(t))||(ke.test(t)||!me.test(t)||null!=e&&t in Object(e))}function vt(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function gt(t){return!!qe&&qe in t}function bt(t){var e=t&&t.constructor,r="function"==typeof e&&e.prototype||Re;return t===r}function _t(t){return t===t&&!Mt(t)}function mt(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}function kt(t){if("string"==typeof t||Tt(t))return t;var e=t+"";return"0"==e&&1/t==-Bt?"-0":e}function St(t){if(null!=t){try{return $e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Dt(t,e,r){var o=vr(t)?n:u,a=arguments.length<3;return o(t,X(e,4),r,a,hr)}function Ot(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(Vt);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var u=t.apply(this,n);return r.cache=a.set(o,u),u};return r.cache=new(Ot.Cache||w),r}function jt(t,e){return t===e||t!==t&&e!==e}function wt(t){return At(t)&&Ye.call(t,"callee")&&(!Ue.call(t,"callee")||Be.call(t)==Ht)}function Et(t){return null!=t&&Lt(t.length)&&!Wt(t)}function At(t){return xt(t)&&Et(t)}function Wt(t){var e=Mt(t)?Be.call(t):"";return e==Xt||e==Zt}function Lt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Gt}function Mt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function xt(t){return!!t&&"object"==typeof t}function Tt(t){return"symbol"==typeof t||xt(t)&&Be.call(t)==ie}function zt(t){return null==t?"":nt(t)}function Ct(t,e,r){var n=null==t?void 0:Y(t,e);return void 0===n?r:n}function Ft(t,e){return null!=t&&pt(t,e,G)}function Nt(t){return Et(t)?V(t):Z(t)}function It(t){return t}function Pt(t){return dt(t)?a(kt(t)):rt(t)}var Rt=200,Vt="Expected a function",qt="__lodash_hash_undefined__",$t=1,Yt=2,Bt=1/0,Gt=9007199254740991,Ht="[object Arguments]",Kt="[object Array]",Ut="[object Boolean]",Jt="[object Date]",Qt="[object Error]",Xt="[object Function]",Zt="[object GeneratorFunction]",te="[object Map]",ee="[object Number]",re="[object Object]",ne="[object Promise]",oe="[object RegExp]",ae="[object Set]",ue="[object String]",ie="[object Symbol]",se="[object WeakMap]",le="[object ArrayBuffer]",ce="[object DataView]",fe="[object Float32Array]",he="[object Float64Array]",pe="[object Int8Array]",ye="[object Int16Array]",de="[object Int32Array]",ve="[object Uint8Array]",ge="[object Uint8ClampedArray]",be="[object Uint16Array]",_e="[object Uint32Array]",me=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ke=/^\w*$/,Se=/^\./,De=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oe=/[\\^$.*+?()[\]{}|]/g,je=/\\(\\)?/g,we=/^\[object .+?Constructor\]$/,Ee=/^(?:0|[1-9]\d*)$/,Ae={};Ae[fe]=Ae[he]=Ae[pe]=Ae[ye]=Ae[de]=Ae[ve]=Ae[ge]=Ae[be]=Ae[_e]=!0,Ae[Ht]=Ae[Kt]=Ae[le]=Ae[Ut]=Ae[ce]=Ae[Jt]=Ae[Qt]=Ae[Xt]=Ae[te]=Ae[ee]=Ae[re]=Ae[oe]=Ae[ae]=Ae[ue]=Ae[se]=!1;var We="object"==typeof t&&t&&t.Object===Object&&t,Le="object"==typeof self&&self&&self.Object===Object&&self,Me=We||Le||Function("return this")(),xe="object"==typeof e&&e&&!e.nodeType&&e,Te=xe&&"object"==typeof r&&r&&!r.nodeType&&r,ze=Te&&Te.exports===xe,Ce=ze&&We.process,Fe=function(){try{return Ce&&Ce.binding("util")}catch(t){}}(),Ne=Fe&&Fe.isTypedArray,Ie=Array.prototype,Pe=Function.prototype,Re=Object.prototype,Ve=Me["__core-js_shared__"],qe=function(){var t=/[^.]+$/.exec(Ve&&Ve.keys&&Ve.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),$e=Pe.toString,Ye=Re.hasOwnProperty,Be=Re.toString,Ge=RegExp("^"+$e.call(Ye).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=Me.Symbol,Ke=Me.Uint8Array,Ue=Re.propertyIsEnumerable,Je=Ie.splice,Qe=h(Object.keys,Object),Xe=ht(Me,"DataView"),Ze=ht(Me,"Map"),tr=ht(Me,"Promise"),er=ht(Me,"Set"),rr=ht(Me,"WeakMap"),nr=ht(Object,"create"),or=St(Xe),ar=St(Ze),ur=St(tr),ir=St(er),sr=St(rr),lr=He?He.prototype:void 0,cr=lr?lr.valueOf:void 0,fr=lr?lr.toString:void 0;y.prototype.clear=d,y.prototype.delete=v,y.prototype.get=g,y.prototype.has=b,y.prototype.set=_,m.prototype.clear=k,m.prototype.delete=S,m.prototype.get=D,m.prototype.has=O,m.prototype.set=j,w.prototype.clear=E,w.prototype.delete=A,w.prototype.get=W,w.prototype.has=L,w.prototype.set=M,x.prototype.add=x.prototype.push=T,x.prototype.has=z,C.prototype.clear=F,C.prototype.delete=N,C.prototype.get=I,C.prototype.has=P,C.prototype.set=R;var hr=at($),pr=ut(),yr=B;(Xe&&yr(new Xe(new ArrayBuffer(1)))!=ce||Ze&&yr(new Ze)!=te||tr&&yr(tr.resolve())!=ne||er&&yr(new er)!=ae||rr&&yr(new rr)!=se)&&(yr=function(t){var e=Be.call(t),r=e==re?t.constructor:void 0,n=r?St(r):void 0;if(n)switch(n){case or:return ce;case ar:return te;case ur:return ne;case ir:return ae;case sr:return se}return e});var dr=Ot(function(t){t=zt(t);var e=[];return Se.test(t)&&e.push(""),t.replace(De,function(t,r,n,o){e.push(n?o.replace(je,"$1"):r||t)}),e});Ot.Cache=w;var vr=Array.isArray,gr=Ne?s(Ne):Q;r.exports=Dt}).call(e,function(){return this}(),r(10)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.MILLISECONDS_IN_ONE_DAY=864e5,e.DAYS_IN_WEEK=7,e.MONTH_LABELS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e.DAY_LABELS=["","Mon","","Wed","","Fri",""]},function(t,e){"use strict";function r(t,e){var r=new Date(t);return r.setDate(r.getDate()+e),r}function n(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function o(t){return t instanceof Date?t:new Date(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.shiftDate=r,e.getBeginningTimeForDate=n,e.convertToDate=o}])});