├── .Rbuildignore ├── .babelrc ├── .builderrc ├── .eslintrc ├── .gitignore ├── .npmignore ├── CHANGELOG.md ├── DESCRIPTION ├── LICENSE ├── LICENSE.txt ├── MANIFEST.in ├── NAMESPACE ├── Procfile ├── R ├── dashColorscales.R └── internal.R ├── README.md ├── dash_colorscales ├── __init__.py └── version.py ├── demo ├── Demo.react.js ├── index.html └── index.js ├── inst └── deps │ └── dashcolorscales.js ├── man └── dashColorscales.Rd ├── package.json ├── requirements.txt ├── screenshot.png ├── setup.py ├── src ├── components │ ├── DashColorscales.react.js │ └── __tests__ │ │ ├── .eslintrc │ │ └── ExampleComponent.test.js └── index.js ├── test └── main.js └── usage.py /.Rbuildignore: -------------------------------------------------------------------------------- 1 | # ignore JS config files/folders 2 | node_modules/ 3 | coverage/ 4 | src/ 5 | lib/ 6 | .babelrc 7 | .builderrc 8 | .eslintrc 9 | .npmignore 10 | 11 | # demo folder has special meaning in R 12 | # this should hopefully make it still 13 | # allow for the possibility to make R demos 14 | demo/.*\.js 15 | demo/.*\.html 16 | demo/.*\.css 17 | 18 | # ignore python files/folders 19 | setup.py 20 | usage.py 21 | setup.py 22 | requirements.txt 23 | MANIFEST.in 24 | CHANGELOG.md 25 | test/ 26 | # CRAN has weird LICENSE requirements 27 | LICENSE.txt 28 | ^.*\.Rproj$ 29 | ^\.Rproj\.user$ 30 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/dash-components-archetype/config/babel/babelrc" 3 | } -------------------------------------------------------------------------------- /.builderrc: -------------------------------------------------------------------------------- 1 | --- 2 | archetypes: 3 | - dash-components-archetype 4 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | extends: ./node_modules/dash-components-archetype/config/eslint/eslintrc-react.json 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | .env 3 | build/ 4 | coverage/ 5 | dist/ 6 | lib/ 7 | lib/bundle.js* 8 | node_modules/ 9 | dash_colorscales/metadata.json 10 | dash_colorscales/bundle.js* 11 | .npm 12 | vv/ 13 | venv/ 14 | *.pyc 15 | *.egg-info 16 | *.log 17 | .DS_Store 18 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .npm 3 | .git/ 4 | vv/ 5 | venv/ 6 | *.pyc 7 | *.log 8 | .DS_Store 9 | 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log for dash-colorscales 2 | All notable changes to this project will be documented in this file. 3 | This project adheres to [Semantic Versioning](http://semver.org/). 4 | 5 | ## Unreleased 6 | 7 | ### Added 8 | - Feature x 9 | 10 | ### Fixed 11 | - Bug y 12 | 13 | ## 0.0.1 - 2018-01-07 14 | - Initial release 15 | 16 | [Unreleased]: https://github.com/plotly/dash-colorscales/v0.0.1...HEAD 17 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: dashColorscales 2 | Title: Component wrapper for React-Colorscales.js 3 | Version: 0.0.4 4 | Description: Interactive Colorscale Picker UI Component for Dash 5 | Depends: R (>= 3.0.2) 6 | Imports: dash 7 | Suggests: testthat, roxygen2 8 | License: MIT + file LICENSE 9 | URL: https://github.com/plotly/dash-colorscales 10 | BugReports: https://github.com/plotly/dash-colorscales/issues 11 | Encoding: UTF-8 12 | LazyData: true 13 | Author: Jack Parmer [aut] 14 | Maintainer: Jack Parmer 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | LICENSE.txt -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2018 plotly 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include dash_colorscales/bundle.js 2 | include dash_colorscales/bundle.js.map 3 | include dash_colorscales/metadata.json 4 | include README.md 5 | include LICENSE.md 6 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | export(dashColorscales) 2 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn app:server --preload -------------------------------------------------------------------------------- /R/dashColorscales.R: -------------------------------------------------------------------------------- 1 | dashColorscales <- function(id=NULL, colorscale=NULL, nSwatches=NULL, fixSwatches=NULL) { 2 | 3 | props <- list(id=id, colorscale=colorscale, nSwatches=nSwatches, fixSwatches=fixSwatches) 4 | if (length(props) > 0) { 5 | props <- props[!vapply(props, is.null, logical(1))] 6 | } 7 | 8 | component <- list( 9 | props = props, 10 | type = 'DashColorscales', 11 | namespace = 'dash_colorscales', 12 | propNames = c('id', 'colorscale', 'nSwatches', 'fixSwatches'), 13 | package = 'dashColorscales' 14 | ) 15 | 16 | structure(component, class = c('dash_component', 'list')) 17 | } 18 | -------------------------------------------------------------------------------- /R/internal.R: -------------------------------------------------------------------------------- 1 | .dashColorscales_js_metadata <- function() { 2 | deps_metadata <- list(`dash_colorscales` = structure(list(name = "dash_colorscales", 3 | version = "0.0.4", src = list(href = NULL, 4 | file = "deps"), meta = NULL, 5 | script = "dashcolorscales.js", 6 | stylesheet = NULL, head = NULL, attachment = NULL, package = "dashColorscales", 7 | all_files = FALSE), class = "html_dependency")) 8 | return(deps_metadata) 9 | } 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dash-colorscales 🌈 2 | 3 | Add a fancy colorscale picker to your Dash apps. `DashColorscales` wraps [react-colorscales](https://github.com/plotly/react-colorscales) for use in Dash. 4 | 5 | 👉 [Simple demo](http://react-colorscales.getforge.io/) 6 | 7 | 👉 [Advanced demo](https://opioid-epidemic.herokuapp.com/) [(code)](https://github.com/plotly/dash-opioid-epidemic-demo) 8 | 9 | ![dash-colorscales](screenshot.png) 10 | 11 | ## Dash 12 | 13 | Go to this link to learn about [Dash](https://plot.ly/dash/). 14 | 15 | ## Getting started 16 | 17 | ```sh 18 | pip install dash_colorscales 19 | ``` 20 | 21 | ## Usage 22 | 23 | ``` 24 | import dash_colorscales 25 | import dash 26 | import dash_html_components as html 27 | import json 28 | 29 | app = dash.Dash('') 30 | 31 | app.scripts.config.serve_locally = True 32 | 33 | app.layout = html.Div([ 34 | dash_colorscales.DashColorscales( 35 | id='colorscale-picker', 36 | nSwatches=7, 37 | fixSwatches=True 38 | ), 39 | html.P(id='output', children='') 40 | ]) 41 | 42 | @app.callback( 43 | dash.dependencies.Output('output', 'children'), 44 | [dash.dependencies.Input('colorscale-picker', 'colorscale')]) 45 | def display_output(colorscale): 46 | return json.dumps(colorscale) 47 | 48 | if __name__ == '__main__': 49 | app.run_server(debug=True) 50 | ``` 51 | 52 | ## API 53 | 54 | The `DashColorscales` component accepts these optional properties: 55 | 56 | | `prop` | Description | 57 | | -------------- | -------------------------------------------------------------------------------------------- | 58 | | `id` | Optional: Identifier used to reference component in callbacks | 59 | | `colorscale` | Optional: Default colorscale as an array of color strings (HEX or RGB). Defaults to viridis. | 60 | | `nSwatches` | Optional: Number of discrete colors or "swatches" in the default color scale. | 61 | | `fixSwatches` | Optional: If set to `True`, hides the swatches slider and fixes swatches to `nSwatches`. | 62 | 63 | -------------------------------------------------------------------------------- /dash_colorscales/__init__.py: -------------------------------------------------------------------------------- 1 | import os as _os 2 | import dash as _dash 3 | import sys as _sys 4 | from .version import __version__ 5 | 6 | _current_path = _os.path.dirname(_os.path.abspath(__file__)) 7 | 8 | _components = _dash.development.component_loader.load_components( 9 | _os.path.join(_current_path, 'metadata.json'), 10 | 'dash_colorscales' 11 | ) 12 | 13 | _this_module = _sys.modules[__name__] 14 | 15 | 16 | _js_dist = [ 17 | { 18 | "relative_package_path": "bundle.js", 19 | "external_url": ( 20 | "https://unpkg.com/dash-colorscales@{}" 21 | "/dash_colorscales/bundle.js" 22 | ).format(__version__), 23 | "namespace": "dash_colorscales" 24 | } 25 | ] 26 | 27 | _css_dist = [] 28 | 29 | 30 | for _component in _components: 31 | setattr(_this_module, _component.__name__, _component) 32 | setattr(_component, '_js_dist', _js_dist) 33 | setattr(_component, '_css_dist', _css_dist) 34 | -------------------------------------------------------------------------------- /dash_colorscales/version.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.0.4' 2 | -------------------------------------------------------------------------------- /demo/Demo.react.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | import {ExampleComponent} from '../src'; 3 | 4 | class Demo extends Component { 5 | constructor() { 6 | super(); 7 | this.state = { 8 | value: '' 9 | } 10 | } 11 | 12 | render() { 13 | return ( 14 |
15 |

dash-colorscales Demo

16 | 17 |
18 |

ExampleComponent

19 | this.setState({value: newProps.value})} 23 | /> 24 |
25 |
26 | ); 27 | } 28 | } 29 | 30 | export default Demo; 31 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | import Demo from './Demo.react'; 5 | 6 | // Fix for rendering React externally: 7 | // See https://github.com/gaearon/react-hot-loader/tree/v1.3.1/docs#usage-with-external-react 8 | const rootInstance = ReactDOM.render( 9 | , 10 | document.getElementById('react-demo-entry-point') 11 | ); 12 | 13 | /* eslint-disable */ 14 | require('react-hot-loader/Injection').RootInstanceProvider.injectProvider({ 15 | /* eslint-enable */ 16 | getRootInstances: function () { 17 | // Help React Hot Loader figure out the root component instances on the page: 18 | return [rootInstance]; 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /inst/deps/dashcolorscales.js: -------------------------------------------------------------------------------- 1 | this.dash_colorscales=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.DashColorscales=void 0;var o=n(2),i=r(o);t.DashColorscales=i.default},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1)for(var n=1;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(94),i=r(o),a=n(104),s=r(a),u="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===u(i.default)?function(e){return"undefined"==typeof e?"undefined":u(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":"undefined"==typeof e?"undefined":u(e)}},function(e,t){e.exports={}},function(e,t,n){var r=n(61),o=n(41);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(37);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";(function(t){function n(e,t,n,o,i,a,s,u){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,o,i,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(9))},function(e,t,n){"use strict";(function(t){var n=function(){};"production"!==t.env.NODE_ENV&&(n=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;o0?r:n)(e)}},function(e,t,n){var r=n(40)("keys"),o=n(28);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(12),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){e.exports=!0},function(e,t,n){var r=n(18),o=n(98),i=n(41),a=n(39)("IE_PROTO"),s=function(){},u=function(){var e,t=n(60)("iframe"),r=i.length;for(t.style.display="none",n(99).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(""),e.close(),u=e.F;r--;)delete u.prototype[i[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[a]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(13).f,o=n(15),i=n(8)("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){t.f=n(8)},function(e,t,n){var r=n(12),o=n(3),i=n(43),a=n(46),s=n(13).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(29),o=n(23),i=n(16),a=n(35),s=n(15),u=n(59),c=Object.getOwnPropertyDescriptor;t.f=n(14)?c:function(e,t){if(e=i(e),t=a(t,!0),u)try{return c(e,t)}catch(e){}if(s(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";(function(t){var r=n(49),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r2?n-2:0),o=2;or}function i(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function a(e,t){var n=t.marks,r=t.step,o=t.min,i=Object.keys(n).map(parseFloat);if(null!==r){var a=Math.round((e-o)/r)*r+o;i.push(a)}var s=i.map(function(t){return Math.abs(e-t)});return i[s.indexOf(Math.min.apply(Math,m()(s)))]}function s(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}function u(e,t){return e?t.clientY:t.pageX}function c(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function l(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:n.left+.5*n.width}function f(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function p(e,t){var n=t.step,r=a(e,t);return null===n?r:parseFloat(r.toFixed(s(n)))}function d(e){e.stopPropagation(),e.preventDefault()}function h(e){switch(e.keyCode){case v.a.UP:case v.a.RIGHT:return function(e,t){return e+t.step};case v.a.DOWN:case v.a.LEFT:return function(e,t){return e-t.step};case v.a.END:return function(e,t){return t.max};case v.a.HOME:return function(e,t){return t.min};case v.a.PAGE_UP:return function(e,t){return e+2*t.step};case v.a.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}}t.g=r,t.i=o,t.h=i,t.e=u,t.f=c,t.c=l,t.a=f,t.b=p,t.j=d,t.d=h;var b=n(80),m=n.n(b),g=n(10),v=(n.n(g),n(176))},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=n(0),s=n.n(a),u=n(56),c=function(){function e(e,t){for(var n=0;nthis.props.maxWidth&&(n=this.props.maxWidth/t.length),s.a.createElement("div",{className:"colorscale-block",style:{display:"inline-block",margin:"10px 20px"},onClick:function(){return e.props.onClick(t,e.props.start,e.props.rot)}},s.a.createElement("div",{style:{textAlign:"center",fontWeight:600,fontSize:"12px",color:"#2a3f5f",marginRight:"10px",marginTop:"4px",verticalAlign:"top",display:"inline-block"}},this.props.label||""),t.map(function(e,t){return s.a.createElement("div",{key:t,className:"colorscale-swatch",style:{backgroundColor:e,width:n+"px",height:"20px",margin:"0 auto",display:"inline-block",cursor:"pointer"}})}))}}]),t}(a.Component);t.a=l},function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"p",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return u}),n.d(t,"b",function(){return c}),n.d(t,"e",function(){return l}),n.d(t,"m",function(){return f}),n.d(t,"k",function(){return p}),n.d(t,"g",function(){return d}),n.d(t,"h",function(){return h}),n.d(t,"j",function(){return b}),n.d(t,"n",function(){return m}),n.d(t,"l",function(){return g}),n.d(t,"i",function(){return v}),n.d(t,"f",function(){return y}),n.d(t,"o",function(){return w});var r=n(57),o=n.n(r),i=["sequential","divergent","categorical","cubehelix","cmocean","custom"],a=["divergent","categorical","custom"],s={sequential:"Use sequential colorscales for data that smoothly changes value and has meaningful order.",divergent:"Use divergent colorscales for data that smoothly changes around a centerpoint (such as zero).",categorical:"Use categorical colorscales for data that has distinct groups and a non-meaningful order.",cubehelix:'Cubehelix colorscales are like sequential scales, but have the added benefit of printing clearly in black & white. Adjust the "start" slider to change the scale\'s base color. A cubehelix scale with 0 rotation transitions through a single base color. A scale with non-zero rotation "rotates" through other colors. Change the rotation slightly to add a touch of another color, change it more to create a scale with multiple colors.',cmocean:"cmocean colorscales are a mix of sequential and diverging scales. They were originally developed for oceanography data, but can be applied beautifully to any other type of data as well.",custom:"Select a sequential or categorical colorscale, then set customized breakpoints for it in the text box above. The breakpoints should have meaning to your data. For example, you could color data related to human age by groups in between the years 0, 5, 13, 20, 40, and 70. Click the preview colorscale below when you are satisfied with your breakpoints."},u={sequential:["OrRd","PuBu","BuPu","Oranges","BuGn","YlOrBr","YlGn","Reds","RdPu","Greens","YlGnBu","Purples","GnBu","Greys","YlOrRd","PuRd","Blues","Viridis"],divergent:["Spectral","RdYlGn","RdBu","PiYG","PRGn","RdYlBu","BrBG","RdGy"],categorical:["Accent","Set1","Set3","Dark2","Paired","Pastel1"]},c={turbid:["rgb(232, 245, 171)","rgb(220, 219, 137)","rgb(209, 193, 107)","rgb(199, 168, 83)","rgb(186, 143, 66)","rgb(170, 121, 60)","rgb(151, 103, 58)","rgb(129, 87, 56)","rgb(104, 72, 53)","rgb(80, 59, 46)","rgb(57, 45, 37)","rgb(34, 30, 27)"],thermal:["rgb(3, 35, 51)","rgb(13, 48, 100)","rgb(53, 50, 155)","rgb(93, 62, 153)","rgb(126, 77, 143)","rgb(158, 89, 135)","rgb(193, 100, 121)","rgb(225, 113, 97)","rgb(246, 139, 69)","rgb(251, 173, 60)","rgb(246, 211, 70)","rgb(231, 250, 90)"],haline:["rgb(41, 24, 107)","rgb(42, 35, 160)","rgb(15, 71, 153)","rgb(18, 95, 142)","rgb(38, 116, 137)","rgb(53, 136, 136)","rgb(65, 157, 133)","rgb(81, 178, 124)","rgb(111, 198, 107)","rgb(160, 214, 91)","rgb(212, 225, 112)","rgb(253, 238, 153)"],solar:["rgb(51, 19, 23)","rgb(79, 28, 33)","rgb(108, 36, 36)","rgb(135, 47, 32)","rgb(157, 66, 25)","rgb(174, 88, 20)","rgb(188, 111, 19)","rgb(199, 137, 22)","rgb(209, 164, 32)","rgb(217, 192, 44)","rgb(222, 222, 59)","rgb(224, 253, 74)"],ice:["rgb(3, 5, 18)","rgb(25, 25, 51)","rgb(44, 42, 87)","rgb(58, 60, 125)","rgb(62, 83, 160)","rgb(62, 109, 178)","rgb(72, 134, 187)","rgb(89, 159, 196)","rgb(114, 184, 205)","rgb(149, 207, 216)","rgb(192, 229, 232)","rgb(234, 252, 253)"],gray:["rgb(0, 0, 0)","rgb(16, 16, 16)","rgb(38, 38, 38)","rgb(59, 59, 59)","rgb(81, 80, 80)","rgb(102, 101, 101)","rgb(124, 123, 122)","rgb(146, 146, 145)","rgb(171, 171, 170)","rgb(197, 197, 195)","rgb(224, 224, 223)","rgb(254, 254, 253)"],oxy:["rgb(63, 5, 5)","rgb(101, 6, 13)","rgb(138, 17, 9)","rgb(96, 95, 95)","rgb(119, 118, 118)","rgb(142, 141, 141)","rgb(166, 166, 165)","rgb(193, 192, 191)","rgb(222, 222, 220)","rgb(239, 248, 90)","rgb(230, 210, 41)","rgb(220, 174, 25)"],deep:["rgb(253, 253, 204)","rgb(206, 236, 179)","rgb(156, 219, 165)","rgb(111, 201, 163)","rgb(86, 177, 163)","rgb(76, 153, 160)","rgb(68, 130, 155)","rgb(62, 108, 150)","rgb(62, 82, 143)","rgb(64, 60, 115)","rgb(54, 43, 77)","rgb(39, 26, 44)"],dense:["rgb(230, 240, 240)","rgb(191, 221, 229)","rgb(156, 201, 226)","rgb(129, 180, 227)","rgb(115, 154, 228)","rgb(117, 127, 221)","rgb(120, 100, 202)","rgb(119, 74, 175)","rgb(113, 50, 141)","rgb(100, 31, 104)","rgb(80, 20, 66)","rgb(54, 14, 36)"], 2 | algae:["rgb(214, 249, 207)","rgb(186, 228, 174)","rgb(156, 209, 143)","rgb(124, 191, 115)","rgb(85, 174, 91)","rgb(37, 157, 81)","rgb(7, 138, 78)","rgb(13, 117, 71)","rgb(23, 95, 61)","rgb(25, 75, 49)","rgb(23, 55, 35)","rgb(17, 36, 20)"],matter:["rgb(253, 237, 176)","rgb(250, 205, 145)","rgb(246, 173, 119)","rgb(240, 142, 98)","rgb(231, 109, 84)","rgb(216, 80, 83)","rgb(195, 56, 90)","rgb(168, 40, 96)","rgb(138, 29, 99)","rgb(107, 24, 93)","rgb(76, 21, 80)","rgb(47, 15, 61)"],speed:["rgb(254, 252, 205)","rgb(239, 225, 156)","rgb(221, 201, 106)","rgb(194, 182, 59)","rgb(157, 167, 21)","rgb(116, 153, 5)","rgb(75, 138, 20)","rgb(35, 121, 36)","rgb(11, 100, 44)","rgb(18, 78, 43)","rgb(25, 56, 34)","rgb(23, 35, 18)"],amp:["rgb(241, 236, 236)","rgb(230, 209, 203)","rgb(221, 182, 170)","rgb(213, 156, 137)","rgb(205, 129, 103)","rgb(196, 102, 73)","rgb(186, 74, 47)","rgb(172, 44, 36)","rgb(149, 19, 39)","rgb(120, 14, 40)","rgb(89, 13, 31)","rgb(60, 9, 17)"],tempo:["rgb(254, 245, 244)","rgb(222, 224, 210)","rgb(189, 206, 181)","rgb(153, 189, 156)","rgb(110, 173, 138)","rgb(65, 157, 129)","rgb(25, 137, 125)","rgb(18, 116, 117)","rgb(25, 94, 106)","rgb(28, 72, 93)","rgb(25, 51, 80)","rgb(20, 29, 67)"],phase:["rgb(167, 119, 12)","rgb(197, 96, 51)","rgb(217, 67, 96)","rgb(221, 38, 163)","rgb(196, 59, 224)","rgb(153, 97, 244)","rgb(95, 127, 228)","rgb(40, 144, 183)","rgb(15, 151, 136)","rgb(39, 153, 79)","rgb(119, 141, 17)","rgb(167, 119, 12)"],balance:["rgb(23, 28, 66)","rgb(41, 58, 143)","rgb(11, 102, 189)","rgb(69, 144, 185)","rgb(142, 181, 194)","rgb(210, 216, 219)","rgb(230, 210, 204)","rgb(213, 157, 137)","rgb(196, 101, 72)","rgb(172, 43, 36)","rgb(120, 14, 40)","rgb(60, 9, 17)"],delta:["rgb(16, 31, 63)","rgb(38, 62, 144)","rgb(30, 110, 161)","rgb(60, 154, 171)","rgb(140, 193, 186)","rgb(217, 229, 218)","rgb(239, 226, 156)","rgb(195, 182, 59)","rgb(115, 152, 5)","rgb(34, 120, 36)","rgb(18, 78, 43)","rgb(23, 35, 18)"],curl:["rgb(20, 29, 67)","rgb(28, 72, 93)","rgb(18, 115, 117)","rgb(63, 156, 129)","rgb(153, 189, 156)","rgb(223, 225, 211)","rgb(241, 218, 206)","rgb(224, 160, 137)","rgb(203, 101, 99)","rgb(164, 54, 96)","rgb(111, 23, 91)","rgb(51, 13, 53)"]},l=[{start:300,rotations:-1.5},{start:0,rotations:-.4},{start:0,rotations:-.1},{start:100,rotations:.4},{start:200,rotations:-.1},{start:200,rotations:-.4},{start:200,rotations:.4},{start:300,rotations:-.1}],f=300,p=-1.5,d=1,h=[.85,.15],b=10,m=6,g=o.a.scale(["#fafa6e","#2A4858"]).mode("lch").colors(m),v=4,y=[0,1],w=20},function(e,t,n){(function(e){var n,r;(function(){var o,i,a,s,u,c,l,f,p,d,h,b,m,g,v,y,w,x,E,k,O,C,_,T,N,P,S,M,j,A,D,R,L,V,I,B,U,F,W,H,z,Y,K,G,q,X,Z,$,J,Q,ee,te,ne,re,oe,ie,ae,se,ue,ce,le,fe,pe,de,he,be,ge,ve,ye,we,xe,Ee,ke,Oe,Ce,_e,Te,Ne,Pe,Se=[].slice;Ce=function(){var e,t,n,r,o;for(e={},o="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),r=0,t=o.length;rn&&(e=n),e},_e=function(e){return e.length>=3?[].slice.call(e):e[0]},k=function(e){var t,n;for(e._clipped=!1,e._unclipped=e.slice(0),t=n=0;n<3;t=++n)t<3?((e[t]<0||e[t]>255)&&(e._clipped=!0),e[t]<0&&(e[t]=0),e[t]>255&&(e[t]=255)):3===t&&(e[t]<0&&(e[t]=0),e[t]>1&&(e[t]=1));return e._clipped||delete e._unclipped,e},s=Math.PI,we=Math.round,C=Math.cos,S=Math.floor,re=Math.pow,X=Math.log,Ee=Math.sin,ke=Math.sqrt,m=Math.atan2,J=Math.max,b=Math.abs,l=2*s,u=s/3,i=s/180,c=180/s,E=function(){return arguments[0]instanceof o?arguments[0]:function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,arguments,function(){})},h=[],"undefined"!=typeof e&&null!==e&&null!=e.exports&&(e.exports=E),n=[],void 0!==(r=function(){return E}.apply(t,n))&&(e.exports=r),E.version="1.3.4",d={},f=[],p=!1,o=function(){function e(){var e,t,n,r,o,i,a,s,u;for(i=this,t=[],s=0,r=arguments.length;s3?t[3]:1]},Pe=function(e){return 255*(e<=.00304?12.92*e:1.055*re(e,1/2.4)-.055)},z=function(e){return e>a.t1?e*e*e:a.t2*(e-a.t0)},a={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},fe=function(){var e,t,n,r,o,i,a,s;return r=_e(arguments),n=r[0],t=r[1],e=r[2],o=ge(n,t,e),i=o[0],a=o[1],s=o[2],[116*a-16,500*(i-a),200*(a-s)]},ve=function(e){return(e/=255)<=.04045?e/12.92:re((e+.055)/1.055,2.4)},Ne=function(e){return e>a.t3?re(e,1/3):e/a.t2+a.t0},ge=function(){var e,t,n,r,o,i,s;return r=_e(arguments),n=r[0],t=r[1],e=r[2],n=ve(n),t=ve(t),e=ve(e),o=Ne((.4124564*n+.3575761*t+.1804375*e)/a.Xn),i=Ne((.2126729*n+.7151522*t+.072175*e)/a.Yn),s=Ne((.0193339*n+.119192*t+.9503041*e)/a.Zn),[o,i,s]},E.lab=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["lab"]),function(){})},d.lab=H,o.prototype.lab=function(){return fe(this._rgb)},g=function(e){var t,n,r,o,i,a,s,u,c,l,f;return e=function(){var t,n,r;for(r=[],n=0,t=e.length;n=360;)n-=360;h[l]=n}return E(h,t).alpha(r/f)},d.rgb=function(){var e,t,n,r;t=_e(arguments),n=[];for(e in t)r=t[e],n.push(r);return n},E.rgb=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["rgb"]),function(){})},o.prototype.rgb=function(e){return null==e&&(e=!0),e?this._rgb.map(Math.round).slice(0,3):this._rgb.slice(0,3)},o.prototype.rgba=function(e){return null==e&&(e=!0),e?[Math.round(this._rgb[0]),Math.round(this._rgb[1]),Math.round(this._rgb[2]),this._rgb[3]]:this._rgb.slice(0)},f.push({p:3,test:function(e){var t;return t=_e(arguments),"array"===Ce(t)&&3===t.length?"rgb":4===t.length&&"number"===Ce(t[3])&&t[3]>=0&&t[3]<=1?"rgb":void 0}}),j=function(e){var t,n,r,o,i,a;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return 4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),a=parseInt(e,16),o=a>>16,r=a>>8&255,n=255&a,[o,r,n,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return 9===e.length&&(e=e.substr(1)),a=parseInt(e,16),o=a>>24&255,r=a>>16&255,n=a>>8&255,t=we((255&a)/255*100)/100,[o,r,n,t];if(null!=d.css&&(i=d.css(e)))return i;throw"unknown color: "+e},se=function(e,t){var n,r,o,i,a,s,u;return null==t&&(t="rgb"),a=e[0],o=e[1],r=e[2],n=e[3],a=Math.round(a),o=Math.round(o),r=Math.round(r),u=a<<16|o<<8|r,s="000000"+u.toString(16),s=s.substr(s.length-6),i="0"+we(255*n).toString(16),i=i.substr(i.length-2),"#"+function(){switch(t.toLowerCase()){case"rgba":return s+i;case"argb":return i+s;default:return s}}()},d.hex=function(e){return j(e)},E.hex=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["hex"]),function(){})},o.prototype.hex=function(e){return null==e&&(e="rgb"),se(this._rgb,e)},f.push({p:4,test:function(e){if(1===arguments.length&&"string"===Ce(e))return"hex"}}),R=function(){var e,t,n,r,o,i,a,s,u,c,l,f,p,d;if(e=_e(arguments),o=e[0],l=e[1],a=e[2],0===l)u=r=t=255*a;else{for(d=[0,0,0],n=[0,0,0],p=a<.5?a*(1+l):a+l-a*l,f=2*a-p,o/=360,d[0]=o+1/3,d[1]=o,d[2]=o-1/3,i=s=0;s<=2;i=++s)d[i]<0&&(d[i]+=1),d[i]>1&&(d[i]-=1),6*d[i]<1?n[i]=f+6*(p-f)*d[i]:2*d[i]<1?n[i]=p:3*d[i]<2?n[i]=f+(p-f)*(2/3-d[i])*6:n[i]=f;c=[we(255*n[0]),we(255*n[1]),we(255*n[2])],u=c[0],r=c[1],t=c[2]}return e.length>3?[u,r,t,e[3]]:[u,r,t]},ce=function(e,t,n){var r,o,i,a,s;return void 0!==e&&e.length>=3&&(a=e,e=a[0],t=a[1],n=a[2]),e/=255,t/=255,n/=255,i=Math.min(e,t,n),J=Math.max(e,t,n),o=(J+i)/2,J===i?(s=0,r=Number.NaN):s=o<.5?(J-i)/(J+i):(J-i)/(2-J-i),e===J?r=(t-n)/(J-i):t===J?r=2+(n-e)/(J-i):n===J&&(r=4+(e-t)/(J-i)),r*=60,r<0&&(r+=360),[r,s,o]},E.hsl=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["hsl"]),function(){})},d.hsl=R,o.prototype.hsl=function(){return ce(this._rgb)},L=function(){var e,t,n,r,o,i,a,s,u,c,l,f,p,d,h,b,m,g;if(e=_e(arguments),o=e[0],b=e[1],g=e[2],g*=255,0===b)u=r=t=g;else switch(360===o&&(o=0),o>360&&(o-=360),o<0&&(o+=360),o/=60,i=S(o),n=o-i,a=g*(1-b),s=g*(1-b*n),m=g*(1-b*(1-n)),i){case 0:c=[g,m,a],u=c[0],r=c[1],t=c[2];break;case 1:l=[s,g,a],u=l[0],r=l[1],t=l[2];break;case 2:f=[a,g,m],u=f[0],r=f[1],t=f[2];break;case 3:p=[a,s,g],u=p[0],r=p[1],t=p[2];break;case 4:d=[m,a,g],u=d[0],r=d[1],t=d[2];break;case 5:h=[g,a,s],u=h[0],r=h[1],t=h[2]}return[u,r,t,e.length>3?e[3]:1]},le=function(){var e,t,n,r,o,i,a,s,u;return a=_e(arguments),i=a[0],n=a[1],e=a[2],o=Math.min(i,n,e),J=Math.max(i,n,e),t=J-o,u=J/255,0===J?(r=Number.NaN,s=0):(s=t/J,i===J&&(r=(n-e)/t),n===J&&(r=2+(e-i)/t),e===J&&(r=4+(i-n)/t),(r*=60)<0&&(r+=360)),[r,s,u]},E.hsv=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["hsv"]),function(){})},d.hsv=L,o.prototype.hsv=function(){return le(this._rgb)},te=function(e){var t,n,r;return"number"===Ce(e)&&e>=0&&e<=16777215?(r=e>>16,n=e>>8&255,t=255&e,[r,n,t,1]):(console.warn("unknown num color: "+e),[0,0,0,1])},he=function(){var e,t,n,r;return r=_e(arguments),n=r[0],t=r[1],e=r[2],(n<<16)+(t<<8)+e},E.num=function(e){return new o(e,"num")},o.prototype.num=function(e){return null==e&&(e="rgb"),he(this._rgb,e)},d.num=te,f.push({p:1,test:function(e){if(1===arguments.length&&"number"===Ce(e)&&e>=0&&e<=16777215)return"num"}}),M=function(){var e,t,n,r,o,i,a,s,u,c,l,f,p,d,h,b,m,g,v,y;if(n=_e(arguments),s=n[0],o=n[1],t=n[2],o/=100,a=a/100*255,e=255*o,0===o)f=a=r=t;else switch(360===s&&(s=0),s>360&&(s-=360),s<0&&(s+=360),s/=60,u=S(s),i=s-u,c=t*(1-o),l=c+e*(1-i),v=c+e*i,y=c+e,u){case 0:p=[y,v,c],f=p[0],a=p[1],r=p[2];break;case 1:d=[l,y,c],f=d[0],a=d[1],r=d[2];break;case 2:h=[c,y,v],f=h[0],a=h[1],r=h[2];break;case 3:b=[c,l,y],f=b[0],a=b[1],r=b[2];break;case 4:m=[v,c,y],f=m[0],a=m[1],r=m[2];break;case 5:g=[y,c,l],f=g[0],a=g[1],r=g[2]}return[f,a,r,n.length>3?n[3]:1]},ae=function(){var e,t,n,r,o,i,a,s,u;return u=_e(arguments),s=u[0],o=u[1],t=u[2],a=Math.min(s,o,t),J=Math.max(s,o,t),r=J-a,n=100*r/255,e=a/(255-r)*100,0===r?i=Number.NaN:(s===J&&(i=(o-t)/r),o===J&&(i=2+(t-s)/r),t===J&&(i=4+(s-o)/r),(i*=60)<0&&(i+=360)),[i,n,e]},E.hcg=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["hcg"]),function(){})},d.hcg=M,o.prototype.hcg=function(){return ae(this._rgb)},_=function(e){var t,n,r,o,i,a,s,u;if(e=e.toLowerCase(),null!=E.colors&&E.colors[e])return j(E.colors[e]);if(i=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(s=i.slice(1,4),o=a=0;a<=2;o=++a)s[o]=+s[o];s[3]=1}else if(i=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(s=i.slice(1,5),o=u=0;u<=3;o=++u)s[o]=+s[o];else if(i=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(s=i.slice(1,4),o=t=0;t<=2;o=++t)s[o]=we(2.55*s[o]);s[3]=1}else if(i=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(s=i.slice(1,5),o=n=0;n<=2;o=++n)s[o]=we(2.55*s[o]);s[3]=+s[3]}else(i=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(r=i.slice(1,4),r[1]*=.01,r[2]*=.01,s=R(r),s[3]=1):(i=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(r=i.slice(1,4),r[1]*=.01,r[2]*=.01,s=R(r),s[3]=+i[4]);return s},ie=function(e){var t;return t=e[3]<1?"rgba":"rgb","rgb"===t?t+"("+e.slice(0,3).map(we).join(",")+")":"rgba"===t?t+"("+e.slice(0,3).map(we).join(",")+","+e[3]+")":void 0},ye=function(e){return we(100*e)/100},D=function(e,t){var n;return n=t<1?"hsla":"hsl",e[0]=ye(e[0]||0),e[1]=ye(100*e[1])+"%",e[2]=ye(100*e[2])+"%","hsla"===n&&(e[3]=t),n+"("+e.join(",")+")"},d.css=function(e){return _(e)},E.css=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["css"]),function(){})},o.prototype.css=function(e){return null==e&&(e="rgb"),"rgb"===e.slice(0,3)?ie(this._rgb):"hsl"===e.slice(0,3)?D(this.hsl(),this.alpha()):void 0},d.named=function(e){return j(Te[e])},f.push({p:5,test:function(e){if(1===arguments.length&&null!=Te[e])return"named"}}),o.prototype.name=function(e){var t,n;arguments.length&&(Te[e]&&(this._rgb=j(Te[e])),this._rgb[3]=1),t=this.hex();for(n in Te)if(t===Te[n])return n;return t},Y=function(){var e,t,n,r;return r=_e(arguments),n=r[0],e=r[1],t=r[2],t*=i,[n,C(t)*e,Ee(t)*e]},K=function(){var e,t,n,r,o,i,a,s,u,c,l;return n=_e(arguments),s=n[0],o=n[1],a=n[2],c=Y(s,o,a),e=c[0],t=c[1],r=c[2],l=H(e,t,r),u=l[0],i=l[1],r=l[2],[u,i,r,n.length>3?n[3]:1]},W=function(){var e,t,n,r,o,i;return i=_e(arguments),o=i[0],e=i[1],t=i[2],n=ke(e*e+t*t),r=(m(t,e)*c+360)%360,0===we(1e4*n)&&(r=Number.NaN),[o,n,r]},pe=function(){var e,t,n,r,o,i,a;return i=_e(arguments),o=i[0],n=i[1],t=i[2],a=fe(o,n,t),r=a[0],e=a[1],t=a[2],W(r,e,t)},E.lch=function(){var e;return e=_e(arguments),new o(e,"lch")},E.hcl=function(){var e;return e=_e(arguments),new o(e,"hcl")},d.lch=K,d.hcl=function(){var e,t,n,r;return r=_e(arguments),t=r[0],e=r[1],n=r[2],K([n,e,t])},o.prototype.lch=function(){return pe(this._rgb)},o.prototype.hcl=function(){return pe(this._rgb).reverse()},oe=function(e){var t,n,r,o,i,a,s,u,c;return null==e&&(e="rgb"),u=_e(arguments),s=u[0],o=u[1],t=u[2],s/=255,o/=255,t/=255,i=1-Math.max(s,Math.max(o,t)),r=i<1?1/(1-i):0,n=(1-s-i)*r,a=(1-o-i)*r,c=(1-t-i)*r,[n,a,c,i]},O=function(){var e,t,n,r,o,i,a,s,u;return t=_e(arguments),r=t[0],a=t[1],u=t[2],i=t[3],e=t.length>4?t[4]:1,1===i?[0,0,0,e]:(s=r>=1?0:255*(1-r)*(1-i),o=a>=1?0:255*(1-a)*(1-i),n=u>=1?0:255*(1-u)*(1-i),[s,o,n,e])},d.cmyk=function(){return O(_e(arguments))},E.cmyk=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["cmyk"]),function(){})},o.prototype.cmyk=function(){return oe(this._rgb)},d.gl=function(){var e,t,n,r,o;for(r=function(){var e,n;e=_e(arguments),n=[];for(t in e)o=e[t],n.push(o);return n}.apply(this,arguments),e=n=0;n<=2;e=++n)r[e]*=255;return r},E.gl=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["gl"]),function(){})},o.prototype.gl=function(){var e;return e=this._rgb,[e[0]/255,e[1]/255,e[2]/255,e[3]]},de=function(e,t,n){var r;return r=_e(arguments),e=r[0],t=r[1],n=r[2],e=Z(e),t=Z(t),n=Z(n),.2126*e+.7152*t+.0722*n},Z=function(e){return e/=255,e<=.03928?e/12.92:re((e+.055)/1.055,2.4)},h=[],V=function(e,t,n,r){var o,i,a,s;for(null==n&&(n=.5),null==r&&(r="rgb"),"object"!==Ce(e)&&(e=E(e)),"object"!==Ce(t)&&(t=E(t)),a=0,i=h.length;ae?i(n,u):i(u,a)},n=de(this._rgb),this._rgb=(n>e?i(E("black"),this):i(this,E("white"))).rgba()),this):de(this._rgb)},Oe=function(e){var t,n,r,o;return o=e/100,o<66?(r=255,n=-155.25485562709179-.44596950469579133*(n=o-2)+104.49216199393888*X(n),t=o<20?0:.8274096064007395*(t=o-10)-254.76935184120902+115.67994401066147*X(t)):(r=351.97690566805693+.114206453784165*(r=o-55)-40.25366309332127*X(r),n=325.4494125711974+.07943456536662342*(n=o-50)-28.0852963507957*X(n),t=255),[r,n,t]},be=function(){var e,t,n,r,o,i,a,s;for(i=_e(arguments),o=i[0],i[1],e=i[2],r=1e3,n=4e4,t=.4;n-r>t;)s=.5*(n+r),a=Oe(s),a[2]/a[0]>=e/o?n=s:r=s;return we(s)},E.temperature=E.kelvin=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["temperature"]),function(){})},d.temperature=d.kelvin=d.K=Oe,o.prototype.temperature=function(){return be(this._rgb)},o.prototype.kelvin=o.prototype.temperature,E.contrast=function(e,t){var n,r,i,a;return"string"!==(i=Ce(e))&&"number"!==i||(e=new o(e)),"string"!==(a=Ce(t))&&"number"!==a||(t=new o(t)),n=e.luminance(),r=t.luminance(),n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},E.distance=function(e,t,n){var r,i,a,s,u,c,l;null==n&&(n="lab"),"string"!==(u=Ce(e))&&"number"!==u||(e=new o(e)),"string"!==(c=Ce(t))&&"number"!==c||(t=new o(t)),a=e.get(n),s=t.get(n),l=0;for(i in a)r=(a[i]||0)-(s[i]||0),l+=r*r;return Math.sqrt(l)},E.deltaE=function(e,t,n,r){var i,a,u,c,l,f,p,d,h,g,v,y,w,x,E,k,O,_,T,N,P,S,M,j,A,D,R;for(null==n&&(n=1),null==r&&(r=1),"string"!==(O=Ce(e))&&"number"!==O||(e=new o(e)),"string"!==(_=Ce(t))&&"number"!==_||(t=new o(t)),T=e.lab(),i=T[0],u=T[1],l=T[2],N=t.lab(),a=N[0],c=N[1],f=N[2],p=ke(u*u+l*l),d=ke(c*c+f*f),M=i<16?.511:.040975*i/(1+.01765*i),P=.0638*p/(1+.0131*p)+.638,k=p<1e-6?0:180*m(l,u)/s;k<0;)k+=360;for(;k>=360;)k-=360;return j=k>=164&&k<=345?.56+b(.2*C(s*(k+168)/180)):.36+b(.4*C(s*(k+35)/180)),h=p*p*p*p,E=ke(h/(h+1900)),S=P*(E*j+1-E),x=i-a,w=p-d,v=u-c,y=l-f,g=v*v+y*y-w*w,A=x/(n*M),D=w/(r*P),R=S,ke(A*A+D*D+g/(R*R))},o.prototype.get=function(e){var t,n,r,o,i,a;return r=this,i=e.split("."),o=i[0],t=i[1],a=r[o](),t?(n=o.indexOf(t),n>-1?a[n]:console.warn("unknown channel "+t+" in mode "+o)):a},o.prototype.set=function(e,t){var n,r,o,i,a,s;if(o=this,a=e.split("."),i=a[0],n=a[1])if(s=o[i](),(r=i.indexOf(n))>-1)if("string"===Ce(t))switch(t.charAt(0)){case"+":case"-":s[r]+=+t;break;case"*":s[r]*=+t.substr(1);break;case"/":s[r]/=+t.substr(1);break;default:s[r]=+t}else s[r]=t;else console.warn("unknown channel "+n+" in mode "+i);else s=t;return E(s,i).alpha(o.alpha())},o.prototype.clipped=function(){return this._rgb._clipped||!1},o.prototype.alpha=function(e){return arguments.length?E.rgb([this._rgb[0],this._rgb[1],this._rgb[2],e]):this._rgb[3]},o.prototype.darken=function(e){var t,n;return null==e&&(e=1),n=this,t=n.lab(),t[0]-=a.Kn*e,E.lab(t).alpha(n.alpha())},o.prototype.brighten=function(e){return null==e&&(e=1),this.darken(-e)},o.prototype.darker=o.prototype.darken,o.prototype.brighter=o.prototype.brighten,o.prototype.saturate=function(e){var t,n;return null==e&&(e=1),n=this,t=n.lch(),t[1]+=e*a.Kn,t[1]<0&&(t[1]=0),E.lch(t).alpha(n.alpha())},o.prototype.desaturate=function(e){return null==e&&(e=1),this.saturate(-e)},o.prototype.premultiply=function(){var e,t;return t=this.rgb(),e=this.alpha(),E(t[0]*e,t[1]*e,t[2]*e,e)},v=function(e,t,n){if(!v[n])throw"unknown blend mode "+n;return v[n](e,t)},y=function(e){return function(t,n){var r,o;return r=E(n).rgb(),o=E(t).rgb(),E(e(r,o),"rgb")}},P=function(e){return function(t,n){var r,o,i;for(i=[],r=o=0;o<=3;r=++o)i[r]=e(t[r],n[r]);return i}},ee=function(e,t){return e},Q=function(e,t){return e*t/255},T=function(e,t){return e>t?t:e},G=function(e,t){return e>t?e:t},xe=function(e,t){return 255*(1-(1-e/255)*(1-t/255))},ne=function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},x=function(e,t){return 255*(1-(1-t/255)/(e/255))},N=function(e,t){return 255===e?255:(e=t/255*255/(1-e/255),e>255?255:e)},v.normal=y(P(ee)),v.multiply=y(P(Q)),v.screen=y(P(xe)),v.overlay=y(P(ne)),v.darken=y(P(T)),v.lighten=y(P(G)),v.dodge=y(P(N)),v.burn=y(P(x)),E.blend=v,E.analyze=function(e){var t,n,r,o;for(r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},n=0,t=e.length;nr.max&&(r.max=o),r.count+=1);return r.domain=[r.min,r.max],r.limits=function(e,t){return E.limits(r,e,t)},r},E.scale=function(e,t){var n,r,o,i,a,s,u,c,l,f,p,d,h,b,m,g,v,y,w,x;return c="rgb",l=E("#ccc"),h=0,a=[0,1],d=[],p=[0,0],n=!1,o=[],f=!1,u=0,s=1,i=!1,r={},b=!0,w=function(e){var t,n,r,i,a,s;if(null==e&&(e=["#fff","#000"]),null!=e&&"string"===Ce(e)&&null!=E.brewer&&(e=E.brewer[e]||E.brewer[e.toLowerCase()]||e),"array"===Ce(e)){for(e=e.slice(0),t=r=0,i=e.length-1;0<=i?r<=i:r>=i;t=0<=i?++r:--r)n=e[t],"string"===Ce(n)&&(e[t]=E(n));for(d.length=0,t=s=0,a=e.length-1;0<=a?s<=a:s>=a;t=0<=a?++s:--s)d.push(t/(e.length-1))}return y(),o=e},g=function(e){var t,r;if(null!=n){for(r=n.length-1,t=0;t=n[t];)t++;return t-1}return 0},x=function(e){return e},v=function(e,t){var i,a,f,h,m,v,y,w;if(null==t&&(t=!1),isNaN(e))return l;if(t?w=e:n&&n.length>2?(i=g(e),w=i/(n.length-2),w=p[0]+w*(1-p[0]-p[1])):s!==u?(w=(e-u)/(s-u),w=p[0]+w*(1-p[0]-p[1]),w=Math.min(1,Math.max(0,w))):w=1,t||(w=x(w)),h=Math.floor(1e4*w),b&&r[h])a=r[h];else{if("array"===Ce(o))for(f=m=0,y=d.length-1;0<=y?m<=y:m>=y;f=0<=y?++m:--m){if(v=d[f],w<=v){a=o[f];break}if(w>=v&&f===d.length-1){a=o[f];break}if(w>v&&w=l;t=0<=l?++f:--f)d.push(t/(r-1));return a=[u,s],m},m.mode=function(e){return arguments.length?(c=e,y(),m):c},m.range=function(e,t){return w(e,t), 3 | m},m.out=function(e){return f=e,m},m.spread=function(e){return arguments.length?(h=e,m):h},m.correctLightness=function(e){return null==e&&(e=!0),i=e,y(),x=i?function(e){var t,n,r,o,i,a,s,u,c;for(t=v(0,!0).lab()[0],n=v(1,!0).lab()[0],s=t>n,r=v(e,!0).lab()[0],i=t+(n-t)*e,o=r-i,u=0,c=1,a=20;Math.abs(o)>.01&&a-- >0;)!function(){s&&(o*=-1),o<0?(u=e,e+=.5*(c-e)):(c=e,e+=.5*(u-e)),r=v(e,!0).lab()[0],o=r-i}();return e}:function(e){return e},m},m.padding=function(e){return null!=e?("number"===Ce(e)&&(e=[e,e]),p=e,m):p},m.colors=function(t,r){var i,s,u,c,l,f,p,d;if(arguments.length<2&&(r="hex"),l=[],0===arguments.length)l=o.slice(0);else if(1===t)l=[m(.5)];else if(t>1)s=a[0],i=a[1]-s,l=function(){f=[];for(var e=0;0<=t?et;0<=t?e++:e--)f.push(e);return f}.apply(this).map(function(e){return m(s+e/(t-1)*i)});else{if(e=[],p=[],n&&n.length>2)for(u=d=1,c=n.length;1<=c?dc;u=1<=c?++d:--d)p.push(.5*(n[u-1]+n[u]));else p=a;l=p.map(function(e){return m(e)})}return E[r]&&(l=l.map(function(e){return e[r]()})),l},m.cache=function(e){return null!=e?b=e:b},m},null==E.scales&&(E.scales={}),E.scales.cool=function(){return E.scale([E.hsl(180,1,.9),E.hsl(250,.7,.4)])},E.scales.hot=function(){return E.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},E.analyze=function(e,t,n){var r,o,i,a,s,u,c;if(s={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0},null==n&&(n=function(){return!0}),r=function(e){null==e||isNaN(e)||(s.values.push(e),s.sum+=e,es.max&&(s.max=e),s.count+=1)},c=function(e,o){if(n(e,o))return r(null!=t&&"function"===Ce(t)?t(e):null!=t&&"string"===Ce(t)||"number"===Ce(t)?e[t]:e)},"array"===Ce(e))for(a=0,i=e.length;a=U;O=1<=U?++L:--L)T.push(P+O/n*(J-P));T.push(J)}else if("l"===t.substr(0,1)){if(P<=0)throw"Logarithmic scales are only possible for values > 0";for(M=Math.LOG10E*X(P),N=Math.LOG10E*X(J),T.push(P),O=ce=1,F=n-1;1<=F?ce<=F:ce>=F;O=1<=F?++ce:--ce)T.push(re(10,M+O/n*(N-M)));T.push(J)}else if("q"===t.substr(0,1)){for(T.push(P),O=r=1,G=n-1;1<=G?r<=G:r>=G;O=1<=G?++r:--r)V=(ue.length-1)*O/n,I=S(V),I===V?T.push(ue[I]):(B=V-I,T.push(ue[I]*(1-B)+ue[I+1]*B));T.push(J)}else if("k"===t.substr(0,1)){for(A=ue.length,g=new Array(A),x=new Array(n),oe=!0,D=0,y=null,y=[],y.push(P),O=o=1,q=n-1;1<=q?o<=q:o>=q;O=1<=q?++o:--o)y.push(P+O/n*(J-P));for(y.push(J);oe;){for(C=i=0,Z=n-1;0<=Z?i<=Z:i>=Z;C=0<=Z?++i:--i)x[C]=0;for(O=a=0,$=A-1;0<=$?a<=$:a>=$;O=0<=$?++a:--a){for(se=ue[O],j=Number.MAX_VALUE,C=s=0,Q=n-1;0<=Q?s<=Q:s>=Q;C=0<=Q?++s:--s)(k=b(y[C]-se))=ee;C=0<=ee?++u:--u)R[C]=null;for(O=c=0,te=A-1;0<=te?c<=te:c>=te;O=0<=te?++c:--c)w=g[O],null===R[w]?R[w]=ue[O]:R[w]+=ue[O];for(C=l=0,ne=n-1;0<=ne?l<=ne:l>=ne;C=0<=ne?++l:--l)R[C]*=1/x[C];for(oe=!1,C=f=0,W=n-1;0<=W?f<=W:f>=W;C=0<=W?++f:--f)if(R[C]!==y[O]){oe=!0;break}y=R,D++,D>200&&(oe=!1)}for(_={},C=p=0,H=n-1;0<=H?p<=H:p>=H;C=0<=H?++p:--p)_[C]=[];for(O=d=0,z=A-1;0<=z?d<=z:d>=z;O=0<=z?++d:--d)w=g[O],_[w].push(ue[O]);for(ie=[],C=h=0,Y=n-1;0<=Y?h<=Y:h>=Y;C=0<=Y?++h:--h)ie.push(_[C][0]),ie.push(_[C][_[C].length-1]);for(ie=ie.sort(function(e,t){return e-t}),T.push(ie[0]),O=m=1,K=ie.length-1;m<=K;O=m+=2)ae=ie[O],isNaN(ae)||-1!==T.indexOf(ae)||T.push(ae)}return T},A=function(e,t,n){var r,o,i,a;return r=_e(arguments),e=r[0],t=r[1],n=r[2],isNaN(e)&&(e=0),e/=360,e<1/3?(o=(1-t)/3,a=(1+t*C(l*e)/C(u-l*e))/3,i=1-(o+a)):e<2/3?(e-=1/3,a=(1-t)/3,i=(1+t*C(l*e)/C(u-l*e))/3,o=1-(a+i)):(e-=2/3,i=(1-t)/3,o=(1+t*C(l*e)/C(u-l*e))/3,a=1-(i+o)),a=q(n*a*3),i=q(n*i*3),o=q(n*o*3),[255*a,255*i,255*o,r.length>3?r[3]:1]},ue=function(){var e,t,n,r,o,i,a,s;return a=_e(arguments),i=a[0],t=a[1],e=a[2],l=2*Math.PI,i/=255,t/=255,e/=255,o=Math.min(i,t,e),r=(i+t+e)/3,s=1-o/r,0===s?n=0:(n=(i-t+(i-e))/2,n/=Math.sqrt((i-t)*(i-t)+(i-e)*(t-e)),n=Math.acos(n),e>t&&(n=l-n),n/=l),[360*n,s,r]},E.hsi=function(){return function(e,t,n){n.prototype=e.prototype;var r=new n,o=e.apply(r,t);return Object(o)===o?o:r}(o,Se.call(arguments).concat(["hsi"]),function(){})},d.hsi=A,o.prototype.hsi=function(){return ue(this._rgb)},I=function(e,t,n,r){var o,i,a,s,u,c,l,f,p,d,h,b;return"hsl"===r?(h=e.hsl(),b=t.hsl()):"hsv"===r?(h=e.hsv(),b=t.hsv()):"hcg"===r?(h=e.hcg(),b=t.hcg()):"hsi"===r?(h=e.hsi(),b=t.hsi()):"lch"!==r&&"hcl"!==r||(r="hcl",h=e.hcl(),b=t.hcl()),"h"===r.substr(0,1)&&(a=h[0],p=h[1],c=h[2],s=b[0],d=b[1],l=b[2]),isNaN(a)||isNaN(s)?isNaN(a)?isNaN(s)?i=Number.NaN:(i=s,1!==c&&0!==c||"hsv"===r||(f=d)):(i=a,1!==l&&0!==l||"hsv"===r||(f=p)):(o=s>a&&s-a>180?s-(a+360):s180?s+360-a:s-a,i=a+n*o),null==f&&(f=p+n*(d-p)),u=c+n*(l-c),E[r](i,f,u)},h=h.concat(function(){var e,t,n,r;for(n=["hsv","hsl","hsi","hcl","lch","hcg"],r=[],t=0,e=n.length;tu;)r(s,n=t[u++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(36);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(38),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(96)(!0);n(65)(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(43),o=n(11),i=n(66),a=n(17),s=n(15),u=n(26),c=n(97),l=n(45),f=n(67),p=n(8)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,n,b,m,g,v){c(n,t,b);var y,w,x,E=function(e){if(!d&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",O="values"==m,C=!1,_=e.prototype,T=_[p]||_["@@iterator"]||m&&_[m],N=T||E(m),P=m?O?E("entries"):N:void 0,S="Array"==t?_.entries||T:T;if(S&&(x=f(S.call(new e)))!==Object.prototype&&x.next&&(l(x,k,!0),r||s(x,p)||a(x,p,h)),O&&T&&"values"!==T.name&&(C=!0,N=function(){return T.call(this)}),r&&!v||!d&&!C&&_[p]||a(_,p,N),u[t]=N,u[k]=h,m)if(y={values:O?N:E("values"),keys:g?N:E("keys"),entries:P},v)for(w in y)w in _||i(_,w,y[w]);else o(o.P+o.F*(d||C),t,y);return y}},function(e,t,n){e.exports=n(17)},function(e,t,n){var r=n(15),o=n(30),i=n(39)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(61),o=n(41).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){var r=u.default.unstable_batchedUpdates?function(e){u.default.unstable_batchedUpdates(n,e)}:n;return(0,a.default)(e,t,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(70),a=r(i),s=n(10),u=r(s);e.exports=t.default},function(e,t,n){"use strict";function r(e,t,n){function r(t){var r=new i.default(t);n.call(e,r)}return e.addEventListener?(e.addEventListener(t,r,!1),{remove:function(){e.removeEventListener(t,r,!1)}}):e.attachEvent?(e.attachEvent("on"+t,r),{remove:function(){e.detachEvent("on"+t,r)}}):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var o=n(129),i=function(e){return e&&e.__esModule?e:{default:e}}(o);e.exports=t.default},function(e,t,n){e.exports={default:n(132),__esModule:!0}},function(e,t,n){"use strict";function r(e){if(o.a.isWindow(e)||9===e.nodeType)return null;var t=o.a.getDocument(e),n=t.body,r=void 0,i=o.a.css(e,"position");if("fixed"!==i&&"absolute"!==i)return"html"===e.nodeName.toLowerCase()?null:e.parentNode;for(r=e.parentNode;r&&r!==n;r=r.parentNode)if("static"!==(i=o.a.css(r,"position")))return r;return null}var o=n(20);t.a=r},function(e,t){e.exports=function(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n1?(!n&&t&&(r.className+=" "+t),h.a.createElement("div",r)):h.a.Children.only(r.children)}}]),t}(d.Component);g.propTypes={children:m.a.any,className:m.a.string,visible:m.a.bool,hiddenClassName:m.a.string},t.a=g},function(e,t,n){"use strict";function r(e,t){return e[0]===t[0]&&e[1]===t[1]}function o(e,t,n){var r=e[t]||{};return u()({},r,n)}function i(e,t,n){var o=n.points;for(var i in e)if(e.hasOwnProperty(i)&&r(e[i].points,o))return t+"-placement-"+i;return""}function a(e,t){this[e]=t}t.a=o,t.b=i,t.c=a;var s=n(1),u=n.n(s)},function(e,t,n){"use strict";var r=n(1),o=n.n(r),i=n(0),a=n.n(i),s=function(e){var t=e.className,n=e.included,r=e.vertical,i=e.offset,s=e.length,u=e.style,c=r?{bottom:i+"%",height:s+"%"}:{left:i+"%",width:s+"%"},l=o()({visibility:n?"visible":"hidden"},u,c);return a.a.createElement("div",{className:t,style:l})};t.a=s},function(e,t,n){"use strict";(function(e){function r(){}function o(t){var n,o;return o=n=function(t){function n(t){p()(this,n);var r=m()(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,t));if(r.onMouseDown=function(e){if(0===e.button){var t=r.props.vertical,n=A.e(t,e);if(A.g(e,r.handlesRefs)){var o=A.c(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.removeDocumentEvents(),r.onStart(n),r.addDocumentMouseEvents(),A.j(e)}},r.onTouchStart=function(e){if(!A.h(e)){var t=r.props.vertical,n=A.f(t,e);if(A.g(e,r.handlesRefs)){var o=A.c(t,e.target);r.dragOffset=n-o,n=o}else r.dragOffset=0;r.onStart(n),r.addDocumentTouchEvents(),A.j(e)}},r.onFocus=function(e){var t=r.props.vertical;if(A.g(e,r.handlesRefs)){var n=A.c(t,e.target);r.dragOffset=0,r.onStart(n),A.j(e)}},r.onBlur=function(e){r.onEnd(e)},r.onMouseUp=function(){r.onEnd(),r.removeDocumentEvents()},r.onMouseMove=function(e){if(!r.sliderRef)return void r.onEnd();var t=A.e(r.props.vertical,e);r.onMove(e,t-r.dragOffset)},r.onTouchMove=function(e){if(A.h(e)||!r.sliderRef)return void r.onEnd();var t=A.f(r.props.vertical,e);r.onMove(e,t-r.dragOffset)},r.onKeyDown=function(e){r.sliderRef&&A.g(e,r.handlesRefs)&&r.onKeyboard(e)},r.saveSlider=function(e){r.sliderRef=e},"production"!==e.env.NODE_ENV){var o=t.step,i=t.max,a=t.min;P()(!o||Math.floor(o)!==o||(i-a)%o===0,"Slider[max] - Slider[min] (%s) should be a multiple of Slider[step] (%s)",i-a,o)}return r.handlesRefs={},r}return w()(n,t),h()(n,[{key:"componentWillUnmount",value:function(){v()(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"componentWillUnmount",this)&&v()(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"componentDidMount",value:function(){this.document=this.sliderRef.ownerDocument}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=Object(C.a)(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Object(C.a)(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=Object(C.a)(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Object(C.a)(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=e.getBoundingClientRect();return this.props.vertical?t.top:t.left}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,o=t.max,i=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-i)*(o-r)+r:i*(o-r)+r}},{key:"calcValueByPos",value:function(e){var t=e-this.getSliderStart();return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min;return(e-n)/(t.max-n)*100}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,t=this.props,o=t.prefixCls,i=t.className,a=t.marks,s=t.dots,c=t.step,f=t.included,p=t.disabled,d=t.vertical,h=t.min,b=t.max,m=t.children,g=t.maximumTrackStyle,y=t.style,w=t.railStyle,x=t.dotStyle,k=t.activeDotStyle,O=v()(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"render",this).call(this),C=O.tracks,_=O.handles,N=T()(o,(e={},l()(e,o+"-with-marks",Object.keys(a).length),l()(e,o+"-disabled",p),l()(e,o+"-vertical",d),l()(e,i,i),e));return E.a.createElement("div",{ref:this.saveSlider,className:N,onTouchStart:p?r:this.onTouchStart,onMouseDown:p?r:this.onMouseDown,onMouseUp:p?r:this.onMouseUp,onKeyDown:p?r:this.onKeyDown,onFocus:p?r:this.onFocus,onBlur:p?r:this.onBlur,style:y},E.a.createElement("div",{className:o+"-rail",style:u()({},g,w)}),C,E.a.createElement(S.a,{prefixCls:o,vertical:d,marks:a,dots:s,step:c,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:b,min:h,dotStyle:x,activeDotStyle:k}),_,E.a.createElement(M.a,{className:o+"-mark",vertical:d,marks:a,included:f,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:b,min:h}),m)}}]),n}(t),n.displayName="ComponentEnhancer("+t.displayName+")",n.propTypes=u()({},t.propTypes,{min:O.a.number,max:O.a.number,step:O.a.number,marks:O.a.object,included:O.a.bool,className:O.a.string,prefixCls:O.a.string,disabled:O.a.bool,children:O.a.any,onBeforeChange:O.a.func,onChange:O.a.func,onAfterChange:O.a.func,handle:O.a.func,dots:O.a.bool,vertical:O.a.bool,style:O.a.object,minimumTrackStyle:O.a.object,maximumTrackStyle:O.a.object,handleStyle:O.a.oneOfType([O.a.object,O.a.arrayOf(O.a.object)]),trackStyle:O.a.oneOfType([O.a.object,O.a.arrayOf(O.a.object)]),railStyle:O.a.object,dotStyle:O.a.object,activeDotStyle:O.a.object}),n.defaultProps=u()({},t.defaultProps,{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=a()(e,["index"]);return delete n.dragging,E.a.createElement(j.a,u()({},n,{key:t}))},onBeforeChange:r,onChange:r,onAfterChange:r,included:!0,disabled:!1,dots:!1,vertical:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),o}t.a=o;var i=n(24),a=n.n(i),s=n(1),u=n.n(s),c=n(21),l=n.n(c),f=n(4),p=n.n(f),d=n(7),h=n.n(d),b=n(5),m=n.n(b),g=n(157),v=n.n(g),y=n(6),w=n.n(y),x=n(0),E=n.n(x),k=n(2),O=n.n(k),C=n(164),_=n(33),T=n.n(_),N=n(32),P=n.n(N),S=n(165),M=n(166),j=n(53),A=n(54)}).call(t,n(9))},function(e,t,n){var r=n(11),o=n(3),i=n(19);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(167),o=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",c(t,e.attrs),i(e,t),t}function u(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",c(t,e.attrs),i(e,t),t}function c(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function l(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=v++;n=g||(g=s(t)),r=f.bind(null,n,c,!1),o=f.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n,t),o=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),o=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function f(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function p(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=w(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},b=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),m=function(e){var t={};return function(n){if("undefined"==typeof t[n]){var r=e.call(this,n);if(r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[n]=r}return t[n]}}(function(e){return document.querySelector(e)}),g=null,v=0,y=[],w=n(182);e.exports=function(e,t){t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=b()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=o(e,t);return r(n,t),function(e){for(var i=[],a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=n(0),u=n.n(s),c=n(55),l=n(57),f=n.n(l),p=n(58),d=n(155),h=n(180),b=(n.n(h),n(56)),m=n(183),g=(n.n(m),function(){function e(e,t){for(var n=0;n=0&&(n=!1),e.setState({colorscaleType:t,log:n})}}};t.a=y},function(e,t,n){"use strict";var r=n(1),o=n.n(r),i=n(24),a=n.n(i),s=n(4),u=n.n(s),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(0),h=n.n(d),b=n(2),m=n.n(b),g=n(124),v=n(154),y=function(e){function t(){var n,r,o;u()(this,t);for(var i=arguments.length,a=Array(i),s=0;sc;)for(var p,d=s(arguments[c++]),h=l?r(d).concat(l(d)):r(d),b=h.length,m=0;b>m;)f.call(d,p=h[m++])&&(n[p]=d[p]);return n}:u},function(e,t,n){var r=n(16),o=n(63),i=n(93);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=o(u.length),l=i(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){var r=n(38),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){e.exports={default:n(95),__esModule:!0}},function(e,t,n){n(64),n(100),e.exports=n(46).f("iterator")},function(e,t,n){var r=n(38),o=n(37);e.exports=function(e){return function(t,n){var i,a,s=String(o(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(i=s.charCodeAt(u),i<55296||i>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):i:e?s.slice(u,u+2):a-56320+(i-55296<<10)+65536)}}},function(e,t,n){"use strict";var r=n(44),o=n(23),i=n(45),a={};n(17)(a,n(8)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(13),o=n(18),i=n(27);e.exports=n(14)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),s=a.length,u=0;s>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(12).document;e.exports=r&&r.documentElement},function(e,t,n){n(101);for(var r=n(12),o=n(17),i=n(26),a=n(8)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(105),__esModule:!0}},function(e,t,n){n(106),n(111),n(112),n(113),e.exports=n(3).Symbol},function(e,t,n){"use strict";var r=n(12),o=n(15),i=n(14),a=n(11),s=n(66),u=n(107).KEY,c=n(19),l=n(40),f=n(45),p=n(28),d=n(8),h=n(46),b=n(47),m=n(108),g=n(109),v=n(18),y=n(16),w=n(35),x=n(23),E=n(44),k=n(110),O=n(48),C=n(13),_=n(27),T=O.f,N=C.f,P=k.f,S=r.Symbol,M=r.JSON,j=M&&M.stringify,A=d("_hidden"),D=d("toPrimitive"),R={}.propertyIsEnumerable,L=l("symbol-registry"),V=l("symbols"),I=l("op-symbols"),B=Object.prototype,U="function"==typeof S,F=r.QObject,W=!F||!F.prototype||!F.prototype.findChild,H=i&&c(function(){return 7!=E(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=T(B,t);r&&delete B[t],N(e,t,n),r&&e!==B&&N(B,t,r)}:N,z=function(e){var t=V[e]=E(S.prototype);return t._k=e,t},Y=U&&"symbol"==typeof S.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof S},K=function(e,t,n){return e===B&&K(I,t,n),v(e),t=w(t,!0),v(n),o(V,t)?(n.enumerable?(o(e,A)&&e[A][t]&&(e[A][t]=!1),n=E(n,{enumerable:x(0,!1)})):(o(e,A)||N(e,A,x(1,{})),e[A][t]=!0),H(e,t,n)):N(e,t,n)},G=function(e,t){v(e);for(var n,r=m(t=y(t)),o=0,i=r.length;i>o;)K(e,n=r[o++],t[n]);return e},q=function(e,t){return void 0===t?E(e):G(E(e),t)},X=function(e){var t=R.call(this,e=w(e,!0));return!(this===B&&o(V,e)&&!o(I,e))&&(!(t||!o(this,e)||!o(V,e)||o(this,A)&&this[A][e])||t)},Z=function(e,t){if(e=y(e),t=w(t,!0),e!==B||!o(V,t)||o(I,t)){var n=T(e,t);return!n||!o(V,t)||o(e,A)&&e[A][t]||(n.enumerable=!0),n}},$=function(e){for(var t,n=P(y(e)),r=[],i=0;n.length>i;)o(V,t=n[i++])||t==A||t==u||r.push(t);return r},J=function(e){for(var t,n=e===B,r=P(n?I:y(e)),i=[],a=0;r.length>a;)!o(V,t=r[a++])||n&&!o(B,t)||i.push(V[t]);return i};U||(S=function(){if(this instanceof S)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(I,n),o(this,A)&&o(this[A],e)&&(this[A][e]=!1),H(this,e,x(1,n))};return i&&W&&H(B,e,{configurable:!0,set:t}),z(e)},s(S.prototype,"toString",function(){return this._k}),O.f=Z,C.f=K,n(68).f=k.f=$,n(29).f=X,n(42).f=J,i&&!n(43)&&s(B,"propertyIsEnumerable",X,!0),h.f=function(e){return z(d(e))}),a(a.G+a.W+a.F*!U,{Symbol:S});for(var Q="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;Q.length>ee;)d(Q[ee++]);for(var te=_(d.store),ne=0;te.length>ne;)b(te[ne++]);a(a.S+a.F*!U,"Symbol",{for:function(e){return o(L,e+="")?L[e]:L[e]=S(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in L)if(L[t]===e)return t},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!U,"Object",{create:q,defineProperty:K,defineProperties:G,getOwnPropertyDescriptor:Z,getOwnPropertyNames:$,getOwnPropertySymbols:J}),M&&a(a.S+a.F*(!U||c(function(){var e=S();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!Y(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,j.apply(M,r)}}}),S.prototype[D]||n(17)(S.prototype,D,S.prototype.valueOf),f(S,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(e,t,n){var r=n(28)("meta"),o=n(22),i=n(15),a=n(13).f,s=0,u=Object.isExtensible||function(){return!0},c=!n(19)(function(){return u(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++s,w:{}}})},f=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},p=function(e,t){if(!i(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},d=function(e){return c&&h.NEED&&u(e)&&!i(e,r)&&l(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(e,t,n){var r=n(27),o=n(42),i=n(29);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,s=n(e),u=i.f,c=0;s.length>c;)u.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var r=n(36);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(16),o=n(68).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(e){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?s(e):o(r(e))}},function(e,t){},function(e,t,n){n(47)("asyncIterator")},function(e,t,n){n(47)("observable")},function(e,t,n){e.exports={default:n(115),__esModule:!0}},function(e,t,n){n(116),e.exports=n(3).Object.setPrototypeOf},function(e,t,n){var r=n(11);r(r.S,"Object",{setPrototypeOf:n(117).set})},function(e,t,n){var r=n(22),o=n(18),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(34)(Function.call,n(48).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){e.exports={default:n(119),__esModule:!0}},function(e,t,n){n(120);var r=n(3).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){var r=n(11);r(r.S,"Object",{create:n(44)})},function(e,t,n){"use strict";(function(t){var r=n(49),o=n(31),i=n(50),a=n(51),s=n(52),u=n(122);e.exports=function(e,n){function c(e){var t=e&&(T&&e[T]||e[N]);if("function"==typeof t)return t}function l(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function p(e){function r(r,c,l,p,d,h,b){if(p=p||P,h=h||l,b!==s)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var m=p+":"+l;!a[m]&&u<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",h,p),a[m]=!0,u++)}return null==c[l]?r?new f(null===c[l]?"The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `null`.":"The "+d+" `"+h+"` is marked as required in `"+p+"`, but its value is `undefined`."):null:e(c,l,p,d,h)}if("production"!==t.env.NODE_ENV)var a={},u=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function t(t,n,r,o,i,a){var s=t[n];return k(s)!==e?new f("Invalid "+o+" `"+i+"` of type `"+O(s)+"` supplied to `"+r+"`, expected `"+e+"`."):null}return p(t)}function h(e){function t(t,n,r,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new f("Invalid "+o+" `"+i+"` of type `"+k(a)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u1?s-1:0),l=1;ln.right}function o(e,t,n){return e.topn.bottom}function i(e,t,n){return e.left>n.right||e.left+t.widthn.bottom||e.top+t.height=t.right||n.top>=t.bottom}function u(e,t,n){var r=[];return d.a.each(e,function(e){r.push(e.replace(t,function(e){return n[e]}))}),r}function c(e,t){return e[t]=-e[t],e}function l(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function f(e,t){e[0]=l(e[0],t.width),e[1]=l(e[1],t.height)}function p(e,t,n){var l=n.points,p=n.offset||[0,0],h=n.targetOffset||[0,0],y=n.overflow,w=n.target||t,x=n.source||e;p=[].concat(p),h=[].concat(h),y=y||{};var E={},k=0,O=Object(b.a)(x),C=Object(g.a)(x),_=Object(g.a)(w);f(p,C),f(h,_);var T=Object(v.a)(C,_,l,p,h),N=d.a.merge(C,T),P=!s(w);if(O&&(y.adjustX||y.adjustY)&&P){if(y.adjustX&&r(T,C,O)){var S=u(l,/[lr]/gi,{l:"r",r:"l"}),M=c(p,0),j=c(h,0);i(Object(v.a)(C,_,S,M,j),C,O)||(k=1,l=S,p=M,h=j)}if(y.adjustY&&o(T,C,O)){var A=u(l,/[tb]/gi,{t:"b",b:"t"}),D=c(p,1),R=c(h,1);a(Object(v.a)(C,_,A,D,R),C,O)||(k=1,l=A,p=D,h=R)}k&&(T=Object(v.a)(C,_,l,p,h),d.a.mix(N,T)),E.adjustX=y.adjustX&&r(T,C,O),E.adjustY=y.adjustY&&o(T,C,O),(E.adjustX||E.adjustY)&&(N=Object(m.a)(T,C,O,E))}return N.width!==C.width&&d.a.css(x,"width",d.a.width(x)+N.width-C.width),N.height!==C.height&&d.a.css(x,"height",d.a.height(x)+N.height-C.height),d.a.offset(x,{left:N.left,top:N.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform}),{points:l,offset:p,targetOffset:h,overflow:E}}Object.defineProperty(t,"__esModule",{value:!0});var d=n(20),h=n(72),b=n(138),m=n(140),g=n(141),v=n(142);p.__getOffsetParent=h.a,p.__getVisibleRectForElement=b.a,t.default=p},function(e,t,n){"use strict";function r(){if(void 0!==f)return f;f="";var e=document.createElement("p").style;for(var t in p)t+"Transform"in e&&(f=t);return f}function o(){return r()?r()+"TransitionProperty":"transitionProperty"}function i(){return r()?r()+"Transform":"transform"}function a(e,t){var n=o();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function s(e,t){var n=i();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}function u(e){return e.style.transitionProperty||e.style[o()]}function c(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(i());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}function l(e,t){var n=window.getComputedStyle(e,null),r=n.getPropertyValue("transform")||n.getPropertyValue(i());if(r&&"none"!==r){var o=void 0,a=r.match(d);a?(a=a[1],o=a.split(",").map(function(e){return parseFloat(e,10)}),o[4]=t.x,o[5]=t.y,s(e,"matrix("+o.join(",")+")")):(o=r.match(h)[1].split(",").map(function(e){return parseFloat(e,10)}),o[12]=t.x,o[13]=t.y,s(e,"matrix3d("+o.join(",")+")"))}else s(e,"translateX("+t.x+"px) translateY("+t.y+"px) translateZ(0)")}t.a=i,t.e=a,t.c=u,t.b=c,t.d=l;var f=void 0,p={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"},d=/matrix\((.*)\)/,h=/matrix3d\((.*)\)/},function(e,t,n){"use strict";function r(e){for(var t={left:0,right:1/0,top:0,bottom:1/0},n=Object(i.a)(e),r=o.a.getDocument(e),s=r.defaultView||r.parentWindow,u=r.body,c=r.documentElement;n;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===n.clientWidth||n===u||n===c||"visible"===o.a.css(n,"overflow")){if(n===u||n===c)break}else{var l=o.a.offset(n);l.left+=n.clientLeft,l.top+=n.clientTop,t.top=Math.max(t.top,l.top),t.right=Math.min(t.right,l.left+n.clientWidth),t.bottom=Math.min(t.bottom,l.top+n.clientHeight),t.left=Math.max(t.left,l.left)}n=Object(i.a)(n)}var f=null;o.a.isWindow(e)||9===e.nodeType||(f=e.style.position,"absolute"===o.a.css(e,"position")&&(e.style.position="fixed"));var p=o.a.getWindowScrollLeft(s),d=o.a.getWindowScrollTop(s),h=o.a.viewportWidth(s),b=o.a.viewportHeight(s),m=c.scrollWidth,g=c.scrollHeight;if(e.style&&(e.style.position=f),Object(a.a)(e))t.left=Math.max(t.left,p),t.top=Math.max(t.top,d),t.right=Math.min(t.right,p+h),t.bottom=Math.min(t.bottom,d+b);else{var v=Math.max(m,p+h);t.right=Math.min(t.right,v);var y=Math.max(g,d+b);t.bottom=Math.min(t.bottom,y)}return t.top>=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null}var o=n(20),i=n(72),a=n(139);t.a=r},function(e,t,n){"use strict";function r(e){if(o.a.isWindow(e)||9===e.nodeType)return!1;var t=o.a.getDocument(e),n=t.body,r=null;for(r=e.parentNode;r&&r!==n;r=r.parentNode)if("fixed"===o.a.css(r,"position"))return!0;return!1}t.a=r;var o=n(20)},function(e,t,n){"use strict";function r(e,t,n,r){var i=o.a.clone(e),a={width:t.width,height:t.height};return r.adjustX&&i.left=n.left&&i.left+a.width>n.right&&(a.width-=i.left+a.width-n.right),r.adjustX&&i.left+a.width>n.right&&(i.left=Math.max(n.right-a.width,n.left)),r.adjustY&&i.top=n.top&&i.top+a.height>n.bottom&&(a.height-=i.top+a.height-n.bottom),r.adjustY&&i.top+a.height>n.bottom&&(i.top=Math.max(n.bottom-a.height,n.top)),o.a.mix(i,a)}var o=n(20);t.a=r},function(e,t,n){"use strict";function r(e){var t=void 0,n=void 0,r=void 0;if(o.a.isWindow(e)||9===e.nodeType){var i=o.a.getWindow(e);t={left:o.a.getWindowScrollLeft(i),top:o.a.getWindowScrollTop(i)},n=o.a.viewportWidth(i),r=o.a.viewportHeight(i)}else t=o.a.offset(e),n=o.a.outerWidth(e),r=o.a.outerHeight(e);return t.width=n,t.height=r,t}var o=n(20);t.a=r},function(e,t,n){"use strict";function r(e,t,n,r,i){var a=Object(o.a)(t,n[1]),s=Object(o.a)(e,n[0]),u=[s.left-a.left,s.top-a.top];return{left:e.left-u[0]+r[0]-i[0],top:e.top-u[1]+r[1]-i[1]}}var o=n(143);t.a=r},function(e,t,n){"use strict";function r(e,t){var n=t.charAt(0),r=t.charAt(1),o=e.width,i=e.height,a=e.left,s=e.top;return"c"===n?s+=i/2:"b"===n&&(s+=i),"c"===r?a+=o/2:"r"===r&&(a+=o),{left:a,top:s}}t.a=r},function(e,t,n){"use strict";function r(e){return null!=e&&e==e.window}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){var t=e.children;return v.a.isValidElement(t)&&!t.key?v.a.cloneElement(t,{key:O}):t}function o(){}var i=n(1),a=n.n(i),s=n(21),u=n.n(s),c=n(4),l=n.n(c),f=n(7),p=n.n(f),d=n(5),h=n.n(d),b=n(6),m=n.n(b),g=n(0),v=n.n(g),y=n(2),w=n.n(y),x=n(146),E=n(147),k=n(74),O="rc_animate_"+Date.now(),C=function(e){function t(e){l()(this,t);var n=h()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return _.call(n),n.currentlyAnimatingKeys={},n.keysToEnter=[],n.keysToLeave=[],n.state={children:Object(x.e)(r(n.props))},n.childrenRefs={},n}return m()(t,e),p()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.showProp,n=this.state.children;t&&(n=n.filter(function(e){return!!e.props[t]})),n.forEach(function(t){t&&e.performAppear(t.key)})}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.nextProps=e;var n=Object(x.e)(r(e)),o=this.props;o.exclusive&&Object.keys(this.currentlyAnimatingKeys).forEach(function(e){t.stop(e)});var i=o.showProp,a=this.currentlyAnimatingKeys,s=o.exclusive?Object(x.e)(r(o)):this.state.children,c=[];i?(s.forEach(function(e){var t=e&&Object(x.a)(n,e.key),r=void 0;(r=t&&t.props[i]||!e.props[i]?t:v.a.cloneElement(t||e,u()({},i,!0)))&&c.push(r)}),n.forEach(function(e){e&&Object(x.a)(s,e.key)||c.push(e)})):c=Object(x.d)(s,n),this.setState({children:c}),n.forEach(function(e){var n=e&&e.key;if(!e||!a[n]){var r=e&&Object(x.a)(s,n);if(i){var o=e.props[i];r?!Object(x.b)(s,n,i)&&o&&t.keysToEnter.push(n):o&&t.keysToEnter.push(n)}else r||t.keysToEnter.push(n)}}),s.forEach(function(e){var r=e&&e.key;if(!e||!a[r]){var o=e&&Object(x.a)(n,r);if(i){var s=e.props[i];o?!Object(x.b)(n,r,i)&&s&&t.keysToLeave.push(r):s&&t.keysToLeave.push(r)}else o||t.keysToLeave.push(r)}})}},{key:"componentDidUpdate",value:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)}},{key:"isValidChildByKey",value:function(e,t){var n=this.props.showProp;return n?Object(x.b)(e,t,n):Object(x.a)(e,t)}},{key:"stop",value:function(e){delete this.currentlyAnimatingKeys[e];var t=this.childrenRefs[e];t&&t.stop()}},{key:"render",value:function(){var e=this,t=this.props;this.nextProps=t;var n=this.state.children,r=null;n&&(r=n.map(function(n){if(null===n||void 0===n)return n;if(!n.key)throw new Error("must set key for children");return v.a.createElement(E.a,{key:n.key,ref:function(t){return e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)}));var o=t.component;if(o){var i=t;return"string"==typeof o&&(i=a()({className:t.className,style:t.style},t.componentProps)),v.a.createElement(o,i,r)}return r[0]||null}}]),t}(v.a.Component);C.propTypes={component:w.a.any,componentProps:w.a.object,animation:w.a.object,transitionName:w.a.oneOfType([w.a.string,w.a.object]),transitionEnter:w.a.bool,transitionAppear:w.a.bool,exclusive:w.a.bool,transitionLeave:w.a.bool,onEnd:w.a.func,onEnter:w.a.func,onLeave:w.a.func,onAppear:w.a.func,showProp:w.a.string},C.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:o,onEnter:o,onLeave:o,onAppear:o};var _=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var o=e.props;if(delete e.currentlyAnimatingKeys[t],!o.exclusive||o===e.nextProps){var i=Object(x.e)(r(o));e.isValidChildByKey(i,t)?"appear"===n?k.a.allowAppearCallback(o)&&(o.onAppear(t),o.onEnd(t,!0)):k.a.allowEnterCallback(o)&&(o.onEnter(t),o.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var o=Object(x.e)(r(n));if(e.isValidChildByKey(o,t))e.performEnter(t);else{var i=function(){k.a.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};Object(x.c)(e.state.children,o,n.showProp)?i():e.setState({children:o},i)}}}};t.a=C},function(e,t,n){"use strict";function r(e){var t=[];return c.a.Children.forEach(e,function(e){t.push(e)}),t}function o(e,t){var n=null;return e&&e.forEach(function(e){n||e&&e.key===t&&(n=e)}),n}function i(e,t,n){var r=null;return e&&e.forEach(function(e){if(e&&e.key===t&&e.props[n]){if(r)throw new Error("two child with same key for children");r=e}}),r}function a(e,t,n){var r=e.length===t.length;return r&&e.forEach(function(e,o){var i=t[o];e&&i&&(e&&!i||!e&&i?r=!1:e.key!==i.key?r=!1:n&&e.props[n]!==i.props[n]&&(r=!1))}),r}function s(e,t){var n=[],r={},i=[];return e.forEach(function(e){e&&o(t,e.key)?i.length&&(r[e.key]=i,i=[]):i.push(e)}),t.forEach(function(e){e&&r.hasOwnProperty(e.key)&&(n=n.concat(r[e.key])),n.push(e)}),n=n.concat(i)}t.e=r,t.a=o,t.b=i,t.c=a,t.d=s;var u=n(0),c=n.n(u)},function(e,t,n){"use strict";var r=n(25),o=n.n(r),i=n(4),a=n.n(i),s=n(7),u=n.n(s),c=n(5),l=n.n(c),f=n(6),p=n.n(f),d=n(0),h=n.n(d),b=n(10),m=n.n(b),g=n(2),v=n.n(g),y=n(148),w=n(74),x={enter:"transitionEnter",appear:"transitionAppear",leave:"transitionLeave"},E=function(e){function t(){return a()(this,t),l()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return p()(t,e),u()(t,[{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillEnter",value:function(e){w.a.isEnterSupported(this.props)?this.transition("enter",e):e()}},{key:"componentWillAppear",value:function(e){w.a.isAppearSupported(this.props)?this.transition("appear",e):e()}},{key:"componentWillLeave",value:function(e){w.a.isLeaveSupported(this.props)?this.transition("leave",e):e()}},{key:"transition",value:function(e,t){var n=this,r=m.a.findDOMNode(this),i=this.props,a=i.transitionName,s="object"===("undefined"==typeof a?"undefined":o()(a));this.stop();var u=function(){n.stopper=null,t()};if((y.b||!i.animation[e])&&a&&i[x[e]]){var c=s?a[e]:a+"-"+e,l=c+"-active";s&&a[e+"Active"]&&(l=a[e+"Active"]),this.stopper=Object(y.a)(r,{name:c,active:l},u)}else this.stopper=i.animation[e](r,u)}},{key:"stop",value:function(){var e=this.stopper;e&&(this.stopper=null,e.stop())}},{key:"render",value:function(){return this.props.children}}]),t}(h.a.Component);E.propTypes={children:v.a.any},t.a=E},function(e,t,n){"use strict";function r(e,t){for(var n=window.getComputedStyle(e,null),r="",o=0;o1&&void 0!==arguments[1]?arguments[1]:{},n=o()({},this.props,t),r=x.a(e,n);return x.b(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,i=t.included,a=t.disabled,s=t.minimumTrackStyle,u=t.trackStyle,c=t.handleStyle,l=t.min,f=t.max,p=t.handle,d=this.state,b=d.value,m=d.dragging,g=this.calcOffset(b),v=p({className:n+"-handle",vertical:r,offset:g,value:b,dragging:m,disabled:a,min:l,max:f,index:0,style:c[0]||c,ref:function(t){return e.saveHandle(0,t)}}),w=u[0]||u;return{tracks:h.a.createElement(y.a,{className:n+"-track",vertical:r,included:i,offset:0,length:g,style:o()({},s,w)}),handles:v}}}]),n}(h.a.Component);E.propTypes={defaultValue:m.a.number,value:m.a.number,disabled:m.a.bool},t.a=Object(w.a)(E)}).call(t,n(9))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(158),i=r(o),a=n(161),s=r(a);t.default=function e(t,n,r){null===t&&(t=Function.prototype);var o=(0,s.default)(t,n);if(void 0===o){var a=(0,i.default)(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var u=o.get;return void 0!==u?u.call(r):void 0}},function(e,t,n){e.exports={default:n(159),__esModule:!0}},function(e,t,n){n(160),e.exports=n(3).Object.getPrototypeOf},function(e,t,n){var r=n(30),o=n(67);n(79)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){e.exports={default:n(162),__esModule:!0}},function(e,t,n){n(163);var r=n(3).Object;e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)}},function(e,t,n){var r=n(16),o=n(48).f;n(79)("getOwnPropertyDescriptor",function(){return function(e,t){return o(r(e),t)}})},function(e,t,n){"use strict";function r(e,t,n){var r=s.a.unstable_batchedUpdates?function(e){s.a.unstable_batchedUpdates(n,e)}:n;return i()(e,t,r)}t.a=r;var o=n(70),i=n.n(o),a=n(10),s=n.n(a)},function(e,t,n){"use strict";var r=n(21),o=n.n(r),i=n(1),a=n.n(i),s=n(0),u=n.n(s),c=n(33),l=n.n(c),f=n(32),p=n.n(f),d=function(e,t,n,r,o,i){p()(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var a=Object.keys(t).map(parseFloat);if(n)for(var s=o;s<=i;s+=r)a.indexOf(s)>=0||a.push(s);return a},h=function(e){var t=e.prefixCls,n=e.vertical,r=e.marks,i=e.dots,s=e.step,c=e.included,f=e.lowerBound,p=e.upperBound,h=e.max,b=e.min,m=e.dotStyle,g=e.activeDotStyle,v=h-b,y=d(0,r,i,s,b,h).map(function(e){var r,i=Math.abs(e-b)/v*100+"%",s=!c&&e===p||c&&e<=p&&e>=f,d=n?a()({bottom:i},m):a()({left:i},m);s&&(d=a()({},d,g));var h=l()((r={},o()(r,t+"-dot",!0),o()(r,t+"-dot-active",s),r));return u.a.createElement("span",{className:h,style:d,key:e})});return u.a.createElement("div",{className:t+"-step"},y)};t.a=h},function(e,t,n){"use strict";var r=n(1),o=n.n(r),i=n(21),a=n.n(i),s=n(25),u=n.n(s),c=n(0),l=n.n(c),f=n(33),p=n.n(f),d=function(e){var t=e.className,n=e.vertical,r=e.marks,i=e.included,s=e.upperBound,c=e.lowerBound,f=e.max,d=e.min,h=Object.keys(r),b=h.length,m=b>1?100/(b-1):100,g=.9*m,v=f-d,y=h.map(parseFloat).sort(function(e,t){return e-t}).map(function(e){var f,h=r[e],b="object"===("undefined"==typeof h?"undefined":u()(h))&&!l.a.isValidElement(h),m=b?h.label:h;if(!m)return null;var y=!i&&e===s||i&&e<=s&&e>=c,w=p()((f={},a()(f,t+"-text",!0),a()(f,t+"-text-active",y),f)),x={marginBottom:"-50%",bottom:(e-d)/v*100+"%"},E={width:g+"%",marginLeft:-g/2+"%",left:(e-d)/v*100+"%"},k=n?x:E,O=b?o()({},k,h.style):k;return l.a.createElement("span",{className:w,style:O,key:e},m)});return l.a.createElement("div",{className:t},y)};t.a=d},function(e,t,n){e.exports={default:n(168),__esModule:!0}},function(e,t,n){n(64),n(169),e.exports=n(3).Array.from},function(e,t,n){"use strict";var r=n(34),o=n(11),i=n(30),a=n(170),s=n(171),u=n(63),c=n(172),l=n(173);o(o.S+o.F*!n(175)(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,b=h>1?arguments[1]:void 0,m=void 0!==b,g=0,v=l(p);if(m&&(b=r(b,h>2?arguments[2]:void 0,2)),void 0==v||d==Array&&s(v))for(t=u(p.length),n=new d(t);t>g;g++)c(n,g,m?b(p[g],g):p[g]);else for(f=v.call(p),n=new d;!(o=f.next()).done;g++)c(n,g,m?a(f,b,[o.value,g],!0):o.value);return n.length=g,n}})},function(e,t,n){var r=n(18);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(26),o=n(8)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){"use strict";var r=n(13),o=n(23);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(174),o=n(8)("iterator"),i=n(26);e.exports=n(3).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(36),o=n(8)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),o))?n:i?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){var r=n(8)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229};r.isTextModifyingKeyEvent=function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},r.isCharacterKey=function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigation.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}},t.a=r},function(e,t,n){"use strict";var r=n(21),o=n.n(r),i=n(80),a=n.n(i),s=n(1),u=n.n(s),c=n(4),l=n.n(c),f=n(7),p=n.n(f),d=n(5),h=n.n(d),b=n(6),m=n.n(b),g=n(0),v=n.n(g),y=n(2),w=n.n(y),x=n(33),E=n.n(x),k=n(178),O=n.n(k),C=n(32),_=n.n(C),T=n(77),N=n(78),P=n(54),S=function(e){function t(e){l()(this,t);var n=h()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onEnd=function(){n.setState({handle:null}),n.removeDocumentEvents(),n.props.onAfterChange(n.getValue())};var r=e.count,o=e.min,i=e.max,a=Array.apply(null,Array(r+1)).map(function(){return o}),s="defaultValue"in e?e.defaultValue:a,u=void 0!==e.value?e.value:s,c=u.map(function(e){return n.trimAlignValue(e)}),f=c[0]===i?0:c.length-1;return n.state={handle:null,recent:f,bounds:c},n}return m()(t,e),p()(t,[{key:"componentWillReceiveProps",value:function(e){var t=this;if(("value"in e||"min"in e||"max"in e)&&(this.props.min!==e.min||this.props.max!==e.max||!O()(this.props.value,e.value))){var n=this.state.bounds,r=e.value||n,o=r.map(function(n){return t.trimAlignValue(n,e)});o.length===n.length&&o.every(function(e,t){return e===n[t]})||(this.setState({bounds:o}),n.some(function(t){return P.i(t,e)})&&this.props.onChange(o))}}},{key:"onChange",value:function(e){var t=this.props;"value"in t?void 0!==e.handle&&this.setState({handle:e.handle}):this.setState(e);var n=u()({},this.state,e),r=n.bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var o=this.calcValueByPos(e);this.startValue=o,this.startPosition=e;var i=this.getClosestBound(o),s=this.getBoundNeedMoving(o,i);if(this.setState({handle:s,recent:s}),o!==r[s]){var u=[].concat(a()(n.bounds));u[s]=o,this.onChange({bounds:u})}}},{key:"onMove",value:function(e,t){P.j(e);var n=this.props,r=this.state,o=this.calcValueByPos(t);if(o!==r.bounds[r.handle]){var i=[].concat(a()(r.bounds));i[r.handle]=o;var s=r.handle;if(!1!==n.pushable){var u=r.bounds[s];this.pushSurroundingHandles(i,s,u)}else n.allowCross&&(i.sort(function(e,t){return e-t}),s=i.indexOf(o));this.onChange({handle:s,bounds:i})}}},{key:"onKeyboard",value:function(){_()(!0,"Keyboard support is not yet supported for ranges.")}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;rt[r]&&(n=r);return Math.abs(t[n+1]-e)=r.length||i<0)return!1;var a=t+n,s=r[i],u=this.props.pushable,c=n*(e[a]-s);return!!this.pushHandle(e,a,n,u-c)&&(e[t]=s,!0)}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=u()({},this.props,t),r=P.a(e,n),o=this.ensureValueNotConflict(r,n);return P.b(o,n)}},{key:"ensureValueNotConflict",value:function(e,t){var n=t.allowCross,r=this.state||{},o=r.handle,i=r.bounds;if(!n&&null!=o){if(o>0&&e<=i[o-1])return i[o-1];if(o=i[o+1])return i[o+1]}return e}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,i=this.props,a=i.prefixCls,s=i.vertical,u=i.included,c=i.disabled,l=i.min,f=i.max,p=i.handle,d=i.trackStyle,h=i.handleStyle,b=r.map(function(t){return e.calcOffset(t)}),m=a+"-handle",g=r.map(function(t,r){var i;return p({className:E()((i={},o()(i,m,!0),o()(i,m+"-"+(r+1),!0),i)),vertical:s,offset:b[r],value:t,dragging:n===r,index:r,min:l,max:f,disabled:c,style:h[r],ref:function(t){return e.saveHandle(r,t)}})});return{tracks:r.slice(0,-1).map(function(e,t){var n,r=t+1,i=E()((n={},o()(n,a+"-track",!0),o()(n,a+"-track-"+r,!0),n));return v.a.createElement(T.a,{className:i,vertical:s,included:u,offset:b[r-1],length:b[r]-b[r-1],style:d[t],key:r})}),handles:g}}}]),t}(v.a.Component);S.displayName="Range",S.propTypes={defaultValue:w.a.arrayOf(w.a.number),value:w.a.arrayOf(w.a.number),count:w.a.number,pushable:w.a.oneOfType([w.a.bool,w.a.number]),allowCross:w.a.bool,disabled:w.a.bool},S.defaultProps={count:1,allowCross:!0,pushable:!1},t.a=Object(N.a)(S)},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),u=0;u", 31 | "dependencies": { 32 | "builder": "3.2.2", 33 | "copyfiles": "^1.2.0", 34 | "dash-components-archetype": "^0.2.11", 35 | "prop-types": "^15.5.9", 36 | "react": "^15.5.4", 37 | "react-colorscales": "0.4.2", 38 | "react-docgen": "^4.1.0", 39 | "react-dom": "^15.5.4" 40 | }, 41 | "devDependencies": { 42 | "dash-components-archetype-dev": "^0.2.11", 43 | "enzyme": "^2.8.2", 44 | "react-test-renderer": "^15.5.4" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2017.11.5 2 | chardet==3.0.4 3 | click==6.7 4 | click-plugins==1.0.3 5 | cligj==0.4.0 6 | colorlover==0.2.1 7 | cufflinks==0.12.1 8 | cycler==0.10.0 9 | dash==0.19.0 10 | dash-colorscales==0.0.1 11 | dash-core-components==0.15.4 12 | dash-html-components==0.8.0 13 | dash-renderer==0.11.1 14 | decorator==4.1.2 15 | descartes==1.1.0 16 | Fiona==1.7.11 17 | Flask==0.12.2 18 | Flask-Compress==1.4.0 19 | geopandas==0.3.0 20 | gunicorn==19.7.1 21 | idna==2.6 22 | ipython-genutils==0.2.0 23 | itsdangerous==0.24 24 | Jinja2==2.10 25 | jsonschema==2.6.0 26 | jupyter-core==4.4.0 27 | MarkupSafe==1.0 28 | matplotlib==2.1.1 29 | munch==2.2.0 30 | nbformat==4.4.0 31 | numpy==1.14.0 32 | pandas==0.22.0 33 | plotly==2.2.3 34 | pyparsing==2.2.0 35 | pyproj==1.9.5.1 36 | python-dateutil==2.6.1 37 | pytz==2017.3 38 | requests==2.18.4 39 | Shapely==1.6.3 40 | six==1.11.0 41 | traitlets==4.3.2 42 | urllib3==1.22 43 | Werkzeug==0.14.1 44 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plotly/dash-colorscales/f2518356ea7c7b96e54e2cb3d0bee522065e7203/screenshot.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | main_ns = {} 4 | exec(open('dash_colorscales/version.py').read(), main_ns) 5 | 6 | setup( 7 | name='dash_colorscales', 8 | version=main_ns['__version__'], 9 | author='plotly', 10 | packages=['dash_colorscales'], 11 | include_package_data=True, 12 | license='MIT', 13 | description='Colorscale picker UI for your Dash apps', 14 | install_requires=[] 15 | ) 16 | -------------------------------------------------------------------------------- /src/components/DashColorscales.react.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | import PropTypes from 'prop-types'; 3 | 4 | import {Colorscale} from 'react-colorscales'; 5 | import ColorscalePicker from 'react-colorscales'; 6 | 7 | // Use "Viridis" as the default scale 8 | const DEFAULT_SCALE = ["#fafa6e", "#9cdf7c", "#4abd8c", "#00968e", "#106e7c", "#2a4858"]; 9 | 10 | /** 11 | * DashColorscales is a Dash wrapper for `react-colorscales`. 12 | * It takes an array of colors, `colorscale`, and 13 | * displays a UI for modifying it or choosing a new scale. 14 | */ 15 | 16 | export default class DashColorscales extends Component { 17 | 18 | constructor(props) { 19 | super(props); 20 | this.state = { 21 | showColorscalePicker: false, 22 | colorscale: this.props.colorscale || DEFAULT_SCALE 23 | }; 24 | } 25 | 26 | render() { 27 | const {id, setProps, colorscale, nSwatches, fixSwatches} = this.props; 28 | console.warn(nSwatches, fixSwatches); 29 | return ( 30 |
31 |
this.setState({ 33 | showColorscalePicker: !this.state.showColorscalePicker 34 | })} 35 | > 36 | {}} 39 | width={150} 40 | /> 41 |
42 | {this.state.showColorscalePicker && 43 | { 48 | /* 49 | * Send the new value to the parent component. 50 | * In a Dash app, this will send the data back to the 51 | * Python Dash app server. 52 | */ 53 | if (setProps) { 54 | setProps({ 55 | colorscale: newColorscale 56 | }); 57 | } 58 | 59 | this.setState({colorscale: newColorscale}); 60 | }} 61 | /> 62 | } 63 |
64 | ); 65 | } 66 | } 67 | 68 | DashColorscales.propTypes = { 69 | /** 70 | * The ID used to identify this compnent in Dash callbacks 71 | */ 72 | id: PropTypes.string, 73 | 74 | /** 75 | * Optional: Initial colorscale to display. Default is Viridis. 76 | */ 77 | colorscale: PropTypes.array, 78 | 79 | /** 80 | * Optional: Initial number of colors in scale to display. 81 | */ 82 | nSwatches: PropTypes.number, 83 | 84 | /** 85 | * Optional: Set to `True` to fix the number of colors in the scale. 86 | */ 87 | fixSwatches: PropTypes.bool, 88 | 89 | /** 90 | * Dash-assigned callback that should be called whenever any of the 91 | * properties change 92 | */ 93 | setProps: PropTypes.func 94 | }; 95 | -------------------------------------------------------------------------------- /src/components/__tests__/.eslintrc: -------------------------------------------------------------------------------- 1 | --- 2 | extends: ../../../node_modules/dash-components-archetype/config/eslint/eslintrc-test.json 3 | 4 | globals: 5 | expect: false 6 | -------------------------------------------------------------------------------- /src/components/__tests__/ExampleComponent.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {shallow} from 'enzyme'; 3 | import ExampleComponent from '../ExampleComponent.react'; 4 | 5 | describe('ExampleComponent', () => { 6 | 7 | it('renders', () => { 8 | const component = shallow(); 9 | expect(component).to.be.ok; 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/prefer-default-export */ 2 | import DashColorscales from './components/DashColorscales.react'; 3 | 4 | export { 5 | DashColorscales 6 | }; 7 | -------------------------------------------------------------------------------- /test/main.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/default */ 2 | /* global require:false */ 3 | import karmaRunner from 'dash-components-archetype-dev/karma-runner'; 4 | 5 | karmaRunner.setupEnvironment(); 6 | 7 | // Use webpack to infer and `require` tests automatically. 8 | var testsReq = require.context('../src', true, /\.test.js$/); 9 | testsReq.keys().map(testsReq); 10 | 11 | karmaRunner.startKarma(); 12 | -------------------------------------------------------------------------------- /usage.py: -------------------------------------------------------------------------------- 1 | import dash_colorscales 2 | import dash 3 | import dash_html_components as html 4 | import json 5 | 6 | app = dash.Dash('') 7 | 8 | app.scripts.config.serve_locally = True 9 | 10 | app.layout = html.Div([ 11 | dash_colorscales.DashColorscales( 12 | id='colorscale-picker', 13 | nSwatches=7, 14 | fixSwatches=True 15 | ), 16 | html.P(id='output', children='') 17 | ]) 18 | 19 | @app.callback( 20 | dash.dependencies.Output('output', 'children'), 21 | [dash.dependencies.Input('colorscale-picker', 'colorscale')]) 22 | def display_output(colorscale): 23 | return json.dumps(colorscale) 24 | 25 | if __name__ == '__main__': 26 | app.run_server(debug=True) 27 | --------------------------------------------------------------------------------