From ba6d8e9221e595af96c9b72d478f4468c0604e82 Mon Sep 17 00:00:00 2001 From: Nuno Cruz Date: Wed, 8 Apr 2020 09:44:53 +0100 Subject: [PATCH] Promote histogram bar tooltip to be rendered as a child of document body (#48) Co-authored-by: Nuno Neves --- CHANGELOG.md | 1 + docs/iframe.html | 2 +- docs/index.html | 2 +- docs/main.06a73a738c4152e00753.bundle.js | 1 + docs/main.1384b4748a262e70e41c.bundle.js | 2 - docs/main.1384b4748a262e70e41c.bundle.js.map | 1 - docs/main.bfbf1b65571ef3657662.bundle.js | 1 - docs/main.f80707d9b6c6739d4452.bundle.js | 2 + docs/main.f80707d9b6c6739d4452.bundle.js.map | 1 + ...ntime~main.f80707d9b6c6739d4452.bundle.js} | 2 +- ...e~main.f80707d9b6c6739d4452.bundle.js.map} | 2 +- ...endors~main.1a3c3618f044fa5f60a4.bundle.js | 95 ++ ...endors~main.4439187be353e5f64dce.bundle.js | 95 -- ...ndors~main.f80707d9b6c6739d4452.bundle.js} | 20 +- ...s~main.f80707d9b6c6739d4452.bundle.js.map} | 2 +- jest.config.js | 9 - package-lock.json | 1239 ++++++++++++++--- package.json | 16 +- src/Histogram/BarTooltip.js | 61 + src/Histogram/BarTooltip.test.js | 63 + src/Histogram/Histogram.js | 29 +- src/Histogram/Histogram.scss | 12 +- src/Histogram/Histogram.test.js | 8 - .../__snapshots__/BarTooltip.test.js.snap | 153 ++ src/common/components/Portal.js | 42 + src/constants.js | 7 +- 26 files changed, 1513 insertions(+), 355 deletions(-) create mode 100644 docs/main.06a73a738c4152e00753.bundle.js delete mode 100644 docs/main.1384b4748a262e70e41c.bundle.js delete mode 100644 docs/main.1384b4748a262e70e41c.bundle.js.map delete mode 100644 docs/main.bfbf1b65571ef3657662.bundle.js create mode 100644 docs/main.f80707d9b6c6739d4452.bundle.js create mode 100644 docs/main.f80707d9b6c6739d4452.bundle.js.map rename docs/{runtime~main.1384b4748a262e70e41c.bundle.js => runtime~main.f80707d9b6c6739d4452.bundle.js} (97%) rename docs/{runtime~main.1384b4748a262e70e41c.bundle.js.map => runtime~main.f80707d9b6c6739d4452.bundle.js.map} (98%) create mode 100644 docs/vendors~main.1a3c3618f044fa5f60a4.bundle.js delete mode 100644 docs/vendors~main.4439187be353e5f64dce.bundle.js rename docs/{vendors~main.1384b4748a262e70e41c.bundle.js => vendors~main.f80707d9b6c6739d4452.bundle.js} (73%) rename docs/{vendors~main.1384b4748a262e70e41c.bundle.js.map => vendors~main.f80707d9b6c6739d4452.bundle.js.map} (99%) create mode 100644 src/Histogram/BarTooltip.js create mode 100644 src/Histogram/BarTooltip.test.js create mode 100644 src/Histogram/__snapshots__/BarTooltip.test.js.snap create mode 100644 src/common/components/Portal.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b8681b7..bf52484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased - Move `react` in `package.json` from `dependency` to `peerDependency`. +- Promote the histogram bar tooltip DOM node to be a child of document.body. ## 1.2.1 (2019/04/9) - Allow the user to define a custom `brushDomain` via `props`. diff --git a/docs/iframe.html b/docs/iframe.html index 4aceaa0..935db81 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -58,4 +58,4 @@ } catch (e) { // eslint-disable-next-line no-console console.warn('unable to connect to parent frame for connecting dev tools'); - }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file + }

No Preview

Sorry, but you either have no stories or none are selected somehow.

  • Please check the Storybook config.
  • Try reloading the page.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index e84fa9a..f9241d6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,4 +14,4 @@ } catch (e) { // eslint-disable-next-line no-console console.warn('unable to connect to parent frame for connecting dev tools'); - }
\ No newline at end of file + }
\ No newline at end of file diff --git a/docs/main.06a73a738c4152e00753.bundle.js b/docs/main.06a73a738c4152e00753.bundle.js new file mode 100644 index 0000000..947b1be --- /dev/null +++ b/docs/main.06a73a738c4152e00753.bundle.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{390:function(n,o,p){p(391),p(468),n.exports=p(838)},468:function(n,o,p){"use strict";p.r(o);p(469)}},[[390,1,2]]]); \ No newline at end of file diff --git a/docs/main.1384b4748a262e70e41c.bundle.js b/docs/main.1384b4748a262e70e41c.bundle.js deleted file mode 100644 index 1c8131c..0000000 --- a/docs/main.1384b4748a262e70e41c.bundle.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{173:function(module,exports,__webpack_require__){__webpack_require__(174),__webpack_require__(252),module.exports=__webpack_require__(253)},25:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__(44),__webpack_require__(66),__webpack_require__(43),__webpack_require__(22),__webpack_require__(30),__webpack_require__(29),__webpack_require__(81);var classCallCheck=__webpack_require__(47),classCallCheck_default=__webpack_require__.n(classCallCheck),possibleConstructorReturn=__webpack_require__(48),possibleConstructorReturn_default=__webpack_require__.n(possibleConstructorReturn),getPrototypeOf=__webpack_require__(49),getPrototypeOf_default=__webpack_require__.n(getPrototypeOf),assertThisInitialized=__webpack_require__(19),assertThisInitialized_default=__webpack_require__.n(assertThisInitialized),createClass=__webpack_require__(38),createClass_default=__webpack_require__.n(createClass),inherits=__webpack_require__(50),inherits_default=__webpack_require__.n(inherits),defineProperty=__webpack_require__(8),defineProperty_default=__webpack_require__.n(defineProperty),react=__webpack_require__(2),react_default=__webpack_require__.n(react),prop_types=__webpack_require__(3),prop_types_default=__webpack_require__.n(prop_types),d3_array=__webpack_require__(4),d3_scale=__webpack_require__(68),d3_selection=__webpack_require__(0),d3_axis=__webpack_require__(112),d3_time=__webpack_require__(1),react_sizeme=__webpack_require__(171),objectSpread=__webpack_require__(51),objectSpread_default=__webpack_require__.n(objectSpread),d3_time_format=(__webpack_require__(352),__webpack_require__(45),__webpack_require__(166),__webpack_require__(353),__webpack_require__(13)),X_AXIS_HEIGHT=18,BUTTON_PADDING=20,DENSITY_CHART_HEIGHT_PX=20,PADDING=10;function isObject(obj){return Object(obj)===obj}var formatMillisecond=Object(d3_time_format.a)(".%L"),formatSecond=Object(d3_time_format.a)(":%S"),formatMinute=Object(d3_time_format.a)("%I:%M"),formatHour=Object(d3_time_format.a)("%I %p"),formatDay=Object(d3_time_format.a)("%a %d"),formatWeek=Object(d3_time_format.a)("%b %d"),formatMonth=Object(d3_time_format.a)("%B"),formatYear=Object(d3_time_format.a)("%Y");function isHistogramDataEqual(xAcessor,yAcessor,data1,data2){if(!1===Array.isArray(data1)||!1===Array.isArray(data2))return!1;if(data1.length!==data2.length)return!1;for(var i=0;iPADDING+PADDING?BUTTON_PADDING:0);var histogramHeight=height-DENSITY_CHART_HEIGHT_PX-spaceBetweenCharts;return{histogramChartDimensions:{width:width-PADDING,height:histogramHeight,heightForBars:histogramHeight-X_AXIS_HEIGHT},densityChartDimensions:{width:width-4*PADDING-playButtonPadding,height:DENSITY_CHART_HEIGHT_PX}}}(props),nextState={histogramChartDimensions:_calculateChartsPosit.histogramChartDimensions,densityChartDimensions:_calculateChartsPosit.densityChartDimensions};if(0===props.data.length){var now=dateToTimestamp(Date.now());return objectSpread_default()({},nextState,{data:[],brushTimeDomain:{min:now,max:now},overallTimeDomain:{min:now,max:now},brushDomainFromProps:props.brushDomain})}var hasDataChanged=!isHistogramDataEqual(props.xAccessor,props.yAccessor,props.data,previousData),brushDomainChanged=isObject(props.brushDomain)&&!function isEqual(obj1,obj2){return JSON.stringify(obj1)===JSON.stringify(obj2)}(props.brushDomain,previousBrushDomainFromProps);if(hasDataChanged){nextState=objectSpread_default()({},nextState,{data:props.data});var min=Object(d3_array.f)(props.data,props.xAccessor),max=Object(d3_array.e)(props.data,props.xAccessor)+1;(min!==previousBrushTimeDomain.min||max!==previousBrushTimeDomain.max)&&(nextState=objectSpread_default()({},nextState,{brushTimeDomain:{min:dateToTimestamp(min),max:dateToTimestamp(max)},overallTimeDomain:{min:dateToTimestamp(min),max:dateToTimestamp(max)}}))}return brushDomainChanged&&(nextState.brushTimeDomain=props.brushDomain),nextState.brushDomainFromProps=props.brushDomain,nextState}__webpack_require__(82);var d3_zoom=__webpack_require__(111),PLAY_ICON_PATHS=["M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4\n 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z","M719.4 499.1l-296.1-215A15.9 15.9 0 0 0 398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9\n 15.9 0 0 0 0-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"],PlayButton_ref=react_default.a.createElement("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"currentColor"},react_default.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4\n64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372\n372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224\n0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"})),PlayButton_PlayButton=function(_PureComponent){function PlayButton(){var _getPrototypeOf2,_this;classCallCheck_default()(this,PlayButton);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=possibleConstructorReturn_default()(this,(_getPrototypeOf2=getPrototypeOf_default()(PlayButton)).call.apply(_getPrototypeOf2,[this].concat(args))),defineProperty_default()(assertThisInitialized_default()(_this),"state",{play:!1}),defineProperty_default()(assertThisInitialized_default()(_this),"_onClickPlay",function(){var _this$props=_this.props,width=_this$props.width,densityChartXScale=_this$props.densityChartXScale,brushDomainMax=_this$props.brushDomainMax,brushDomainMin=_this$props.brushDomainMin,frameStep=_this$props.frameStep,brushedMaxRange=densityChartXScale(brushDomainMax),frameStart=densityChartXScale(brushDomainMin),playEnd=width;_this.frameEnd=frameStart,_this.frameEnd=brushedMaxRange===playEnd?frameStart:brushedMaxRange,_this.setState({play:!0},function(){return _this._playLapseAtInterval(frameStart,playEnd,width*frameStep)})}),defineProperty_default()(assertThisInitialized_default()(_this),"_onClickStop",function(){_this._stopLapse()}),_this}return inherits_default()(PlayButton,_PureComponent),createClass_default()(PlayButton,[{key:"_playFrame",value:function _playFrame(start,end,step){if(this.frameEnd>=end)this._stopLapse();else{this.frameEnd+step>=end?this.frameEnd=end:this.frameEnd+=step;var domain=[start,this.frameEnd];this.props.moveBrush(domain)}}},{key:"_playLapseAtInterval",value:function _playLapseAtInterval(start,end,step){var _this2=this;this.playInterval=setInterval(function(){_this2._playFrame(start,end,step)},this.props.frameDelay)}},{key:"_stopLapse",value:function _stopLapse(){var _this3=this;this.setState({play:!1},function(){return clearInterval(_this3.playInterval)})}},{key:"render",value:function render(){var iconElement,onClick=this.state.play?this._onClickStop:this._onClickPlay;return iconElement=this.state.play?PlayButton_ref:react_default.a.createElement("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"currentColor"},react_default.a.createElement("path",{d:PLAY_ICON_PATHS[0]}),react_default.a.createElement("path",{d:PLAY_ICON_PATHS[1]})),react_default.a.createElement(react_default.a.Fragment,null,react_default.a.createElement("button",{type:"button",className:"ant-btn fdz-css-play-btn ant-btn-icon-only",onClick:onClick},react_default.a.createElement("i",{className:"anticon anticon-play-circle"},iconElement)))}}]),PlayButton}(react.PureComponent);function drawRect(canvasContext){var x=1=this.props.overallTimeDomainMax){var delta=this.props.brushDomainMax-this.props.brushDomainMin;min=this.props.overallTimeDomainMax-delta,max=this.props.overallTimeDomainMax}(prevProps.width!==width||prevProps.height!==height)&&this.brush.extent([[0,0],[width,height]]),this._updateBrush(),this._moveBrush([densityChartXScale(min),densityChartXScale(max)]),this._drawDensityChart()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){clearInterval(this.playInterval),this.brush.on("brush end",null)}},{key:"_getD3Event",value:function _getD3Event(){return d3_selection.b}},{key:"_updateBrush",value:function _updateBrush(){0===this.props.data.length||Object(d3_selection.f)(this.densityBrushRef.current).call(this.brush)}},{key:"_shouldRedrawDensityChart",value:function _shouldRedrawDensityChart(prevProps){return function havePropsChanged(props,prevProps,propNames){for(var propName,i=0;i=brushDomainMin&&x} domain",modifiers:[],params:[{name:"domain",description:null,type:{name:"Array",elements:[{name:"Number"}]},optional:!1}],returns:null,description:"Moves brush on density strip plot to given domain"},{name:"_shouldRedrawDensityChart",docblock:"Returns whenever it is necessary to re-render the density chart, based on the current and previous\nprops.\n@param {Object} prevProps\n@returns {boolean}",modifiers:[],params:[{name:"prevProps",description:null,type:{name:"Object"},optional:!1}],returns:{description:null,type:{name:"boolean"}},description:"Returns whenever it is necessary to re-render the density chart, based on the current and previous\nprops."},{name:"_drawDensityChart",docblock:"Draws density strip plot in canvas.\n(Using canvas instead of svg for performance reasons as number of datapoints\ncan be very large)\n\n@private",modifiers:[],params:[],returns:null,description:"Draws density strip plot in canvas.\n(Using canvas instead of svg for performance reasons as number of datapoints\ncan be very large)"},{name:"_renderPlayButton",docblock:"Renders the play button that allows to replay a time-lapse of the events.\n@returns {React.Element|null}",modifiers:[],params:[],returns:{description:null,type:{name:"union",elements:[{name:"React.Element"},null]}},description:"Renders the play button that allows to replay a time-lapse of the events."}],displayName:"DensityChart",props:{renderPlayButton:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},overallTimeDomainMax:{defaultValue:{value:"-Infinity",computed:!1},type:{name:"number"},required:!1,description:""},brushDensityChartColor:{defaultValue:{value:'"rgba(33, 150, 243, 0.2)"',computed:!1},type:{name:"string"},required:!1,description:""},brushDensityChartFadedColor:{defaultValue:{value:'"rgba(176, 190, 197, 0.2)"',computed:!1},type:{name:"string"},required:!1,description:""},data:{type:{name:"arrayOf",value:{name:"object"}},required:!0,description:""},width:{type:{name:"number"},required:!0,description:""},height:{type:{name:"number"},required:!0,description:""},padding:{type:{name:"number"},required:!0,description:""},brushDomainMin:{type:{name:"number"},required:!0,description:""},brushDomainMax:{type:{name:"number"},required:!0,description:""},densityChartXScale:{type:{name:"func"},required:!0,description:""},onDomainChanged:{type:{name:"func"},required:!0,description:""},xAccessor:{type:{name:"func"},required:!0,description:""},frameStep:{type:{name:"number"},required:!1,description:""},frameDelay:{type:{name:"number"},required:!1,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/DensityChart/DensityChart.js"]={name:"DensityChart",docgenInfo:DensityChart_DensityChart.__docgenInfo,path:"src/DensityChart/DensityChart.js"});var Histogram_Histogram=function(_PureComponent){function Histogram(props){var _this;return classCallCheck_default()(this,Histogram),_this=possibleConstructorReturn_default()(this,getPrototypeOf_default()(Histogram).call(this,props)),defineProperty_default()(assertThisInitialized_default()(_this),"_onDensityChartDomainChanged",function(brushSelection){var brushSelectionMin=brushSelection[0],brushSelectionMax=brushSelection[1],brushedDomain=brushSelection.map(_this.densityChartXScale.invert);Object(d3_selection.f)(_this.histogramChartRef.current).call(_this.zoom.transform,d3_zoom.b.scale(_this.state.densityChartDimensions.width/(brushSelectionMax-brushSelectionMin)).translate(-brushSelection[0],0)),_this._updateBrushedDomainAndReRenderTheHistogramPlot(brushedDomain)}),defineProperty_default()(assertThisInitialized_default()(_this),"_onResizeZoom",function(){if(!d3_selection.b.sourceEvent||"brush"!==d3_selection.b.sourceEvent.target.name){var brushedDomain=d3_selection.b.transform.rescaleX(_this.densityChartXScale).domain();if(brushedDomain[1]>=_this.state.overallTimeDomain.max){var brushDomainInterval=brushedDomain[1].getTime()-brushedDomain[0].getTime();brushedDomain[0]=Object(d3_time.c)(_this.state.overallTimeDomain.max-brushDomainInterval),brushedDomain[1]=Object(d3_time.c)(_this.state.overallTimeDomain.max)}_this._updateBrushedDomainAndReRenderTheHistogramPlot(brushedDomain)}}),defineProperty_default()(assertThisInitialized_default()(_this),"_onMouseEnterHistogramBar",function(evt){var index=+evt.currentTarget.getAttribute("dataindex"),currentTarget=evt.currentTarget;_this.setState(function(state){return{showHistogramBarTooltip:!0,currentBar:state.timeHistogramBars[index],selectedBarPosition:currentTarget.getBoundingClientRect()}})}),defineProperty_default()(assertThisInitialized_default()(_this),"_onMouseLeaveHistogramBar",function(){_this.setState({showHistogramBarTooltip:!1})}),_this.histogramChartRef=react_default.a.createRef(),_this.histogramXAxisRef=react_default.a.createRef(),_this.histogramYAxisRef=react_default.a.createRef(),_this.state=Object.assign({timeHistogramBars:[],selectedBarPosition:{},showHistogramBarTooltip:!1},calculateChartSizesAndDomain(props,[],{max:-1/0,min:1/0})),_this._createScaleAndZoom(),_this}return inherits_default()(Histogram,_PureComponent),createClass_default()(Histogram,null,[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(props,state){if(props.height<100)throw new Error("The minimum height is ".concat(100,"px."));if(0===props.size.width)return null;var nextState=calculateChartSizesAndDomain(props,state.data,state.brushTimeDomain,state.brushDomainFromProps);return 0=height||0>=width)return null;var hasTooltipBarCustomatizations="function"==typeof _this3.props.tooltipBarCustomization;return react_default.a.createElement("rect",{key:"histogram-bin-".concat(bar.x0.getTime()),dataindex:index,x:x,y:y,width:width,height:height,onMouseEnter:hasTooltipBarCustomatizations?_this3._onMouseEnterHistogramBar:null,onMouseLeave:hasTooltipBarCustomatizations?_this3._onMouseLeaveHistogramBar:null})})}},{key:"_renderHistogramAxis",value:function _renderHistogramAxis(){var histogramXAxisScale=Object(d3_scale.b)().domain([this.histogramChartXScale.invert(0),this.histogramChartXScale.invert(this.state.histogramChartDimensions.width)]).range([0,this.state.histogramChartDimensions.width]),histogramXAxis=Object(d3_axis.a)(histogramXAxisScale).tickValues(this.histogramChartXScale.ticks(this.props.defaultBarCount/3)).tickFormat(this.props.xAxisFormatter);Object(d3_selection.f)(this.histogramXAxisRef.current).call(histogramXAxis);var histogramYAxis=Object(d3_axis.b)(this.histogramChartYScale).ticks(this.props.yAxisTicks).tickSize(0).tickFormat(this.props.yAxisFormatter);Object(d3_selection.f)(this.histogramYAxisRef.current).call(histogramYAxis)}},{key:"_renderBarTooltip",value:function _renderBarTooltip(currentBar){if("function"!=typeof this.props.tooltipBarCustomization)return null;var tooltipStyle={position:"fixed",left:"".concat(this.state.selectedBarPosition.left+this.state.selectedBarPosition.width/2,"px"),top:"".concat(this.state.selectedBarPosition.top- -10,"px")},tooltipElement=this.props.tooltipBarCustomization(currentBar);return react_default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip",style:tooltipStyle},tooltipElement)}},{key:"_renderHistogramChart",value:function _renderHistogramChart(){var _this$state=this.state,histogramChartDimensions=_this$state.histogramChartDimensions,timeHistogramBars=_this$state.timeHistogramBars,_this$props=this.props,spaceBetweenCharts=_this$props.spaceBetweenCharts,size=_this$props.size;return react_default.a.createElement("svg",{ref:this.histogramChartRef,className:"fdz-js-graph-histogram fdz-css-graph-histogram-chart",width:size.width,height:histogramChartDimensions.height,style:{marginBottom:spaceBetweenCharts}},react_default.a.createElement("g",{className:"fdz-css-graph-histogram-bars"},this._renderHistogramBars(timeHistogramBars)),react_default.a.createElement("g",{ref:this.histogramXAxisRef,className:"fdz-js-graph-histogram-axis-x fdz-css-graph-histogram-axis-x",transform:"translate(0, ".concat(histogramChartDimensions.heightForBars,")")}),react_default.a.createElement("g",{ref:this.histogramYAxisRef,className:"fdz-js-graph-histogram-axis-y fdz-css-graph-histogram-axis-y",transform:"translate(".concat(3,", ").concat(3,")")}))}},{key:"_renderDensityChart",value:function _renderDensityChart(){var _this$props2=this.props,frameStep=_this$props2.frameStep,frameDelay=_this$props2.frameDelay,xAccessor=_this$props2.xAccessor,spaceBetweenCharts=_this$props2.spaceBetweenCharts,brushDensityChartColor=_this$props2.brushDensityChartColor,brushDensityChartFadedColor=_this$props2.brushDensityChartFadedColor,renderPlayButton=_this$props2.renderPlayButton,data=_this$props2.data;return react_default.a.createElement(DensityChart_DensityChart,{width:this.state.densityChartDimensions.width,height:this.state.densityChartDimensions.height,padding:PADDING,brushDomainMin:this.state.brushTimeDomain.min,brushDomainMax:this.state.brushTimeDomain.max,overallTimeDomainMax:this.state.overallTimeDomain.max,frameStep:frameStep,frameDelay:frameDelay,xAccessor:xAccessor,spaceBetweenCharts:spaceBetweenCharts,brushDensityChartColor:brushDensityChartColor,brushDensityChartFadedColor:brushDensityChartFadedColor,densityChartXScale:this.densityChartXScale,renderPlayButton:renderPlayButton&&0} brushedDomain\n@private",modifiers:[],params:[{name:"brushedDomain",description:null,type:{name:"Array",elements:[{name:"Number"}]},optional:!1}],returns:null,description:"Check if brushed domain changed and if so, updates the component state\nand calls prop function for interval change."},{name:"_updateHistogramChartScales",docblock:"Defines X and Y scale for histogram bar chart and creates bins for histogram\nChecks if plot is timebased and sets X axis accordingly.\n\n@private",modifiers:[],params:[],returns:null,description:"Defines X and Y scale for histogram bar chart and creates bins for histogram\nChecks if plot is timebased and sets X axis accordingly."},{name:"_renderHistogramBars",docblock:"Renders histogram bars from array of histogram bins.\n\n@param {Array} timeHistogramBars\n@returns {Array.|null}\n@private",modifiers:[],params:[{name:"timeHistogramBars",description:null,type:{name:"Array"},optional:!1}],returns:{description:null,type:{name:"union",elements:[{name:"Array",elements:[{name:"React.Element"}]},null]}},description:"Renders histogram bars from array of histogram bins."},{name:"_renderHistogramAxis",docblock:"This function will render the X and Y axis. This means it will set their scales\nas well as how many ticks, their respective positions and how their text should\nbe formatted.\n\n@private",modifiers:[],params:[],returns:null,description:"This function will render the X and Y axis. This means it will set their scales\nas well as how many ticks, their respective positions and how their text should\nbe formatted."},{name:"_renderBarTooltip",docblock:"Renders tooltip corresponding to an histogram bin.\nReceives an object with all the data of the bin and gets corresponding\nbar element. Then calls the prop function histogramBarTooltipFormatter\nto get the tooltip element to be rendered. Updates states with this element\nand toggles showHistogramBarTooltip.\n\n@param {Object} currentBar\n@private",modifiers:[],params:[{name:"currentBar",description:null,type:{name:"Object"},optional:!1}],returns:null,description:"Renders tooltip corresponding to an histogram bin.\nReceives an object with all the data of the bin and gets corresponding\nbar element. Then calls the prop function histogramBarTooltipFormatter\nto get the tooltip element to be rendered. Updates states with this element\nand toggles showHistogramBarTooltip."},{name:"_renderHistogramChart",docblock:"Renders the histogram chart (i.e., the bars and the axis).\n@returns {React.Element}",modifiers:[],params:[],returns:{description:null,type:{name:"React.Element"}},description:"Renders the histogram chart (i.e., the bars and the axis)."},{name:"_renderDensityChart",docblock:"Renders the density chart.\n@returns {React.Element}",modifiers:[],params:[],returns:{description:null,type:{name:"React.Element"}},description:"Renders the density chart."}],displayName:"Histogram",props:{data:{defaultValue:{value:"[]",computed:!1},type:{name:"array"},required:!1,description:""},height:{defaultValue:{value:"MIN_TOTAL_HEIGHT",computed:!0},required:!1},padding:{defaultValue:{value:"10",computed:!1},required:!1},defaultBarCount:{defaultValue:{value:"18",computed:!1},type:{name:"number"},required:!1,description:""},barOptions:{defaultValue:{value:"{\n margin: 1\n}",computed:!1},type:{name:"object"},required:!1,description:""},spaceBetweenCharts:{defaultValue:{value:"10",computed:!1},type:{name:"number"},required:!1,description:""},yAxisTicks:{defaultValue:{value:"3",computed:!1},type:{name:"number"},required:!1,description:""},xAxisFormatter:{defaultValue:{value:"multiDateFormat",computed:!0},type:{name:"func"},required:!1,description:""},yAxisFormatter:{defaultValue:{value:"histogramDefaultYAxisFormatter",computed:!0},type:{name:"func"},required:!1,description:""},tooltipBarCustomization:{defaultValue:{value:"null",computed:!1},type:{name:"func"},required:!1,description:""},onIntervalChange:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},minZoomUnit:{defaultValue:{value:"1000",computed:!1},type:{name:"number"},required:!1,description:""},renderPlayButton:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},size:{type:{name:"shape",value:{width:{name:"number",required:!0}}},required:!0,description:""},xAccessor:{type:{name:"func"},required:!0,description:""},yAccessor:{type:{name:"func"},required:!0,description:""},brushDensityChartColor:{type:{name:"string"},required:!1,description:""},brushDensityChartFadedColor:{type:{name:"string"},required:!1,description:""},frameStep:{type:{name:"number"},required:!1,description:""},frameDelay:{type:{name:"number"},required:!1,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Histogram/Histogram.js"]={name:"Histogram",docgenInfo:Histogram_Histogram.__docgenInfo,path:"src/Histogram/Histogram.js"});__webpack_exports__.a=src_Histogram_Histogram},253:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){__webpack_require__(22),__webpack_require__(30),__webpack_require__(29),__webpack_require__(64);var _storybook_react__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(87),req=__webpack_require__(326);Object(_storybook_react__WEBPACK_IMPORTED_MODULE_4__.configure)(function loadStories(){req.keys().forEach(function(filename){return req(filename)})},module)}.call(this,__webpack_require__(133)(module))},326:function(module,exports,__webpack_require__){var map={"./index.stories.js":327};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=326},327:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),d3_time_format__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(13),_storybook_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(87),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(40),_sampleData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(53),_src_index__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(25),stories=(__webpack_require__(355),Object(_storybook_react__WEBPACK_IMPORTED_MODULE_2__.storiesOf)("Histogram",module));stories.addDecorator(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_3__.withKnobs);var formatDayFull=Object(d3_time_format__WEBPACK_IMPORTED_MODULE_1__.a)("%e %b'%y");function histogramTooltipBar(bar){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip-value"},Math.floor(bar.yValue)," Events"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip-dates"},function formatContextInterval(dateStart,dateEnd){var formatStart=formatDayFull(dateStart),formatEnd=formatDayFull(dateEnd);return formatStart===formatEnd?formatStart:"".concat(formatStart," - ").concat(formatEnd)}(bar.x0,bar.x1)))}histogramTooltipBar.displayName="histogramTooltipBar",stories.add("Basic example",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},yAccessor:function yAccessor(datapoint){return datapoint.total}})}).add("With a custom tooltip",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},yAccessor:function yAccessor(datapoint){return datapoint.total},tooltipBarCustomization:histogramTooltipBar})}).add("With a custom axis formatters",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},xAxisFormatter:formatDayFull,yAxisFormatter:function yAxisFormatter(value){return 0PADDING+PADDING?BUTTON_PADDING:0);var histogramHeight=height-DENSITY_CHART_HEIGHT_PX-spaceBetweenCharts;return{histogramChartDimensions:{width:width-PADDING,height:histogramHeight,heightForBars:histogramHeight-X_AXIS_HEIGHT},densityChartDimensions:{width:width-4*PADDING-playButtonPadding,height:DENSITY_CHART_HEIGHT_PX}}}(props),nextState={histogramChartDimensions:_calculateChartsPosit.histogramChartDimensions,densityChartDimensions:_calculateChartsPosit.densityChartDimensions};if(0===props.data.length){var now=dateToTimestamp(Date.now());return objectSpread_default()({},nextState,{data:[],brushTimeDomain:{min:now,max:now},overallTimeDomain:{min:now,max:now},brushDomainFromProps:props.brushDomain})}var hasDataChanged=!isHistogramDataEqual(props.xAccessor,props.yAccessor,props.data,previousData),brushDomainChanged=isObject(props.brushDomain)&&!function isEqual(obj1,obj2){return JSON.stringify(obj1)===JSON.stringify(obj2)}(props.brushDomain,previousBrushDomainFromProps);if(hasDataChanged){nextState=objectSpread_default()({},nextState,{data:props.data});var min=Object(d3_array.f)(props.data,props.xAccessor),max=Object(d3_array.e)(props.data,props.xAccessor)+1;(min!==previousBrushTimeDomain.min||max!==previousBrushTimeDomain.max)&&(nextState=objectSpread_default()({},nextState,{brushTimeDomain:{min:dateToTimestamp(min),max:dateToTimestamp(max)},overallTimeDomain:{min:dateToTimestamp(min),max:dateToTimestamp(max)}}))}return brushDomainChanged&&(nextState.brushTimeDomain=props.brushDomain),nextState.brushDomainFromProps=props.brushDomain,nextState}__webpack_require__(82);var d3_zoom=__webpack_require__(112),PLAY_ICON_PATHS=["M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4\n 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z","M719.4 499.1l-296.1-215A15.9 15.9 0 0 0 398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9\n 15.9 0 0 0 0-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"],PlayButton_ref=react_default.a.createElement("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"currentColor"},react_default.a.createElement("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4\n64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372\n372zm-88-532h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8zm224\n0h-48c-4.4 0-8 3.6-8 8v304c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V360c0-4.4-3.6-8-8-8z"})),PlayButton_PlayButton=function(_PureComponent){function PlayButton(){var _getPrototypeOf2,_this;classCallCheck_default()(this,PlayButton);for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return _this=possibleConstructorReturn_default()(this,(_getPrototypeOf2=getPrototypeOf_default()(PlayButton)).call.apply(_getPrototypeOf2,[this].concat(args))),defineProperty_default()(assertThisInitialized_default()(_this),"state",{play:!1}),defineProperty_default()(assertThisInitialized_default()(_this),"_onClickPlay",function(){var _this$props=_this.props,width=_this$props.width,densityChartXScale=_this$props.densityChartXScale,brushDomainMax=_this$props.brushDomainMax,brushDomainMin=_this$props.brushDomainMin,frameStep=_this$props.frameStep,brushedMaxRange=densityChartXScale(brushDomainMax),frameStart=densityChartXScale(brushDomainMin),playEnd=width;_this.frameEnd=frameStart,_this.frameEnd=brushedMaxRange===playEnd?frameStart:brushedMaxRange,_this.setState({play:!0},function(){return _this._playLapseAtInterval(frameStart,playEnd,width*frameStep)})}),defineProperty_default()(assertThisInitialized_default()(_this),"_onClickStop",function(){_this._stopLapse()}),_this}return inherits_default()(PlayButton,_PureComponent),createClass_default()(PlayButton,[{key:"_playFrame",value:function _playFrame(start,end,step){if(this.frameEnd>=end)this._stopLapse();else{this.frameEnd+step>=end?this.frameEnd=end:this.frameEnd+=step;var domain=[start,this.frameEnd];this.props.moveBrush(domain)}}},{key:"_playLapseAtInterval",value:function _playLapseAtInterval(start,end,step){var _this2=this;this.playInterval=setInterval(function(){_this2._playFrame(start,end,step)},this.props.frameDelay)}},{key:"_stopLapse",value:function _stopLapse(){var _this3=this;this.setState({play:!1},function(){return clearInterval(_this3.playInterval)})}},{key:"render",value:function render(){var iconElement,onClick=this.state.play?this._onClickStop:this._onClickPlay;return iconElement=this.state.play?PlayButton_ref:react_default.a.createElement("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"currentColor"},react_default.a.createElement("path",{d:PLAY_ICON_PATHS[0]}),react_default.a.createElement("path",{d:PLAY_ICON_PATHS[1]})),react_default.a.createElement(react_default.a.Fragment,null,react_default.a.createElement("button",{type:"button",className:"ant-btn fdz-css-play-btn ant-btn-icon-only",onClick:onClick},react_default.a.createElement("i",{className:"anticon anticon-play-circle"},iconElement)))}}]),PlayButton}(react.PureComponent);function drawRect(canvasContext){var x=1=this.props.overallTimeDomainMax){var delta=this.props.brushDomainMax-this.props.brushDomainMin;min=this.props.overallTimeDomainMax-delta,max=this.props.overallTimeDomainMax}(prevProps.width!==width||prevProps.height!==height)&&this.brush.extent([[0,0],[width,height]]),this._updateBrush(),this._moveBrush([densityChartXScale(min),densityChartXScale(max)]),this._drawDensityChart()}}},{key:"componentWillUnmount",value:function componentWillUnmount(){clearInterval(this.playInterval),this.brush.on("brush end",null)}},{key:"_getD3Event",value:function _getD3Event(){return d3_selection.b}},{key:"_updateBrush",value:function _updateBrush(){0===this.props.data.length||Object(d3_selection.f)(this.densityBrushRef.current).call(this.brush)}},{key:"_shouldRedrawDensityChart",value:function _shouldRedrawDensityChart(prevProps){return function havePropsChanged(props,prevProps,propNames){for(var propName,i=0;i=brushDomainMin&&x} domain",modifiers:[],params:[{name:"domain",description:null,type:{name:"Array",elements:[{name:"Number"}]},optional:!1}],returns:null,description:"Moves brush on density strip plot to given domain"},{name:"_shouldRedrawDensityChart",docblock:"Returns whenever it is necessary to re-render the density chart, based on the current and previous\nprops.\n@param {Object} prevProps\n@returns {boolean}",modifiers:[],params:[{name:"prevProps",description:null,type:{name:"Object"},optional:!1}],returns:{description:null,type:{name:"boolean"}},description:"Returns whenever it is necessary to re-render the density chart, based on the current and previous\nprops."},{name:"_drawDensityChart",docblock:"Draws density strip plot in canvas.\n(Using canvas instead of svg for performance reasons as number of datapoints\ncan be very large)\n\n@private",modifiers:[],params:[],returns:null,description:"Draws density strip plot in canvas.\n(Using canvas instead of svg for performance reasons as number of datapoints\ncan be very large)"},{name:"_renderPlayButton",docblock:"Renders the play button that allows to replay a time-lapse of the events.\n@returns {React.Element|null}",modifiers:[],params:[],returns:{description:null,type:{name:"union",elements:[{name:"React.Element"},null]}},description:"Renders the play button that allows to replay a time-lapse of the events."}],displayName:"DensityChart",props:{renderPlayButton:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},overallTimeDomainMax:{defaultValue:{value:"-Infinity",computed:!1},type:{name:"number"},required:!1,description:""},brushDensityChartColor:{defaultValue:{value:'"rgba(33, 150, 243, 0.2)"',computed:!1},type:{name:"string"},required:!1,description:""},brushDensityChartFadedColor:{defaultValue:{value:'"rgba(176, 190, 197, 0.2)"',computed:!1},type:{name:"string"},required:!1,description:""},data:{type:{name:"arrayOf",value:{name:"object"}},required:!0,description:""},width:{type:{name:"number"},required:!0,description:""},height:{type:{name:"number"},required:!0,description:""},padding:{type:{name:"number"},required:!0,description:""},brushDomainMin:{type:{name:"number"},required:!0,description:""},brushDomainMax:{type:{name:"number"},required:!0,description:""},densityChartXScale:{type:{name:"func"},required:!0,description:""},onDomainChanged:{type:{name:"func"},required:!0,description:""},xAccessor:{type:{name:"func"},required:!0,description:""},frameStep:{type:{name:"number"},required:!1,description:""},frameDelay:{type:{name:"number"},required:!1,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/DensityChart/DensityChart.js"]={name:"DensityChart",docgenInfo:DensityChart_DensityChart.__docgenInfo,path:"src/DensityChart/DensityChart.js"});var react_dom=__webpack_require__(87),react_dom_default=__webpack_require__.n(react_dom),propTypes={children:prop_types_default.a.element},Portal_Portal=function(_React$PureComponent){function Portal(props){var _this;return classCallCheck_default()(this,Portal),(_this=possibleConstructorReturn_default()(this,getPrototypeOf_default()(Portal).call(this,props))).el=document.createElement("div"),_this}return inherits_default()(Portal,_React$PureComponent),createClass_default()(Portal,[{key:"componentDidMount",value:function componentDidMount(){document.body.appendChild(this.el)}},{key:"componentWillUnmount",value:function componentWillUnmount(){document.body.removeChild(this.el)}},{key:"render",value:function render(){return react_dom_default.a.createPortal(this.props.children,this.el)}}]),Portal}(react_default.a.PureComponent);Portal_Portal.displayName="Portal",Portal_Portal.propTypes=propTypes,Portal_Portal.defaultProps={children:null},Portal_Portal.__docgenInfo={description:"",methods:[],displayName:"Portal",props:{children:{defaultValue:{value:"null",computed:!1},type:{name:"element"},required:!1,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/common/components/Portal.js"]={name:"Portal",docgenInfo:Portal_Portal.__docgenInfo,path:"src/common/components/Portal.js"});var propsTypes={selectedBarPosition:prop_types_default.a.shape({top:prop_types_default.a.number,left:prop_types_default.a.number,width:prop_types_default.a.number}),currentBar:prop_types_default.a.object.isRequired,tooltipBarCustomization:prop_types_default.a.func.isRequired};function BarTooltip(_ref){var selectedBarPosition=_ref.selectedBarPosition,currentBar=_ref.currentBar,tooltipBarCustomization=_ref.tooltipBarCustomization;if("function"!=typeof tooltipBarCustomization)return null;var top=selectedBarPosition.top,left=selectedBarPosition.left,width=selectedBarPosition.width,tooltipStyle={position:"fixed",left:"".concat(left-HISTOGRAM_BAR_TOOLTIP_WIDTH/2+width/2,"px"),top:"".concat(top-HISTOGRAM_BAR_TOOLTIP_HEIGHT,"px")},tooltipElement=tooltipBarCustomization(currentBar);return react_default.a.createElement(Portal_Portal,null,react_default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip",style:tooltipStyle},tooltipElement))}BarTooltip.displayName="BarTooltip",BarTooltip.propTypes=propsTypes,BarTooltip.defaultProps={selectedBarPosition:{top:0,left:0,width:0}};var Histogram_BarTooltip=react_default.a.memo(BarTooltip);BarTooltip.__docgenInfo={description:"",methods:[],displayName:"BarTooltip",props:{selectedBarPosition:{defaultValue:{value:"{\n top: 0,\n left: 0,\n width: 0\n}",computed:!1},type:{name:"shape",value:{top:{name:"number",required:!1},left:{name:"number",required:!1},width:{name:"number",required:!1}}},required:!1,description:""},currentBar:{type:{name:"object"},required:!0,description:""},tooltipBarCustomization:{type:{name:"func"},required:!0,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Histogram/BarTooltip.js"]={name:"BarTooltip",docgenInfo:BarTooltip.__docgenInfo,path:"src/Histogram/BarTooltip.js"});var Histogram_Histogram=function(_PureComponent){function Histogram(props){var _this;return classCallCheck_default()(this,Histogram),_this=possibleConstructorReturn_default()(this,getPrototypeOf_default()(Histogram).call(this,props)),defineProperty_default()(assertThisInitialized_default()(_this),"_onDensityChartDomainChanged",function(brushSelection){var brushSelectionMin=brushSelection[0],brushSelectionMax=brushSelection[1],brushedDomain=brushSelection.map(_this.densityChartXScale.invert);Object(d3_selection.f)(_this.histogramChartRef.current).call(_this.zoom.transform,d3_zoom.b.scale(_this.state.densityChartDimensions.width/(brushSelectionMax-brushSelectionMin)).translate(-brushSelection[0],0)),_this._updateBrushedDomainAndReRenderTheHistogramPlot(brushedDomain)}),defineProperty_default()(assertThisInitialized_default()(_this),"_onResizeZoom",function(){if(!d3_selection.b.sourceEvent||"brush"!==d3_selection.b.sourceEvent.target.name){var brushedDomain=d3_selection.b.transform.rescaleX(_this.densityChartXScale).domain();if(brushedDomain[1]>=_this.state.overallTimeDomain.max){var brushDomainInterval=brushedDomain[1].getTime()-brushedDomain[0].getTime();brushedDomain[0]=Object(d3_time.c)(_this.state.overallTimeDomain.max-brushDomainInterval),brushedDomain[1]=Object(d3_time.c)(_this.state.overallTimeDomain.max)}_this._updateBrushedDomainAndReRenderTheHistogramPlot(brushedDomain)}}),defineProperty_default()(assertThisInitialized_default()(_this),"_onMouseEnterHistogramBar",function(evt){var currentTarget=evt.currentTarget,index=+currentTarget.getAttribute("dataindex");_this.setState(function(state){return{showHistogramBarTooltip:!0,currentBar:state.timeHistogramBars[index],selectedBarPosition:currentTarget.getBoundingClientRect()}})}),defineProperty_default()(assertThisInitialized_default()(_this),"_onMouseLeaveHistogramBar",function(){_this.setState({showHistogramBarTooltip:!1})}),_this.histogramChartRef=react_default.a.createRef(),_this.histogramXAxisRef=react_default.a.createRef(),_this.histogramYAxisRef=react_default.a.createRef(),_this.state=Object.assign({timeHistogramBars:[],selectedBarPosition:{},showHistogramBarTooltip:!1},calculateChartSizesAndDomain(props,[],{max:-1/0,min:1/0})),_this._createScaleAndZoom(),_this}return inherits_default()(Histogram,_PureComponent),createClass_default()(Histogram,null,[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(props,state){if(props.height<100)throw new Error("The minimum height is ".concat(100,"px."));if(0===props.size.width)return null;var nextState=calculateChartSizesAndDomain(props,state.data,state.brushTimeDomain,state.brushDomainFromProps);return 0=height||0>=width)return null;var hasTooltipBarCustomatizations="function"==typeof _this3.props.tooltipBarCustomization;return react_default.a.createElement("rect",{key:"histogram-bin-".concat(bar.x0.getTime()),dataindex:index,x:x,y:y,width:width,height:height,onMouseEnter:hasTooltipBarCustomatizations?_this3._onMouseEnterHistogramBar:null,onMouseLeave:hasTooltipBarCustomatizations?_this3._onMouseLeaveHistogramBar:null})})}},{key:"_renderHistogramAxis",value:function _renderHistogramAxis(){var histogramXAxisScale=Object(d3_scale.b)().domain([this.histogramChartXScale.invert(0),this.histogramChartXScale.invert(this.state.histogramChartDimensions.width)]).range([0,this.state.histogramChartDimensions.width]),histogramXAxis=Object(d3_axis.a)(histogramXAxisScale).tickValues(this.histogramChartXScale.ticks(this.props.defaultBarCount/3)).tickFormat(this.props.xAxisFormatter);Object(d3_selection.f)(this.histogramXAxisRef.current).call(histogramXAxis);var histogramYAxis=Object(d3_axis.b)(this.histogramChartYScale).ticks(this.props.yAxisTicks).tickSize(0).tickFormat(this.props.yAxisFormatter);Object(d3_selection.f)(this.histogramYAxisRef.current).call(histogramYAxis)}},{key:"_renderBarTooltip",value:function _renderBarTooltip(currentBar){var tooltipBarCustomization=this.props.tooltipBarCustomization,selectedBarPosition=this.state.selectedBarPosition;return react_default.a.createElement(Histogram_BarTooltip,{tooltipBarCustomization:tooltipBarCustomization,selectedBarPosition:selectedBarPosition,currentBar:currentBar})}},{key:"_renderHistogramChart",value:function _renderHistogramChart(){var _this$state=this.state,histogramChartDimensions=_this$state.histogramChartDimensions,timeHistogramBars=_this$state.timeHistogramBars,_this$props=this.props,spaceBetweenCharts=_this$props.spaceBetweenCharts,size=_this$props.size;return react_default.a.createElement("svg",{ref:this.histogramChartRef,className:"fdz-js-graph-histogram fdz-css-graph-histogram-chart",width:size.width,height:histogramChartDimensions.height,style:{marginBottom:spaceBetweenCharts}},react_default.a.createElement("g",{className:"fdz-css-graph-histogram-bars"},this._renderHistogramBars(timeHistogramBars)),react_default.a.createElement("g",{ref:this.histogramXAxisRef,className:"fdz-js-graph-histogram-axis-x fdz-css-graph-histogram-axis-x",transform:"translate(0, ".concat(histogramChartDimensions.heightForBars,")")}),react_default.a.createElement("g",{ref:this.histogramYAxisRef,className:"fdz-js-graph-histogram-axis-y fdz-css-graph-histogram-axis-y",transform:"translate(".concat(3,", ").concat(3,")")}))}},{key:"_renderDensityChart",value:function _renderDensityChart(){var _this$props2=this.props,frameStep=_this$props2.frameStep,frameDelay=_this$props2.frameDelay,xAccessor=_this$props2.xAccessor,spaceBetweenCharts=_this$props2.spaceBetweenCharts,brushDensityChartColor=_this$props2.brushDensityChartColor,brushDensityChartFadedColor=_this$props2.brushDensityChartFadedColor,renderPlayButton=_this$props2.renderPlayButton,data=_this$props2.data;return react_default.a.createElement(DensityChart_DensityChart,{width:this.state.densityChartDimensions.width,height:this.state.densityChartDimensions.height,padding:PADDING,brushDomainMin:this.state.brushTimeDomain.min,brushDomainMax:this.state.brushTimeDomain.max,overallTimeDomainMax:this.state.overallTimeDomain.max,frameStep:frameStep,frameDelay:frameDelay,xAccessor:xAccessor,spaceBetweenCharts:spaceBetweenCharts,brushDensityChartColor:brushDensityChartColor,brushDensityChartFadedColor:brushDensityChartFadedColor,densityChartXScale:this.densityChartXScale,renderPlayButton:renderPlayButton&&0} brushedDomain\n@private",modifiers:[],params:[{name:"brushedDomain",description:null,type:{name:"Array",elements:[{name:"Number"}]},optional:!1}],returns:null,description:"Check if brushed domain changed and if so, updates the component state\nand calls prop function for interval change."},{name:"_updateHistogramChartScales",docblock:"Defines X and Y scale for histogram bar chart and creates bins for histogram\nChecks if plot is timebased and sets X axis accordingly.\n\n@private",modifiers:[],params:[],returns:null,description:"Defines X and Y scale for histogram bar chart and creates bins for histogram\nChecks if plot is timebased and sets X axis accordingly."},{name:"_renderHistogramBars",docblock:"Renders histogram bars from array of histogram bins.\n\n@param {Array} timeHistogramBars\n@returns {Array.|null}\n@private",modifiers:[],params:[{name:"timeHistogramBars",description:null,type:{name:"Array"},optional:!1}],returns:{description:null,type:{name:"union",elements:[{name:"Array",elements:[{name:"React.Element"}]},null]}},description:"Renders histogram bars from array of histogram bins."},{name:"_renderHistogramAxis",docblock:"This function will render the X and Y axis. This means it will set their scales\nas well as how many ticks, their respective positions and how their text should\nbe formatted.\n\n@private",modifiers:[],params:[],returns:null,description:"This function will render the X and Y axis. This means it will set their scales\nas well as how many ticks, their respective positions and how their text should\nbe formatted."},{name:"_renderBarTooltip",docblock:"Renders tooltip corresponding to an histogram bin.\nReceives an object with all the data of the bin and gets corresponding\nbar element. Then calls the prop function histogramBarTooltipFormatter\nto get the tooltip element to be rendered. Updates states with this element\nand toggles showHistogramBarTooltip.\n\n@param {Object} currentBar\n@private",modifiers:[],params:[{name:"currentBar",description:null,type:{name:"Object"},optional:!1}],returns:null,description:"Renders tooltip corresponding to an histogram bin.\nReceives an object with all the data of the bin and gets corresponding\nbar element. Then calls the prop function histogramBarTooltipFormatter\nto get the tooltip element to be rendered. Updates states with this element\nand toggles showHistogramBarTooltip."},{name:"_renderHistogramChart",docblock:"Renders the histogram chart (i.e., the bars and the axis).\n@returns {React.Element}",modifiers:[],params:[],returns:{description:null,type:{name:"React.Element"}},description:"Renders the histogram chart (i.e., the bars and the axis)."},{name:"_renderDensityChart",docblock:"Renders the density chart.\n@returns {React.Element}",modifiers:[],params:[],returns:{description:null,type:{name:"React.Element"}},description:"Renders the density chart."}],displayName:"Histogram",props:{data:{defaultValue:{value:"[]",computed:!1},type:{name:"array"},required:!1,description:""},height:{defaultValue:{value:"MIN_TOTAL_HEIGHT",computed:!0},required:!1},padding:{defaultValue:{value:"10",computed:!1},required:!1},defaultBarCount:{defaultValue:{value:"18",computed:!1},type:{name:"number"},required:!1,description:""},barOptions:{defaultValue:{value:"{\n margin: 1\n}",computed:!1},type:{name:"object"},required:!1,description:""},spaceBetweenCharts:{defaultValue:{value:"10",computed:!1},type:{name:"number"},required:!1,description:""},yAxisTicks:{defaultValue:{value:"3",computed:!1},type:{name:"number"},required:!1,description:""},xAxisFormatter:{defaultValue:{value:"multiDateFormat",computed:!0},type:{name:"func"},required:!1,description:""},yAxisFormatter:{defaultValue:{value:"histogramDefaultYAxisFormatter",computed:!0},type:{name:"func"},required:!1,description:""},tooltipBarCustomization:{defaultValue:{value:"null",computed:!1},type:{name:"func"},required:!1,description:""},onIntervalChange:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},minZoomUnit:{defaultValue:{value:"1000",computed:!1},type:{name:"number"},required:!1,description:""},renderPlayButton:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},size:{type:{name:"shape",value:{width:{name:"number",required:!0}}},required:!0,description:""},xAccessor:{type:{name:"func"},required:!0,description:""},yAccessor:{type:{name:"func"},required:!0,description:""},brushDensityChartColor:{type:{name:"string"},required:!1,description:""},brushDensityChartFadedColor:{type:{name:"string"},required:!1,description:""},frameStep:{type:{name:"number"},required:!1,description:""},frameDelay:{type:{name:"number"},required:!1,description:""}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Histogram/Histogram.js"]={name:"Histogram",docgenInfo:Histogram_Histogram.__docgenInfo,path:"src/Histogram/Histogram.js"});__webpack_exports__.a=src_Histogram_Histogram},326:function(module,exports,__webpack_require__){var map={"./index.stories.js":327};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id=326},327:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(2),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),d3_time_format__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(13),_storybook_react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(88),_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(44),_sampleData__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(53),_src_index__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(26),stories=(__webpack_require__(355),Object(_storybook_react__WEBPACK_IMPORTED_MODULE_2__.storiesOf)("Histogram",module));stories.addDecorator(_storybook_addon_knobs__WEBPACK_IMPORTED_MODULE_3__.withKnobs);var formatDayFull=Object(d3_time_format__WEBPACK_IMPORTED_MODULE_1__.a)("%e %b'%y");function histogramTooltipBar(bar){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip-value"},Math.floor(bar.yValue)," Events"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"fdz-css-graph-histogram-bars--tooltip-dates"},function formatContextInterval(dateStart,dateEnd){var formatStart=formatDayFull(dateStart),formatEnd=formatDayFull(dateEnd);return formatStart===formatEnd?formatStart:"".concat(formatStart," - ").concat(formatEnd)}(bar.x0,bar.x1)))}histogramTooltipBar.displayName="histogramTooltipBar",stories.add("Basic example",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},yAccessor:function yAccessor(datapoint){return datapoint.total}})}).add("With a custom tooltip",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},yAccessor:function yAccessor(datapoint){return datapoint.total},tooltipBarCustomization:histogramTooltipBar})}).add("With a custom axis formatters",function(){return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_src_index__WEBPACK_IMPORTED_MODULE_5__.a,{data:_sampleData__WEBPACK_IMPORTED_MODULE_4__.a,xAccessor:function xAccessor(datapoint){return datapoint.timestamp},xAxisFormatter:formatDayFull,yAxisFormatter:function yAxisFormatter(value){return 0 req(filename));\n}\n\nconfigure(loadStories, module);\n"],"mappings":"AAGA","sourceRoot":""} \ No newline at end of file diff --git a/docs/runtime~main.1384b4748a262e70e41c.bundle.js b/docs/runtime~main.f80707d9b6c6739d4452.bundle.js similarity index 97% rename from docs/runtime~main.1384b4748a262e70e41c.bundle.js rename to docs/runtime~main.f80707d9b6c6739d4452.bundle.js index 7d5ace1..d3c6e36 100644 --- a/docs/runtime~main.1384b4748a262e70e41c.bundle.js +++ b/docs/runtime~main.f80707d9b6c6739d4452.bundle.js @@ -1,2 +1,2 @@ !function(modules){function webpackJsonpCallback(data){for(var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],executeModules=data[2],i=0,resolves=[];io;)$(e,n=r[o++],t[n]);return e},Y=function(e){var t=D.call(this,e=w(e,!0));return!(this===B&&o(L,e)&&!o(z,e))&&(!(t||!o(this,e)||!o(L,e)||o(this,I)&&this[I][e])||t)},X=function(e,t){if(e=_(e),t=w(t,!0),e!==B||!o(L,t)||o(z,t)){var n=j(e,t);return!n||!o(L,t)||o(e,I)&&e[I][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=P(_(e)),r=[],i=0;n.length>i;)o(L,t=n[i++])||t==I||t==s||r.push(t);return r},Z=function(e){for(var t,n=e===B,r=P(n?z:_(e)),i=[],a=0;r.length>a;)!o(L,t=r[a++])||n&&!o(B,t)||i.push(L[t]);return i};H||(u((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(z,n),o(this,I)&&o(this[I],e)&&(this[I][e]=!1),V(this,e,x(1,n))};return i&&W&&V(B,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",function(){return this._k}),k.f=X,S.f=$,n(186).f=E.f=Q,n(115).f=Y,n(184).f=Z,i&&!n(114)&&u(B,"propertyIsEnumerable",Y,!0),h.f=function(e){return G(d(e))}),a(a.G+a.W+a.F*!H,{Symbol:A});for(var J="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;J.length>ee;)d(J[ee++]);for(var te=T(d.store),ne=0;te.length>ne;)v(te[ne++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(F,e+="")?F[e]:F[e]=A(e)},keyFor:function(e){if(!K(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!H,"Object",{create:function(e,t){return void 0===t?O(e):q(O(e),t)},defineProperty:$,defineProperties:q,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),M&&a(a.S+a.F*(!H||l(function(){var e=A();return"[null]"!=R([e])||"{}"!=R({a:e})||"{}"!=R(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(b(t)||void 0!==e)&&!K(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,R.apply(M,r)}}),A.prototype[N]||n(61)(A.prototype,N,A.prototype.valueOf),f(A,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(14);r(r.S+r.F,"Object",{assign:n(480)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=l(n(647)),o=l(n(718)),i=l(n(738)),a=l(n(739)),u=l(n(740)),s=l(n(741));function l(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=u.default,t.loop=s.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;a=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){var r=n(63),o=n(76);n(265)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){n(180)("asyncIterator")},function(e,t,n){var r=n(30),o=n(60),i=n(61),a=n(49),u=n(75),s=function(e,t,n){var l,c,f,p,d=e&s.F,h=e&s.G,v=e&s.S,y=e&s.P,g=e&s.B,m=h?r:v?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?o:o[t]||(o[t]={}),_=b.prototype||(b.prototype={});for(l in h&&(n=t),n)f=((c=!d&&m&&void 0!==m[l])?m:n)[l],p=g&&c?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,m&&a(m,l,f,e&s.U),b[l]!=f&&i(b,l,p),y&&_[l]!=f&&(_[l]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";(function(e){n.d(t,"b",function(){return a}),n.d(t,"a",function(){return u});var r=n(389),o=void 0!==e?e:{},i=Object(r.a)(o),a=(i.flush,i.hydrate,i.cx,i.merge,i.getRegisteredStyles,i.injectGlobal),u=(i.keyframes,i.css);i.sheet,i.caches}).call(this,n(17))},function(e,t,n){"use strict";var r=n(14),o=n(181)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(80)(i)),"Array",{indexOf:function(e){return a?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n(2),Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Badge",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"Link",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"DocumentFormatting",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"SyntaxHighlighter",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"ActionBar",{enumerable:!0,get:function(){return u.ActionBar}}),Object.defineProperty(t,"Spaced",{enumerable:!0,get:function(){return s.Spaced}}),Object.defineProperty(t,"Placeholder",{enumerable:!0,get:function(){return l.Placeholder}}),Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"WithTooltip",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"TooltipMessage",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"TooltipNote",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"TooltipLinkList",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"Tabs",{enumerable:!0,get:function(){return y.Tabs}}),Object.defineProperty(t,"TabsState",{enumerable:!0,get:function(){return y.TabsState}}),Object.defineProperty(t,"TabBar",{enumerable:!0,get:function(){return y.TabBar}}),Object.defineProperty(t,"TabWrapper",{enumerable:!0,get:function(){return y.TabWrapper}}),Object.defineProperty(t,"IconButton",{enumerable:!0,get:function(){return g.IconButton}}),Object.defineProperty(t,"TabButton",{enumerable:!0,get:function(){return g.TabButton}}),Object.defineProperty(t,"Separator",{enumerable:!0,get:function(){return m.Separator}}),Object.defineProperty(t,"interleaveSeparators",{enumerable:!0,get:function(){return m.interleaveSeparators}}),Object.defineProperty(t,"Bar",{enumerable:!0,get:function(){return b.Bar}}),Object.defineProperty(t,"FlexBar",{enumerable:!0,get:function(){return b.FlexBar}}),Object.defineProperty(t,"Icons",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(t,"StorybookLogo",{enumerable:!0,get:function(){return w.StorybookLogo}}),Object.defineProperty(t,"StorybookIcon",{enumerable:!0,get:function(){return x.StorybookIcon}});var r=O(n(573)),o=O(n(292)),i=O(n(576)),a=O(n(577)),u=n(305),s=n(617),l=n(307),c=O(n(308)),f=O(n(620)),p=O(n(625)),d=O(n(633)),h=O(n(634)),v=O(n(635)),y=n(637),g=n(319),m=n(638),b=n(318),_=O(n(293)),w=n(639),x=n(640);function O(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){var r=n(14);r(r.S,"Object",{create:n(140)})},function(e,t,n){var r=n(14);r(r.S,"Object",{setPrototypeOf:n(262).set})},function(e,t,n){"use strict";var r=n(14),o=n(116)(1);r(r.P+r.F*!n(80)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(38).f,o=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in o||n(34)&&r(o,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(742);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return f(r).default}});var o=n(233);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return f(o).default}});var i=n(745);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return f(i).default}});var a=n(746);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return f(a).default}});var u=n(748);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return f(u).default}});var s=n(762);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return f(s).default}});var l=n(354);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return f(l).default}});var c=n(770);function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return f(c).default}})},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(17))},function(e,t,n){var r=n(136)("wks"),o=n(113),i=n(30).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";var r=n(400),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=Object.defineProperty,s=u&&function(){var e={};try{for(var t in u(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),l=function(e,t,n,r){var o;t in e&&("function"!=typeof(o=r)||"[object Function]"!==i.call(o)||!r())||(s?u(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=a.call(i,Object.getOwnPropertySymbols(t)));for(var u=0;u=0?(this.lastItem=this.list[t],this.list[t].val):void 0},r.prototype.set=function(e,t){var n;return this.lastItem&&this.isEqual(this.lastItem.key,e)?(this.lastItem.val=t,this):(n=this.indexOf(e))>=0?(this.lastItem=this.list[n],this.list[n].val=t,this):(this.lastItem={key:e,val:t},this.list.push(this.lastItem),this.size++,this)},r.prototype.delete=function(e){var t;if(this.lastItem&&this.isEqual(this.lastItem.key,e)&&(this.lastItem=void 0),(t=this.indexOf(e))>=0)return this.size--,this.list.splice(t,1)[0]},r.prototype.has=function(e){var t;return!(!this.lastItem||!this.isEqual(this.lastItem.key,e))||(t=this.indexOf(e))>=0&&(this.lastItem=this.list[t],!0)},r.prototype.forEach=function(e,t){var n;for(n=0;n0&&(f[c]={cacheItem:l,arg:arguments[c]},p?function(e,t){var n,r,o,i,a,u=e.length,s=t.length;for(r=0;re&&function(e){var t,n,r=e.length,o=e[r-1];for(o.cacheItem.delete(o.arg),n=r-2;n>=0&&(o=e[n],!(t=o.cacheItem.get(o.arg))||!t.size);n--)o.cacheItem.delete(o.arg)}(n.shift())),i.wasMemoized=p,i.numArgs=c+1,u};return i.limit=e,i.wasMemoized=!1,i.cache=t,i.lru=n,i}}},{"map-or-similar":1}]},{},[3])(3)},function(e,t,n){e.exports=!n(32)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";n(211)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(749),o=n(753)(function(e,t,n){r(e,t,n)});e.exports=o},function(e,t,n){var r=n(31),o=n(254),i=n(135),a=Object.defineProperty;t.f=n(34)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r=n(14),o=n(296);r(r.P+r.F*!n(80)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(627)},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(194),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default||function(e){for(var t=1;t=128?"#000":"#fff"}};t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}}},function(e,t,n){var r=n(30),o=n(61),i=n(59),a=n(113)("src"),u=n(463),s=(""+u).split("toString");n(60).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(i(n,a)||o(n,a,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t,n){var r=n(14);r(r.S+r.F*!n(34),"Object",{defineProperties:n(258)})},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";var r=n(404);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(506)),o=a(n(516)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";n.r(t);var r=n(4);function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}n.d(t,"adjustHue",function(){return _e}),n.d(t,"animation",function(){return Qe}),n.d(t,"backgroundImages",function(){return Ze}),n.d(t,"backgrounds",function(){return Je}),n.d(t,"between",function(){return g}),n.d(t,"border",function(){return tt}),n.d(t,"borderColor",function(){return F}),n.d(t,"borderRadius",function(){return nt}),n.d(t,"borderStyle",function(){return rt}),n.d(t,"borderWidth",function(){return ot}),n.d(t,"buttons",function(){return lt}),n.d(t,"clearFix",function(){return m}),n.d(t,"complement",function(){return we}),n.d(t,"cover",function(){return b}),n.d(t,"darken",function(){return Ee}),n.d(t,"desaturate",function(){return Se}),n.d(t,"directionalProperty",function(){return u}),n.d(t,"ellipsis",function(){return _}),n.d(t,"em",function(){return f}),n.d(t,"fluidRange",function(){return w}),n.d(t,"fontFace",function(){return O}),n.d(t,"getLuminance",function(){return Te}),n.d(t,"getValueAndUnit",function(){return d}),n.d(t,"grayscale",function(){return je}),n.d(t,"invert",function(){return Ce}),n.d(t,"hideText",function(){return E}),n.d(t,"hideVisually",function(){return k}),n.d(t,"hiDPI",function(){return S}),n.d(t,"hsl",function(){return se}),n.d(t,"hsla",function(){return le}),n.d(t,"lighten",function(){return Ae}),n.d(t,"margin",function(){return ct}),n.d(t,"mix",function(){return Re}),n.d(t,"modularScale",function(){return v}),n.d(t,"normalize",function(){return T}),n.d(t,"opacify",function(){return Ne}),n.d(t,"padding",function(){return ft}),n.d(t,"parseToHsl",function(){return ne}),n.d(t,"parseToRgb",function(){return te}),n.d(t,"placeholder",function(){return j}),n.d(t,"position",function(){return dt}),n.d(t,"radialGradient",function(){return M}),n.d(t,"readableColor",function(){return De}),n.d(t,"rem",function(){return y}),n.d(t,"retinaImage",function(){return R}),n.d(t,"rgb",function(){return ce}),n.d(t,"rgba",function(){return fe}),n.d(t,"saturate",function(){return Le}),n.d(t,"selection",function(){return I}),n.d(t,"setHue",function(){return Be}),n.d(t,"setLightness",function(){return Ue}),n.d(t,"setSaturation",function(){return Ve}),n.d(t,"shade",function(){return Ke}),n.d(t,"size",function(){return ht}),n.d(t,"stripUnit",function(){return l}),n.d(t,"textInputs",function(){return gt}),n.d(t,"timingFunctions",function(){return D}),n.d(t,"tint",function(){return qe}),n.d(t,"toColorString",function(){return ge}),n.d(t,"transitions",function(){return mt}),n.d(t,"transparentize",function(){return Xe}),n.d(t,"triangle",function(){return H}),n.d(t,"wordWrap",function(){return U});var i=["Top","Right","Bottom","Left"];function a(e,t){if(!e)return t.toLowerCase();var n=e.split("-");if(n.length>1)return n.splice(1,0,t),n.reduce(function(e,t){return""+e+o(t)});var r=e.replace(/([a-z])([A-Z])/g,"$1"+t+"$2");return e===r?""+e+t:r}function u(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=a.length)break;f=a[s++]}else{if((s=a.next()).done)break;f=s.value}var p=f;if(!p.prop||!p.fromSize||!p.toSize)throw new Error("expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.");i[p.prop]=p.fromSize,o["@media (min-width: "+t+")"]=Object(r.a)({},o["@media (min-width: "+t+")"],((l={})[p.prop]=g(p.fromSize,p.toSize,t,n),l)),o["@media (min-width: "+n+")"]=Object(r.a)({},o["@media (min-width: "+n+")"],((c={})[p.prop]=p.toSize,c))}return Object(r.a)({},i,o)}var d,h,v;if(!e.prop||!e.fromSize||!e.toSize)throw new Error("expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.");return(v={})[e.prop]=e.fromSize,v["@media (min-width: "+t+")"]=((d={})[e.prop]=g(e.fromSize,e.toSize,t,n),d),v["@media (min-width: "+n+")"]=((h={})[e.prop]=e.toSize,h),v}function x(e,t,n){var r=[];return t&&r.push(function(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}(t)),e&&r.push(function(e,t){return t.map(function(t){return'url("'+e+"."+t+'")'}).join(", ")}(e,n)),r.join(", ")}function O(e){var t=e.fontFamily,n=e.fontFilePath,r=e.fontStretch,o=e.fontStyle,i=e.fontVariant,a=e.fontWeight,u=e.fileFormats,s=void 0===u?["eot","woff2","woff","ttf","svg"]:u,l=e.localFonts,c=e.unicodeRange,f=e.fontDisplay,p=e.fontVariationSettings,d=e.fontFeatureSettings;if(!t)throw new Error("fontFace expects a name of a font-family.");if(!n&&!l)throw new Error("fontFace expects either the path to the font file(s) or a name of a local copy.");if(l&&!Array.isArray(l))throw new Error("fontFace expects localFonts to be an array.");if(!Array.isArray(s))throw new Error("fontFace expects fileFormats to be an array.");var h={"@font-face":{fontFamily:t,src:x(n,l,s),unicodeRange:c,fontStretch:r,fontStyle:o,fontVariant:i,fontWeight:a,fontDisplay:f,fontVariationSettings:p,fontFeatureSettings:d}};return JSON.parse(JSON.stringify(h))}function E(){return{textIndent:"101%",overflow:"hidden",whiteSpace:"nowrap"}}function k(){return{border:"0",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",whiteSpace:"nowrap",width:"1px"}}function S(e){return void 0===e&&(e=1.3),"\n @media only screen and (-webkit-min-device-pixel-ratio: "+e+"),\n only screen and (min--moz-device-pixel-ratio: "+e+"),\n only screen and (-o-min-device-pixel-ratio: "+e+"/1),\n only screen and (min-resolution: "+Math.round(96*e)+"dpi),\n only screen and (min-resolution: "+e+"dppx)\n "}function T(){var e;return[(e={html:{lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:"0"},h1:{fontSize:"2em",margin:"0.67em 0"},hr:{boxSizing:"content-box",height:"0",overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{backgroundColor:"transparent"},"abbr[title]":{borderBottom:"none",textDecoration:"underline"}},e["b,\n strong"]={fontWeight:"bolder"},e["code,\n kbd,\n samp"]={fontFamily:"monospace, monospace",fontSize:"1em"},e.small={fontSize:"80%"},e["sub,\n sup"]={fontSize:"75%",lineHeight:"0",position:"relative",verticalAlign:"baseline"},e.sub={bottom:"-0.25em"},e.sup={top:"-0.5em"},e.img={borderStyle:"none"},e["button,\n input,\n optgroup,\n select,\n textarea"]={fontFamily:"inherit",fontSize:"100%",lineHeight:"1.15",margin:"0"},e["button,\n input"]={overflow:"visible"},e["button,\n select"]={textTransform:"none"},e['button,\n html [type="button"],\n [type="reset"],\n [type="submit"]']={WebkitAppearance:"button"},e['button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner']={borderStyle:"none",padding:"0"},e['button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring']={outline:"1px dotted ButtonText"},e.fieldset={padding:"0.35em 0.625em 0.75em"},e.legend={boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:"0",whiteSpace:"normal"},e.progress={verticalAlign:"baseline"},e.textarea={overflow:"auto"},e['[type="checkbox"],\n [type="radio"]']={boxSizing:"border-box",padding:"0"},e['[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button']={height:"auto"},e['[type="search"]']={WebkitAppearance:"textfield",outlineOffset:"-2px"},e['[type="search"]::-webkit-search-decoration']={WebkitAppearance:"none"},e["::-webkit-file-upload-button"]={WebkitAppearance:"button",font:"inherit"},e.details={display:"block"},e.summary={display:"list-item"},e.template={display:"none"},e["[hidden]"]={display:"none"},e),{"abbr[title]":{textDecoration:"underline dotted"}}]}function j(e,t){var n;return void 0===t&&(t="&"),(n={})[t+"::-webkit-input-placeholder"]=Object(r.a)({},e),n[t+":-moz-placeholder"]=Object(r.a)({},e),n[t+"::-moz-placeholder"]=Object(r.a)({},e),n[t+":-ms-input-placeholder"]=Object(r.a)({},e),n}function C(){var e,t,n=(e=["radial-gradient(","","","",")"],t||(t=e.slice(0)),e.raw=t,e);return C=function(){return n},n}function P(e){return e[0].split(" ")[0]}function A(e){for(var t="",n=0;n=0&&o<1?(u=i,s=a):o>=1&&o<2?(u=a,s=i):o>=2&&o<3?(s=i,l=a):o>=3&&o<4?(s=a,l=i):o>=4&&o<5?(u=a,l=i):o>=5&&o<6&&(u=i,l=a);var c=n-i/2;return r(u+c,s+c,l+c)}var K={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var $=/^#[a-fA-F0-9]{6}$/,q=/^#[a-fA-F0-9]{8}$/,Y=/^#[a-fA-F0-9]{3}$/,X=/^#[a-fA-F0-9]{4}$/,Q=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,Z=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,J=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,ee=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;function te(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return K[t]?"#"+K[t]:e}(e);if(t.match($))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(q)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(Y))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(X)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var o=Q.exec(t);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var i=Z.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10),alpha:parseFloat(""+i[4])};var a=J.exec(t);if(a){var u="rgb("+G(parseInt(""+a[1],10),parseInt(""+a[2],10)/100,parseInt(""+a[3],10)/100)+")",s=Q.exec(u);if(!s)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+u+".");return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var l=ee.exec(t);if(l){var c="rgb("+G(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",f=Q.exec(c);if(!f)throw new Error("Couldn't generate valid rgb string from "+t+", it returned "+c+".");return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10),alpha:parseFloat(""+l[4])}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function ne(e){return function(e){var t,n=e.red/255,r=e.green/255,o=e.blue/255,i=Math.max(n,r,o),a=Math.min(n,r,o),u=(i+a)/2;if(i===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:u,alpha:e.alpha}:{hue:0,saturation:0,lightness:u};var s=i-a,l=u>.5?s/(2-i-a):s/(i+a);switch(i){case n:t=(r-o)/s+(r=1?ue(e,t,n):"rgba("+G(e,t,n)+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ue(e.hue,e.saturation,e.lightness):"rgba("+G(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}function ce(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return re("#"+oe(e)+oe(t)+oe(n));if("object"==typeof e&&void 0===t&&void 0===n)return re("#"+oe(e.red)+oe(e.green)+oe(e.blue));throw new Error("Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).")}function fe(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var o=te(e);return"rgba("+o.red+","+o.green+","+o.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?ce(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?ce(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).")}var pe=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&("number"!=typeof e.alpha||void 0===e.alpha)},de=function(e){return"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},he=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&("number"!=typeof e.alpha||void 0===e.alpha)},ve=function(e){return"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},ye="Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.";function ge(e){if("object"!=typeof e)throw new Error(ye);if(de(e))return fe(e);if(pe(e))return ce(e);if(ve(e))return le(e);if(he(e))return se(e);throw new Error(ye)}function me(e){return function e(t,n,r){return function(){var o=r.concat(Array.prototype.slice.call(arguments));return o.length>=n?t.apply(this,o):e(t,n,o)}}(e,e.length,[])}function be(e,t){var n=ne(t);return ge(Object(r.a)({},n,{hue:(n.hue+parseFloat(e))%360}))}var _e=me(be);function we(e){var t=ne(e);return ge(Object(r.a)({},t,{hue:(t.hue+180)%360}))}function xe(e,t,n){return Math.max(e,Math.min(t,n))}function Oe(e,t){var n=ne(t);return ge(Object(r.a)({},n,{lightness:xe(0,1,n.lightness-parseFloat(e))}))}var Ee=me(Oe);function ke(e,t){var n=ne(t);return ge(Object(r.a)({},n,{saturation:xe(0,1,n.saturation-parseFloat(e))}))}var Se=me(ke);function Te(e){var t=te(e),n=Object.keys(t).map(function(e){var n=t[e]/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}),r=n[0],o=n[1],i=n[2];return parseFloat((.2126*r+.7152*o+.0722*i).toFixed(3))}function je(e){return ge(Object(r.a)({},ne(e),{saturation:0}))}function Ce(e){var t=te(e);return ge(Object(r.a)({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))}function Pe(e,t){var n=ne(t);return ge(Object(r.a)({},n,{lightness:xe(0,1,n.lightness+parseFloat(e))}))}var Ae=me(Pe);function Me(e,t,n){var o=te(t),i=Object(r.a)({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),a=te(n),u=Object(r.a)({},a,{alpha:"number"==typeof a.alpha?a.alpha:1}),s=i.alpha-u.alpha,l=2*parseFloat(e)-1,c=((l*s==-1?l:l+s)/(1+l*s)+1)/2,f=1-c;return fe({red:Math.floor(i.red*c+u.red*f),green:Math.floor(i.green*c+u.green*f),blue:Math.floor(i.blue*c+u.blue*f),alpha:i.alpha+(u.alpha-i.alpha)*(parseFloat(e)/1)})}var Re=me(Me);function Ie(e,t){var n=te(t),o="number"==typeof n.alpha?n.alpha:1;return fe(Object(r.a)({},n,{alpha:xe(0,1,(100*o+100*parseFloat(e))/100)}))}var Ne=me(Ie);function De(e){return Te(e)>.179?"#000":"#fff"}function Fe(e,t){var n=ne(t);return ge(Object(r.a)({},n,{saturation:xe(0,1,n.saturation+parseFloat(e))}))}var Le=me(Fe);function ze(e,t){return ge(Object(r.a)({},ne(t),{hue:parseFloat(e)}))}var Be=me(ze);function He(e,t){return ge(Object(r.a)({},ne(t),{lightness:parseFloat(e)}))}var Ue=me(He);function We(e,t){return ge(Object(r.a)({},ne(t),{saturation:parseFloat(e)}))}var Ve=me(We);function Ge(e,t){return Re(parseFloat(e),"rgb(0, 0, 0)",t)}var Ke=me(Ge);function $e(e,t){return Re(parseFloat(e),"rgb(255, 255, 255)",t)}var qe=me($e);function Ye(e,t){var n=te(t),o="number"==typeof n.alpha?n.alpha:1;return fe(Object(r.a)({},n,{alpha:xe(0,1,(100*o-100*parseFloat(e))/100)}))}var Xe=me(Ye);function Qe(){for(var e=arguments.length,t=new Array(e),n=0;n8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:t.map(function(e){if(r&&!Array.isArray(e)||!r&&Array.isArray(e))throw new Error("To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')");if(Array.isArray(e)&&e.length>8)throw new Error("The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation");return Array.isArray(e)?e.join(" "):e}).join(", ")}}function Ze(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r=0?((i={})["border"+o(e)+"Width"]=n[0],i["border"+o(e)+"Style"]=n[1],i["border"+o(e)+"Color"]=n[2],i):(n.unshift(e),{borderWidth:n[0],borderStyle:n[1],borderColor:n[2]})}function nt(e,t){var n,r,i=o(e);if(!t&&0!==t)throw new Error("borderRadius expects a radius value as a string or number as the second argument.");if("Top"===i||"Bottom"===i)return(n={})["border"+i+"RightRadius"]=t,n["border"+i+"LeftRadius"]=t,n;if("Left"===i||"Right"===i)return(r={})["borderTop"+i+"Radius"]=t,r["borderBottom"+i+"Radius"]=t,r;throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function rt(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),o=1;o=0)return Object(r.a)({position:e},u.apply(void 0,[""].concat(n)));var i=e;return u.apply(void 0,["",i].concat(n))}function ht(e,t){return void 0===t&&(t=e),{height:e,width:t}}var vt=[void 0,null,"active","focus","hover"];function yt(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function gt(){for(var e=arguments.length,t=new Array(e),n=0;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102u.charCodeAt(0)&&(u=u.trim()),u=[u],0d)&&(z=(U=U.replace(" ",":")).length),0=4;)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),((r^=r>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(169);n.d(t,"a",function(){return d});var a=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=Object(i.a)(function(e){return e.replace(a,"-$&").toLowerCase()}),l=function(e,t){if(null==t||"boolean"==typeof t)return"";switch(e){case"animation":case"animationName":"string"==typeof t&&(t=t.replace(u,function(e,t,n){return f={name:t,styles:n,next:f},t}))}return 1!==o[e]&&45!==e.charCodeAt(1)&&"number"==typeof t&&0!==t?t+"px":t};function c(e,t,n,r){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return f={name:n.name,styles:n.styles,next:f},n.name;if(void 0!==n.styles){var o=n.next;if(void 0!==o)for(;void 0!==o;)f={name:o.name,styles:o.styles,next:f},o=o.next;return n.styles}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(79);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(14),o=n(263)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(83),o=n(271),i=n(196),a=Object.defineProperty;t.f=n(84)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(53)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(276)),i=a(n(544));function a(e){return e&&e.__esModule?e:{default:e}}var u=Object.keys(o).reduce(function(e,t){return e[t]=(0,i.default)(o[t]),e},{});t.default=function(e,t){return"string"==typeof t?u[t][e]:"object"===(void 0===t?"undefined":(0,r.default)(t))?(0,i.default)(t)[e]:u.chromeLight[e]}},function(e,t,n){"use strict";var r=n(309)(!0);n(264)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(75),o=n(14),i=n(63),a=n(310),u=n(311),s=n(62),l=n(626),c=n(312);o(o.S+o.F*!n(313)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,f,p=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,m=c(p);if(y&&(v=r(v,h>2?arguments[2]:void 0,2)),null==m||d==Array&&u(m))for(n=new d(t=s(p.length));t>g;g++)l(n,g,y?v(p[g],g):p[g]);else for(f=m.call(p),n=new d;!(o=f.next()).done;g++)l(n,g,y?a(f,v,[o.value,g],!0):o.value);return n.length=g,n}})},function(e,t,n){var r=n(329),o=n(658),i=n(716),a=n(36);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";var r=n(14),o=n(116)(5),i=!0;"find"in[]&&Array(1).find(function(){i=!1}),r(r.P+r.F*i,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(145)("find")},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(234)),r(n(839))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,u=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?u="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(u="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==u){var s=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+s+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==u?"\n "+u:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";(function(t){var r=t.Symbol,o=n(413);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}}).call(this,n(17))},function(e,t,n){var r=n(96);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(257),o=n(183);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(138),o=n(79);e.exports=function(e){return r(o(e))}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r=n(32);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(14),o=n(116)(2);r(r.P+r.F*!n(80)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(65),o=n(40),i=n(195),a=n(99),u=n(85),s=function(e,t,n){var l,c,f,p=e&s.F,d=e&s.G,h=e&s.S,v=e&s.P,y=e&s.B,g=e&s.W,m=d?o:o[t]||(o[t]={}),b=m.prototype,_=d?r:h?r[t]:(r[t]||{}).prototype;for(l in d&&(n=t),n)(c=!p&&_&&void 0!==_[l])&&u(m,l)||(f=c?_[l]:n[l],m[l]=d&&"function"!=typeof _[l]?n[l]:y&&c?i(f,r):g&&_[l]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((m.virtual||(m.virtual={}))[l]=f,e&s.R&&b&&!b[l]&&a(b,l,f)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){var r=n(100);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(119)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(277),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n1?arguments[1]:void 0)}}),n(145)("includes")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Consumer=t.Provider=void 0,n(16),n(68),n(69),n(105),n(106),n(13),n(5),n(29),n(2),n(19),n(20),n(98),n(9),n(10),n(8),n(12),n(6),n(21);var r=m(n(0)),o=g(n(1)),i=m(n(103)),a=g(n(847)),u=g(n(848)),s=g(n(852)),l=g(n(855)),c=g(n(856)),f=g(n(857)),p=g(n(858)),d=g(n(237)),h=g(n(860)),v=g(n(861)),y=g(n(862));function g(e){return e&&e.__esModule?e:{default:e}}function m(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function w(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1?arguments[1]:void 0)}})},function(e,t,n){"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,u=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;sw;w++)if((p||w in m)&&(y=b(v=m[w],w,g),e))if(n)x[w]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return w;case 2:x.push(v)}else if(c)return!1;return f?-1:l||c?c:x}}},function(e,t){e.exports={}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.color={primary:"#FF4785",secondary:"#1EA7FD",tertiary:"#FAFBFC",ancillary:"#22a699",orange:"#FC521F",gold:"#FFAE00",green:"#66BF3C",seafoam:"#37D5D3",purple:"#6F2CAC",ultraviolet:"#2A0481",lightest:"#FFFFFF",lighter:"#F8F8F8",light:"#F3F3F3",mediumlight:"#EEEEEE",medium:"#DDDDDD",mediumdark:"#999999",dark:"#666666",darker:"#444444",darkest:"#333333",border:"rgba(0,0,0,.1)",positive:"#66BF3C",negative:"#FF4400",warning:"#E69D00",defaultText:"#333333",inverseText:"#FFFFFF"},t.background={app:"#F6F9FC",content:t.color.lightest,hoverable:"rgba(0,0,0,.05)",positive:"#E1FFD4",negative:"#FEDED2",warning:"#FFF5CF"},t.typography={fonts:{base:['"Nunito Sans"',"-apple-system",'".SFNSText-Regular"','"San Francisco"',"BlinkMacSystemFont",'"Segoe UI"','"Helvetica Neue"',"Helvetica","Arial","sans-serif"].join(", "),mono:['"Operator Mono"','"Fira Code Retina"','"Fira Code"','"FiraCode-Retina"','"Andale Mono"','"Lucida Console"',"Consolas","Monaco","monospace"].join(", ")},weight:{regular:400,bold:700,black:900},size:{s1:12,s2:14,s3:16,m1:20,m2:24,m3:28,l1:32,l2:40,l3:48,code:90}}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=n(212),o=n(299),i=n(300);e.exports=function(e){var t,n,a=e.space,u=e.mustUseProperty||[],s=e.attributes||{},l=e.properties,c=e.transform,f={},p={};for(t in l)n=new i(t,c(s,t),l[t],a),-1!==u.indexOf(t)&&(n.mustUseProperty=!0),f[t]=n,p[r(t)]=t,p[r(n.attribute)]=t;return new o(f,p,a)}},function(e,t,n){var r=n(47).Symbol;e.exports=r},function(e,t,n){var r=n(325),o=n(656),i=n(104);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(344),o=n(231);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var u=-1,s=t.length;++ui;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){g.call(s,function(){var t,n,r,o=e._v,i=N(e);if(i&&(t=_(function(){j?E.emit("unhandledRejection",o,e):(n=s.onunhandledrejection)?n({promise:e,reason:o}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=j||N(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},D=function(e){g.call(s,function(){var t;j?E.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},F=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),R(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw O("Promise can't be resolved itself");(t=M(e))?m(function(){var r={_w:n,_d:!1};try{t.call(e,l(L,r,1),l(F,r,1))}catch(e){F.call(r,e)}}):(n._v=e,n._s=1,R(n,!1))}catch(e){F.call({_w:n,_d:!1},e)}}};A||(T=function(e){h(this,T,"Promise","_h"),d(e),r.call(this);try{e(l(L,this,1),l(F,this,1))}catch(e){F.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(823)(T.prototype,{then:function(e,t){var n=P(y(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=j?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=l(L,e,1),this.reject=l(F,e,1)},b.f=P=function(e){return e===T||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!A,{Promise:T}),n(137)(T,"Promise"),n(824)("Promise"),a=n(60).Promise,f(f.S+f.F*!A,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(u||!A),"Promise",{resolve:function(e){return x(u&&this===a?T:this,e)}}),f(f.S+f.F*!(A&&n(313)(function(e){T.all(e).catch(C)})),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;v(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,o=_(function(){v(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},function(e,t,n){var r=n(14),o=n(263)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var a=0;a1)for(var n=1;n= 0");var n=this.ToLength(t);if(!this.SameValueZero(t,n))throw new RangeError("index must be >= 0 and < 2 ** 53 - 1");return n}});delete i.EnumerableOwnNames,e.exports=i},function(e,t,n){var r=n(39);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(60),o=n(30),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(114)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(38).f,o=n(59),i=n(26)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(78);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(31),o=n(258),i=n(183),a=n(182)("IE_PROTO"),u=function(){},s=function(){var e,t=n(179)("iframe"),r=i.length;for(t.style.display="none",n(259).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("